Add Batch 5ae39300-82a3-42f4-aaac-7d69c6043d1d data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +64 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_content_list.json +0 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_model.json +0 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_origin.pdf +3 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/full.md +432 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/images.zip +3 -0
- 2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/layout.json +0 -0
- 2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_content_list.json +2064 -0
- 2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_model.json +0 -0
- 2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_origin.pdf +3 -0
- 2025/Self-Taught Agentic Long Context Understanding/full.md +397 -0
- 2025/Self-Taught Agentic Long Context Understanding/images.zip +3 -0
- 2025/Self-Taught Agentic Long Context Understanding/layout.json +0 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_content_list.json +0 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_model.json +0 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_origin.pdf +3 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/full.md +613 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/images.zip +3 -0
- 2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/layout.json +0 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_content_list.json +0 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_model.json +0 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_origin.pdf +3 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/full.md +0 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/images.zip +3 -0
- 2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/layout.json +0 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_content_list.json +0 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_model.json +0 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_origin.pdf +3 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/full.md +642 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/images.zip +3 -0
- 2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/layout.json +0 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_content_list.json +0 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_model.json +0 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_origin.pdf +3 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/full.md +471 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/images.zip +3 -0
- 2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/layout.json +0 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_content_list.json +0 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_model.json +0 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_origin.pdf +3 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/full.md +601 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/images.zip +3 -0
- 2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/layout.json +0 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_content_list.json +0 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_model.json +0 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_origin.pdf +3 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/full.md +463 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/images.zip +3 -0
- 2025/Serial Lifelong Editing via Mixture of Knowledge Experts/layout.json +0 -0
- 2025/Shaping the Safety Boundaries_ Understanding and Defending Against Jailbreaks in Large Language Models/ceeecb44-5196-49b7-b0ec-91443e35354e_content_list.json +0 -0
.gitattributes
CHANGED
|
@@ -2677,3 +2677,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 2677 |
2025/Segment-Level[[:space:]]Diffusion_[[:space:]]A[[:space:]]Framework[[:space:]]for[[:space:]]Controllable[[:space:]]Long-Form[[:space:]]Generation[[:space:]]with[[:space:]]Diffusion[[:space:]]Language[[:space:]]Models/b8af1192-6ac4-41a3-9370-99183abc6d37_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2678 |
2025/Selecting[[:space:]]and[[:space:]]Merging_[[:space:]]Towards[[:space:]]Adaptable[[:space:]]and[[:space:]]Scalable[[:space:]]Named[[:space:]]Entity[[:space:]]Recognition[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/6ffe5d37-c750-495a-b5f5-9229f9327eac_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2679 |
2025/Self-Error-Instruct_[[:space:]]Generalizing[[:space:]]from[[:space:]]Errors[[:space:]]for[[:space:]]LLMs[[:space:]]Mathematical[[:space:]]Reasoning/9b82b6d8-5666-41dc-afc4-d3b3eb3b6783_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2677 |
2025/Segment-Level[[:space:]]Diffusion_[[:space:]]A[[:space:]]Framework[[:space:]]for[[:space:]]Controllable[[:space:]]Long-Form[[:space:]]Generation[[:space:]]with[[:space:]]Diffusion[[:space:]]Language[[:space:]]Models/b8af1192-6ac4-41a3-9370-99183abc6d37_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2678 |
2025/Selecting[[:space:]]and[[:space:]]Merging_[[:space:]]Towards[[:space:]]Adaptable[[:space:]]and[[:space:]]Scalable[[:space:]]Named[[:space:]]Entity[[:space:]]Recognition[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/6ffe5d37-c750-495a-b5f5-9229f9327eac_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2679 |
2025/Self-Error-Instruct_[[:space:]]Generalizing[[:space:]]from[[:space:]]Errors[[:space:]]for[[:space:]]LLMs[[:space:]]Mathematical[[:space:]]Reasoning/9b82b6d8-5666-41dc-afc4-d3b3eb3b6783_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2680 |
+
2025/Self-Instructed[[:space:]]Derived[[:space:]]Prompt[[:space:]]Generation[[:space:]]Meets[[:space:]]In-Context[[:space:]]Learning_[[:space:]]Unlocking[[:space:]]New[[:space:]]Potential[[:space:]]of[[:space:]]Black-Box[[:space:]]LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2681 |
+
2025/Self-Taught[[:space:]]Agentic[[:space:]]Long[[:space:]]Context[[:space:]]Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2682 |
+
2025/Self-supervised[[:space:]]Quantized[[:space:]]Representation[[:space:]]for[[:space:]]Seamlessly[[:space:]]Integrating[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/31fc5769-8d08-480d-b31b-6db4d030bf19_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2683 |
+
2025/SelfElicit_[[:space:]]Your[[:space:]]Language[[:space:]]Model[[:space:]]Secretly[[:space:]]Knows[[:space:]]Where[[:space:]]is[[:space:]]the[[:space:]]Relevant[[:space:]]Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2684 |
+
2025/Semantic[[:space:]]Exploration[[:space:]]with[[:space:]]Adaptive[[:space:]]Gating[[:space:]]for[[:space:]]Efficient[[:space:]]Problem[[:space:]]Solving[[:space:]]with[[:space:]]Language[[:space:]]Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2685 |
+
2025/Semantic-Eval[[:space:]]_[[:space:]]A[[:space:]]Semantic[[:space:]]Comprehension[[:space:]]Evaluation[[:space:]]Framework[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Generation[[:space:]]without[[:space:]]Training/e6968513-c230-4d8b-928c-1f4270f2db74_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2686 |
+
2025/Separating[[:space:]]Tongue[[:space:]]from[[:space:]]Thought_[[:space:]]Activation[[:space:]]Patching[[:space:]]Reveals[[:space:]]Language-Agnostic[[:space:]]Concept[[:space:]]Representations[[:space:]]in[[:space:]]Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2687 |
+
2025/Serial[[:space:]]Lifelong[[:space:]]Editing[[:space:]]via[[:space:]]Mixture[[:space:]]of[[:space:]]Knowledge[[:space:]]Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2688 |
+
2025/Shaping[[:space:]]the[[:space:]]Safety[[:space:]]Boundaries_[[:space:]]Understanding[[:space:]]and[[:space:]]Defending[[:space:]]Against[[:space:]]Jailbreaks[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/ceeecb44-5196-49b7-b0ec-91443e35354e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2689 |
+
2025/Sharper[[:space:]]and[[:space:]]Faster[[:space:]]mean[[:space:]]Better_[[:space:]]Towards[[:space:]]More[[:space:]]Efficient[[:space:]]Vision-Language[[:space:]]Model[[:space:]]for[[:space:]]Hour-scale[[:space:]]Long[[:space:]]Video[[:space:]]Understanding/0e591c55-3ed6-4c9f-bf53-bc7dda4489d9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2690 |
+
2025/Sheep’s[[:space:]]Skin,[[:space:]]Wolf’s[[:space:]]Deeds_[[:space:]]Are[[:space:]]LLMs[[:space:]]Ready[[:space:]]for[[:space:]]Metaphorical[[:space:]]Implicit[[:space:]]Hate[[:space:]]Speech_/3eaf29f8-b666-468f-a869-02e55a4b7174_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2691 |
+
2025/ShifCon_[[:space:]]Enhancing[[:space:]]Non-Dominant[[:space:]]Language[[:space:]]Capabilities[[:space:]]with[[:space:]]a[[:space:]]Shift-based[[:space:]]Multilingual[[:space:]]Contrastive[[:space:]]Framework/e73f016b-5e69-4c21-ae5d-d7e770c06fb4_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2692 |
+
2025/Shifting[[:space:]]from[[:space:]]Ranking[[:space:]]to[[:space:]]Set[[:space:]]Selection[[:space:]]for[[:space:]]Retrieval[[:space:]]Augmented[[:space:]]Generation/5759fd70-97ca-49fd-aa06-e2cd7c48b8c0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2693 |
+
2025/Sightation[[:space:]]Counts_[[:space:]]Leveraging[[:space:]]Sighted[[:space:]]User[[:space:]]Feedback[[:space:]]in[[:space:]]Building[[:space:]]a[[:space:]]BLV-aligned[[:space:]]Dataset[[:space:]]of[[:space:]]Diagram[[:space:]]Descriptions/67626d29-abbe-4002-9ee9-dc99f4d472a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2694 |
+
2025/Silencing[[:space:]]Empowerment,[[:space:]]Allowing[[:space:]]Bigotry_[[:space:]]Auditing[[:space:]]the[[:space:]]Moderation[[:space:]]of[[:space:]]Hate[[:space:]]Speech[[:space:]]on[[:space:]]Twitch/e9664782-5c49-49a9-aa07-a9915f5030c9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2695 |
+
2025/SimulS2S-LLM_[[:space:]]Unlocking[[:space:]]Simultaneous[[:space:]]Inference[[:space:]]of[[:space:]]Speech[[:space:]]LLMs[[:space:]]for[[:space:]]Speech-to-Speech[[:space:]]Translation/4027bca4-a0ad-4dd6-89f9-ff0e2a62620f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2696 |
+
2025/Single-to-mix[[:space:]]Modality[[:space:]]Alignment[[:space:]]with[[:space:]]Multimodal[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]for[[:space:]]Document[[:space:]]Image[[:space:]]Machine[[:space:]]Translation/4669bb52-dd00-45eb-93fb-0a3d14069192_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2697 |
+
2025/Sinhala[[:space:]]Encoder-only[[:space:]]Language[[:space:]]Models[[:space:]]and[[:space:]]Evaluation/860e800e-9a6e-4108-8d09-f8ea2d9b6fe6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2698 |
+
2025/SkillAggregation_[[:space:]]Reference-free[[:space:]]LLM-Dependent[[:space:]]Aggregation/9599947a-9491-4254-ac96-c2ced076433c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2699 |
+
2025/SkillVerse[[:space:]]_[[:space:]]Assessing[[:space:]]and[[:space:]]Enhancing[[:space:]]LLMs[[:space:]]with[[:space:]]Tree[[:space:]]Evaluation/6dad1b30-d865-4929-a18d-a32031799d6c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2700 |
+
2025/Sliding[[:space:]]Windows[[:space:]]Are[[:space:]]Not[[:space:]]the[[:space:]]End_[[:space:]]Exploring[[:space:]]Full[[:space:]]Ranking[[:space:]]with[[:space:]]Long-Context[[:space:]]Large[[:space:]]Language[[:space:]]Models/78a109c4-d0bd-4b7f-b5a6-b80684454b43_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2701 |
+
2025/Small[[:space:]]Changes,[[:space:]]Big[[:space:]]Impact_[[:space:]]How[[:space:]]Manipulating[[:space:]]a[[:space:]]Few[[:space:]]Neurons[[:space:]]Can[[:space:]]Drastically[[:space:]]Alter[[:space:]]LLM[[:space:]]Aggression/4e87cc2b-b1ce-41af-b948-e32e5f578d2f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2702 |
+
2025/Smarter,[[:space:]]Better,[[:space:]]Faster,[[:space:]]Longer_[[:space:]]A[[:space:]]Modern[[:space:]]Bidirectional[[:space:]]Encoder[[:space:]]for[[:space:]]Fast,[[:space:]]Memory[[:space:]]Efficient,[[:space:]]and[[:space:]]Long[[:space:]]Context[[:space:]]Finetuning[[:space:]]and[[:space:]]Inference/a3b5a03d-f5e5-4f66-a416-577099706a73_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2703 |
+
2025/SoRFT_[[:space:]]Issue[[:space:]]Resolving[[:space:]]with[[:space:]]Subtask-oriented[[:space:]]Reinforced[[:space:]]Fine-Tuning/946acc87-2332-4d1f-86cf-4a024e49b8d0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2704 |
+
2025/SocialCC_[[:space:]]Interactive[[:space:]]Evaluation[[:space:]]for[[:space:]]Cultural[[:space:]]Competence[[:space:]]in[[:space:]]Language[[:space:]]Agents/021dd9ec-667a-44b7-aeee-0bbe85659cce_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2705 |
+
2025/SocialEval_[[:space:]]Evaluating[[:space:]]Social[[:space:]]Intelligence[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/0a4e159b-fbf3-4094-a5d1-c0b4f72e4789_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2706 |
+
2025/SoftCoT_[[:space:]]Soft[[:space:]]Chain-of-Thought[[:space:]]for[[:space:]]Efficient[[:space:]]Reasoning[[:space:]]with[[:space:]]LLMs/e14894d0-5ab0-4da2-b5c8-b693f36f076f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2707 |
+
2025/SongComposer_[[:space:]]A[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]for[[:space:]]Lyric[[:space:]]and[[:space:]]Melody[[:space:]]Generation[[:space:]]in[[:space:]]Song[[:space:]]Composition/1f8e4327-7447-4269-a5bb-09ed901ef339_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2708 |
+
2025/Soundwave_[[:space:]]Less[[:space:]]is[[:space:]]More[[:space:]]for[[:space:]]Speech-Text[[:space:]]Alignment[[:space:]]in[[:space:]]LLMs/aeedcc65-e87a-46e1-a792-c29bde3a3d60_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2709 |
+
2025/SpaRE_[[:space:]]Enhancing[[:space:]]Spatial[[:space:]]Reasoning[[:space:]]in[[:space:]]Vision-Language[[:space:]]Models[[:space:]]with[[:space:]]Synthetic[[:space:]]Data/65385a8d-65f5-4692-954b-8a158b5c7e95_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2710 |
+
2025/Sparse[[:space:]]Latents[[:space:]]Steer[[:space:]]Retrieval-Augmented[[:space:]]Generation/d569b6a1-0d67-418f-a0a2-a3c1a8c41ed4_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2711 |
+
2025/Sparse[[:space:]]Logit[[:space:]]Sampling_[[:space:]]Accelerating[[:space:]]Knowledge[[:space:]]Distillation[[:space:]]in[[:space:]]LLMs/91fb91bc-c734-48e2-9593-04342443c923_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2712 |
+
2025/Speaking[[:space:]]Beyond[[:space:]]Language_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Multimodal[[:space:]]Dataset[[:space:]]for[[:space:]]Learning[[:space:]]Nonverbal[[:space:]]Cues[[:space:]]from[[:space:]]Video-Grounded[[:space:]]Dialogues/cbb7cf7b-31b4-42df-bc2d-3025b9744e46_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2713 |
+
2025/SpeechFake_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Multilingual[[:space:]]Speech[[:space:]]Deepfake[[:space:]]Dataset[[:space:]]Incorporating[[:space:]]Cutting-Edge[[:space:]]Generation[[:space:]]Methods/6dcea930-750b-451f-9dc8-3ab5137a6877_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2714 |
+
2025/SpeechIQ_[[:space:]]Speech-Agentic[[:space:]]Intelligence[[:space:]]Quotient[[:space:]]Across[[:space:]]Cognitive[[:space:]]Levels[[:space:]]in[[:space:]]Voice[[:space:]]Understanding[[:space:]]by[[:space:]]Large[[:space:]]Language[[:space:]]Models/688b4f13-384a-433e-bdea-adc4633c8e04_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2715 |
+
2025/Speed[[:space:]]Up[[:space:]]Your[[:space:]]Code_[[:space:]]Progressive[[:space:]]Code[[:space:]]Acceleration[[:space:]]Through[[:space:]]Bidirectional[[:space:]]Tree[[:space:]]Editing/82d961b4-3d2b-422e-b2cf-f7a6323f1d07_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2716 |
+
2025/SpindleKV_[[:space:]]A[[:space:]]Novel[[:space:]]KV[[:space:]]Cache[[:space:]]Reduction[[:space:]]Method[[:space:]]Balancing[[:space:]]Both[[:space:]]Shallow[[:space:]]and[[:space:]]Deep[[:space:]]Layers/2e6abe9e-bb3b-480d-9ad1-301173ec9ba0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2717 |
+
2025/Squeezed[[:space:]]Attention_[[:space:]]Accelerating[[:space:]]Long[[:space:]]Context[[:space:]]Length[[:space:]]LLM[[:space:]]Inference/4a7fa69f-bca7-4129-9775-55af65e09f04_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2718 |
+
2025/Statistical[[:space:]]Deficiency[[:space:]]for[[:space:]]Task[[:space:]]Inclusion[[:space:]]Estimation/a274b209-8d3f-4dd8-88c1-c8a72157f1ce_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2719 |
+
2025/Stealing[[:space:]]Training[[:space:]]Data[[:space:]]from[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]in[[:space:]]Decentralized[[:space:]]Training[[:space:]]through[[:space:]]Activation[[:space:]]Inversion[[:space:]]Attack/f6d75d9e-a824-4ee8-a691-1e1135670886_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2720 |
+
2025/Steering[[:space:]]into[[:space:]]New[[:space:]]Embedding[[:space:]]Spaces_[[:space:]]Analyzing[[:space:]]Cross-Lingual[[:space:]]Alignment[[:space:]]Induced[[:space:]]by[[:space:]]Model[[:space:]]Interventions[[:space:]]in[[:space:]]Multilingual[[:space:]]Language[[:space:]]Models/3803b480-2e70-470b-8774-ae68e52c844c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2721 |
+
2025/Steering[[:space:]]off[[:space:]]Course_[[:space:]]Reliability[[:space:]]Challenges[[:space:]]in[[:space:]]Steering[[:space:]]Language[[:space:]]Models/73ed0c0e-c406-4efe-abae-958849557f8f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2722 |
+
2025/Stepwise[[:space:]]Reasoning[[:space:]]Disruption[[:space:]]Attack[[:space:]]of[[:space:]]LLMs/9a0e9b5f-195a-4649-b89a-a4a1b6f9a9e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2723 |
+
2025/Sticking[[:space:]]to[[:space:]]the[[:space:]]Mean_[[:space:]]Detecting[[:space:]]Sticky[[:space:]]Tokens[[:space:]]in[[:space:]]Text[[:space:]]Embedding[[:space:]]Models/b8fbf3f4-439e-4f31-86e7-18ee4dc55b43_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2724 |
+
2025/StitchLLM_[[:space:]]Serving[[:space:]]LLMs,[[:space:]]One[[:space:]]Block[[:space:]]at[[:space:]]a[[:space:]]Time/b4c9d8fe-7ca3-4ea3-8781-5d5f0ce5d1aa_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2725 |
+
2025/Stochastic[[:space:]]Chameleons_[[:space:]]Irrelevant[[:space:]]Context[[:space:]]Hallucinations[[:space:]]Reveal[[:space:]]Class-Based[[:space:]](Mis)Generalization[[:space:]]in[[:space:]]LLMs/d8e2b995-d424-4512-8a2b-8858cb24c8bf_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2726 |
+
2025/StrucText-Eval_[[:space:]]Evaluating[[:space:]]Large[[:space:]]Language[[:space:]]Model’s[[:space:]]Reasoning[[:space:]]Ability[[:space:]]in[[:space:]]Structure-Rich[[:space:]]Text/a22f8c17-1e23-4107-9d10-e5a7840fa837_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2727 |
+
2025/Structural[[:space:]]Reasoning[[:space:]]Improves[[:space:]]Molecular[[:space:]]Understanding[[:space:]]of[[:space:]]LLM/b6913a16-8727-4c1b-bf14-62e6268bd5f2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2728 |
+
2025/Structure-aware[[:space:]]Domain[[:space:]]Knowledge[[:space:]]Injection[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/50bf9b9c-049f-4f03-beac-e218ef23431b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2729 |
+
2025/SubLIME_[[:space:]]Subset[[:space:]]Selection[[:space:]]via[[:space:]]Rank[[:space:]]Correlation[[:space:]]Prediction[[:space:]]for[[:space:]]Data-Efficient[[:space:]]LLM[[:space:]]Evaluation/df4e46a4-2eb4-4139-938e-6252e60a9107_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2730 |
+
2025/Substance[[:space:]]over[[:space:]]Style_[[:space:]]Evaluating[[:space:]]Proactive[[:space:]]Conversational[[:space:]]Coaching[[:space:]]Agents/36e23fe2-5de4-446c-b184-0f604bcec62e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2731 |
+
2025/Subtle[[:space:]]Errors[[:space:]]in[[:space:]]Reasoning_[[:space:]]Preference[[:space:]]Learning[[:space:]]via[[:space:]]Error-injected[[:space:]]Self-editing/322a7ff2-326e-4bee-93f6-c756d12c3213_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2732 |
+
2025/SudoLM_[[:space:]]Learning[[:space:]]Access[[:space:]]Control[[:space:]]of[[:space:]]Parametric[[:space:]]Knowledge[[:space:]]with[[:space:]]Authorization[[:space:]]Alignment/94cdeaee-25f5-4927-a1bd-79c7be2a78bf_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2733 |
+
2025/SurveyPilot_[[:space:]]an[[:space:]]Agentic[[:space:]]Framework[[:space:]]for[[:space:]]Automated[[:space:]]Human[[:space:]]Opinion[[:space:]]Collection[[:space:]]from[[:space:]]Social[[:space:]]Media/6d256213-d9b9-4be8-8c14-728957408107_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2734 |
+
2025/SwiLTra-Bench_[[:space:]]The[[:space:]]Swiss[[:space:]]Legal[[:space:]]Translation[[:space:]]Benchmark/31ecd226-6412-4b3c-bca2-962b3522de0e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2735 |
+
2025/Symmetrical[[:space:]]Visual[[:space:]]Contrastive[[:space:]]Optimization_[[:space:]]Aligning[[:space:]]Vision-Language[[:space:]]Models[[:space:]]with[[:space:]]Minimal[[:space:]]Contrastive[[:space:]]Images/e0f94cc1-3f6b-4bdb-9898-624230707f65_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2736 |
+
2025/Synergistic[[:space:]]Weak-Strong[[:space:]]Collaboration[[:space:]]by[[:space:]]Aligning[[:space:]]Preferences/66690a6a-5968-461d-a440-f767fd572355_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2737 |
+
2025/Synergizing[[:space:]]LLMs[[:space:]]with[[:space:]]Global[[:space:]]Label[[:space:]]Propagation[[:space:]]for[[:space:]]Multimodal[[:space:]]Fake[[:space:]]News[[:space:]]Detection/78ed100f-1475-4e90-8808-964a09689132_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2738 |
+
2025/Synergizing[[:space:]]Unsupervised[[:space:]]Episode[[:space:]]Detection[[:space:]]with[[:space:]]LLMs[[:space:]]for[[:space:]]Large-Scale[[:space:]]News[[:space:]]Events/e210fff9-2689-4e82-8da9-521f78a19c7d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2739 |
+
2025/SynthesizeMe![[:space:]]Inducing[[:space:]]Persona-Guided[[:space:]]Prompts[[:space:]]for[[:space:]]Personalized[[:space:]]Reward[[:space:]]Models[[:space:]]in[[:space:]]LLMs/92c43a33-ebbb-4222-874e-adfa3d82a0c8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2740 |
+
2025/Synthesizing[[:space:]]Post-Training[[:space:]]Data[[:space:]]for[[:space:]]LLMs[[:space:]]through[[:space:]]Multi-Agent[[:space:]]Simulation/f9727a66-e0c2-433f-a0bd-c16bc712cf2b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2741 |
+
2025/T-REG_[[:space:]]Preference[[:space:]]Optimization[[:space:]]with[[:space:]]Token-Level[[:space:]]Reward[[:space:]]Regularization/fed22e5e-5a1b-40b5-8fb6-1526941f903a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2742 |
+
2025/T2A-Feedback_[[:space:]]Improving[[:space:]]Basic[[:space:]]Capabilities[[:space:]]of[[:space:]]Text-to-Audio[[:space:]]Generation[[:space:]]via[[:space:]]Fine-grained[[:space:]]AI[[:space:]]Feedback/4172e218-60f8-4fb5-b2d9-f899a2be6a02_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 2743 |
+
2025/T2I-FactualBench_[[:space:]]Benchmarking[[:space:]]the[[:space:]]Factuality[[:space:]]of[[:space:]]Text-to-Image[[:space:]]Models[[:space:]]with[[:space:]]Knowledge-Intensive[[:space:]]Concepts/435f957e-e61f-401d-b1c3-262c1ca9ea55_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/faa0bdb3-a9b0-478d-add7-4c89d0032ade_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f46179ca3f9a5767ade6d269961c66069ee6eecdad5e16db8868af84c0124bf
|
| 3 |
+
size 668762
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/full.md
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Self-Instructed Derived Prompt Generation Meets In-Context Learning: Unlocking New Potential of Black-Box LLMs
|
| 2 |
+
|
| 3 |
+
Zhuo Li\*1,2,3\*, Yuhao Du\*1,2,3, Jinpeng Hu4, Xiang Wan1,2, Anningzhe Gao1,2
|
| 4 |
+
|
| 5 |
+
<sup>1</sup> Shenzhen International Center for Industrial and Applied Mathematics,
|
| 6 |
+
|
| 7 |
+
2 Shenzhen Research Institute of Big Data,
|
| 8 |
+
|
| 9 |
+
3 The Chinese University of Hong Kong, Shenzhen,
|
| 10 |
+
|
| 11 |
+
$^{4}$ Hefei University of Technology,
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Improving prompt quality is crucial for enhancing the performance of large language models (LLMs), particularly for Black-Box models like GPT4. Existing prompt refinement methods, while effective, often suffer from semantic inconsistencies between refined and original prompts, and fail to maintain users' real intent. To address these challenges, we propose a self-instructed in-context learning framework that generates reliable derived prompts, keeping semantic consistency with the original prompts. Specifically, our framework incorporates a reinforcement learning mechanism, enabling direct interaction with the response model during prompt generation to better align with human preferences. We then formulate the querying as an in-context learning task, combining responses from LLMs with derived prompts to create a contextual demonstration for the original prompt. This approach effectively enhances alignment, reduces semantic discrepancies, and activates the LLM's in-context learning ability for generating more beneficial responses. Extensive experiments demonstrate that the proposed method not only generates better derived prompts but also significantly enhances LLMs' ability to deliver more effective responses, particularly for Black-Box models like GPT4.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
The emergence of Large Language Models (LLMs) has significantly advanced the field of Natural Language Processing (NLP), achieving remarkable results across various tasks (OpenAI et al., 2023; Srivastava et al., 2022; Brown et al., 2020; Touvron et al., 2023; Devlin, 2018; Hu et al., 2023). The success of these models is highly dependent on the quality of the input prompts, as ambiguous or insecure prompts can lead to low-quality and unreliable responses (Zhou et al., 2022; Zamfirescu-Pereira
|
| 20 |
+
|
| 21 |
+
et al., 2023; Liu et al., 2023; Du et al., 2025b). Additionally, the high training costs associated with the large parameter sizes of these LLMs make it challenging to fine-tune for alignment when handling downstream tasks. In particular, for BlackBox LLMs, training is impossible. Therefore, utilizing better prompts to guide the models in generating the desired outputs has been an effective and promising approach in applying LLMs to various tasks.
|
| 22 |
+
|
| 23 |
+
To this end, several approaches are proposed to find the optimal prompts that can generally promote LLMs across various tasks. A popular approach is to refine the prompts with manually designed templates (Tam et al., 2021; Reynolds and McDonell, 2021), which, however, is limited in specific scenarios, resulting in a high manual workload and constrained usability (Webson and Pavlick, 2021). Therefore, some automated methods are proposed to rewrite prompts, which usually leverage the powerful capabilities of LLMs by directly asking the model to refine the prompts (Zhou et al., 2022; Fernando et al., 2023; Madaan et al., 2023), or by training a dedicated prompt refinement model to enhance prompt quality (Cheng et al., 2023; Deng et al., 2022; Kong et al., 2024; Zheng et al., 2024b). While effective, several challenges may limit their practical use on downstream tasks. For example, previous methods often require a labor-intensive data collection or complex template design, and the lack of interaction with the queried model (e.g., response model) that is used in downstream tasks during rewritten can result in prompts not fully compatible with it. Moreover, the prompt rewriting process may introduce several semantic inconsistencies between the refined and original prompts, potentially leading to less effective responses, as shown in Tab. 1. Given these considerations, we raise the following question:
|
| 24 |
+
|
| 25 |
+
Is there a more effective way to prompt the response model (e.g., Black-Box GPT4) than solely
|
| 26 |
+
|
| 27 |
+
Table 1: Failed refined prompt cases. Case 1 is from directly asking Llama3-8B-Instruct (Touvron et al., 2023) for a prompt refinement. Both Case 2 and Case 3 are from BPO (Cheng et al., 2023). Justification provides an analysis from GPT4 on how the refined prompts fail to serve as an effective evolution compared with the original ones.
|
| 28 |
+
|
| 29 |
+
<table><tr><td rowspan="2">Case 1</td><td>Original Prompt
|
| 30 |
+
Refined Prompt</td><td>Human knowledge is a collection of definitions and observations. What is your opinion about this proposition?
|
| 31 |
+
What is the foundation of human knowledge and how do we acquire and organize it?</td></tr><tr><td>Justification</td><td>The refined prompt diverges significantly from the original prompt by altering the focus and depth of inquiry.</td></tr><tr><td rowspan="2">Case 2</td><td>Original Prompt
|
| 32 |
+
Refined Prompt</td><td>Describe the health benefits of green tea.
|
| 33 |
+
Discuss the antioxidant properties of green tea and its role in preventing cancer.</td></tr><tr><td>Justification</td><td>The refined prompt loses context. The original prompt asks about the health benefits of green tea in general, while the refined one focuses only on its antioxidant properties and role in cancer prevention, ignoring other benefits.</td></tr><tr><td rowspan="2">Case 3</td><td>Original Prompt
|
| 34 |
+
Refined Prompt</td><td>Generate a product idea for a mobile application.
|
| 35 |
+
Generate a product idea for a mobile application that helps users meet dietary goals through personalized nutrition and meal planning.</td></tr><tr><td>Justification</td><td>The refined prompt overly narrows the focus compared to the original prompt. It limits the potential product ideas to only those related to a specific topic, neglecting other innovative possibilities within the mobile application space.</td></tr></table>
|
| 36 |
+
|
| 37 |
+
# generating a refined prompt?
|
| 38 |
+
|
| 39 |
+
Building on the successes of in-context learning (ICL) in enhancing LLM performance through additional relevant demonstrations (Dong et al., 2022), we introduce a novel framework to stimulate LLMs into generating more helpful and reliable responses by automatically constructing an informative in-context environment for the original prompt. Specifically, we develop a derived prompt generation model that will be optimized through a self-instructed reinforcement learning (RL) objective. By integrating the response model into the RL training process, our approach avoids extensive training data collection and ensures a closer alignment between the derived prompt and the response model. Crucially, instead of replacing the original prompt, we utilize the derived prompt-response pair as a semantically relevant ICL demonstration (Liu et al., 2021), thereby preserving the original prompt's intent while leveraging the benefits of ICL and effectively stimulating the LLM's inherent knowledge to produce higher-quality responses. Extensive experiments across various downstream datasets demonstrate significant improvements in response quality compared to existing prompt refinement methods, including enhancements in Black-Box models such as GPT4. Our approach presents a promising and interpretable paradigm for aligning LLMs without modifications, offering the following advantages:
|
| 40 |
+
|
| 41 |
+
- A novel framework for aligning LLMs with human preferences based on prompt improvement, applicable to Black-Box LLMs like GPT4.
|
| 42 |
+
- A data collection-free way for prompt refinement via a self-instructed RL objective.
|
| 43 |
+
- Automatic construction of informative ICL environments through high-quality demonstrations.
|
| 44 |
+
- Significant enhancements in response quality across various downstream datasets.
|
| 45 |
+
|
| 46 |
+
# 2 Background
|
| 47 |
+
|
| 48 |
+
SFT. Supervised Fine-Tuning (SFT) with annotated text descriptions is widely used to adapt LLMs into downstream tasks. Given prompt-response pairs $(x,y)$ sampled from a distribution $\mathcal{D}$ , SFT objective function is defined as:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathcal {L} _ {\mathrm {S F T}} = - \mathbb {E} _ {(x, y) \sim \mathcal {D}} \left[ \sum_ {i} \log \pi_ {\mathrm {S F T}} \left(y _ {i} | x, y _ {< i}\right) \right], \tag {1}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\pi$ indicates a LLM policy and $y_{<i}$ refers to all tokens before the $i$ -th token in response $y$ . In prompt rewritten task, $x$ and $y$ usually indicate original and refined prompt, respectively. For example, Cheng et al. (2023) and Zheng et al. (2024b) collect various $(x,y)$ pairs generated from GPT4 and design a prompt refinement system by minimizing Eq. 1.
|
| 55 |
+
|
| 56 |
+
RLHF. Reinforcement Learning from Human Feedback (RLHF) is another effective tuning method for improving the alignment of LLMs with human preferences, which typically involves two steps: reward modeling and RL training. In reward modeling, a reward model $\mathcal{R}$ is designed to measure response quality to an input prompt: $\mathcal{L}_{\text{Reward}} = -\mathbb{E}_{(x,y_c,y_r)\sim \mathcal{D}}[\log (\sigma (\mathcal{R}(x,y_c) - \mathcal{R}(x,y_r)))]$ , where $y_{c}$ and $y_{r}$ indicate good and bad response, respectively. $\sigma$ is the sigmoid function. Generally, RL training uses the PPO algorithm (Schulman et al., 2017) with an additional Kullback-Leibler (KL) regularization as below:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathcal {L} _ {\mathrm {R L H F}} = \mathbb {E} _ {(x \sim \mathcal {D}, y \sim \pi_ {\theta} (y | x))} \left[ \mathcal {R} (x, y) - \beta \log \frac {\pi_ {\theta} (y | x)}{\pi_ {\mathrm {S F T}} (y | x)} \right], \tag {2}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\beta > 0$ is a hyper-parameter that controls the influence of the KL penalty. Training a prompt rewritten model using Eq. 2 is still impractical
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
Figure 1: (a) Previous methods directly replace the original prompt with the refined one, potentially risking semantic inconsistencies and ineffective responses. (b) Our method uses a derived prompt to create an incontext demonstration, ensuring high-quality responses while maintaining the integrity of the original prompt.
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
|
| 69 |
+
because it requires collecting a dataset of original prompts and refinements, for obtaining a basic rewriter $\pi_{\mathrm{SFT}}$ and a specific reward model which can evaluate the quality of refined prompt.
|
| 70 |
+
|
| 71 |
+
# 3 Motivation
|
| 72 |
+
|
| 73 |
+
As shown in Fig. 1(a), previous methods that directly replace the original prompt with a refined prompt to query LLMs often overlook valuable information contained in the original prompt, leading to ineffective responses due to essential semantic inconsistencies between the original and rewritten prompts. Fig. 1(b) gives a illustration to our method, which addresses this issue by generating a derived prompt that is used to query the response model. The derived prompt-response pair is then employed to construct a semantically similar, high-quality demonstration for the original prompt. This in-context query process promotes the model's ICL capabilities more effectively, ensuring more useful responses while consistently querying the original prompt, thereby avoiding ineffective results.
|
| 74 |
+
|
| 75 |
+
# 4 Methodology
|
| 76 |
+
|
| 77 |
+
# 4.1 Task Formulation
|
| 78 |
+
|
| 79 |
+
We begin with the definition of a derived prompt and its generation process. A derived prompt $x'$ is a transformation of the original prompt $x$ that maintains close relevance and shows improved expression, without necessarily being a rewritten or refined prompt. Our goal is to train an effective generation model $\pi$ that is initialized by a LLM and can reliably produce a derived prompt $x' \sim \pi(x'|x)$ given an original prompt $x$ . Consequently, a higher-quality response $y'$ can be generated by query a response model $\mathcal{M}$ , serving as more effective reply for $x$ , due to their similar semantics. Generally, $\pi$ can be a frozen Black-Box model (e.g., GPT4) or
|
| 80 |
+
|
| 81 |
+
Algorithm 1: Self-instructed RL for derived prompt generation model training.
|
| 82 |
+
|
| 83 |
+
<table><tr><td colspan="2">Input :Training Dataset D, DPG instruction xdPG, a LLM initialized π, frozen response model M and reward model R.
|
| 84 |
+
Output: Derived Prompt Generation Model πθ.</td></tr><tr><td colspan="2">1 Initialize πθ← π;</td></tr><tr><td colspan="2">2 Initialize πref← π;</td></tr><tr><td colspan="2">3 for Random Sample a x in D do</td></tr><tr><td colspan="2">4 Obtain X = Concat([xdPG, x]);</td></tr><tr><td colspan="2">5 Prompt πθ to obtain derived prompt x' ~ πθ(x'|X);</td></tr><tr><td colspan="2">6 Prompt M to generate response y' ~ M(y'|x');</td></tr><tr><td colspan="2">7 Compute reward value by R(x', y');</td></tr><tr><td colspan="2">8 Compute KL penalty by β log πθ(x'|X)/πref(x'|X);</td></tr><tr><td colspan="2">9 Update derived prompt generation model πθ by maximizing R(x', y') - β log πθ(x'|X)/πref(x'|X);</td></tr><tr><td colspan="2">10 end</td></tr></table>
|
| 85 |
+
|
| 86 |
+
a learnable model. In this research, we focus on optimizing a trainable model $\pi$ parameterized by $\theta \in \mathbb{R}^d$ , with the goal of $x'$ to be more semantically derived to $x$ and better aligned with $\mathcal{M}$ .
|
| 87 |
+
|
| 88 |
+
# 4.2 Self-instructed RL for Derived Prompt Generation Model
|
| 89 |
+
|
| 90 |
+
As mentioned in Sec. 2, directly using Eq. 1 and 2 to optimize a derived prompt generation model $\pi_{\theta}$ typically introduces onerous data collection and lacks of alignment between derived prompts and response model, leading to suboptimal compatibility with downstream tasks. To address these issues, we propose a self-instructed RL objective for effective refinement model training.
|
| 91 |
+
|
| 92 |
+
Let $D = \{x_{i}\}_{i = 1}^{N}$ denote a training data set of length $N$ , which only includes original prompts. Assume that we have a reliable reward model $\mathcal{R}$ , which measures the response quality of the response model $\mathcal{M}$ when using the derived prompt $x^{\prime}$ . Instead of utilizing pre-collected $x^{\prime}$ to optimize the model $\pi_{\theta}$ in an offline mode, we aim to leverage the reward for $\mathcal{M}$ response to $x^{\prime}$ to direct the optimization, which can further generate desirable $x^{\prime}$ that is better aligned with $\mathcal{M}$ (We freeze $\mathcal{M}$ during $\pi_{\theta}$ training since the parameters of $\mathcal{M}$ may be inaccessible). To this end, we design to maximize the following objective:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathbb {E} _ {\substack {x ^ {\prime} \sim \pi_ {\theta} \left(x ^ {\prime} \mid x\right) \\ y ^ {\prime} \sim \mathcal {M} \left(y ^ {\prime} \mid x ^ {\prime}\right)}} \left[ \mathcal {R} \left(x ^ {\prime}, y ^ {\prime}\right) - \beta \log \frac {\pi_ {\theta} \left(x ^ {\prime} \mid x\right)}{\pi_ {\text {ref}} \left(x ^ {\prime} \mid x\right)} \right], \tag{3}
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $x^{\prime}\sim \pi_{\theta}(x^{\prime}|x)$ $y^\prime \sim \mathcal{M}(y^\prime |x^\prime)$ and $\pi_{\mathrm{ref}}$ is the reference model identically initialized by $\pi$ and $\beta$ is a hyper-parameter for stable model training.
|
| 99 |
+
|
| 100 |
+
It is important to note that Eq. 3 relies on the $\pi_{\theta}$ model having a basic derived prompt generation capability. Given an original prompt $x$ , $\pi_{\theta}$ can directly rewrite it instead of performing the task in $x$ (e.g., answering the question posed by $x$ ). Therefore, previous methods (Kong et al., 2024; Huang et al., 2024) necessitate an SFT stage to transform the pre-trained $\pi$ into a prompt rewriter $\pi_{\mathrm{SFT}}$ , which initializes both $\pi_{\theta}$ and $\pi_{\mathrm{ref}}$ , demanding extensive data collection of $(x,x^{\prime})$ pairs.
|
| 101 |
+
|
| 102 |
+
Note that a well pre-trained LLM $\pi_{\theta}$ should inherently possess basic capabilities of instruction-following (Ouyang et al., 2022) and paraphrasing. Therefore, we propose to use a derived prompt generation (DPG) instruction $x_{\mathrm{DPG}}$ to overcome the necessity of SFT. Specifically, we manually design a $x_{\mathrm{DPG}}$ as shown below:
|
| 103 |
+
|
| 104 |
+
Instruction: Please provide a more comprehensive, easily understandable, and answerable version of the following question. Ensure that necessary contextual information is added during the rewrite, but do not limit the understanding and response to the question. Avoid confining the question to just a few aspects, allowing the responder to think from multiple angles. Only return the refined question and do not explain. Here is my original question:"
|
| 105 |
+
|
| 106 |
+
Question: {Original Prompt $x$ }
|
| 107 |
+
|
| 108 |
+
As expected, $\pi_{\theta}$ should generate a reasonable derived prompt $x^{\prime}$ based its instruction-following capability:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
X = \operatorname {C o n c a t} ([ x _ {\mathrm {D P G}}, x ]), \tag {4}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
x ^ {\prime} \sim \pi_ {\theta} (X).
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
With the help of $x_{\mathrm{DPG}}$ , our method can effectively eliminate the need for data collection and additional training costs introduced by SFT. Additionally, by strategically leveraging the $\mathcal{M}$ into the training process of $\pi_{\theta}$ , the generated derived prompts will be more in line with the preferences of the response model. Our final training objective is shown below:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbb {E} _ {\substack {x ^ {\prime} \sim \pi_ {\theta} (x ^ {\prime} | x) \\ y ^ {\prime} \sim \mathcal {M} (y ^ {\prime} | x ^ {\prime})}} \left[ \mathcal {R} (x ^ {\prime}, y ^ {\prime}) - \beta \log \frac {\pi_ {\theta} (x ^ {\prime} | x)}{\pi_ {\text {ref}} (x ^ {\prime} | x)} \right]. \tag{5}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
We summarize the training process in Alg. 1.
|
| 125 |
+
|
| 126 |
+
Algorithm 2: Intent-consistency oriented in-context query framework for inference.
|
| 127 |
+
|
| 128 |
+
Input :Inference prompt $x$ , DPG instruction $x_{\mathrm{DPG}}$ derived prompt generation model $\pi$ and a LLM to be queried.
|
| 129 |
+
|
| 130 |
+
Output: Final response to user.
|
| 131 |
+
|
| 132 |
+
1 Obtain $X = \mathrm{Concat}([x_{\mathrm{DPG}},x])$
|
| 133 |
+
2 Generate refined prompt $x^{\prime}\sim \pi (x^{\prime}|X)$
|
| 134 |
+
3 Prompt LLM to obtain response $y^\prime \sim \mathrm{LLM}(y^\prime |x^\prime)$
|
| 135 |
+
4 Fulfill the in-context query template with $(x, x', y')$ ;
|
| 136 |
+
5 Query LLM and obtain final response;
|
| 137 |
+
|
| 138 |
+
# 4.3 Intent-Consistency Oriented In-context Query Framework for Inference
|
| 139 |
+
|
| 140 |
+
Although the derived prompt generation model optimized by Eq. 5 can produce higher-quality, semantically rich, and more compatible $x'$ with the response model $\mathcal{M}$ , there still remains a risk of semantic inconsistency and intent shift due to the uncontrollability of the generation process. Consequently, directly replacing the original prompt with the derived prompt would not be the optimal solution to make full use of it, even for our method.
|
| 141 |
+
|
| 142 |
+
To address the mentioned issue and better activate the LLM's inherent knowledge, we propose a general in-context query framework to mitigate potential semantic discrepancy, where we leverage high-quality, relevant in-context demonstrations derived from the original prompt. Therefore, this approaches can effectively enhance LLM ability to better respond to the user's original query. As shown in Alg. 2, we construct an intent-consistent in-context query by filling the following template using $(x,x^{\prime},y^{\prime})$ , where $x,x^{\prime},y^{\prime}$ indicates the original prompt, its corresponding derived prompt and the LLM response to the derived prompt, respectively. This in-context query requires the better LLM respond to the original question $x$ by emulating the quality, style, and level of detail of the response $y^\prime$ given to $x^{\prime}$ :
|
| 143 |
+
|
| 144 |
+
Question: $\{\text{Derived Prompt } x'\}$ .
|
| 145 |
+
\*\*\* Response: $\{Response y^{\prime}\}$
|
| 146 |
+
|
| 147 |
+
Given the above Question and Response as an example, emulate the way it responds to the question to reply to the following question:
|
| 148 |
+
|
| 149 |
+
Question: {Original Prompt $x$ }
|
| 150 |
+
|
| 151 |
+
This in-context query framework ensures that the final response aligns more closely with the original intent included in $x$ , while maintaining the
|
| 152 |
+
|
| 153 |
+
enhanced response characteristics corresponding to the derived prompt. Therefore, it mitigates potential discrepancies between the refined prompt and the original prompt, leading to responses that are more helpful, reliable, and consistent with user expectations.
|
| 154 |
+
|
| 155 |
+
# 5 Experiments
|
| 156 |
+
|
| 157 |
+
In this section, we conduct extensive experiments on various downstream datasets to comprehensively evaluate our method when compared with baseline methods. Ablation studies demonstrate the superior and necessity of our proposed self-instructed RL method for derived prompt generation, and also shows that ICL can serve as a flexible play-and-plug module to generally boosting existing methods to achieve better performance. We also conduct human evaluations and efficiency analysis. Detailed training settings are in Appendix B and we conduct experiment for two runs.
|
| 158 |
+
|
| 159 |
+
# 5.1 Experimental Setup
|
| 160 |
+
|
| 161 |
+
Datasets. To train a derived prompt generation model by Eq. 5, we utilize the BPO training dataset by following previous work (Huang et al., 2024; Cheng et al., 2023), which is constructed from four meticulously selected datasets and comprises 14K diverse samples. In order to comprehensively evaluate the performance of our method, we adopt wide-used instruction datasets for assessment, including Dolly Eval (Conover et al., 2023), Vicuna Eval (Chiang et al., 2023), Self-Instruct Eval (Wang et al., 2022) and BPO test Eval (Cheng et al., 2023). We provide detailed description in Appendix B.
|
| 162 |
+
|
| 163 |
+
Derived Prompt Generation Model. We particularly focus training an effective $\pi_{\theta}$ based on the popular LLMs such as LLaMA (Touvron et al., 2023) and Qwen (Yang et al., 2024a). Specifically, considering that our method relies on an instruction-following capability for derived prompt generation, we apply our method to Llama2-chat (Touvron et al., 2023), Llama3-8B-Instruct (Touvron et al., 2023) and Qwen2-7B-Instruct (Yang et al., 2024a), which are all abbreviated as Llama3, Llama2 and Qwen2, respectively.
|
| 164 |
+
|
| 165 |
+
Reward Model $\mathcal{R}$ . Recall that we employ a RL objective to optimize $\pi_{\theta}$ by maximizing Eq. 5. To effectively evaluate the quality of generated pairs $(x', y')$ , we employ a popular and SOTA reward
|
| 166 |
+
|
| 167 |
+
model $^{1}$ trained on hh-rlhf helpful dataset (Bai et al., 2022a) and proven effective in various works by matching other larger reward models.
|
| 168 |
+
|
| 169 |
+
Queried Model $\mathcal{M}$ . A queried model is an frozen model used to generate responses to various prompt inputs and in the training process of the derived prompt generation model, we require an $\mathcal{M}$ that generates a response $y^\prime$ to the derived prompt $x^{\prime}$ to maximize Eq. 5. Here, we experimentally employ both Black-box LLMs like GPT3.5-turbo (GPT3.5) and GPT4o (GPT4), and white-box LLMs like Llama2-7B-chat (Llama2-7B), Llama3-8B-Instruct (Llama3-8B) and Qwen2-7B-Instruct (Qwen2-7B).
|
| 170 |
+
|
| 171 |
+
Baselines and Evaluation Metrics. To demonstrate the effectiveness of our approach in helping LLMs generate more effective responses within the scope of being adaptable to Black-box LLMs, we conduct a comprehensive comparison with existing SOTA prompt refinement methods: BPO (Cheng et al., 2023), PAS (Zheng et al., 2024b), and Self-Refine (Madaan et al., 2023). We provide a detailed introduction to baselines in App. B.2. Following common practices of serving LLM as a judge (Zheng et al., 2024a; Wang et al., 2023), we utilize GPT4 for assessment, using prompts from the MT-bench (Zheng et al., 2024a). To ensure fairness and mitigate position bias, we implement random shuffling in each evaluation round. We also report Win Rate (WR), which is computed by (A Win - B Win)%.
|
| 172 |
+
|
| 173 |
+
# 5.2 Main Results
|
| 174 |
+
|
| 175 |
+
We use the name of method to denote the responses obtained by the LLM from the correspond method. For example, OP indicates that of Original Prompt, where BPO, PA, SR and OD indicates that of BPO, PAS, Self-Refine and Our Derived prompt, respectively. ICL represents the ICL formulation. Ours indicates $\mathrm{OD} + \mathrm{ICL}$ . As shown in Tab. 2, our method shows an overall performance improvement than baseline methods across various settings, highlighting the following advantages:
|
| 176 |
+
|
| 177 |
+
Generalizability Across Datasets: Our method demonstrates excellent performance across all four evaluation datasets compared to baselines. The ICL queries generated by our method effectively promote the LLM to produce higher-quality and more comprehensive responses to the original questions,
|
| 178 |
+
|
| 179 |
+
Table 2: A comprehensive comparison of Ours method, BPO PAS, SR (Self-Refine) and OP (Orginal Prompt) for different $\pi_{\theta}$ across four evaluation datasets. Query Model indicates the LLM used to response to the input prompt.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan="2">πθ</td><td rowspan="2">Query Model</td><td colspan="2">Method</td><td colspan="3">Vicuna Eval</td><td colspan="3">BPO-test Eval</td><td colspan="3">Dolley Eval</td><td colspan="3">Self-Instruct Eval</td></tr><tr><td>A</td><td>B</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td></tr><tr><td rowspan="11">Llama3</td><td rowspan="2">GPT4</td><td rowspan="2">OURS</td><td>OP</td><td>90.0</td><td>3.8</td><td>6.2</td><td>71.0</td><td>24.5</td><td>4.5</td><td>80.5</td><td>15.5</td><td>4.0</td><td>76.2</td><td>5.6</td><td>18.3</td></tr><tr><td>BPO</td><td>88.8</td><td>7.5</td><td>3.7</td><td>74.0</td><td>25.5</td><td>7.5</td><td>71.0</td><td>27.0</td><td>2.0</td><td>71.4</td><td>21.0</td><td>7.6</td></tr><tr><td rowspan="2">GPT3.5</td><td rowspan="2">OURS</td><td>OP</td><td>93.8</td><td>2.5</td><td>3.7</td><td>77.5</td><td>19.5</td><td>3.0</td><td>79.5</td><td>6.0</td><td>4.5</td><td>84.5</td><td>9.9</td><td>5.6</td></tr><tr><td>BPO</td><td>85.0</td><td>11.3</td><td>3.7</td><td>71.0</td><td>14.5</td><td>4.5</td><td>77.0</td><td>20.0</td><td>3.0</td><td>86.1</td><td>9.9</td><td>4.0</td></tr><tr><td rowspan="3">Llama3-8B</td><td rowspan="3">OURS</td><td>OP</td><td>82.5</td><td>15.0</td><td>2.5</td><td>65.5</td><td>30.0</td><td>4.5</td><td>59.0</td><td>34.0</td><td>7.0</td><td>78.9</td><td>15.1</td><td>6.0</td></tr><tr><td>BPO</td><td>81.3</td><td>35.0</td><td>1.2</td><td>63.0</td><td>34.0</td><td>3.0</td><td>51.0</td><td>47.0</td><td>2.0</td><td>75.8</td><td>22.2</td><td>2.0</td></tr><tr><td>SR</td><td>96.2</td><td>2.5</td><td>1.3</td><td>68.0</td><td>28.5</td><td>3.5</td><td>79.0</td><td>17.0</td><td>4.0</td><td>88.1</td><td>10.7</td><td>1.2</td></tr><tr><td rowspan="2">Llama2-7B</td><td rowspan="2">OURS</td><td>OP</td><td>82.5</td><td>15.0</td><td>2.5</td><td>76.0</td><td>21.5</td><td>2.5</td><td>69.5</td><td>28.5</td><td>2.0</td><td>78.1</td><td>17.5</td><td>4.4</td></tr><tr><td>BPO</td><td>81.3</td><td>17.5</td><td>1.2</td><td>68.0</td><td>28.5</td><td>2.5</td><td>67.5</td><td>28.5</td><td>4.0</td><td>73.4</td><td>24.6</td><td>2.0</td></tr><tr><td rowspan="2">Qwen2-7B</td><td rowspan="2">OURS</td><td>OP</td><td>91.3</td><td>5.0</td><td>3.7</td><td>85.0</td><td>10.5</td><td>4.5</td><td>82.5</td><td>13.0</td><td>4.5</td><td>90.8</td><td>9.2</td><td>0</td></tr><tr><td>BPO</td><td>92.5</td><td>7.5</td><td>0.0</td><td>81.5</td><td>13.5</td><td>5.0</td><td>82.5</td><td>16.0</td><td>1.5</td><td>81.0</td><td>17.8</td><td>1.2</td></tr><tr><td rowspan="10">Llama2</td><td rowspan="3">Llama3-8B</td><td rowspan="3">OURS</td><td>OP</td><td>85.0</td><td>12.5</td><td>2.5</td><td>67.5</td><td>28.0</td><td>4.5</td><td>61.5</td><td>35.0</td><td>3.5</td><td>77.0</td><td>13.9</td><td>9.1</td></tr><tr><td>BPO</td><td>78.8</td><td>21.2</td><td>0.0</td><td>66.0</td><td>30.0</td><td>4.0</td><td>53.0</td><td>40.5</td><td>1.5</td><td>73.8</td><td>21.4</td><td>4.8</td></tr><tr><td>PAS</td><td>63.8</td><td>20.0</td><td>16.2</td><td>55.0</td><td>44.0</td><td>6.0</td><td>64.5</td><td>27.0</td><td>8.5</td><td>66.3</td><td>27.4</td><td>6.3</td></tr><tr><td rowspan="4">Llama2-7B</td><td rowspan="4">OURS</td><td>OP</td><td>86.3</td><td>12.5</td><td>1.2</td><td>74.5</td><td>22.0</td><td>3.5</td><td>74.5</td><td>23.0</td><td>2.5</td><td>84.1</td><td>13.0</td><td>2.9</td></tr><tr><td>BPO</td><td>85.0</td><td>10.0</td><td>5.0</td><td>66.0</td><td>29.5</td><td>4.5</td><td>67.5</td><td>32.0</td><td>0.5</td><td>72.2</td><td>25.9</td><td>9.9</td></tr><tr><td>PAS</td><td>70.0</td><td>30.0</td><td>0.0</td><td>67.0</td><td>26.5</td><td>6.5</td><td>79.0</td><td>16.5</td><td>4.5</td><td>71.0</td><td>22.2</td><td>6.8</td></tr><tr><td>SR</td><td>75.5</td><td>14.0</td><td>10.5</td><td>82.0</td><td>13.5</td><td>4.5</td><td>83.0</td><td>13.0</td><td>4.0</td><td>91.7</td><td>6.7</td><td>1.6</td></tr><tr><td rowspan="3">Qwen2-7B</td><td rowspan="3">OURS</td><td>OP</td><td>91.3</td><td>8.7</td><td>0</td><td>83.0</td><td>13.0</td><td>4.0</td><td>85.0</td><td>11.0</td><td>4.0</td><td>92.1</td><td>7.5</td><td>0.4</td></tr><tr><td>BPO</td><td>85.0</td><td>15.0</td><td>3.0</td><td>79.0</td><td>17.5</td><td>3.5</td><td>78.5</td><td>20.5</td><td>1.0</td><td>84.5</td><td>14.7</td><td>0.8</td></tr><tr><td>PAS</td><td>81.2</td><td>16.3</td><td>2.5</td><td>54.0</td><td>42.5</td><td>3.5</td><td>69.0</td><td>25.5</td><td>5.5</td><td>78.9</td><td>20.0</td><td>1.1</td></tr><tr><td rowspan="7">Qwen2</td><td rowspan="2">Llama3-8B</td><td rowspan="2">OURS</td><td>OP</td><td>81.3</td><td>17.5</td><td>1.2</td><td>74.5</td><td>23.0</td><td>2.5</td><td>59.5</td><td>36.5</td><td>4.0</td><td>77.8</td><td>12.7</td><td>9.5</td></tr><tr><td>BPO</td><td>78.8</td><td>21.2</td><td>0.0</td><td>69.5</td><td>26.0</td><td>4.5</td><td>54.5</td><td>42.5</td><td>3.0</td><td>69.8</td><td>27.8</td><td>2.4</td></tr><tr><td rowspan="2">Llama2-7B</td><td rowspan="2">OURS</td><td>OP</td><td>92.5</td><td>7.5</td><td>0.0</td><td>74.0</td><td>23.5</td><td>2.5</td><td>71.0</td><td>23.0</td><td>6.0</td><td>84.1</td><td>11.1</td><td>4.8</td></tr><tr><td>BPO</td><td>78.8</td><td>21.2</td><td>0.0</td><td>67.0</td><td>29.5</td><td>3.5</td><td>73.0</td><td>23.5</td><td>3.5</td><td>77.4</td><td>21.0</td><td>1.6</td></tr><tr><td rowspan="3">Qwen2-7B</td><td rowspan="3">OURS</td><td>OP</td><td>96.3</td><td>2.5</td><td>1.2</td><td>86.5</td><td>8.0</td><td>5.5</td><td>82.0</td><td>13.0</td><td>5.0</td><td>84.5</td><td>14.7</td><td>0.8</td></tr><tr><td>BPO</td><td>95.0</td><td>3.8</td><td>1.2</td><td>67.0</td><td>15.0</td><td>4.0</td><td>78.0</td><td>19.0</td><td>3.0</td><td>91.7</td><td>8.0</td><td>0.3</td></tr><tr><td>SR</td><td>97.5</td><td>1.3</td><td>1.2</td><td>72.0</td><td>25.5</td><td>2.5</td><td>80.5</td><td>13.5</td><td>6.0</td><td>93.3</td><td>5.9</td><td>0.8</td></tr></table>
|
| 182 |
+
|
| 183 |
+
showcasing its robustness in handling various tasks, whether complex or simple.
|
| 184 |
+
|
| 185 |
+
Consistency Across Models: Our method shows consistent performance improvement between different families of models. For example, based on the Llama2 model as $\pi_{\theta}$ , the average WRs of our method on Llama3, Llama2 and Qwen2 for BPO are $39.63\%$ , $48.3\%$ and $64.3\%$ , while those for more powerful method PAS are $32.8\%$ , $47.9\%$ and $44.7\%$ respectively. These consistent higher results demonstrate that our method maintains high performance and robustness across a variety of underlying models, ensuring reliable results independent to models.
|
| 186 |
+
|
| 187 |
+
Cross-Model Transferability: Tab. 2 also shows that the $\pi_{\theta}$ trained on Llama3 and constructed ICL queries can achieve better response quality on other models (e.g., Llama2 and Qwen2). For example, the model trained on Llama2 based on Dolley Eval has a WR of $26.5\%$ on Llama3 and $74.0\%$ on Qwen2 compared with OD, and that are $12.5\%$ and $58.0\%$ compared with BPO. This
|
| 188 |
+
|
| 189 |
+
suggests that our method has good cross-model transferability and can maintain high performance across different models.
|
| 190 |
+
|
| 191 |
+
Improved Black-Box Model Performance: Our method significantly improved the response quality of GPT4 and GPT3.5. For instance, when training on Llama3, the average WRs of OURS on GPT4 compared with OP and BPO are $67.1\%$ and $56.1\%$ , respectively. And thoese on GPT3.5 are $74.3\%$ and $69.9\%$ , respectively. The significant improvement indicates that our method effectively promote Black-Box LLM generate high-quality response. Similarly, in other datasets, the WRs of our method on GPT series models are also significantly higher than those of SOTA methods.
|
| 192 |
+
|
| 193 |
+
# 5.3 Ablation Study
|
| 194 |
+
|
| 195 |
+
To further illustrate the advantages of our proposed self-instructed RL (OD) and the importance of the ICL environment (ICL), we use our derived prompts generated by Llama3-8B to query GPT4, where the generated response are then evaluated
|
| 196 |
+
|
| 197 |
+
by GPT4. We compare various combinations of OD and ICL with other methods on two evaluation datasets: Vicuna Eval and Self-Instruct.
|
| 198 |
+
|
| 199 |
+
Table 3: Analysis on our self-instruct RL objective.
|
| 200 |
+
|
| 201 |
+
<table><tr><td colspan="2">Method</td><td colspan="3">Vicuna Eval</td><td colspan="3">Self-Instruct</td></tr><tr><td>A</td><td>B</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td></tr><tr><td>OD</td><td>OP</td><td>78.8</td><td>11.2</td><td>10.0</td><td>66.3</td><td>15.5</td><td>18.2</td></tr><tr><td>OD</td><td>BPO</td><td>72.5</td><td>21.3</td><td>6.2</td><td>42.1</td><td>8.7</td><td>49.2</td></tr><tr><td>OD</td><td>PAS</td><td>57.2</td><td>27.4</td><td>15.4</td><td>45.1</td><td>27.2</td><td>27.7</td></tr></table>
|
| 202 |
+
|
| 203 |
+
Is our RL objective effective in performance improvement? Tab. 3 demonstrates that, from the perspective of prompt refinement, our OD already exhibits higher quality than BPO and PAS, thereby promoting LLMs to generate more helpful responses. When compared with BPO, the WR of OD is $51.2\%$ in Vicuna Eval and $33.4\%$ in Self-Instruct, which is $29.8\%$ and $17.9\%$ on PAS. These results consistently suggest that even without ICL, our OD has already been more effective in better promote LLMs and thus obtaining more helpful responses, emphasizing the robustness and effectiveness of our proposed RL objective.
|
| 204 |
+
|
| 205 |
+
Can our proposed ICL formulation boost other methods? Tab. 4 shows that our proposed automatic construction of ICL can significantly boost BPO and PAS by achieving an increased WRs in Vicuna Eval and Self-Instruct, compared with OP or themselves. For example, when equipped with ICL, BPO obtains $7.15\%$ average WR gain than OP. And $\mathrm{BPO} + \mathrm{ICL}$ achieves $59.0\%$ WR compared with BPO, demonstrating our proposed ICL query formulation is a general framework suitable with various prompt refinement methods.
|
| 206 |
+
|
| 207 |
+
Equally equipped ICL, can our method fairly outperform SOTA methods? Finally, Tab. 5 supports that even all equipped with ICL, our method still outperforms BPO and PAS with average WRs of $63.9\%$ and $33.9\%$ in Vicuna Eval, $47.5\%$ and $29.2\%$ in Self-Instruct, suggesting that the $\mathrm{OD}+$ ICL combination consistently provides stable and superior performance improvements across different environments.
|
| 208 |
+
|
| 209 |
+
In summary, our derived prompts enhanced by self-instructed RL are more effective than BPO and PAS prompts, in promoting LLMs to produce high-quality responses. Additionally, our proposed ICL querying formulation is a flexible, effective, and general framework that can enhance various
|
| 210 |
+
|
| 211 |
+
Table 4: Analysis on our automatic construction of ICL.
|
| 212 |
+
|
| 213 |
+
<table><tr><td colspan="2">Method</td><td colspan="3">Vicuna Eval</td><td colspan="3">Self-Instruct</td></tr><tr><td>A</td><td>B</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td></tr><tr><td>BPO</td><td>OP</td><td>68.8</td><td>15.0</td><td>16.2</td><td>66.3</td><td>21.4</td><td>12.3</td></tr><tr><td>BPO + ICL</td><td>OP</td><td>76.3</td><td>11.3</td><td>12.4</td><td>69.4</td><td>21.4</td><td>9.2</td></tr><tr><td>BPO + ICL</td><td>BPO</td><td>68.8</td><td>2.5</td><td>28.7</td><td>71.1</td><td>19.4</td><td>9.5</td></tr><tr><td>PAS</td><td>OP</td><td>71.2</td><td>22.3</td><td>6.5</td><td>61.0</td><td>25.5</td><td>13.5</td></tr><tr><td>PAS + ICL</td><td>OP</td><td>76.8</td><td>17.1</td><td>6.1</td><td>72.2</td><td>13.4</td><td>14.4</td></tr><tr><td>PAS + ICL</td><td>PAS</td><td>59.3</td><td>3.5</td><td>37.2</td><td>63.3</td><td>28.9</td><td>7.8</td></tr></table>
|
| 214 |
+
|
| 215 |
+
Table 5: Results when equally equipped with ICL.
|
| 216 |
+
|
| 217 |
+
<table><tr><td colspan="2">Method</td><td colspan="3">Vicuna Eval</td><td colspan="3">Self-Instruct</td></tr><tr><td>A</td><td>B</td><td>A Win</td><td>B Win</td><td>Tie</td><td>A Win</td><td>B Win</td><td>Tie</td></tr><tr><td>OURS</td><td>BPO + ICL</td><td>75.0</td><td>11.3</td><td>13.7</td><td>68.9</td><td>21.4</td><td>10.7</td></tr><tr><td>OURS</td><td>PAS + ICL</td><td>57.2</td><td>23.3</td><td>19.5</td><td>59.9</td><td>30.7</td><td>9.4</td></tr></table>
|
| 218 |
+
|
| 219 |
+
prompt refinement methods in obtaining better responses to the original queries.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 2: WRs comparison in Vicuna Eval among w/o training, SFT and RL.
|
| 223 |
+
|
| 224 |
+
# 5.4 Necessity and Efficiency Analysis
|
| 225 |
+
|
| 226 |
+
In this section, we mainly focus on independently analyzing how our proposed self-instructed RL and ICL query framework perform. Fig. 2 shows: 1) Necessity of ICL framework: Without training, directly using LLM to generate derived prompts combined with ICL (OD + ICL) has already achieved excellent results, achieves $39.1\%$ WRs improvement. This supervising performance indicates that our proposed ICL framework is highly general and effective even without additional optimization, showing a potential in low computation consuming. 2) Effectiveness of self-instructed RL: After optimization with RL, our method achieves a higher WRs increasing from $17.6\%$ to $67.6\%$ on OD vs OP, and that from $39.1\%$ to $86.2\%$ on $\mathrm{OD} + \mathrm{ICL}$ vs OP, which is also better than using SFT. This highlights the significant advantage of our proposed RL in generating higher
|
| 227 |
+
|
| 228 |
+
<table><tr><td>Original Prompt</td><td>Describe the health benefits of green tea.</td></tr><tr><td>BPO Prompt</td><td>Discuss the antioxidant properties of green tea and its role in preventing cancer.</td></tr><tr><td>Derived Prompt</td><td>Explore the multifaceted health advantages of green tea, delving into its rich antioxidant profile, impact on cardiovascular well-being, potential in weight management, cognitive enhancements, cancer risk reduction, dental health support, diabetes management aid, anti-inflammatory properties, skin health benefits, and liver health promotion. Emphasize the importance of integrating green tea into a holistic healthy lifestyle for optimal effectiveness.</td></tr><tr><td>Original Response</td><td>Green tea is a popular beverage known for its numerous health benefits. Here are some of the key advantages associated with drinking green tea: Rich in Antioxidants, Heart Health, Weight Management, Brain Function, Cancer Prevention, Improved Dental Health.</td></tr><tr><td>BPO Response</td><td>Green tea is renowned for its potent antioxidant properties, primarily attributed to the presence of polyphenols, particularly catechins like epigallocatechin gallate (EGCG). These antioxidants play a crucial role in protecting cells from damage caused by free radicals, which are unstable molecules that can lead to oxidative stress and contribute to various diseases, including cancer. Here's how the antioxidant properties of green tea, particularly its catechins, may help in preventing cancer: 1. Neutralizing Free Radicals... 2. Anti-Inflammatory Effects... 3. Apoptosis Induction... 4. Inhibition of Tumor Growth... 5. DNA Repair... 6. Protection Against Ultraviolet Radiation... 7. Enhancing Immune Function...</td></tr><tr><td>ICL Response</td><td>Green tea, a popular beverage originating from China, has gained global recognition not only for its delightful taste but also for its numerous health benefits. Let's explore the multifaceted advantages of green tea across various aspects of health: 1. Antioxidant Richness: Green tea is abundant in antioxidants... 2. Cardiovascular Well-being: Studies suggest that regular consumption of green tea may help lower the risk of cardiovascular diseases... 3. Weight Management: Green tea is often touted for its potential in aiding weight management... 4. Cognitive Enhancements: The caffeine content in green tea can provide a mild stimulatory effect, promoting alertness and focus...5. Cancer Risk Reduction: Several studies have suggested that the antioxidants in green tea may help reduce the risk of certain types of cancer... 6. Dental Health Support: Green tea has antibacterial properties that can help inhibit the growth of harmful bacteria in the mouth... 7. Diabetes Management Aid: Research indicates that green tea may help regulate blood sugar levels and improve insulin sensitivity... 8. Anti-inflammatory Properties: The polyphenols in green tea possess anti-inflammatory properties...9. Skin Health Benefits: Green tea's antioxidant and anti-inflammatory properties can benefit the skin... 10. Liver Health Promotion: Green tea may support liver health by promoting detoxification processes... 11. Holistic Integration: To reap the full benefits of green tea, it's crucial to integrate it into a holistic healthy lifestyle...</td></tr></table>
|
| 229 |
+
|
| 230 |
+
Figure 3: Detailed cases study. We compare quality of different types of responses by querying GPT4.
|
| 231 |
+
|
| 232 |
+
quality derived prompts.
|
| 233 |
+
|
| 234 |
+
In addition to the performance, we also conduct an efficiency analysis from the perspective of both training and inference. As shown in Tab. 6, although our method requires additional query of LLM for automatically generating ICL demonstrations and longer generation time in inference, our method eliminates the requirement of data collection in training process, which, however, serves as the foundation of both BPO and PAS. Overall, regarding the significant performance improvement, our method could show an acceptable trade-off between efficiency and performance.
|
| 235 |
+
|
| 236 |
+
Table 6: Efficiency comparison among OP, BPO, PAS and our method.
|
| 237 |
+
|
| 238 |
+
<table><tr><td>Method</td><td>Data-Collection Free</td><td>Generation Length</td><td>Inference Second</td></tr><tr><td>OP</td><td>-</td><td>383.8</td><td>12.06</td></tr><tr><td>BPO</td><td>×</td><td>439.1</td><td>14.14</td></tr><tr><td>PAS</td><td>×</td><td>465.3</td><td>15.13</td></tr><tr><td>OURS</td><td>✓</td><td>521.6</td><td>16.18</td></tr></table>
|
| 239 |
+
|
| 240 |
+
# 5.5 Case Study and Human Evaluation
|
| 241 |
+
|
| 242 |
+
As shown in Fig. 3, BPO significantly alters the original prompt's intent, restricting the response to the relationship between green tea and cancer while neglecting other benefits. In contrast, our derived prompt maintains consistency with the original prompt's content and expands upon it. Consequently, the comparison between the original response and the ICL response reveals that our approach not only effectively covers the information present in the original response, but also stimulates the LLM's intrinsic knowledge, resulting in
|
| 243 |
+
|
| 244 |
+
more comprehensive and detailed descriptions. We provide human evaluation in Appendix B.5.
|
| 245 |
+
|
| 246 |
+
# 6 Related Work
|
| 247 |
+
|
| 248 |
+
Prompt Refinement. Prompts are crucial for guiding LLMs to produce better response, leading to extensive research on improving their quality. Initially, prompt optimization relied on manually crafted templates (Reynolds and McDonell, 2021), a labor-intensive process with interpretation challenges (Webson and Pavlick, 2021). Recent studies automate this process using techniques like gradient-based search (Shin et al., 2020; Pryzant et al., 2023), paraphrasing (Haviv et al., 2021; Jiang et al., 2020) and leveraging LLMs to generate prompts (Zhou et al., 2022; Fernando et al., 2023; Yang et al., 2024b; Cheng et al., 2023). Additionally, RL based methods are designed to optimize a prompt rewritten model through reward functions and task-specific templates (Deng et al., 2022; Kong et al., 2024; Zhang et al., 2022; Huang et al., 2024).
|
| 249 |
+
|
| 250 |
+
RLHF. RLHF has been widely explored to align LLMs with human preferences (Stiennon et al., 2020; Ouyang et al., 2022; Bai et al., 2022b; Lee et al., 2023). Common approaches include building a reward model using maximize likelihood estimation (MLE) and optimizing it with the Proximal Policy Optimization (PPO) algorithm (Schulman et al., 2017). However, replicating PPO's success has proven challenging for the open-source community due to the high resource demands. To address this, some research has shifted to offline direct preference learning (Zhao et al., 2023; Rafailov et al.,
|
| 251 |
+
|
| 252 |
+
2024; Li et al., 2023), which bypasses reward modeling and directly optimizes a loss target using an offline dataset. On the other hand, Du et al. (2025a) designs to align LLM with the optimal solution of RLHF by minimizing their KL divergence in an offline manner.
|
| 253 |
+
|
| 254 |
+
Improving In-Context Learning. Several approaches have been introduced to enhance in-context learning (ICL) performance by improving the selection of in-context examples. Some methods focus on refining template selection (Yin et al., 2023), while others aim to enhance the choice of examples (Liu et al., 2021; Rubin et al., 2021). Additionally, Wan et al. (2023) introduces a criterion for evaluating examples based on some criteria. Other recent innovations include flipped learning (Ye et al., 2022) and noisy channel prompting (Min et al., 2021). Hu et al. (2022) designs to extract graphs from input text to facilitate the understanding and summarization of the current input and Li et al. (2025) can also be used to select in-context examples of high-quality automatically.
|
| 255 |
+
|
| 256 |
+
# 7 Conclusion
|
| 257 |
+
|
| 258 |
+
This paper introduced an innovative method for enhancing LLM performance using an automatically generated in-context learning framework. By creating derived prompts through a self-instruct RL mechanism, our approach enriches the context of the original prompts. Extensive experiments reveal that our framework significantly improves response quality, even for Black-Box models like GPT4. Excellent performance suggests that our method offers a promising paradigm for aligning LLMs without modifications, improving their usability and effectiveness in various applications.
|
| 259 |
+
|
| 260 |
+
# 8 Acknowledgments
|
| 261 |
+
|
| 262 |
+
This work is supported by the Shenzhen Science and Technology Program JCYJ20220818103001002), the Guangdong Provincial Key Laboratory of Big Data Computing, The Chinese University of Hong Kong, Shenzhen, the Longgang District Special Funds for Science and Technology Innovation (LGKCSDPT2023002), the Project (No. 20232ABC03A25), the Guangxi Key R&D Project (No. AB24010167), and Futian Healthcare Research Project (No.FTWS002).
|
| 263 |
+
|
| 264 |
+
# 9 Limitations and Ethical Statement
|
| 265 |
+
|
| 266 |
+
In this research, we propose a novel approach that utilizes a self-instructed RL objective for prompt refinement. To better leverage the information within user prompts, we introduce the automatic Construction of ICL to preserve user intent. Although our method achieves better results compared to the SOTA methods and eliminates the requirement of data collection, it employs RL for model training, incurring a certain computational cost. Moreover, our method depends on additional queries to the LLM during the construction of ICL demonstrations. In our experiments, we analyze and find that our method can be integrated as a plug-and-play framework with existing methods to enhance them. Additionally, our current exploration is now limited to the one-shot demonstration setting. In addition, we applied our method in the domains of mathematics and programming. However, we found that it is challenging for the model to automatically generate high-quality examples that are semantically similar to the current input question, indicating that our current method is not yet directly adaptable to tasks in math and coding.
|
| 267 |
+
|
| 268 |
+
In the future, we will investigate better and more effective n-shots settings to further improve performance. Moreover, we will also explore the approach of sharing demonstrations to increase efficiency and reduce the cost of generating examples, and explore how to adapt to math and reasoning tasks. During the design of our method, we have carefully considered the potential generation of harmful and unethical content. We are committed to actively contributing to the community and society and avoiding any negative impacts caused by AI technology.
|
| 269 |
+
|
| 270 |
+
# References
|
| 271 |
+
|
| 272 |
+
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.
|
| 273 |
+
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.
|
| 274 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind
|
| 275 |
+
|
| 276 |
+
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.
|
| 277 |
+
Jiale Cheng, Xiao Liu, Kehan Zheng, Pei Ke, Hongning Wang, Yuxiao Dong, Jie Tang, and Minlie Huang. 2023. Black-box prompt optimization: Aligning large language models without model training. arXiv preprint arXiv:2311.04155.
|
| 278 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. 2023. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ chatgpt quality. See https://vicuna.lmsys.org (accessed 14 April 2023), 2(3):6.
|
| 279 |
+
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. Company Blog of Databricks.
|
| 280 |
+
DeepSpeed. 2024. Deepspeed. https://www.deepspeed.ai/. Accessed: 2024-08-08.
|
| 281 |
+
Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric P Xing, and Zhiting Hu. 2022. Rlprompt: Optimizing discrete text prompts with reinforcement learning. arXiv preprint arXiv:2205.12548.
|
| 282 |
+
Jacob Devlin. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
|
| 283 |
+
Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022. A survey on in-context learning. arXiv preprint arXiv:2301.00234.
|
| 284 |
+
Yuhao Du, Zhuo Li, Pengyu Cheng, Zhihong Chen, Yuejiao Xie, Xiang Wan, and Anningzhe Gao. 2025a. Simplify rlhf as reward-weighted sft: A variational method. Preprint, arXiv:2502.11026.
|
| 285 |
+
Yuhao Du, Zhuo Li, Pengyu Cheng, Xiang Wan, and Anningzhe Gao. 2025b. Atoxia: Red-teaming large language models with target toxic answers. In *Findings of the Association for Computational Linguistics: NAACL 2025*, pages 3251–3266, Albuquerque, New Mexico. Association for Computational Linguistics.
|
| 286 |
+
Chrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero, and Tim Rocktäschel. 2023. Promptbreeder: Self-referential self-improvement via prompt evolution. arXiv preprint arXiv:2309.16797.
|
| 287 |
+
Adi Haviv, Jonathan Berant, and Amir Globerson. 2021. Bertese: Learning to speak to bert. arXiv preprint arXiv:2103.05327.
|
| 288 |
+
|
| 289 |
+
Jinpeng Hu, DanDan Guo, Yang Liu, Zhuo Li, Zhihong Chen, Xiang Wan, and Tsung-Hui Chang. 2023. A simple yet effective subsequence-enhanced approach for cross-domain ner. Proceedings of the AAAI Conference on Artificial Intelligence, 37(11):12890-12898.
|
| 290 |
+
Jinpeng Hu, Zhuo Li, Zhihong Chen, Zhen Li, Xiang Wan, and Tsung-Hui Chang. 2022. Graph enhanced contrastive learning for radiology findings summarization. Preprint, arXiv:2204.00203.
|
| 291 |
+
Zisu Huang, Xiaohua Wang, Feiran Zhang, Zhibo Xu, Cenyuan Zhang, Xiaqing Zheng, and Xuanjing Huang. 2024. Enhancing the capability and robustness of large language models through reinforcement learning-driven query refinement. arXiv preprint arXiv:2407.01461.
|
| 292 |
+
Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? Transactions of the Association for Computational Linguistics, 8:423-438.
|
| 293 |
+
Weize Kong, Spurthi Amba Hombaiah, Mingyang Zhang, Qiaozhu Mei, and Michael Bendersky. 2024. Prewrite: Prompt rewriting with reinforcement learning. arXiv preprint arXiv:2401.08189.
|
| 294 |
+
Harrison Lee, Samrat Phatale, Hassan Mansoor, Kellie Lu, Thomas Mesnard, Colton Bishop, Victor Carbune, and Abhinav Rastogi. 2023. Rlaif: Scaling reinforcement learning from human feedback with ai feedback. arXiv preprint arXiv:2309.00267.
|
| 295 |
+
Zhuo Li, Yuhao Du, Xiaqi Jiao, Yiwen Guo, Yuege Feng, Xiang Wan, Anningzhe Gao, and Jinpeng Hu. 2025. Add-one-in: Incremental sample selection for large language models via a choice-based greedy paradigm. Preprint, arXiv:2503.02359.
|
| 296 |
+
Ziniu Li, Tian Xu, Yushun Zhang, Yang Yu, Ruoyu Sun, and Zhi-Quan Luo. 2023. Remax: A simple, effective, and efficient method for aligning large language models. arXiv preprint arXiv:2310.10505.
|
| 297 |
+
Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2021. What makes good in-context examples for gpt-3? arXiv preprint arXiv:2101.06804.
|
| 298 |
+
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9):1-35.
|
| 299 |
+
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreff, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. 2023. Self-refine: Iterative refinement with self-feedback. Preprint, arXiv:2303.17651.
|
| 300 |
+
|
| 301 |
+
Sewon Min, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2021. Noisy channel language model prompting for few-shot text classification. arXiv preprint arXiv:2108.04106.
|
| 302 |
+
R OpenAI et al. 2023. Gpt-4 technical report. ArXiv, 2303:08774.
|
| 303 |
+
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.
|
| 304 |
+
Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, and Michael Zeng. 2023. Automatic prompt optimization with gradient descent and beam search. arXiv preprint arXiv:2305.03495.
|
| 305 |
+
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.
|
| 306 |
+
Laria Reynolds and Kyle McDonell. 2021. Prompt programming for large language models: Beyond the few-shot paradigm. In *Extended abstracts of the 2021 CHI conference on human factors in computing systems*, pages 1-7.
|
| 307 |
+
Ohad Rubin, Jonathan Herzig, and Jonathan Berant. 2021. Learning to retrieve prompts for in-context learning. arXiv preprint arXiv:2112.08633.
|
| 308 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.
|
| 309 |
+
Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. 2020. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980.
|
| 310 |
+
Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, et al. 2022. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. arXiv preprint arXiv:2206.04615.
|
| 311 |
+
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.
|
| 312 |
+
Derek Tam, Rakesh R Menon, Mohit Bansal, Shashank Srivastava, and Colin Raffel. 2021. Improving and simplifying pattern exploiting training. arXiv preprint arXiv:2103.11955.
|
| 313 |
+
|
| 314 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 315 |
+
Xingchen Wan, Ruoxi Sun, Hanjun Dai, Sercan O Arik, and Tomas Pfister. 2023. Better zero-shot reasoning with self-adaptive prompting. arXiv preprint arXiv:2305.14106.
|
| 316 |
+
Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, et al. 2023. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. arXiv preprint arXiv:2306.05087.
|
| 317 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2022. Self-instruct: Aligning language models with self-generated instructions. arXiv preprint arXiv:2212.10560.
|
| 318 |
+
Albert Webson and Ellie Pavlick. 2021. Do prompt-based models really understand the meaning of their prompts? arXiv preprint arXiv:2109.01247.
|
| 319 |
+
An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024a. Qwen2 technical report. arXiv preprint arXiv:2407.10671.
|
| 320 |
+
Songhua Yang, Hanjie Zhao, Senbin Zhu, Guangyu Zhou, Hongfei Xu, Yuxiang Jia, and Hongying Zan. 2024b. Zhongjing: Enhancing the chinese medical capabilities of large language model through expert feedback and real-world multi-turn dialogue. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 19368-19376.
|
| 321 |
+
Seonghyeon Ye, Doyoung Kim, Joel Jang, Joongbo Shin, and Minjoon Seo. 2022. Guess the instruction! flipped learning makes language models stronger zero-shot learners. arXiv preprint arXiv:2210.02969.
|
| 322 |
+
Fan Yin, Jesse Vig, Philippe Laban, Shafiq Joty, Caiming Xiong, and Chien-Sheng Jason Wu. 2023. Did you read the instructions? rethinking the effectiveness of task definitions in instruction learning. arXiv preprint arXiv:2306.01150.
|
| 323 |
+
JD Zamfirescu-Pereira, Richmond Y Wong, Bjoern Hartmann, and Qian Yang. 2023. Why johnny can't prompt: how non-ai experts try (and fail) to design llm prompts. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems, pages 1-21.
|
| 324 |
+
Tianjun Zhang, Xuezhi Wang, Denny Zhou, Dale Schuurmans, and Joseph E Gonzalez. 2022. Tempera: Test-time prompting via reinforcement learning. arXiv preprint arXiv:2211.11890.
|
| 325 |
+
|
| 326 |
+
Yao Zhao, Rishabh Joshi, Tianqi Liu, Misha Khalman, Mohammad Saleh, and Peter J Liu. 2023. Slic-hf: Sequence likelihood calibration with human feedback. arXiv preprint arXiv:2305.10425.
|
| 327 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. 2024a. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36.
|
| 328 |
+
Miao Zheng, Hao Liang, Fan Yang, Haoze Sun, Tianpeng Li, Lingchu Xiong, Yan Zhang, Youzhen Wu, Kun Li, Yanjun Shen, Mingan Lin, Tao Zhang, Guosheng Dong, Yujing Qiao, Kun Fang, Weipeng Chen, Bin Cui, Wentao Zhang, and Zenan Zhou. 2024b. Pas: Data-efficient plug-and-play prompt augmentation system. Preprint, arXiv:2407.06027.
|
| 329 |
+
Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. 2022. Large language models are human-level prompt engineers. arXiv preprint arXiv:2211.01910.
|
| 330 |
+
|
| 331 |
+
# Appendix
|
| 332 |
+
|
| 333 |
+
# A More failed Refined Prompt Cases
|
| 334 |
+
|
| 335 |
+
<table><tr><td>Original Prompt</td><td>Compose a rap verse about a topic of your choosing.</td></tr><tr><td>Refined Prompt</td><td>Compose a rap verse about the topic of Artificial Intelligence (AI).</td></tr><tr><td>Original Prompt</td><td>Write a tweet that is opinionated and captures the essence of the following text: The use of artificial intelligence is fundamentally changing the way that business is done.</td></tr><tr><td>Refined Prompt</td><td>Write a tweet that expresses an opinion about how artificial intelligence is revolutionizing business.</td></tr><tr><td>Original Prompt</td><td>What was the average house price in San Francisco?</td></tr><tr><td>Refined Prompt</td><td>What was the average house price in San Francisco in 2020?</td></tr><tr><td>Original Prompt</td><td>Open up a discussion about a given topic.</td></tr><tr><td>Refined Prompt</td><td>Let's discuss the current and future impact of artificial intelligence (AI) on society. Consider its applications, potential benefits, drawbacks, and ethical considerations.</td></tr><tr><td>Original Prompt</td><td>why do people from barcelona talk so weird?</td></tr><tr><td>Refined Prompt</td><td>What are some characteristics of the Barcelona accent?</td></tr><tr><td>Original Prompt</td><td>what is the Adam</td></tr><tr><td>Refined Prompt</td><td>Who is Adam in the Bible?</td></tr><tr><td>Original Prompt</td><td>Tell me about Hong Kong</td></tr><tr><td>Refined Prompt</td><td>Tell me about Hong Kong's response to COVID-19. (Please provide specific information on measures taken by the government, such as border control, mask mandates, and vaccination efforts.)</td></tr><tr><td>Original Prompt</td><td>Who is JFK?</td></tr><tr><td>Refined Prompt</td><td>Who is JFK?Who is the current president of the United States? Provide accurate and detailed responses.</td></tr></table>
|
| 336 |
+
|
| 337 |
+
Table 7: More failed refined prompt cases. Please refer to our uploaded experiment record file for more cases.
|
| 338 |
+
|
| 339 |
+
# B Experiments
|
| 340 |
+
|
| 341 |
+
# B.1 Datasets
|
| 342 |
+
|
| 343 |
+
By following Cheng et al. (2023), we also adopt the BPO dataset for our model training, which is designed for optimized prompts and has its origin in four instruction-tuning datasets that are annotated with human preferences. The collection process involves gathering these datasets and then reformulating them. Low-quality instances are identified and eliminated based on manually devised rules, such as discarding overly short instructions. Additionally, a strict diversity filtering is carried out using self-bleu. Through this comprehensive process, a total of 14k diverse samples are obtained. This dataset mainly concentrates on single-turn response generation.
|
| 344 |
+
|
| 345 |
+
To attain a more accurate and refined evaluation of the alignment quality, we deliberately chose to employ a multiplicity of instruction datasets for the assessment endeavor. They are:
|
| 346 |
+
|
| 347 |
+
- The Dolly Eval constitutes a subset that consists of 200 instances randomly sampled from the dolly dataset (Conover et al., 2023). This dataset, which is crafted by human efforts, embraces eight discrete categories of tasks.
|
| 348 |
+
- The Vicuna Eval (Chiang et al., 2023) encompasses 80 variegated questions distributed among 8 distinct classifications.
|
| 349 |
+
- The Self-Instruct Eval is a human evaluation dataset devised by Wang et al. (2022). It incorporates 252 user-centered instructions that were meticulously composed by experts and spurred by real-world application scenarios.
|
| 350 |
+
- The BPO-test Eval (Cheng et al., 2023) represents a partition of BPO dataset, enclosing 200 samples extracted from the four datasets that were utilized during the assemblage of the training set.
|
| 351 |
+
|
| 352 |
+
# B.2 Introduction to Baseline Methods
|
| 353 |
+
|
| 354 |
+
To provide a clearer understanding of the baseline methodologies used in our paper, we offer a brief explanation of each approach, highlighting their definitions, characteristics, and limitations, as well as the targeted advantages of our method.
|
| 355 |
+
|
| 356 |
+
Original Prompt (OP): The original prompt is the initial query or instruction provided by the user to the LLM without any modifications or enhancements. It is straightforward and relies solely on the LLM's ability to understand and respond to the query as given. However, OP often lacks the specificity or context needed for the LLM to generate high-quality, relevant responses, especially for complex queries. As a result, several prompt refinement methods are proposed to improve the quality of the input prompt, thus obtaining a better response.
|
| 357 |
+
|
| 358 |
+
Black-Box Prompt Optimization (BPO): BPO (Cheng et al., 2023) is designed to optimize user prompts to better align with the LLM's input understanding, by learning to optimize a refinement model. BPO requires collecting large amounts of original prompt, refined prompt pairs distilled from ChatGPT, which is resource-intensive based on a human-collected dataset. Besides, BPO relies solely on SFT for training the prompt refinement model, which is less effective compared to RL and can not significantly reduce the overall cost due to the requirement of collecting data. Moreover, BPO directly replaces the original prompt with the refined prompt, which can lead to changes in user intent and result in unusable responses, as shown in Table 1 of our paper.
|
| 359 |
+
|
| 360 |
+
Self-Refine: Self-Refine (Madaan et al., 2023) is an iterative refinement method that uses the LLM's own feedback to improve the quality of its responses, which allows the model to iteratively correct and refine its responses, leading to significant improvements in tasks requiring multiple attempts to achieve the desired output. However, the effectiveness of Self-Refine can vary depending on the task and the initial quality of the LLM's responses, which lacks of the additional necessary supervision and thus may not be as enough effective as possible.
|
| 361 |
+
|
| 362 |
+
Plug-and-Play Prompt Augmentation System (PAS): PAS(Zheng et al., 2024b) is a plug-and-play system that enhances prompts using high-quality, automatically generated complementary datasets. While PAS shows significant improvements over baseline models like OP and BPO, it still requires the human-intensive data collection. Moreover, PAS relies on a systematic framework to improve the prompt by strategically incorporating prompt data selection and complementary dataset generation. As a result, PAS achieves better performance than BPO with the help of several complex and onerous modules. On the other hand, PAS also suffers from the same issue with BPO, which they can not keep the user original intent perfectly.
|
| 363 |
+
|
| 364 |
+
# B.3 Training Settings.
|
| 365 |
+
|
| 366 |
+
For training settings, we use ReMax (Li et al., 2023) to train the derived prompt generation model facilitated by DeepSpeed ZeRO-2 (DeepSpeed, 2024). We set the temperature parameter to $\tau = 0.0$ and use nucleus sampling with a parameter of $\mathrm{top}_p = 0.9$ for all models. The maximum length for derived prompt generation and response model is set to 1024 tokens. We conduct experiments on 4 NVIDIA A100 GPUs. All experiments are trained with a learning rate of $1\times 10^{-6}$ for 2 epoch with decay, where the KL penalty $\beta$ is set to 0.05 for all models. Our batch size is set to 1.
|
| 367 |
+
|
| 368 |
+
# B.4 Evaluation on Reward Model
|
| 369 |
+
|
| 370 |
+
In addition to GPT4 as an evaluator for comparing the quality of response promoted by different methods, we also adopt Reward Score into quantitative evaluation, which provides a more comprehensive understanding of our method. Therefore, we train a Llama3-8B-Instruct LLM as a derived prompt generation model and then query GPT4. As shown in Tab. 8, we can observe our method can promote GPT4 to generate more useful and higher quality responses in the view of Reward Score, except for Dolley Eval.
|
| 371 |
+
|
| 372 |
+
# B.5 Human Evaluation
|
| 373 |
+
|
| 374 |
+
In this section, we conduct a human evaluation regarding two crucial questions: Q1) Is semantic inconsistency between the refined and original prompts prevalent? Q2) Do the responses generated by our method
|
| 375 |
+
|
| 376 |
+
<table><tr><td>Dataset</td><td>Method</td><td>Reward Score</td><td>δ</td></tr><tr><td rowspan="3">Vicuna val</td><td>OURS</td><td>3.97</td><td>-</td></tr><tr><td>OP</td><td>3.72</td><td>↑0.25</td></tr><tr><td>BPO</td><td>3.83</td><td>↑0.14</td></tr><tr><td rowspan="3">BPO-Text Eval</td><td>OURS</td><td>3.19</td><td>-</td></tr><tr><td>OP</td><td>1.89</td><td>↑1.30</td></tr><tr><td>BPO</td><td>2.42</td><td>↑0.77</td></tr><tr><td rowspan="3">Dolley Eval</td><td>OURS</td><td>3.24</td><td>-</td></tr><tr><td>OP</td><td>2.05</td><td>↑1.19</td></tr><tr><td>BPO</td><td>3.25</td><td>↓-0.01</td></tr><tr><td rowspan="3">Self-Instruct Eval</td><td>OURS</td><td>2.79</td><td>-</td></tr><tr><td>OP</td><td>0.72</td><td>↑2.07</td></tr><tr><td>BPO</td><td>1.78</td><td>↑1.01</td></tr></table>
|
| 377 |
+
|
| 378 |
+
Table 8: Comparison of different Black-Box optimization methods across Vicuna Eval and Self-Instruct based on querying GPT4.
|
| 379 |
+
|
| 380 |
+
align more closely with human preference? We engaged four human experts to conduct this evaluation based on BPO-test Eval.
|
| 381 |
+
|
| 382 |
+
For Q1, we primarily considered: 1) whether the refined prompt maintained the intent of the original prompt; 2) whether the refined prompt predefined the angle of AI assistance's response; 3) if the refined prompt introduced any unintended biases or assumptions.
|
| 383 |
+
|
| 384 |
+
Table 9: Performance of BPO, PAS, and Our Method on Q1 Evaluation Metrics
|
| 385 |
+
|
| 386 |
+
<table><tr><td>Metric</td><td>BPO</td><td>PAS</td><td>Our Method</td></tr><tr><td>Maintain Original Intent</td><td>75.2%</td><td>82.5%</td><td>86.3%</td></tr><tr><td>Predefined Response Angle</td><td>23.7%</td><td>22.1%</td><td>16.4%</td></tr><tr><td>Introduced Bias or Assumption</td><td>24.6%</td><td>25.8%</td><td>17.9%</td></tr></table>
|
| 387 |
+
|
| 388 |
+
The results in Tab. 9 indicate that Our Method consistently outperforms both BPO and PAS across all metrics. In terms of maintaining the original intent, Our Method achieves an $86.3\%$ success rate, surpassing PAS at $82.5\%$ and BPO at $75.2\%$ . This demonstrates its superior capability to preserve the original meaning of prompts. Additionally, Our Method shows a significant advantage in minimizing predefined response angles, with only $16.4\%$ compared to BPO's $23.7\%$ and PAS's $22.1\%$ . This suggests that Our Method is less constrained by rigid response frameworks.
|
| 389 |
+
|
| 390 |
+
Moreover, Our Method excels in reducing introduced bias or assumptions, achieving the lowest percentage at $17.9\%$ . In contrast, BPO and PAS have higher rates of bias introduction, at $24.6\%$ and $25.8\%$ , respectively. These findings highlight Our Method's effectiveness in generating responses that align more closely with human preferences, offering greater accuracy and neutrality. Overall, these results suggest that Our Method is a more reliable approach for producing high-quality, unbiased responses, with potential for further refinement and application in diverse contexts.
|
| 391 |
+
|
| 392 |
+
Additionally, for Q2, we assessed whether the responses generated by our method were more coherent, relevant, and satisfactory compared to original prompt, BPO, PAS and Self-Refine. The experts reviewed 50 prompt-response pairs to ensure a comprehensive evaluation. Their insights were invaluable in determining the effectiveness of our approach in aligning AI outputs with human expectations.
|
| 393 |
+
|
| 394 |
+
The average scores in Tab. 10 indicate that out method consistently achieves the highest ratings across coherence, relevance, and satisfaction, outperforming all other methods. The progression from Original Prompt, through Self-Refine and BPO, to PAS, and finally to Our Method, illustrates a clear improvement in aligning AI-generated responses with human expectations. This demonstrates the effectiveness of Our Method in producing superior quality outputs across all evaluated metrics.
|
| 395 |
+
|
| 396 |
+
Table 10: Average Scores by Human Experts on Coherence, Relevance, and Satisfaction
|
| 397 |
+
|
| 398 |
+
<table><tr><td>Metric</td><td>OP</td><td>Self-Refine</td><td>BPO</td><td>PAS</td><td>OURS</td></tr><tr><td>Coherence</td><td>2.1</td><td>2.5</td><td>2.8</td><td>3.2</td><td>3.8</td></tr><tr><td>Relevance</td><td>2.3</td><td>2.7</td><td>2.4</td><td>3.1</td><td>3.9</td></tr><tr><td>Satisfaction</td><td>2.0</td><td>2.2</td><td>2.6</td><td>3.3</td><td>4.0</td></tr></table>
|
| 399 |
+
|
| 400 |
+
# C Prompt-based Justification Prompt for GPT4
|
| 401 |
+
|
| 402 |
+
In this section, we give a GPT4 based pair-wise justification prompt shown as below.
|
| 403 |
+
|
| 404 |
+
# System message:
|
| 405 |
+
|
| 406 |
+
Please act as an impartial judge and evaluate the quality of the responses provided by two AI assistants to the user question displayed below. You should choose the assistant that follows the user's instructions and answers the user's question better. Your evaluation should consider factors such as the helpfulness, relevance, accuracy, depth, creativity, and level of detail of their responses. Begin your evaluation by comparing the two responses and provide a short explanation. Avoid any position biases and ensure that the order in which the responses were presented does not influence your decision. Do not allow the length of the responses to influence your evaluation. Do not favor certain names of the assistants. Be as objective as possible. After providing your explanation, output your final verdict by strictly following this format: '[A]' if assistant A is better, '[B]' if assistant B is better, and '[C]' for a tie.
|
| 407 |
+
|
| 408 |
+
# Prompt template:
|
| 409 |
+
|
| 410 |
+
# {User Question}
|
| 411 |
+
|
| 412 |
+
# {Original Prompt}
|
| 413 |
+
|
| 414 |
+
The Start of Assistant A's Answer {answer a}
|
| 415 |
+
|
| 416 |
+
The End of Assistant A's Answer
|
| 417 |
+
|
| 418 |
+
The Start of Assistant B's Answer {answer b}
|
| 419 |
+
|
| 420 |
+
The End of Assistant B's Answer
|
| 421 |
+
|
| 422 |
+
# D More Case Study
|
| 423 |
+
|
| 424 |
+
In this section, we provide two more examples shown as below. More cases can be found in our uploaded experiment result file.
|
| 425 |
+
|
| 426 |
+
<table><tr><td>Original Prompt</td><td>number one song pick</td></tr><tr><td>BPO Prompt</td><td>Please recommend a number one song.</td></tr><tr><td>Derived Prompt</td><td>What is the most iconic, influential, and enduring song in music history, and what cultural, historical, and artistic factors contribute to its status as the most beloved and widely recognized single song among music lovers of all ages and genres?</td></tr><tr><td>Original Response</td><td>Of course! I'd be happy to recommend a number one song for you. However, I would need some more information from you to make a recommendation that suits your taste. Could you please tell me what kind of music you enjoy listening to? For example, pop, rock, hip-hop, electronic, or something else? This will help me give you a more accurate and personalized recommendation.</td></tr><tr><td>BPO Response</td><td rowspan="2">Of course! I'd be happy to help you with that. Can you please provide me with some more details or preferences regarding the number one song you would like me to recommend? For example, are you interested in a particular genre, era, or mood? Ah, an intriguing question! The most iconic, influential, and enduring song in music history is a subjective matter, but there are several candidates that stand out for their cultural, historical, and artistic significance. Here are some of the most notable contenders:\n\n1. "Happy Birthday to You!" - Written in 1893 by Patty Hill and Mildred J. Hill, this song has become the most widely recognized and beloved birthday song in the world, sung on countless birthdays across generations and cultures. Its widespread popularity can be attributed to its simplicity, catchiness, and the sentimental value it holds for people of all ages.\n2. "'Yesterday'" by The Beatles - Released in 1965, this Paul McCartney-penned ballad is one of the most covered songs in history, with over 2,200 recorded versions. Its timeless melody and poignant lyrics have made it a classic that crosses genres and generations, resonating with people of all ages and musical tastes.\n3. "'Stairway to Heaven'" by Led Zeppelin - This epic rock ballad, written by Jimmy Page and Robert Plant, is widely considered one of the greatest songs ever written. Its soaring guitar riffs, poetic lyrics, and powerful vocals have made it a staple of classic rock radio and a cultural touchstone for generations of music fans.\n4. "'Bohemian Rhapsody'" by Queen - This operatic rock anthem, penned by Freddie Mercury, is a masterclass in songwriting and vocal performance, with its complex structure, memorable chorus, and iconic music video. Its enduring popularity has made it a cultural phenomenon, with references in popular culture ranging from "'The Simpsons"' to "'The Muppets.'"\n5. "'Imagine'" by John Lennon - Released in 1971, this powerful ballad has become an anthem for peace and unity, with its haunting melody and poignant lyrics resonating with people around the world. Its enduring popularity and political relevance have cemented its status as one of the most iconic and influential songs in music history.\nSo, what cultural, historical, and artistic factors contribute to the status of these songs as the most beloved and widely recognized single songs among music lovers of all ages and genres? Here are some possible factors:\n1. Cultural significance: These songs have become ingrained in popular culture, with references in movies, TV shows, and everyday life. They have also been adopted by different generations, reflecting the shared cultural experiences and values of their respective eras.\n2. Memorability: These songs have catchy melodies and lyrics that are easy to remember, making them stick in people's minds and becoming a part of their personal and collective memory.\n3. Emotional resonance: These songs often tap into universal emotions and experiences, such as love, loss, and hope, which resonate with people across different cultures and generations.\n4. Innovation and experimentation: These songs represent innovation and experimentation in their respective genres, pushing the boundaries of what is possible in music and inspiring future generations of musicians.\n5. Timelessness: These songs have stood the test of time, remaining popular and relevant even decades after their release. They have also adapted and evolved over time, reflecting the changing cultural and social landscape.\nIn conclusion, these five songs are just a few examples of the most iconic, influential, and enduring songs in music history. Their cultural, historical, and artistic significance, combined with their memorability, emotional resonance, innovation, and timelessness, have cemented their status as the most beloved and widely recognized single songs among music lovers of all ages and genres."</td></tr><tr><td>ICL Response</td></tr></table>
|
| 427 |
+
|
| 428 |
+
Figure 4
|
| 429 |
+
|
| 430 |
+
<table><tr><td>Original Prompt</td><td>List uses of AI.</td></tr><tr><td>BPO Prompt</td><td>List one specific and impactful use of AI in any field.</td></tr><tr><td>Derived Prompt</td><td>What are some examples of artificial intelligence being used in various industries and aspects of daily life?</td></tr><tr><td rowspan="2">Original Response</td><td>Sure, here's an example of a use of AI:\n\n1. Virtual Personal Assistants: Virtual personal assistants, powered by AI, can help individuals manage their daily tasks and schedules, such as setting reminders, sending emails, and even making appointments. Examples of virtual personal assistants include Amazon's Alexa, Google Assistant, and Apple's Siri. These assistants can learn and adapt to a user's preferences and habits over time, making them increasingly useful and efficient.",</td></tr><tr><td>Sure! Here's an example of a specific and impactful use of AI in the field of healthcare:\n\n1. Medical Imaging Analysis: AI algorithms can be trained to analyze medical images such as X-rays, CT scans, and MRs to detect diseases and abnormalities. For instance, AI-powered systems can identify breast cancer from mammography images with a high degree of accuracy, allowing doctors to make more accurate diagnoses and provide more effective treatments. According to a study published in the Journal Nature Medicine, AI-powered breast cancer detection systems have been shown to be more accurate than human radiologists in detecting breast cancer. This technology has the potential to revolutionize the way breast cancer is diagnosed and treated, and could potentially save thousands of lives each year.</td></tr><tr><td>BPO Response</td><td>Sure, here are some examples of artificial intelligence (AI) being used in various industries and aspects of daily life:1. Healthcare:\n* Diagnostic tools: AI-powered diagnostic tools are being used to diagnose diseases such as cancer, diabetes, and heart disease by analyzing medical images and patient data.\n* Personalized medicine: AI is being used to create personalized treatment plans for patients based on their genetic profiles, medical history, and lifestyle.\n* Drug discovery: AI is being used to analyze large amounts of data to identify potential new drugs and drug targets, potentially leading to faster and more effective drug development.\n2. Finance:\n* Fraud detection: AI-powered fraud detection systems are being used to identify and prevent fraudulent transactions in banking, insurance, and e-commerce.\n* Portfolio management: AI is being used to analyze financial data and make investment recommendations based on market trends and individual investor preferences.\n* Personal financial management: AI-powered personal financial management tools are being used to help individuals manage their finances, create budgets, and make investment decisions.\n3. Transportation:\n* Autonomous vehicles: AI is being used to develop autonomous vehicles that can drive themselves, potentially reducing accidents and improving traffic flow.\n* Predictive maintenance: AI-powered predictive maintenance systems are being used to monitor and maintain vehicles, predicting when maintenance will be required and reducing downtime.\n* Route optimization: AI is being used to optimize delivery routes for companies such as FedEx and UPS, reducing fuel consumption and lowering emissions.\n4. Retail:\n* Personalized marketing: AI-powered personalized marketing tools are being used to create targeted marketing campaigns based on individual customer preferences and behavior.\n* Recommendation systems: AI-powered recommendation systems are being used to suggest products to customers based on their past purchases and browsing history.\n* Inventory management: AI-powered inventory management systems are being used to optimize inventory levels and reduce waste by predicting demand and adjusting inventory accordingly.\n5. Education:\n* Personalized learning: AI-powered personalized learning tools are being used to tailor educational content to individual students based on their learning style, pace, and progress.\n* Grading and assessment: AI-powered grading and assessment tools are being used to automate the grading process, freeing up teachers to focus on more important tasks.\n* Student support: AI-powered chatbots are being used to provide students with rapid support and answers to common questions, such as course schedules and assignment due dates.\n6. Manufacturing:\n* Predictive maintenance: AI-powered predictive maintenance systems are being used to monitor and maintain manufacturing equipment, predicting when maintenance will be required and reducing downtime.\n* Quality control: AI-powered quality control systems are being used to analyze products and detect defects, improving product quality and reducing waste.\n* Supply chain optimization: AI is being used to optimize supply chain operations, predicting demand and adjusting inventory and shipping schedules accordingly.\n7. Energy:\n* Energy management: AI-powered energy management systems are being used to optimize energy consumption and reduce waste by predicting energy demand and adjusting energy usage accordingly.\n* Renewable energy: AI is being used to optimize the performance of renewable energy sources such as wind and solar power, improving their efficiency and reducing their cost.\n* Energy storage: AI-powered energy storage systems are being used to optimize energy storage and reduce waste by predicting energy demand and adjusting energy storage accordingly.\n8. Home and security:\n* Smart homes: AI-powered smart home systems are being used to control lighting, heating, cooling, and security systems, improving energy efficiency and home safety.\n* Security systems: AI-powered security systems are being used to detect and prevent intruders, improving home security and reducing the need for physical security staff.\n* Home maintenance: AI-powered home maintenance systems are being used to detect and prevent maintenance issues, such as leaks and faulty appliances, improving home safety and reducing the need for costly repairs.\n9. Agriculture:\n* Crop yield prediction: AI-powered crop yield prediction systems are being used to predict crop yields based on weather patterns, soil conditions,"</td></tr><tr><td>ICL Response</td><td></td></tr></table>
|
| 431 |
+
|
| 432 |
+
Figure 5
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ffb52fe1643b9579b65651d639870c810193d6480d811ec10b31608e426128f1
|
| 3 |
+
size 1734755
|
2025/Self-Instructed Derived Prompt Generation Meets In-Context Learning_ Unlocking New Potential of Black-Box LLMs/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_content_list.json
ADDED
|
@@ -0,0 +1,2064 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Self-Taught Agentic Long-Context Understanding",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
238,
|
| 8 |
+
90,
|
| 9 |
+
757,
|
| 10 |
+
112
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Yufan Zhuang $^{1,2}$ , Xiaodong Yu $^{1}$ , Jialian Wu $^{1}$ , Xineng Sun $^{1}$ , Ze Wang $^{1}$ , Jiang Liu $^{1}$ , Yusheng Su $^{1}$ , Jingbo Shang $^{2}$ , Zicheng Liu $^{1}$ , Emad Barsoum $^{1}$ $^{1}$ AMD, $^{2}$ UC San Diego",
|
| 17 |
+
"bbox": [
|
| 18 |
+
186,
|
| 19 |
+
143,
|
| 20 |
+
806,
|
| 21 |
+
195
|
| 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": "Answering complex, long-context questions remains a major challenge for large language models (LLMs) as it requires effective question clarifications and context retrieval. We propose Agentic Long-Context Understanding (AgenticLU), a framework designed to enhance an LLM's understanding of such queries by integrating targeted self-clarification with contextual grounding within an agentic workflow. At the core of AgenticLU is Chain-of-Clarifications (CoC), where models refine their understanding through self-generated clarification questions and corresponding contextual groundings. By scaling inference as a tree search where each node represents a CoC step, we achieve $97.8\\%$ answer recall on NarrativeQA with a search depth of up to three and a branching factor of eight. To amortize the high cost of this search process to training, we leverage the preference pairs for each step obtained by the CoC workflow and perform two-stage model finetuning: (1) supervised finetuning to learn effective decomposition strategies, and (2) direct preference optimization to enhance reasoning quality. This enables AgenticLU models to generate clarifications and retrieve relevant context effectively and efficiently in a single inference pass. Extensive experiments across seven long-context tasks demonstrate that AgenticLU significantly outperforms state-of-the-art prompting methods and specialized long-context LLMs, achieving robust multi-hop reasoning while sustaining consistent performance as context length grows.",
|
| 40 |
+
"bbox": [
|
| 41 |
+
144,
|
| 42 |
+
287,
|
| 43 |
+
460,
|
| 44 |
+
770
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
114,
|
| 54 |
+
782,
|
| 55 |
+
258,
|
| 56 |
+
797
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Large language models have achieved notable milestones in natural language processing, demonstrating exceptional performance in tasks such as mathematical reasoning, code generation, and conversational understanding (OpenAI, 2023; DeepSeek-",
|
| 63 |
+
"bbox": [
|
| 64 |
+
112,
|
| 65 |
+
808,
|
| 66 |
+
490,
|
| 67 |
+
888
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "AI, 2025). However, effectively comprehending and utilizing long-context inputs remains a major challenge. Complex queries often require models to retrieve multiple relevant pieces of information from extensive contexts and synthesize them coherently. While recent advancements have extended context windows to 128K and even 2M tokens (Dubey et al., 2024; Touvron et al., 2023; Reid et al., 2024), these models still struggle to fully integrate and reason over large-scale contextual information. Recent studies (Liu et al., 2024; Gao et al., 2024) highlight a fundamental challenge in long-context understanding: the disparity between a model's nominal context size—the theoretical maximum input length—and its effective context window, the portion of the input the model actively utilizes for reasoning. This gap significantly impacts the understanding performance, limiting the model's ability to fully comprehend and integrate long-context information.",
|
| 74 |
+
"bbox": [
|
| 75 |
+
507,
|
| 76 |
+
260,
|
| 77 |
+
885,
|
| 78 |
+
583
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "We introduce a novel framework AgenticLU to enhance long-context comprehension in LLMs. As illustrated in fig. 1, the core of AgenticLU is Chain-of-Clarifications (CoC), a process where models enhance their understanding by generating clarification questions, retrieving relevant information from the long context and answering their own clarification questions based on the gathered evidence. Rather than relying on a direct response, CoC helps models refine their reasoning iteratively, resolving uncertainties along the way. We structure the framework into the following two stages.",
|
| 85 |
+
"bbox": [
|
| 86 |
+
507,
|
| 87 |
+
585,
|
| 88 |
+
885,
|
| 89 |
+
778
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "CoC Path Construction. To collect reliable CoC understanding path, we structure data collection as a tree search, where each CoC step represents a node. We leverage extended inference time to determine the effective clarification questions to ask and the relevant evidence to retrieve. With a search depth of three and a branching factor of eight, AgenticLU successfully retrieves $97.8\\%$ of",
|
| 96 |
+
"bbox": [
|
| 97 |
+
507,
|
| 98 |
+
791,
|
| 99 |
+
884,
|
| 100 |
+
921
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "page_footnote",
|
| 106 |
+
"text": "Code and data is available at: https://github.com/EvanZhuang/AgenticLU.",
|
| 107 |
+
"bbox": [
|
| 108 |
+
112,
|
| 109 |
+
895,
|
| 110 |
+
487,
|
| 111 |
+
919
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "page_number",
|
| 117 |
+
"text": "5525",
|
| 118 |
+
"bbox": [
|
| 119 |
+
480,
|
| 120 |
+
927,
|
| 121 |
+
519,
|
| 122 |
+
940
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "footer",
|
| 128 |
+
"text": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5525-5537 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
|
| 129 |
+
"bbox": [
|
| 130 |
+
90,
|
| 131 |
+
945,
|
| 132 |
+
907,
|
| 133 |
+
973
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "image",
|
| 139 |
+
"img_path": "images/251df78360db609cb1bf44f5e903218b79bdf0f9c6aca17e24a7ef1583750e76.jpg",
|
| 140 |
+
"image_caption": [
|
| 141 |
+
"Figure 1: Overview of the AgenticLU pipeline: The model iteratively refines its understanding of long-context inputs through an agentic workflow. At each step, it raises self-clarifications, retrieves relevant context via the pointback mechanism, and updates its reasoning trace. The framework integrates CoC Path Construction to generate diverse reasoning paths, followed by two-stage fine-tuning (SFT and DPO) to enhance long-context understanding."
|
| 142 |
+
],
|
| 143 |
+
"image_footnote": [],
|
| 144 |
+
"bbox": [
|
| 145 |
+
115,
|
| 146 |
+
85,
|
| 147 |
+
880,
|
| 148 |
+
299
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "the correct answers in NarrativeQA (Kočiský et al., 2018), demonstrating its capability to tackle complex questions that require multi-step reasoning over long-context inputs.",
|
| 155 |
+
"bbox": [
|
| 156 |
+
112,
|
| 157 |
+
395,
|
| 158 |
+
487,
|
| 159 |
+
460
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "CoC Path Distillation. Once the dataset is collected from the tree-search process, we train the model to generate effective clarifications and contextual groundings in a single pass, eliminating the need for scaling at inference time. This is achieved by distilling these collected paths into LLMs through supervised finetuning (SFT) and direct preference optimization (DPO) (Rafailov et al., 2024), effectively amortizing the computational cost from inference to training.",
|
| 166 |
+
"bbox": [
|
| 167 |
+
112,
|
| 168 |
+
470,
|
| 169 |
+
487,
|
| 170 |
+
631
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "Our method AgenticLU significantly improves model's long-context understanding capabilities without relying on laborious human annotations or stronger teacher models for data generation. Instead, the base model's self-generated CoC paths enables it to teach itself to process long-context inputs more effectively. This approach harnesses the model's inherent long-context capabilities—previously only accessible through an additional LLM agent—allowing it to independently refine its reasoning and retrieval processes. Empirically, we demonstrate that AgenticLU consistently boosts performance across a set of question-answering tasks up to 128K tokens, outperforming both prompting-based approaches and other long-context-finetuned LLMs. By integrating selfclarification and context grounding in an agentic manner, we take a step further toward enabling",
|
| 177 |
+
"bbox": [
|
| 178 |
+
112,
|
| 179 |
+
631,
|
| 180 |
+
489,
|
| 181 |
+
921
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "LLMs to comprehend long contexts.",
|
| 188 |
+
"bbox": [
|
| 189 |
+
507,
|
| 190 |
+
395,
|
| 191 |
+
779,
|
| 192 |
+
411
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 1
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "2 Related Work",
|
| 199 |
+
"text_level": 1,
|
| 200 |
+
"bbox": [
|
| 201 |
+
507,
|
| 202 |
+
424,
|
| 203 |
+
663,
|
| 204 |
+
439
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 1
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "Challenges in Long Context Understanding LLMs struggle with long contexts despite supporting up to 2M tokens (Dubey et al., 2024; Reid et al., 2024). The \"lost-in-the-middle\" effect (Liu et al., 2024) and degraded performance on long-range tasks (Li et al., 2023) highlight these issues. To address this, ProLong (Gao et al., 2024) fine-tunes base models on a large, carefully curated long-context corpus. While this approach improves performance on long-range tasks, it comes at a significant cost, requiring training with an additional 40B tokens and long-input sequences.",
|
| 211 |
+
"bbox": [
|
| 212 |
+
507,
|
| 213 |
+
450,
|
| 214 |
+
882,
|
| 215 |
+
643
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 1
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "Inference-time Scaling for Long-Context The Self-Taught Reasoner (STaR) framework (Zelikman et al., 2022) iteratively generates rationales to refine reasoning, with models evaluating answers and finetuning on correct reasoning paths. Wang et al. (2024b) introduced Model-induced Process Supervision (MiPS), automating verifier training by generating multiple completions and assessing accuracy, boosting PaLM 2's performance on math and coding tasks. Li et al. (2024) proposed an inference scaling pipeline for long-context tasks using Bayes Risk-based sampling and fine-tuning, though their evaluation is limited to shorter contexts (10K tokens) compared to ours (128K tokens).",
|
| 222 |
+
"bbox": [
|
| 223 |
+
507,
|
| 224 |
+
653,
|
| 225 |
+
882,
|
| 226 |
+
879
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 1
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "Agentic Workflow for Long-Context Agentic workflows (Yao et al., 2022) enable LLMs to au",
|
| 233 |
+
"bbox": [
|
| 234 |
+
507,
|
| 235 |
+
889,
|
| 236 |
+
882,
|
| 237 |
+
920
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 1
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "page_number",
|
| 243 |
+
"text": "5526",
|
| 244 |
+
"bbox": [
|
| 245 |
+
480,
|
| 246 |
+
927,
|
| 247 |
+
519,
|
| 248 |
+
940
|
| 249 |
+
],
|
| 250 |
+
"page_idx": 1
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"type": "text",
|
| 254 |
+
"text": "tonomously manage tasks by generating internal plans and refining outputs iteratively. The LongRAG framework (Zhao et al., 2024b) enables an LLM and an RAG module to collaborate on long-context tasks by breaking down the input into smaller segments, processing them individually, and integrating the results to form a coherent output. Chain-of-Agents (CoA) (Zhang et al., 2024b) tackles long-context tasks through decomposition and multi-agent collaboration. In CoA, the input text is divided into segments, each handled by a worker agent that processes its assigned portion and communicates its findings to the next agent in the sequence. Unlike these, our approach employs a single LLM that orchestrates its own reasoning and retrieval without relying on multiple components. By dynamically structuring its process and iteratively refining long-context information, our model reduces complexity while maintaining efficiency.",
|
| 255 |
+
"bbox": [
|
| 256 |
+
112,
|
| 257 |
+
84,
|
| 258 |
+
492,
|
| 259 |
+
391
|
| 260 |
+
],
|
| 261 |
+
"page_idx": 2
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"type": "text",
|
| 265 |
+
"text": "3 The Context Size Gap",
|
| 266 |
+
"text_level": 1,
|
| 267 |
+
"bbox": [
|
| 268 |
+
112,
|
| 269 |
+
406,
|
| 270 |
+
339,
|
| 271 |
+
422
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 2
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "State-of-the-art LLMs have made strong claims about their context lengths, supporting hundreds of thousands of input tokens. However, recent studies (Gao et al., 2024; Yen et al., 2024; Shang et al., 2024) have shown that the effective context size of an LLM (the length over which it can reliably perform tasks such as information retrieval and complex reasoning) often diverges from its claimed, or nominal, context length.",
|
| 278 |
+
"bbox": [
|
| 279 |
+
112,
|
| 280 |
+
435,
|
| 281 |
+
489,
|
| 282 |
+
580
|
| 283 |
+
],
|
| 284 |
+
"page_idx": 2
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "text",
|
| 288 |
+
"text": "To illustrate this gap, we evaluate Llama3.1-8B-Instruct, which supports a 128K-token context, on the HotPotQA dataset to test multi-hop QA performance at various input lengths (8K, 16K, 32K, 64K, and 128K). We artificially expand the input by adding irrelevant context and measure the accuracy of its answers using GPT-4o as a judge. As shown in fig. 2, The model's performance degrades substantially as increasing context length, demonstrating the discrepancy between nominal and effective context sizes.",
|
| 289 |
+
"bbox": [
|
| 290 |
+
112,
|
| 291 |
+
582,
|
| 292 |
+
489,
|
| 293 |
+
758
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "While expanding nominal context capacity is undoubtedly important, we argue that it is not sufficient for solving all long-context problems. By analogy with computer memory, simply having more capacity does not guarantee efficient or accurate computation; one must also manage the \"loading\" of relevant information in and out of this memory. Therefore, we propose an agentic workflow aimed at helping LLMs process and interpret extended contexts more intelligently.",
|
| 300 |
+
"bbox": [
|
| 301 |
+
112,
|
| 302 |
+
760,
|
| 303 |
+
489,
|
| 304 |
+
921
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 2
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "image",
|
| 310 |
+
"img_path": "images/8a474e22492c218c52f628320610b3960f542ab402de5d1db3a69d53a2f67bf3.jpg",
|
| 311 |
+
"image_caption": [
|
| 312 |
+
"Figure 2: Effective context size is smaller than nominal context size. Performance of Llama3.1-8B-Instruct (advertised 128K-token context) on the Hot-PotQA dataset drops sharply as input length increases (8K, 16K, 32K, 64K, 128K), illustrating the gap between nominal and effective context capacities."
|
| 313 |
+
],
|
| 314 |
+
"image_footnote": [],
|
| 315 |
+
"bbox": [
|
| 316 |
+
547,
|
| 317 |
+
80,
|
| 318 |
+
847,
|
| 319 |
+
225
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 2
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "4 Chain-of-Clarifications Workflow",
|
| 326 |
+
"text_level": 1,
|
| 327 |
+
"bbox": [
|
| 328 |
+
507,
|
| 329 |
+
350,
|
| 330 |
+
833,
|
| 331 |
+
366
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 2
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"text": "Our approach centers on enhancing long-context comprehension through an iterative, self-refining process that blends inference-time scaling with agentic reasoning. We coin this agentic workflow Chain-of-Clarifications (CoC). In this section, we detail its key components, including the self-clarification process and the pointback mechanism, as illustrated in fig. 1.",
|
| 338 |
+
"bbox": [
|
| 339 |
+
507,
|
| 340 |
+
376,
|
| 341 |
+
884,
|
| 342 |
+
504
|
| 343 |
+
],
|
| 344 |
+
"page_idx": 2
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "Our proposed CoC framework is designed to mitigate the gap between nominal and effective context sizes in large language models. Rather than processing the entire long context and potentially multi-hop questions in a single pass, our methodology decomposes the task into a sequence of targeted sub-tasks. At each CoC step, the model autonomously:",
|
| 349 |
+
"bbox": [
|
| 350 |
+
507,
|
| 351 |
+
505,
|
| 352 |
+
882,
|
| 353 |
+
633
|
| 354 |
+
],
|
| 355 |
+
"page_idx": 2
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "list",
|
| 359 |
+
"sub_type": "text",
|
| 360 |
+
"list_items": [
|
| 361 |
+
"- Generates clarifying questions by identifying areas of the long input that require further elaboration or are prone to misinterpretation.",
|
| 362 |
+
"- Pointbacks to relevant context by using a pointback mechanism that highlights critical segments of the context by naming the index of relevant paragraphs. In the data collection phase, this is done by iteratively querying the LLM about the relevance of each paragraph with respect to the question. After training, the model is finetuned to generate the related paragraph indexes directly in a single pass.",
|
| 363 |
+
"- Answers clarifying questions by integrating highlighted context into consideration to build a more accurate and contextually grounded understanding of the long document."
|
| 364 |
+
],
|
| 365 |
+
"bbox": [
|
| 366 |
+
531,
|
| 367 |
+
644,
|
| 368 |
+
884,
|
| 369 |
+
921
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "page_number",
|
| 375 |
+
"text": "5527",
|
| 376 |
+
"bbox": [
|
| 377 |
+
480,
|
| 378 |
+
927,
|
| 379 |
+
519,
|
| 380 |
+
940
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 2
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "- Answers the original question by combining all newly gathered clarifications, the model attempts to generate a valid answer to the original question.",
|
| 387 |
+
"bbox": [
|
| 388 |
+
136,
|
| 389 |
+
84,
|
| 390 |
+
487,
|
| 391 |
+
148
|
| 392 |
+
],
|
| 393 |
+
"page_idx": 3
|
| 394 |
+
},
|
| 395 |
+
{
|
| 396 |
+
"type": "text",
|
| 397 |
+
"text": "It is important to note a key distinction between CoC path generation during data collection and the actual task deployment of the agentic workflow. In the data generation phase, we prompt the LLM to iteratively process each chunk of input text along with its self-generated clarifying questions, ensuring accurate retrieval of relevant context. During training, rather than relying on repeated inference calls, we finetune the model to directly generate the indexes of relevant paragraphs using pointback examples, effectively amortizing the computational cost into training. This enables the model to internalize the retrieval process, allowing it to dynamically synthesize relevant clarifications and contextual references at inference time without requiring extensive additional prompting.",
|
| 398 |
+
"bbox": [
|
| 399 |
+
112,
|
| 400 |
+
155,
|
| 401 |
+
489,
|
| 402 |
+
413
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 3
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "text",
|
| 408 |
+
"text": "5 Data Generation & Model Training",
|
| 409 |
+
"text_level": 1,
|
| 410 |
+
"bbox": [
|
| 411 |
+
112,
|
| 412 |
+
423,
|
| 413 |
+
453,
|
| 414 |
+
441
|
| 415 |
+
],
|
| 416 |
+
"page_idx": 3
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "Dataset We use the NarrativeQA (Kočisky et al., 2018) dataset to facilitate long-context QA and generate agentic workflow traces with 14.7K QA pairs in the training set. NarrativeQA is designed for reading comprehension over narrative texts, such as books and movie scripts, where each example includes a full story and a set of corresponding QA pairs. This dataset emphasizes deeper reasoning and long-context understanding, as many questions require synthesizing information from multiple parts of the narrative rather than focusing solely on particular local context. Its relatively long passages make NarrativeQA particularly suitable for testing and refining agentic reasoning in large language models, as the answers often depend on weaving together details spanning the entire text.",
|
| 421 |
+
"bbox": [
|
| 422 |
+
112,
|
| 423 |
+
448,
|
| 424 |
+
489,
|
| 425 |
+
706
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 3
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "Base Model Our base model is Llama3.1-8B-Instruct (Dubey et al., 2024), an 8-billion-parameter instruction-tuned Llama model. This model is built on the same transformer architecture as Llama3, but with additional fine-tuning data to improve its performance on multi-turn dialogue and instruction-following tasks.",
|
| 432 |
+
"bbox": [
|
| 433 |
+
112,
|
| 434 |
+
714,
|
| 435 |
+
489,
|
| 436 |
+
826
|
| 437 |
+
],
|
| 438 |
+
"page_idx": 3
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "text",
|
| 442 |
+
"text": "5.1 CoC Path Construction",
|
| 443 |
+
"text_level": 1,
|
| 444 |
+
"bbox": [
|
| 445 |
+
112,
|
| 446 |
+
835,
|
| 447 |
+
346,
|
| 448 |
+
850
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 3
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "We employ a test-time scaling approach to generate CoC paths. For each question, we construct a tree of search paths where each node represents a distinct clarification question posed by the LLM.",
|
| 455 |
+
"bbox": [
|
| 456 |
+
112,
|
| 457 |
+
857,
|
| 458 |
+
487,
|
| 459 |
+
921
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 3
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "table",
|
| 465 |
+
"img_path": "images/663f7191cbf8e7bf005fa95482bc68556e81c9ba8f65de8b8fe54eb8173d8901.jpg",
|
| 466 |
+
"table_caption": [
|
| 467 |
+
"Table 1: Statistics of the generated traces dataset used in finetuning derived from NarrativeQA. We left out 11.9K traces for validation."
|
| 468 |
+
],
|
| 469 |
+
"table_footnote": [],
|
| 470 |
+
"table_body": "<table><tr><td>Data</td><td>#</td></tr><tr><td>Num of Traces</td><td>107,550</td></tr><tr><td>Avg Context Length</td><td>67,812</td></tr><tr><td>Avg Chosen Response Length</td><td>165</td></tr><tr><td>Avg Rejected Response Length</td><td>164</td></tr><tr><td>Total Generation Tokens</td><td>17M</td></tr></table>",
|
| 471 |
+
"bbox": [
|
| 472 |
+
557,
|
| 473 |
+
136,
|
| 474 |
+
833,
|
| 475 |
+
230
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 3
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "text",
|
| 481 |
+
"text": "In our experiments, we use a branching factor of 8 at each depth and select the most promising trace based on an evaluation score that combines:",
|
| 482 |
+
"bbox": [
|
| 483 |
+
507,
|
| 484 |
+
255,
|
| 485 |
+
882,
|
| 486 |
+
302
|
| 487 |
+
],
|
| 488 |
+
"page_idx": 3
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "- Semantic similarity, measured by the RougeL (Lin, 2004) score relative to the ground truth.",
|
| 493 |
+
"bbox": [
|
| 494 |
+
531,
|
| 495 |
+
315,
|
| 496 |
+
880,
|
| 497 |
+
362
|
| 498 |
+
],
|
| 499 |
+
"page_idx": 3
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"type": "text",
|
| 503 |
+
"text": "- Discrete correctness, evaluated by a binary verification using GPT4o-mini.",
|
| 504 |
+
"bbox": [
|
| 505 |
+
531,
|
| 506 |
+
376,
|
| 507 |
+
880,
|
| 508 |
+
407
|
| 509 |
+
],
|
| 510 |
+
"page_idx": 3
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"type": "text",
|
| 514 |
+
"text": "In the data construction process, the relevant context is found by iteratively querying the LLM about the relevance of all chunked passages. Here we use 512 as the chunk size. This process is compute-intensive but only happens in data collection. After the training, the LLM will directly generate the paragraph numbers of the relevant context as shown in the lower right of fig. 1.",
|
| 515 |
+
"bbox": [
|
| 516 |
+
507,
|
| 517 |
+
420,
|
| 518 |
+
882,
|
| 519 |
+
548
|
| 520 |
+
],
|
| 521 |
+
"page_idx": 3
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"type": "text",
|
| 525 |
+
"text": "For most long-context tasks, a single clarification question suffices because the required reasoning is not highly complex. $92\\%$ of the questions in our experiments are resolved correctly with just one round of clarification. More challenging tasks may require multiple rounds of clarification: two rounds resolve $53\\%$ of the remaining $8\\%$ , and three rounds resolve $35\\%$ of the remaining $4\\%$ . Because of the exponentially increasing cost—and given that $97.4\\%$ of the training questions are already solved—we limit the maximum depth of our inference scaling to 3.",
|
| 526 |
+
"bbox": [
|
| 527 |
+
505,
|
| 528 |
+
549,
|
| 529 |
+
882,
|
| 530 |
+
741
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 3
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "The statistics of the collected dataset are shown in table 1. The total number of conditional generation tokens that the LLM trained on is 17M tokens, with input that has an average length of 67K and a max length of 128K tokens.",
|
| 537 |
+
"bbox": [
|
| 538 |
+
507,
|
| 539 |
+
743,
|
| 540 |
+
882,
|
| 541 |
+
822
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 3
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "5.2 CoC Path Distillation",
|
| 548 |
+
"text_level": 1,
|
| 549 |
+
"bbox": [
|
| 550 |
+
507,
|
| 551 |
+
835,
|
| 552 |
+
722,
|
| 553 |
+
848
|
| 554 |
+
],
|
| 555 |
+
"page_idx": 3
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "text",
|
| 559 |
+
"text": "We employ a two-stage finetuning recipe: Supervised Fine-Tuning (SFT) followed by Direct Preference Optimization (DPO) (Rafailov et al., 2024), to convert our base model into a long-context under",
|
| 560 |
+
"bbox": [
|
| 561 |
+
507,
|
| 562 |
+
857,
|
| 563 |
+
882,
|
| 564 |
+
921
|
| 565 |
+
],
|
| 566 |
+
"page_idx": 3
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "page_number",
|
| 570 |
+
"text": "5528",
|
| 571 |
+
"bbox": [
|
| 572 |
+
480,
|
| 573 |
+
927,
|
| 574 |
+
519,
|
| 575 |
+
940
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 3
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "standing agent. The dataset statistics is described in table 1, with input length up to 128K tokens.",
|
| 582 |
+
"bbox": [
|
| 583 |
+
112,
|
| 584 |
+
84,
|
| 585 |
+
485,
|
| 586 |
+
116
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 4
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "Supervised Fine-Tuning In the first phase, we finetune Llama3.1-8B-Instruct using the generated CoC paths. Each training example includes (1) the full context from NarrativeQA, (2) the question, and (3) the step-by-step reasoning trace leading to the final answer. By exposing the model to these traces, we encourage it to internalize multi-step reasoning strategies and context grounding for the long-context inputs. The SFT stage uses a standard cross-entropy loss on the next-token prediction task, ensuring the model learns how to produce consistent and complete reasoning sequences.",
|
| 593 |
+
"bbox": [
|
| 594 |
+
112,
|
| 595 |
+
124,
|
| 596 |
+
489,
|
| 597 |
+
317
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 4
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "Direct Preference Optimization In the second phase, we apply Direct Preference Optimization to further refine the model's output quality. To create preference pairs, we sample incorrect workflow traces as negative examples with using GPT40-mini as the judge for answer correctness from the test-time scaling. DPO explicitly optimizes the model to generate higher-ranked responses more frequently, thus aligning the agent's outputs with desirable characteristics, such as clarity, correctness, and coherence. This stage ensures that even among valid reasoning paths, the model learns to prioritize the most instructive reasoning.",
|
| 604 |
+
"bbox": [
|
| 605 |
+
112,
|
| 606 |
+
325,
|
| 607 |
+
489,
|
| 608 |
+
533
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 4
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"text": "The details for the two-phase training are listed in appendix A.",
|
| 615 |
+
"bbox": [
|
| 616 |
+
112,
|
| 617 |
+
533,
|
| 618 |
+
487,
|
| 619 |
+
565
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 4
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "6 Evaluation",
|
| 626 |
+
"text_level": 1,
|
| 627 |
+
"bbox": [
|
| 628 |
+
114,
|
| 629 |
+
577,
|
| 630 |
+
243,
|
| 631 |
+
592
|
| 632 |
+
],
|
| 633 |
+
"page_idx": 4
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "In this section, we assess our method AgenticLU using a suite of evaluation tasks drawn from the HELMET long-context benchmark (Yen et al., 2024). Our experiments focus on testing models' ability to retain, process, and reason over extended contexts ranging from 8K to 128K tokens.",
|
| 638 |
+
"bbox": [
|
| 639 |
+
112,
|
| 640 |
+
601,
|
| 641 |
+
489,
|
| 642 |
+
697
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 4
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "6.1 Tasks and Metrics",
|
| 649 |
+
"text_level": 1,
|
| 650 |
+
"bbox": [
|
| 651 |
+
112,
|
| 652 |
+
708,
|
| 653 |
+
304,
|
| 654 |
+
722
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 4
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"text": "We evaluate our models and baselines on the Helmet (Yen et al., 2024) long-context evaluation benchmark's retrieval-augmented generation (RAG) and long-range QA (LongQA) tasks ranging from 8K, 16K, 32K, 64K, to 128K.",
|
| 661 |
+
"bbox": [
|
| 662 |
+
112,
|
| 663 |
+
728,
|
| 664 |
+
487,
|
| 665 |
+
807
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 4
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "We use GPT-4o as the judge for answer correctness, with the prompt template shown in appendix F. We report accuracies for all datasets.",
|
| 672 |
+
"bbox": [
|
| 673 |
+
112,
|
| 674 |
+
809,
|
| 675 |
+
489,
|
| 676 |
+
856
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 4
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"text": "The RAG test suite includes: (1) HotpotQA (Yang et al., 2018), a multi-hop reasoning dataset over Wikipedia; (2) Natural Questions (Kwiatkowski et al., 2019), real user queries",
|
| 683 |
+
"bbox": [
|
| 684 |
+
112,
|
| 685 |
+
857,
|
| 686 |
+
489,
|
| 687 |
+
921
|
| 688 |
+
],
|
| 689 |
+
"page_idx": 4
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "text",
|
| 693 |
+
"text": "with Wikipedia-based short and long answers; (3) TriviaQA (Joshi et al., 2017), a large-scale trivia dataset with question-answer pairs linked to evidence documents; (4) PopQA (Mallen et al., 2022), a dataset testing model memorization with fact-based questions from popular culture.",
|
| 694 |
+
"bbox": [
|
| 695 |
+
507,
|
| 696 |
+
84,
|
| 697 |
+
884,
|
| 698 |
+
180
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 4
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "The LongQA test suite includes: (1) NarrativeQA (Kočiský et al., 2018), a reading comprehension dataset with Wikipedia summaries and story-based Q&A; (2) InfiniteBench QA (Zhang et al., 2024a), a long-range QA benchmark requiring reasoning over extended contexts; (3) InfiniteBench Multiple-Choice (Zhang et al., 2024a), a multiple-choice variant of the previous evaluating reading comprehension over long documents.",
|
| 705 |
+
"bbox": [
|
| 706 |
+
507,
|
| 707 |
+
181,
|
| 708 |
+
884,
|
| 709 |
+
338
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 4
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"text": "For the four RAG tasks, each question is put alongside a set of relevant contexts, and the overall input length is increased by appending irrelevant context. Consequently, these tasks become strictly more difficult as the context window expands. In contrast, for the three LongQA tasks, the relevant context may not appear in the truncated input (the first 8K, 16K, or 128K tokens). Hence, performance might improve at longer input lengths simply because the necessary information becomes available only after including more tokens.",
|
| 716 |
+
"bbox": [
|
| 717 |
+
507,
|
| 718 |
+
342,
|
| 719 |
+
882,
|
| 720 |
+
519
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 4
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "6.2 Baselines",
|
| 727 |
+
"text_level": 1,
|
| 728 |
+
"bbox": [
|
| 729 |
+
507,
|
| 730 |
+
531,
|
| 731 |
+
628,
|
| 732 |
+
544
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 4
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "We compare AgenticLU against a diverse set of strong baselines representing different approaches for handling long-context tasks. Our comparisons include two main categories.",
|
| 739 |
+
"bbox": [
|
| 740 |
+
507,
|
| 741 |
+
551,
|
| 742 |
+
882,
|
| 743 |
+
615
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 4
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "Under prompting methods we consider techniques that require no additional model training. In particular, we evaluate (a) the chain-of-thought approach (Kojima et al., 2022), which encourages models to decompose complex questions into intermediate reasoning steps; (b) fact-and-reflection prompting (Zhao et al., 2024c), which iteratively verifies and refines factual claims to enhance consistency; (c) plan-and-solve prompting (Wang et al., 2023), where the model first outlines a high-level plan before sequentially executing it to address structured reasoning tasks; and (d) LongRAG (Zhao et al., 2024a) where a hybrid RAG system is used to retrieve relevant context to generate global summaries and local details<sup>1</sup>.",
|
| 750 |
+
"bbox": [
|
| 751 |
+
507,
|
| 752 |
+
615,
|
| 753 |
+
882,
|
| 754 |
+
856
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 4
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "text",
|
| 760 |
+
"text": "In the fine-tuning category, we focus on models",
|
| 761 |
+
"bbox": [
|
| 762 |
+
526,
|
| 763 |
+
857,
|
| 764 |
+
880,
|
| 765 |
+
873
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 4
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "page_footnote",
|
| 771 |
+
"text": "<sup>1</sup>Note that LongRAG provided finetuned models as well. But the SFT-ed Llama3-8B only supports 8K context length. Thus we did not include it in our comparison.",
|
| 772 |
+
"bbox": [
|
| 773 |
+
507,
|
| 774 |
+
883,
|
| 775 |
+
882,
|
| 776 |
+
920
|
| 777 |
+
],
|
| 778 |
+
"page_idx": 4
|
| 779 |
+
},
|
| 780 |
+
{
|
| 781 |
+
"type": "page_number",
|
| 782 |
+
"text": "5529",
|
| 783 |
+
"bbox": [
|
| 784 |
+
480,
|
| 785 |
+
927,
|
| 786 |
+
519,
|
| 787 |
+
940
|
| 788 |
+
],
|
| 789 |
+
"page_idx": 4
|
| 790 |
+
},
|
| 791 |
+
{
|
| 792 |
+
"type": "table",
|
| 793 |
+
"img_path": "images/0c40777925d3e5cdcd4336d9bdddac41f72e095a1c3b53a0753fb48df123cbeb.jpg",
|
| 794 |
+
"table_caption": [
|
| 795 |
+
"Table 2: Performance difference of AgenticLU and its base, Llama3.1-8B-Instruct ( $\\delta =$ AgenticLU-8B minus Llama3.1-8B), on long context (the 128K tasks) and short-context benchmarks (6 regular tasks including ARC, GSM8K, and MMLU), the details of the short-context performance can be found in appendix B. Scores represent accuracy, with AgenticLU demonstrating significantly improved performance across long-context tasks with minimal effect on regular task performance."
|
| 796 |
+
],
|
| 797 |
+
"table_footnote": [],
|
| 798 |
+
"table_body": "<table><tr><td>Model</td><td>Short Avg</td><td>HotpotQA</td><td>Natural Questions</td><td>TriviaQA</td><td>PopQA</td><td>NarrativeQA</td><td>InfiniQA</td><td>InfiniChoice</td><td>Long Avg</td></tr><tr><td>Llama3.1-8B</td><td>62.3</td><td>40.0</td><td>56.1</td><td>80.6</td><td>56.1</td><td>38.0</td><td>48.0</td><td>55.0</td><td>53.4</td></tr><tr><td>AgenticLU (δ)</td><td>-0.6</td><td>+31.1</td><td>+21.7</td><td>+7.7</td><td>+9.4</td><td>+18.0</td><td>+2.0</td><td>+13.0</td><td>+14.7</td></tr></table>",
|
| 799 |
+
"bbox": [
|
| 800 |
+
117,
|
| 801 |
+
164,
|
| 802 |
+
878,
|
| 803 |
+
212
|
| 804 |
+
],
|
| 805 |
+
"page_idx": 5
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"type": "image",
|
| 809 |
+
"img_path": "images/03c03c318c583529fd9dea6df855e378d9b420a0ef5150bd451ca35f9af765fa.jpg",
|
| 810 |
+
"image_caption": [],
|
| 811 |
+
"image_footnote": [],
|
| 812 |
+
"bbox": [
|
| 813 |
+
115,
|
| 814 |
+
223,
|
| 815 |
+
374,
|
| 816 |
+
386
|
| 817 |
+
],
|
| 818 |
+
"page_idx": 5
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"type": "image",
|
| 822 |
+
"img_path": "images/91e5aec480e0eeafb9502adffe4916313523d64facf98d4a5c011939eb5fa369.jpg",
|
| 823 |
+
"image_caption": [],
|
| 824 |
+
"image_footnote": [],
|
| 825 |
+
"bbox": [
|
| 826 |
+
383,
|
| 827 |
+
223,
|
| 828 |
+
626,
|
| 829 |
+
386
|
| 830 |
+
],
|
| 831 |
+
"page_idx": 5
|
| 832 |
+
},
|
| 833 |
+
{
|
| 834 |
+
"type": "image",
|
| 835 |
+
"img_path": "images/2b98fa9d70dd5d547509928276bcbe19f400a05f1ccf84bccc7dc40bc97647a2.jpg",
|
| 836 |
+
"image_caption": [],
|
| 837 |
+
"image_footnote": [
|
| 838 |
+
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
|
| 839 |
+
],
|
| 840 |
+
"bbox": [
|
| 841 |
+
635,
|
| 842 |
+
223,
|
| 843 |
+
880,
|
| 844 |
+
386
|
| 845 |
+
],
|
| 846 |
+
"page_idx": 5
|
| 847 |
+
},
|
| 848 |
+
{
|
| 849 |
+
"type": "image",
|
| 850 |
+
"img_path": "images/8d01fffb043b18bdb30e4a8ea759608581d9b5e7dfed12bc0182eaf329aa972e.jpg",
|
| 851 |
+
"image_caption": [],
|
| 852 |
+
"image_footnote": [
|
| 853 |
+
"Llama3.1-8B"
|
| 854 |
+
],
|
| 855 |
+
"bbox": [
|
| 856 |
+
115,
|
| 857 |
+
387,
|
| 858 |
+
374,
|
| 859 |
+
537
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 5
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "image",
|
| 865 |
+
"img_path": "images/5f429bda47ecf0968783118115fbbf9f499c6a141b2d71b6af34c7d820163edf.jpg",
|
| 866 |
+
"image_caption": [],
|
| 867 |
+
"image_footnote": [
|
| 868 |
+
"ProLong-8B"
|
| 869 |
+
],
|
| 870 |
+
"bbox": [
|
| 871 |
+
384,
|
| 872 |
+
387,
|
| 873 |
+
628,
|
| 874 |
+
520
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 5
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "image",
|
| 880 |
+
"img_path": "images/fb16a7baa38b053b3dd9e60cfbfdc4aa1251143d6b1f6d41440ebe43ba94943b.jpg",
|
| 881 |
+
"image_caption": [],
|
| 882 |
+
"image_footnote": [
|
| 883 |
+
"Llama3.1-8B+plan&solve",
|
| 884 |
+
"- AgenticLU-8B"
|
| 885 |
+
],
|
| 886 |
+
"bbox": [
|
| 887 |
+
636,
|
| 888 |
+
387,
|
| 889 |
+
880,
|
| 890 |
+
520
|
| 891 |
+
],
|
| 892 |
+
"page_idx": 5
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"type": "image",
|
| 896 |
+
"img_path": "images/3c0d481a7b382ae030631c0cdf4a7615166c24fdf4922854b7ba7d8cdb4b64b2.jpg",
|
| 897 |
+
"image_caption": [
|
| 898 |
+
"Figure 3: Main results on 7 long-context tasks across context lengths from 8K to 128K. Our AgenticLU-8B (dotted orange) achieves significant improvements on all tasks over our base model Llama3.1-8B (solid orange). We also compare with the prompting methods (Step-by-Step, Plan-and-Solve, Fact-and-Reflect, LongRAG) and the state-of-the-art ProLong-8B model. AgenticLU-8B consistently maintains strong performance across most tasks and context lengths."
|
| 899 |
+
],
|
| 900 |
+
"image_footnote": [
|
| 901 |
+
"- - Llama3.1-8B+step-by-step",
|
| 902 |
+
"Llama3.1-8B+fact&reflect"
|
| 903 |
+
],
|
| 904 |
+
"bbox": [
|
| 905 |
+
115,
|
| 906 |
+
538,
|
| 907 |
+
374,
|
| 908 |
+
670
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 5
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "that have been specifically adapted for extended context data. For a substantial comparison, we employ Prolong-8B-512K (Gao et al., 2024)—a model based on the Llama3 8B architecture that has been further trained on an additional 40B tokens of long-context data.",
|
| 915 |
+
"bbox": [
|
| 916 |
+
112,
|
| 917 |
+
784,
|
| 918 |
+
487,
|
| 919 |
+
881
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 5
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "text",
|
| 925 |
+
"text": "6.3 Main Results",
|
| 926 |
+
"text_level": 1,
|
| 927 |
+
"bbox": [
|
| 928 |
+
507,
|
| 929 |
+
784,
|
| 930 |
+
660,
|
| 931 |
+
799
|
| 932 |
+
],
|
| 933 |
+
"page_idx": 5
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "text",
|
| 937 |
+
"text": "The performance of AgenticLU and baseline models is shown in fig. 3.",
|
| 938 |
+
"bbox": [
|
| 939 |
+
507,
|
| 940 |
+
809,
|
| 941 |
+
884,
|
| 942 |
+
841
|
| 943 |
+
],
|
| 944 |
+
"page_idx": 5
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"type": "text",
|
| 948 |
+
"text": "Self-clarification significantly improves multihop reasoning. AgenticLU-8B consistently surpasses other methods in HotpotQA. By iteratively refining its understanding, resolving ambigu",
|
| 949 |
+
"bbox": [
|
| 950 |
+
507,
|
| 951 |
+
856,
|
| 952 |
+
884,
|
| 953 |
+
921
|
| 954 |
+
],
|
| 955 |
+
"page_idx": 5
|
| 956 |
+
},
|
| 957 |
+
{
|
| 958 |
+
"type": "page_number",
|
| 959 |
+
"text": "5530",
|
| 960 |
+
"bbox": [
|
| 961 |
+
480,
|
| 962 |
+
927,
|
| 963 |
+
521,
|
| 964 |
+
940
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 5
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "text",
|
| 970 |
+
"text": "ities, and verifying intermediate steps, the model achieves higher accuracy, particularly as context length increases.",
|
| 971 |
+
"bbox": [
|
| 972 |
+
112,
|
| 973 |
+
84,
|
| 974 |
+
487,
|
| 975 |
+
131
|
| 976 |
+
],
|
| 977 |
+
"page_idx": 6
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "text",
|
| 981 |
+
"text": "Robust performance across diverse datasets. Unlike baseline models, AgenticLU-8B maintains consistently strong performance across RAG and LongQA benchmarks, demonstrating its ability to adapt effectively to different long-context tasks.",
|
| 982 |
+
"bbox": [
|
| 983 |
+
112,
|
| 984 |
+
143,
|
| 985 |
+
489,
|
| 986 |
+
223
|
| 987 |
+
],
|
| 988 |
+
"page_idx": 6
|
| 989 |
+
},
|
| 990 |
+
{
|
| 991 |
+
"type": "text",
|
| 992 |
+
"text": "Reduced performance degradation with longer contexts. While most models experience significant accuracy drops as context length increases, AgenticLU-8B remains stable. Its self-clarification and pointback mechanisms effectively filter noise from irrelevant information, allowing the model to extract and prioritize essential evidence.",
|
| 993 |
+
"bbox": [
|
| 994 |
+
112,
|
| 995 |
+
233,
|
| 996 |
+
487,
|
| 997 |
+
344
|
| 998 |
+
],
|
| 999 |
+
"page_idx": 6
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"type": "text",
|
| 1003 |
+
"text": "Fine-tuning vs. prompting trade-offs. While structured prompting techniques like plan-and-solve improve short-context reasoning, they struggle with extreme context lengths (e.g., 128K tokens). In contrast, AgenticLU-8B, through targeted finetuning with self-clarification and pointback, maintains robust long-context reasoning without relying on complex prompting strategies. Although ProLong-8B, another finetuned model, achieves strong results, it comes with significantly higher training costs. AgenticLU-8B, by contrast, is more data-efficient and generalizes better to novel tasks, making it a more practical and effective solution for long-context reasoning.",
|
| 1004 |
+
"bbox": [
|
| 1005 |
+
112,
|
| 1006 |
+
356,
|
| 1007 |
+
487,
|
| 1008 |
+
580
|
| 1009 |
+
],
|
| 1010 |
+
"page_idx": 6
|
| 1011 |
+
},
|
| 1012 |
+
{
|
| 1013 |
+
"type": "text",
|
| 1014 |
+
"text": "Overall, these results underscore the effectiveness of AgenticLU-8B in tackling long-context understanding challenges. The integration of selfclarification plays a crucial role in improving grounding, reasoning, and comprehension in long-context settings.",
|
| 1015 |
+
"bbox": [
|
| 1016 |
+
112,
|
| 1017 |
+
582,
|
| 1018 |
+
489,
|
| 1019 |
+
678
|
| 1020 |
+
],
|
| 1021 |
+
"page_idx": 6
|
| 1022 |
+
},
|
| 1023 |
+
{
|
| 1024 |
+
"type": "text",
|
| 1025 |
+
"text": "6.4 Performance on Short-Context Tasks",
|
| 1026 |
+
"text_level": 1,
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
112,
|
| 1029 |
+
690,
|
| 1030 |
+
452,
|
| 1031 |
+
705
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 6
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "To demonstrate that our fine-tuning process preserves the model's general capabilities while enhancing long-context understanding, we evaluated the finetuned model on a diverse set of standard benchmarks. These include elementary and advanced reasoning tasks ARC Easy and ARC Challenge (Clark et al., 2018), mathematical problem-solving GSM8K (Cobbe et al., 2021), MathQA (Amini et al., 2019), and broad knowledge assessment MMLU (Hendrycks et al., 2021b,a), MMLU-Pro (Wang et al., 2024a).",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
112,
|
| 1040 |
+
712,
|
| 1041 |
+
487,
|
| 1042 |
+
888
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 6
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "We report the average performance across short-context tasks in table 2, and each individual task",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
112,
|
| 1051 |
+
889,
|
| 1052 |
+
489,
|
| 1053 |
+
920
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 6
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "table",
|
| 1059 |
+
"img_path": "images/8e6742bf79a1eb19105518c3a0f4ff56a788d17b8b3f9306af2544b120fd617a.jpg",
|
| 1060 |
+
"table_caption": [
|
| 1061 |
+
"Table 3: We evaluate the performance of adding additional self-clarification and contextual grounding rounds at inference time. The gain from self-clarification is close to optimal at the initial round."
|
| 1062 |
+
],
|
| 1063 |
+
"table_footnote": [],
|
| 1064 |
+
"table_body": "<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr><tr><td>(w/ 2 rounds)</td><td>71.1</td><td>76.7</td><td>67.2</td><td>91.7</td><td>76.7</td></tr><tr><td>(w/ 3 rounds)</td><td>75.5</td><td>78.8</td><td>68.3</td><td>91.1</td><td>78.4</td></tr></table>",
|
| 1065 |
+
"bbox": [
|
| 1066 |
+
512,
|
| 1067 |
+
149,
|
| 1068 |
+
878,
|
| 1069 |
+
214
|
| 1070 |
+
],
|
| 1071 |
+
"page_idx": 6
|
| 1072 |
+
},
|
| 1073 |
+
{
|
| 1074 |
+
"type": "text",
|
| 1075 |
+
"text": "result can be found in appendix B. We find that the short-context performance is well preserved, demonstrating that AgenticLU's core reasoning and problem-solving abilities remain strong and are not compromised by the significant improvements to its long-context understanding powers.",
|
| 1076 |
+
"bbox": [
|
| 1077 |
+
507,
|
| 1078 |
+
240,
|
| 1079 |
+
882,
|
| 1080 |
+
336
|
| 1081 |
+
],
|
| 1082 |
+
"page_idx": 6
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"type": "text",
|
| 1086 |
+
"text": "7 Analyses & Ablation Studies",
|
| 1087 |
+
"text_level": 1,
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
507,
|
| 1090 |
+
350,
|
| 1091 |
+
791,
|
| 1092 |
+
366
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 6
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"text": "In this section, we take a closer look at how each part of our approach affects long-context understanding and retrieval. Specifically, we study three main questions: (1) Can the finetuned system benefit from multi-round CoC? (2) Does adding clarifications and pointing back to the original document help the model understand and utilize the context more accurately? (3) How much additional compute overhead does AgenticLU add to the process?",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
507,
|
| 1101 |
+
376,
|
| 1102 |
+
882,
|
| 1103 |
+
521
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 6
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "7.1 How many rounds of CoC are needed?",
|
| 1110 |
+
"text_level": 1,
|
| 1111 |
+
"bbox": [
|
| 1112 |
+
507,
|
| 1113 |
+
533,
|
| 1114 |
+
858,
|
| 1115 |
+
548
|
| 1116 |
+
],
|
| 1117 |
+
"page_idx": 6
|
| 1118 |
+
},
|
| 1119 |
+
{
|
| 1120 |
+
"type": "text",
|
| 1121 |
+
"text": "Setup. We add additional rounds of reasoning in the evaluation and see if the LLM can benefit from multi-rounds of reasoning at test-time.",
|
| 1122 |
+
"bbox": [
|
| 1123 |
+
507,
|
| 1124 |
+
555,
|
| 1125 |
+
880,
|
| 1126 |
+
602
|
| 1127 |
+
],
|
| 1128 |
+
"page_idx": 6
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"type": "text",
|
| 1132 |
+
"text": "Analysis. The results, presented in Table 3, indicate that additional rounds of agentic reasoning do provide performance improvements.",
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
507,
|
| 1135 |
+
613,
|
| 1136 |
+
882,
|
| 1137 |
+
661
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 6
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "This suggests that while significant benefits of self-clarification are achieved in the first round, additional rounds still contribute to further improvements. One possible explanation is the nature of our dataset: approximately $92\\%$ of the questions are resolved within a single round of clarification. However, for the remaining cases, extended reasoning allows the model to refine its understanding, leading to measurable gains in performance with more clarification and reasoning.",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
507,
|
| 1146 |
+
662,
|
| 1147 |
+
882,
|
| 1148 |
+
822
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 6
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "7.2 Do Self-Clarifications and Pointback Help in Long-Context Understanding?",
|
| 1155 |
+
"text_level": 1,
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
507,
|
| 1158 |
+
835,
|
| 1159 |
+
880,
|
| 1160 |
+
866
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 6
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "Setup. To evaluate the impact of each component in our agentic workflow, we compare the full AgenticLU-8B model against two variants:",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
507,
|
| 1169 |
+
873,
|
| 1170 |
+
882,
|
| 1171 |
+
921
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 6
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "page_number",
|
| 1177 |
+
"text": "5531",
|
| 1178 |
+
"bbox": [
|
| 1179 |
+
480,
|
| 1180 |
+
927,
|
| 1181 |
+
517,
|
| 1182 |
+
940
|
| 1183 |
+
],
|
| 1184 |
+
"page_idx": 6
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"type": "table",
|
| 1188 |
+
"img_path": "images/b9b1644334d1097f8910c355e353a4f880c22e588f230faf05464f8fb6305e61.jpg",
|
| 1189 |
+
"table_caption": [
|
| 1190 |
+
"Table 4: We test the agentic workflow with AgenticLU-8B when taking out the self-clarification steps and the contextual grounding (pointback) step. The tasks are with 128K context length."
|
| 1191 |
+
],
|
| 1192 |
+
"table_footnote": [],
|
| 1193 |
+
"table_body": "<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr><tr><td>(w/o Clarification)</td><td>57.8</td><td>56.7</td><td>55.5</td><td>78.3</td><td>62.1</td></tr><tr><td>(w/o Pointback)</td><td>53.3</td><td>59.4</td><td>52.7</td><td>83.3</td><td>62.2</td></tr></table>",
|
| 1194 |
+
"bbox": [
|
| 1195 |
+
117,
|
| 1196 |
+
149,
|
| 1197 |
+
485,
|
| 1198 |
+
211
|
| 1199 |
+
],
|
| 1200 |
+
"page_idx": 7
|
| 1201 |
+
},
|
| 1202 |
+
{
|
| 1203 |
+
"type": "table",
|
| 1204 |
+
"img_path": "images/1c703048149245d2f57357e0b08d41f9d1718b76aed9db419e4d6cc68dcb9d04.jpg",
|
| 1205 |
+
"table_caption": [
|
| 1206 |
+
"Table 5: Performance Overhead Comparison between direct answering baseline and AgenticLU."
|
| 1207 |
+
],
|
| 1208 |
+
"table_footnote": [],
|
| 1209 |
+
"table_body": "<table><tr><td>Metric</td><td>Baseline</td><td>AgenticLU</td></tr><tr><td>Runtime Overhead</td><td>100%</td><td>101.93%</td></tr><tr><td>Avg Tokens Generated in One Round</td><td>76.28</td><td>1205.38</td></tr></table>",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
119,
|
| 1212 |
+
267,
|
| 1213 |
+
485,
|
| 1214 |
+
318
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 7
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "one without the self-clarification step and another without the contextual grounding (pointback) step. We use the four RAG datasets with 128K context length as the evaluation benchmark, and compare the performance alongside the original model.",
|
| 1221 |
+
"bbox": [
|
| 1222 |
+
112,
|
| 1223 |
+
344,
|
| 1224 |
+
487,
|
| 1225 |
+
426
|
| 1226 |
+
],
|
| 1227 |
+
"page_idx": 7
|
| 1228 |
+
},
|
| 1229 |
+
{
|
| 1230 |
+
"type": "text",
|
| 1231 |
+
"text": "Analysis. Table 4 shows the results on four QA benchmarks with a 128K context length. Removing self-clarification leads to an absolute performance drop of at least 10 points across most tasks (e.g., from $71.1\\%$ to $57.8\\%$ on HotpotQA), confirming that the model benefits from clarifying its own uncertainties when the context is long. Meanwhile, omitting pointback yields degenerate results, indicating that pinpointing relevant information at each stage is crucial for long-context QA. Overall, these findings highlight the importance of both clarifications and context-grounding to maximize retrieval accuracy and robustness in lengthy documents.",
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
112,
|
| 1234 |
+
441,
|
| 1235 |
+
489,
|
| 1236 |
+
650
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 7
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "text",
|
| 1242 |
+
"text": "7.3 How much additional compute cost does AgenticLU impose in generation?",
|
| 1243 |
+
"text_level": 1,
|
| 1244 |
+
"bbox": [
|
| 1245 |
+
112,
|
| 1246 |
+
669,
|
| 1247 |
+
478,
|
| 1248 |
+
701
|
| 1249 |
+
],
|
| 1250 |
+
"page_idx": 7
|
| 1251 |
+
},
|
| 1252 |
+
{
|
| 1253 |
+
"type": "text",
|
| 1254 |
+
"text": "Since additional generation steps are introduced in the QA process, we assess the overhead in inference time. Naively, long-context inference and multi-round conversations could significantly amplify compute costs. However, by leveraging prefix caching to store computed KV caches, the additional cost scales linearly with the number of newly generated tokens rather than exponentially.",
|
| 1255 |
+
"bbox": [
|
| 1256 |
+
112,
|
| 1257 |
+
709,
|
| 1258 |
+
489,
|
| 1259 |
+
839
|
| 1260 |
+
],
|
| 1261 |
+
"page_idx": 7
|
| 1262 |
+
},
|
| 1263 |
+
{
|
| 1264 |
+
"type": "text",
|
| 1265 |
+
"text": "To quantify this overhead, we conduct a runtime evaluation on 100 queries with a 128K context size. The results, summarized in table 5, demonstrate that the additional computational overhead remains minimal when using prefix caching.",
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
112,
|
| 1268 |
+
841,
|
| 1269 |
+
489,
|
| 1270 |
+
921
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 7
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "text",
|
| 1276 |
+
"text": "8 Conclusion",
|
| 1277 |
+
"text_level": 1,
|
| 1278 |
+
"bbox": [
|
| 1279 |
+
507,
|
| 1280 |
+
83,
|
| 1281 |
+
640,
|
| 1282 |
+
98
|
| 1283 |
+
],
|
| 1284 |
+
"page_idx": 7
|
| 1285 |
+
},
|
| 1286 |
+
{
|
| 1287 |
+
"type": "text",
|
| 1288 |
+
"text": "In this work, we introduce Agentic Long-Context Understanding (AgenticLU), a framework designed to enhance large language models' ability to process and reason over long-context inputs with self-generated data. By incorporating an agentic workflow (CoC) that dynamically refines model reasoning through self-clarifications and contextual grounding, AgenticLU significantly improves LLM's long context understanding capabilities.",
|
| 1289 |
+
"bbox": [
|
| 1290 |
+
505,
|
| 1291 |
+
108,
|
| 1292 |
+
884,
|
| 1293 |
+
253
|
| 1294 |
+
],
|
| 1295 |
+
"page_idx": 7
|
| 1296 |
+
},
|
| 1297 |
+
{
|
| 1298 |
+
"type": "text",
|
| 1299 |
+
"text": "Through a combination of trace data collection and two-stage post-training, our approach enables models to autonomously explore multiple reasoning paths, distill the most effective clarification strategies, and improve their understanding of lengthy documents. Extensive evaluations on long-context benchmarks demonstrate that AgenticLU outperforms existing prompting techniques and finetuned baselines, maintaining strong performance across context lengths up to 128K tokens. Additionally, ablation studies confirm that self-clarification and pointback mechanisms play a crucial role in improving retrieval and reasoning over long-contexts.",
|
| 1300 |
+
"bbox": [
|
| 1301 |
+
507,
|
| 1302 |
+
254,
|
| 1303 |
+
885,
|
| 1304 |
+
479
|
| 1305 |
+
],
|
| 1306 |
+
"page_idx": 7
|
| 1307 |
+
},
|
| 1308 |
+
{
|
| 1309 |
+
"type": "text",
|
| 1310 |
+
"text": "Limitations",
|
| 1311 |
+
"text_level": 1,
|
| 1312 |
+
"bbox": [
|
| 1313 |
+
509,
|
| 1314 |
+
489,
|
| 1315 |
+
613,
|
| 1316 |
+
505
|
| 1317 |
+
],
|
| 1318 |
+
"page_idx": 7
|
| 1319 |
+
},
|
| 1320 |
+
{
|
| 1321 |
+
"type": "text",
|
| 1322 |
+
"text": "Despite its effectiveness in long-context reasoning, AgenticLU has notable limitations. One key drawback is its inability to autonomously determine when to stop multi-round reasoning. While additional rounds of self-clarification can improve performance, the model follows a fixed number of reasoning steps rather than dynamically assessing when further refinement is necessary. This can lead to inefficiencies, where the model either stops too early, missing potential improvements, or continues reasoning unnecessarily, expending computational resources without significant gains.",
|
| 1323 |
+
"bbox": [
|
| 1324 |
+
505,
|
| 1325 |
+
514,
|
| 1326 |
+
882,
|
| 1327 |
+
708
|
| 1328 |
+
],
|
| 1329 |
+
"page_idx": 7
|
| 1330 |
+
},
|
| 1331 |
+
{
|
| 1332 |
+
"type": "text",
|
| 1333 |
+
"text": "Developing a fully agentic mechanism remains an open challenge. Ideally, the model should assess its confidence in an intermediate response and decide whether further clarification is needed. Future work should explore approaches that enable AgenticLU to regulate its reasoning depth dynamically, optimizing both efficiency and performance.",
|
| 1334 |
+
"bbox": [
|
| 1335 |
+
507,
|
| 1336 |
+
708,
|
| 1337 |
+
884,
|
| 1338 |
+
821
|
| 1339 |
+
],
|
| 1340 |
+
"page_idx": 7
|
| 1341 |
+
},
|
| 1342 |
+
{
|
| 1343 |
+
"type": "text",
|
| 1344 |
+
"text": "Acknowledgement",
|
| 1345 |
+
"text_level": 1,
|
| 1346 |
+
"bbox": [
|
| 1347 |
+
509,
|
| 1348 |
+
832,
|
| 1349 |
+
672,
|
| 1350 |
+
848
|
| 1351 |
+
],
|
| 1352 |
+
"page_idx": 7
|
| 1353 |
+
},
|
| 1354 |
+
{
|
| 1355 |
+
"type": "text",
|
| 1356 |
+
"text": "Our work is sponsored in part by NSF CAREER Award 2239440, NSF Proto-OKN Award 2333790, Sponsored Research Projects from companies like Cisco and eBay, as well as generous gifts from",
|
| 1357 |
+
"bbox": [
|
| 1358 |
+
507,
|
| 1359 |
+
857,
|
| 1360 |
+
882,
|
| 1361 |
+
921
|
| 1362 |
+
],
|
| 1363 |
+
"page_idx": 7
|
| 1364 |
+
},
|
| 1365 |
+
{
|
| 1366 |
+
"type": "page_number",
|
| 1367 |
+
"text": "5532",
|
| 1368 |
+
"bbox": [
|
| 1369 |
+
480,
|
| 1370 |
+
927,
|
| 1371 |
+
519,
|
| 1372 |
+
940
|
| 1373 |
+
],
|
| 1374 |
+
"page_idx": 7
|
| 1375 |
+
},
|
| 1376 |
+
{
|
| 1377 |
+
"type": "text",
|
| 1378 |
+
"text": "Google, Adobe, and Teradata. Any opinions, findings, and conclusions or recommendations expressed herein are those of the authors and should not be interpreted as necessarily representing the views, either expressed or implied, of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright annotation hereon.",
|
| 1379 |
+
"bbox": [
|
| 1380 |
+
112,
|
| 1381 |
+
84,
|
| 1382 |
+
492,
|
| 1383 |
+
229
|
| 1384 |
+
],
|
| 1385 |
+
"page_idx": 8
|
| 1386 |
+
},
|
| 1387 |
+
{
|
| 1388 |
+
"type": "text",
|
| 1389 |
+
"text": "References",
|
| 1390 |
+
"text_level": 1,
|
| 1391 |
+
"bbox": [
|
| 1392 |
+
115,
|
| 1393 |
+
254,
|
| 1394 |
+
213,
|
| 1395 |
+
269
|
| 1396 |
+
],
|
| 1397 |
+
"page_idx": 8
|
| 1398 |
+
},
|
| 1399 |
+
{
|
| 1400 |
+
"type": "list",
|
| 1401 |
+
"sub_type": "ref_text",
|
| 1402 |
+
"list_items": [
|
| 1403 |
+
"Aida Amini, Saadia Gabriel, Peter Lin, Rik Koncel-Kedziorski, Yejin Choi, and Hannaneh Hajishirzi. 2019. Mathqa: Towards interpretable math word problem solving with operation-based formalisms. Preprint, arXiv:1905.13319.",
|
| 1404 |
+
"Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. ArXiv, abs/1803.05457.",
|
| 1405 |
+
"Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. Preprint, arXiv:2110.14168.",
|
| 1406 |
+
"Tri Dao. 2023. Flashattention-2: Faster attention with better parallelism and work partitioning. arXiv preprint arXiv:2307.08691.",
|
| 1407 |
+
"DeepSeek-AI. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. Preprint, arXiv:2501.12948.",
|
| 1408 |
+
"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.",
|
| 1409 |
+
"Tianyu Gao, Alexander Wettig, Howard Yen, and Danqi Chen. 2024. How to train long-context language models (effectively). arXiv preprint arXiv:2410.02660.",
|
| 1410 |
+
"Dan Hendrycks, Collin Burns, Steven Basart, Andrew Critch, Jerry Li, Dawn Song, and Jacob Steinhardt. 2021a. Aligning ai with shared human values. Proceedings of the International Conference on Learning Representations (ICLR).",
|
| 1411 |
+
"Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021b. Measuring massive multitask language understanding. Proceedings of the International Conference on Learning Representations (ICLR).",
|
| 1412 |
+
"Jian Hu, Xibin Wu, Weixun Wang, Dehao Zhang, Yu Cao, et al. 2024. Openrlhf: An easy-to-use, scalable and high-performance rlhf framework. arXiv preprint arXiv:2405.11143."
|
| 1413 |
+
],
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
115,
|
| 1416 |
+
275,
|
| 1417 |
+
489,
|
| 1418 |
+
920
|
| 1419 |
+
],
|
| 1420 |
+
"page_idx": 8
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"type": "list",
|
| 1424 |
+
"sub_type": "ref_text",
|
| 1425 |
+
"list_items": [
|
| 1426 |
+
"Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, Canada. Association for Computational Linguistics.",
|
| 1427 |
+
"Tomáš Kočisky, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, Gábor Melis, and Edward Grefenstette. 2018. The NarrativeQA reading comprehension challenge. Transactions of the Association for Computational Linguistics, 6:317-328.",
|
| 1428 |
+
"Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35:22199-22213.",
|
| 1429 |
+
"Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. 2019. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453-466.",
|
| 1430 |
+
"Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles.",
|
| 1431 |
+
"Jiaqi Li, Mengmeng Wang, Zilong Zheng, and Muhan Zhang. 2023. Loogle: Can long-context language models understand long contexts? arXiv preprint arXiv:2311.04939.",
|
| 1432 |
+
"Siheng Li, Cheng Yang, Zesen Cheng, Lemao Liu, Mo Yu, Yujiu Yang, and Wai Lam. 2024. Large language models can self-improve in long-context reasoning. arXiv preprint arXiv:2411.08147.",
|
| 1433 |
+
"Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.",
|
| 1434 |
+
"Hao Liu, Matei Zaharia, and Pieter Abbeel. 2023. Ring attention with blockwise transformers for near-infinite context. arXiv preprint arXiv:2310.01889.",
|
| 1435 |
+
"Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157-173.",
|
| 1436 |
+
"Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Hannaneh Hajishirzi, and Daniel Khashabi. 2022. When not to trust language models: Investigating effectiveness and limitations of parametric and non-parametric memories. arXiv preprint."
|
| 1437 |
+
],
|
| 1438 |
+
"bbox": [
|
| 1439 |
+
510,
|
| 1440 |
+
85,
|
| 1441 |
+
884,
|
| 1442 |
+
920
|
| 1443 |
+
],
|
| 1444 |
+
"page_idx": 8
|
| 1445 |
+
},
|
| 1446 |
+
{
|
| 1447 |
+
"type": "page_number",
|
| 1448 |
+
"text": "5533",
|
| 1449 |
+
"bbox": [
|
| 1450 |
+
480,
|
| 1451 |
+
928,
|
| 1452 |
+
519,
|
| 1453 |
+
940
|
| 1454 |
+
],
|
| 1455 |
+
"page_idx": 8
|
| 1456 |
+
},
|
| 1457 |
+
{
|
| 1458 |
+
"type": "list",
|
| 1459 |
+
"sub_type": "ref_text",
|
| 1460 |
+
"list_items": [
|
| 1461 |
+
"OpenAI. 2023. GPT-4 technical report. Preprint, arXiv:2303.08774.",
|
| 1462 |
+
"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.",
|
| 1463 |
+
"Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 3505-3506.",
|
| 1464 |
+
"Machel Reid, Nikolay Savinov, Denis Teplyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530.",
|
| 1465 |
+
"Jingbo Shang, Zai Zheng, Jiale Wei, Xiang Ying, Felix Tao, and Mindverse Team. 2024. Ai-native memory: A pathway from llms towards agi. arXiv preprint arXiv:2406.18312.",
|
| 1466 |
+
"Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.",
|
| 1467 |
+
"Lei Wang, Wanyu Xu, Yihuai Lan, Zhiqiang Hu, Yunshi Lan, Roy Ka-Wei Lee, and Ee-Peng Lim. 2023. Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models. arXiv preprint arXiv:2305.04091.",
|
| 1468 |
+
"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. Preprint, arXiv:2406.01574.",
|
| 1469 |
+
"Zihan Wang, Yunxuan Li, Yuexin Wu, Liangchen Luo, Le Hou, Hongkun Yu, and Jingbo Shang. 2024b. Multi-step problem solving through a verifier: An empirical analysis on model-induced process supervision. arXiv preprint arXiv:2402.02658.",
|
| 1470 |
+
"Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2369-2380, Brussels, Belgium. Association for Computational Linguistics.",
|
| 1471 |
+
"Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2022."
|
| 1472 |
+
],
|
| 1473 |
+
"bbox": [
|
| 1474 |
+
115,
|
| 1475 |
+
85,
|
| 1476 |
+
489,
|
| 1477 |
+
919
|
| 1478 |
+
],
|
| 1479 |
+
"page_idx": 9
|
| 1480 |
+
},
|
| 1481 |
+
{
|
| 1482 |
+
"type": "list",
|
| 1483 |
+
"sub_type": "ref_text",
|
| 1484 |
+
"list_items": [
|
| 1485 |
+
"React: Synergizing reasoning and acting in language models. arXiv preprint arXiv:2210.03629.",
|
| 1486 |
+
"Howard Yen, Tianyu Gao, Minmin Hou, Ke Ding, Daniel Fleischer, Peter Izsak, Moshe Wasserblat, and Danqi Chen. 2024. Helmet: How to evaluate long-context language models effectively and thoroughly. arXiv preprint arXiv:2410.02694.",
|
| 1487 |
+
"Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah Goodman. 2022. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476-15488.",
|
| 1488 |
+
"Xinrong Zhang, Yingfa Chen, Shengding Hu, Zihang Xu, Junhao Chen, Moo Hao, Xu Han, Zhen Thai, Shuo Wang, Zhiyuan Liu, and Maosong Sun. 2024a. $\\infty$ Bench: Extending long context evaluation beyond 100K tokens. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15262-15277, Bangkok, Thailand. Association for Computational Linguistics.",
|
| 1489 |
+
"Yusen Zhang, Ruoxi Sun, Yanfei Chen, Tomas Pfister, Rui Zhang, and Sercan Ö Arik. 2024b. Chain of agents: Large language models collaborating on long-context tasks. arXiv preprint arXiv:2406.02818.",
|
| 1490 |
+
"Qingfei Zhao, Ruobing Wang, Yukuo Cen, Daren Zha, Shicheng Tan, Yuxiao Dong, and Jie Tang. 2024a. LongRAG: A dual-perspective retrieval-augmented generation paradigm for long-context question answering. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 22600-22632, Miami, Florida, USA. Association for Computational Linguistics.",
|
| 1491 |
+
"Xiaowei Zhao, Yong Zhou, and Xiujuan Xu. 2024b. Dual encoder: Exploiting the potential of syntactic and semantic for aspect sentiment triplet extraction. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 5401-5413, Torino, Italia. ELRA and ICCL.",
|
| 1492 |
+
"Xinran Zhao, Hongming Zhang, Xiaoman Pan, Wenlin Yao, Dong Yu, Tongshuang Wu, and Jianshu Chen. 2024c. Fact-and-reflection (FaR) improves confidence calibration of large language models. In Findings of the Association for Computational Linguistics: ACL 2024, pages 8702-8718, Bangkok, Thailand. Association for Computational Linguistics."
|
| 1493 |
+
],
|
| 1494 |
+
"bbox": [
|
| 1495 |
+
510,
|
| 1496 |
+
85,
|
| 1497 |
+
884,
|
| 1498 |
+
756
|
| 1499 |
+
],
|
| 1500 |
+
"page_idx": 9
|
| 1501 |
+
},
|
| 1502 |
+
{
|
| 1503 |
+
"type": "text",
|
| 1504 |
+
"text": "A Training Configurations",
|
| 1505 |
+
"text_level": 1,
|
| 1506 |
+
"bbox": [
|
| 1507 |
+
510,
|
| 1508 |
+
766,
|
| 1509 |
+
756,
|
| 1510 |
+
783
|
| 1511 |
+
],
|
| 1512 |
+
"page_idx": 9
|
| 1513 |
+
},
|
| 1514 |
+
{
|
| 1515 |
+
"type": "text",
|
| 1516 |
+
"text": "We employed the DeepSpeed (Rasley et al., 2020) framework for distributed training across four GPU nodes, each equipped with four AMD MI250 GPUs. We used vLLM (Kwon et al., 2023) for inference. Our implementation builds upon OpenRLHF (Hu et al., 2024) for both SFT and DPO. Given the input sequence length of up to 128K tokens, we leveraged FlashAttention-2 (Dao, 2023) alongside Ring",
|
| 1517 |
+
"bbox": [
|
| 1518 |
+
509,
|
| 1519 |
+
791,
|
| 1520 |
+
884,
|
| 1521 |
+
921
|
| 1522 |
+
],
|
| 1523 |
+
"page_idx": 9
|
| 1524 |
+
},
|
| 1525 |
+
{
|
| 1526 |
+
"type": "page_number",
|
| 1527 |
+
"text": "5534",
|
| 1528 |
+
"bbox": [
|
| 1529 |
+
480,
|
| 1530 |
+
928,
|
| 1531 |
+
519,
|
| 1532 |
+
940
|
| 1533 |
+
],
|
| 1534 |
+
"page_idx": 9
|
| 1535 |
+
},
|
| 1536 |
+
{
|
| 1537 |
+
"type": "text",
|
| 1538 |
+
"text": "Attention (Liu et al., 2023) to efficiently process extremely long sequences. The detailed hyperparameters for SFT and DPO are provided in table 6 and table 7.",
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
112,
|
| 1541 |
+
84,
|
| 1542 |
+
489,
|
| 1543 |
+
148
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 10
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "table",
|
| 1549 |
+
"img_path": "images/969e7b407ef4bbc753154ce53322dcb51203f08d8b9f58a6dc3fe58bf7e95036.jpg",
|
| 1550 |
+
"table_caption": [
|
| 1551 |
+
"Table 6: Hyperparameters for SFT."
|
| 1552 |
+
],
|
| 1553 |
+
"table_footnote": [],
|
| 1554 |
+
"table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Learning Rate</td><td>5e-7</td></tr><tr><td>Learning Rate Schedule</td><td>Cosine Annealing</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>β1</td><td>0.9</td></tr><tr><td>β2</td><td>0.95</td></tr><tr><td>Training dtype</td><td>bf16</td></tr><tr><td>Batch Size</td><td>128</td></tr><tr><td>Max Length</td><td>131,072</td></tr></table>",
|
| 1555 |
+
"bbox": [
|
| 1556 |
+
149,
|
| 1557 |
+
187,
|
| 1558 |
+
448,
|
| 1559 |
+
312
|
| 1560 |
+
],
|
| 1561 |
+
"page_idx": 10
|
| 1562 |
+
},
|
| 1563 |
+
{
|
| 1564 |
+
"type": "table",
|
| 1565 |
+
"img_path": "images/d446f774dbce8d22ca005c0b238452e268608347198462ce805789134bd236d1.jpg",
|
| 1566 |
+
"table_caption": [
|
| 1567 |
+
"Table 7: Hyperparameters for DPO."
|
| 1568 |
+
],
|
| 1569 |
+
"table_footnote": [],
|
| 1570 |
+
"table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Learning Rate</td><td>5e-7</td></tr><tr><td>Learning Rate Schedule</td><td>Cosine Annealing</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>β1</td><td>0.9</td></tr><tr><td>β2</td><td>0.95</td></tr><tr><td>Training dtype</td><td>bf16</td></tr><tr><td>Batch Size</td><td>128</td></tr><tr><td>β</td><td>0.1</td></tr><tr><td>Max Length</td><td>131,072</td></tr></table>",
|
| 1571 |
+
"bbox": [
|
| 1572 |
+
149,
|
| 1573 |
+
372,
|
| 1574 |
+
448,
|
| 1575 |
+
508
|
| 1576 |
+
],
|
| 1577 |
+
"page_idx": 10
|
| 1578 |
+
},
|
| 1579 |
+
{
|
| 1580 |
+
"type": "text",
|
| 1581 |
+
"text": "B Short Context Performance",
|
| 1582 |
+
"text_level": 1,
|
| 1583 |
+
"bbox": [
|
| 1584 |
+
114,
|
| 1585 |
+
548,
|
| 1586 |
+
389,
|
| 1587 |
+
565
|
| 1588 |
+
],
|
| 1589 |
+
"page_idx": 10
|
| 1590 |
+
},
|
| 1591 |
+
{
|
| 1592 |
+
"type": "text",
|
| 1593 |
+
"text": "As shown in table 8, we evaluate the short-context performance across six tasks: ARC Easy, ARC Challenge, GSM8K, MathQA, MMLU, and MMLU Pro. AgenticLU performs on par with the base model Llama3.1-8B-Instruct on short-context benchmarks, demonstrating that AgenticLU preserves the original short-context ability while greatly enhancing long-context performance.",
|
| 1594 |
+
"bbox": [
|
| 1595 |
+
112,
|
| 1596 |
+
579,
|
| 1597 |
+
489,
|
| 1598 |
+
708
|
| 1599 |
+
],
|
| 1600 |
+
"page_idx": 10
|
| 1601 |
+
},
|
| 1602 |
+
{
|
| 1603 |
+
"type": "text",
|
| 1604 |
+
"text": "C Agentic Workflow without Training",
|
| 1605 |
+
"text_level": 1,
|
| 1606 |
+
"bbox": [
|
| 1607 |
+
112,
|
| 1608 |
+
727,
|
| 1609 |
+
460,
|
| 1610 |
+
745
|
| 1611 |
+
],
|
| 1612 |
+
"page_idx": 10
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"type": "text",
|
| 1616 |
+
"text": "We conducted an additional experiment for prompting only with our agentic workflow, and we find that with an option to generate clarifications the model does get better on multi-hop QA questions (HotPotQA), but it is generally difficult for the base model to point to the correct paragraphs directly without any training, hence often resulting in same or slightly worse performance.",
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
112,
|
| 1619 |
+
758,
|
| 1620 |
+
487,
|
| 1621 |
+
885
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 10
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "text",
|
| 1627 |
+
"text": "Results are listed in table 9, the context length is 128K tokens.",
|
| 1628 |
+
"bbox": [
|
| 1629 |
+
112,
|
| 1630 |
+
889,
|
| 1631 |
+
485,
|
| 1632 |
+
919
|
| 1633 |
+
],
|
| 1634 |
+
"page_idx": 10
|
| 1635 |
+
},
|
| 1636 |
+
{
|
| 1637 |
+
"type": "text",
|
| 1638 |
+
"text": "D Detailed Results on Seven Benchmark Tasks",
|
| 1639 |
+
"text_level": 1,
|
| 1640 |
+
"bbox": [
|
| 1641 |
+
507,
|
| 1642 |
+
83,
|
| 1643 |
+
875,
|
| 1644 |
+
115
|
| 1645 |
+
],
|
| 1646 |
+
"page_idx": 10
|
| 1647 |
+
},
|
| 1648 |
+
{
|
| 1649 |
+
"type": "text",
|
| 1650 |
+
"text": "As shown in table 10, table 11, table 12, table 13, table 14, table 15 and table 16, we evaluate the long-context performance across seven tasks: HotpotQA, Natural Questions, TriviaQA, PopQA, NarrativeQA, InfiniteBench QA and InfiniteBench Multiple-Choice. AgenticLU provides significant improvement for all tasks, especially for those that require multi-hop reasoning such as HotPotQA.",
|
| 1651 |
+
"bbox": [
|
| 1652 |
+
507,
|
| 1653 |
+
124,
|
| 1654 |
+
884,
|
| 1655 |
+
255
|
| 1656 |
+
],
|
| 1657 |
+
"page_idx": 10
|
| 1658 |
+
},
|
| 1659 |
+
{
|
| 1660 |
+
"type": "text",
|
| 1661 |
+
"text": "E Chain-of-Clarifications Workflow",
|
| 1662 |
+
"text_level": 1,
|
| 1663 |
+
"bbox": [
|
| 1664 |
+
507,
|
| 1665 |
+
266,
|
| 1666 |
+
835,
|
| 1667 |
+
282
|
| 1668 |
+
],
|
| 1669 |
+
"page_idx": 10
|
| 1670 |
+
},
|
| 1671 |
+
{
|
| 1672 |
+
"type": "text",
|
| 1673 |
+
"text": "The input was first processed into chunks and grouped with paragraph tags. We list the example prompts used in AgenticLU workflow below. In training, we sampled 100 variations of the same prompt text and use them randomly to avoid training collapse.",
|
| 1674 |
+
"bbox": [
|
| 1675 |
+
507,
|
| 1676 |
+
292,
|
| 1677 |
+
884,
|
| 1678 |
+
388
|
| 1679 |
+
],
|
| 1680 |
+
"page_idx": 10
|
| 1681 |
+
},
|
| 1682 |
+
{
|
| 1683 |
+
"type": "text",
|
| 1684 |
+
"text": "Chain-of-Clarifications Workflow Prompts",
|
| 1685 |
+
"text_level": 1,
|
| 1686 |
+
"bbox": [
|
| 1687 |
+
536,
|
| 1688 |
+
398,
|
| 1689 |
+
853,
|
| 1690 |
+
414
|
| 1691 |
+
],
|
| 1692 |
+
"page_idx": 10
|
| 1693 |
+
},
|
| 1694 |
+
{
|
| 1695 |
+
"type": "text",
|
| 1696 |
+
"text": "[System Prompt]",
|
| 1697 |
+
"text_level": 1,
|
| 1698 |
+
"bbox": [
|
| 1699 |
+
537,
|
| 1700 |
+
425,
|
| 1701 |
+
653,
|
| 1702 |
+
437
|
| 1703 |
+
],
|
| 1704 |
+
"page_idx": 10
|
| 1705 |
+
},
|
| 1706 |
+
{
|
| 1707 |
+
"type": "text",
|
| 1708 |
+
"text": "You are an AI assistant specialized in long context reasoning. Analyze information thoroughly while maintaining clarity and focus. Track the full context of conversations, building connections between concepts and flagging when context review is needed. Break down complex problems into components, showing your reasoning steps and stating key assumptions. Structure your responses with clear headers and periodic summaries. Present evidence for your conclusions, acknowledge uncertainties, and request clarification when needed. Keep your analysis organized, explicit, and focused on addressing the core question.",
|
| 1709 |
+
"bbox": [
|
| 1710 |
+
536,
|
| 1711 |
+
438,
|
| 1712 |
+
855,
|
| 1713 |
+
626
|
| 1714 |
+
],
|
| 1715 |
+
"page_idx": 10
|
| 1716 |
+
},
|
| 1717 |
+
{
|
| 1718 |
+
"type": "text",
|
| 1719 |
+
"text": "[Long-Context Input]",
|
| 1720 |
+
"text_level": 1,
|
| 1721 |
+
"bbox": [
|
| 1722 |
+
537,
|
| 1723 |
+
627,
|
| 1724 |
+
690,
|
| 1725 |
+
639
|
| 1726 |
+
],
|
| 1727 |
+
"page_idx": 10
|
| 1728 |
+
},
|
| 1729 |
+
{
|
| 1730 |
+
"type": "text",
|
| 1731 |
+
"text": "<para 1> [chunk 1] </para 1> <para 2> [chunk 2] </para 2> ... {Question}",
|
| 1732 |
+
"bbox": [
|
| 1733 |
+
536,
|
| 1734 |
+
640,
|
| 1735 |
+
853,
|
| 1736 |
+
663
|
| 1737 |
+
],
|
| 1738 |
+
"page_idx": 10
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"type": "text",
|
| 1742 |
+
"text": "[Self Clarification - Raise Question]",
|
| 1743 |
+
"text_level": 1,
|
| 1744 |
+
"bbox": [
|
| 1745 |
+
537,
|
| 1746 |
+
664,
|
| 1747 |
+
818,
|
| 1748 |
+
674
|
| 1749 |
+
],
|
| 1750 |
+
"page_idx": 10
|
| 1751 |
+
},
|
| 1752 |
+
{
|
| 1753 |
+
"type": "text",
|
| 1754 |
+
"text": "In order to answer this question, ask one question about what you want to know in order to better answer it.",
|
| 1755 |
+
"bbox": [
|
| 1756 |
+
536,
|
| 1757 |
+
676,
|
| 1758 |
+
853,
|
| 1759 |
+
709
|
| 1760 |
+
],
|
| 1761 |
+
"page_idx": 10
|
| 1762 |
+
},
|
| 1763 |
+
{
|
| 1764 |
+
"type": "text",
|
| 1765 |
+
"text": "[Contextual Grounding - Pointback]",
|
| 1766 |
+
"text_level": 1,
|
| 1767 |
+
"bbox": [
|
| 1768 |
+
537,
|
| 1769 |
+
711,
|
| 1770 |
+
794,
|
| 1771 |
+
722
|
| 1772 |
+
],
|
| 1773 |
+
"page_idx": 10
|
| 1774 |
+
},
|
| 1775 |
+
{
|
| 1776 |
+
"type": "text",
|
| 1777 |
+
"text": "Help me find relevant context to answer the previous clarifying question.",
|
| 1778 |
+
"bbox": [
|
| 1779 |
+
536,
|
| 1780 |
+
722,
|
| 1781 |
+
853,
|
| 1782 |
+
745
|
| 1783 |
+
],
|
| 1784 |
+
"page_idx": 10
|
| 1785 |
+
},
|
| 1786 |
+
{
|
| 1787 |
+
"type": "text",
|
| 1788 |
+
"text": "[Self Clarification - Answer Question]",
|
| 1789 |
+
"text_level": 1,
|
| 1790 |
+
"bbox": [
|
| 1791 |
+
537,
|
| 1792 |
+
746,
|
| 1793 |
+
825,
|
| 1794 |
+
757
|
| 1795 |
+
],
|
| 1796 |
+
"page_idx": 10
|
| 1797 |
+
},
|
| 1798 |
+
{
|
| 1799 |
+
"type": "text",
|
| 1800 |
+
"text": "Based on the relevant context, answer the previous clarifying question.",
|
| 1801 |
+
"bbox": [
|
| 1802 |
+
536,
|
| 1803 |
+
758,
|
| 1804 |
+
853,
|
| 1805 |
+
781
|
| 1806 |
+
],
|
| 1807 |
+
"page_idx": 10
|
| 1808 |
+
},
|
| 1809 |
+
{
|
| 1810 |
+
"type": "text",
|
| 1811 |
+
"text": "[Answer the Original Question]",
|
| 1812 |
+
"text_level": 1,
|
| 1813 |
+
"bbox": [
|
| 1814 |
+
537,
|
| 1815 |
+
782,
|
| 1816 |
+
764,
|
| 1817 |
+
793
|
| 1818 |
+
],
|
| 1819 |
+
"page_idx": 10
|
| 1820 |
+
},
|
| 1821 |
+
{
|
| 1822 |
+
"type": "text",
|
| 1823 |
+
"text": "Now, let's answer the final question. Be concise in your answer.",
|
| 1824 |
+
"bbox": [
|
| 1825 |
+
536,
|
| 1826 |
+
794,
|
| 1827 |
+
853,
|
| 1828 |
+
816
|
| 1829 |
+
],
|
| 1830 |
+
"page_idx": 10
|
| 1831 |
+
},
|
| 1832 |
+
{
|
| 1833 |
+
"type": "page_number",
|
| 1834 |
+
"text": "5535",
|
| 1835 |
+
"bbox": [
|
| 1836 |
+
480,
|
| 1837 |
+
928,
|
| 1838 |
+
519,
|
| 1839 |
+
940
|
| 1840 |
+
],
|
| 1841 |
+
"page_idx": 10
|
| 1842 |
+
},
|
| 1843 |
+
{
|
| 1844 |
+
"type": "table",
|
| 1845 |
+
"img_path": "images/64baeed40cad5a30158fa0a3c3241544f97151d6d023a131bf38ff47d0684b29.jpg",
|
| 1846 |
+
"table_caption": [
|
| 1847 |
+
"Table 8: Performance comparison of AgenticLU and Llama3.1-8B-Instruct on short-context benchmarks. Scores represent accuracy percentages, with AgenticLU demonstrating matching results across tasks."
|
| 1848 |
+
],
|
| 1849 |
+
"table_footnote": [],
|
| 1850 |
+
"table_body": "<table><tr><td>Model</td><td>ARC Easy</td><td>ARC Challenge</td><td>GSM8k</td><td>MathQA</td><td>MMLU</td><td>MMLU Pro</td><td>Avg</td></tr><tr><td>Llama3.1-8B</td><td>84.80</td><td>59.64</td><td>80.13</td><td>42.88</td><td>68.72</td><td>37.71</td><td>62.31</td></tr><tr><td>AgenticLU-8B</td><td>83.96</td><td>58.36</td><td>80.51</td><td>41.74</td><td>68.38</td><td>37.51</td><td>61.74</td></tr></table>",
|
| 1851 |
+
"bbox": [
|
| 1852 |
+
119,
|
| 1853 |
+
122,
|
| 1854 |
+
877,
|
| 1855 |
+
185
|
| 1856 |
+
],
|
| 1857 |
+
"page_idx": 11
|
| 1858 |
+
},
|
| 1859 |
+
{
|
| 1860 |
+
"type": "table",
|
| 1861 |
+
"img_path": "images/e94f23135753fceb64f112e9db68d2c33a50cfd8a959d303704c347e718017cc.jpg",
|
| 1862 |
+
"table_caption": [
|
| 1863 |
+
"Table 9: Performance comparison across different QA benchmarks with 128K token context length, with or without training."
|
| 1864 |
+
],
|
| 1865 |
+
"table_footnote": [],
|
| 1866 |
+
"table_body": "<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>Llama-3.1-8B + Prompting Only</td><td>53.3</td><td>56.7</td><td>51.6</td><td>72.8</td><td>58.6</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr></table>",
|
| 1867 |
+
"bbox": [
|
| 1868 |
+
152,
|
| 1869 |
+
235,
|
| 1870 |
+
843,
|
| 1871 |
+
318
|
| 1872 |
+
],
|
| 1873 |
+
"page_idx": 11
|
| 1874 |
+
},
|
| 1875 |
+
{
|
| 1876 |
+
"type": "table",
|
| 1877 |
+
"img_path": "images/826dd1c6804ea6ace4f5d215b071a023abbebad5daf8ac148b47c61a9c5188e9.jpg",
|
| 1878 |
+
"table_caption": [],
|
| 1879 |
+
"table_footnote": [],
|
| 1880 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">HotpotQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>63.3</td><td>56.7</td><td>61.1</td><td>47.8</td><td>40.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>60.0</td><td>66.7</td><td>56.7</td><td>58.9</td><td>56.7</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>71.1</td><td>66.7</td><td>72.2</td><td>62.2</td><td>50.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>58.9</td><td>58.9</td><td>62.2</td><td>61.1</td><td>48.9</td></tr><tr><td>ProLong-8B</td><td>62.2</td><td>65.6</td><td>57.8</td><td>53.3</td><td>58.9</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>61.1</td><td>58.9</td><td>73.3</td><td>56.7</td><td>57.8</td></tr><tr><td>AgenticLU-8B</td><td>81.1</td><td>75.6</td><td>78.9</td><td>75.6</td><td>71.1</td></tr></table>",
|
| 1881 |
+
"bbox": [
|
| 1882 |
+
119,
|
| 1883 |
+
341,
|
| 1884 |
+
485,
|
| 1885 |
+
447
|
| 1886 |
+
],
|
| 1887 |
+
"page_idx": 11
|
| 1888 |
+
},
|
| 1889 |
+
{
|
| 1890 |
+
"type": "table",
|
| 1891 |
+
"img_path": "images/02eedcda47071b355175c285440fced68e4ce82352bdfd0dbb6243e2a4bff0cf.jpg",
|
| 1892 |
+
"table_caption": [
|
| 1893 |
+
"Table 10: Long-context performance on HotpotQA."
|
| 1894 |
+
],
|
| 1895 |
+
"table_footnote": [],
|
| 1896 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">Nature Questions</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>71.7</td><td>69.4</td><td>70.6</td><td>73.9</td><td>56.1</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>66.7</td><td>66.1</td><td>58.9</td><td>55.6</td><td>38.9</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>67.8</td><td>71.7</td><td>66.7</td><td>62.2</td><td>50.6</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>63.3</td><td>63.3</td><td>61.7</td><td>59.4</td><td>40.0</td></tr><tr><td>ProLong-8B</td><td>83.3</td><td>82.2</td><td>83.9</td><td>90.0</td><td>77.8</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>65.6</td><td>76.1</td><td>79.4</td><td>77.2</td><td>73.9</td></tr><tr><td>AgenticLU-8B</td><td>91.7</td><td>91.1</td><td>85.0</td><td>85.0</td><td>77.8</td></tr></table>",
|
| 1897 |
+
"bbox": [
|
| 1898 |
+
119,
|
| 1899 |
+
482,
|
| 1900 |
+
485,
|
| 1901 |
+
590
|
| 1902 |
+
],
|
| 1903 |
+
"page_idx": 11
|
| 1904 |
+
},
|
| 1905 |
+
{
|
| 1906 |
+
"type": "table",
|
| 1907 |
+
"img_path": "images/e708cfd1f59eeba02b61b9e73f010f0665a0d1288ba11ae90ab7386b7f4d66d1.jpg",
|
| 1908 |
+
"table_caption": [
|
| 1909 |
+
"Table 11: Long-context performance on Nature Questions."
|
| 1910 |
+
],
|
| 1911 |
+
"table_footnote": [],
|
| 1912 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">TriviaQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>82.8</td><td>86.7</td><td>85.6</td><td>81.1</td><td>80.6</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>84.4</td><td>86.1</td><td>90.0</td><td>82.2</td><td>57.2</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>78.9</td><td>88.3</td><td>89.4</td><td>87.2</td><td>86.7</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>87.8</td><td>83.9</td><td>84.4</td><td>86.7</td><td>84.4</td></tr><tr><td>ProLong-8B</td><td>71.1</td><td>88.3</td><td>78.9</td><td>82.8</td><td>78.3</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>77.2</td><td>79.4</td><td>83.9</td><td>83.9</td><td>83.3</td></tr><tr><td>AgenticLU-8B</td><td>88.3</td><td>92.2</td><td>91.1</td><td>93.3</td><td>88.3</td></tr></table>",
|
| 1913 |
+
"bbox": [
|
| 1914 |
+
119,
|
| 1915 |
+
640,
|
| 1916 |
+
485,
|
| 1917 |
+
747
|
| 1918 |
+
],
|
| 1919 |
+
"page_idx": 11
|
| 1920 |
+
},
|
| 1921 |
+
{
|
| 1922 |
+
"type": "table",
|
| 1923 |
+
"img_path": "images/6cb8f62197721a22738fe267a9213c64d02d9b610067e0b8919811c37fc161f6.jpg",
|
| 1924 |
+
"table_caption": [
|
| 1925 |
+
"Table 12: Long-context performance on TriviaQA."
|
| 1926 |
+
],
|
| 1927 |
+
"table_footnote": [],
|
| 1928 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">8K</td><td rowspan=\"2\">16K</td><td colspan=\"3\">PopQA</td></tr><tr><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>61.1</td><td>62.8</td><td>57.2</td><td>58.3</td><td>56.1</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>61.7</td><td>58.9</td><td>55.0</td><td>58.9</td><td>60.6</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>62.2</td><td>63.3</td><td>58.9</td><td>55.0</td><td>61.1</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>65.0</td><td>64.4</td><td>58.9</td><td>53.3</td><td>65.0</td></tr><tr><td>ProLong-8B</td><td>67.8</td><td>68.3</td><td>70.0</td><td>64.4</td><td>65.6</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>47.8</td><td>54.4</td><td>54.4</td><td>57.2</td><td>50.6</td></tr><tr><td>AgenticLU-8B</td><td>82.2</td><td>82.2</td><td>78.3</td><td>76.7</td><td>65.6</td></tr></table>",
|
| 1929 |
+
"bbox": [
|
| 1930 |
+
119,
|
| 1931 |
+
782,
|
| 1932 |
+
485,
|
| 1933 |
+
890
|
| 1934 |
+
],
|
| 1935 |
+
"page_idx": 11
|
| 1936 |
+
},
|
| 1937 |
+
{
|
| 1938 |
+
"type": "table",
|
| 1939 |
+
"img_path": "images/6324468bf04b5a8048e27f8e09c80d8cff428034ee804bbe80bb708b42f3a922.jpg",
|
| 1940 |
+
"table_caption": [],
|
| 1941 |
+
"table_footnote": [],
|
| 1942 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">NarrativeQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>15.0</td><td>19.0</td><td>27.0</td><td>35.0</td><td>38.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>23.0</td><td>30.0</td><td>36.0</td><td>51.0</td><td>43.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>22.0</td><td>25.0</td><td>38.0</td><td>41.0</td><td>39.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>18.0</td><td>35.0</td><td>37.0</td><td>42.0</td><td>46.0</td></tr><tr><td>ProLong-8B</td><td>18.0</td><td>27.0</td><td>28.0</td><td>38.0</td><td>42.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>23.3</td><td>23.3</td><td>50.0</td><td>50.0</td><td>46.7</td></tr><tr><td>AgenticLU-8B</td><td>27.0</td><td>35.0</td><td>41.0</td><td>49.0</td><td>56.0</td></tr></table>",
|
| 1943 |
+
"bbox": [
|
| 1944 |
+
514,
|
| 1945 |
+
363,
|
| 1946 |
+
880,
|
| 1947 |
+
470
|
| 1948 |
+
],
|
| 1949 |
+
"page_idx": 11
|
| 1950 |
+
},
|
| 1951 |
+
{
|
| 1952 |
+
"type": "table",
|
| 1953 |
+
"img_path": "images/b7c2d1b1b16ea26d7bac16436191e2d25c6df3fd7c66caf93dfdbe92d32a31ab.jpg",
|
| 1954 |
+
"table_caption": [
|
| 1955 |
+
"Table 14: Long-context performance on NarrativeQA."
|
| 1956 |
+
],
|
| 1957 |
+
"table_footnote": [],
|
| 1958 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">InfbenchQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>17.0</td><td>31.0</td><td>36.0</td><td>40.0</td><td>48.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>21.0</td><td>36.0</td><td>36.0</td><td>45.0</td><td>43.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>17.0</td><td>26.0</td><td>32.0</td><td>41.0</td><td>40.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>19.0</td><td>30.0</td><td>40.0</td><td>42.0</td><td>37.0</td></tr><tr><td>ProLong-8B</td><td>16.0</td><td>31.0</td><td>29.0</td><td>31.0</td><td>45.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>16.7</td><td>23.3</td><td>36.7</td><td>43.3</td><td>36.7</td></tr><tr><td>AgenticLU-8B</td><td>25.0</td><td>39.0</td><td>42.0</td><td>47.0</td><td>50.0</td></tr></table>",
|
| 1959 |
+
"bbox": [
|
| 1960 |
+
514,
|
| 1961 |
+
555,
|
| 1962 |
+
880,
|
| 1963 |
+
662
|
| 1964 |
+
],
|
| 1965 |
+
"page_idx": 11
|
| 1966 |
+
},
|
| 1967 |
+
{
|
| 1968 |
+
"type": "table",
|
| 1969 |
+
"img_path": "images/6e298f284783216cf899ec9e5f11a904092cb1f5288888a328c3c6df1c7495f5.jpg",
|
| 1970 |
+
"table_caption": [
|
| 1971 |
+
"Table 15: Long-context performance on InfbenchQA."
|
| 1972 |
+
],
|
| 1973 |
+
"table_footnote": [],
|
| 1974 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"5\">InfbenchChoice</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>9.0</td><td>12.0</td><td>24.0</td><td>39.0</td><td>55.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>15.0</td><td>13.0</td><td>41.0</td><td>41.0</td><td>44.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>27.0</td><td>15.0</td><td>48.0</td><td>55.0</td><td>58.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>20.0</td><td>14.0</td><td>38.0</td><td>51.0</td><td>56.0</td></tr><tr><td>ProLong-8B</td><td>22.0</td><td>27.0</td><td>37.0</td><td>48.0</td><td>58.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>16.7</td><td>30.0</td><td>43.3</td><td>53.3</td><td>63.3</td></tr><tr><td>AgenticLU-8B</td><td>45.0</td><td>46.0</td><td>47.0</td><td>64.0</td><td>68.0</td></tr></table>",
|
| 1975 |
+
"bbox": [
|
| 1976 |
+
514,
|
| 1977 |
+
746,
|
| 1978 |
+
880,
|
| 1979 |
+
852
|
| 1980 |
+
],
|
| 1981 |
+
"page_idx": 11
|
| 1982 |
+
},
|
| 1983 |
+
{
|
| 1984 |
+
"type": "text",
|
| 1985 |
+
"text": "Table 16: Long-context performance on Infbench-Choice.",
|
| 1986 |
+
"bbox": [
|
| 1987 |
+
507,
|
| 1988 |
+
862,
|
| 1989 |
+
882,
|
| 1990 |
+
889
|
| 1991 |
+
],
|
| 1992 |
+
"page_idx": 11
|
| 1993 |
+
},
|
| 1994 |
+
{
|
| 1995 |
+
"type": "text",
|
| 1996 |
+
"text": "Table 13: Long-context performance on PopQA.",
|
| 1997 |
+
"bbox": [
|
| 1998 |
+
132,
|
| 1999 |
+
900,
|
| 2000 |
+
463,
|
| 2001 |
+
915
|
| 2002 |
+
],
|
| 2003 |
+
"page_idx": 11
|
| 2004 |
+
},
|
| 2005 |
+
{
|
| 2006 |
+
"type": "page_number",
|
| 2007 |
+
"text": "5536",
|
| 2008 |
+
"bbox": [
|
| 2009 |
+
480,
|
| 2010 |
+
927,
|
| 2011 |
+
519,
|
| 2012 |
+
940
|
| 2013 |
+
],
|
| 2014 |
+
"page_idx": 11
|
| 2015 |
+
},
|
| 2016 |
+
{
|
| 2017 |
+
"type": "text",
|
| 2018 |
+
"text": "F Evaluation Template",
|
| 2019 |
+
"text_level": 1,
|
| 2020 |
+
"bbox": [
|
| 2021 |
+
114,
|
| 2022 |
+
84,
|
| 2023 |
+
332,
|
| 2024 |
+
99
|
| 2025 |
+
],
|
| 2026 |
+
"page_idx": 12
|
| 2027 |
+
},
|
| 2028 |
+
{
|
| 2029 |
+
"type": "text",
|
| 2030 |
+
"text": "We use GPT-4o (OpenAI, 2023) to judge if the model's answer is correct. The specific prompt template with the structured output class is shown below.",
|
| 2031 |
+
"bbox": [
|
| 2032 |
+
112,
|
| 2033 |
+
109,
|
| 2034 |
+
487,
|
| 2035 |
+
172
|
| 2036 |
+
],
|
| 2037 |
+
"page_idx": 12
|
| 2038 |
+
},
|
| 2039 |
+
{
|
| 2040 |
+
"type": "code",
|
| 2041 |
+
"sub_type": "code",
|
| 2042 |
+
"code_caption": [],
|
| 2043 |
+
"code_body": "Please verify the following answer:\nQuestion: {question}\nGround Truth Answers: {groundtruth}\nPredicted Answer: {answer}\nYour task is to determine whether the predicted\n→ answer correctly matches the ground truth.\n→ Focus on overall correctness and provide a\n→ detailed explanation in the following\n→ format:\nclass VerificationResult:\n explanation: str # Justification\n confidence: float # Confidence score in\n → the range [0,1]\n correct_answer: bool # True if the\n → prediction is correct, otherwise False",
|
| 2044 |
+
"guess_lang": "txt",
|
| 2045 |
+
"bbox": [
|
| 2046 |
+
117,
|
| 2047 |
+
181,
|
| 2048 |
+
480,
|
| 2049 |
+
426
|
| 2050 |
+
],
|
| 2051 |
+
"page_idx": 12
|
| 2052 |
+
},
|
| 2053 |
+
{
|
| 2054 |
+
"type": "page_number",
|
| 2055 |
+
"text": "5537",
|
| 2056 |
+
"bbox": [
|
| 2057 |
+
480,
|
| 2058 |
+
928,
|
| 2059 |
+
519,
|
| 2060 |
+
940
|
| 2061 |
+
],
|
| 2062 |
+
"page_idx": 12
|
| 2063 |
+
}
|
| 2064 |
+
]
|
2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-Taught Agentic Long Context Understanding/5eae18a4-b413-4e11-a007-93214ece9dc0_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa70da2f87cd90180159ce23628d9346ec605c0f8902b239dcdf731235ef8c76
|
| 3 |
+
size 802984
|
2025/Self-Taught Agentic Long Context Understanding/full.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Self-Taught Agentic Long-Context Understanding
|
| 2 |
+
|
| 3 |
+
Yufan Zhuang $^{1,2}$ , Xiaodong Yu $^{1}$ , Jialian Wu $^{1}$ , Xineng Sun $^{1}$ , Ze Wang $^{1}$ , Jiang Liu $^{1}$ , Yusheng Su $^{1}$ , Jingbo Shang $^{2}$ , Zicheng Liu $^{1}$ , Emad Barsoum $^{1}$ $^{1}$ AMD, $^{2}$ UC San Diego
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Answering complex, long-context questions remains a major challenge for large language models (LLMs) as it requires effective question clarifications and context retrieval. We propose Agentic Long-Context Understanding (AgenticLU), a framework designed to enhance an LLM's understanding of such queries by integrating targeted self-clarification with contextual grounding within an agentic workflow. At the core of AgenticLU is Chain-of-Clarifications (CoC), where models refine their understanding through self-generated clarification questions and corresponding contextual groundings. By scaling inference as a tree search where each node represents a CoC step, we achieve $97.8\%$ answer recall on NarrativeQA with a search depth of up to three and a branching factor of eight. To amortize the high cost of this search process to training, we leverage the preference pairs for each step obtained by the CoC workflow and perform two-stage model finetuning: (1) supervised finetuning to learn effective decomposition strategies, and (2) direct preference optimization to enhance reasoning quality. This enables AgenticLU models to generate clarifications and retrieve relevant context effectively and efficiently in a single inference pass. Extensive experiments across seven long-context tasks demonstrate that AgenticLU significantly outperforms state-of-the-art prompting methods and specialized long-context LLMs, achieving robust multi-hop reasoning while sustaining consistent performance as context length grows.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Large language models have achieved notable milestones in natural language processing, demonstrating exceptional performance in tasks such as mathematical reasoning, code generation, and conversational understanding (OpenAI, 2023; DeepSeek-
|
| 12 |
+
|
| 13 |
+
AI, 2025). However, effectively comprehending and utilizing long-context inputs remains a major challenge. Complex queries often require models to retrieve multiple relevant pieces of information from extensive contexts and synthesize them coherently. While recent advancements have extended context windows to 128K and even 2M tokens (Dubey et al., 2024; Touvron et al., 2023; Reid et al., 2024), these models still struggle to fully integrate and reason over large-scale contextual information. Recent studies (Liu et al., 2024; Gao et al., 2024) highlight a fundamental challenge in long-context understanding: the disparity between a model's nominal context size—the theoretical maximum input length—and its effective context window, the portion of the input the model actively utilizes for reasoning. This gap significantly impacts the understanding performance, limiting the model's ability to fully comprehend and integrate long-context information.
|
| 14 |
+
|
| 15 |
+
We introduce a novel framework AgenticLU to enhance long-context comprehension in LLMs. As illustrated in fig. 1, the core of AgenticLU is Chain-of-Clarifications (CoC), a process where models enhance their understanding by generating clarification questions, retrieving relevant information from the long context and answering their own clarification questions based on the gathered evidence. Rather than relying on a direct response, CoC helps models refine their reasoning iteratively, resolving uncertainties along the way. We structure the framework into the following two stages.
|
| 16 |
+
|
| 17 |
+
CoC Path Construction. To collect reliable CoC understanding path, we structure data collection as a tree search, where each CoC step represents a node. We leverage extended inference time to determine the effective clarification questions to ask and the relevant evidence to retrieve. With a search depth of three and a branching factor of eight, AgenticLU successfully retrieves $97.8\%$ of
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Overview of the AgenticLU pipeline: The model iteratively refines its understanding of long-context inputs through an agentic workflow. At each step, it raises self-clarifications, retrieves relevant context via the pointback mechanism, and updates its reasoning trace. The framework integrates CoC Path Construction to generate diverse reasoning paths, followed by two-stage fine-tuning (SFT and DPO) to enhance long-context understanding.
|
| 21 |
+
|
| 22 |
+
the correct answers in NarrativeQA (Kočiský et al., 2018), demonstrating its capability to tackle complex questions that require multi-step reasoning over long-context inputs.
|
| 23 |
+
|
| 24 |
+
CoC Path Distillation. Once the dataset is collected from the tree-search process, we train the model to generate effective clarifications and contextual groundings in a single pass, eliminating the need for scaling at inference time. This is achieved by distilling these collected paths into LLMs through supervised finetuning (SFT) and direct preference optimization (DPO) (Rafailov et al., 2024), effectively amortizing the computational cost from inference to training.
|
| 25 |
+
|
| 26 |
+
Our method AgenticLU significantly improves model's long-context understanding capabilities without relying on laborious human annotations or stronger teacher models for data generation. Instead, the base model's self-generated CoC paths enables it to teach itself to process long-context inputs more effectively. This approach harnesses the model's inherent long-context capabilities—previously only accessible through an additional LLM agent—allowing it to independently refine its reasoning and retrieval processes. Empirically, we demonstrate that AgenticLU consistently boosts performance across a set of question-answering tasks up to 128K tokens, outperforming both prompting-based approaches and other long-context-finetuned LLMs. By integrating selfclarification and context grounding in an agentic manner, we take a step further toward enabling
|
| 27 |
+
|
| 28 |
+
LLMs to comprehend long contexts.
|
| 29 |
+
|
| 30 |
+
# 2 Related Work
|
| 31 |
+
|
| 32 |
+
Challenges in Long Context Understanding LLMs struggle with long contexts despite supporting up to 2M tokens (Dubey et al., 2024; Reid et al., 2024). The "lost-in-the-middle" effect (Liu et al., 2024) and degraded performance on long-range tasks (Li et al., 2023) highlight these issues. To address this, ProLong (Gao et al., 2024) fine-tunes base models on a large, carefully curated long-context corpus. While this approach improves performance on long-range tasks, it comes at a significant cost, requiring training with an additional 40B tokens and long-input sequences.
|
| 33 |
+
|
| 34 |
+
Inference-time Scaling for Long-Context The Self-Taught Reasoner (STaR) framework (Zelikman et al., 2022) iteratively generates rationales to refine reasoning, with models evaluating answers and finetuning on correct reasoning paths. Wang et al. (2024b) introduced Model-induced Process Supervision (MiPS), automating verifier training by generating multiple completions and assessing accuracy, boosting PaLM 2's performance on math and coding tasks. Li et al. (2024) proposed an inference scaling pipeline for long-context tasks using Bayes Risk-based sampling and fine-tuning, though their evaluation is limited to shorter contexts (10K tokens) compared to ours (128K tokens).
|
| 35 |
+
|
| 36 |
+
Agentic Workflow for Long-Context Agentic workflows (Yao et al., 2022) enable LLMs to au
|
| 37 |
+
|
| 38 |
+
tonomously manage tasks by generating internal plans and refining outputs iteratively. The LongRAG framework (Zhao et al., 2024b) enables an LLM and an RAG module to collaborate on long-context tasks by breaking down the input into smaller segments, processing them individually, and integrating the results to form a coherent output. Chain-of-Agents (CoA) (Zhang et al., 2024b) tackles long-context tasks through decomposition and multi-agent collaboration. In CoA, the input text is divided into segments, each handled by a worker agent that processes its assigned portion and communicates its findings to the next agent in the sequence. Unlike these, our approach employs a single LLM that orchestrates its own reasoning and retrieval without relying on multiple components. By dynamically structuring its process and iteratively refining long-context information, our model reduces complexity while maintaining efficiency.
|
| 39 |
+
|
| 40 |
+
# 3 The Context Size Gap
|
| 41 |
+
|
| 42 |
+
State-of-the-art LLMs have made strong claims about their context lengths, supporting hundreds of thousands of input tokens. However, recent studies (Gao et al., 2024; Yen et al., 2024; Shang et al., 2024) have shown that the effective context size of an LLM (the length over which it can reliably perform tasks such as information retrieval and complex reasoning) often diverges from its claimed, or nominal, context length.
|
| 43 |
+
|
| 44 |
+
To illustrate this gap, we evaluate Llama3.1-8B-Instruct, which supports a 128K-token context, on the HotPotQA dataset to test multi-hop QA performance at various input lengths (8K, 16K, 32K, 64K, and 128K). We artificially expand the input by adding irrelevant context and measure the accuracy of its answers using GPT-4o as a judge. As shown in fig. 2, The model's performance degrades substantially as increasing context length, demonstrating the discrepancy between nominal and effective context sizes.
|
| 45 |
+
|
| 46 |
+
While expanding nominal context capacity is undoubtedly important, we argue that it is not sufficient for solving all long-context problems. By analogy with computer memory, simply having more capacity does not guarantee efficient or accurate computation; one must also manage the "loading" of relevant information in and out of this memory. Therefore, we propose an agentic workflow aimed at helping LLMs process and interpret extended contexts more intelligently.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 2: Effective context size is smaller than nominal context size. Performance of Llama3.1-8B-Instruct (advertised 128K-token context) on the Hot-PotQA dataset drops sharply as input length increases (8K, 16K, 32K, 64K, 128K), illustrating the gap between nominal and effective context capacities.
|
| 50 |
+
|
| 51 |
+
# 4 Chain-of-Clarifications Workflow
|
| 52 |
+
|
| 53 |
+
Our approach centers on enhancing long-context comprehension through an iterative, self-refining process that blends inference-time scaling with agentic reasoning. We coin this agentic workflow Chain-of-Clarifications (CoC). In this section, we detail its key components, including the self-clarification process and the pointback mechanism, as illustrated in fig. 1.
|
| 54 |
+
|
| 55 |
+
Our proposed CoC framework is designed to mitigate the gap between nominal and effective context sizes in large language models. Rather than processing the entire long context and potentially multi-hop questions in a single pass, our methodology decomposes the task into a sequence of targeted sub-tasks. At each CoC step, the model autonomously:
|
| 56 |
+
|
| 57 |
+
- Generates clarifying questions by identifying areas of the long input that require further elaboration or are prone to misinterpretation.
|
| 58 |
+
- Pointbacks to relevant context by using a pointback mechanism that highlights critical segments of the context by naming the index of relevant paragraphs. In the data collection phase, this is done by iteratively querying the LLM about the relevance of each paragraph with respect to the question. After training, the model is finetuned to generate the related paragraph indexes directly in a single pass.
|
| 59 |
+
- Answers clarifying questions by integrating highlighted context into consideration to build a more accurate and contextually grounded understanding of the long document.
|
| 60 |
+
|
| 61 |
+
- Answers the original question by combining all newly gathered clarifications, the model attempts to generate a valid answer to the original question.
|
| 62 |
+
|
| 63 |
+
It is important to note a key distinction between CoC path generation during data collection and the actual task deployment of the agentic workflow. In the data generation phase, we prompt the LLM to iteratively process each chunk of input text along with its self-generated clarifying questions, ensuring accurate retrieval of relevant context. During training, rather than relying on repeated inference calls, we finetune the model to directly generate the indexes of relevant paragraphs using pointback examples, effectively amortizing the computational cost into training. This enables the model to internalize the retrieval process, allowing it to dynamically synthesize relevant clarifications and contextual references at inference time without requiring extensive additional prompting.
|
| 64 |
+
|
| 65 |
+
# 5 Data Generation & Model Training
|
| 66 |
+
|
| 67 |
+
Dataset We use the NarrativeQA (Kočisky et al., 2018) dataset to facilitate long-context QA and generate agentic workflow traces with 14.7K QA pairs in the training set. NarrativeQA is designed for reading comprehension over narrative texts, such as books and movie scripts, where each example includes a full story and a set of corresponding QA pairs. This dataset emphasizes deeper reasoning and long-context understanding, as many questions require synthesizing information from multiple parts of the narrative rather than focusing solely on particular local context. Its relatively long passages make NarrativeQA particularly suitable for testing and refining agentic reasoning in large language models, as the answers often depend on weaving together details spanning the entire text.
|
| 68 |
+
|
| 69 |
+
Base Model Our base model is Llama3.1-8B-Instruct (Dubey et al., 2024), an 8-billion-parameter instruction-tuned Llama model. This model is built on the same transformer architecture as Llama3, but with additional fine-tuning data to improve its performance on multi-turn dialogue and instruction-following tasks.
|
| 70 |
+
|
| 71 |
+
# 5.1 CoC Path Construction
|
| 72 |
+
|
| 73 |
+
We employ a test-time scaling approach to generate CoC paths. For each question, we construct a tree of search paths where each node represents a distinct clarification question posed by the LLM.
|
| 74 |
+
|
| 75 |
+
Table 1: Statistics of the generated traces dataset used in finetuning derived from NarrativeQA. We left out 11.9K traces for validation.
|
| 76 |
+
|
| 77 |
+
<table><tr><td>Data</td><td>#</td></tr><tr><td>Num of Traces</td><td>107,550</td></tr><tr><td>Avg Context Length</td><td>67,812</td></tr><tr><td>Avg Chosen Response Length</td><td>165</td></tr><tr><td>Avg Rejected Response Length</td><td>164</td></tr><tr><td>Total Generation Tokens</td><td>17M</td></tr></table>
|
| 78 |
+
|
| 79 |
+
In our experiments, we use a branching factor of 8 at each depth and select the most promising trace based on an evaluation score that combines:
|
| 80 |
+
|
| 81 |
+
- Semantic similarity, measured by the RougeL (Lin, 2004) score relative to the ground truth.
|
| 82 |
+
|
| 83 |
+
- Discrete correctness, evaluated by a binary verification using GPT4o-mini.
|
| 84 |
+
|
| 85 |
+
In the data construction process, the relevant context is found by iteratively querying the LLM about the relevance of all chunked passages. Here we use 512 as the chunk size. This process is compute-intensive but only happens in data collection. After the training, the LLM will directly generate the paragraph numbers of the relevant context as shown in the lower right of fig. 1.
|
| 86 |
+
|
| 87 |
+
For most long-context tasks, a single clarification question suffices because the required reasoning is not highly complex. $92\%$ of the questions in our experiments are resolved correctly with just one round of clarification. More challenging tasks may require multiple rounds of clarification: two rounds resolve $53\%$ of the remaining $8\%$ , and three rounds resolve $35\%$ of the remaining $4\%$ . Because of the exponentially increasing cost—and given that $97.4\%$ of the training questions are already solved—we limit the maximum depth of our inference scaling to 3.
|
| 88 |
+
|
| 89 |
+
The statistics of the collected dataset are shown in table 1. The total number of conditional generation tokens that the LLM trained on is 17M tokens, with input that has an average length of 67K and a max length of 128K tokens.
|
| 90 |
+
|
| 91 |
+
# 5.2 CoC Path Distillation
|
| 92 |
+
|
| 93 |
+
We employ a two-stage finetuning recipe: Supervised Fine-Tuning (SFT) followed by Direct Preference Optimization (DPO) (Rafailov et al., 2024), to convert our base model into a long-context under
|
| 94 |
+
|
| 95 |
+
standing agent. The dataset statistics is described in table 1, with input length up to 128K tokens.
|
| 96 |
+
|
| 97 |
+
Supervised Fine-Tuning In the first phase, we finetune Llama3.1-8B-Instruct using the generated CoC paths. Each training example includes (1) the full context from NarrativeQA, (2) the question, and (3) the step-by-step reasoning trace leading to the final answer. By exposing the model to these traces, we encourage it to internalize multi-step reasoning strategies and context grounding for the long-context inputs. The SFT stage uses a standard cross-entropy loss on the next-token prediction task, ensuring the model learns how to produce consistent and complete reasoning sequences.
|
| 98 |
+
|
| 99 |
+
Direct Preference Optimization In the second phase, we apply Direct Preference Optimization to further refine the model's output quality. To create preference pairs, we sample incorrect workflow traces as negative examples with using GPT40-mini as the judge for answer correctness from the test-time scaling. DPO explicitly optimizes the model to generate higher-ranked responses more frequently, thus aligning the agent's outputs with desirable characteristics, such as clarity, correctness, and coherence. This stage ensures that even among valid reasoning paths, the model learns to prioritize the most instructive reasoning.
|
| 100 |
+
|
| 101 |
+
The details for the two-phase training are listed in appendix A.
|
| 102 |
+
|
| 103 |
+
# 6 Evaluation
|
| 104 |
+
|
| 105 |
+
In this section, we assess our method AgenticLU using a suite of evaluation tasks drawn from the HELMET long-context benchmark (Yen et al., 2024). Our experiments focus on testing models' ability to retain, process, and reason over extended contexts ranging from 8K to 128K tokens.
|
| 106 |
+
|
| 107 |
+
# 6.1 Tasks and Metrics
|
| 108 |
+
|
| 109 |
+
We evaluate our models and baselines on the Helmet (Yen et al., 2024) long-context evaluation benchmark's retrieval-augmented generation (RAG) and long-range QA (LongQA) tasks ranging from 8K, 16K, 32K, 64K, to 128K.
|
| 110 |
+
|
| 111 |
+
We use GPT-4o as the judge for answer correctness, with the prompt template shown in appendix F. We report accuracies for all datasets.
|
| 112 |
+
|
| 113 |
+
The RAG test suite includes: (1) HotpotQA (Yang et al., 2018), a multi-hop reasoning dataset over Wikipedia; (2) Natural Questions (Kwiatkowski et al., 2019), real user queries
|
| 114 |
+
|
| 115 |
+
with Wikipedia-based short and long answers; (3) TriviaQA (Joshi et al., 2017), a large-scale trivia dataset with question-answer pairs linked to evidence documents; (4) PopQA (Mallen et al., 2022), a dataset testing model memorization with fact-based questions from popular culture.
|
| 116 |
+
|
| 117 |
+
The LongQA test suite includes: (1) NarrativeQA (Kočiský et al., 2018), a reading comprehension dataset with Wikipedia summaries and story-based Q&A; (2) InfiniteBench QA (Zhang et al., 2024a), a long-range QA benchmark requiring reasoning over extended contexts; (3) InfiniteBench Multiple-Choice (Zhang et al., 2024a), a multiple-choice variant of the previous evaluating reading comprehension over long documents.
|
| 118 |
+
|
| 119 |
+
For the four RAG tasks, each question is put alongside a set of relevant contexts, and the overall input length is increased by appending irrelevant context. Consequently, these tasks become strictly more difficult as the context window expands. In contrast, for the three LongQA tasks, the relevant context may not appear in the truncated input (the first 8K, 16K, or 128K tokens). Hence, performance might improve at longer input lengths simply because the necessary information becomes available only after including more tokens.
|
| 120 |
+
|
| 121 |
+
# 6.2 Baselines
|
| 122 |
+
|
| 123 |
+
We compare AgenticLU against a diverse set of strong baselines representing different approaches for handling long-context tasks. Our comparisons include two main categories.
|
| 124 |
+
|
| 125 |
+
Under prompting methods we consider techniques that require no additional model training. In particular, we evaluate (a) the chain-of-thought approach (Kojima et al., 2022), which encourages models to decompose complex questions into intermediate reasoning steps; (b) fact-and-reflection prompting (Zhao et al., 2024c), which iteratively verifies and refines factual claims to enhance consistency; (c) plan-and-solve prompting (Wang et al., 2023), where the model first outlines a high-level plan before sequentially executing it to address structured reasoning tasks; and (d) LongRAG (Zhao et al., 2024a) where a hybrid RAG system is used to retrieve relevant context to generate global summaries and local details<sup>1</sup>.
|
| 126 |
+
|
| 127 |
+
In the fine-tuning category, we focus on models
|
| 128 |
+
|
| 129 |
+
Table 2: Performance difference of AgenticLU and its base, Llama3.1-8B-Instruct ( $\delta =$ AgenticLU-8B minus Llama3.1-8B), on long context (the 128K tasks) and short-context benchmarks (6 regular tasks including ARC, GSM8K, and MMLU), the details of the short-context performance can be found in appendix B. Scores represent accuracy, with AgenticLU demonstrating significantly improved performance across long-context tasks with minimal effect on regular task performance.
|
| 130 |
+
|
| 131 |
+
<table><tr><td>Model</td><td>Short Avg</td><td>HotpotQA</td><td>Natural Questions</td><td>TriviaQA</td><td>PopQA</td><td>NarrativeQA</td><td>InfiniQA</td><td>InfiniChoice</td><td>Long Avg</td></tr><tr><td>Llama3.1-8B</td><td>62.3</td><td>40.0</td><td>56.1</td><td>80.6</td><td>56.1</td><td>38.0</td><td>48.0</td><td>55.0</td><td>53.4</td></tr><tr><td>AgenticLU (δ)</td><td>-0.6</td><td>+31.1</td><td>+21.7</td><td>+7.7</td><td>+9.4</td><td>+18.0</td><td>+2.0</td><td>+13.0</td><td>+14.7</td></tr></table>
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
Llama3.1-8B
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
ProLong-8B
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Llama3.1-8B+plan&solve
|
| 148 |
+
- AgenticLU-8B
|
| 149 |
+
|
| 150 |
+
Figure 3: Main results on 7 long-context tasks across context lengths from 8K to 128K. Our AgenticLU-8B (dotted orange) achieves significant improvements on all tasks over our base model Llama3.1-8B (solid orange). We also compare with the prompting methods (Step-by-Step, Plan-and-Solve, Fact-and-Reflect, LongRAG) and the state-of-the-art ProLong-8B model. AgenticLU-8B consistently maintains strong performance across most tasks and context lengths.
|
| 151 |
+

|
| 152 |
+
- - Llama3.1-8B+step-by-step
|
| 153 |
+
Llama3.1-8B+fact&reflect
|
| 154 |
+
|
| 155 |
+
that have been specifically adapted for extended context data. For a substantial comparison, we employ Prolong-8B-512K (Gao et al., 2024)—a model based on the Llama3 8B architecture that has been further trained on an additional 40B tokens of long-context data.
|
| 156 |
+
|
| 157 |
+
# 6.3 Main Results
|
| 158 |
+
|
| 159 |
+
The performance of AgenticLU and baseline models is shown in fig. 3.
|
| 160 |
+
|
| 161 |
+
Self-clarification significantly improves multihop reasoning. AgenticLU-8B consistently surpasses other methods in HotpotQA. By iteratively refining its understanding, resolving ambigu
|
| 162 |
+
|
| 163 |
+
ities, and verifying intermediate steps, the model achieves higher accuracy, particularly as context length increases.
|
| 164 |
+
|
| 165 |
+
Robust performance across diverse datasets. Unlike baseline models, AgenticLU-8B maintains consistently strong performance across RAG and LongQA benchmarks, demonstrating its ability to adapt effectively to different long-context tasks.
|
| 166 |
+
|
| 167 |
+
Reduced performance degradation with longer contexts. While most models experience significant accuracy drops as context length increases, AgenticLU-8B remains stable. Its self-clarification and pointback mechanisms effectively filter noise from irrelevant information, allowing the model to extract and prioritize essential evidence.
|
| 168 |
+
|
| 169 |
+
Fine-tuning vs. prompting trade-offs. While structured prompting techniques like plan-and-solve improve short-context reasoning, they struggle with extreme context lengths (e.g., 128K tokens). In contrast, AgenticLU-8B, through targeted finetuning with self-clarification and pointback, maintains robust long-context reasoning without relying on complex prompting strategies. Although ProLong-8B, another finetuned model, achieves strong results, it comes with significantly higher training costs. AgenticLU-8B, by contrast, is more data-efficient and generalizes better to novel tasks, making it a more practical and effective solution for long-context reasoning.
|
| 170 |
+
|
| 171 |
+
Overall, these results underscore the effectiveness of AgenticLU-8B in tackling long-context understanding challenges. The integration of selfclarification plays a crucial role in improving grounding, reasoning, and comprehension in long-context settings.
|
| 172 |
+
|
| 173 |
+
# 6.4 Performance on Short-Context Tasks
|
| 174 |
+
|
| 175 |
+
To demonstrate that our fine-tuning process preserves the model's general capabilities while enhancing long-context understanding, we evaluated the finetuned model on a diverse set of standard benchmarks. These include elementary and advanced reasoning tasks ARC Easy and ARC Challenge (Clark et al., 2018), mathematical problem-solving GSM8K (Cobbe et al., 2021), MathQA (Amini et al., 2019), and broad knowledge assessment MMLU (Hendrycks et al., 2021b,a), MMLU-Pro (Wang et al., 2024a).
|
| 176 |
+
|
| 177 |
+
We report the average performance across short-context tasks in table 2, and each individual task
|
| 178 |
+
|
| 179 |
+
Table 3: We evaluate the performance of adding additional self-clarification and contextual grounding rounds at inference time. The gain from self-clarification is close to optimal at the initial round.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr><tr><td>(w/ 2 rounds)</td><td>71.1</td><td>76.7</td><td>67.2</td><td>91.7</td><td>76.7</td></tr><tr><td>(w/ 3 rounds)</td><td>75.5</td><td>78.8</td><td>68.3</td><td>91.1</td><td>78.4</td></tr></table>
|
| 182 |
+
|
| 183 |
+
result can be found in appendix B. We find that the short-context performance is well preserved, demonstrating that AgenticLU's core reasoning and problem-solving abilities remain strong and are not compromised by the significant improvements to its long-context understanding powers.
|
| 184 |
+
|
| 185 |
+
# 7 Analyses & Ablation Studies
|
| 186 |
+
|
| 187 |
+
In this section, we take a closer look at how each part of our approach affects long-context understanding and retrieval. Specifically, we study three main questions: (1) Can the finetuned system benefit from multi-round CoC? (2) Does adding clarifications and pointing back to the original document help the model understand and utilize the context more accurately? (3) How much additional compute overhead does AgenticLU add to the process?
|
| 188 |
+
|
| 189 |
+
# 7.1 How many rounds of CoC are needed?
|
| 190 |
+
|
| 191 |
+
Setup. We add additional rounds of reasoning in the evaluation and see if the LLM can benefit from multi-rounds of reasoning at test-time.
|
| 192 |
+
|
| 193 |
+
Analysis. The results, presented in Table 3, indicate that additional rounds of agentic reasoning do provide performance improvements.
|
| 194 |
+
|
| 195 |
+
This suggests that while significant benefits of self-clarification are achieved in the first round, additional rounds still contribute to further improvements. One possible explanation is the nature of our dataset: approximately $92\%$ of the questions are resolved within a single round of clarification. However, for the remaining cases, extended reasoning allows the model to refine its understanding, leading to measurable gains in performance with more clarification and reasoning.
|
| 196 |
+
|
| 197 |
+
# 7.2 Do Self-Clarifications and Pointback Help in Long-Context Understanding?
|
| 198 |
+
|
| 199 |
+
Setup. To evaluate the impact of each component in our agentic workflow, we compare the full AgenticLU-8B model against two variants:
|
| 200 |
+
|
| 201 |
+
Table 4: We test the agentic workflow with AgenticLU-8B when taking out the self-clarification steps and the contextual grounding (pointback) step. The tasks are with 128K context length.
|
| 202 |
+
|
| 203 |
+
<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr><tr><td>(w/o Clarification)</td><td>57.8</td><td>56.7</td><td>55.5</td><td>78.3</td><td>62.1</td></tr><tr><td>(w/o Pointback)</td><td>53.3</td><td>59.4</td><td>52.7</td><td>83.3</td><td>62.2</td></tr></table>
|
| 204 |
+
|
| 205 |
+
Table 5: Performance Overhead Comparison between direct answering baseline and AgenticLU.
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Metric</td><td>Baseline</td><td>AgenticLU</td></tr><tr><td>Runtime Overhead</td><td>100%</td><td>101.93%</td></tr><tr><td>Avg Tokens Generated in One Round</td><td>76.28</td><td>1205.38</td></tr></table>
|
| 208 |
+
|
| 209 |
+
one without the self-clarification step and another without the contextual grounding (pointback) step. We use the four RAG datasets with 128K context length as the evaluation benchmark, and compare the performance alongside the original model.
|
| 210 |
+
|
| 211 |
+
Analysis. Table 4 shows the results on four QA benchmarks with a 128K context length. Removing self-clarification leads to an absolute performance drop of at least 10 points across most tasks (e.g., from $71.1\%$ to $57.8\%$ on HotpotQA), confirming that the model benefits from clarifying its own uncertainties when the context is long. Meanwhile, omitting pointback yields degenerate results, indicating that pinpointing relevant information at each stage is crucial for long-context QA. Overall, these findings highlight the importance of both clarifications and context-grounding to maximize retrieval accuracy and robustness in lengthy documents.
|
| 212 |
+
|
| 213 |
+
# 7.3 How much additional compute cost does AgenticLU impose in generation?
|
| 214 |
+
|
| 215 |
+
Since additional generation steps are introduced in the QA process, we assess the overhead in inference time. Naively, long-context inference and multi-round conversations could significantly amplify compute costs. However, by leveraging prefix caching to store computed KV caches, the additional cost scales linearly with the number of newly generated tokens rather than exponentially.
|
| 216 |
+
|
| 217 |
+
To quantify this overhead, we conduct a runtime evaluation on 100 queries with a 128K context size. The results, summarized in table 5, demonstrate that the additional computational overhead remains minimal when using prefix caching.
|
| 218 |
+
|
| 219 |
+
# 8 Conclusion
|
| 220 |
+
|
| 221 |
+
In this work, we introduce Agentic Long-Context Understanding (AgenticLU), a framework designed to enhance large language models' ability to process and reason over long-context inputs with self-generated data. By incorporating an agentic workflow (CoC) that dynamically refines model reasoning through self-clarifications and contextual grounding, AgenticLU significantly improves LLM's long context understanding capabilities.
|
| 222 |
+
|
| 223 |
+
Through a combination of trace data collection and two-stage post-training, our approach enables models to autonomously explore multiple reasoning paths, distill the most effective clarification strategies, and improve their understanding of lengthy documents. Extensive evaluations on long-context benchmarks demonstrate that AgenticLU outperforms existing prompting techniques and finetuned baselines, maintaining strong performance across context lengths up to 128K tokens. Additionally, ablation studies confirm that self-clarification and pointback mechanisms play a crucial role in improving retrieval and reasoning over long-contexts.
|
| 224 |
+
|
| 225 |
+
# Limitations
|
| 226 |
+
|
| 227 |
+
Despite its effectiveness in long-context reasoning, AgenticLU has notable limitations. One key drawback is its inability to autonomously determine when to stop multi-round reasoning. While additional rounds of self-clarification can improve performance, the model follows a fixed number of reasoning steps rather than dynamically assessing when further refinement is necessary. This can lead to inefficiencies, where the model either stops too early, missing potential improvements, or continues reasoning unnecessarily, expending computational resources without significant gains.
|
| 228 |
+
|
| 229 |
+
Developing a fully agentic mechanism remains an open challenge. Ideally, the model should assess its confidence in an intermediate response and decide whether further clarification is needed. Future work should explore approaches that enable AgenticLU to regulate its reasoning depth dynamically, optimizing both efficiency and performance.
|
| 230 |
+
|
| 231 |
+
# Acknowledgement
|
| 232 |
+
|
| 233 |
+
Our work is sponsored in part by NSF CAREER Award 2239440, NSF Proto-OKN Award 2333790, Sponsored Research Projects from companies like Cisco and eBay, as well as generous gifts from
|
| 234 |
+
|
| 235 |
+
Google, Adobe, and Teradata. Any opinions, findings, and conclusions or recommendations expressed herein are those of the authors and should not be interpreted as necessarily representing the views, either expressed or implied, of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright annotation hereon.
|
| 236 |
+
|
| 237 |
+
# References
|
| 238 |
+
|
| 239 |
+
Aida Amini, Saadia Gabriel, Peter Lin, Rik Koncel-Kedziorski, Yejin Choi, and Hannaneh Hajishirzi. 2019. Mathqa: Towards interpretable math word problem solving with operation-based formalisms. Preprint, arXiv:1905.13319.
|
| 240 |
+
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. ArXiv, abs/1803.05457.
|
| 241 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. Preprint, arXiv:2110.14168.
|
| 242 |
+
Tri Dao. 2023. Flashattention-2: Faster attention with better parallelism and work partitioning. arXiv preprint arXiv:2307.08691.
|
| 243 |
+
DeepSeek-AI. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. Preprint, arXiv:2501.12948.
|
| 244 |
+
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.
|
| 245 |
+
Tianyu Gao, Alexander Wettig, Howard Yen, and Danqi Chen. 2024. How to train long-context language models (effectively). arXiv preprint arXiv:2410.02660.
|
| 246 |
+
Dan Hendrycks, Collin Burns, Steven Basart, Andrew Critch, Jerry Li, Dawn Song, and Jacob Steinhardt. 2021a. Aligning ai with shared human values. Proceedings of the International Conference on Learning Representations (ICLR).
|
| 247 |
+
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021b. Measuring massive multitask language understanding. Proceedings of the International Conference on Learning Representations (ICLR).
|
| 248 |
+
Jian Hu, Xibin Wu, Weixun Wang, Dehao Zhang, Yu Cao, et al. 2024. Openrlhf: An easy-to-use, scalable and high-performance rlhf framework. arXiv preprint arXiv:2405.11143.
|
| 249 |
+
|
| 250 |
+
Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, Canada. Association for Computational Linguistics.
|
| 251 |
+
Tomáš Kočisky, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, Gábor Melis, and Edward Grefenstette. 2018. The NarrativeQA reading comprehension challenge. Transactions of the Association for Computational Linguistics, 6:317-328.
|
| 252 |
+
Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35:22199-22213.
|
| 253 |
+
Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. 2019. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453-466.
|
| 254 |
+
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles.
|
| 255 |
+
Jiaqi Li, Mengmeng Wang, Zilong Zheng, and Muhan Zhang. 2023. Loogle: Can long-context language models understand long contexts? arXiv preprint arXiv:2311.04939.
|
| 256 |
+
Siheng Li, Cheng Yang, Zesen Cheng, Lemao Liu, Mo Yu, Yujiu Yang, and Wai Lam. 2024. Large language models can self-improve in long-context reasoning. arXiv preprint arXiv:2411.08147.
|
| 257 |
+
Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.
|
| 258 |
+
Hao Liu, Matei Zaharia, and Pieter Abbeel. 2023. Ring attention with blockwise transformers for near-infinite context. arXiv preprint arXiv:2310.01889.
|
| 259 |
+
Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157-173.
|
| 260 |
+
Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Hannaneh Hajishirzi, and Daniel Khashabi. 2022. When not to trust language models: Investigating effectiveness and limitations of parametric and non-parametric memories. arXiv preprint.
|
| 261 |
+
|
| 262 |
+
OpenAI. 2023. GPT-4 technical report. Preprint, arXiv:2303.08774.
|
| 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 |
+
Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 3505-3506.
|
| 265 |
+
Machel Reid, Nikolay Savinov, Denis Teplyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530.
|
| 266 |
+
Jingbo Shang, Zai Zheng, Jiale Wei, Xiang Ying, Felix Tao, and Mindverse Team. 2024. Ai-native memory: A pathway from llms towards agi. arXiv preprint arXiv:2406.18312.
|
| 267 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 268 |
+
Lei Wang, Wanyu Xu, Yihuai Lan, Zhiqiang Hu, Yunshi Lan, Roy Ka-Wei Lee, and Ee-Peng Lim. 2023. Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models. arXiv preprint arXiv:2305.04091.
|
| 269 |
+
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. Preprint, arXiv:2406.01574.
|
| 270 |
+
Zihan Wang, Yunxuan Li, Yuexin Wu, Liangchen Luo, Le Hou, Hongkun Yu, and Jingbo Shang. 2024b. Multi-step problem solving through a verifier: An empirical analysis on model-induced process supervision. arXiv preprint arXiv:2402.02658.
|
| 271 |
+
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2369-2380, Brussels, Belgium. Association for Computational Linguistics.
|
| 272 |
+
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2022.
|
| 273 |
+
|
| 274 |
+
React: Synergizing reasoning and acting in language models. arXiv preprint arXiv:2210.03629.
|
| 275 |
+
Howard Yen, Tianyu Gao, Minmin Hou, Ke Ding, Daniel Fleischer, Peter Izsak, Moshe Wasserblat, and Danqi Chen. 2024. Helmet: How to evaluate long-context language models effectively and thoroughly. arXiv preprint arXiv:2410.02694.
|
| 276 |
+
Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah Goodman. 2022. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476-15488.
|
| 277 |
+
Xinrong Zhang, Yingfa Chen, Shengding Hu, Zihang Xu, Junhao Chen, Moo Hao, Xu Han, Zhen Thai, Shuo Wang, Zhiyuan Liu, and Maosong Sun. 2024a. $\infty$ Bench: Extending long context evaluation beyond 100K tokens. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15262-15277, Bangkok, Thailand. Association for Computational Linguistics.
|
| 278 |
+
Yusen Zhang, Ruoxi Sun, Yanfei Chen, Tomas Pfister, Rui Zhang, and Sercan Ö Arik. 2024b. Chain of agents: Large language models collaborating on long-context tasks. arXiv preprint arXiv:2406.02818.
|
| 279 |
+
Qingfei Zhao, Ruobing Wang, Yukuo Cen, Daren Zha, Shicheng Tan, Yuxiao Dong, and Jie Tang. 2024a. LongRAG: A dual-perspective retrieval-augmented generation paradigm for long-context question answering. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 22600-22632, Miami, Florida, USA. Association for Computational Linguistics.
|
| 280 |
+
Xiaowei Zhao, Yong Zhou, and Xiujuan Xu. 2024b. Dual encoder: Exploiting the potential of syntactic and semantic for aspect sentiment triplet extraction. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 5401-5413, Torino, Italia. ELRA and ICCL.
|
| 281 |
+
Xinran Zhao, Hongming Zhang, Xiaoman Pan, Wenlin Yao, Dong Yu, Tongshuang Wu, and Jianshu Chen. 2024c. Fact-and-reflection (FaR) improves confidence calibration of large language models. In Findings of the Association for Computational Linguistics: ACL 2024, pages 8702-8718, Bangkok, Thailand. Association for Computational Linguistics.
|
| 282 |
+
|
| 283 |
+
# A Training Configurations
|
| 284 |
+
|
| 285 |
+
We employed the DeepSpeed (Rasley et al., 2020) framework for distributed training across four GPU nodes, each equipped with four AMD MI250 GPUs. We used vLLM (Kwon et al., 2023) for inference. Our implementation builds upon OpenRLHF (Hu et al., 2024) for both SFT and DPO. Given the input sequence length of up to 128K tokens, we leveraged FlashAttention-2 (Dao, 2023) alongside Ring
|
| 286 |
+
|
| 287 |
+
Attention (Liu et al., 2023) to efficiently process extremely long sequences. The detailed hyperparameters for SFT and DPO are provided in table 6 and table 7.
|
| 288 |
+
|
| 289 |
+
Table 6: Hyperparameters for SFT.
|
| 290 |
+
|
| 291 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Learning Rate</td><td>5e-7</td></tr><tr><td>Learning Rate Schedule</td><td>Cosine Annealing</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>β1</td><td>0.9</td></tr><tr><td>β2</td><td>0.95</td></tr><tr><td>Training dtype</td><td>bf16</td></tr><tr><td>Batch Size</td><td>128</td></tr><tr><td>Max Length</td><td>131,072</td></tr></table>
|
| 292 |
+
|
| 293 |
+
Table 7: Hyperparameters for DPO.
|
| 294 |
+
|
| 295 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Learning Rate</td><td>5e-7</td></tr><tr><td>Learning Rate Schedule</td><td>Cosine Annealing</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>β1</td><td>0.9</td></tr><tr><td>β2</td><td>0.95</td></tr><tr><td>Training dtype</td><td>bf16</td></tr><tr><td>Batch Size</td><td>128</td></tr><tr><td>β</td><td>0.1</td></tr><tr><td>Max Length</td><td>131,072</td></tr></table>
|
| 296 |
+
|
| 297 |
+
# B Short Context Performance
|
| 298 |
+
|
| 299 |
+
As shown in table 8, we evaluate the short-context performance across six tasks: ARC Easy, ARC Challenge, GSM8K, MathQA, MMLU, and MMLU Pro. AgenticLU performs on par with the base model Llama3.1-8B-Instruct on short-context benchmarks, demonstrating that AgenticLU preserves the original short-context ability while greatly enhancing long-context performance.
|
| 300 |
+
|
| 301 |
+
# C Agentic Workflow without Training
|
| 302 |
+
|
| 303 |
+
We conducted an additional experiment for prompting only with our agentic workflow, and we find that with an option to generate clarifications the model does get better on multi-hop QA questions (HotPotQA), but it is generally difficult for the base model to point to the correct paragraphs directly without any training, hence often resulting in same or slightly worse performance.
|
| 304 |
+
|
| 305 |
+
Results are listed in table 9, the context length is 128K tokens.
|
| 306 |
+
|
| 307 |
+
# D Detailed Results on Seven Benchmark Tasks
|
| 308 |
+
|
| 309 |
+
As shown in table 10, table 11, table 12, table 13, table 14, table 15 and table 16, we evaluate the long-context performance across seven tasks: HotpotQA, Natural Questions, TriviaQA, PopQA, NarrativeQA, InfiniteBench QA and InfiniteBench Multiple-Choice. AgenticLU provides significant improvement for all tasks, especially for those that require multi-hop reasoning such as HotPotQA.
|
| 310 |
+
|
| 311 |
+
# E Chain-of-Clarifications Workflow
|
| 312 |
+
|
| 313 |
+
The input was first processed into chunks and grouped with paragraph tags. We list the example prompts used in AgenticLU workflow below. In training, we sampled 100 variations of the same prompt text and use them randomly to avoid training collapse.
|
| 314 |
+
|
| 315 |
+
# Chain-of-Clarifications Workflow Prompts
|
| 316 |
+
|
| 317 |
+
# [System Prompt]
|
| 318 |
+
|
| 319 |
+
You are an AI assistant specialized in long context reasoning. Analyze information thoroughly while maintaining clarity and focus. Track the full context of conversations, building connections between concepts and flagging when context review is needed. Break down complex problems into components, showing your reasoning steps and stating key assumptions. Structure your responses with clear headers and periodic summaries. Present evidence for your conclusions, acknowledge uncertainties, and request clarification when needed. Keep your analysis organized, explicit, and focused on addressing the core question.
|
| 320 |
+
|
| 321 |
+
# [Long-Context Input]
|
| 322 |
+
|
| 323 |
+
<para 1> [chunk 1] </para 1> <para 2> [chunk 2] </para 2> ... {Question}
|
| 324 |
+
|
| 325 |
+
# [Self Clarification - Raise Question]
|
| 326 |
+
|
| 327 |
+
In order to answer this question, ask one question about what you want to know in order to better answer it.
|
| 328 |
+
|
| 329 |
+
# [Contextual Grounding - Pointback]
|
| 330 |
+
|
| 331 |
+
Help me find relevant context to answer the previous clarifying question.
|
| 332 |
+
|
| 333 |
+
# [Self Clarification - Answer Question]
|
| 334 |
+
|
| 335 |
+
Based on the relevant context, answer the previous clarifying question.
|
| 336 |
+
|
| 337 |
+
# [Answer the Original Question]
|
| 338 |
+
|
| 339 |
+
Now, let's answer the final question. Be concise in your answer.
|
| 340 |
+
|
| 341 |
+
Table 8: Performance comparison of AgenticLU and Llama3.1-8B-Instruct on short-context benchmarks. Scores represent accuracy percentages, with AgenticLU demonstrating matching results across tasks.
|
| 342 |
+
|
| 343 |
+
<table><tr><td>Model</td><td>ARC Easy</td><td>ARC Challenge</td><td>GSM8k</td><td>MathQA</td><td>MMLU</td><td>MMLU Pro</td><td>Avg</td></tr><tr><td>Llama3.1-8B</td><td>84.80</td><td>59.64</td><td>80.13</td><td>42.88</td><td>68.72</td><td>37.71</td><td>62.31</td></tr><tr><td>AgenticLU-8B</td><td>83.96</td><td>58.36</td><td>80.51</td><td>41.74</td><td>68.38</td><td>37.51</td><td>61.74</td></tr></table>
|
| 344 |
+
|
| 345 |
+
Table 9: Performance comparison across different QA benchmarks with 128K token context length, with or without training.
|
| 346 |
+
|
| 347 |
+
<table><tr><td>Model</td><td>HotpotQA</td><td>NaturalQ</td><td>PopQA</td><td>TriviaQA</td><td>Avg</td></tr><tr><td>Llama-3.1-8B</td><td>40.0</td><td>56.1</td><td>56.1</td><td>80.6</td><td>58.2</td></tr><tr><td>Llama-3.1-8B + Prompting Only</td><td>53.3</td><td>56.7</td><td>51.6</td><td>72.8</td><td>58.6</td></tr><tr><td>AgenticLU-8B</td><td>71.1</td><td>77.8</td><td>65.5</td><td>88.3</td><td>75.7</td></tr></table>
|
| 348 |
+
|
| 349 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">HotpotQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>63.3</td><td>56.7</td><td>61.1</td><td>47.8</td><td>40.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>60.0</td><td>66.7</td><td>56.7</td><td>58.9</td><td>56.7</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>71.1</td><td>66.7</td><td>72.2</td><td>62.2</td><td>50.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>58.9</td><td>58.9</td><td>62.2</td><td>61.1</td><td>48.9</td></tr><tr><td>ProLong-8B</td><td>62.2</td><td>65.6</td><td>57.8</td><td>53.3</td><td>58.9</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>61.1</td><td>58.9</td><td>73.3</td><td>56.7</td><td>57.8</td></tr><tr><td>AgenticLU-8B</td><td>81.1</td><td>75.6</td><td>78.9</td><td>75.6</td><td>71.1</td></tr></table>
|
| 350 |
+
|
| 351 |
+
Table 10: Long-context performance on HotpotQA.
|
| 352 |
+
|
| 353 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">Nature Questions</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>71.7</td><td>69.4</td><td>70.6</td><td>73.9</td><td>56.1</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>66.7</td><td>66.1</td><td>58.9</td><td>55.6</td><td>38.9</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>67.8</td><td>71.7</td><td>66.7</td><td>62.2</td><td>50.6</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>63.3</td><td>63.3</td><td>61.7</td><td>59.4</td><td>40.0</td></tr><tr><td>ProLong-8B</td><td>83.3</td><td>82.2</td><td>83.9</td><td>90.0</td><td>77.8</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>65.6</td><td>76.1</td><td>79.4</td><td>77.2</td><td>73.9</td></tr><tr><td>AgenticLU-8B</td><td>91.7</td><td>91.1</td><td>85.0</td><td>85.0</td><td>77.8</td></tr></table>
|
| 354 |
+
|
| 355 |
+
Table 11: Long-context performance on Nature Questions.
|
| 356 |
+
|
| 357 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">TriviaQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>82.8</td><td>86.7</td><td>85.6</td><td>81.1</td><td>80.6</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>84.4</td><td>86.1</td><td>90.0</td><td>82.2</td><td>57.2</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>78.9</td><td>88.3</td><td>89.4</td><td>87.2</td><td>86.7</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>87.8</td><td>83.9</td><td>84.4</td><td>86.7</td><td>84.4</td></tr><tr><td>ProLong-8B</td><td>71.1</td><td>88.3</td><td>78.9</td><td>82.8</td><td>78.3</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>77.2</td><td>79.4</td><td>83.9</td><td>83.9</td><td>83.3</td></tr><tr><td>AgenticLU-8B</td><td>88.3</td><td>92.2</td><td>91.1</td><td>93.3</td><td>88.3</td></tr></table>
|
| 358 |
+
|
| 359 |
+
Table 12: Long-context performance on TriviaQA.
|
| 360 |
+
|
| 361 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">8K</td><td rowspan="2">16K</td><td colspan="3">PopQA</td></tr><tr><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>61.1</td><td>62.8</td><td>57.2</td><td>58.3</td><td>56.1</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>61.7</td><td>58.9</td><td>55.0</td><td>58.9</td><td>60.6</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>62.2</td><td>63.3</td><td>58.9</td><td>55.0</td><td>61.1</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>65.0</td><td>64.4</td><td>58.9</td><td>53.3</td><td>65.0</td></tr><tr><td>ProLong-8B</td><td>67.8</td><td>68.3</td><td>70.0</td><td>64.4</td><td>65.6</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>47.8</td><td>54.4</td><td>54.4</td><td>57.2</td><td>50.6</td></tr><tr><td>AgenticLU-8B</td><td>82.2</td><td>82.2</td><td>78.3</td><td>76.7</td><td>65.6</td></tr></table>
|
| 362 |
+
|
| 363 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">NarrativeQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>15.0</td><td>19.0</td><td>27.0</td><td>35.0</td><td>38.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>23.0</td><td>30.0</td><td>36.0</td><td>51.0</td><td>43.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>22.0</td><td>25.0</td><td>38.0</td><td>41.0</td><td>39.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>18.0</td><td>35.0</td><td>37.0</td><td>42.0</td><td>46.0</td></tr><tr><td>ProLong-8B</td><td>18.0</td><td>27.0</td><td>28.0</td><td>38.0</td><td>42.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>23.3</td><td>23.3</td><td>50.0</td><td>50.0</td><td>46.7</td></tr><tr><td>AgenticLU-8B</td><td>27.0</td><td>35.0</td><td>41.0</td><td>49.0</td><td>56.0</td></tr></table>
|
| 364 |
+
|
| 365 |
+
Table 14: Long-context performance on NarrativeQA.
|
| 366 |
+
|
| 367 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">InfbenchQA</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>17.0</td><td>31.0</td><td>36.0</td><td>40.0</td><td>48.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>21.0</td><td>36.0</td><td>36.0</td><td>45.0</td><td>43.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>17.0</td><td>26.0</td><td>32.0</td><td>41.0</td><td>40.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>19.0</td><td>30.0</td><td>40.0</td><td>42.0</td><td>37.0</td></tr><tr><td>ProLong-8B</td><td>16.0</td><td>31.0</td><td>29.0</td><td>31.0</td><td>45.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>16.7</td><td>23.3</td><td>36.7</td><td>43.3</td><td>36.7</td></tr><tr><td>AgenticLU-8B</td><td>25.0</td><td>39.0</td><td>42.0</td><td>47.0</td><td>50.0</td></tr></table>
|
| 368 |
+
|
| 369 |
+
Table 15: Long-context performance on InfbenchQA.
|
| 370 |
+
|
| 371 |
+
<table><tr><td rowspan="2">Model</td><td colspan="5">InfbenchChoice</td></tr><tr><td>8K</td><td>16K</td><td>32K</td><td>64K</td><td>128K</td></tr><tr><td>Llama3.1-8B</td><td>9.0</td><td>12.0</td><td>24.0</td><td>39.0</td><td>55.0</td></tr><tr><td>Llama3.1-8B+step-by-step</td><td>15.0</td><td>13.0</td><td>41.0</td><td>41.0</td><td>44.0</td></tr><tr><td>Llama3.1-8B+plan&solve</td><td>27.0</td><td>15.0</td><td>48.0</td><td>55.0</td><td>58.0</td></tr><tr><td>Llama3.1-8B+fact&reflect</td><td>20.0</td><td>14.0</td><td>38.0</td><td>51.0</td><td>56.0</td></tr><tr><td>ProLong-8B</td><td>22.0</td><td>27.0</td><td>37.0</td><td>48.0</td><td>58.0</td></tr><tr><td>Llama3.1-8B+LongRAG</td><td>16.7</td><td>30.0</td><td>43.3</td><td>53.3</td><td>63.3</td></tr><tr><td>AgenticLU-8B</td><td>45.0</td><td>46.0</td><td>47.0</td><td>64.0</td><td>68.0</td></tr></table>
|
| 372 |
+
|
| 373 |
+
Table 16: Long-context performance on Infbench-Choice.
|
| 374 |
+
|
| 375 |
+
Table 13: Long-context performance on PopQA.
|
| 376 |
+
|
| 377 |
+
# F Evaluation Template
|
| 378 |
+
|
| 379 |
+
We use GPT-4o (OpenAI, 2023) to judge if the model's answer is correct. The specific prompt template with the structured output class is shown below.
|
| 380 |
+
|
| 381 |
+
```txt
|
| 382 |
+
Please verify the following answer:
|
| 383 |
+
Question: {question}
|
| 384 |
+
Ground Truth Answers: {groundtruth}
|
| 385 |
+
Predicted Answer: {answer}
|
| 386 |
+
Your task is to determine whether the predicted
|
| 387 |
+
→ answer correctly matches the ground truth.
|
| 388 |
+
→ Focus on overall correctness and provide a
|
| 389 |
+
→ detailed explanation in the following
|
| 390 |
+
→ format:
|
| 391 |
+
class VerificationResult:
|
| 392 |
+
explanation: str # Justification
|
| 393 |
+
confidence: float # Confidence score in
|
| 394 |
+
→ the range [0,1]
|
| 395 |
+
correct_answer: bool # True if the
|
| 396 |
+
→ prediction is correct, otherwise False
|
| 397 |
+
```
|
2025/Self-Taught Agentic Long Context Understanding/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52f6d62daf3dd8d5396c323339be0ca365d6db55d1cc93d601d8e039e2d4f1a1
|
| 3 |
+
size 650123
|
2025/Self-Taught Agentic Long Context Understanding/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/31fc5769-8d08-480d-b31b-6db4d030bf19_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76122b06ba9adaa0d47f9c9fcda8f1e0b90f7baa3228b20c48d1c73b134cfd54
|
| 3 |
+
size 3962252
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/full.md
ADDED
|
@@ -0,0 +1,613 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models
|
| 2 |
+
|
| 3 |
+
Qika Lin $^{1}$ , Tianzhe Zhao $^{2}$ , Kai He $^{1}$ , Zhen Peng $^{2}$ , Fangzhi Xu $^{2}$ , Ling Huang $^{1}$ , Jingying Ma $^{1}$ , Mengling Feng $^{1,*}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ National University of Singapore $^{2}$ Xi'an Jiaotong University qikalin@foxmail.com ephfm@nus.edu.sg
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Due to the presence of the natural gap between Knowledge Graph (KG) structures and the natural language, the effective integration of holistic structural information of KGs with Large Language Models (LLMs) has emerged as a significant question. To this end, we propose a two-stage framework to learn and apply quantized codes for each entity, aiming for the seamless integration of KGs with LLMs. Firstly, a self-supervised quantized representation (SSQR) method is proposed to compress both KG structural and semantic knowledge into discrete codes (i.e., tokens) that align the format of language sentences. We further design KG instruction-following data by viewing these learned codes as features to directly input to LLMs, thereby achieving seamless integration. The experiment results demonstrate that SSQR outperforms existing unsupervised quantized methods, producing more distinguishable codes. Further, the fine-tuned LLaMA2 and LLaMA3.1 also have superior performance on KG link prediction and triple classification tasks, utilizing only 16 tokens per entity instead of thousands in conventional prompting methods<sup>1</sup>.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Large Language Models (LLMs), such as LLaMA (Touvron et al., 2023a,b) and GPT-4 (OpenAI, 2023), are initiating considerable transformations within the fields of artificial intelligence (AI) and natural language processing (NLP). They have achieved substantial success (Peng et al., 2023; Wang et al., 2024; Xu et al., 2024b; Luo et al., 2025), and thus, have been regarded as potential pathways towards achieving the ultimate goal of artificial general intelligence (Yang et al., 2024a). However, the specific training strategies employed
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Illustration of different strategies to integrate KGs with LLMs. (a) The direct method utilizes (sampled) graph structures and semantic text as inputs. (b) Our method for seamlessly integrating KGs with LLMs using learned quantized and discrete codes.
|
| 17 |
+
|
| 18 |
+
by LLMs render them black-box models and struggle to retrieve the relevant facts necessary for the correct answer (Pan et al., 2024), resulting in low performance in complex reasoning scenarios (Xu et al., 2025, 2024a). Furthermore, knowledge hallucination becomes a serious issue, which may generate wrong statements that conflict with reality (Bang et al., 2023; Ji et al., 2023). It presents considerable risks, particularly in specialized fields like law (Cui et al., 2023) and healthcare (Lin et al., 2025; He et al., 2025).
|
| 19 |
+
|
| 20 |
+
Knowledge Graphs (KGs), also known as knowledge bases, organizes massive amounts of factual knowledge in a structured and interpretable manner by the triple form of (subject, relation, object). They can serve as a vital supplement to LLMs (Pan et al., 2024), providing an alternative way to address hallucinations and generate more precise answers using continual fine-tuning (Zhang et al., 2024b; Hron et al., 2024) or retrieve-based reasoning (Sun et al., 2024; Tan et al., 2024; Zhang et al., 2024a). However, the KGs' structure is in a graph form, which markedly differs from the discrete token format of the natural language in LLMs. Thus, due to the presence of this natural representation gap, the effective integration of comprehensive structural information of KGs with LLMs has emerged as a significant question.
|
| 21 |
+
|
| 22 |
+
As shown in Figure 1 (a), one straightforward
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 2: The statistics of 2-hop sampled neighbors and needed tokens (by LLaMA2) for entities in FB15k-237.
|
| 26 |
+
|
| 27 |
+
method involves converting relevant triples into textual prompts and then feeding them into LLMs, combined with semantic text. This simple strategy would necessitate a substantial number of tokens, causing an enormous resource burden. Supposing the average degree of an entity is $d$ , the number of its neighbors grows exponentially and reaches $d^{h}$ in the $h$ -hop. While certain sampling strategies, such as random walk (Ko et al., 2024) and path pruning (Tan et al., 2024) have been introduced, a considerable computational load also exists. As shown in Figure 2, when only sample $20\%$ 2-hop neighbors in FB15k-237 (Toutanova and Chen, 2015) dataset, the median and mean number of neighbors for entities are about 10 and 107, which requires median and mean tokens of about 300 and 3K, respectively. When with $30\%$ sampling, even the median needed tokens reach about $2.5\mathrm{K}$ per entity. Considering that KG tasks may involve multiple entities, even the most advanced long-context LLMs may face challenges in handling them. Meanwhile, employing KGs' substructures through sampling could disrupt the holistic modeling of the entire graph, potentially resulting in information loss and sub-optimal performance for downstream tasks.
|
| 28 |
+
|
| 29 |
+
Another alternate strategy involves integrating continuous KG embedding with LLMs by a learnable adapter (Zhang et al., 2024b), introducing new networks in the framework. It requires additional precise alignment between the different latent representation spaces of KG embeddings and LLMs. Considering the above context, we aim to explore the potential to bridge the natural gap between KG structure and natural language and then integrate KGs with LLMs. Inspired by the early fusion strategy in multimodal LLMs (Team, 2024), the general idea of this study is to learn compressed and discrete entity codes (i.e., tokens), rather than continuous embeddings, by quantized techniques to represent holistic structural and semantic information of
|
| 30 |
+
|
| 31 |
+
entities in KGs. They have the same discrete form of natural language, e.g., the quantized codes in Figure 1 (b) align the format of language sentences. Thus, seamlessly integrating KGs with LLMs can be realized by directly inputting the learned codes into LLMs, merely requiring an expansion of the LLMs' tokenizer vocabulary and eliminating the need for any other framework modifications.
|
| 32 |
+
|
| 33 |
+
Although several studies have conducted quantized representations on KGs (Galkin et al., 2022; Chen et al., 2023; Li et al., 2023), they universally employ an unsupervised approach to select anchors to represent entities, failing to the holistic structural and semantic modeling. In this study, we first introduce a self-supervised quantized representation for KGs, aiming to learn discrete codes for each entity that can reconstruct KG structures and align with semantic texts. A graph convolutional network (GCN) is used as an encoder to model neighbor structures of KGs, and vector quantization (Van Den Oord et al., 2017) is implemented for the KG quantized representation learning. Further, based on learned entity codes, we construct specific instructions for KG tasks, which can be seamlessly integrated with LLMs, presenting a new paradigm to employ LLMs in KG applications. In summary, our contributions lie in the following three folds:
|
| 34 |
+
|
| 35 |
+
- We propose a self-supervised quantized representation (SSQR) method that is capable of acquiring both KG structural and semantic knowledge. To our knowledge, this is the first study for KG quantization learning in a self-supervised manner.
|
| 36 |
+
- We propose the first study that utilizes the derived codes to seamlessly integrate KGs with LLMs, which is achieved by viewing codes as input features and designing KG instruction-following data. It has extensive potential applications, e.g., KG link prediction and triple classification.
|
| 37 |
+
- From the experiment view, SSQR exhibits superior performance compared to current unsupervised quantized methods and the learned codes are more distinguishable. Besides, using only 16 codes for each entity, the fine-tuned LLaMA2 and LLaMA3.1 have superior performance on KG link prediction and triple classification tasks.
|
| 38 |
+
|
| 39 |
+
# 2 Quantized Representation for KGs
|
| 40 |
+
|
| 41 |
+
Formally, a KG can be represented as $\mathcal{G} = \{\mathcal{E},\mathcal{R},\mathcal{F}\}$ , which is the combination of entities $\mathcal{E}$ , relations $\mathcal{R}$ , and triples $\mathcal{F} \subseteq \mathcal{E} \times \mathcal{R} \times \mathcal{E}$ . Each triple is in the form of $(h,r,t)$ . For each entity
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 3: The overall architecture of our study. (a) is for SSQR learning. (b) is for instruction tuning for KG tasks, where the learned quantized representations serve as features. Icons $\star$ and $\clubsuit$ represent the status of the module during training, indicating if it is frozen or being updated, respectively.
|
| 45 |
+
|
| 46 |
+
$e$ , it has the structural and semantic information, where we utilize the entity neighbors $\mathcal{N}(e)$ and its textual description $T_{e}$ to describe, respectively. Although here we only use one-order neighbors $\mathcal{N}(e)$ for demonstration, our model is capable of capturing high-order structure information by multi-layer GCNs. In the following contents, we will dually describe the structural and semantic modeling, as well as the quantized representation for KGs.
|
| 47 |
+
|
| 48 |
+
Structural Modeling. Here, we utilize simple but effective GCNs (Lin et al., 2022) to embed the structural information of KGs, which follows the iterative message-passing strategy to update the entity embeddings from $l$ -th layer to $(l + 1)$ -th:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathbf {e} _ {j} ^ {l + 1} = \mathbf {W} _ {1} ^ {l} \mathbf {e} _ {j} + \sum_ {(e _ {i}, r) \in \mathcal {N} (e _ {j})} \mathbf {W} _ {2} ^ {l} \mathbf {m} _ {e _ {i}, r, e _ {j}} ^ {l}, \tag {1}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\mathbf{e}$ is the embedding of the entity and the $\mathbf{W}$ denotes the transformation matrix. $\mathbf{m}$ is the message information of the specific edge. Here, we follow the composition operation (Vashishth et al., 2020) for calculation:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathbf {m} _ {e _ {i}, r, e _ {j}} ^ {l} = \mathbf {e} _ {i} ^ {l} * \mathbf {v} _ {r} ^ {l}, \tag {2}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $\mathbf{v}$ is the relation embedding and $*$ is elementwise multiplication for two vectors. Between different layers, relation representation is updated by linear transformation: $\mathbf{v}^{l + 1} = \mathbf{W}_{rel}^l\mathbf{v}^l$ . After $L$ GCN layers, the entity representation $\mathbf{e}^L$ and relation representation $\mathbf{v}^L$ are all obtained.
|
| 61 |
+
|
| 62 |
+
Quantized Representation. Here, we introduce the quantized representation for discrete KG representation. For its implementation, inspired by VQ-VAE (Van Den Oord et al., 2017) and VQGAN (Esser et al., 2021), we first maintain a discrete cookbook $\mathbf{X} = [\mathbf{x}_1,\mathbf{x}_2,\dots ,\mathbf{x}_M]$ , where
|
| 63 |
+
|
| 64 |
+
each $\mathbf{x}_m\in \mathbb{R}^d$ is a learnable vector to represent code $m$ . Using this, a $d$ -dimensional vector $\mathbf{e}$ can be quantized by matching the nearest code:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
Q (\mathbf {e}) = \mathbf {x} _ {i}, \text {w h e r e} i = \underset {m} {\arg \min } \| \mathbf {e} - \mathbf {x} _ {m} \| _ {2} ^ {2}, \tag {3}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $Q$ is quantized function. In this way, each vector can be assigned to only one code, which may lack representation capacity and distinguishability for KG embedding. So we first transform the learned entity embedding $\mathbf{e}^L$ to multiple times of dimension $d$ , i.e., $\mathrm{FFN}(\mathbf{e}^L) \in \mathbb{R}^{N \times d}$ . In this way, each entity can be assigned to a code sequence with the length of $N$ . Thus, each entity can be represented to $[q_1, q_2, \dots, q_N]$ by Eq. (3), where $q_n$ is the code index in the codebook. The quantized representation vector can be:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathbf {q} _ {e} = \mathbf {W} _ {q} Q (\mathbf {e} ^ {L}), Q (\mathbf {e} ^ {L}) = [ \mathbf {x} _ {q _ {1}}, \mathbf {x} _ {q _ {2}} \dots \mathbf {x} _ {q _ {N}} ]. \tag {4}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
Based on this, the whole model can be optimized in an end-to-end manner by the straight-through gradient estimator (Van Den Oord et al., 2017):
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\mathcal {L} _ {q} = \left\| \operatorname {s g} \left[ \mathbf {e} ^ {L} \right] - \mathbf {q} _ {e} \right\| _ {2} ^ {2} + \beta \left\| \mathbf {e} ^ {L} - \operatorname {s g} \left[ \mathbf {q} _ {e} \right] \right\| _ {2} ^ {2}, \tag {5}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\mathrm{sg}$ stands for stop gradient, which is characterized by its identity function during forward computation and has zero partial derivatives for backpropagation. $\| \mathrm{sg}[\mathbf{e}^L] - \mathbf{q}_e\| _2^2$ is codebook loss assuring the codes are close to encoder's outputs and $\| \mathbf{e}^{L} - \mathrm{sg}[\mathbf{q}_{e}]\|_{2}^{2}$ is commit loss encouraging the encoder generating outputs close to codes. $\beta$ is a hyper-parameter to trade off the two terms.
|
| 83 |
+
|
| 84 |
+
Structure Reconstruction. To inject the holistic structure information into the quantized representations, we hope the learned entity codes can reconstruct KG structures. But directly predicting
|
| 85 |
+
|
| 86 |
+
adjacency matrix as is done in research for homogeneous graphs (Yang et al., 2024b) is inappropriate, because KGs' structures are more heterogeneous and sparse. Thus, based on quantized embeddings, we verify the validity of each triplet $(h, r, t)$ and implicitly reflect the holistic KG, where ConvE (Dettmers et al., 2018) is implemented:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
s (h, r, t) = \left[ \operatorname {F l a t} \left(\operatorname {C o n v} \left(\bar {\mathbf {q}} _ {h} \| \bar {\mathbf {v}} _ {r} ^ {L}\right)\right) \right] ^ {\top} \mathbf {W} _ {c} \mathbf {q} _ {t}. \tag {6}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
Flat and Conv are the flatten and 2D convolution operations, respectively. $\bar{\mathbf{q}}$ and $\bar{\mathbf{v}}$ are transformation matrices for embeddings $\mathbf{q}$ and $\mathbf{v}$ . The final score of triple $(h,r,t)$ can be regularized by the sigmoid function $\sigma$ : $\tilde{y} = \sigma(s(h,r,t))$ . Finally, compared with actual label $y$ , the structure modeling can be learned by binary cross-entropy loss:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathcal {L} _ {s t} = - \frac {1}{| \mathcal {F} |} \sum_ {i} \left[ y _ {i} \log \tilde {y} _ {i} + \left(1 - y _ {i}\right) \log \left(1 - \tilde {y} _ {i}\right) \right]. \tag {7}
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Semantic Distilling. For semantic modeling, our goal is to ensure that the learned codes for each entity can imply the information of its corresponding text descriptions. Considering the substantial success of LLMs, we introduce a simple yet effective distilling strategy to learn from them. Specifically, we first obtain text embeddings of KG entities by LLMs: $\mathbf{t}_e = LLM(T_e)$ . Here, we utilize the text-embedding-3-large as the LLM by OpenAI API $^2$ considering its strong ability for text embeddings. It embeds each text sequence into a 3072-dimension vector. Based on this, we make the model have the ability to align its semantic embedding through the learned quantized output, where the loss of mean square error is utilized:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\mathcal {L} _ {s e} = - \frac {1}{| \mathcal {E} |} \sum_ {i} \left\| \mathbf {W} _ {s} \mathbf {q} _ {e _ {i}} - \mathbf {t} _ {e _ {i}} \right\| _ {2} ^ {2}. \tag {8}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
In this way, we distil the semantic knowledge from the LLMs to our discrete codes of GCN outputs.
|
| 105 |
+
|
| 106 |
+
On the whole, the entire quantized representation model can be updated by the combination of quantized, structural, and semantic loss:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathcal {L} = \mathcal {L} _ {q} + \mathcal {L} _ {s t} + \mathcal {L} _ {s e}. \tag {9}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
# 3 Tuning LLMs with SSQR
|
| 113 |
+
|
| 114 |
+
Employing the quantized representation, each entity in KGs can be illustrated by codes of length $N$ .
|
| 115 |
+
|
| 116 |
+
Instruction: This is a knowledge graph completion task, which needs to predict the tail entity for an incomplete query triplet.
|
| 117 |
+
|
| 118 |
+
Input: The query triplet is $(h, r, ?)$ .
|
| 119 |
+
|
| 120 |
+
The quantized representation of entity $h$ is: $[\mathrm{Code}(h)]$
|
| 121 |
+
|
| 122 |
+
The answer candidates and corresponding quantized representations are as follows:
|
| 123 |
+
|
| 124 |
+
entity 1, [Code( entity 1)]
|
| 125 |
+
|
| 126 |
+
entity 20, [Code entity 20)]
|
| 127 |
+
|
| 128 |
+
Please generate quantized representations of the top-3 potential answers, ranked from highest to lowest:
|
| 129 |
+
|
| 130 |
+
Output: 1. [Code(candidate 1)]
|
| 131 |
+
2. [Code(candidate 2)]
|
| 132 |
+
3. [Code(candidate 3)]
|
| 133 |
+
|
| 134 |
+
Table 1: Instruction format for link prediction, where learned codes serve as entity features to help ranking.
|
| 135 |
+
|
| 136 |
+
This can be perceived as the same form of natural language, thereby facilitating its seamless integration with LLMs. Every learned code can serve as a new token, necessitating only an expansion of the token vocabulary within the LLM's tokenizer.
|
| 137 |
+
|
| 138 |
+
This paradigm can be applied to various KG tasks, by constructing corresponding instruction data, where the learned entity codes could act as features. For example, the KG link prediction task can be done using the instruction form as shown in Table 1. Specifically, the code sequence of entity $e$ can be $\text{Code}(e)$ : "[CODEq1] [CODEq2] ... [CODEqN]". For each query $(h, r, ?)$ , we provide the codes $\text{Code}(h)$ for query head $h$ . Besides, we give several answer candidates along with their associated codes for LLM ranking. Candidates can be obtained by conventional KG embedding models, e.g., TransE (Bordes et al., 2013) and CompGCN (Vashishth et al., 2020). The goal is to predict the actual ranking list of candidates using their discrete codes. The detailed instructions for triple classification are described in Section C of the Appendix. For the LLM fine-tuning, the next token prediction is carried out based on the instruction $\mathcal{I}$ and previously generated text tokens:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\mathcal {L} _ {l l m} = - \sum_ {n = 1} ^ {N} \log \left(x _ {n} \mid x _ {< n}, \mathcal {I}\right). \tag {10}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
# 4 Experiments and Analysis
|
| 145 |
+
|
| 146 |
+
To verify the effectiveness of the proposed SSQR and its ability to integrate with LLMs, We carry out experiments on the KG link prediction and triple classification tasks, where the popular datasets
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
(a) Original text embedding.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
(b) SSQR.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 4: The cosine similarity of quantized representations on the WN18RR dataset (sampled 8 entities).
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
(c) SSQR w/o GCN.
|
| 159 |
+
(d) SSQR w/o semantics.
|
| 160 |
+
|
| 161 |
+
Table 2: The results of baselines are from Li et al. (2023). $\dagger$ means the improvement of SSQR compared to the best performance in each metric. $\ddagger$ means the ablation results compared to the results of SSQR.
|
| 162 |
+
|
| 163 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">WN18RR</td><td colspan="2">FB15k-237</td></tr><tr><td>MRR</td><td>Hits@10</td><td>MRR</td><td>Hits@10</td></tr><tr><td>NodePiece</td><td>0.403</td><td>0.515</td><td>0.256</td><td>0.420</td></tr><tr><td>+RandomEQ</td><td>0.425</td><td>0.522</td><td>0.263</td><td>0.425</td></tr><tr><td>EARL</td><td>0.440</td><td>0.527</td><td>0.310</td><td>0.501</td></tr><tr><td>+RandomEQ</td><td>0.442</td><td>0.536</td><td>0.308</td><td>0.502</td></tr><tr><td>SSQR</td><td>0.483</td><td>0.578</td><td>0.361</td><td>0.545</td></tr><tr><td>Δ(↑)†</td><td>9.28%</td><td>7.84%</td><td>16.45%</td><td>8.57%</td></tr><tr><td>w/o GCN</td><td>0.479</td><td>0.577</td><td>0.309</td><td>0.482</td></tr><tr><td>Δ(↓)‡</td><td>0.83%</td><td>0.17%</td><td>14.40%</td><td>11.56%</td></tr><tr><td>w/o sem</td><td>0.447</td><td>0.521</td><td>0.347</td><td>0.528</td></tr><tr><td>Δ(↓)‡</td><td>7.45%</td><td>9.86%</td><td>3.88%</td><td>3.12%</td></tr></table>
|
| 164 |
+
|
| 165 |
+
WN18RR (Dettmers et al., 2018) and FB15k-237 (Toutanova and Chen, 2015) as well as FB15k-237N (Lv et al., 2022) are utilized. For SSQR, a 2-layer GCN is utilized as the encoder. $\beta$ is set to 0.25 in the experiment. The embedding dimension is set to 200 as default. The number of codebook $M$ and codes for each entity $N$ is set to 2048 and 32. The maximum number of training epochs is 800. For LLM fine-tuning, LLaMA2 (7B) and LLaMA3.1 (8B) are utilized using $M$ as 2048 and $N$ as 16 for computation efficiency. The query for head prediction $(?,r,t)$ is transformed to the tail prediction by adding reverse relation of $r$ . The mean reciprocal rank (MRR) and Hits@ $k$ values are set as evaluation metrics for model performance. Moreover, the triple classification task employs accuracy, precision, recall and F1-score as metrics. More detailed settings are shown in the Appendix.
|
| 166 |
+
|
| 167 |
+
# 4.1 SSQR Results
|
| 168 |
+
|
| 169 |
+
We compare the performance of our SSQR with three unsupervised methods, i.e., Node-Piece (Galkin et al., 2022), EARL (Chen et al., 2023), and random entity quantization (RandomEQ
|
| 170 |
+
|
| 171 |
+
for short) (Li et al., 2023), for KG quantized representations. The results are given in Table 2.
|
| 172 |
+
|
| 173 |
+
As can be observed, SSQR achieves significant performance improvement against baselines, which has $9.28\%$ and $7.84\%$ improvements compared with the previous optimal performance on the WN18RR dataset. When at the FB15k-237 dataset, the improvements are even better, i.e., $16.45\%$ and $8.57\%$ . Although these unsupervised methods are simple and efficient for implementation, they fail to capture the structures of KGs. In contrast, our proposed self-supervised strategies would provide an effective way for quantized representations for KG structure learning.
|
| 174 |
+
|
| 175 |
+
# 4.2 SSQR Result Analysis
|
| 176 |
+
|
| 177 |
+
Ablation Studies. We carry out the ablation studies to verify the effectiveness of each module in SSQR as the bottom part of Table 2. Generally, the performance of link prediction degrades when GCN or semantic distilling is removed, but the extent of degradation varies across different datasets. It can be seen that the GCN encoder is more important for the FB15k-237 dataset (14.40% and 11.56% decline), while semantic information has more impact on WN18RR (7.45% and 9.86%). This may be due to the fact that FB15k-237 contains a rich KG structure which requires GCN to capture, while the semantic text is more important for WN18RR to make up for the defects caused by the lack of rich structural information.
|
| 178 |
+
|
| 179 |
+
Relevance among Entity Codes. We also calculate the cosine similarity of quantized representation in Figure 4, including the original text embedding, SSQR, SSQR w/o GCN, and SSQR w/o semantics. When using only text embeddings, the similarities are all small positive values. SSQR w/o GCN has similarities that are all close to 1. These phenomena indicate that entity representations are in a small corner of the space (i.e., anisotropic), where the representation space is not fully utilized
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 5: The effects of codebook length $(M)$ and sequence length $(N)$ for each entity.
|
| 183 |
+
|
| 184 |
+
for efficient representation. SSQR solves this problem to a certain extent, with a greater range and variety of similarities. Removing semantic information would diminish that advantage.
|
| 185 |
+
|
| 186 |
+
Impacts of $M$ and $N$ . The number of codebooks and sequence lengths for codes, i.e., $M$ and $N$ , are vital hyper-parameters for SSQR. We explore their impacts in Figure 5. Generally, larger $M$ and $N$ would lead to better performance as they increase the modeling ability of SSQR. In the WN8RR dataset, $N$ has a greater impact on $M$ , indicating the necessity of a large $N$ for holistic and distinguishable representations. It may be caused by the sparser structure and more entities in the WN18RR.
|
| 187 |
+
|
| 188 |
+
Distinguishability of SSQR. Following RandomEQ, we calculate the general entropy and Jaccard distance to show codes-level and codewords-level distinguishability, respectively. For general entropy, SSQR has 16.76 and 15.27 on WN18RR and FB15k-237 datasets, similar to RandomEQ (16.75/15.27) and higher than that of NodePiece (15.94/15.26) and EARL (8.20/14.50). It shows that our method has more diverse entity codes and better entity differentiation ability than other quantization methods. The Jaccard distances of each model are shown in Figure 6. RandomEQ and SSQR have high values that are far better than those of NodePiece and EARL. RandomEQ is superior on the FB15k-237 dataset but SSQR performs better on the WN18RR dataset. In summary, SSQR exhibits a robust capacity to distinguish different entities and effectively represent KGs.
|
| 189 |
+
|
| 190 |
+
# 4.3 Quantized Representations with LLMs
|
| 191 |
+
|
| 192 |
+
Link Prediction. For fine-tuning, we utilize the pre-trained AdaProp (Zhang et al., 2023) to generate 20 candidates for each query as it has strong and balanced performance on most KG tasks. For comparison, we selected the current advanced embedding models, like TransE (Bordes et al., 2013), CompGCN (Vashishth et al., 2020),
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 6: The mean Jaccard distance between codes of a specific entity and its $k$ nearest ones.
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
|
| 199 |
+
AdaProp (Zhang et al., 2023), MA-GNN (Xu et al., 2023), TCRA (Guo et al., 2024a), and DiffusionE (Cao et al., 2024). Besides, we include five advanced LLM-based methods for more direct comparison, including KICGPT (Wei et al., 2023), CSProm-KG-CD (Li et al., 2024), ARR (Chen et al., 2024), KG-FIT (Jiang et al., 2024), and MKGL (Guo et al., 2024b).
|
| 200 |
+
|
| 201 |
+
The results of link prediction are shown in Table 3. It can be observed that SSQR with LLaMA2 or LLaMA3.1 is obviously superior in KG link prediction against general embedding methods. Compared with the previous state-of-the-art MA-GNN, SSQR with LLaMA2 achieves about $4.60\%$ , $8.09\%$ , $4.39\%$ , $-0.88\%$ and $18.47\%$ , $32.62\%$ , $18.31\%$ , $4.92\%$ improvement in two datasets, respectively.
|
| 202 |
+
|
| 203 |
+
Compared with LLM-based methods, SSQR-LLaMA2 also shows competitive performance. It is better than KICGPT, CSProm-KG-CD, and ChatGPT. Even KICGPT achieves good results on the FB15k-237 dataset, it can also be raised by $8.98\%$ , $14.37\%$ , $9.60\%$ , and $7.76\%$ . For the KG-FIT (HAKE), it also has $6.87\%$ , $12.30\%$ , $3.87\%$ , and $-3.16\%$ improvements on the WN18RR dataset. Although there is a slight deficiency in terms of Hits@10, improvements on other metrics are high. Meanwhile, SSQR-LLaMA3.1 is better than SSQR-LLaMA2, demonstrating that learned quantized representations can be used for a more powerful LLM to get better performance. From all the results, our methods generally achieve a greater improvement in the Hits@1 metric, which is caused by the candidate selection and ranking strategies we used in LLM fine-tuning. The candidate selection model may have limited ability, but our method has a strong ability to select the correct answer from all candidates. This demonstrates that our method has good scalability and can be further improved with more accurate candidate selection models.
|
| 204 |
+
|
| 205 |
+
Table 3: The experiment results of general embedding methods and LLM-based methods for KG link prediction.
|
| 206 |
+
|
| 207 |
+
<table><tr><td rowspan="2">Model</td><td colspan="4">WN18RR</td><td colspan="4">FB15k237</td></tr><tr><td>MRR</td><td>Hits@1</td><td>Hits@3</td><td>Hits@10</td><td>MRR</td><td>Hits@1</td><td>Hits@3</td><td>Hits@10</td></tr><tr><td colspan="9">General Embedding Methods</td></tr><tr><td>TransE (Bordes et al., 2013)</td><td>0.223</td><td>0.014</td><td>0.401</td><td>0.529</td><td>0.330</td><td>0.231</td><td>0.369</td><td>0.528</td></tr><tr><td>CompGCN (Vashishth et al., 2020)</td><td>0.479</td><td>0.443</td><td>0.494</td><td>0.546</td><td>0.355</td><td>0.264</td><td>0.390</td><td>0.535</td></tr><tr><td>AdaProp (Zhang et al., 2023)</td><td>0.562</td><td>0.499</td><td>-</td><td>0.671</td><td>0.417</td><td>0.331</td><td>-</td><td>0.585</td></tr><tr><td>MA-GNN (Xu et al., 2023)</td><td>0.565</td><td>0.507</td><td>0.592</td><td>0.679</td><td>0.379</td><td>0.282</td><td>0.415</td><td>0.569</td></tr><tr><td>TCRA (Guo et al., 2024a)</td><td>0.496</td><td>0.457</td><td>0.511</td><td>0.574</td><td>0.367</td><td>0.275</td><td>0.403</td><td>0.554</td></tr><tr><td>DiffusionE (Cao et al., 2024)</td><td>0.557</td><td>0.504</td><td>-</td><td>0.658</td><td>0.376</td><td>0.294</td><td>-</td><td>0.539</td></tr><tr><td colspan="9">LLM-based Methods</td></tr><tr><td>KICGPT (Wei et al., 2023)</td><td>0.549</td><td>0.474</td><td>0.585</td><td>0.641</td><td>0.412</td><td>0.327</td><td>0.448</td><td>0.554</td></tr><tr><td>CSProm-KG-CD (Li et al., 2024)</td><td>0.559</td><td>0.508</td><td>0.578</td><td>0.660</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>ARR (Chen et al., 2024)</td><td>0.521</td><td>-</td><td>0.607</td><td>-</td><td>0.398</td><td>-</td><td>0.436</td><td>-</td></tr><tr><td>KG-FIT (Jiang et al., 2024)</td><td>0.553</td><td>0.488</td><td>0.595</td><td>0.695</td><td>0.362</td><td>0.275</td><td>0.485</td><td>0.572</td></tr><tr><td>MKGL (Guo et al., 2024b)</td><td>0.552</td><td>0.500</td><td>0.577</td><td>0.656</td><td>0.415</td><td>0.325</td><td>0.454</td><td>0.591</td></tr><tr><td>SSQR-LLaMA2</td><td>0.591</td><td>0.548</td><td>0.618</td><td>0.673</td><td>0.449</td><td>0.374</td><td>0.491</td><td>0.597</td></tr><tr><td>SSQR-LLaMA3.1</td><td>0.598</td><td>0.559</td><td>0.618</td><td>0.675</td><td>0.459</td><td>0.393</td><td>0.491</td><td>0.597</td></tr></table>
|
| 208 |
+
|
| 209 |
+
Table 4: The experiment results of the triple classification on FB15k-237N dataset. The results of baselines are taken from Zhang et al. (2024b).
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Model</td><td>Acc</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>TransE (Bordes et al., 2013)</td><td>0.697</td><td>0.708</td><td>0.671</td><td>0.689</td></tr><tr><td>DistMult (Yang et al., 2015)</td><td>0.587</td><td>0.590</td><td>0.568</td><td>0.579</td></tr><tr><td>RotatE (Sun et al., 2019)</td><td>0.684</td><td>0.692</td><td>0.664</td><td>0.678</td></tr><tr><td>Alpacazero-shot</td><td>0.561</td><td>0.533</td><td>0.974</td><td>0.689</td></tr><tr><td>GPT-3.5zero-shot</td><td>0.602</td><td>0.866</td><td>0.240</td><td>0.376</td></tr><tr><td>KG-LLaMA (Yao et al., 2023)</td><td>0.748</td><td>0.674</td><td>0.962</td><td>0.793</td></tr><tr><td>KG-Alpaca (Yao et al., 2023)</td><td>0.699</td><td>0.627</td><td>0.983</td><td>0.766</td></tr><tr><td>KoPA (Zhang et al., 2024b)</td><td>0.777</td><td>0.708</td><td>0.941</td><td>0.808</td></tr><tr><td>SSQR-LLaMA2</td><td>0.794</td><td>0.757</td><td>0.867</td><td>0.808</td></tr><tr><td>w/o SSQR</td><td>0.754</td><td>0.699</td><td>0.891</td><td>0.783</td></tr><tr><td>Δ</td><td>-5.13%</td><td>-7.71%</td><td>+2.85%</td><td>-3.07%</td></tr><tr><td>SSQR-LLaMA3.1</td><td>0.798</td><td>0.759</td><td>0.872</td><td>0.811</td></tr><tr><td>w/o SSQR</td><td>0.767</td><td>0.711</td><td>0.901</td><td>0.795</td></tr><tr><td>Δ</td><td>-3.77%</td><td>-6.34%</td><td>+3.41%</td><td>-2.03%</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Triple Classification. Beyond the link prediction task, we conduct experiments on triple classification on the FB15k-237N dataset. The results are shown in Table 4, where our method outperforms general embedding methods and other LLM-based baselines. For the advanced KoPA (Zhang et al., 2024b) model, the performance in the F1-score metric is comparable to that of SSQR. However, the accuracies of SSQR show a significant improvement, i.e., 0.794/0.798 vs. 0.777, demonstrating the effectiveness of integrating SSQR with LLMs.
|
| 214 |
+
|
| 215 |
+
# 4.4 Insights of LLM Funetuning
|
| 216 |
+
|
| 217 |
+
Ablation Studies. We carry out ablation studies to verify the effectiveness of quantized representations for LLM tuning. The results are shown
|
| 218 |
+
|
| 219 |
+
Table 5: The ablation results for the link prediction task.
|
| 220 |
+
|
| 221 |
+
<table><tr><td>Model</td><td>MRR</td><td>Hits@1</td><td>Hits@3</td><td>Hits@10</td></tr><tr><td colspan="5">WN18RR</td></tr><tr><td>SSQR-LLaMA2</td><td>0.591</td><td>0.548</td><td>0.618</td><td>0.673</td></tr><tr><td>w/o SSQR</td><td>0.541</td><td>0.495</td><td>0.603</td><td>0.668</td></tr><tr><td>Δ(↓)</td><td>8.46%</td><td>9.67%</td><td>2.43%</td><td>0.74%</td></tr><tr><td colspan="5">FB15k-237</td></tr><tr><td>SSQR-LLaMA2</td><td>0.449</td><td>0.374</td><td>0.491</td><td>0.597</td></tr><tr><td>w/o SSQR</td><td>0.401</td><td>0.322</td><td>0.441</td><td>0.589</td></tr><tr><td>Δ(↓)</td><td>10.69%</td><td>13.90%</td><td>10.18%</td><td>1.34%</td></tr></table>
|
| 222 |
+
|
| 223 |
+
in Table 5 and the bottom part of Table 4, where $w/o$ SSQR means only utilizing the entity's name for fine-tuning and removing learned entity codes. For the link prediction task, there is a large performance drop, especially in the MRR, Hits@1, and Hits@3 metrics. A similar pattern is also present in the triple classification task. We observe that when under the $w/o$ SSQR setting, LLMs have overfitting issues, where their performance on training sets is very high but fails to generalize to valid and test sets. This demonstrates that the learned discrete codes are distinguishable and representative for different entities, thereby allowing their utilization as features to assist KG tasks in LLMs.
|
| 224 |
+
|
| 225 |
+
Impacts of $M$ and $N$ for LLM Tuning. We explore the impacts of $M$ and $N$ for LLM tuning, the results are shown in Figure 7. First, we present the results of Original, which are the original results of AdaProp. It is shown that all other results are better than those of AdaProp, showing it is effective for LLM fine-tuning with quantized representations. The settings with $N = 16$ and $M = 2048$
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Figure 7: The impacts of quantized representation for KG link prediction task using LLMs on FB15k-237.
|
| 229 |
+
|
| 230 |
+
have better results compared to 16-512 and 8-2048, indicating large values are needed to represent entity structural and semantic information, serving better features for LLMs. $N$ is more important than $M$ , which drops more performance, especially on the FB15k-237 dataset (16-512 even not dropping a lot), indicating the long quantized feature is beneficial for LLMs to distinguish entities.
|
| 231 |
+
|
| 232 |
+
Token Embeddings in LLMs. To view the representation of codewords and actual language tokens in LLMs, we display all 2048 codewords and correspondingly sample an equal number of language tokens. Further, we reduce the embeddings to 2-dimensional space using t-SNE (Van der Maaten and Hinton, 2008) and plot the results in Figure 8. It is shown that these two types of tokens are generally divided into two categories, indicating they have different representation zones. It is consistent with the intuition and indicates LLM can perceive that they are different types of tokens, showing potential for further exploration of LLM on KG tasks using SSQR.
|
| 233 |
+
|
| 234 |
+
# 5 Related Work
|
| 235 |
+
|
| 236 |
+
For parameter-efficient embeddings on large KGs, NodePiece (Galkin et al., 2022) introduces an anchor-based method to learn a fixed-size entity vocabulary, where unsupervised strategies of Personalized PageRank (Page, 1999), node degree, and random are used for anchor selection. Each entity can be represented through $k$ closest anchors and their respective distances. Further, EARL (Chen et al., 2023) randomly samples $10\%$ entities as anchors and introduces connected relation information to match anchors' counterparts. To simplify the whole process, Li et al. (2023) introduces random entity quantization (RandomEQ) to randomly set anchor entities and randomly select relations for matching. The results show that RandomEQ
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
Figure 8: Token embedding virtualization in LLMs (WN18RR dataset), where red and blue dots are real word tokens and code tokens, respectively.
|
| 240 |
+
|
| 241 |
+
achieves similar results compared to previous curated strategies and has more distinguishable ability. In general, these methods are all in an unsupervised learning manner, which could be efficient for large KG embedding but fails to model comprehensive structural and semantic information.
|
| 242 |
+
|
| 243 |
+
Currently, numerous research studies are dedicated to incorporating KGs with LLMs to maximize and exploit their respective strengths (Pan et al., 2024). On one hand, using prompt engineering or retrieve strategies (Wei et al., 2023; Sun et al., 2024; Kau et al., 2024), the information of KGs be sampled and instantiated as tokens like natural language to input LLMs. On the other hand, the triple-level or sub-graph structures of KG can be inputted to the LLMs to inject knowledge (Hron et al., 2024). However, because of the natural gap between the graph structure of KGs and the natural language, how to seamlessly and effectively integrate the whole structural and semantic information of KGs with LLMs is an open problem.
|
| 244 |
+
|
| 245 |
+
# 6 Conclusion and Potential Impacts
|
| 246 |
+
|
| 247 |
+
For seamlessly integrating KGs with LLMs, we introduce a self-supervised quantized representation method (SSQR). It compresses the structural and semantic information of entities in KGs to a discrete permutation of codewords, which has a similar format as the natural language and can be directly inputted to the LLMs. By specific instruction data and fine-tuning, LLMs can seamlessly learn KG's knowledge, which can be used in KG applications. To verify the effectiveness of our method, we implement experiments on KG link prediction and triple classification tasks, which demonstrate the superiority of our method. This innovative paradigm promises to usher in transformative techniques for KGs in the era of LLMs. In the future, we will explore more applications and make progress towards
|
| 248 |
+
|
| 249 |
+
unified frameworks for multiple KG tasks, e.g., KG-based QA (Luo et al., 2024a), KG-based recommendation (Huang et al., 2023), and language modeling (Luo et al., 2024b).
|
| 250 |
+
|
| 251 |
+
# Limitations
|
| 252 |
+
|
| 253 |
+
Despite our SSQR method's capacity to facilitate the seamless integration of KGs with LLMs, our study encounters the generalization limitation due to the substantial computational burden associated with LLMs. In most recent and our studies, LLMs are fine-tuned for a specific KG and the corresponding task, which can not be applied to various KG tasks and largely limits the model's generalization ability. In the future, we will try to construct unified LLMs for KGs by implementing quantization within the same discrete space.
|
| 254 |
+
|
| 255 |
+
# Acknowledgments
|
| 256 |
+
|
| 257 |
+
This project was funded by the National Research Foundation Singapore under the RIE2025 Industry Alignment Fund (I2101E0002-Cisco-NUS Accelerated Digital Economy Corporate Laboratory) and under AI Singapore Programme (Award Number: AISG2-TC-2022-004).
|
| 258 |
+
|
| 259 |
+
# References
|
| 260 |
+
|
| 261 |
+
Yejin Bang, Samuel Cahyawijaya, Nayeon Lee, Wenliang Dai, Dan Su, Bryan Wilie, Holy Lovenia, Ziwei Ji, Tiezheng Yu, Willy Chung, et al. 2023. A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity. In IJC-NLP, pages 675-718.
|
| 262 |
+
Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In NIPS, pages 2787-2795.
|
| 263 |
+
Zongsheng Cao, Jing Li, Zigan Wang, and Jinliang Li. 2024. Diffusione: Reasoning on knowledge graphs via diffusion-based graph neural networks. In KDD, pages 222-230.
|
| 264 |
+
Mingyang Chen, Wen Zhang, Zhen Yao, Yushan Zhu, Yang Gao, Jeff Z. Pan, and Huajun Chen. 2023. Entity-agnostic representation learning for parameter-efficient knowledge graph embedding. In AAAI, pages 4182-4190.
|
| 265 |
+
Zhongwu Chen, Long Bai, Zixuan Li, Zhen Huang, Xiaolong Jin, and Yong Dou. 2024. A new pipeline for knowledge graph reasoning enhanced by large language models without fine-tuning. In EMNLP, pages 1366-1381.
|
| 266 |
+
|
| 267 |
+
Jiaxi Cui, Zongjian Li, Yang Yan, Bohua Chen, and Li Yuan. 2023. Chatlaw: Open-source legal large language model with integrated external knowledge bases. CoRR, abs/2306.16092.
|
| 268 |
+
Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. 2018. Convolutional 2d knowledge graph embeddings. In AAAI, pages 1811-1818.
|
| 269 |
+
Patrick Esser, Robin Rombach, and Bjorn Ommer. 2021. Taming transformers for high-resolution image synthesis. In CVPR, pages 12873-12883.
|
| 270 |
+
Mikhail Galkin, Etienne G. Denis, Jiapeng Wu, and William L. Hamilton. 2022. Nodepiece: Compositional and parameter-efficient representations of large knowledge graphs. In ICLR.
|
| 271 |
+
Jingtao Guo, Chunxia Zhang, Lingxi Li, Xiaojun Xue, and Zhendong Niu. 2024a. A unified joint approach with topological context learning and rule augmentation for knowledge graph completion. In *Findings of the ACL*, pages 13686-13696.
|
| 272 |
+
Lingbing Guo, Zhongpu Bo, Zhuo Chen, Yichi Zhang, Jiaoyan Chen, Yarong Lan, Mengshu Sun, Zhiqiang Zhang, Yangyifei Luo, Qian Li, Qiang Zhang, Wen Zhang, and Huajun Chen. 2024b. MKGL: mastery of a three-word language. In NeurIPS.
|
| 273 |
+
Kai He, Rui Mao, Qika Lin, Yucheng Ruan, Xiang Lan, Mengling Feng, and Erik Cambria. 2025. A survey of large language models for healthcare: from data, technology, and applications to accountability and ethics. Information Fusion, page 102963.
|
| 274 |
+
Jiri Hron, Laura Culp, Gamaleldin Elsayed, Rosanne Liu, Ben Adlam, Maxwell Bileschi, Bernd Bohnet, JD Co-Reyes, Noah Fiedel, C Daniel Freeman, et al. 2024. Training language models on the knowledge graph: Insights on hallucinations and their detectability. CoRR, abs/2408.07852.
|
| 275 |
+
Qing Huang, Zhenyu Wan, Zhenchang Xing, Changjing Wang, Jieshan Chen, Xiwei Xu, and Qinghua Lu. 2023. Let's chat to find the apis: Connecting human, LLM and knowledge graph through AI chain. In ASE, pages 471-483. IEEE.
|
| 276 |
+
Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, and Pascale Fung. 2023. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):248:1-248:38.
|
| 277 |
+
Pengcheng Jiang, Lang Cao, Cao Xiao, Parminder Bhatia, Jimeng Sun, and Jiawei Han. 2024. KG-FIT: knowledge graph fine-tuning upon open-world knowledge. In NeurIPS.
|
| 278 |
+
Amanda Kau, Xuzeng He, Aishwarya Nambissan, Aland Astudillo, Hui Yin, and Amir Aryani. 2024. Combining knowledge graphs and large language models. CoRR, abs/2407.06564.
|
| 279 |
+
|
| 280 |
+
Youmin Ko, Hyemin Yang, Taeuk Kim, and Hyunjoon Kim. 2024. Subgraph-aware training of text-based methods for knowledge graph completion. CoRR, abs/2407.12703.
|
| 281 |
+
Dawei Li, Zhen Tan, Tianlong Chen, and Huan Liu. 2024. Contextualization distillation from large language model for knowledge graph completion. In Findings of the EACL, pages 458-477.
|
| 282 |
+
Jiaang Li, Quan Wang, Yi Liu, Licheng Zhang, and Zhendong Mao. 2023. Random entity quantization for parameter-efficient compositional knowledge graph representation. In EMNLP, pages 2917-2928.
|
| 283 |
+
Qika Lin, Jun Liu, Fangzhi Xu, Yudai Pan, Yifan Zhu, Lingling Zhang, and Tianzhe Zhao. 2022. Incorporating context graph with logical reasoning for inductive relation prediction. In SIGIR, pages 893-903.
|
| 284 |
+
Qika Lin, Yifan Zhu, Xin Mei, Ling Huang, Jingying Ma, Kai He, Zhen Peng, Erik Cambria, and Mengling Feng. 2025. Has multimodal learning delivered universal intelligence in healthcare? a comprehensive survey. Information Fusion, 116:102795.
|
| 285 |
+
Yang Liu, Xiaobin Tian, Zequn Sun, and Wei Hu. 2024. Finetuning generative large language models with discrimination instructions for knowledge graph completion. In ISWC, pages 199-217.
|
| 286 |
+
Haoran Luo, Haihong E, Yikai Guo, Qika Lin, Xiaobao Wu, Xinyu Mu, Wenhao Liu, Meina Song, Yifan Zhu, and Luu Anh Tuan. 2025. Kbqa-o1: Agentic knowledge base question answering with monte carlo tree search. In ICML.
|
| 287 |
+
Haoran Luo, Haihong E, Zichen Tang, Shiyao Peng, Yikai Guo, Wentai Zhang, Chenghao Ma, Guanting Dong, Meina Song, Wei Lin, Yifan Zhu, and Anh Tuan Luu. 2024a. Chatkbq: A generate-then-retrieve framework for knowledge base question answering with fine-tuned large language models. In Findings of the ACL, pages 2039-2056.
|
| 288 |
+
Xindi Luo, Zequn Sun, Jing Zhao, Zhe Zhao, and Wei Hu. 2024b. Knowla: Enhancing parameter-efficient finetuning with knowledgeable adaptation. In NAACL, pages 7153-7166.
|
| 289 |
+
Xin Lv, Yankai Lin, Yixin Cao, Lei Hou, Juanzi Li, Zhiyuan Liu, Peng Li, and Jie Zhou. 2022. Do pretrained models benefit knowledge graph completion? A reliable evaluation and a reasonable approach. In Findings of the ACL, pages 3570-3581.
|
| 290 |
+
OpenAI. 2023. Gpt-4 technical report. CoRR, abs/2303.08774.
|
| 291 |
+
Lawrence Page. 1999. The pagerank citation ranking: Bringing order to the web. Technical report, Technical Report.
|
| 292 |
+
Shirui Pan, Linhao Luo, Yufei Wang, Chen Chen, Jiapu Wang, and Xindong Wu. 2024. Unifying large language models and knowledge graphs: A roadmap. IEEE TKDE, 36(7):3580-3599.
|
| 293 |
+
|
| 294 |
+
Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, and Jianfeng Gao. 2023. Instruction tuning with gpt-4. CoRR, abs/2304.03277.
|
| 295 |
+
Jiashuo Sun, Chengjin Xu, Lumingyuan Tang, Saizhuo Wang, Chen Lin, Yeyun Gong, Lionel M. Ni, Heung-Yeung Shum, and Jian Guo. 2024. Think-on-graph: Deep and responsible reasoning of large language model on knowledge graph. In ICLR.
|
| 296 |
+
Zhiqing Sun, Zhi-Hong Deng, Jian-Yun Nie, and Jian Tang. 2019. Rotate: Knowledge graph embedding by relational rotation in complex space. In ICLR.
|
| 297 |
+
Xingyu Tan, Xiaoyang Wang, Qing Liu, Xiwei Xu, Xin Yuan, and Wenjie Zhang. 2024. Paths-over-graph: Knowledge graph empowered large language model reasoning. CoRR, abs/2410.14211.
|
| 298 |
+
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.
|
| 299 |
+
Chameleon Team. 2024. Chameleon: Mixed-modal early-fusion foundation models. CoRR, abs/2405.09818.
|
| 300 |
+
Kristina Toutanova and Danqi Chen. 2015. Observed versus latent features for knowledge base and text inference. In Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality (CVSC), pages 57-66.
|
| 301 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. CoRR, abs/2302.13971.
|
| 302 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. CoRR, abs/2307.09288.
|
| 303 |
+
Aaron Van Den Oord, Oriol Vinyals, et al. 2017. Neural discrete representation learning. Advances in Neural Information Processing Systems, pages 6306-6315.
|
| 304 |
+
Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of Machine Learning Research, 9(11).
|
| 305 |
+
Shikhar Vashishth, Soumya Sanyal, Vikram Nitin, and Partha P. Talukdar. 2020. Composition-based multi-relational graph convolutional networks. In ICLR.
|
| 306 |
+
Jianing Wang, Qiushi Sun, Xiang Li, and Ming Gao. 2024. Boosting language models reasoning with chain-of-knowledge prompting. In ACL, pages 4958-4981.
|
| 307 |
+
Yanbin Wei, Qiushi Huang, Yu Zhang, and James T. Kwok. 2023. KICGPT: large language model with knowledge in context for knowledge graph completion. In Findings of the EMNLP, pages 8667-8683.
|
| 308 |
+
|
| 309 |
+
Fangzhi Xu, Qika Lin, Jiawei Han, Tianzhe Zhao, Jun Liu, and Erik Cambria. 2025. Are large language models really good logical reasoners? a comprehensive evaluation and beyond. IEEE Transactions on Knowledge and Data Engineering.
|
| 310 |
+
Fangzhi Xu, Qika Lin, Tianzhe Zhao, Jiawei Han, and Jun Liu. 2024a. Pathreasoner: Modeling reasoning path with equivalent extension for logical question answering. In ACL, pages 13413-13429.
|
| 311 |
+
Fangzhi Xu, Zhiyong Wu, Qiushi Sun, Siyu Ren, Fei Yuan, Shuai Yuan, Qika Lin, Yu Qiao, and Jun Liu. 2024b. Symbol-llm: Towards foundational symbol-centric interface for large language models. In ACL, pages 13091-13116.
|
| 312 |
+
Hongcai Xu, Junpeng Bao, and Wenbo Liu. 2023. Double-branch multi-attention based graph neural network for knowledge graph completion. In ACL, pages 15257-15271.
|
| 313 |
+
Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. 2015. Embedding entities and relations for learning and inference in knowledge bases. In ICLR.
|
| 314 |
+
Jingfeng Yang, Hongye Jin, Ruixiang Tang, Xiaotian Han, Qizhang Feng, Haoming Jiang, Shaochen Zhong, Bing Yin, and Xia Hu. 2024a. Harnessing the power of llms in practice: A survey on chatgpt and beyond. ACM TKDD, 18(6):1-32.
|
| 315 |
+
Ling Yang, Ye Tian, Minkai Xu, Zhongyi Liu, Shenda Hong, Wei Qu, Wentao Zhang, Bin Cui, Muhan Zhang, and Jure Leskovec. 2024b. Vqgraph: Rethinking graph representation space for bridging gnns and mlps. In ICLR.
|
| 316 |
+
Liang Yao, Jiazhen Peng, Chengsheng Mao, and Yuan Luo. 2023. Exploring large language models for knowledge graph completion. CoRR, abs/2308.13916.
|
| 317 |
+
Heidi C. Zhang, Sina J. Semnani, Farhad Ghassemi, Jialiang Xu, Shicheng Liu, and Monica S. Lam. 2024a. SPAGHETTI: open-domain question answering from heterogeneous data sources with retrieval and semantic parsing. In *Findings of the ACL*, pages 1663-1678.
|
| 318 |
+
Yichi Zhang, Zhuo Chen, Lingbing Guo, Yajing Xu, Wen Zhang, and Huajun Chen. 2024b. Making large language models perform better in knowledge graph completion. In ACM MM, pages 233-242. ACM.
|
| 319 |
+
Yongqi Zhang, Zhanke Zhou, Quanming Yao, Xiaowen Chu, and Bo Han. 2023. Adaprop: Learning adaptive propagation for graph neural network based knowledge graph reasoning. In KDD, pages 3446-3457.
|
| 320 |
+
|
| 321 |
+
# A Statistics of WN18RR Dataset
|
| 322 |
+
|
| 323 |
+
Besides the statistic analysis of FB15k-237 in Figure 2, we also conduct the statistic analysis of WN18RR, which is shown in Figure 9. Specifically, we sample 200 entities from the whole KG and there are two settings (50% neighbor sampling and 100% neighbors). In the first setting of 50%, the median and mean of neighbors are 4.0 and 10.37, while the median and mean number of needed tokens are 61.5 and 185.84, respectively. For the setting of 100%, the median and mean of neighbors are 33.5 and 79.05, while the median and mean number of needed tokens are 623.5 and 1492.74, respectively. Compared to our SSQR, which only requires 16 tokens to represent each entity, both 50% and 100% settings demand a considerably higher number of tokens.
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
Figure 9: The statistics of 2-hop sampled neighbors and needed tokens (by LLaMA2) for entities in WN18RR.
|
| 327 |
+
|
| 328 |
+
# B Baselines
|
| 329 |
+
|
| 330 |
+
In this section, we give detailed descriptions of various baselines utilized in the paper.
|
| 331 |
+
|
| 332 |
+
# B.1 Quantized Representations for KGs
|
| 333 |
+
|
| 334 |
+
- NodePiece (Galkin et al., 2022): The selection of quantized anchors relies on unsupervised strategies, including Personalized PageRank, node degree, and random approaches.
|
| 335 |
+
- EARL (Chen et al., 2023): It randomly samples $10\%$ entities as quantized anchors and introduces connected relation information to match anchors' counterparts.
|
| 336 |
+
- Random entity quantization (RandomEQ for short) (Li et al., 2023): It randomly sets anchor entities and randomly selects relations for matching.
|
| 337 |
+
|
| 338 |
+
# B.2 KG Link Prediction
|
| 339 |
+
|
| 340 |
+
- TransE (Bordes et al., 2013): The strategy of incorporating translational distance is utilized for
|
| 341 |
+
|
| 342 |
+
learning representations of entities and relations.
|
| 343 |
+
|
| 344 |
+
- CompGCN (Vashishth et al., 2020): Several entity-relation composition operations are proposed to combine the semantic information of neighbor entity-relation pairs in GNNs.
|
| 345 |
+
- AdaProp (Zhang et al., 2023): An adaptive propagation path is learned to filter out irrelevant entities while preserving promising targets in the GNN framework.
|
| 346 |
+
- MA-GNN (Xu et al., 2023): A dual-branch, multi-attention-based GNN model is employed to develop expressive entity representations.
|
| 347 |
+
- TCRA (Guo et al., 2024a): A neuro-symbolic method that combines topological context learning with rule augmentation.
|
| 348 |
+
- DiffusionE (Cao et al., 2024): Introducing diffusion process to KG embedding method.
|
| 349 |
+
- KICGPT (Wei et al., 2023): The method utilizes a model based on embeddings as the retriever, which generates a ranked list of potential entities. An in-context learning strategy is then designed to guide ChatGPT in re-ranking these entities through multi-round interactions.
|
| 350 |
+
- CSProm-KG-CD (Li et al., 2024): It converts compact and structured triples into segments enriched with context by LLMs. Following this, two custom auxiliary tasks (reconstruction and contextualization) are presented, which enable compact KGC models to incorporate insights derived from these enhanced triples.
|
| 351 |
+
- ARR (Chen et al., 2024): A three-step (alignment, reasoning, and reranking) process designed to support and amplify conventional KG embedding models, without necessitating fine-tuning. The results are taken from the setting of LLAMA3-70B and RotatE (Sun et al., 2019) model.
|
| 352 |
+
- KG-FIT (Jiang et al., 2024): It involves the automatic construction of a semantically consistent entity hierarchy through clustering and LLM-guided refinement. It also details a fine-tuning technique that incorporates knowledge from the hierarchical structure and pre-trained text embeddings of entities, thereby improving KG embeddings. The results are from the HAKE model setting.
|
| 353 |
+
- MKGL (Guo et al., 2024b): A context retriever is introduced to help LLMs be aware of the textual and relational context of KGs. A score retriever is also used to provide the score information. LLaMA2 (7B) is utilized as the base LLM.
|
| 354 |
+
|
| 355 |
+
# B.3 KG Triple Classification
|
| 356 |
+
|
| 357 |
+
- TransE (Bordes et al., 2013): The strategy of incorporating translational distance is utilized for learning representations of entities and relations.
|
| 358 |
+
- DistMult (Yang et al., 2015): It utilizes the semantic matching strategy, where the validity of a fact is depicted as the matching degree between the representation of entity and relation.
|
| 359 |
+
|
| 360 |
+
- RotatE (Sun et al., 2019): It defines each relation as a rotation from the source entity to the target entity in a complex vector space.
|
| 361 |
+
- Alpaca zero-shot: It carries out zero-shot reasoning with Alpaca (Taori et al., 2023) with textual sequences for predicting the validity of a triple.
|
| 362 |
+
- GPT-3.5 zero-shot: It carries out zero-shot reasoning with GPT-3.5<sup>3</sup> with textual sequences for predicting the validity of a triple.
|
| 363 |
+
- KG-LLaMA (Yao et al., 2023): It carries out instruction tuning with LLaMA with textual sequences for predicting the validity of a triple.
|
| 364 |
+
- KG-Alpaca (Yao et al., 2023): It carries out instruction tuning with Alpaca with textual sequences for predicting the validity of a triple.
|
| 365 |
+
- KoPA (Zhang et al., 2024b): It proposes a knowledge prefix adapter to effectively integrate pre-trained KG structural embeddings with LLMs. Alpaca-7B is utilized as the LLM backbone.
|
| 366 |
+
|
| 367 |
+
# C Experimental Details
|
| 368 |
+
|
| 369 |
+
Table 6: The statistics of WN18RR, FB15k-237, and FB15k-237N datasets. The former two are for link prediction. FB15k-237N dataset is for triple classification, where $/$ ’ splits the positive and negative samples.
|
| 370 |
+
|
| 371 |
+
<table><tr><td>Dataset</td><td>Ent</td><td>Rel</td><td>Train</td><td>Valid</td><td>Test</td></tr><tr><td>WN18RR</td><td>40943</td><td>11</td><td>86835</td><td>3034</td><td>3134</td></tr><tr><td>FB15k-237</td><td>14541</td><td>237</td><td>272115</td><td>17535</td><td>20466</td></tr><tr><td>FB15k-237N</td><td>13104</td><td>93</td><td>87282</td><td>7041/7041</td><td>8226/8226</td></tr></table>
|
| 372 |
+
|
| 373 |
+
The statistics of utilized datasets are shown in Table 6. For the SSQR learning, the default embedding dimension is set to 200. The GCN layer and dropout rate are 2 and 0.2. The training batch is 1024. For optimization, the learning rate is 0.0005 and the L2 regularization weight is 1e-8. For LLM tuning, we utilize 4 NVIDIA H100 GPUs and the learning rate is set to 2e-5 with $3\%$ warmup ratio. In the link prediction experiment, we first tune
|
| 374 |
+
|
| 375 |
+
LLMs on the instruction data of CompGCN's training split to initialize. Then, inspired by Wei et al. (2023) and Liu et al. (2024), we divide the valid set into two segments in a 9:1 ratio. The larger part is utilized to finetune LLMs to learn the ranking preference, while the smaller part is used for validation. In the triple classification experiment, we only update the embedding layer and the last four Transformer layers of LLMs for tuning efficiency. Meanwhile, $M$ and $N$ are set to 1024 and 16. In the training instruction data, we randomly select negative samples at a rate 16 times of positive ones. The instruction format of triple classification is shown in Table 7.
|
| 376 |
+
|
| 377 |
+
Instruction: Given a triple in the knowledge graph, you need to predict its validity based on the triple itself and entities' quantized representations.
|
| 378 |
+
|
| 379 |
+
Input: The triple is: $(h,r,t)$
|
| 380 |
+
|
| 381 |
+
The quantized representation of entity $h$ is: $[\mathrm{Code}(h)]$
|
| 382 |
+
|
| 383 |
+
The quantized representation of entity $t$ is: $[\mathrm{Code}(t)]$ Please determine the validity of the triple and respond True or False.
|
| 384 |
+
|
| 385 |
+
Output: True/False
|
| 386 |
+
|
| 387 |
+
Table 7: Instruction format for triple classification.
|
| 388 |
+
|
| 389 |
+
# D Entropy and Jaccard Distance
|
| 390 |
+
|
| 391 |
+
As presented by Li et al. (2023), it is significant for the ability to distinguish different entities for quantized representations. We follow this study to calculate the entropy at the overall representation level and the Jaccard distance at the codeword-selection level. The greater entropy and Jaccard distance values denote the greater distinguishable ability. The entropy is calculated as:
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
H = - \sum p (C o d e (e)) \cdot \log p (C o d e (e)). \tag {11}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
$p\big(\mathsf{Code}(e)\big)$ is the relative frequency of quantized representation of entity $e$ . Moreover, the Jaccard distance is given by:
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\mathcal {J} = \frac {1}{| \mathcal {E} | \cdot k} \sum_ {e _ {i} \in \mathcal {E}} \sum_ {e _ {j} \in k N N (e _ {i})} d \left(C o d e \left(e _ {i}\right), C o d e \left(e _ {j}\right)\right), \tag {12}
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\begin{array}{l} d \left(\operatorname {C o d e} \left(e _ {i}\right), \operatorname {C o d e} \left(e _ {j}\right)\right) \\ = \frac {\left| C S e t \left(e _ {i}\right) \cup C S e t \left(e _ {j}\right) \right| - \left| C S e t \left(e _ {i}\right) \cap C S e t \left(e _ {j}\right) \right|}{\left| C S e t \left(e _ {i}\right) \cup C S e t \left(e _ {j}\right) \right|}, \tag {13} \\ \end{array}
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
where $kNN(e_i)$ retrieves $k$ entities. Each possesses codes that exhibit the nearest Jaccard distance to the codes of $e_i$ . $CSet(e)$ is the set of $Code(e)$ by removing the order information of codewords of the entity representations.
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
Figure 10: The training process of SSQR, where the Hits@1 metric is used to show the model performance.
|
| 411 |
+
|
| 412 |
+
# E Additional Experimental Analysis
|
| 413 |
+
|
| 414 |
+
# E.1 Training Process of SSQR
|
| 415 |
+
|
| 416 |
+
We display the training process SSQR in Figure 10, where $w/o$ GCN and $w/o$ sem denote ablations for the structural embedding and semantic distilling, respectively. The findings indicate that both structural embedding and semantic distilling contribute positively to the overall learning of quantized representation. The influence of semantic information on the FB15k-237 dataset is less significant when compared to its effect on GCN. Differently, semantic information is more important on the WN18RR dataset. This could be attributed to the varying levels of KGs' sparsity.
|
| 417 |
+
|
| 418 |
+
# E.2 Relevance among Entity Codes on FB15k-237 Dataset
|
| 419 |
+
|
| 420 |
+
We also calculate the cosine similarity of quantized representation on the FB15k-237 dataset in Figure 11, which has the same setting as Figure 4. The contents presented in these two figures are also similar. When utilizing solely text embeddings, the corresponding similarities yield positive yet modest values. Moreover, the similarities associated with SSQR without the use of GCN are typically close to 1. These observations suggest that entity representations occupy a limited portion of the existing space, thus failing to maximize the efficiency of representation. SSQR addresses this issue to some degree by providing a broader range and diversity of similarities.
|
| 421 |
+
|
| 422 |
+
# E.3 Impacts of $M$ and $N$ for LLM Tuning on FB15k-237 Dataset
|
| 423 |
+
|
| 424 |
+
We also explore the impacts of $M$ and $N$ for LLM tuning on the FB15k-237 dataset, the results are shown in Figure 12. It can lead to conclusions similar to Figure 7.
|
| 425 |
+
|
| 426 |
+

|
| 427 |
+
(a) Original text embedding.
|
| 428 |
+
|
| 429 |
+

|
| 430 |
+
(b) SSQR.
|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
(c) SSQR w/o GCN.
|
| 434 |
+
|
| 435 |
+

|
| 436 |
+
(d) SSQR w/o semantics.
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 11: The cosine similarity of quantized representations on the FB15k-237 dataset (sampled 10 entities).
|
| 440 |
+
Figure 12: The impacts of quantized representation for KG link prediction task using LLMs on WN18RR.
|
| 441 |
+
|
| 442 |
+
# E.4 Token Embeddings in LLMs on FB15k-237 Dataset
|
| 443 |
+
|
| 444 |
+
Similar to Figure 8, we display the real word tokens and learned code tokens using t-SNE in Figure 13. The evidence also suggests that these two types of tokens typically fall into distinct categories, implying they each have unique representation areas.
|
| 445 |
+
|
| 446 |
+

|
| 447 |
+
Figure 13: Token embedding virtualization in LLMs (FB15k-237 dataset), where red and blue dots are real word tokens and code tokens, respectively.
|
| 448 |
+
|
| 449 |
+
# E.5 Case Studies
|
| 450 |
+
|
| 451 |
+
To intuitively show the seamlessly integrating KG tasks with LLMs, we carry out case studies in Table 8, 9, and 10, covering both link prediction and triple classification tasks. It demonstrates that our method can effectively address both tasks, indicating the validity and good generalization ability of our proposed SSQR.
|
| 452 |
+
|
| 453 |
+
Input: This is a knowledge graph completion task, which needs to predict the tail entity for an incomplete query triplet.
|
| 454 |
+
|
| 455 |
+
The query triplet is (radiotherapy, hypernym,?).
|
| 456 |
+
|
| 457 |
+
The quantized representation of entity radiotherapy is: [2006] [588] [350] [1486] [214] [929] [328] [1424] [1792] [919] [944] [740] [438] [843] [147] [628]
|
| 458 |
+
|
| 459 |
+
The answer candidates and corresponding quantized representations are as follows:
|
| 460 |
+
|
| 461 |
+
disease, [156] [1880] [1777] [185] [121] [720] [783] [1713] [945] [1077] [180] [1576] [1574] [1433] [216] [1280]
|
| 462 |
+
|
| 463 |
+
tomography, [182] [597] [657] [1486] [404] [468] [732] [564] [833] [1470] [1756] [626] [1674] [843] [1928] [513]
|
| 464 |
+
|
| 465 |
+
medical care, [422] [68] [1329] [1517] [1251] [431] [1479] [1445] [1666] [407] [952] [406] [1337] [388] [1982] [685]
|
| 466 |
+
|
| 467 |
+
status, [1721] [1906] [1773] [1811] [12] [892] [1625] [1476] [1561] [176] [534] [1463] [1657] [368] [70] [1618]
|
| 468 |
+
|
| 469 |
+
physiological state, [1721] [718] [267] [394] [120] [1105] [885] [1823] [1496] [23] [952] [406] [1559] [1198] [1149] [1800]
|
| 470 |
+
|
| 471 |
+
medical science, [565] [413] [842] [1517] [350] [873] [575] [595] [721] [935] [1554] [175] [708] [1643] [1820] [1775]
|
| 472 |
+
|
| 473 |
+
infection, [565] [1594] [990] [1066] [974] [40] [434] [874] [1401] [371] [1700] [1118] [1709] [52] [71] [1408]
|
| 474 |
+
|
| 475 |
+
picturing, [788] [168] [641] [1797] [927] [711] [1608] [123] [1163] [1460] [952] [406] [1752] [1464] [553] [1158]
|
| 476 |
+
|
| 477 |
+
medicine, [1879] [1216] [691] [296] [1743] [892] [1851] [595] [2039] [1428] [426] [740] [399] [579] [433] [1987]
|
| 478 |
+
|
| 479 |
+
unhealthiness, [1389] [644] [570] [258] [635] [647] [732] [1139] [1660] [407] [464] [1020] [1574] [1905] [926] [1971]
|
| 480 |
+
|
| 481 |
+
grounds, [1268] [1053] [803] [780] [1194] [285] [328] [289] [1163] [915] [1921] [1020] [524] [1774] [430] [1572]
|
| 482 |
+
|
| 483 |
+
defense reaction, [1881] [1821] [1620] [1703] [435] [995] [908] [1308] [1596] [1598] [401] [2008] [903] [817] [92] [1158]
|
| 484 |
+
|
| 485 |
+
radiology, [1478] [588] [1340] [1797] [1436] [1914] [1894] [1424] [634] [1460] [1756] [740] [673] [843] [108] [1088]
|
| 486 |
+
|
| 487 |
+
radioscopy, [1005] [1002] [1441] [137] [1436] [1378] [1479] [1649] [1544] [1470] [534] [626] [902] [272] [904] [1874]
|
| 488 |
+
|
| 489 |
+
treat, [396] [2007] [1935] [1305] [1993] [1030] [1690] [1445] [1203] [1417] [1554] [495] [1752] [1001] [1236] [98]
|
| 490 |
+
|
| 491 |
+
specialize, [1005] [1933] [1976] [780] [927] [1728] [575] [105] [1791] [1598] [616] [1118] [1752] [425] [437] [1847]
|
| 492 |
+
|
| 493 |
+
therapy, [396] [816] [81] [488] [336] [1164] [1690] [1288] [900] [915] [1554] [175] [666] [1622] [765] [685]
|
| 494 |
+
|
| 495 |
+
specialism, [384] [816] [599] [394] [435] [789] [1479] [105] [664] [407] [1554] [103] [1752] [1708] [697] [1130]
|
| 496 |
+
|
| 497 |
+
symptom, [1721] [1913] [772] [858] [120] [1150] [1374] [289] [1666] [1417] [944] [2008] [1454] [958] [1169] [1800]
|
| 498 |
+
|
| 499 |
+
medicine, [156] [350] [1599] [1955] [1368] [508] [1527] [1445] [1561] [1460] [426] [1142] [940] [653] [793] [471]
|
| 500 |
+
|
| 501 |
+
Please generate quantized representations of the top-3 potential answer entities, ranked from highest to lowest:
|
| 502 |
+
|
| 503 |
+
LLM Output: 1, [396] [816] [81] [488] [336] [1164] [1690] [1288] [900] [915] [1554] [175] [666] [1622] [765] [685]
|
| 504 |
+
|
| 505 |
+
2, [156] [1880] [1777] [185] [121] [720] [783] [1713] [945] [1077] [180] [1576] [1574] [1433] [216] [1280]
|
| 506 |
+
|
| 507 |
+
3,[182][597][657][1486][404][468][732][564][833][1470][1756][626][1674][843][1928][513]
|
| 508 |
+
|
| 509 |
+
Ground Truth: [396] [816] [81] [488] [336] [1164] [1690] [1288] [900] [915] [1554] [175] [666] [1622] [765] [685]
|
| 510 |
+
|
| 511 |
+
Table 8: Case study on WN18RR for link prediction using LLaMA2. The code of ground truth therapy is ranked to the first position from 17-th.
|
| 512 |
+
|
| 513 |
+
Input: This is a knowledge graph completion task, which needs to predict the tail entity for an incomplete query triplet.
|
| 514 |
+
|
| 515 |
+
The query triplet is (Valparaiso University, inverse relation of /location/location/contains,?).
|
| 516 |
+
|
| 517 |
+
The quantized representation of entity Valparaiso University is [527] [1345] [1849] [1227] [1751] [2038] [818] [515] [1417]
|
| 518 |
+
|
| 519 |
+
[333] [29] [721] [1691] [798] [1033] [153]
|
| 520 |
+
|
| 521 |
+
The answer candidates and corresponding quantized representations are as follows:
|
| 522 |
+
|
| 523 |
+
Minnesota, [1532] [258] [1837] [357] [923] [1994] [638] [555] [771] [1003] [1736] [1473] [1495] [1436] [1313] [20]
|
| 524 |
+
|
| 525 |
+
New York, [661] [1243] [542] [1741] [1907] [1799] [858] [1794] [1916] [458] [1844] [909] [438] [1737] [686] [963]
|
| 526 |
+
|
| 527 |
+
California, [1059] [1286] [1604] [846] [1086] [451] [1087] [1794] [994] [297] [1463] [159] [556] [1836] [407] [963]
|
| 528 |
+
|
| 529 |
+
Massachusetts, [202] [1243] [977] [757] [304] [389] [1172] [1308] [1916] [1858] [1323] [11] [841] [1680] [1798] [1885]
|
| 530 |
+
|
| 531 |
+
Illinois, [961] [1025] [1267] [174] [643] [1951] [1742] [1794] [1720] [1481] [543] [1883] [695] [1921] [182] [963]
|
| 532 |
+
|
| 533 |
+
New York City, [1458] [326] [1707] [239] [151] [640] [1366] [1794] [610] [458] [1844] [932] [122] [311] [121] [868]
|
| 534 |
+
|
| 535 |
+
United Kingdom, [51] [193] [1354] [669] [1867] [881] [480] [1271] [392] [1858] [650] [909] [1503] [1126] [1550] [153]
|
| 536 |
+
|
| 537 |
+
Pennsylvania, [361] [825] [1052] [1655] [1670] [732] [951] [1569] [275] [1995] [543] [4] [753] [351] [331] [637]
|
| 538 |
+
|
| 539 |
+
Los Angeles, [1584] [1231] [1707] [1461] [1867] [1466] [265] [1933] [850] [1533] [805] [1128] [1824] [1823] [307] [963]
|
| 540 |
+
|
| 541 |
+
Florida, [2016] [326] [542] [1614] [462] [1433] [1388] [819] [926] [1289] [1321] [563] [1977] [1144] [1268] [662]
|
| 542 |
+
|
| 543 |
+
Ohio, [1643] [1889] [1604] [88] [1364] [485] [1819] [1569] [54] [1582] [1500] [411] [438] [125] [1636] [20]
|
| 544 |
+
|
| 545 |
+
Texas, [2012] [1845] [1207] [412] [531] [1394] [1004] [688] [653] [1671] [1790] [1690] [1732] [1686] [1721] [1205]
|
| 546 |
+
|
| 547 |
+
Virginia, [99] [825] [738] [1859] [1287] [1540] [708] [653] [662] [756] [1873] [1514] [1686] [59] [409]
|
| 548 |
+
|
| 549 |
+
England, [848] [1220] [1052] [590] [175] [451] [529] [1933] [808] [1598] [1790] [1988] [670] [524] [121] [136]
|
| 550 |
+
|
| 551 |
+
Connecticut, [633] [1025] [672] [338] [1694] [1799] [1528] [1177] [1949] [458] [1703] [411] [395] [33] [233] [1013]
|
| 552 |
+
|
| 553 |
+
Indiana, [497] [1875] [1849] [377] [1694] [61] [1471] [1445] [392] [1672] [1500] [300] [711] [1839] [331] [136]
|
| 554 |
+
|
| 555 |
+
Los Angeles County, [662] [1772] [558] [1623] [304] [1755] [1388] [1794] [1554] [333] [1662] [1258] [1474] [1764] [1021]
|
| 556 |
+
|
| 557 |
+
[409]
|
| 558 |
+
|
| 559 |
+
Louisiana, [1584] [326] [1309] [50] [1035] [0] [546] [728] [1130] [297] [1284] [11] [1514] [1929] [1248] [136]
|
| 560 |
+
|
| 561 |
+
Michigan, [172] [326] [382] [174] [1364] [1774] [1165] [664] [994] [1480] [1923] [431] [816] [1587] [1443] [860]
|
| 562 |
+
|
| 563 |
+
Hennepin County, [584] [1890] [1263] [1168] [1990] [656] [784] [1735] [102] [1533] [1979] [1005] [1312] [786] [873] [1294]
|
| 564 |
+
|
| 565 |
+
Please generate quantized representations of the top-3 potential answer entities, ranked from highest to lowest:
|
| 566 |
+
|
| 567 |
+
LLM Output: 1, [497] [1875] [1849] [377] [1694] [61] [1471] [1445] [392] [1672] [1500] [300] [711] [1839] [331] [136]
|
| 568 |
+
|
| 569 |
+
2,[1532][258][1837][357][923][1994][638][555][771][1003][1736][1473][1495][1436][1313][20]
|
| 570 |
+
|
| 571 |
+
3,[661] [1243] [542] [1741] [1907] [1799] [858] [1794] [1916] [458] [1844] [909] [438] [1737] [686] [963]
|
| 572 |
+
|
| 573 |
+
Ground Truth: [497] [1875] [1849] [377] [1694] [61] [1471] [1445] [392] [1672] [1500] [300] [711] [1839] [331] [136]
|
| 574 |
+
|
| 575 |
+
Table 9: Case study on FB15k-237 for link prediction using LLaMA2. The code of ground truth Indiana is ranked to the first position from 16-th.
|
| 576 |
+
|
| 577 |
+
Input: Given a triple in the knowledge graph, you need to predict its validity based on the triple itself and entities' quantized representations.
|
| 578 |
+
|
| 579 |
+
The triple is: (Carl Foreman, /people/person/place_of_birth, Chicago)
|
| 580 |
+
|
| 581 |
+
The quantized representation of entity "Carl Foreman" is: [72] [114] [150] [336] [519] [494] [155] [482] [594] [934] [1012]
|
| 582 |
+
|
| 583 |
+
[677] [473] [450] [827] [455]
|
| 584 |
+
|
| 585 |
+
The quantized representation of entity "Chicago" is: [603] [413] [385] [937] [731] [735] [836] [92] [400] [372] [563] [225]
|
| 586 |
+
|
| 587 |
+
[82] [526] [81] [229]
|
| 588 |
+
|
| 589 |
+
Please determine the validity of the triple and respond True or False.
|
| 590 |
+
|
| 591 |
+
LLM Output: True
|
| 592 |
+
|
| 593 |
+
Ground Truth: True
|
| 594 |
+
|
| 595 |
+
Input: Given a triple in the knowledge graph, you need to predict its validity based on the triple itself and entities' quantized representations.
|
| 596 |
+
|
| 597 |
+
The triple is: (Jessica Lange, /people/person/profession, Lawyer)
|
| 598 |
+
|
| 599 |
+
The quantized representation of entity "Jessica Lange" is: [23] [712] [484] [202] [289] [211] [772] [667] [870] [903] [213]
|
| 600 |
+
|
| 601 |
+
[693] [360] [59] [868] [722]
|
| 602 |
+
|
| 603 |
+
The quantized representation of entity "Lawyer" is: [760] [84] [976] [802] [430] [735] [912] [480] [966] [411] [284] [113]
|
| 604 |
+
|
| 605 |
+
[727] [744] [333] [56]
|
| 606 |
+
|
| 607 |
+
Please determine the validity of the triple and respond True or False.
|
| 608 |
+
|
| 609 |
+
LLM Output: False
|
| 610 |
+
|
| 611 |
+
Ground Truth: False
|
| 612 |
+
|
| 613 |
+
Table 10: Two cases on FB15k-237N dataset for triple classification using LLaMA2.
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:279c872dc1d90defa1f65761d0b4daf9837aaa4a5c12b79608dd17a6b628a12f
|
| 3 |
+
size 838440
|
2025/Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/85f5323e-3957-45b0-a1a5-baeb8492b0fb_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75ef1620a7183cebb04f89ee0ca7d15f8d114c1e355176178c5aa2af8fb96a9f
|
| 3 |
+
size 1031309
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7ffabe414444f50eea50a1c424b1ba1fcbe1130a08360e1cb90176e81deb20b
|
| 3 |
+
size 2432620
|
2025/SelfElicit_ Your Language Model Secretly Knows Where is the Relevant Evidence/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/294bc43f-4b47-4ab6-a7f7-6dfa7c604068_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1cf295bdc010cfdb9394586e2bc7f258139af1561d3617ee0cdd33cc75dc8097
|
| 3 |
+
size 625732
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/full.md
ADDED
|
@@ -0,0 +1,642 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models
|
| 2 |
+
|
| 3 |
+
Sungjae Lee\*, Hyejin Park\*, Jaechang Kim, Jungseul Ok
|
| 4 |
+
|
| 5 |
+
$^{1}$ Department of Computer Science and Engineering, POSTECH, South Korea $^{2}$ Graduate School of Artificial Intelligence, POSTECH, South Korea {sungjaeel25,parkebbi2,jaechang,jungseul}@postech.ac.kr
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Recent advancements in large language models (LLMs) have shown remarkable potential in various complex tasks requiring multi-step reasoning methods like tree search to explore diverse reasoning paths. However, existing methods often suffer from computational inefficiency and redundancy. First, they overlook the diversity of task difficulties, leading to unnecessarily extensive searches even for easy tasks. Second, they neglect the semantics of reasoning paths, resulting in redundant exploration of semantically identical paths. To address these limitations, we propose Semantic Exploration with Adaptive Gating (SEAG), a computationally efficient method. SEAG employs an adaptive gating mechanism that dynamically decides whether to conduct a tree search, based on the confidence level of answers from a preceding simple reasoning method. Furthermore, its tree-based exploration consolidates semantically identical reasoning steps, reducing redundant explorations while maintaining or even improving accuracy. Our extensive experiments demonstrate that SEAG significantly improves accuracy by $4.3\%$ on average while requiring only $31\%$ of computational costs compared to existing tree search-based methods on complex reasoning benchmarks including GSM8K and ARC with diverse language models such as Llama2, Llama3, and Mistral. Our code is available at https://github.com/ml-postech/SEAGsemantic-exploration-with-adaptive-gating.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Recent advances in Large Language Models (LLMs) (Brown et al., 2020; Chowdhery et al., 2023; Team et al., 2023; Touvron et al., 2023; Achiam et al., 2023) have demonstrated remarkable potentials in a wide range of complex reasoning tasks including mathematical problem-solving (Lewkowycz et al., 2022; Wu et al., 2022;
|
| 14 |
+
|
| 15 |
+
Mishra et al., 2022), knowledge application (Zhang et al., 2018; Yavuz et al., 2022), and commonsense reasoning (Patel et al., 2021; Sanh et al., 2022; Madaan et al., 2022). LLMs have made notable strides in complex reasoning tasks (Nye et al., 2021; Gao et al., 2023), yet they face significant challenges in multi-step reasoning.
|
| 16 |
+
|
| 17 |
+
Building on a single-path prompting, such as Chain-of-Thought (CoT) and its variants (Wei et al., 2022; Wang et al., 2023b; Kojima et al., 2022), recent research has investigated tree search-based methods (Yao et al., 2023; Long, 2023; Hao et al., 2023) for complex tasks that demand exploration in reasoning. However, despite their effectiveness, tree search-based methods often face significant computational inefficiencies caused by two primary factors. First, tree search-based methods are often used for tasks that do not require such complex exploration. However, a key challenge lies in determining when to use the single-path method versus tree-based exploration. Second, the search process repeatedly expands and explores semantically redundant reasoning paths. Addressing the redundancy can be challenging, as it involves identifying when different natural language expressions convey the same meaning (Kuhn et al., 2023; Farquhar et al., 2024), especially in open-ended reasoning.
|
| 18 |
+
|
| 19 |
+
To address these limitations, we propose Semantic Exploration with Adaptive Gating (SEAG), a novel framework to significantly enhance computational efficiency in complex reasoning tasks. As illustrated in Figure 1, SEAG operates in three key phases: adaptive gating (AG), semantic exploration (SE), and early stopping. The first phase, AG (Section 4.1) evaluates the confidence of answers produced by simpler reasoning methods, such as CoT-SC. Based on this confidence, AG determines whether further tree-based exploration is needed, ensuring efficient use of computational resources. Building on this, the second phase, SE (Section 4.2) groups similar reasoning steps us
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: An overview of SEAG. The framework consists of three main components: adaptive gating, semantic exploration and early stopping, detailed in Section 4. Given an input, adaptive gating determines whether to expand the search space based on the uncertainty $H(\cdot)$ in equation (4) of the generated answers obtained through multiple single-path reasoning. If the uncertainty is high, semantic exploration employs tree search to explore multiple reasoning paths, where actions are grouped into semantic clusters (further detailed in Figure 3). Lastly, early stopping terminates the search when the highest aggregated reward surpasses a predefined threshold.
|
| 23 |
+
|
| 24 |
+
ing semantic clustering (Kuhn et al., 2023; Farquhar et al., 2024), avoiding repeated exploration of semantically equivalent paths. This approach effectively handles instances where different expressions convey the same meaning, as illustrated in Figure 3. Additionally, SE prioritizes exploration of semantic clusters containing more instances to derive solutions with higher potentials. In the final phase, early stopping (Section 4.3) terminates the tree search once a highly confident solution is found, avoiding unnecessary computations. SEAG aggregates results by assigning higher importance to reasoning paths that are more semantically relevant or frequently supported.
|
| 25 |
+
|
| 26 |
+
Our main contributions are as follows:
|
| 27 |
+
|
| 28 |
+
- We propose semantic exploration, leveraging semantic clustering to reduce redundant computations and prioritize exploration of semantically informative reasoning paths (Section 4.2).
|
| 29 |
+
- We introduce a unified approach combining adaptive gating (Section 4.1) and early stopping (Section 4.3) to adaptively determine when to initiate and terminate tree-based exploration, efficiently utilizing computational resources based on confidence measures specific to each process.
|
| 30 |
+
- Through extensive experiments on multi-step reasoning benchmarks, SEAG consistently demonstrates superior performance in reasoning accuracy while achieving computational efficiency comparable to or greater than baselines (Section 5.2), as shown in Figure 2.
|
| 31 |
+
|
| 32 |
+
# 2 Related Work
|
| 33 |
+
|
| 34 |
+
Reasoning with LLMs Eliciting the reasoning capabilities of LLMs has been a key focus of recent
|
| 35 |
+
|
| 36 |
+
research, leading to various reasoning methods to improve their performance on complex, multi-step tasks. One notable approach is Chain-of-Thought (CoT) prompting (Wei et al., 2022), which encourages LLMs to generate intermediate reasoning steps. Self-consistency of CoT (CoT-SC) (Wang et al., 2023b) extends CoT by sampling multiple reasoning paths and selecting the most frequently answers, instead of relying on a single greedy decoding pass.
|
| 37 |
+
|
| 38 |
+
Tree search-based approaches, such as Tree-of-Thoughts (ToT) (Yao et al., 2023; Long, 2023) and Reasoning-via-Planning (RAP) (Hao et al., 2023), enhance reasoning by structuring the exploration of reasoning paths on trees using search algorithms such as breadth/depth-first search (BFS/DFS) and Monte Carlo Tree Search (MCTS). In addition, recent studies on MCTS-based reasoning have extended the settings involving additional training costs (Wan et al., 2024; Zhang et al., 2024a) or external feedback (Zhou et al., 2024). However, these tree search-based methods incur considerably higher computation costs compared to simpler methods such as CoT-SC.
|
| 39 |
+
|
| 40 |
+
Linguistic semantics Measuring semantic relation is essential for reducing semantic redundancy in LLM reasoning. Traditional approaches have relied on lexical feature-based (Fernando and Stevenson, 2008; Socher et al., 2011) or embedding-based similarity metrics (Yu et al., 2014; Issa et al., 2018). However, these methods often lack robustness in capturing deeper linguistic semantics. With the rise of Transformer-based models and LLMs, semantic evaluation has achieved significant improvements (He et al., 2020b; Tay et al., 2021). Re
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: Scatter plots of accuracy and the number of LLM inferences for baselines and our methods, SE and SEAG, with GSM8K (left) and ARC (right) using Llama3-8B-Instruct model. SE achieves superior accuracy while reducing inference cost compared to existing tree search-based methods. SEAG further improves performance, achieving higher accuracy with efficiency comparable to other reasoning methods.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
|
| 47 |
+
cently, Kuhn et al. (2023) has introduced a textual entailment-based method for assessing semantic equivalence, which informs our approach to semantic clustering.
|
| 48 |
+
|
| 49 |
+
Similar to our work, Jang et al. (2021) has utilized semantic similarity within a MCTS framework for text-based games. However, their method relied on a predefined set consisting of valid actions provided by the game environment. In contrast, we address open domain problems, where actions, such as task-specific sub-questions, are dynamically generated by prompting LLMs.
|
| 50 |
+
|
| 51 |
+
Uncertainty estimation Uncertainty estimation of LLMs has emerged as a critical area of study for evaluating and improving their reliability. Existing uncertainty estimation methods often rely on the consistency of sampling results (Wang et al., 2023a; Cole et al., 2023) or responses to semantically equivalent questions (Zhang et al., 2024b). These approaches share an assumption that uncertainty can be quantified through entropy of prediction, and the assumption is commonly used in traditional machine learning (Malinin and Gales, 2018). We integrate uncertainty estimation directly into the reasoning pipeline, whereas other methods typically treat it as a separate step.
|
| 52 |
+
|
| 53 |
+
# 3 Preliminaries
|
| 54 |
+
|
| 55 |
+
In this section, we first define our problem setting as Markov Decision Process (MDP) reasoning in Section 3.1. Section 3.2 explains Monte Carlo Tree Search (MCTS) for multi-step reasoning.
|
| 56 |
+
|
| 57 |
+
# 3.1 Markov Decision Process Reasoning
|
| 58 |
+
|
| 59 |
+
Let $p_{\theta}$ denote a pre-trained language model (LM) parameterized by $\theta$ and an input sequence $x = (x_{1},\dots ,x_{l_{x}})$ , where $l_{x}$ represents the token lengths
|
| 60 |
+
|
| 61 |
+
of the input. The model's probability of generating $x$ is expressed by $p_{\theta}(x) = \prod_{i=1}^{l_x} (x_i | x_{<i})$ , where $x_{<i}$ represents the sequence of tokens preceding $x_i$ . An output sequence $y = (y_1, \ldots, y_{l_y})$ is generated by auto-regressively, where $l_y$ denotes the token lengths of the output. The previously generated tokens are used to predict the next token as $p_{\theta}(y|x) = \prod_{i=1}^{l_y} p_{\theta}(y_i|x, y_{<i})$ .
|
| 62 |
+
|
| 63 |
+
Rather than directly mapping the input $x$ to the output $y$ , several reasoning methods have been developed to enhance reasoning by breaking down complex tasks into step-by-step thoughts, with each generated token $y_{i}$ representing an intermediate reasoning step. Detailed explanations of these methods are provided in Appendix A. Following the approach in RAP (Hao et al., 2023), we define our problem as an MDP to effectively model the reasoning task. We leverages LMs in two complementary roles: (i) a reasoning agent and (ii) a world model. This approach frames the reasoning process as an MDP, enabling iterative reasoning through planning and simulation. At each time step $t$ , the state $s_t$ represents the current context, including both the input sequence and the reasoning history. In the first role, the LM acts as the reasoning agent, generating actions $a_t \sim p_\theta(a|s_t, m)$ based on the current state $s_t$ and a task-specific instruction $m$ . Subsequently, the LM functions as a world model, predicting the next state $s_{t+1}$ based on the current state and the chosen action, i.e., $p_\theta(s_{t+1}|s_t, a_t, m')$ , where $m'$ is an additional prompt guiding the transition process. Each reasoning step is evaluated using a reward function $r_t = r(s_t, a_t) \in \mathbb{R}$ , based on the LM's self-evaluation of the generated action and the log probability of the action with the history of states. Further details of the reward design are explained in Appendix B.
|
| 64 |
+
|
| 65 |
+
# 3.2 Monte Carlo Tree Search (MCTS)
|
| 66 |
+
|
| 67 |
+
To enhance strategic exploration, we incorporate planning with MCTS (Coulom, 2006), which is particularly effective for decision-making in high-dimensional spaces. MCTS builds a search tree over $k$ iterations to explore decision space through four main operators: selection, expansion, simulation, and back-propagation. At each node, which represents a state $s$ , the standard MCTS uses UCT (Kocsis and Szepesvári, 2006; Auer et al., 2002) algorithm to select the optimal action $a^*$ based on $Q$ -value as follows:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
a ^ {*} = \underset {a \in A (s)} {\arg \max} \left(Q (s, a) + w \sqrt {\frac {\ln N (s)}{N (s , a)}}\right), \tag {1}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $N(\cdot)$ denotes the total number of visits in previous iterations, $A(s)$ is the set of possible actions at state $s$ , and $w$ is the constant of balancing exploration and exploitation.
|
| 74 |
+
|
| 75 |
+
PUCT (Silver et al., 2016, 2017) provides a viable alternative to UCT by incorporating $\pi(a|s)$ , a predictor of the prior action distribution, into its formulation as follows:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
a ^ {*} = \underset {a \in A (s)} {\arg \max } \left(Q (s, a) + w \cdot \pi (a | s) \frac {\sqrt {N (s)}}{N (s , a) + 1}\right). \tag {2}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
The predictor $\pi (a|s)$ can be defined as the sequence probability $p_{\theta}(a|s,m)$ in the context of LLMs. A more detailed description of the operators used in MCTS can be found in Appendix C.
|
| 82 |
+
|
| 83 |
+
# 4 Method
|
| 84 |
+
|
| 85 |
+
Our method consists of adaptive gating (Section 4.1), semantic exploration (Section 4.2), and early stopping with weighted aggregation (Section 4.3), as shown in Figure 1. A detailed description of the algorithm is provided in Appendix D.
|
| 86 |
+
|
| 87 |
+
# 4.1 Adaptive Gating (AG)
|
| 88 |
+
|
| 89 |
+
AG adaptively determines when to expand the search tree based on the confidence of generated answers. Specifically, $k$ answers are sampled using a single-path method, such as CoT, and the confidence of these answers is used to determine whether to initiate tree search. The key insight is that not all problems require the same level of complexity in reasoning.
|
| 90 |
+
|
| 91 |
+
First, we generate $k$ reasoning paths using CoT, each producing an output $y^{i}\sim p_{\theta}(y|x,z_{\leq l}^{i}),\forall i\in$
|
| 92 |
+
|
| 93 |
+
$[k]$ , i.e., corresponding to CoT-SC. Let $\mathcal{V}$ denote the set of possible candidate outputs across $k$ reasoning paths. We define $q(y)$ as the estimated probability of output $y \in \mathcal{V}$ , computed as:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
q (y) = \frac {1}{k} \sum_ {i = 1} ^ {k} \mathbb {I} \left(y = y ^ {i}\right), \tag {3}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $\mathbb{I}$ is the indicator function. Notice that semantical clustering in Section 4.2 can be used when calculating $q(y)$ , while the indicator function handles cases where the final answer is numeric or discrete. We use entropy $H(y)$ as a gating function across the $k$ reasoning paths, calculated as:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
H (y) = - \sum_ {y \in \mathcal {Y}} q (y) \log q (y), \tag {4}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
which reflects the uncertainty in the model's reasoning. Based on this, if $H(y)$ is smaller than a predefined threshold $\tau$ indicating high confidence, the final answer $y^{*}$ is determined through majority voting as follows:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
y ^ {*} = \arg \max _ {y \in \mathcal {Y}} \sum_ {i = 1} ^ {k} \mathbb {I} \left(y = y ^ {i}\right), \text {i f} H (y) \leq \tau . \tag {5}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
Otherwise, if $H(y) > \tau$ , indicating lower confidence, we proceed by constructing a search tree and employing our proposed method, Semantic Exploration, as described in the following section. An analysis of entropy distribution is shown in Figure 4 in Section 5.3.
|
| 112 |
+
|
| 113 |
+
# 4.2 Semantic Exploration (SE)
|
| 114 |
+
|
| 115 |
+
For tree based search, we propose SE, which leverages linguistic semantics to avoid exploring semantically similar nodes. For example, as illustrated in Figure 3, node 1 ("How many pages did Julie read yesterday?") and node 3 ("What is the number of pages Julie finished reading yesterday?") convey the identical meaning. The key components of SE are semantic clustering and semantic PUCT.
|
| 116 |
+
|
| 117 |
+
Semantic clustering Semantic clustering groups generated actions based on their semantic equivalence. At the current node $s$ , the tree generates $d$ candidate actions, $A(s)$ , using a language model.
|
| 118 |
+
|
| 119 |
+
For each pair of actions $(a, a')$ in $A(s)$ , the equivalence relation $E(a, a')$ is established by checking for bi-directional entailment between the actions (Kuhn et al., 2023; Farquhar et al.,
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 3: Illustration of tree search-based reasoning methods (Yao et al., 2023; Hao et al., 2023) and SE (Ours). Nodes with similar color tones (e.g., blue and green) represent semantically similar node, and the thickness of each line indicates the magnitude of the exploration weight.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
|
| 126 |
+
2024). Specifically, each entailment decision is determined by applying an arg max function to the outputs of the DeBERTa-large model (He et al., 2020a), a relatively lightweight model compared to larger LLMs, which is used for single-sentence inputs. Actions with equivalent meanings are grouped into semantic equivalence clusters $\mathcal{C} = \{C_1,C_2,\dots ,C_{d'}\}$ , where each cluster $C_i\subseteq A(s)$ contains semantically identical actions and $d^{\prime}$ represents the total number of clusters. As illustrated in Figure 3, semantic clustering prevents the redundant expansion of subsequent sub-trees from nodes containing actions with equivalent meanings. Our analysis of semantically unique actions is presented in Section 5.3.
|
| 127 |
+
|
| 128 |
+
Semantic PUCT To achieve efficient exploration with semantic clusters $\mathcal{C}$ , we propose semantic PUCT. Previous research in LLMs has shown that more frequently generated samples indicate higher significance (Wang et al., 2023b). Leveraging this self-consistency principle, we define the predictor of each semantic cluster $C_i$ as the total probability assigned to the cluster:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\pi \left(C _ {i} | s\right) = \sum_ {a \in C _ {i}} p _ {\theta} (a | s, m). \tag {6}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
We extend the PUCT algorithm (Equation (2)) to operate at the level of semantic clusters as follows:
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
C ^ {*} = \underset {C \in \mathcal {C}} {\arg \max } \left(Q (s, C) + w \cdot \pi (C | s) \frac {\sqrt {N (s)}}{N (s , C) + 1}\right). \tag {7}
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
Once a semantic cluster $C_i$ is selected, the highest-probability action within the cluster, i.e., $a^* = \arg \max_{a \in C_i} p_\theta(a \mid s, m)$ , is used to construct the prompt for expansion. We present the effect of semantic PUCT in an ablation study in Section 5.4.
|
| 141 |
+
|
| 142 |
+
# 4.3 Early Stopping
|
| 143 |
+
|
| 144 |
+
We introduce an early stopping phase in MCTS to decide whether to terminate iterations early based on the confidence of the most probable answer. To measure this confidence, we use weighted aggregation rewards, which account for the semantic importance of nodes in the search tree.
|
| 145 |
+
|
| 146 |
+
Let $\mathcal{T}$ denote the set of terminal nodes, and $P(n_{j})$ be the set of nodes along the path from the root node to terminal node $n_j\in \mathcal{T}$ . The reward of a terminal node $n_j$ is computed by weighting the size of the semantic cluster $|C(n)|$ , where $C(n)$ is the cluster including the node $n$ :
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
R \left(n _ {j}\right) = \sum_ {n \in P \left(n _ {j}\right)} | C (n) | \cdot r (n), \forall n _ {j} \in \mathcal {T}. \tag {8}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
We define $Y(n_{j})$ as the extracted answer of a terminal node $n_j$ , and $\mathcal{V}'$ as the set of all extracted answers. The aggregated reward $R_{\mathrm{agg}}(y)$ for each answer $y \in \mathcal{V}'$ is then computed by summing the rewards of all terminal nodes that produce the same answer $y$ :
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
R _ {\mathrm {a g g}} (y) = \sum_ {n _ {j} \in \mathcal {T}, Y (n _ {j}) = y} R (n _ {j}). \tag {9}
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
This weighted aggregation ensures that nodes in larger semantic clusters, i.e., more significant nodes, have a greater influence on the reward aggregation.
|
| 159 |
+
|
| 160 |
+
At each iteration, when a terminal node is reached, the algorithm terminates early if the highest aggregated reward satisfies sufficient confidence threshold $\alpha$ :
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
y ^ {*} = \arg \max _ {y \in \mathcal {Y} ^ {\prime}} R _ {\text {a g g}} (y), \text {i f} \max _ {y \in \mathcal {Y} ^ {\prime}} R _ {\text {a g g}} (y) \geq \alpha . \tag {10}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
An ablation study of $\alpha$ is presented in Figure 5.
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan="2">Benchmark</td><td rowspan="2">Method</td><td colspan="2">Llama3-8B-Instruct</td><td colspan="2">Llama2-13B-Chat</td><td colspan="2">Mistral-7B-Instruct</td></tr><tr><td>Accuracy ↑</td><td># of inferences ↓</td><td>Accuracy ↑</td><td># of inferences ↓</td><td>Accuracy ↑</td><td># of inferences ↓</td></tr><tr><td rowspan="6">GSM8K</td><td>CoT</td><td>0.762</td><td>1</td><td>0.330</td><td>1</td><td>0.502</td><td>1</td></tr><tr><td>CoT-SC</td><td>0.845</td><td>10</td><td>0.417</td><td>10</td><td>0.665</td><td>10</td></tr><tr><td>ToT</td><td>0.785</td><td>104.80</td><td>0.378</td><td>102.06</td><td>0.613</td><td>122.16</td></tr><tr><td>RAP</td><td>0.825</td><td>128.40</td><td>0.372</td><td>121.69</td><td>0.667</td><td>161.86</td></tr><tr><td>SE (Ours)</td><td>0.850</td><td>82.63</td><td>0.403</td><td>69.47</td><td>0.675</td><td>98.79</td></tr><tr><td>SEAG (Ours)</td><td>0.860</td><td>41.69</td><td>0.435</td><td>53.09</td><td>0.685</td><td>84.14</td></tr><tr><td rowspan="6">ARC</td><td>CoT</td><td>0.818</td><td>1</td><td>0.598</td><td>1</td><td>0.688</td><td>1</td></tr><tr><td>CoT-SC</td><td>0.823</td><td>10</td><td>0.637</td><td>10</td><td>0.708</td><td>10</td></tr><tr><td>ToT</td><td>0.797</td><td>149.59</td><td>0.590</td><td>209.05</td><td>0.615</td><td>221.36</td></tr><tr><td>RAP</td><td>0.812</td><td>196.96</td><td>0.637</td><td>247.22</td><td>0.705</td><td>313.20</td></tr><tr><td>SE (Ours)</td><td>0.830</td><td>96.32</td><td>0.632</td><td>146.20</td><td>0.713</td><td>155.13</td></tr><tr><td>SEAG (Ours)</td><td>0.848</td><td>46.15</td><td>0.638</td><td>26.62</td><td>0.725</td><td>110.95</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 1: Comparison of reasoning methods effectiveness in accuracy and efficiency in the number of inferences for both GSM8K and ARC datasets. Bold texts indicate the best accuracies in each setting.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 4: Accuracy comparison of CoT-SC, RAP, and SE (Ours) methods across different entropy ranges for GSM8K and ARC datasets. The numbers at the top of each entropy bin represent the proportion of problems within the corresponding entropy range.
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
|
| 177 |
+
# 5 Experiments
|
| 178 |
+
|
| 179 |
+
In this section, we present the experimental evaluation of SEAG. Section 5.1 describes the experimental setup, including datasets and models. The main evaluation results are presented in Section 5.2. Detailed analyses follow in Section 5.3, along with ablation studies in Section 5.4. Additional experimental details are provided in Appendix E.
|
| 180 |
+
|
| 181 |
+
# 5.1 Experimental Setup
|
| 182 |
+
|
| 183 |
+
Baselines We consider four reasoning methods as baselines across sequential and tree-based reasoning approaches. CoT (Wei et al., 2022) and CoT-SC (Wang et al., 2023b) are sequential reasoning approaches, where CoT generates step-by-step reasoning paths, and CoT-SC extends this by incorporating self-consistency. ToT (Yao et al., 2023) and RAP (Hao et al., 2023) use tree search algorithms to explore multiple reasoning paths, utilizing algorithms such as beam search and MCTS, respectively. For SEAG, SE, and RAP, the number of MCTS iterations is 10 and the number of actions
|
| 184 |
+
|
| 185 |
+
is 4. For AG, we set $k = 10$ across all experiments. To ensure a fair comparison, we use identical prompts and the same number of in-context examples across all methods. The primary difference lies in the specific search mechanisms employed by each method. We present the detailed prompts for each baseline in Appendix I.
|
| 186 |
+
|
| 187 |
+
Datasets For evaluating the reasoning ability, we use two standard reasoning tasks: GSM8K (Cobbe et al., 2021), a dataset of 8.5k math word problems requiring multi-step numerical reasoning, and AI2 Reasoning Challenge (ARC) (Clark et al., 2018), a dataset containing 7.8k multiple-choice science questions sourced from grade-level science exams. For evaluation, we randomly sample 400 instances from the test sets of GSM8K and ARC.
|
| 188 |
+
|
| 189 |
+
Models We conduct experiments with different LLMs using Llama3-8B-Instruct (Dubey et al., 2024), Llama2-13B-Chat (Touvron et al., 2023), and Mistral-7B-Instruct-v0.3 (Jiang et al., 2023) to demonstrate the robustness of SEAG.
|
| 190 |
+
|
| 191 |
+
Evaluation metrics We use accuracy and computational costs, which are measured in terms of the number of inferences and tokens. The number of inferences refer to the total LLM calls required during the reasoning process per instance. Input tokens and output tokens denote the total number of tokens processed during reasoning and generated by the model as output, respectively, for each instance.
|
| 192 |
+
|
| 193 |
+
# 5.2 Main Results
|
| 194 |
+
|
| 195 |
+
Table 1 compares the accuracy and inference efficiency of six reasoning methods evaluated on the GSM8K and ARC using three different LLMs. The results for the base LLM are presented in in Appendix G. SEAG consistently outperforms all baseline methods in accuracy across all datasets and models, demonstrating its robustness and effectiveness. Notably, compared to RAP, which is our closest baseline, SEAG achieves a $4.3\%$ increase in accuracy while requiring only $31\%$ as many inferences as RAP, on average. This highlights SEAG's ability to deliver superior reasoning performance with improved computational efficiency. Further discussions on inference cost in terms of tokens are provided in Appendix G.
|
| 196 |
+
|
| 197 |
+
When evaluating SE independently, SE also achieves higher accuracy and fewer inference costs compared to tree search-based methods, RAP and ToT, as illustrated in Figure 2. By incorporating AG, SEAG further improves performance by adaptively determining reasoning paths. This allows SEAG to capitalize on CoT-SC's strength in internal reasoning, achieving higher accuracy while also enhancing computational efficiency. Additional plots using token cost as an alternative cost metric are presented in Appendix F.
|
| 198 |
+
|
| 199 |
+
# 5.3 Analyses
|
| 200 |
+
|
| 201 |
+
Necessity of AG Using the results of 10 independent CoT-SC samplings, we calculate confidence in terms of entropy values as defined in Equation (4). Problems are categorized into several groups based on their entropy values. Figure 4 presents the results of applying CoT, RAP, and SE to problems within each group. Notice that low entropy indicates that the model generates the same answer with confidence, while high entropy suggests that the model provides different answers across different samplings. We observe that CoT-SC achieves high accuracy for problems with low entropy. In contrast, RAP and SE, which incorpo
|
| 202 |
+
|
| 203 |
+
<table><tr><td rowspan="2">Depth</td><td colspan="2">GSM8K</td><td colspan="2">ARC</td></tr><tr><td># of semantic clusters</td><td>Reduction rate (%)</td><td># of semantic clusters</td><td>Reduction rate (%)</td></tr><tr><td>1</td><td>2.31</td><td>42.36</td><td>3.00</td><td>25.00</td></tr><tr><td>2</td><td>2.15</td><td>46.33</td><td>3.22</td><td>19.38</td></tr><tr><td>3</td><td>2.07</td><td>48.34</td><td>2.60</td><td>35.02</td></tr><tr><td>4</td><td>1.81</td><td>54.70</td><td>1.55</td><td>61.25</td></tr></table>
|
| 204 |
+
|
| 205 |
+
Table 2: The average number of semantic clusters (counts) and reduction rate $(\%)$ at each depth when four actions are generated at every step, $d = 4$ for both GSM8K and ARC datasets.
|
| 206 |
+
|
| 207 |
+
rate tree search, demonstrate superior accuracy for high-entropy problems.
|
| 208 |
+
|
| 209 |
+
Efficiency improvement by SE To evaluate the impact of SE, we measure the number of unique semantic clusters $d^{\prime}$ (i.e., the number of nodes expanded after applying semantic clustering) and the reduction rate at each depth when four actions, $d = 4$ , are generated in each state. Table 2 presents that semantic clustering effectively reduces the redundant search space from $25 - 45\%$ at depth 1 to $50 - 65\%$ at depth 4. In overall, semantic clustering eliminates approximately $20 - 60\%$ of semantically redundant paths, significantly reducing the search space across different depths and datasets. These results indicate that SE avoids repeatedly expanding and exploring semantically redundant paths by incorporating semantic equivalence. Additionally, in Appendix H, we provide a brief analysis on prompt design modification to encourage diverse action sampling as an alternative approach to SE.
|
| 210 |
+
|
| 211 |
+
Effect of the number of tokens We analyze the effect of increasing average token cost on the accuracy improvement of the methods in Figure 5. Token cost is calculated based on the pricing policy of commercial LLM APIs, where output tokens are assigned a cost approximately four times higher than input tokens. For RAP, token cost is controlled by varying the number of MCTS iterations, set to 4, 6, 8, and 10. For SE, we adjust the early stopping threshold $\alpha$ , set to 5, 7, 9, and 11, while fixing the number of MCTS iterations at 10. As shown in Figure 5, SE demonstrates a steeper performance improvement compared to RAP. Furthermore, by incorporating AG into SE, SEAG shows the highest accuracy (when $\alpha = 11$ ), and achieves further improvements in both accuracy and token cost.
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 5: Comparisons of reasoning methods in average accuracy with increasing token cost. The token cost varies along with the different hyperparameters such as the number of MCTS iterations $k$ and early stopping thresholds $\alpha$ .
|
| 217 |
+
|
| 218 |
+
<table><tr><td>Method</td><td>Average latency (sec)</td></tr><tr><td>CoT</td><td>1.43</td></tr><tr><td>CoT-SC</td><td>13.67</td></tr><tr><td>ToT</td><td>120.63</td></tr><tr><td>RAP</td><td>151.19</td></tr><tr><td>SE (Ours)</td><td>76.44</td></tr><tr><td>SEAG (Ours)</td><td>38.89</td></tr></table>
|
| 219 |
+
|
| 220 |
+
Latency analysis We assess the end-to-end latency of each reasoning method on 100 randomly selected ARC instances using the Llama3-8B-Instruct on a single NVIDIA RTX A5000 GPU. As shown in Table 3, SE achieves a reduced average latency of 76.44 seconds, including only 2.54 seconds for semantic clustering, compared to ToT (120.63 s) and RAP (151.19 s). Our final method SEAG further improves computational efficiency by adaptively invoking SE only when necessary. Specifically, SEAG terminates early after CoT-SC in approximately $67\%$ of cases, resulting in a low average latency of $\approx 13.67$ seconds, and utilizes the
|
| 221 |
+
|
| 222 |
+
Table 3: Average end-to-end latency of reasoning methods evaluated on the ARC dataset using Llama3-8B-Instruct.
|
| 223 |
+
|
| 224 |
+
<table><tr><td></td><td>Action selection method</td><td>Accuracy</td><td># of inferences</td></tr><tr><td rowspan="3">GSM8K</td><td>UCT</td><td>0.828</td><td>83.53</td></tr><tr><td>PUCT</td><td>0.840</td><td>85.39</td></tr><tr><td>Semantic PUCT (Ours)</td><td>0.850</td><td>82.63</td></tr><tr><td rowspan="3">ARC</td><td>UCT</td><td>0.815</td><td>95.16</td></tr><tr><td>PUCT</td><td>0.818</td><td>97.88</td></tr><tr><td>Semantic PUCT (Ours)</td><td>0.830</td><td>96.32</td></tr></table>
|
| 225 |
+
|
| 226 |
+
Table 4: Ablation study of action selection algorithms, including UCT, PUCT, and Semantic PUCT (Ours), presenting average accuracy and the number of inferences for both GSM8K and ARC datasets.
|
| 227 |
+
|
| 228 |
+
<table><tr><td></td><td>Aggregation method</td><td>Accuracy</td><td># of inferences</td></tr><tr><td rowspan="2">GSM8K</td><td>Equal weighting</td><td>0.845</td><td>95.89</td></tr><tr><td>Weighting by |C|</td><td>0.850</td><td>82.63</td></tr><tr><td rowspan="2">ARC</td><td>Equal weighting</td><td>0.828</td><td>111.00</td></tr><tr><td>Weighting by |C|</td><td>0.830</td><td>96.32</td></tr></table>
|
| 229 |
+
|
| 230 |
+
Table 5: Ablation study of aggregation methods, including equal weighting and weighted aggregation (Ours), presenting average accuracy and the number of inferences for both GSM8K and ARC datasets.
|
| 231 |
+
|
| 232 |
+
full SE reasoning process in the remaining $33\%$ of cases with an average latency of $\approx 90.11$ seconds. The ordering and trend of latency across methods are consistent with those observed in LLM inference counts and token usage.
|
| 233 |
+
|
| 234 |
+
# 5.4 Ablation Studies
|
| 235 |
+
|
| 236 |
+
Improvement by semantic PUCT To evaluate the effectiveness of the proposed action selection algorithm, semantic PUCT in equation (7), we conduct an ablation study with two existing algorithms: UCT, which relies solely on a count-based uncertainty term in equation (2), and PUCT, which incorporates an uncertainty term involving $\pi (a|s)$ and a count-based term in equation (2). In Table 5, we demonstrate that Semantic PUCT outperforms the existing algorithms while maintaining comparable efficiency by encouraging exploration of semantically probable clusters with $\pi (C|s)$ .
|
| 237 |
+
|
| 238 |
+
Improvement by weighted aggregation of rewards To evaluate the effectiveness of the aggregation strategy weighted by $|C(n)|$ , we conducted a comparison with an aggregation strategy where all actions were weighted equally (i.e., manually set $|C(n)|$ to 1 in equation 8), regardless of clustering. The experiments were conducted using the SEAG method. To ensure a fair comparison of LLM computation costs, $\alpha$ was set to 11 for the weighted aggregation and 8 for the equal weighting
|
| 239 |
+
|
| 240 |
+
strategy. As shown in Table 5, the weighted aggregation consistently achieved higher accuracy across both benchmarks while incurring lower LLM computation costs.
|
| 241 |
+
|
| 242 |
+
# 6 Conclusion
|
| 243 |
+
|
| 244 |
+
In this paper, we propose Semantic Exploration with Adaptive Gating (SEAG), a framework that enhances the efficiency and accuracy of multi-step reasoning tasks in LLMs. SEAG addresses two key issues in tree-based reasoning methods: (i) the unnecessary use of complex reasoning techniques for tasks solvable with simpler approaches, and (ii) the generation of semantically redundant nodes during exploration. By combining adaptive gating to evaluate task complexity, semantic exploration to minimize redundancy, and early stopping to reduce computational overhead, SEAG achieves significant performance improvements.
|
| 245 |
+
|
| 246 |
+
# Limitations
|
| 247 |
+
|
| 248 |
+
Our method focuses on leveraging only internal knowledge to enhance the efficiency of tree search-based reasoning methods. This focus ensures a fair evaluation of the method's inherent efficiency without reliance on external tools or feedback. Expanding the approach to incorporate such external resources could further improve the reasoning process, presenting a promising direction for future work. Furthermore, the experiments are primarily conducted on benchmarks where final answers are provided in a discrete form, rather than freeform natural language generation. Evaluating the method on tasks requiring open-ended responses is left as future work.
|
| 249 |
+
|
| 250 |
+
# Acknowledgements
|
| 251 |
+
|
| 252 |
+
This work was supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grants funded by the Korea government (MSIT) (No.RS-2019-II191906, Artificial Intelligence Graduate School Program (POSTECH); No.RS-2024-00457882, AI Research Hub Project; No.RS-2024-00509258, Global AI Frontier Lab) and the Korea Institute for Advancement of Technology (KAIT), funded by the Ministry of Trade, Industry and Energy (MOTIE), Republic of Korea (No.RS-2025-00564342).
|
| 253 |
+
|
| 254 |
+
# References
|
| 255 |
+
|
| 256 |
+
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.
|
| 257 |
+
Peter Auer, Nicolò Cesa-Bianchi, and Paul Fischer. 2002. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47:235-256.
|
| 258 |
+
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.
|
| 259 |
+
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. 2023. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240):1-113.
|
| 260 |
+
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457.
|
| 261 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
|
| 262 |
+
Jeremy R Cole, Michael JQ Zhang, Daniel Gillick, Julian Martin Eisenschlos, Bhuwan Dhingra, and Jacob Eisenstein. 2023. Selectively answering ambiguous questions. arXiv preprint arXiv:2305.14613.
|
| 263 |
+
Rémi Coulom. 2006. Efficient selectivity and backup operators in monte-carlo tree search. In International conference on computers and games, pages 72-83. Springer.
|
| 264 |
+
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.
|
| 265 |
+
Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017):625-630.
|
| 266 |
+
Samuel Fernando and Mark Stevenson. 2008. A semantic similarity approach to paraphrase detection. In Proceedings of the 11th annual research colloquium of the UK special interest group for computational linguistics, pages 45-52. CiteSeer.
|
| 267 |
+
|
| 268 |
+
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.
|
| 269 |
+
Shibo Hao, Yi Gu, Haodi Ma, Joshua Hong, Zhen Wang, Daisy Wang, and Zhiting Hu. 2023. Reasoning with language model is planning with world model. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 8154-8173.
|
| 270 |
+
Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020a. Deberta: Decoding-enhanced bert with disentangled attention. arXiv preprint arXiv:2006.03654.
|
| 271 |
+
Ruining He, Anirudh Ravula, Bhargav Kanagal, and Joshua Ainslie. 2020b. Realformer: Transformer likes residual attention. arXiv preprint arXiv:2012.11747.
|
| 272 |
+
Fuad Issa, Marco Damonte, Shay B Cohen, Xiaohui Yan, and Yi Chang. 2018. Abstract meaning representation for paraphrase detection. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 442-452.
|
| 273 |
+
Youngsoo Jang, Seokin Seo, Jongmin Lee, and Kee-Eung Kim. 2021. Monte-carlo planning and learning with language action value estimates. In International Conference on Learning Representations.
|
| 274 |
+
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.
|
| 275 |
+
Levente Kocsis and Csaba Szepesvári. 2006. Bandit based monte-carlo planning. In European conference on machine learning, pages 282-293. Springer.
|
| 276 |
+
Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35:22199-22213.
|
| 277 |
+
Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. In The Eleventh International Conference on Learning Representations.
|
| 278 |
+
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.
|
| 279 |
+
|
| 280 |
+
Jieyi Long. 2023. Large language model guided tree-of-thought. arXiv preprint arXiv:2305.08291.
|
| 281 |
+
Aman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang, and Graham Neubig. 2022. Language models of code are few-shot commonsense learners. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
|
| 282 |
+
Andrey Malinin and Mark Gales. 2018. Predictive uncertainty estimation via prior networks. Preprint, arXiv:1802.10501.
|
| 283 |
+
Swaroop Mishra, Matthew Finlayson, Pan Lu, Leonard Tang, Sean Welleck, Chitta Baral, Tanmay Rajpurohit, Oyvind Tafjord, Ashish Sabharwal, Peter Clark, et al. 2022. Lila: A unified benchmark for mathematical reasoning. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
|
| 284 |
+
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.
|
| 285 |
+
Arkil Patel, Satwik Bhattachamishra, and Navin Goyal. 2021. Are nlp models really able to solve simple math word problems? Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.
|
| 286 |
+
Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, et al. 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations.
|
| 287 |
+
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. 2016. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484-489.
|
| 288 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. 2017. Mastering the game of go without human knowledge. nature, 550(7676):354-359.
|
| 289 |
+
Richard Socher, Eric Huang, Jeffrey Pennin, Christopher D Manning, and Andrew Ng. 2011. Dynamic pooling and unfolding recursive autoencoders for paraphrase detection. Advances in neural information processing systems, 24.
|
| 290 |
+
Yi Tay, Vinh Q Tran, Sebastian Ruder, Jai Gupta, Hyung Won Chung, Dara Bahri, Zhen Qin, Simon Baumgartner, Cong Yu, and Donald Metzler. 2021. Charformer: Fast character transformers via gradient-based subword tokenization. arXiv preprint arXiv:2106.12672.
|
| 291 |
+
|
| 292 |
+
Gemini Team, Rohan Anil, Sebastian Borgeaud, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, Katie Millican, et al. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805.
|
| 293 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 294 |
+
Ziyu Wan, Xidong Feng, Muning Wen, Stephen Marcus McAleer, Ying Wen, Weinan Zhang, and Jun Wang. 2024. Alphazero-like tree-search can guide large language model decoding and training. In *Forty-first International Conference on Machine Learning*.
|
| 295 |
+
Jianing Wang, Qiushi Sun, Nuo Chen, Chengyu Wang, Jun Huang, Ming Gao, and Xiang Li. 2023a. Uncertainty-aware parameter-efficient self-training for semi-supervised language understanding. Preprint, arXiv:2310.13022.
|
| 296 |
+
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2023b. Self-consistency improves chain of thought reasoning in language models. In The Eleventh International Conference on Learning Representations.
|
| 297 |
+
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.
|
| 298 |
+
Yuhuai Wu, Albert Qiaochu Jiang, Wenda Li, Markus Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. 2022. Autoformalization with large language models. Advances in Neural Information Processing Systems, 35:32353-32368.
|
| 299 |
+
Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Tom Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of thoughts: Deliberate problem solving with large language models. In Advances in Neural Information Processing Systems, volume 36.
|
| 300 |
+
Semin Yavuz, Kazuma Hashimoto, Yingbo Zhou, Nitish Shirish Keskar, and Caiming Xiong. 2022. Modeling multi-hop question answering as single sequence prediction. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
|
| 301 |
+
Lei Yu, Karl Moritz Hermann, Phil Blunsom, and Stephen Pulman. 2014. Deep learning for answer sentence selection. arXiv preprint arXiv:1412.1632.
|
| 302 |
+
Dan Zhang, Sining Zhoubian, Ziniu Hu, Yisong Yue, Yuxiao Dong, and Jie Tang. 2024a. Rest-mcts*: Llm self-training via process reward guided tree search. arXiv preprint arXiv:2406.03816.
|
| 303 |
+
|
| 304 |
+
Jiaxin Zhang, Zhuohang Li, Kamalika Das, Bradley A. Malin, and Sricharan Kumar. 2024b. Sac3: Reliable hallucination detection in black-box language models via semantic-aware cross-check consistency. Preprint, arXiv:2311.01740.
|
| 305 |
+
Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander Smola, and Le Song. 2018. Variational reasoning for question answering with knowledge graph. In Proceedings of the AAAI conference on artificial intelligence, volume 32.
|
| 306 |
+
Andy Zhou, Kai Yan, Michal Shlapentokh-Rothman, Haohan Wang, and Yu-Xiong Wang. 2024. Language agent tree search unifies reasoning, acting, and planning in language models. In *Forty-first International Conference on Machine Learning*.
|
| 307 |
+
|
| 308 |
+
# Appendix
|
| 309 |
+
|
| 310 |
+
# A Further Details of Reasoning Frameworks in Language Models
|
| 311 |
+
|
| 312 |
+
Chain-of-Thought (CoT) prompting (Wei et al., 2022) sequentially generates thoughts $z_{1}, \ldots, z_{l}$ , where $z_{i} \sim p_{\theta}(z_{i}|x, z_{<i})$ , and then generates the output with these thoughts, i.e., $y \sim p_{\theta}(y|x, z_{\leq l})$ .
|
| 313 |
+
|
| 314 |
+
Self-Consistency with CoT (CoT-SC) (Wang et al., 2023b). CoT-SC is an ensemble-based method that leverages $k$ independently sampled reasoning paths, each generated using CoT prompting. Specifically, for each $i \in [k]$ , a reasoning path generates an output $y^i \sim p_\theta(y|x,z_{\leq l}^i)$ . The final output is determined by majority voting across $k$ paths: $\arg \max_{y \in \mathcal{Y}} \sum_{i=1}^{k} \mathbb{I}(y^i = y)$ , where $\mathcal{Y}$ is the set of all possible candidate outputs and $\mathbb{I}(\cdot)$ is the indicator function.
|
| 315 |
+
|
| 316 |
+
Tree-of-Thought (ToT) prompting (Yao et al., 2023). For exploring multiple reasoning paths, ToT prompting extends CoT by structuring the reasoning process as a tree structure, where each node represents a reasoning state $s = [x, z_1, \dots, z_i]$ with input $x$ and the sequence of intermediate thoughts. Intermediate thoughts are generated sequentially as $z_i \sim p_\theta(z_i | x, z_{<i})$ . The exploration relies on search algorithms, such as Breath-First Search (BFS) or Depth-First Search (DFS), to evaluate and prioritize paths using heuristics based on LM evaluations of each state.
|
| 317 |
+
|
| 318 |
+
# B Reward Design in MDP
|
| 319 |
+
|
| 320 |
+
We adapt the reward design proposed in RAP (Hao et al., 2023), focuses on evaluating the feasibility and desirability of reasoning steps. This approach incorporates a reward function $r_t = r(s_t, a_t) \in \mathbb{R}$ to assess the impact of an action $a_t$ to a state $s_t$ . Our reward design integrates two key components: self-evaluation of the action's helpfulness and confidence of the resulting state.
|
| 321 |
+
|
| 322 |
+
Self-evaluation by the LLM The model can self-assess the helpfulness of reasoning by answering questions, such as "Is this reasoning step useful?". The reward is derived from the probability of the token "Yes", which provides an estimate of the LLM's confidence in the correctness of its reasoning. This self-evaluation mechanism can adapt to task-specific nuances.
|
| 323 |
+
|
| 324 |
+
Confidence of the state The confidence of a state is determined by sampling multiple answers from the model and calculating the proportion of the most frequent answer. A higher confidence score indicates stronger alignment with the LLM's internal knowledge, promoting more reliable reasoning steps. For ARC dataset, which requires answers in natural language, we also incorporate the concept of semantic exploration to merge similar states, enabling more accurate confidence estimation. In SE, we construct the LLM prompt by uniformly sampling actions from a semantic cluster when generating multiple answers.
|
| 325 |
+
|
| 326 |
+
# C Monte Carlo Tree Search (MCTS)
|
| 327 |
+
|
| 328 |
+
Selection In the selection phase, algorithm chooses a move at a node or an action in the tree. The choice is based on pre-defined strategies, the typically the Upper Confidence Bound applied to Trees (UCT) (Kocsis and Szepesvári, 2006), which is based on the upper confidence bound (UCB) (Auer et al., 2002). At node $s$ , we select the action with balance exploration trying less visited actions and exploitation choosing actions with higher state-action value function $Q: S \times \mathcal{A} \mapsto \mathbb{R}$ , which estimated the expected future reward with $(s, a)$ .
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
a ^ {*} = \underset {a \in A (s)} {\arg \max } \left(Q (s, a) + w \sqrt {\frac {\ln N (s)}{N (s , a)}}\right), \tag {11}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
where $N(\cdot)$ denotes the total number of visits in previous iterations, $A(s)$ is the set of possible actions at state $s$ , and $w$ is the constant of balancing exploration and exploitation.
|
| 335 |
+
|
| 336 |
+
Expansion Expansion corresponds to generate new child nodes in a decision tree. Given the state at the leaf node, the LM samples $d$ possible actions, forming the action set $A(s)$ which requires $d$ LLM inferences. It then predicts the corresponding next states (the $d$ child nodes).
|
| 337 |
+
|
| 338 |
+
Simulation Simulation corresponds to estimate the $Q$ -value at a given node by simulating future states from the node. The candidate actions are evaluated using reward function $r$ , selecting the action with the highest local reward $a' = \arg \max_{a \in A(s)} r(s, a)$ .
|
| 339 |
+
|
| 340 |
+
Back-propagation When a terminal state is reached, marking the completion of a single reasoning path within one iteration, the $Q$ values of all
|
| 341 |
+
|
| 342 |
+
<table><tr><td>Setting</td><td>Parameter</td><td>Value</td></tr><tr><td rowspan="3">LLM-related setting</td><td>temperature</td><td>0.8</td></tr><tr><td>top-k</td><td>50</td></tr><tr><td>top-p</td><td>0.95</td></tr><tr><td rowspan="2">General setting</td><td>batch size</td><td>1</td></tr><tr><td>the number of examples (prompts)</td><td>1</td></tr><tr><td rowspan="6">MCTS setting</td><td>depth limit</td><td>5</td></tr><tr><td>the number of iterations</td><td>10</td></tr><tr><td>the number of actions</td><td>4</td></tr><tr><td>reward alpha</td><td>0.5</td></tr><tr><td>the number of confidences</td><td>8</td></tr><tr><td>a default value of reward confidence</td><td>0.8</td></tr><tr><td rowspan="2">ToT setting</td><td>beam size</td><td>3</td></tr><tr><td>depth limit</td><td>5</td></tr><tr><td>CoT-SC setting</td><td>the number of self-consistency</td><td>10</td></tr></table>
|
| 343 |
+
|
| 344 |
+
Table A1: Default hyperparameters for SE, RAP, ToT, and CoT-SC. Parameters are grouped into LLM-related, general, and method-specific settings.
|
| 345 |
+
|
| 346 |
+
nodes along the path are updated. After completing a $k$ of MCTS iterations, the algorithm terminates, selecting the final answer. terminate algorithm and aggregation of lots of reasoning traces.
|
| 347 |
+
|
| 348 |
+
# D SEAG Algorithm
|
| 349 |
+
|
| 350 |
+
Algorithm 1 presents the detailed procedure of SEAG, illustrating its key steps: adaptive gating, semantic exploration, and early stopping.
|
| 351 |
+
|
| 352 |
+
# E Experimental Settings
|
| 353 |
+
|
| 354 |
+
We describe the detailed experimental settings to ensure reproducibility. Table A1 presents the default hyperparameters for each method.
|
| 355 |
+
|
| 356 |
+
All experiments were conducted using a single GPU and for Llama3-8B and Mistral-7B models, and two GPUs for Llama2-13B model. The total computational resource is required to produce the results in Table 1 is approximately 832 GPU hours. We utilize RTX 3090, A5000, and A6000 GPUs for all experiments. Due to the high computational cost, we report results based on a single run.
|
| 357 |
+
|
| 358 |
+
# F Efficiency with Token Cost
|
| 359 |
+
|
| 360 |
+
We provide additional scatter plots in Figure A1 where token cost is used as the cost metric instead of the number of inferences as shown in Figure 2. The token cost metric represents the cumulative number of tokens processed by the LLM
|
| 361 |
+
|
| 362 |
+
during inference. The token cost is measured based on a commonly used pricing policy for LLMs, where the total cost is calculated as (Token cost) = (Input tokens) + 4 × (Output tokens). Figure A1 shows similar patterns to those observed in the main paper. This consistency reinforces the robustness of our methods in achieving superior accuracy while minimizing computational expense across different cost perspectives.
|
| 363 |
+
|
| 364 |
+
# G Extended Experimental Results
|
| 365 |
+
|
| 366 |
+
In this section, we provide additional experimental results comparing the accuracy and computational costs of various methods on the GSM8K and ARC benchmarks. Specifically, we present results using both Llama3-8B-Base in Table A2 and Llama3-8B-Instruct models in Table A3. Both tables highlight the improvements in accuracy and efficiency achieved by our proposed methods, SE (Ours) and SEAG (Ours), across benchmarks. These improvements are evident not only in accuracy across all baselines but also in reductions in the number of inferences, input tokens, and output tokens compared to tree search-based methods.
|
| 367 |
+
|
| 368 |
+
# H Prompt Design Modification for Diverse Action Sampling
|
| 369 |
+
|
| 370 |
+
To encourage the generation of semantically unique actions, one can consider sampling actions in a
|
| 371 |
+
|
| 372 |
+
Algorithm 1 Semantic Exploration with Adaptive Gating (SEAG)
|
| 373 |
+
|
| 374 |
+
1: Input: Input $x$ , the number of reasoning paths $k$ and $k'$ , entropy thresholds $\tau$ , reward confidence $\alpha$ , a semantic equivalence relation $E(\cdot, \cdot)$
|
| 375 |
+
2: Output: Final answer $y^{*}$
|
| 376 |
+
3: Generate $k$ reasoning paths $\{y^i\}_{i=1}^k$ using CoT: Step 1: Adaptive Gating
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
y ^ {i} \sim p _ {\theta} (y | x, z _ {\leq l} ^ {i}), \quad \forall i \in [ k ]
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
4: Compute the estimated probability for each $y \in \mathcal{V}$ , where $\mathcal{V}$ is the set of candidate outputs across $k$ paths: $q(y) = \frac{1}{k} \sum_{i=1}^{k} \mathbb{I}(y = y^i)$
|
| 383 |
+
5: Compute entropy $H(y) = -\sum_{y \in \mathcal{Y}} q(y) \log(q(y))$
|
| 384 |
+
6: if $H(y) \leq \tau$ then
|
| 385 |
+
7: Select final answer using majority voting: $y^{*} = \arg \max_{y\in \mathcal{Y}}\sum_{i = 1}^{k}\mathbb{I}(y = y^{i})$
|
| 386 |
+
8: Return: Final answer $y^{*}$
|
| 387 |
+
9: else
|
| 388 |
+
|
| 389 |
+
10: for each iteration from 1 to $k'$ do
|
| 390 |
+
|
| 391 |
+
11: Set current node $s$
|
| 392 |
+
12: repeat
|
| 393 |
+
13: Generate candidate actions $A(s)$
|
| 394 |
+
14: Group actions into semantic clusters $\mathcal{C} = \{C_1, C_2, \ldots, C_{d'}\}$ using $E(a, a')$ .
|
| 395 |
+
15: Compute $\pi (C_i|s) = \sum_{a\in C_i}p_\theta (a|s,m)$ for each semantic cluster $C_i$
|
| 396 |
+
16: Select a semantic cluster $C$ via semantic PUCT:
|
| 397 |
+
|
| 398 |
+
Step 2: Semantic Exploration
|
| 399 |
+
|
| 400 |
+
$$
|
| 401 |
+
C ^ {*} = \underset {C \in \mathcal {C}} {\arg \max } \left(Q (s, C) + w \cdot \pi (C | s) \frac {\sqrt {N (s)}}{N (s , C) + 1}\right).
|
| 402 |
+
$$
|
| 403 |
+
|
| 404 |
+
17: Select action $a^* = \arg \max_{a \in C^*} p_\theta(a \mid s, m)$ and expand node $s$ .
|
| 405 |
+
18: until A terminal node is reached.
|
| 406 |
+
19: For terminal nodes $n_j \in \mathcal{T}$ , compute path rewards: Step 3-1: Weighted Aggregation
|
| 407 |
+
|
| 408 |
+
$$
|
| 409 |
+
R (n _ {j}) = \sum_ {n \in P (n _ {j})} | C (n) | \cdot r (n)
|
| 410 |
+
$$
|
| 411 |
+
|
| 412 |
+
20: Define $Y(n_{j})$ as the extracted answer of a terminal node $n_j$ and $y'$ as the set of answers.
|
| 413 |
+
21: Aggregate rewards for each answer $y \in \mathcal{Y}'$ :
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
R _ {\mathrm {a g g}} (y) = \sum_ {n _ {j} \in \mathcal {T}, Y (n _ {j}) = y} R (n _ {j})
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
22: if $\max_{y\in \mathcal{Y}}R_{\mathrm{agg}}(y)\geq \alpha$ then
|
| 420 |
+
23: Select final answer: $y^{*} = \arg \max_{y\in \mathcal{Y}}R_{\mathrm{agg}}(y)$
|
| 421 |
+
24: Return: Final answer $y^{*}$
|
| 422 |
+
25: else
|
| 423 |
+
26: // Back-propagation
|
| 424 |
+
27: end if
|
| 425 |
+
28: Return: Final answer $y^{*}$
|
| 426 |
+
29: end for
|
| 427 |
+
30: end if
|
| 428 |
+
|
| 429 |
+
Step 3-2: Early Stopping
|
| 430 |
+
|
| 431 |
+

|
| 432 |
+
Figure A1: Scatter plots of accuracy and token cost for baselines and our methods, SE and SEAG, with GSM8K (left) and ARC (right) using Llama3-8B-Instruct model.
|
| 433 |
+
|
| 434 |
+

|
| 435 |
+
|
| 436 |
+
<table><tr><td>Benchmark</td><td>Method</td><td>Accuracy ↑</td><td># of inferences ↓</td><td>Input tokens ↓</td><td>Output tokens ↓</td></tr><tr><td rowspan="6">GSM8K</td><td>CoT</td><td>0.445</td><td>1</td><td>218.37</td><td>85.26</td></tr><tr><td>CoT-SC</td><td>0.598</td><td>10</td><td>2183.76</td><td>906.97</td></tr><tr><td>ToT</td><td>0.598</td><td>121.93</td><td>57187.68</td><td>2856.04</td></tr><tr><td>RAP</td><td>0.665</td><td>146.18</td><td>67526.58</td><td>3113.34</td></tr><tr><td>SE (Ours)</td><td>0.675</td><td>92.89</td><td>42832.03</td><td>1969.56</td></tr><tr><td>SEAG (Ours)</td><td>0.683</td><td>64.84</td><td>25853.65</td><td>1263.95</td></tr><tr><td rowspan="6">ARC</td><td>CoT</td><td>0.713</td><td>1</td><td>215.80</td><td>29.56</td></tr><tr><td>CoT-SC</td><td>0.787</td><td>10</td><td>2157.93</td><td>362.51</td></tr><tr><td>ToT</td><td>0.748</td><td>169.82</td><td>75622.06</td><td>2886.81</td></tr><tr><td>RAP</td><td>0.767</td><td>208.82</td><td>91586.37</td><td>3224.82</td></tr><tr><td>SE (Ours)</td><td>0.775</td><td>103.55</td><td>44404.50</td><td>1511.65</td></tr><tr><td>SEAG (Ours)</td><td>0.788</td><td>12.33</td><td>3155.79</td><td>397.37</td></tr></table>
|
| 437 |
+
|
| 438 |
+
Table A2: Comparison of reasoning methods effectiveness in accuracy and efficiency in the number of inferences, input tokens and output tokens for both GSM8K and ARC datasets using Llama3-8B-Base.
|
| 439 |
+
|
| 440 |
+
<table><tr><td>Benchmark</td><td>Method</td><td>Accuracy ↑</td><td># of inferences ↓</td><td>Input tokens ↓</td><td>Output tokens ↓</td></tr><tr><td rowspan="6">GSM8K</td><td>CoT</td><td>0.762</td><td>1</td><td>218.37</td><td>85.86</td></tr><tr><td>CoT-SC</td><td>0.845</td><td>10</td><td>2183.73</td><td>943.66</td></tr><tr><td>ToT</td><td>0.785</td><td>104.80</td><td>49003.05</td><td>2355.06</td></tr><tr><td>RAP</td><td>0.825</td><td>128.40</td><td>59800.59</td><td>2587.73</td></tr><tr><td>SE (Ours)</td><td>0.850</td><td>82.63</td><td>38743.45</td><td>1766.21</td></tr><tr><td>SEAG (Ours)</td><td>0.860</td><td>41.69</td><td>17501.68</td><td>1759.50</td></tr><tr><td rowspan="6">ARC</td><td>CoT</td><td>0.818</td><td>1</td><td>215.79</td><td>48.315</td></tr><tr><td>CoT-SC</td><td>0.823</td><td>10</td><td>2157.93</td><td>505.79</td></tr><tr><td>ToT</td><td>0.797</td><td>149.59</td><td>67534.70</td><td>3033.07</td></tr><tr><td>RAP</td><td>0.812</td><td>196.96</td><td>88670.52</td><td>3636.17</td></tr><tr><td>SE (Ours)</td><td>0.830</td><td>96.32</td><td>42507.85</td><td>1692.92</td></tr><tr><td>SEAG (Ours)</td><td>0.848</td><td>46.15</td><td>15993.29</td><td>655.90</td></tr></table>
|
| 441 |
+
|
| 442 |
+
Table A3: Comparison of reasoning methods effectiveness in accuracy and efficiency in the number of inferences, input tokens and output tokens for both GSM8K and ARC datasets using Llama3-8B-Instruct.
|
| 443 |
+
|
| 444 |
+
sequential manner rather than i.i.d. sampling using the same prompt. Specifically, we modify the sentence in the original prompt, "Given a question, please decompose it into sub-questions." into "Given a question, please decompose it into sub-questions with a distinct meaning from the following sub-questions: 'How many pages did Julie read
|
| 445 |
+
|
| 446 |
+
yesterday?', 'What is the number of pages Julie finished reading today?' when sampling the third action to steer the LLM toward generating actions with different meanings.
|
| 447 |
+
|
| 448 |
+
Following the procedure in Table 2, we implement SE using both the i.i.d. and sequential manners of action generation and compare the number
|
| 449 |
+
|
| 450 |
+
<table><tr><td rowspan="2">Depth</td><td colspan="2">GSM8K</td><td colspan="2">ARC</td></tr><tr><td>i.i.d. sampling</td><td>Sequential generation</td><td>i.i.d. sampling</td><td>Sequential generation</td></tr><tr><td>1</td><td>2.31</td><td>1.37</td><td>3.00</td><td>1.72</td></tr><tr><td>2</td><td>2.15</td><td>1.53</td><td>3.22</td><td>2.00</td></tr><tr><td>3</td><td>2.07</td><td>1.59</td><td>2.60</td><td>2.05</td></tr><tr><td>4</td><td>1.81</td><td>1.53</td><td>1.55</td><td>1.17</td></tr></table>
|
| 451 |
+
|
| 452 |
+
Table A4: The average number of semantic clusters (counts) for i.i.d. sampling and sequential generation at each depth when four actions are generated at every step, $d = 4$ for both GSM8K and ARC datasets.
|
| 453 |
+
|
| 454 |
+
of unique semantic clusters expanded with Llama3-8B-Instruct. Interestingly, the sequential manner designed to encourage the generation of semantically distinct actions results in fewer unique semantic clusters compared to the standard i.i.d. sampling as shown in A4. Additionally, we observe a performance drop in accuracy with the sequential manner compared to i.i.d. sampling, from 0.850 to 0.812 on GSM8K and from 0.830 to 0.823 on ARC. Thus, while generating non-redundant actions through prompt-level modifications can be an interesting direction, it seems to be non-trivial. Moreover, conditioning action generation on previously sampled actions may shift the sampling distribution, potentially limiting the virtue of semantic consistency inherent in i.i.d. sampling, which is a key advantage used in SE.
|
| 455 |
+
|
| 456 |
+
# I Prompt
|
| 457 |
+
|
| 458 |
+
Figure A2, A3, and A4 present examples of prompts. We use a 1-shot example for all inferences, including prompts for answer, action, and reward generation in tree search-based reasoning and CoT prompting.
|
| 459 |
+
|
| 460 |
+
# A CoT prompt for GSM8K
|
| 461 |
+
|
| 462 |
+
Please solve the following question step by step and conclude by saying "The answer is".
|
| 463 |
+
|
| 464 |
+
Q: Albert is wondering how much pizza he can eat in one day. He buys 2 large pizzas and 2 small pizzas. A large pizza has 16 slices and a small pizza has 8 slices. If he eats it all, how many pieces does he eat that day?
|
| 465 |
+
|
| 466 |
+
A: He buys 2 large pizzas, so he has $2 * 16 = 32$ slices. He buys 2 small pizzas, so he has $2 * 8 = 16$ slices. There are 32 slices from the large pizzas and 16 slices from the small pizzas, so he eats $32 + 16 = 48$ pieces that day. The answer is 48.
|
| 467 |
+
|
| 468 |
+
Q: Elizás rate per hour for the first 40 hours she works each week is $10. She also receives an overtime pay of 1.2 times her regular hourly rate. If Eliza worked for 45 hours this week, how much are her earnings for this week?
|
| 469 |
+
|
| 470 |
+
A:
|
| 471 |
+
|
| 472 |
+
# A CoT prompt for ARC
|
| 473 |
+
|
| 474 |
+
Please solve the following question step by step and conclude by saying "The answer is".
|
| 475 |
+
Q: Juan and LaKeisha roll a few objects down a ramp. They want to see which object rolls the farthest. What should they do so they can repeat their investigation? Options: A) Put the objects in groups, B) Change the height of the ramp, C) Choose different objects to roll, D) Record the details of the investigation.
|
| 476 |
+
A: To ensure their investigation can be repeated, they need to record detailed information about the setup, such as the objects used, the height of the ramp, and surface conditions. Recording these details allows them to recreate the same conditions for reliable comparisons. The answer is D.
|
| 477 |
+
Q: Which method is the safest way to watch an eclipse of the Sun? Options: A) Turn away after two or three minutes. B) Look at the Sun through a long telescope. C) Cast an image through a pinhole onto a screen. D) Blink often until your eyes get used to the light..
|
| 478 |
+
A:
|
| 479 |
+
|
| 480 |
+
Figure A2: Example prompts for CoT and CoT-SC. Italic texts denote 1-shot examples.
|
| 481 |
+
|
| 482 |
+
# An answer generation prompt for GSM8K
|
| 483 |
+
|
| 484 |
+
Given a question, please decompose it into sub-questions. For each sub-question, please answer it in a complete sentence, ending with "The answer is". When the original question is answerable, please start the subquestion with "Now we can answer the question:".
|
| 485 |
+
|
| 486 |
+
Question 1: Albert is wondering how much pizza he can eat in one day. He buys 2 large pizzas and 2 small pizzas. A large pizza has 16 slices and a small pizza has 8 slices. If he eats it all, how many pieces does he eat that day?
|
| 487 |
+
|
| 488 |
+
Question 1.1: How many slices are in one large pizza?
|
| 489 |
+
|
| 490 |
+
Answer 1.1: One large pizza has 16 slices. The answer is 16.
|
| 491 |
+
|
| 492 |
+
Question 1.2: How many slices are there in total from the large pizzas?
|
| 493 |
+
|
| 494 |
+
Answer 1.2: He buys 2 large pizzas, so $2 * 16 = 32$ slices. The answer is 32.
|
| 495 |
+
|
| 496 |
+
Question 1.3: How many slices are in one small pizza?
|
| 497 |
+
|
| 498 |
+
Answer 1.3: One small pizza has 8 slices. The answer is 8.
|
| 499 |
+
|
| 500 |
+
Question 1.4: How many slices are there in total from the small pizzas?
|
| 501 |
+
|
| 502 |
+
Answer 1.4: He buys 2 small pizzas, so $2 * 8 = 16$ slices. The answer is 16.
|
| 503 |
+
|
| 504 |
+
Question 1.5: Now we can answer the question: How many pieces does he eat that day?
|
| 505 |
+
|
| 506 |
+
Answer 1.5: There are 32 slices from the large pizzas and 16 slices from the small pizzas, so he eats $32 + 16 = 48$ pieces that day. The answer is 48.
|
| 507 |
+
|
| 508 |
+
Question 2: Josh decides to try flipping a house. He buys a house for $80,000 and then puts in$ 50,000 in repairs. This increased the value of the house by 150%. How much profit did he make?
|
| 509 |
+
|
| 510 |
+
Question 2.1: How much did Josh spend on the house and repairs in total?
|
| 511 |
+
|
| 512 |
+
Answer 2.1:
|
| 513 |
+
|
| 514 |
+
# An action generation prompt for GSM8K
|
| 515 |
+
|
| 516 |
+
Given a question, please decompose it into sub-questions. For each sub-question, please answer it in a complete sentence, ending with "The answer is". When the original question is answerable, please start the subquestion with "Now we can answer the question: ".
|
| 517 |
+
|
| 518 |
+
Question 1: Albert is wondering how much pizza he can eat in one day. He buys 2
|
| 519 |
+
|
| 520 |
+
large pizzas and 2 small pizzas. A large pizza has 16 slices and a small pizza has 8 slices. If he eats it all, how many pieces does he eat that day?
|
| 521 |
+
|
| 522 |
+
Question 1.1: How many slices are in one large pizza?
|
| 523 |
+
|
| 524 |
+
Answer 1.1: One large pizza has 16 slices. The answer is 16.
|
| 525 |
+
|
| 526 |
+
Question 1.2: How many slices are there in total from the large pizzas?
|
| 527 |
+
|
| 528 |
+
Answer 1.2: He buys 2 large pizzas, so $2 * 16 = 32$ slices. The answer is 32.
|
| 529 |
+
|
| 530 |
+
Question 1.3: How many slices are in one small pizza?
|
| 531 |
+
|
| 532 |
+
Answer 1.3: One small pizza has 8 slices. The answer is 8.
|
| 533 |
+
|
| 534 |
+
Question 1.4: How many slices are there in total from the small pizzas?
|
| 535 |
+
|
| 536 |
+
Answer 1.4: He buys 2 small pizzas, so $2 * 8 = 16$ slices. The answer is 16.
|
| 537 |
+
|
| 538 |
+
Question 1.5: Now we can answer the question: How many pieces does he eat that day?
|
| 539 |
+
|
| 540 |
+
Answer 1.5: There are 32 slices from the large pizzas and 16 slices from the small pizzas, so he eats $32 + 16 = 48$ pieces that day. The answer is 48.
|
| 541 |
+
|
| 542 |
+
Question 2: Josh decides to try flipping a house. He buys a house for $80,000 and then puts in$ 50,000 in repairs. This increased the value of the house by 150%. How much profit did he make?
|
| 543 |
+
|
| 544 |
+
Question 2.1:
|
| 545 |
+
|
| 546 |
+
# A reward generation prompt for GSM8K
|
| 547 |
+
|
| 548 |
+
Given a question and some sub-questions, determine whether the last sub-question is useful to answer the question. Output 'Yes' or 'No', and a reason.
|
| 549 |
+
|
| 550 |
+
Question 1: Four years ago, Kody was only half as old as Mohamed. If Mohamed is currently twice as 30 years old, how old is Kody?
|
| 551 |
+
|
| 552 |
+
Question 1.1: How old is Mohamed?
|
| 553 |
+
|
| 554 |
+
Question 1.2: How old was Mohamed four years ago?
|
| 555 |
+
|
| 556 |
+
New question 1.3: How old was Kody four years ago?
|
| 557 |
+
|
| 558 |
+
Is the new question useful? Yes. We need the answer to calculate how old is Kody now.
|
| 559 |
+
|
| 560 |
+
Question 2: Josh decides to try flipping a house. He buys a house for $80,000 and then puts in$ 50,000 in repairs. This increased the value of the house by 150%. How much profit did he make?
|
| 561 |
+
|
| 562 |
+
New question 2.1: How much did Josh spend on the house?
|
| 563 |
+
|
| 564 |
+
Is the new question useful?
|
| 565 |
+
|
| 566 |
+
Figure A3: Example prompts for GSM8K. Italic texts denote 1-shot examples.
|
| 567 |
+
|
| 568 |
+
# An answer generation prompt for ARC
|
| 569 |
+
|
| 570 |
+
Given a question, please decompose it into sub-questions. For each sub-question, please answer it in a complete sentence, ending with "The answer is". When the original question is answerable, please start the subquestion with "Now we can answer the question with an option from A to D: ".
|
| 571 |
+
|
| 572 |
+
Question 1: Juan and LaKeisha roll a few objects down a ramp. They want to see which object rolls the farthest. What should they do so they can repeat their investigation? Options: A) Put the objects in groups, B) Change the height of the ramp, C) Choose different objects to roll, D) Record the details of the investigation.
|
| 573 |
+
|
| 574 |
+
Question 1.1: What is necessary to ensure that experimental results can be repeated?
|
| 575 |
+
|
| 576 |
+
Answer 1.1: To ensure repeatability, experimental details must be accurately recorded. The answer is to record details.
|
| 577 |
+
|
| 578 |
+
Question 1.2: What kind of information should Juan and LaKeisha record for repeatability?
|
| 579 |
+
|
| 580 |
+
Answer 1.2: They should record details like the objects used, ramp height, and surface conditions. The answer is experimental conditions.
|
| 581 |
+
|
| 582 |
+
Question 1.3: How would recording experimental details help in the investigation?
|
| 583 |
+
|
| 584 |
+
Answer 1.3: Recording details allows them to recreate the exact same conditions for reliable comparison. The answer is that it enables consistent replication.
|
| 585 |
+
|
| 586 |
+
Question 1.4: Now we can answer the question with an option from A to D: What should they do to repeat their investigation?
|
| 587 |
+
|
| 588 |
+
Answer 1.4: Record the details of the investigation. The answer is D.
|
| 589 |
+
|
| 590 |
+
Question 2: Which method is the safest way to watch an eclipse of the Sun? Options: A) Turn away after two or three minutes. B) Look at the Sun through a long telescope. C) Cast an image through a pinhole onto a screen. D) Blink often until your eyes get used to the light..
|
| 591 |
+
|
| 592 |
+
Question 2.1: Why should you not look directly at the Sun during an eclipse?
|
| 593 |
+
|
| 594 |
+
Answer 2.1:
|
| 595 |
+
|
| 596 |
+
# An action generation prompt for ARC
|
| 597 |
+
|
| 598 |
+
Given a question, please decompose it into sub-questions. For each sub-question, please answer it in a complete sentence, ending with "The answer is". When the original question is answerable, please start the subquestion with "Now we can answer the question with an option from A to D: ".
|
| 599 |
+
|
| 600 |
+
Question 1: Juan and LaKeisha roll a few objects down a ramp. They want to see which object rolls the farthest. What should they do so they can repeat their investigation? Options: A) Put the objects in groups, B) Change the height of the ramp, C) Choose different objects to roll, D) Record the details of the investigation.
|
| 601 |
+
|
| 602 |
+
Question 1.1: What is necessary to ensure that experimental results can be repeated?
|
| 603 |
+
|
| 604 |
+
Answer 1.1: To ensure repeatability, experimental details must be accurately recorded. The answer is to record details.
|
| 605 |
+
|
| 606 |
+
Question 1.2: What kind of information should Juan and LaKeisha record for repeatability?
|
| 607 |
+
|
| 608 |
+
Answer 1.2: They should record details like the objects used, ramp height, and surface conditions. The answer is experimental conditions.
|
| 609 |
+
|
| 610 |
+
Question 1.3: How would recording experimental details help in the investigation?
|
| 611 |
+
|
| 612 |
+
Answer 1.3: Recording details allows them to recreate the exact same conditions for reliable comparison. The answer is that it enables consistent replication.
|
| 613 |
+
|
| 614 |
+
Question 1.4: Now we can answer the question with an option from A to D: What should they do to repeat their investigation?
|
| 615 |
+
|
| 616 |
+
Answer 1.4: Record the details of the investigation. The answer is D.
|
| 617 |
+
|
| 618 |
+
Question 2: Which method is the safest way to watch an eclipse of the Sun? Options: A) Turn away after two or three minutes. B) Look at the Sun through a long telescope. C) Cast an image through a pinhole onto a screen. D) Blink often until your eyes get used to the light..
|
| 619 |
+
|
| 620 |
+
Question 2.1:
|
| 621 |
+
|
| 622 |
+
# A reward generation prompt for ARC
|
| 623 |
+
|
| 624 |
+
Given a question and some sub-questions, determine whether the last sub-question is useful to answer the question. Output 'Yes' or 'No', and a reason.
|
| 625 |
+
|
| 626 |
+
Question 1: How are particles in a block of iron affected when the block is melted? Options: A) The particles gain mass, B) The particles contain less energy, C) The particles move more rapidly, D) The particles increase in volume.
|
| 627 |
+
|
| 628 |
+
Question 1.1: What happens to particle energy when a solid melts?
|
| 629 |
+
|
| 630 |
+
Question 1.2: How does the movement of particles change during melting?
|
| 631 |
+
|
| 632 |
+
New question 1.3: Why does increased movement signify a phase change to liquid?
|
| 633 |
+
|
| 634 |
+
Is the new question useful? Yes, because understanding why increased movement signifies a phase change helps clarify the behavior of particles during melting.
|
| 635 |
+
|
| 636 |
+
Question 2: Which method is the safest way to watch an eclipse of the Sun? Options: A) Turn away after two or three minutes. B) Look at the Sun through a long telescope. C) Cast an image through a pinhole onto a screen. D) Blink often until your eyes get used to the light..
|
| 637 |
+
|
| 638 |
+
New question 2.1: Why should you not look directly at the Sun during an eclipse?
|
| 639 |
+
|
| 640 |
+
Is the new question useful?
|
| 641 |
+
|
| 642 |
+
Figure A4: Example prompts for ARC. Italic texts denote 1-shot examples.
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe58b3cb37f16fb9cedaee48d5b5cfb02e7392086b7a190960e37dc65e5ebf76
|
| 3 |
+
size 723711
|
2025/Semantic Exploration with Adaptive Gating for Efficient Problem Solving with Language Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/e6968513-c230-4d8b-928c-1f4270f2db74_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1614bb69f25c5135e4a26faf85daea16eec19e6fcdae1ba63a9de9bcb4854eb4
|
| 3 |
+
size 4387355
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/full.md
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Semantic-Eval: A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training
|
| 2 |
+
|
| 3 |
+
Shusheng Li $^{1,2,3}$ , Jiale Li $^{1,2,3}$ , Yifei Qu $^{1,2,3}$ , Xinwei Shi $^{1,2,3}$ , Yanliang Guo $^{1,2,3}$ , Ziyi He $^{1,2,3}$ , Yubo Wang $^{1,2,3}$ , Wenjun Tan $^{*1,2,3}$ ,
|
| 4 |
+
|
| 5 |
+
$^{1}$ Key Laboratory of Intelligent Computing of Medical Images, Ministry of Education, Northeastern University, China, $^{2}$ School of Computer Science and Engineering, Northeastern University, Shenyang 110819, China, $^{3}$ National Frontiers Science Center for Industrial Intelligence and Systems Optimization, Northeastern University, China
|
| 6 |
+
|
| 7 |
+
2310731@stu.neu.edu.cn, tanwenjun@cse.neu.edu.cn
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
With the increasing prominence of large language models (LLMs), evaluating their text-generation capabilities has become an essential research challenge. Although LLM-based evaluation methods exhibit robust performance, the inherent stochastic nature of the LLM generation process introduces a degree of uncertainty in alignment with human preferences. To address this limitation, we propose SemanticEval, the first training-free framework designed to assess LLM-generated text based on semantic understanding. This framework computes semantic similarity between pairwise texts to evaluate the interdependence of semantic units, integrating a graph-based weighting mechanism to account for the differential contributions of individual sentences. A pre-trained natural language inference (NLI) model is also incorporated to mitigate potential semantic relationship biases. We evaluate Semantic-Eval across eight datasets that encompass four common NLP tasks. The experimental results indicate that Semantic-Eval surpasses traditional N-gram and BERT-based evaluation metrics, aligning more closely with human judgments and demonstrating a higher correlation than smaller LLMs. However, it slightly lags behind GPT-4. Finally, we demonstrate the effectiveness of Semantic-Eval in evaluating the generation quality of 13 large language models. The code is publicly available at<sup>1</sup>.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Large Language Models, including OpenAI o1 $^2$ , LLaMA-3 (Dubey et al., 2024), and DeepSeekR1 (Guo et al., 2025), have emerged as pivotal drivers of progress in the field of natural language processing. LLMs have demonstrated exceptional capabilities in text generation by learning and capturing intricate semantic relationships from large
|
| 16 |
+
|
| 17 |
+
* Wenjun Tan is the corresponding author.
|
| 18 |
+
<sup>1</sup>https://github.com/LssTry/Semantic-Eval
|
| 19 |
+
2https://openai.com/o1/
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: The diagram depicts scores for evaluating sentence similarity using various methods. The prompt is:"Please assess the similarity of the two sentences and provide a score from 0 to 1." The path indicates the number of samples. The text-embedding-ada-002 model is utilized as the embedding backbone in the SemanticEval framework. The Human (average) score represents the mean score obtained by five human evaluators.
|
| 23 |
+
|
| 24 |
+
scale corpora, utilizing either autoregressive or self-encoding mechanisms. As the adoption of LLMs continues to proliferate, evaluating the text quality they generate has become a critical area of scholarly attention (Polo et al., 2024).
|
| 25 |
+
|
| 26 |
+
Traditional evaluation metrics employed to assess the quality of text generation are commonly used to evaluate the output of large language models(Li et al., 2023). Metrics such as BLEU (Papineni et al., 2002) and ROUGE (Lin, 2004) primarily assess text similarity by calculating n-gram overlap between the generated and reference texts. However, these metrics are often limited by their emphasis on superficial lexical overlap and fail to effectively capture the deeper semantic relationships between the generated and reference texts. As demonstrated in Figure 1, when evaluating the quality of LLM-generated text, the scores from n
|
| 27 |
+
|
| 28 |
+
gram evaluation metrics are all zero. To overcome the limitations of traditional evaluation metrics in assessing LLM-generated content, recent studies (Zhang et al., 2023a; Zhou et al., 2023; Peng et al., 2024) have employed BERT-based methods. These approaches (Reimers et al., 2019; Zhang et al., 2019) utilize the semantic embeddings inherent in the BERT (Kenton and Toutanova, 2019) model to capture semantic similarity within the text. As shown in Figure 1, while BERT scores are closely aligned with human ratings, a noticeable discrepancy remains, indicating that BERT-based methods have inherent limitations in capturing semantic information.
|
| 29 |
+
|
| 30 |
+
Recent studies increasingly employ LLM-based evaluation methods to assess the performance of LLMs. These approaches typically leverage the language understanding capabilities of LLMs as the primary criteria for performance assessment (Yu et al., 2024; Ke et al., 2024; Park et al., 2024). Notable methodologies within this domain include instruction-tuning optimization (Wang et al., 2023; Polo et al., 2024; Song et al., 2024; Jiang et al., 2024) and multi-dimensional evaluation frameworks (Lin and Chen, 2023; Liang et al., 2024), both of which heavily rely on LLMs. Among these, GPT-based evaluation methods are often regarded as better aligned with human preferences to a certain extent. As illustrated in Figure 1, the prompt-optimized GPT-4 evaluator demonstrates notable consistency with human preferences. Nevertheless, GPT-4 (Achiam et al., 2023), which utilizes a probabilistic generation strategy, tends to produce outputs with inherent uncertainty. Furthermore, existing benchmarks (Hendrycks et al., 2020; Sarlin et al., 2020; Cobbe et al., 2021), designed for evaluating LLMs, generally yield strong performance results on these specific tasks. However, these benchmarks are meticulously crafted, and the task configurations and evaluation criteria they employ may not directly translate to real-world application scenarios.
|
| 31 |
+
|
| 32 |
+
To address the aforementioned challenges, this paper introduces Semantic-Eval, the first consistent, training-free automatic evaluation framework designed to assess the quality of text generated by LLMs from the perspective of semantic comprehension. Specifically, the framework computes the semantic similarity between all pairs of sentence embeddings within each text to quantify the degree of interdependence among the semantic units of the text. Recognizing the varying contributions of
|
| 33 |
+
|
| 34 |
+
individual sentence units to the overall semantic content, Semantic-Eval incorporates a graph-based weighting mechanism that evaluates the relative significance of each semantic unit. The weight assigned to each sentence embedding is determined by analyzing the strength of associations between semantic units within an undirected, self-similar weighted graph. Subsequently, the semantic similarity values and their corresponding weights in the weighting matrix are utilized to evaluate sentence-level cross-text similarity between reference and candidate texts. To account for potential semantic dyadic relationships, the framework integrates a pre-trained NLI model, which generates a confidence score that mitigates bias in cross-text similarity measurements. Semantic-Eval was systematically evaluated on seven English datasets and one Dutch dataset, encompassing four tasks in NLP: sentiment analysis, text summarization, natural language Q&A, and sentence similarity. The experimental results demonstrate that, compared to traditional evaluation methods and BERT-based metrics, Semantic-Eval exhibits a significantly higher correlation with human judgments. Moreover, it outperforms smaller parameter large language models in aligning with human preferences, trailing only slightly behind GPT-4. Finally, Semantic-Eval was employed to assess the text generation quality of 13 large language models across six datasets. In summary, the primary contributions of this work are as follows:
|
| 35 |
+
|
| 36 |
+
1) We propose Semantic-Eval, the first training-free framework for evaluating text generated by large language models based on semantic comprehension.
|
| 37 |
+
2) We introduce a graph-based weighting mechanism that computes sentence-level similarity by evaluating the interdependence of semantic units within the text.
|
| 38 |
+
3) We demonstrate that Semantic-Eval aligns with human preferences across eight datasets and is used to assess the text generation quality of 13 large language models.
|
| 39 |
+
|
| 40 |
+
# 2 Related Work
|
| 41 |
+
|
| 42 |
+
# 2.1 LLM-based evaluation
|
| 43 |
+
|
| 44 |
+
The evaluation methods based on LLMs capitalize on the models' semantic understanding capabilities to conduct quantitative assessments of language models. Primary categories of LLM-based evaluation include instruction-based evaluation (Wang
|
| 45 |
+
|
| 46 |
+
et al., 2022a,b; Ajith et al., 2023), comparative evaluation (Chan et al., 2023; Lango and Dusek, 2023; Lambert et al., 2024), and multidimensional evaluation (Liang et al., 2022; Liu et al., 2023; Nguyen et al., 2024). These methods offer dynamic frameworks that provide more comprehensive assessments of model robustness compared to traditional static benchmarks (Zhang et al., 2024). However, the LLM generation process is often based on probabilistic sampling, which introduces variability, such that identical inputs may yield divergent scores (Holtzman et al., 2019). Moreover, the evaluation outcomes are highly sensitive to the precision of the instructions provided (Zeng et al., 2023). These limitations in current evaluation methodologies contribute to the uncertainty in aligning LLM-based evaluations with human preferences.
|
| 47 |
+
|
| 48 |
+
# 2.2 Static Benchmarks evaluation
|
| 49 |
+
|
| 50 |
+
The static benchmark evaluation methodology assesses the performance of LLMs using predetermined datasets, which are generally categorized into two primary groups: general language task benchmarks and specific downstream task benchmarks. General Language Task Benchmarks aim to evaluate the overall language comprehension abilities of LLMs across a wide array of tasks, with prominent benchmarks including GLUE (Wang et al., 2018), SuperGLUE (Sarlin et al., 2020), MMLU (Hendrycks et al., 2020), BIG-bench (Srivastava et al., 2022), and C-EVAL (Huang et al., 2024). In contrast, Specific Downstream Task Benchmarks are designed to assess LLM performance within specific application domains, with notable examples such as MultiMedQA (Singhal et al., 2023), MathBench (Liu et al., 2024), GAOKAO-Bench (Zhang et al., 2023b), and LawBench (Fei et al., 2023). Nevertheless, relying on static datasets in benchmark evaluations constrains the generalization capabilities of LLMs in real-world contexts (Mousavi et al., 2024). Furthermore, developing static benchmark datasets necessitates significant resource investment (Li et al., 2024).
|
| 51 |
+
|
| 52 |
+
# 2.3 Human evaluation
|
| 53 |
+
|
| 54 |
+
HumanEval-based methods primarily rely on manual scoring, user feedback, and expert reviews to evaluate LLMs across various dimensions, including accuracy, fluency, relevance, and diversity (Elangovan et al., 2024; Feng et al., 2024; Watts et al., 2024). However, these approaches are in
|
| 55 |
+
|
| 56 |
+
herently prone to subjectivity and inconsistency, which may undermine the reliability of the assessment results (Chang et al., 2024; Li et al., 2025). Moreover, human evaluation methods face challenges related to inefficiency and scalability when assessing LLMs (Chiang and Lee, 2023; Chen et al., 2024a).
|
| 57 |
+
|
| 58 |
+
# 3 Semantic-Eval Framework
|
| 59 |
+
|
| 60 |
+
The Semantic-Eval framework aims to evaluate the quality of generated text by LLMs from the perspective of semantic understanding without additional training. Additionally, Semantic-Eval focuses on various NLP tasks, demonstrating its generalizability. The computation illustration of the Semantic-Eval framework is shown in Figure 2. An overview of the details of the semantic evaluation framework is provided below.
|
| 61 |
+
|
| 62 |
+
Initially, the reference text $x$ and the candidate text $y$ generated by LLM are parsed into a sequence of sentences using regular expressions, producing $x = \{x_{1},\ldots ,x_{n}\}$ and $y = \{y_{1},\dots ,y_{n}\}$ , respectively. Next, the same pre-trained vector embedding model, specifically text-embedding-3-large<sup>3</sup>, projects each sentence from $x$ and $y$ into a $d$ -dimensional vector space, yielding vector embedding $t_i\in \mathbb{R}^d$ . To unify the notation, let $T$ represent a text which can be $x$ or $y$ , where $|T|$ denotes the number of sentences. The cosine similarity is then used to measure the semantic correlation between all pairs of sentence embeddings within $T$ , producing a self-similarity matrix $S^T$ :
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
S _ {i, j} ^ {T} = \frac {t _ {i} \cdot t _ {j}}{\| t _ {i} \| \| t _ {j} \|}, \quad 1 \leq i, j \leq | T |.
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
Given that the contribution of individual sentences to the overall semantics of a text is often disproportionate, it is critical to assign appropriate weights to sentences according to their semantic relevance to highlight key information. LLMs employed for sentence scoring (Zhang et al., 2023c) have demonstrated remarkable performance, illustrating their capacity for nuanced language comprehension. However, the inherent sampling strategy employed by these models introduces a degree of stochasticity, which leads to variability in the generated results. To ensure the consistency of evaluation outcomes, an unsupervised method, SemanticRank, is introduced to assign sentence
|
| 69 |
+
|
| 70 |
+
Question is: "Does the post show risk of thwarted belongingness?"
|
| 71 |
+
Figure 2: Illustration of the computation of the Semantic-Eval. The candidate $y$ is the text generated by GPT-4o in response to a corresponding query. The reference text $x$ and candidate $y$ represent semantically opposing responses to the same question.
|
| 72 |
+

|
| 73 |
+
Reference $x$ is: "No, the poster does not suffer from depression. Reasoning: The post does not display clear emotional indicators of very severe depression. It revolves around a specific question regarding family relationships and marriage. While there is a mention of a divorced parent and potential step-siblings, the tone of the post remains neutral and does not convey intense emotional distress or hopelessness. The post seems to be seeking clarification on a potentially confusing familial situation rather than expressing significant emotional distress."
|
| 74 |
+
Candidate y is:" Yes, the post indeed exhibits signs of thwarted belongingness. Thwarted belongingness is a state where an individual feels disconnected from others, views themselves as a burden, or perceives a lack of true belonging and meaningful connections with others. In this post: The user explicitly refrains from seeking help to avoid burdening others or causing them worry. They engage in self-neglect as a subtle form of self-punishment or expression of self-loathing, yet are careful not to let others notice, suggesting a desire to remain invisible or disconnected. The user downplays their struggles and withdraws them from others to prevent being a concern, indicating emotional isolation. These are strong indicators of emotional loneliness, self-isolation, and feeling unworthy of care, all of which are core aspects of thwarted belongingness. From the perspective of a mental health framework such as the Interpersonal Theory of Suicide, it is important to monitor signs like perceived burdensomeness and capability for suicide, even though the user explicitly states they are not suicidal. However, their emotional state may still warrant gentle and supportive intervention."
|
| 75 |
+
|
| 76 |
+
weights based on semantic significance without requiring training. Initially, an undirected graph is constructed to quantify the semantic relevance of each sentence vector embedding in relation to other sentences within the same text, using cosine similarity between sentence embeddings. Subsequently, TextRank (Mihalcea and Tarau, 2004) is employed to evaluate the relative importance of each sentence vector embedding derived from the connectivity and centrality of sentence embeddings within the graph. Further details are provided below.
|
| 77 |
+
|
| 78 |
+
The undirected weighted graph $G^{T} = (V^{T}, E^{T})$ is constructed using a self-similarity matrix $S^{T}$ , where $V^{T} = \{v_{1}^{T}, v_{2}^{T}, \ldots, v_{|T|}^{T}\}$ represents the set of nodes corresponding to the embeddings of individual sentences, and $E^{T} = \{e_{1}^{T}, e_{2}^{T}, \ldots, e_{|T|}^{T}\}$ represents the edges connecting the nodes based on the similarity between their vector embeddings. To filter out sentences with weaker semantic relationships, an edge is created between two nodes if the cosine similarity $S_{i,j}^{T}$ between their embeddings exceeds a threshold of 0.1, the weight of the edge is then set to the similarity value. Then, TextRank is employed to calculate the score $w_{i}^{T}$ for each node $v_{i}^{T}$ :
|
| 79 |
+
|
| 80 |
+
where $\Gamma(v_i^T)$ denotes the set of neighbors of $v_i^T$ , and $\alpha$ is the damping factor, which is set to 0.85. After several iterations, the steady-state vector scores denoted as $w^T$ , are obtained and subsequently normalized:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\widetilde {w} _ {i} ^ {T} = \frac {w _ {i} ^ {T}}{\sum_ {i = 1} ^ {| T |} w _ {i} ^ {T}},
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where, $\sum_{i=1}^{|T|} \widetilde{w}_i^T = 1$ . Then, the normalized weight vectors $\widetilde{w}^x = (\widetilde{w}_1^x, \ldots, \widetilde{w}_n^x)$ and $\widetilde{w}^y = (\widetilde{w}_1^y, \ldots, \widetilde{w}_m^y)$ of sentences in the reference $x$ and candidate $y$ texts are obtained. Here, $n$ and $m$ represent the number of sentences for $x$ and $y$ , respectively.
|
| 87 |
+
|
| 88 |
+
With the above operations, we have completed the sentence slicing of the reference text $x$ and candidate text $y$ and re-weighted the sliced sentences according to their semantic importance degree. Next, we will assess the semantic similarity between the reference text $x$ and the candidate text $y$ .
|
| 89 |
+
|
| 90 |
+
Firstly, the weighting matrix $W \in \mathbb{R}^{n \times m}$ is constructed, where each element is the average of the normalized weight vectors $\widetilde{w}^x$ and $\widetilde{w}^y$ :
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
w _ {i} ^ {T} = (1 - \alpha) + \alpha \sum_ {v _ {j} ^ {T} \in \Gamma (v _ {i} ^ {T})} \frac {w _ {j} ^ {T} \cdot S _ {j , i} ^ {T}}{\sum v _ {k} ^ {T} \in \Gamma (v _ {j} ^ {T}) S _ {j , k} ^ {T}},
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
W _ {i, j} = \frac {\widetilde {w} _ {i} ^ {x} + \widetilde {w} _ {j} ^ {y}}{2}, \quad 1 \leq i \leq n, 1 \leq j \leq m.
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
<table><tr><td rowspan="2">Class</td><td rowspan="2">Metrics</td><td colspan="3">SemRel2024(eng)</td><td colspan="3">STS-B</td></tr><tr><td>r</td><td>ρ</td><td>τ</td><td>r</td><td>ρ</td><td>τ</td></tr><tr><td rowspan="6">Traditional-Eval</td><td>BLEU-1</td><td>0.542</td><td>0.533</td><td>0.375</td><td>0.445</td><td>0.432</td><td>0.304</td></tr><tr><td>BLEU-2</td><td>0.514</td><td>0.513</td><td>0.357</td><td>0.460</td><td>0.444</td><td>0.311</td></tr><tr><td>ROUGE-1</td><td>0.619</td><td>0.614</td><td>0.436</td><td>0.615</td><td>0.590</td><td>0.425</td></tr><tr><td>ROUGE-2</td><td>0.536</td><td>0.544</td><td>0.411</td><td>0.474</td><td>0.459</td><td>0.326</td></tr><tr><td>ROUGE-L</td><td>0.574</td><td>0.567</td><td>0.401</td><td>0.571</td><td>0.543</td><td>0.387</td></tr><tr><td>METEOR</td><td>0.415</td><td>0.412</td><td>0.285</td><td>0.311</td><td>0.304</td><td>0.210</td></tr><tr><td rowspan="4">BERT-based</td><td>BERT</td><td>0.582</td><td>0.578</td><td>0.413</td><td>0.531</td><td>0.491</td><td>0.345</td></tr><tr><td>BERTScore_P</td><td>0.671</td><td>0.668</td><td>0.485</td><td>0.565</td><td>0.520</td><td>0.367</td></tr><tr><td>BERTScore_R</td><td>0.657</td><td>0.653</td><td>0.472</td><td>0.561</td><td>0.520</td><td>0.367</td></tr><tr><td>BertScore_F1</td><td>0.678</td><td>0.675</td><td>0.491</td><td>0.578</td><td>0.536</td><td>0.380</td></tr><tr><td rowspan="2">LLM-based</td><td>Qwen2-7B</td><td>0.763</td><td>0.751</td><td>0.586</td><td>0.759</td><td>0.746</td><td>0.608</td></tr><tr><td>GPT-4</td><td>0.803</td><td>0.798</td><td>0.634</td><td>0.861</td><td>0.851</td><td>0.698</td></tr><tr><td>OUR</td><td>Semantic-Eval</td><td>0.806</td><td>0.808</td><td>0.620</td><td>0.787</td><td>0.807</td><td>0.635</td></tr></table>
|
| 101 |
+
|
| 102 |
+
Table 1: The correlations between automatic metrics and annotated sentence similarity scores on Natural Language Sentence Similarity Task. $r$ , $\rho$ , and $\tau$ denote the Pearson correlation coefficient, Spearman's rank correlation coefficient, and Kendall's tau coefficient, respectively. In each column, the top score is displayed in bold while the second highest is underlined.
|
| 103 |
+
|
| 104 |
+
Secondly, cosine similarity is employed to measure the semantic correlation between the sentences of the reference $x$ and the candidate $y$ , resulting in the cross-text semantic similarity matrix $C \in \mathbb{R}^{n \times m}$ . Then, each row of the $C$ is normalized. Following this, the sentences embedding in candidate text $y$ most semantically related to reference text $x$ are selected:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
c _ {i} = \arg \max _ {1 \leq j \leq m} \frac {x _ {i} ^ {e} \cdot y _ {j} ^ {e}}{\| x _ {i} ^ {e} \| \| y _ {j} ^ {e} \|} \Big / \sum_ {j = 1} ^ {m} \frac {x _ {i} ^ {e} \cdot y _ {j} ^ {e}}{\| x _ {i} ^ {e} \| \| y _ {j} ^ {e} \|}.
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where, $x_{i}^{e}$ and $y_{j}^{e}$ represent the vector embeddings of $x_{i}$ and $y_{j}$ , respectively. $c_{i}$ denotes the similarity value of the semantic most relevant embedding.
|
| 111 |
+
|
| 112 |
+
Finally, the sentence-level cross-text similarity between the reference text $x$ and the candidate text $y$ is quantified:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
S ^ {\rho} = \sum_ {i = 1} ^ {n} \left(c _ {i} \times W _ {i, j _ {i} ^ {*}}\right),
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
The $W_{i,j_i^*}$ represents the element of the weighting matrix $W$ corresponding to $c_i$ , where $j_i^*$ denotes the index of the element in $W$ that corresponds to $c_i$ . However, cross-text similarity fails to fully account for potential semantic opposition or ambiguity between the reference text $x$ and the candidate text $y$ . To address this, the confidence score from natural language inference is introduced to evaluate
|
| 119 |
+
|
| 120 |
+
the reliability of $S^{\rho}$ . Specifically, the confidence score $\Delta(x,y)$ , output by the pre-trained roberta-large-mnli model(Liu et al., 2019), is computed as the dot product with $S^{\rho}$ , resulting in the final semantic score $S = \Delta(x,y) \cdot S^{\rho}$ .
|
| 121 |
+
|
| 122 |
+
# 4 Experiments
|
| 123 |
+
|
| 124 |
+
# 4.1 Datasets
|
| 125 |
+
|
| 126 |
+
This study utilizes seven English-language datasets and one Dutch-language dataset to investigate four distinct tasks in NLP: text summarization, sentiment analysis, natural language Q&A, and natural language sentence similarity.
|
| 127 |
+
|
| 128 |
+
# Natural Language Sentence Similarity Task
|
| 129 |
+
|
| 130 |
+
SemRel2024(Ousidhoum et al., 2024) is a semantic text relevance dataset encompassing 13 languages. Each data sample consists of a pair of sentences, each assigned a relevance score ranging from 0 to 1. For this study, only the English subset of the dataset is utilized.
|
| 131 |
+
|
| 132 |
+
STS-B(Cer et al., 2017) is a subtask of SemEval-2017 Task 1, designed to evaluate the semantic similarity between text pairs. The dataset comprises 8,628 sentence pairs from diverse corpora across domains and scenarios. Each sentence pair is manually labeled with a similarity score ranging from 0 to 5, where 0 indicates complete semantic irrelevance, and 5 indicates perfect semantic equivalence.
|
| 133 |
+
|
| 134 |
+
# Text Summarization Task
|
| 135 |
+
|
| 136 |
+
<table><tr><td rowspan="2">Class</td><td rowspan="2">Metrics</td><td colspan="3">CNN/Daily Mail</td><td colspan="3">XSUM</td></tr><tr><td>r</td><td>ρ</td><td>τ</td><td>r</td><td>ρ</td><td>τ</td></tr><tr><td rowspan="6">Traditional-Eval</td><td>BLEU-1</td><td>0.322</td><td>0.316</td><td>0.217</td><td>0.029</td><td>0.142</td><td>0.098</td></tr><tr><td>BLEU-2</td><td>0.367</td><td>0.376</td><td>0.260</td><td>0.082</td><td>0.195</td><td>0.133</td></tr><tr><td>ROUGE-1</td><td>0.383</td><td>0.358</td><td>0.246</td><td>0.465</td><td>0.412</td><td>0.288</td></tr><tr><td>ROUGE-2</td><td>0.350</td><td>0.359</td><td>0.246</td><td>0.316</td><td>0.305</td><td>0.215</td></tr><tr><td>ROUGE-L</td><td>0.335</td><td>0.332</td><td>0.227</td><td>0.398</td><td>0.352</td><td>0.244</td></tr><tr><td>METEOR</td><td>0.357</td><td>0.330</td><td>0.227</td><td>0.160</td><td>0.219</td><td>0.150</td></tr><tr><td rowspan="4">BERT-based</td><td>BERT</td><td>0.479</td><td>0.441</td><td>0.307</td><td>0.272</td><td>0.202</td><td>0.138</td></tr><tr><td>BERTScore_P</td><td>0.558</td><td>0.531</td><td>0.373</td><td>0.291</td><td>0.226</td><td>0.155</td></tr><tr><td>BERTScore_R</td><td>0.518</td><td>0.504</td><td>0.354</td><td>0.304</td><td>0.241</td><td>0.165</td></tr><tr><td>BERTScore_F1</td><td>0.601</td><td>0.580</td><td>0.414</td><td>0.304</td><td>0.241</td><td>0.165</td></tr><tr><td rowspan="2">LLM-based</td><td>Qwen2-7B</td><td>0.427</td><td>0.454</td><td>0.320</td><td>0.607</td><td>0.577</td><td>0.426</td></tr><tr><td>GPT-4</td><td>0.669</td><td>0.572</td><td>0.450</td><td>0.842</td><td>0.820</td><td>0.662</td></tr><tr><td>OUR</td><td>Semantic-Eval</td><td>0.554</td><td>0.583</td><td>0.429</td><td>0.699</td><td>0.661</td><td>0.494</td></tr></table>
|
| 137 |
+
|
| 138 |
+
Table 2: The correlations between automatic metrics and human judgments on Text Summarization Task. $r$ , $\rho$ , and $\tau$ denote the Pearson correlation coefficient, Spearman's rank correlation coefficient, and Kendall's tau coefficient, respectively. In each column, the top score is displayed in bold while the second highest is underlined.
|
| 139 |
+
|
| 140 |
+
CNN/Daily Mail(Nallapati et al., 2016)(Nallapati et al., 2016) is a dataset predominantly employed for abstractive text summarization in NLP. It contains approximately 30K data pairs, each consisting of a news article sourced from CNN or the Daily Mail, alongside a manually generated summary.
|
| 141 |
+
|
| 142 |
+
XSUM(Narayan et al., 2018) is a dataset designed to assess abstractive single-document summarization systems, focusing on producing concise single-sentence summaries from lengthy news articles. The dataset contains 226,711 BBC news articles from a variety of domains. Each data entry comprises a news article and its corresponding manually labeled single-sentence summary. In this study, the Dutch version of the XSum dataset is employed.
|
| 143 |
+
|
| 144 |
+
# Sentiment Analysis Task
|
| 145 |
+
|
| 146 |
+
IMDB(Maas et al., 2011) is a dataset widely used in sentiment analysis research containing many movie reviews. The dataset consists of 50K reviews, each labeled as positive (1) or negative (0).
|
| 147 |
+
|
| 148 |
+
Yelp Polarity(Zhang et al., 2015) is a dataset designed to support sentiment analysis research. It contains 560,000 labelled samples, with ratings ranging from 1 to 5 stars. Reviews with ratings of 1 or 2 are classified as negative, while reviews of 3 or 4 are classified as positive.
|
| 149 |
+
|
| 150 |
+
# Natural Language Q&A Task
|
| 151 |
+
|
| 152 |
+
IMHI(Yang et al., 2024) is a dataset tailored for interpretable mental health analysis on social media. It contains 105K samples covering eight distinct mental health-related tasks. Each sample consists
|
| 153 |
+
|
| 154 |
+
of expert-written instructions and labels.
|
| 155 |
+
|
| 156 |
+
Medical-o1(Chen et al., 2024b) is a dataset designed for complex medical reasoning tasks, containing 40K samples that span a wide range of clinical scenarios. Each entry includes a prompt, an open-ended question, and a corresponding authentic answer based on a challenging medical examination.
|
| 157 |
+
|
| 158 |
+
# 4.2 Implementation Details
|
| 159 |
+
|
| 160 |
+
In all experiments, four RTX 4090 GPUs, each equipped with 24GB of memory, were utilized. Due to constraints in computational resources and the associated costs of the OpenAI API, we randomly selected 1,000 samples from each dataset to form the evaluation subset for each task. These evaluation subsets were then input into 13 LLMs to generate output results. The performance of Semantic-Eval in validating the tasks exhibited slight variation across different task types. Specifically, for sentence-level tasks, Semantic-Eval functions as an evaluator, assessing the outputs of the evaluation subsets, after which the dataset's evaluation scores are used to compute correlations. In contrast, for the text-level task, to the best of our knowledge, no existing dataset provides labeled scores to evaluate the similarity between pairs of texts. Consequently, three natural language processing annotators were employed to manually score the similarity of each text pair in the text-level evaluation subset. Furthermore, the self-labeled texts from the natural language Q&A and text summarization
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan="2">Class</td><td rowspan="2">Metrics</td><td colspan="3">IMDB</td><td colspan="3">Yelp Polarity</td></tr><tr><td>r</td><td>ρ</td><td>τ</td><td>r</td><td>ρ</td><td>τ</td></tr><tr><td rowspan="6">Traditional-Eval</td><td>BLEU-1</td><td>0.098</td><td>0.016</td><td>0.011</td><td>0.109</td><td>0.163</td><td>0.115</td></tr><tr><td>BLEU-2</td><td>0.121</td><td>0.040</td><td>0.027</td><td>0.144</td><td>0.238</td><td>0.170</td></tr><tr><td>ROUGE-1</td><td>0.409</td><td>0.168</td><td>0.114</td><td>0.447</td><td>0.515</td><td>0.383</td></tr><tr><td>ROUGE-2</td><td>0.310</td><td>0.227</td><td>0.155</td><td>0.417</td><td>0.523</td><td>0.389</td></tr><tr><td>ROUGE-L</td><td>0.387</td><td>0.190</td><td>0.128</td><td>0.419</td><td>0.503</td><td>0.372</td></tr><tr><td>METEOR</td><td>0.540</td><td>0.211</td><td>0.145</td><td>0.463</td><td>0.509</td><td>0.377</td></tr><tr><td rowspan="4">BERT-based</td><td>BERT</td><td>0.656</td><td>0.275</td><td>0.252</td><td>0.459</td><td>0.554</td><td>0.415</td></tr><tr><td>BERTScore_P</td><td>0.644</td><td>0.320</td><td>0.220</td><td>0.529</td><td>0.555</td><td>0.416</td></tr><tr><td>BERTScore_R</td><td>0.550</td><td>0.157</td><td>0.108</td><td>0.517</td><td>0.592</td><td>0.445</td></tr><tr><td>BERTScore_F1</td><td>0.542</td><td>0.232</td><td>0.172</td><td>0.534</td><td>0.589</td><td>0.444</td></tr><tr><td rowspan="2">LLM-based</td><td>Qwen2-7B</td><td>0.614</td><td>0.418</td><td>0.393</td><td>0.516</td><td>0.552</td><td>0.412</td></tr><tr><td>GPT-4</td><td>0.864</td><td>0.626</td><td>0.480</td><td>0.649</td><td>0.679</td><td>0.546</td></tr><tr><td>OUR</td><td>Semantic-Eval</td><td>0.705</td><td>0.523</td><td>0.461</td><td>0.531</td><td>0.571</td><td>0.432</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 3: The correlations between automatic metrics and human judgments on Sentiment Analysis Task. $r$ , $\rho$ , and $\tau$ denote the Pearson correlation coefficient, Spearman's rank correlation coefficient, and Kendall's tau coefficient, respectively. In each column, the top score is displayed in bold while the second highest is underlined.
|
| 165 |
+
|
| 166 |
+
tasks were used as reference texts, while texts generated by GPT-4o mini were used as candidate texts. For the two datasets in the sentiment analysis task, the original datasets include sentiment scores for individual texts. Since one objective of this experiment is to evaluate the effectiveness of SemanticEval in comparing reference and candidate texts in the sentiment analysis task, the focus was on verifying the alignment between Semantic-Eval's semantic understanding of the two texts and human judgment. Thus, we only used Llama-3-8B-Instruct as the candidate text and GPT-4o mini-generated text as the reference text.
|
| 167 |
+
|
| 168 |
+
# 4.3 Meta-evaluation
|
| 169 |
+
|
| 170 |
+
We evaluated the alignment between SemanticEval and human assessments across four NLP tasks involving textual data: natural language sentence similarity, text summarization, sentiment analysis, and natural language Q&A. To quantify this alignment, we employed three statistical coefficients: Pearson's correlation coefficient $(r)$ , Spearman's rank correlation coefficient $(\rho)$ , and Kendall's tau coefficient $(\tau)$ , which served as meta-evaluation metrics for comparing the assessment outputs with human judgments.
|
| 171 |
+
|
| 172 |
+
We validated the performance of Semantic-Eval on a sentence-level task involving annotated sentence similarity scores, with the experimental results presented in Table 1. The findings indicate that Semantic-Eval significantly outperforms traditional metrics and BERT-based approaches, align-
|
| 173 |
+
|
| 174 |
+
ing with human relevance judgments on the SemRel2024(eng) and STS-B datasets. Specifically, Semantic-Eval yields superior relevance scores for $r$ , $\rho$ , and $\tau$ compared to Qwen2-7B. Notably, on the SemRel2024(eng) dataset, Semantic-Eval exhibits a slight advantage over GPT-4 regarding $r$ and $\tau$ . While Semantic-Eval's correlation scores on the STS-B dataset (i.e., $r = 0.787$ , $\rho = 0.807$ , $\tau = 0.635$ ) are slightly lower than those of GPT-4, they nonetheless demonstrate a high degree of alignment with human evaluations, confirming the validity of Semantic-Eval in sentence-level tasks.
|
| 175 |
+
|
| 176 |
+
Additionally, we evaluated the effectiveness of Semantic-Eval on text-level tasks, which include sentiment analysis, text summarization, and natural language Q&A, with the corresponding. Tables 2, 3, and 4 detail the corresponding experimental results. Across all text-level tasks, GPT-4 consistently achieved the highest evaluation scores, most closely mirroring human judgments, while Semantic-Eval ranked second. Except for the Medical-o1 dataset, Semantic-Eval's $r$ scores exceeded 0.5 on five other datasets, reaching a peak value 0.705. Of particular note, on the CNN/Daily Mail dataset, Semantic-Eval's $\rho$ score surpassed that of GPT-4 by $1.1\%$ . These results collectively reinforce the robustness of Semantic-Eval in accurately reflecting human judgments across a range of multi-task, text-level evaluations.
|
| 177 |
+
|
| 178 |
+
<table><tr><td rowspan="2">Class</td><td rowspan="2">Metrics</td><td colspan="3">IMHI</td><td colspan="3">Medical-o1</td></tr><tr><td>r</td><td>ρ</td><td>τ</td><td>r</td><td>ρ</td><td>τ</td></tr><tr><td rowspan="6">Traditional-Eval</td><td>BLEU-1</td><td>0.352</td><td>0.342</td><td>0.254</td><td>0.272</td><td>0.258</td><td>0.175</td></tr><tr><td>BLEU-2</td><td>0.448</td><td>0.429</td><td>0.321</td><td>0.291</td><td>0.289</td><td>0.190</td></tr><tr><td>ROUGE-1</td><td>0.383</td><td>0.343</td><td>0.256</td><td>0.292</td><td>0.287</td><td>0.196</td></tr><tr><td>ROUGE-2</td><td>0.415</td><td>0.404</td><td>0.310</td><td>0.282</td><td>0.295</td><td>0.202</td></tr><tr><td>ROUGE-L</td><td>0.348</td><td>0.309</td><td>0.229</td><td>0.284</td><td>0.293</td><td>0.201</td></tr><tr><td>METEOR</td><td>0.371</td><td>0.342</td><td>0.258</td><td>0.291</td><td>0.296</td><td>0.203</td></tr><tr><td rowspan="4">BERT-based</td><td>BERT</td><td>0.398</td><td>0.471</td><td>0.355</td><td>0.243</td><td>0.246</td><td>0.169</td></tr><tr><td>BERTScore_P</td><td>0.515</td><td>0.480</td><td>0.366</td><td>0.311</td><td>0.330</td><td>0.227</td></tr><tr><td>BERTScore_R</td><td>0.465</td><td>0.482</td><td>0.364</td><td>0.275</td><td>0.256</td><td>0.175</td></tr><tr><td>BERTScore_F1</td><td>0.503</td><td>0.499</td><td>0.379</td><td>0.309</td><td>0.311</td><td>0.213</td></tr><tr><td rowspan="2">LLM-based</td><td>Qwen2-7B</td><td>0.562</td><td>0.595</td><td>0.476</td><td>0.403</td><td>0.425</td><td>0.305</td></tr><tr><td>GPT-4</td><td>0.806</td><td>0.770</td><td>0.658</td><td>0.618</td><td>0.677</td><td>0.515</td></tr><tr><td>OUR</td><td>Semantic-Eval</td><td>0.637</td><td>0.636</td><td>0.507</td><td>0.473</td><td>0.445</td><td>0.320</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 4: The correlations between automatic metrics and human judgments on Natural Language Q&A Task. $r$ , $\rho$ , and $\tau$ denote the Pearson correlation coefficient, Spearman's rank correlation coefficient, and Kendall's tau coefficient, respectively. In each column, the top score is displayed in bold while the second highest is underlined.
|
| 181 |
+
|
| 182 |
+
<table><tr><td>Datasets</td><td>Settings</td><td>r</td><td>ρ</td></tr><tr><td rowspan="3">IMDB</td><td>w/o SemanticRank</td><td>0.646</td><td>0.415</td></tr><tr><td>w/o roberta-large-mnli</td><td>0.681</td><td>0.458</td></tr><tr><td>Semantic-Eval</td><td>0.705</td><td>0.523</td></tr><tr><td rowspan="3">IMHI</td><td>w/o SemanticRank</td><td>0.595</td><td>0.583</td></tr><tr><td>w/o roberta-large-mnli</td><td>0.612</td><td>0.576</td></tr><tr><td>Semantic-Eval</td><td>0.637</td><td>0.636</td></tr><tr><td rowspan="3">XSUM</td><td>w/o SemanticRank</td><td>0.630</td><td>0.601</td></tr><tr><td>w/o roberta-large-mnli</td><td>0.583</td><td>0.554</td></tr><tr><td>Semantic-Eval</td><td>0.699</td><td>0.661</td></tr></table>
|
| 183 |
+
|
| 184 |
+
# 4.4 Ablation Study
|
| 185 |
+
|
| 186 |
+
To further investigate the influence of each component of Semantic-Eval on its alignment with human preferences, we conducted ablation studies on the system. The results, as presented in Table 5, demonstrate that Semantic-Eval, when incorporating the SemanticRank module, exhibits a closer alignment with human ratings across three text-level task datasets compared to the version of Semantic-Eval that omits this module. This underscores the importance of assigning semantic weight distributions to individual sentences within a text. Furthermore, we visualized the outputs generated by the SemanticRank module for the three text-level tasks, with detailed illustrations provided in Appendix B. Additionally, our analysis reveals that Semantic-Eval aligns more effectively with hu
|
| 187 |
+
|
| 188 |
+
n ratings when equipped with the NIL inference model, particularly on the XSUM dataset, where discrepancy between the human ratings and the del's outputs is notably smaller. These findingsphasize the significance of incorporating semanrelationships within the text when evaluating it similarity.
|
| 189 |
+
|
| 190 |
+
Table 5: Text-level Pearson $r$ and Spearman's rank $\rho$ correlations of ablation models in settings of Datasets.
|
| 191 |
+
|
| 192 |
+
<table><tr><td>Settings</td><td>r</td><td>ρ</td><td>τ</td></tr><tr><td>T(0.1)</td><td>0.554</td><td>0.583</td><td>0.429</td></tr><tr><td>T(0.2)</td><td>0.542</td><td>0.571</td><td>0.420</td></tr><tr><td>T(0.3)</td><td>0.554</td><td>0.583</td><td>0.429</td></tr><tr><td>T(0.4)</td><td>0.588</td><td>0.622</td><td>0.459</td></tr><tr><td>T(0.5)</td><td>0.606</td><td>0.641</td><td>0.473</td></tr><tr><td>T(0.6)</td><td>0.610</td><td>0.641</td><td>0.474</td></tr><tr><td>T(0.7)</td><td>0.554</td><td>0.584</td><td>0.432</td></tr><tr><td>T(0.8)</td><td>0.544</td><td>0.574</td><td>0.423</td></tr><tr><td>T(0.9)</td><td>0.542</td><td>0.572</td><td>0.422</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 6: The correlations between automatic metrics and human judgments on CNN/Daily Mail dataset. T(number) denotes the threshold for filtering the cosine similarity of the embedding between two nodes. $r$ , $\rho$ , and $\tau$ denote the Pearson correlation coefficient, Spearman's rank correlation coefficient, and Kendall's tau coefficient, respectively. In each column, the top score is displayed in bold.
|
| 195 |
+
|
| 196 |
+
Additionally, we investigated the impact of varying the threshold parameter from 0.1 to 0.9 (in increments of 0.1) on the performance of the Semantic-Eval framework using the CNN/Daily
|
| 197 |
+
|
| 198 |
+
Mail dataset, as presented in Table 6. As the threshold increases from 0.1 to 0.6, the Pearson correlation coefficient $r$ , Spearman's rank correlation coefficient $\rho$ , and Kendall's tau $\tau$ generally improve. However, once the threshold surpasses 0.6 (e.g., 0.7 or higher), these correlation metrics begin to decline. This pattern suggests that, for the CNN/Daily Mail summarization task, a low threshold introduces excessive noise by retaining spurious edges, while a high threshold excessively prunes the graph, eliminating potentially informative edges. As shown in Table 6, a threshold of 0.6 yields the highest, or jointly highest, values for all three correlation measures. Notably, the Spearman correlation coefficient $\rho$ remains unchanged at thresholds 0.5 and 0.6. The observed differences between the maximum and minimum values for $r$ , $\rho$ , and $\tau$ are 0.068, 0.070, and 0.054, respectively. Finally, to demonstrate the construction process of SemanticRank more intuitively under different threshold conditions, we visualized the candidate text Y results in Figure 2, as shown in Appendix Figure 4.
|
| 199 |
+
|
| 200 |
+
# 4.5 Evaluation LLMs using Semantic-Eval
|
| 201 |
+
|
| 202 |
+
Semantic-Eval is employed to assess the quality of text generation from 13 general-purpose LLMs on a text-level task dataset, focusing on semantic understanding. To provide a more intuitive representation of the performance differences across LLMs, we visualized the evaluation results for these models on the XSUM dataset, as depicted in Figure 3. Additionally, the evaluation results of
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Figure 3: The visualization results of LLMs on the XSUM dataset assessed by Semantic-Eval.
|
| 206 |
+
|
| 207 |
+
Semantic-Eval for the LLMs on five other text-level task datasets are presented in Appendix B. Figure 3 illustrates that, for the text summarization task, GPT-4o mini achieved the highest score of 64.35, followed by GLM-4-9b-chat in second place, while
|
| 208 |
+
|
| 209 |
+
the Qwen-7B-Chat model received the lowest score. Notably, half of the LLMs scored above 55 points.
|
| 210 |
+
|
| 211 |
+
# 5 Conclusion
|
| 212 |
+
|
| 213 |
+
In this paper, we introduce Semantic-Eval, the first framework designed for automatically evaluating text produced by LLMs without requiring training. The framework emphasizes assessing generated text quality from the perspective of semantic understanding. Semantic-Eval utilizes a graph-based weighting mechanism to evaluate the interdependence of semantic units within a text. Sentence-level similarities are computed using semantic embeddings, and a NLI model is integrated to address potential pairwise relationships. When tested across various NLP tasks and datasets, including sentiment analysis, summarization, question answering, and sentence similarity, Semantic-Eval outperforms existing evaluation metrics and demonstrates a closer alignment with human judgments. Additionally, Semantic-Eval is employed to evaluate the text quality generated by thirteen distinct large language models.
|
| 214 |
+
|
| 215 |
+
# 6 Limitations
|
| 216 |
+
|
| 217 |
+
Semantic-Eval is designed to evaluate the quality of text generated by LLMs from the perspective of semantic understanding, without the need for additional training. However, its performance is inherently limited by the constraints of the pretrained sentence embeddings and NLI models upon which it relies. While Semantic-Eval demonstrates a higher alignment with human preferences compared to smaller parameter LLMs, its performance still lags behind state-of-the-art models, such as GPT-4. This discrepancy suggests that there is significant potential for improvement, particularly in refining the underlying models used for semantic analysis. In future work, we will focus on enhancing the precision of Semantic-Eval in aligning with human preferences, while preserving its training-free nature.
|
| 218 |
+
|
| 219 |
+
# 7 Acknowledgements
|
| 220 |
+
|
| 221 |
+
This work was supported by the National Key Research and Development Program of China(with 2022YFB4703100) and the National Natural Science Foundation of China (62471122), Fundamental Research Funds for the Central Universities(N25GFZ017, N25BJD005).
|
| 222 |
+
|
| 223 |
+
# References
|
| 224 |
+
|
| 225 |
+
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.
|
| 226 |
+
Anirudh Ajith, Chris Pan, Mengzhou Xia, Ameet Deshpande, and Karthik Narasimhan. 2023. Instructeval: Systematic evaluation of instruction selection methods. arXiv preprint arXiv:2307.00259.
|
| 227 |
+
Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
|
| 228 |
+
Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. 2017. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055.
|
| 229 |
+
Chi-Min Chan, Weize Chen, Yusheng Su, Jianxuan Yu, Wei Xue, Shanghang Zhang, Jie Fu, and Zhiyuan Liu. 2023. Chateval: Towards better llm-based evaluators through multi-agent debate. arXiv preprint arXiv:2308.07201.
|
| 230 |
+
Yupeng Chang, Xu Wang, Jindong Wang, Yuan Wu, Linyi Yang, Kaijie Zhu, Hao Chen, Xiaoyuan Yi, Cunxiang Wang, Yidong Wang, et al. 2024. A survey on evaluation of large language models. ACM Transactions on Intelligent Systems and Technology, 15(3):1-45.
|
| 231 |
+
Andong Chen, Lianzhang Lou, Kehai Chen, Xuefeng Bai, Yang Xiang, Muyun Yang, Tiejun Zhao, and Min Zhang. 2024a. Dual-reflect: Enhancing large language models for reflective translation through dual learning feedback mechanisms. arXiv preprint arXiv:2406.07232.
|
| 232 |
+
Junying Chen, Zhenyang Cai, Ke Ji, Xidong Wang, Wanlong Liu, Rongsheng Wang, Jianye Hou, and Benyou Wang. 2024b. Huatuogpt-o1, towards medical complex reasoning with llms. arXiv preprint arXiv:2412.18925.
|
| 233 |
+
Cheng-Han Chiang and Hung-yi Lee. 2023. Can large language models be an alternative to human evaluations? arXiv preprint arXiv:2305.01937.
|
| 234 |
+
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.
|
| 235 |
+
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.
|
| 236 |
+
|
| 237 |
+
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.
|
| 238 |
+
Aparna Elangovan, Ling Liu, Lei Xu, Sravan Bodapati, and Dan Roth. 2024. Considers-the-human evaluation framework: Rethinking human evaluation for generative large language models. arXiv preprint arXiv:2405.18638.
|
| 239 |
+
Zhiwei Fei, Xiaoyu Shen, Dawei Zhu, Fengzhe Zhou, Zhuo Han, Songyang Zhang, Kai Chen, Zongwen Shen, and Jidong Ge. 2023. Lawbench: Benchmarking legal knowledge of large language models. arXiv preprint arXiv:2309.16289.
|
| 240 |
+
Xueyang Feng, Zhi-Yuan Chen, Yujia Qin, Yankai Lin, Xu Chen, Zhiyuan Liu, and Ji-Rong Wen. 2024. Large language model-based human-agent collaboration for complex task solving. arXiv preprint arXiv:2402.12914.
|
| 241 |
+
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 arXiv:2501.12948.
|
| 242 |
+
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2020. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300.
|
| 243 |
+
Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2019. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751.
|
| 244 |
+
Yuzhen Huang, Yuzhuo Bai, Zhihao Zhu, Junlei Zhang, Jinghan Zhang, Tangjun Su, Junteng Liu, Chuancheng Lv, Yikai Zhang, Yao Fu, et al. 2024. C-eval: A multi-level multi-discipline chinese evaluation suite for foundation models. Advances in Neural Information Processing Systems, 36.
|
| 245 |
+
Zhengping Jiang, Yining Lu, Hanjie Chen, Daniel Khashabi, Benjamin Van Durme, and Anqi Liu. 2024. Rora: Robust free-text rationale evaluation. arXiv preprint arXiv:2402.18678.
|
| 246 |
+
Pei Ke, Bosi Wen, Andrew Feng, Xiao Liu, Xuanyu Lei, Jiale Cheng, Shengyuan Wang, Aohan Zeng, Yuxiao Dong, Hongning Wang, et al. 2024. Critiquellm: Towards an informative critique generation model for evaluation of large language model generation. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13034-13054.
|
| 247 |
+
Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of naacL-HLT, volume 1. Minneapolis, Minnesota.
|
| 248 |
+
|
| 249 |
+
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.
|
| 250 |
+
Mateusz Lango and Ondřej Dusek. 2023. Critic-driven decoding for mitigating hallucinations in data-to-text generation. arXiv preprint arXiv:2310.16964.
|
| 251 |
+
Jianquan Li, Xidong Wang, Xiangbo Wu, Zhiyi Zhang, Xiaolong Xu, Jie Fu, Prayag Tiwari, Xiang Wan, and Benyou Wang. 2023. Huatuo-26m, a large-scale chinese medical qa dataset. arXiv preprint arXiv:2305.01526.
|
| 252 |
+
Qintong Li, Leyang Cui, Lingpeng Kong, and Wei Bi. 2025. Exploring the reliability of large language models as customized evaluators for diverse nlp tasks. In Proceedings of the 31st International Conference on Computational Linguistics, pages 10325-10344.
|
| 253 |
+
Yang Li, Jie Ma, Miguel Ballesteros, Yassine Benajiba, and Graham Horwood. 2024. Active evaluation acquisition for efficient llm benchmarking. arXiv preprint arXiv:2410.05952.
|
| 254 |
+
Jingcong Liang, Rong Ye, Meng Han, Ruofei Lai, Xinyu Zhang, Xuanjing Huang, and Zhongyu Wei. 2024. Debatrix: Multi-dimensional debate judge with iterative chronological analysis based on llm. arXiv preprint arXiv:2403.08010.
|
| 255 |
+
Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, et al. 2022. Holistic evaluation of language models. arXiv preprint arXiv:2211.09110.
|
| 256 |
+
Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
|
| 257 |
+
Yen-Ting Lin and Yun-Nung Chen. 2023. Llm-eval: Unified multi-dimensional automatic evaluation for open-domain conversations with large language models. arXiv preprint arXiv:2305.13711.
|
| 258 |
+
Chuang Liu, Renren Jin, Yuqi Ren, Linhao Yu, Tianyu Dong, Xiaohan Peng, Shuting Zhang, Jianxiang Peng, Peiyi Zhang, Qingqing Lyu, et al. 2023. M3ke: A massive multi-level multi-subject knowledge evaluation benchmark for chinese large language models. arXiv preprint arXiv:2305.10263.
|
| 259 |
+
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. arXiv preprint arXiv:2405.12209.
|
| 260 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.
|
| 261 |
+
|
| 262 |
+
Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
|
| 263 |
+
Andrew Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, pages 142-150.
|
| 264 |
+
Rada Mihalcea and Paul Tarau. 2004. Textrank: Bringing order into text. In Proceedings of the 2004 conference on empirical methods in natural language processing, pages 404-411.
|
| 265 |
+
Seyed Mahed Mousavi, Simone Alghisi, and Giuseppe Riccardi. 2024. Dyknow: dynamically verifying time-sensitive factual knowledge in llms. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, pages 8014-8029.
|
| 266 |
+
Ramesh Nallapati, Bowen Zhou, Caglar Gulcehre, Bing Xiang, et al. 2016. Abstractive text summarization using sequence-to-sequence rnns and beyond. arXiv preprint arXiv:1602.06023.
|
| 267 |
+
Shashi Narayan, Shay B Cohen, and Mirella Lapata. 2018. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. arXiv preprint arXiv:1808.08745.
|
| 268 |
+
Bang Nguyen, Mengxia Yu, Yun Huang, and Meng Jiang. 2024. Reference-based metrics disprove themselves in question generation. arXiv preprint arXiv:2403.12242.
|
| 269 |
+
Nedjma Ousidhoum, Shamsuddeen Hassan Muhammad, Mohamed Abdalla, Idris Abdulmumin, Ibrahim Said Ahmad, Sanchit Ahuja, Alham Fikri Aji, Vladimir Araujo, Abinew Ali Ayele, Pavan Baswani, et al. 2024. Semrel2024: A collection of semantic textual relatedness datasets for 14 languages. arXiv preprint arXiv:2402.08638.
|
| 270 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318.
|
| 271 |
+
ChaeHun Park, Minseok Choi, Dohyun Lee, and Jaegul Choo. 2024. Paireval: Open-domain dialogue evaluation with pairwise comparison. arXiv preprint arXiv:2404.01015.
|
| 272 |
+
Bo Peng, Xinyi Ling, Ziru Chen, Huan Sun, and Xia Ning. 2024. *ecellm: Generalizing large language models for e-commerce from large-scale, high-quality instruction data.* arXiv preprint arXiv:2402.08831.
|
| 273 |
+
Felipe Maia Polo, Ronald Xu, Lucas Weber, Mirian Silva, Onkar Bhardwaj, Leshem Choshen, Allysson Flavio Melo de Oliveira, Yuekai Sun, and Mikhail Yurochkin. 2024. Efficient multi-prompt evaluation of llms. arXiv preprint arXiv:2405.17202.
|
| 274 |
+
|
| 275 |
+
Nils Reimers et al. 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084.
|
| 276 |
+
Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. 2020. Superglue: Learning feature matching with graph neural networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4938-4947.
|
| 277 |
+
Karan Singhal, Shekoofeh Azizi, Tao Tu, S Sara Mahdavi, Jason Wei, Hyung Won Chung, Nathan Scales, Ajay Tanwani, Heather Cole-Lewis, Stephen Pfohl, et al. 2023. Large language models encode clinical knowledge. Nature, 620(7972):172-180.
|
| 278 |
+
Hwanjun Song, Hang Su, Igor Shalyminov, Jason Cai, and Saab Mansour. 2024. Finesure: Fine-grained summarization evaluation using llms. arXiv preprint arXiv:2407.00908.
|
| 279 |
+
Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, et al. 2022. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. arXiv preprint arXiv:2206.04615.
|
| 280 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
|
| 281 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
|
| 282 |
+
Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, et al. 2023. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. arXiv preprint arXiv:2306.05087.
|
| 283 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2022a. Self-instruct: Aligning language models with self-generated instructions. arXiv preprint arXiv:2212.10560.
|
| 284 |
+
Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Anjana Arunkumar, Arjun Ashok, Arut Selvan Dhanasekaran, Atharva Naik, David Stap, et al. 2022b. Super-naturalinstructions: Generalization via declarative instructions on $1600+$ nlp tasks. arXiv preprint arXiv:2204.07705.
|
| 285 |
+
|
| 286 |
+
Ishaan Watts, Varun Gumma, Aditya Yadavalli, Vivek Seshadri, Manohar Swaminathan, and Sunayana Sitaram. 2024. Pariksha: A large-scale investigation of human-llm evaluator agreement on multilingual and multi-cultural data. arXiv preprint arXiv:2406.15053.
|
| 287 |
+
Kailai Yang, Tianlin Zhang, Ziyan Kuang, Qianqian Xie, Jimin Huang, and Sophia Ananiadou. 2024. Mentallama: interpretable mental health analysis on social media with large language models. In Proceedings of the ACM on Web Conference 2024, pages 4489-4500.
|
| 288 |
+
Zhuohao Yu, Chang Gao, Wenjin Yao, Yidong Wang, Wei Ye, Jindong Wang, Xing Xie, Yue Zhang, and Shikun Zhang. 2024. Kieval: A knowledge-grounded interactive evaluation framework for large language models. arXiv preprint arXiv:2402.15043.
|
| 289 |
+
Zhiyuan Zeng, Jiatong Yu, Tianyu Gao, Yu Meng, Tanya Goyal, and Danqi Chen. 2023. Evaluating large language models at evaluating instruction following. arXiv preprint arXiv:2310.07641.
|
| 290 |
+
Jing Zhang, Xiaokang Zhang, Daniel Zhang-Li, Jifan Yu, Zijun Yao, Zeyao Ma, Yiqi Xu, Haohua Wang, Xiaohan Zhang, Nianyi Lin, et al. 2023a. Glm-dialog: Noise-tolerant pre-training for knowledge-grounded dialogue generation. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 5564-5575.
|
| 291 |
+
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
|
| 292 |
+
Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. Advances in neural information processing systems, 28.
|
| 293 |
+
Xiaotian Zhang, Chunyang Li, Yi Zong, Zhengyu Ying, Liang He, and Xipeng Qiu. 2023b. Evaluating the performance of large language models on gaokao benchmark. arXiv preprint arXiv:2305.12474.
|
| 294 |
+
Zhihan Zhang, Yixin Cao, Chenchen Ye, Yunshan Ma, Lizi Liao, and Tat-Seng Chua. 2024. Analyzing temporal complex events with large language models? a benchmark towards temporal, long context understanding. arXiv preprint arXiv:2406.02472.
|
| 295 |
+
Ziyin Zhang, Yikang Liu, Weifang Huang, Junyu Mao, Rui Wang, and Hai Hu. 2023c. Mela: Multilingual evaluation of linguistic acceptability. arXiv preprint arXiv:2311.09033.
|
| 296 |
+
Shuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. 2023. Codebertscore: Evaluating code generation with pretrained models of code. arXiv preprint arXiv:2302.05527.
|
| 297 |
+
|
| 298 |
+
# A Experimental Setting
|
| 299 |
+
|
| 300 |
+
# A.1 Metrics Baselines
|
| 301 |
+
|
| 302 |
+
# A.1.1 Traditional-Eval
|
| 303 |
+
|
| 304 |
+
BLEU (Papineni et al., 2002) is a scoring mechanism primarily based on the n-gram overlap between the generated text and the reference text, which is used to evaluate the quality of the generated text. BLEU-1,2 is used as one of the metric baselines.
|
| 305 |
+
|
| 306 |
+
ROUGE (Lin, 2004) is one of the improved methods based on BLEU, which evaluates the accuracy of the generated text by calculating the overlap between the automatically generated text and the reference text. ROUGE-1,2 and ROUGE-L are used as metric baselines.
|
| 307 |
+
|
| 308 |
+
METEOR(Banerjee and Lavie, 2005) also improves BLEU and assesses quality mainly by calculating the degree of match between the machine translation result and the reference translation. It considers lexical variations and allows synonym matching.
|
| 309 |
+
|
| 310 |
+
# A.1.2 BERT-based
|
| 311 |
+
|
| 312 |
+
BERT(Devlin et al., 2018) is a pre-trained language model based on the transformer(Vaswani et al., 2017) model, which captures the semantic relations between sentences by introducing a bidirectional encoding mechanism.
|
| 313 |
+
|
| 314 |
+
BERTScore(Zhang et al., 2019) provides an overall picture of the quality of text generation by calculating Precision, Recall, and F1 scores between candidate and reference sentences. In particular, Precision measures the proportion of semantic information for each word in the generated text that occurs in the reference text, Recall measures the proportion of semantic information for each word in the reference text that occurs in the generated text, and F1 score is the reconciled average of Precision and Recall, which is used to combine Precision and Recall.
|
| 315 |
+
|
| 316 |
+
# A.1.3 LLM-based
|
| 317 |
+
|
| 318 |
+
Qwen2-7B $^{4}$ and GPT-4 $^{5}$ (gpt-4-turbo-preview) generalized LLMs are employed as one of the metrics baselines. When LLM-based methods are used as raters, we design the simplest prompts to guide these LLMs to score paired texts. The prompt
|
| 319 |
+
|
| 320 |
+
$^{4}$ https://huggingface.co/Qwen/
|
| 321 |
+
Qwen2-7B-Instruct
|
| 322 |
+
$^{5}$ https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4
|
| 323 |
+
|
| 324 |
+
is:"Please score the following two texts on a scale of 0-1."
|
| 325 |
+
|
| 326 |
+
# A.2 Large Language Models
|
| 327 |
+
|
| 328 |
+
We compare the quality of generated text for 13 generalized large language models for LLMs: Llama-3.1-8B-Instruct<sup>6</sup>, Llama-2-13b-chathf<sup>7</sup>, Llama-2-7b-chat-hf<sup>8</sup>, Llama-3-8B-Instruct<sup>9</sup>, Qwen-7B-Chat<sup>10</sup>, Qwen2-7B-Instruct<sup>11</sup>, Qwen2.5-7B-Instruct<sup>12</sup>, chatglm3-6b-32k<sup>13</sup>, chatglm3-6b<sup>14</sup>, chatglm2-6b<sup>15</sup>, glm-4-9b-chat<sup>16</sup>, Baichuan2-7B-Chat<sup>17</sup>, GPT-3.5-turbo<sup>18</sup>, GPT-4o mini<sup>19</sup>.
|
| 329 |
+
|
| 330 |
+

|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 4: The visualization shows the construction of SemanticRank under different threshold conditions.
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
|
| 339 |
+
$^{6}$ https://huggingface.co/meta-llama/Llama-3.
|
| 340 |
+
|
| 341 |
+
1-8B-Instruct
|
| 342 |
+
|
| 343 |
+
<sup>7</sup>https://huggingface.co/meta-llama/
|
| 344 |
+
|
| 345 |
+
Llama-2-13b-chat-hf
|
| 346 |
+
|
| 347 |
+
<sup>8</sup>https://huggingface.co/meta-llama/
|
| 348 |
+
|
| 349 |
+
Llama-2-7b-chat-hf
|
| 350 |
+
|
| 351 |
+
<sup>9</sup>https://huggingface.co/meta-llama/
|
| 352 |
+
|
| 353 |
+
Meta-Llama-3-8B-Instruct
|
| 354 |
+
|
| 355 |
+
10https://huggingface.co/Qwen/Qwen-7B-Chat
|
| 356 |
+
|
| 357 |
+
11 https://huggingface.co/Qwen/
|
| 358 |
+
|
| 359 |
+
Qwen2-7B-Instruct
|
| 360 |
+
|
| 361 |
+
12https://huggingface.co/Qwen/Qwen2.
|
| 362 |
+
|
| 363 |
+
5-7B-Instruct
|
| 364 |
+
|
| 365 |
+
<sup>13</sup>https://huggingface.co/THUDM/chatglm3-6b-32k
|
| 366 |
+
|
| 367 |
+
<sup>14</sup>https://huggingface.co/THUDM/chatglm3-6b
|
| 368 |
+
|
| 369 |
+
15https://huggingface.co/THUDM/chatglm2-6b
|
| 370 |
+
|
| 371 |
+
<sup>16</sup>https://huggingface.co/THUDM/glm-4-9b-chat
|
| 372 |
+
|
| 373 |
+
<sup>17</sup>https://huggingface.co/baichuan-inc/
|
| 374 |
+
|
| 375 |
+
Baichuan2-7B-Chat
|
| 376 |
+
|
| 377 |
+
18https://platform.openai.com/docs/models#
|
| 378 |
+
|
| 379 |
+
gpt-3.5-turbo
|
| 380 |
+
|
| 381 |
+
19https://platform.openai.com/docs/model#
|
| 382 |
+
|
| 383 |
+
gpt-4o-mini
|
| 384 |
+
|
| 385 |
+
# B Semantic-Eval Evaluates LLMs
|
| 386 |
+
|
| 387 |
+
One data sample was selected from each of the five datasets in the three text-level tasks, and the SemanticRank module visualized the construction process for each of the different data samples, as shown in the six figures below.
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
(a) Visualization of self-similarity matrix of reference text.
|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
(b) Visualization of self-similarity matrix for candidate text.
|
| 394 |
+
|
| 395 |
+

|
| 396 |
+
(c) Visualization of self-similar TextRank plots for reference text.
|
| 397 |
+
|
| 398 |
+

|
| 399 |
+
(d) Visualization of self-similar TextRank graphs for candidate texts.
|
| 400 |
+
|
| 401 |
+

|
| 402 |
+
(a) Visualization of self-similarity matrix of reference text.
|
| 403 |
+
|
| 404 |
+

|
| 405 |
+
(b) Visualization of self-similarity matrix for candidate text.
|
| 406 |
+
|
| 407 |
+

|
| 408 |
+
(c) Visualization of self-similar TextRank plots for reference text.
|
| 409 |
+
|
| 410 |
+

|
| 411 |
+
(d) Visualization of self-similar TextRank graphs for candidate texts.
|
| 412 |
+
|
| 413 |
+

|
| 414 |
+
Figure 6: The visualization shows the construction process of the SemanticRank on the sample on the Medicalo1 dataset.
|
| 415 |
+
|
| 416 |
+

|
| 417 |
+
(b) Visualization of self-similarity matrix for candidate text.
|
| 418 |
+
|
| 419 |
+

|
| 420 |
+
(a) Visualization of self-similarity matrix of reference text.
|
| 421 |
+
(c) Visualization of self-similar TextRank plots for reference text.
|
| 422 |
+
Figure 7: The visualization shows the construction process of the SemanticRank on the sample on the IMDB dataset.
|
| 423 |
+
|
| 424 |
+

|
| 425 |
+
Figure 5: The visualization shows the construction process of the SemanticRank on the sample on the IMHI dataset.
|
| 426 |
+
(d) Visualization of self-similar TextRank graphs for candidate texts.
|
| 427 |
+
|
| 428 |
+

|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
(a) Visualization of self-similarity matrix of reference text.
|
| 434 |
+
(c) Visualization of self-similar TextRank plots for reference text.
|
| 435 |
+
|
| 436 |
+

|
| 437 |
+
(b) Visualization of self-similarity matrix for candidate text.
|
| 438 |
+
(d) Visualization of self-similar TextRank graphs for candidate texts.
|
| 439 |
+
|
| 440 |
+

|
| 441 |
+
|
| 442 |
+

|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
(a) Visualization of self-similarity matrix of reference text.
|
| 446 |
+
(c) Visualization of self-similar TextRank plots for reference text.
|
| 447 |
+
|
| 448 |
+

|
| 449 |
+
(b) Visualization of self-similarity matrix for candidate text.
|
| 450 |
+
(d) Visualization of self-similar TextRank graphs for candidate texts.
|
| 451 |
+
|
| 452 |
+
# C Semantic-Eval evaluates LLMs
|
| 453 |
+
|
| 454 |
+
The following five figures show the results of Semantic-Eval's evaluation of LLMs on each of the five text-level task datasets.
|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
Figure 10: The visualization results of LLMs on the CNN/Daily Mail dataset assessed by Semantic-Eval.
|
| 458 |
+
|
| 459 |
+

|
| 460 |
+
Figure 8: The visualization shows the construction process of the SemanticRank on the sample on the Yelp Polarity dataset.
|
| 461 |
+
Figure 11: The visualization results of LLMs on the IMDB dataset assessed by Semantic-Eval.
|
| 462 |
+
|
| 463 |
+

|
| 464 |
+
Figure 9: The visualization shows the construction process of the SemanticRank on the sample on the CNN/Daily Mail dataset.
|
| 465 |
+
Figure 12: The visualization results of LLMs on the Yelp Polarity dataset assessed by Semantic-Eval.
|
| 466 |
+
|
| 467 |
+

|
| 468 |
+
Figure 13: The visualization results of LLMs on the IMHI dataset assessed by Semantic-Eval.
|
| 469 |
+
|
| 470 |
+

|
| 471 |
+
Figure 14: The visualization results of LLMs on the Medical-o1 dataset assessed by Semantic-Eval.
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c72665318c7f37b7f57ec259f6c5f99dbc5a1bdb8143022904f7d2100902df91
|
| 3 |
+
size 986026
|
2025/Semantic-Eval _ A Semantic Comprehension Evaluation Framework for Large Language Models Generation without Training/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/2e5542ef-452b-4e73-b00c-5dc56ac24ebc_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbf3c0f48e91aff953b4b2bb64beb54d1d8ac3e520a43b7f8829ed4c27be07b4
|
| 3 |
+
size 2977636
|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/full.md
ADDED
|
@@ -0,0 +1,601 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Separating Tongue from Thought: Activation Patching Reveals Language-Agnostic Concept Representations in Transformers
|
| 2 |
+
|
| 3 |
+
Clément Dumas $^{12*†}$ Chris Wendler $^{3*†}$
|
| 4 |
+
|
| 5 |
+
Veniamin Veselovsky $^{4\dagger}$ Giovanni Monea $^{5\dagger}$ Robert West $^{6}$
|
| 6 |
+
|
| 7 |
+
<sup>1</sup>ENS Paris-Saclay <sup>2</sup>Université Paris-Saclay <sup>3</sup>Northeastern <sup>4</sup>Princeton <sup>5</sup>Cornell <sup>6</sup>EPFL {clement.dumas@ens-paris-saclay.fr, chris.wendler@epfl.ch}
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
A central question in multilingual language modeling is whether large language models (LLMs) develop a universal concept representation, disentangled from specific languages. In this paper, we address this question by analyzing latent representations (latents) during a word-translation task in transformer-based LLMs. We strategically extract latents from a source translation prompt and insert them into the forward pass on a target translation prompt. By doing so, we find that the output language is encoded in the latent at an earlier layer than the concept to be translated. Building on this insight, we conduct two key experiments. First, we demonstrate that we can change the concept without changing the language and vice versa through activation patching alone. Second, we show that patching with the mean representation of a concept across different languages does not affect the models' ability to translate it, but instead improves it. Finally, we generalize to multi-token generation and demonstrate that the model can generate natural language description of those mean representations. Our results provide evidence for the existence of language-agnostic concept representations within the investigated models. $^{1}$
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Most modern large language models (LLMs) are trained on massive corpora dominated by English text (Touvron et al., 2023; Dubey et al., 2024; Radford et al., 2019; Brown et al., 2020; OpenAI, 2023). Despite this imbalanced training, they
|
| 16 |
+
|
| 17 |
+
*Equal contribution
|
| 18 |
+
†Work done while at EPFL
|
| 19 |
+
|
| 20 |
+
This work has been previously published under the title "How Do Llamas Process Multilingual Text? A Latent Exploration through Activation Patching" at the ICML 2024 Mechanistic Interpretability Workshop https://openreview.net/forum?id=0ku2hIm4BS.
|
| 21 |
+
|
| 22 |
+
Code for reproducing our experiments is available at https://github.com/Butanium/lm-lang-agnostic
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 1: For two given concepts, e.g., BOOK and LEMON, we construct multiple source prompts which translate BOOK, and a target prompt for translating from French to Chinese. Then we extract the residual stream of the last token of the word to be translated after some layer $j$ and all subsequent ones from the source prompts and insert the mean of each layer at the corresponding positions in the forward pass of the target prompt. The resulting next token probabilities will concentrate on the source concept in target language (BOOK $^{\mathrm{ZH}}$ , i.e.,书) when patching at layers 0-15, on the target concept in target language (LEMON $^{\mathrm{ZH}}$ , 柠檬) for layers 16-31.
|
| 26 |
+
|
| 27 |
+
achieve remarkable performance across multiple languages (Shi et al., 2022), raising fundamental questions about how they process and represent multilingual information. Understanding these mechanisms is crucial not only to improve model performance, but also to identify potential biases and limitations in cross-lingual processing.
|
| 28 |
+
|
| 29 |
+
A fundamental question in multilingual language modeling is whether LLMs develop universal concept representations that transcend specific languages (Wendler et al., 2024; Conneau et al., 2020b; Chi et al., 2020; Xie et al., 2022; Mousi et al., 2024). For example, when a model processes the word "cat" in English and "chat" in French, does it map these to the same internal represent
|
| 30 |
+
|
| 31 |
+
tation of the feline concept, or does it maintain separate language-specific representations? Several recent works hint at the existence of language-agnostic concept representations.
|
| 32 |
+
|
| 33 |
+
Wendler et al. (2024) found that for simple multilingual tasks independent of the input and output language intermediate decodings of concept representations using the logit lens (Nostalgebraist, 2020) decode to the English before they decode to the target language. Additionally, it has been long observed that instruction and safety tuning LLMs only on English data generalizes to other languages (Li et al., 2024; Shaham et al., 2024). The presence of language-agnostic representation in the pretrained LLMs would provide an explanation for both of these behaviors.
|
| 34 |
+
|
| 35 |
+
This provides a unique opportunity for us to dig deeper and examine how multilingual concepts are represented and processed within LLMs, potentially revealing insights into language biases and concept formation. In particular, we are inspired by recent mechanistic interpretability approaches based on activation patching (Variengien and Winsor, 2023; Ghandeharioun et al., 2024; Chen et al., 2024a). These approaches are based on the idea of patching activations from one forward pass into another while observing the output (c.f. Fig. 2) and present a simple, yet effective way to inspect the representations learned and causally understand the computations performed by LLMs.
|
| 36 |
+
|
| 37 |
+
Contributions. While prior work has provided observational evidence for shared semantic spaces in LLMs, we present the first causal analysis of how these representations are actively utilized during multilingual processing. More specifically, in this work we aim to understand how transformers process and represent concepts during translation tasks, whether language and concept information can be manipulated independently in the model's computations, and, whether models maintain separate language-specific concept representations or develop a shared conceptual space. To this end, we make the following contributions.
|
| 38 |
+
|
| 39 |
+
1. First, we perform an activation patching analysis of Llama 2 7B (Touvron et al., 2023). We demonstrate that the model processes translation tasks by first resolving output language, then the concept to be translated.
|
| 40 |
+
2. We propose two competing hypotheses about how transformers solve the translation task during their forward pass: H1 where language
|
| 41 |
+
|
| 42 |
+
and concepts are represented independently, and H2 where they are inherently entangled. We argue that if language and concepts are independent (H1), averaging the latent representation of a concept across languages should still allow the model to make sense of and utilize this representation. Conversely, if language and concepts are entangled (H2), this mean representation would be an incoherent mixture of language-specific concepts that the model cannot effectively use.
|
| 43 |
+
|
| 44 |
+
3. To test these hypotheses, we use a novel activation patching setup depicted in Figure 1 which forces Llama 2 7B to translate this mean representation across languages. We find that using the mean concept representation across languages improves Llama 2 7B's performance on a word translation task, supporting H1.
|
| 45 |
+
4. We show that our observations generalize to a diverse set of transformer models varying in size, architecture, and training data, including Llama 2 70B, Llama 3 8B (Dubey et al., 2024), Mistral 7B (Jiang et al., 2023), Qwen 1.5 7B (Bai et al., 2023), Aya 23 8B (Aryabumi et al., 2024) and Gemma 2 2B (Team et al., 2024).
|
| 46 |
+
5. Finally, to support our claim that mean representation are usable by the model in a autoregressive generation setting, we present a novel activation patching setup depicted in Figure 5 to show that a model can successfully write a definition of such a mean representation.
|
| 47 |
+
|
| 48 |
+
Implications. While prior work has suggested the existence of shared semantic spaces across languages through observational methods, our causal analysis provides the first direct evidence that LLMs actively utilize language-agnostic concept representations during text generation. Furthermore, our activation patching methodology establishes a framework for future causal investigations of multilingual representations, moving beyond the limitations of embedding similarity, probing, and logit lens approaches.
|
| 49 |
+
|
| 50 |
+
# 2 Related Work
|
| 51 |
+
|
| 52 |
+
LLMs have demonstrated remarkable capabilities in processing multilingual text across languages, with examples including encoder-only model like mBERT (Devlin et al., 2018), XLM-R (Conneau et al., 2020a), and mT5 (Xue et al., 2021) and decoder-only model like (Aryabumi et al., 2024;
|
| 53 |
+
|
| 54 |
+
Dubey et al., 2024). Studies on encoder-only models have shown that they develop language-agnostic representations, explaining their cross-lingual transfer capabilities. The methodology used was embedding similarity analysis (Conneau et al., 2020b; Libovicky et al., 2020; Muller et al., 2021; Mousi et al., 2024) and probing methods (Choenni and Shutova, 2020; Pires et al., 2019).
|
| 55 |
+
|
| 56 |
+
While decoder-only transformers are not primarily designed to develop contextual embedding, but rather for open-ended text generation, they also develop cross-lingual generalization, for example, during safety and instruction tuning (Li et al., 2024; Chirkova and Nikoulina, 2024). Mechanistic interpretability has led to powerful tools to analyze the language-agnosticity of these models. Using neuron analysis Stanczak et al. (2022); Chen et al. (2024b); Cao et al. (2024); Zeng et al. (2024); Tang et al. (2024) have shown that LLMs develop both language-agnostic and language-specific neurons. Wendler et al. (2024); Wu et al. (2024) use the logit lens (Nostalgebraist, 2020) to perform early decoding during the forward pass of both LLMs and show that, no matter the language or input modality, the intermediate decodings concentrate on English before decoding to a specific language in the very last layers.
|
| 57 |
+
|
| 58 |
+
While the analyses via embedding similarity, probing and the logit lens give use valuable insight into the structure of the representation, they are not causal. Additionally, while the neuron level analysis studies the causal effects of the neurons, they do not study the representation themselves. Our work aims to fill this gap.
|
| 59 |
+
|
| 60 |
+
A related line of work has explored using definition generation as a means to evaluate semantic representations. Noraset et al. (2017) introduced definition modeling, the task of generating dictionary definitions from word embeddings, as a more direct evaluation of what semantic information embeddings capture. This approach has been extended to evaluate various types of embeddings (Gardner et al., 2022; Chang and Chen, 2019). For example, (Chang and Chen, 2019) demonstrated that contextualized embeddings like ELMo and BERT can be effectively mapped to definition spaces, revealing their sense-specific semantic content. In our work, instead of training a model to generate descriptions of LLM's representations, we repurpose the LLM itself to either translate or define it using activation patching. Activation patching, introduced by Meng et al. (2022), has been the main tool used to
|
| 61 |
+
|
| 62 |
+
draw causal interpretation of LLM representations (Variengien and Winsor, 2023; Geiger et al., 2022; Kramár et al., 2024). More recently, Ghandeharoui et al. (2024); Chen et al. (2024a) also show patching setups in which they can use the model itself to analyze its own model internal. Inspired by those methods, we developed two novel patching experiments supporting the language-agnosicity of LLMs representation.
|
| 63 |
+
|
| 64 |
+
Parallel work to ours by Fierro et al. (2025) leverages the mechanistic interpretability toolkit to understand how factual recall works in multilingual LLMs as well. Similar to us, they find that the concept to be decoded and its language does not enter at the same layer into the residual stream, however in their knowledge association tasks they observe the opposite order than we do in our translation task. They also find that large parts of multilingual-factual recall are handled in a language agnostic way, despite the investigated models being trained on a more balanced split of languages than the ones studied in our paper.
|
| 65 |
+
|
| 66 |
+
# 3 Background
|
| 67 |
+
|
| 68 |
+
Transformers forward pass. When an autoregressive decoder-only transformer (Vaswani et al., 2017; Touvron et al., 2023) with $L$ layers processes a sequence of input tokens $x_{1},\ldots ,x_{n}\in V$ from a vocabulary $V$ , each token is initially transformed into a $d$ -dimensional vector $h_i^0$ by an embedding layer. This first set of vector is the beginning of the residual stream. Then, for each token position $i$ , the layer $j\in 1,\dots ,L$ updates the residual stream the following way:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
h _ {i} ^ {(j)} = h _ {i} ^ {(j - 1)} + f _ {j} \left(h _ {1} ^ {(j - 1)}, \dots , h _ {i} ^ {(j - 1)}\right) \tag {1}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $f_{j}$ represents the operations of the $j$ -th layer (typically self-attention followed by a feedforward network). Finally, for a $m$ -layer transformer, the next-token probabilities are obtained via a learned linear layer followed by a softmax operation mapping $h_{i}^{(m)}$ to $P(x_{i + 1}|x_1\ldots x_i)$ .
|
| 75 |
+
|
| 76 |
+
Activation patching. Activation patching is a causal intervention technique that allows us to understand how different components of a neural network contribute to its output. The key idea is to run two forward passes through the network – one on a source input and one on a target input – and copy (or “patch”) activations from specific positions and layers of the source forward pass into the target
|
| 77 |
+
|
| 78 |
+
forward pass. By observing how these interventions affect the model's output, we can understand what information is encoded in different parts of the network and how it is used.
|
| 79 |
+
|
| 80 |
+
More formally, given a source input $S$ and target input $T$ , we can patch activations at position $i, i'$ and layer $j$ by setting $h_{i}^{(j)}(T) = h_{i'}^{(j)}(S)$ during the target forward pass, where $h_{i}^{(j)}$ represents the activation at position $i$ and layer $j$ . The change in the model's output distribution provides evidence about what information was contained in the patched activation.
|
| 81 |
+
|
| 82 |
+
Concepts. We use capitalization to denote an abstract concept, (e.g. CAT). Let $C$ be an abstract concept, then we denote $C^\ell$ its language-specific version. Further, we define $w(C^\ell)$ as the set of words expressing the abstract concept $C$ in language $\ell$ . For example, if $C = \mathrm{CAT}$ and $\ell = \mathrm{EN}$ we have $w(C^\ell) = \{\text{"cat"}\}$ and similarly $w(C^{\mathrm{DE}}) = \{\text{"Katze"},\text{"Kater"}\}$ . Note that we talk about words for the sake of simplicity. However, on a technical level $w$ refers to the set of starting tokens of these words (e.g. {"Katze", "Kat"}) Therefore, when we track different sets of tokens $W$ , (e.g. $W \in \{w(C_1^{\mathrm{IT}}),w(C_1^{\mathrm{ZH}}),w(C_2^{\mathrm{IT}}),w(C_2^{\mathrm{ZH}}),w(C_1^{\mathrm{EN}})\cup w(C_2^{\mathrm{EN}})\} = \mathcal{W}$ ), we ensure that there is no token in common between any pair of $W_{1},W_{2} \in \mathcal{W}$ with $W_{1} \neq W_{2}$ .
|
| 83 |
+
|
| 84 |
+
Prompt design. We use the same translation prompt template as (Wendler et al., 2024) that we denote TP(input language, output language, concept). For example, TP(EN, FR, CLOUD) could be:
|
| 85 |
+
|
| 86 |
+
English: "computer" - Français: "ordinateur"
|
| 87 |
+
|
| 88 |
+
English: "ant" - Français: "fouri mi
|
| 89 |
+
|
| 90 |
+
English: "cloud" - Français: "
|
| 91 |
+
|
| 92 |
+
Here the task is to translate $w(\mathrm{CLOUD}^{\mathrm{EN}}) = \{ "cloud" \}$ into $w(\mathrm{CLOUD}^{\mathrm{FR}}) = \{ "nuage" \}$ .
|
| 93 |
+
|
| 94 |
+
More formally, for a given concept $C$ , input language $\ell^{(\mathrm{in})}$ , and output language $\ell^{(\mathrm{out})}$ , we construct a few-shot translation prompt $\mathrm{TP}(\ell^{(\mathrm{in})},\ell^{(\mathrm{out})},C)$ . This prompt contains $k$ examples $^2$ of single-word translations of concepts $C_1,\ldots ,C_k$ from $\ell^{(\mathrm{in})}$ to $\ell^{(\mathrm{out})}$ , concluding with the model being tasked to translate $C$ from $\ell^{(\mathrm{in})}$ to $\ell^{(\mathrm{out})}$ . Using $C^{\ell^{(\mathrm{in})}}$ as a shortcut for $v\in w(C^{\ell^{(\mathrm{in})}})$ , $\mathrm{TP}(\ell^{(\mathrm{in})},\ell^{(\mathrm{out})},C)$ looks like:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\begin{array}{l} \ell^ {(\text {i n})}: \quad “ C _ {1} ^ {\ell^ {(\text {i n})}} ” - \ell^ {(\text {o u t})}: \quad “ C _ {1} ^ {\ell^ {(\text {o u t})}} ” \\ \ell^ {(\text {i n})}: \left. C _ {k} ^ {\ell^ {(\text {i n})}} \right. - \ell^ {(\text {o u t})}: \left. C _ {k} ^ {\ell^ {(\text {o u t})}} \right. \\ \ell^ {\left(\mathrm {i n}\right)}: \quad “ C ^ {\ell^ {\left(\mathrm {i n}\right)}}, - \quad \ell^ {\left(\mathrm {o u t}\right)}: “ \\ \end{array}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
We denote $\mathrm{TP}^{\mathrm{concept}}(\ell^{\mathrm{(in)}},\ell^{\mathrm{(out)}},C)$ as $\mathrm{TP}(\ell^{(\mathrm{in})},\ell^{(\mathrm{out})},C)$ cut at the last token of $C^{\ell (\mathrm{in})}$ . For example, in our previous example, $\mathrm{TP}^{\mathrm{concept}}(\mathrm{EN},\mathrm{FR},\mathrm{CLOUD})$ would be:
|
| 101 |
+
|
| 102 |
+
English: "computer" - Français: "ordinateur"
|
| 103 |
+
|
| 104 |
+
English: "ant" - Français: "fourmi"
|
| 105 |
+
|
| 106 |
+
English: "cloud
|
| 107 |
+
|
| 108 |
+
We expect that the last token of such prompts is where the model stores its latent representation of $C^{\ell^{(\mathrm{in})}}$ .
|
| 109 |
+
|
| 110 |
+
Importantly, whether the model correctly answers TP is determined by its next token prediction. In our prompt example, the next token predicted should be "nu", the first token of "nuage". Thus, we can track $P(C^{\ell})^{3}$ , i.e., the probability of the concept $C$ occurring in language $\ell$ , by simply summing up the probabilities of all starting tokens of $w(C^{\ell})$ in the next-token distribution.
|
| 111 |
+
|
| 112 |
+
We improve upon the construction of Wendler et al. (2024) by considering all the possible expressions of $C$ in $\ell$ using BabelNet (Navigli et al., 2021), instead of GPT-4 translations, when computing $P(C^{\ell})$ . This allows us to capture many possible translations, instead of one. For example, "commerce", "magasin" and "boutique" are all valid words for $\mathrm{SHOP}^{\mathrm{FR}}$ .
|
| 113 |
+
|
| 114 |
+
# 4 Exploratory analysis with patching
|
| 115 |
+
|
| 116 |
+
Problem statement. We aim to understand whether language and concept information can vary independently during Llama-2's forward pass when processing a multilingual prompt. For example, a representation of $C^\ell$ of the form $z_{C^\ell} = z_C + z_\ell$ , in which $z_C \in U$ , $z_\ell \in U^\perp$ and $U \oplus U^\perp = \mathbb{R}^d$ is a decomposition of $\mathbb{R}^d$ into a subspace $U$ and its orthogonal complement $U^\perp$ , would allow for language and concept information to vary independently: language can be varied by changing $z_\ell \in U^\perp$ and concept by changing $z_C \in U$ . Conversely, if language and concept information were
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 2: For two given concepts, e.g., BOOK and LEMON, we construct a source prompt for translating BOOK from German to Italian, and a target prompt for translating LEMON from French to Chinese. Then we extract the residual stream of the last token at a single layer $j$ from the source prompt and insert it at the corresponding position and layer in the forward pass of the target prompt. The resulting next token probabilities will concentrate on the target concept in the target language (LEMON $^{\text{ZH}}$ , i.e.,柠檬) when patching at layers 0-11, on the target concept in the source language (LEMON $^{\text{IT}}$ , "limone") for layers 12-16, and on the source concept in the source language (BOOK $^{\text{IT}}$ , "libro") for layers 17-31.
|
| 120 |
+
|
| 121 |
+
entangled, a decomposition like this should not exist: varying the language would mean varying the concept and vice versa.
|
| 122 |
+
|
| 123 |
+
# 4.1 Experimental design
|
| 124 |
+
|
| 125 |
+
We start our analysis with an exploratory experiment on Llama 2 7B (Touvron et al., 2023). We use 5-shots translation prompts to create paired source $S = \mathrm{TP}(\ell_S^{\mathrm{(in)}},\ell_S^{\mathrm{(out)}},C_S)$ and target prompt $T = \mathrm{TP}(\ell_T^{\mathrm{(in)}},\ell_T^{\mathrm{(out)}},C_T)$ datasets with different concept, input languages and output languages. If not mentioned otherwise, $\ell_S$ and $\ell_T$ refer to the output language of $S$ and $T$ .
|
| 126 |
+
|
| 127 |
+
Similar to (Variengien and Winsor, 2023), we would like to infer at which layers the output language and the concept enter the residual stream $h_{n_T}^{(j)}(T)$ respectively and whether they can vary independently for our task. In order to investigate this question, we perform the experiment depicted in Figure 2. For each transformer block $f_j$ we create two parallel forward passes, one processing the source prompt $S$ which tokens are $(s_1, \ldots, s_{n_S})$ and one processing the target prompt $T = (t_1, \ldots, t_{n_T})$ . While doing so, we extract the residual stream of the last token of the source
|
| 128 |
+
|
| 129 |
+
prompt after layer $j$ , $h_{n_S}^{(j)}(S)$ , and insert it at the same layer at position $n_T$ in the forward pass of the target prompt, i.e., by setting $h_{n_T}^{(j)}(T) = h_{n_S}^{(j)}(S)$ and subsequently completing the altered forward pass. From the resulting next token distribution, we compute $P(C_S^{\ell_S}), P(C_S^{\ell_T}), P(C_T^{\ell_S})$ , and $P(C_T^{\ell_T})$ .
|
| 130 |
+
|
| 131 |
+
# 4.2 Results
|
| 132 |
+
|
| 133 |
+
In this experiment, we perform the patching at one layer at a time and report the probability that is assigned to $P(C_{S}^{\ell_{S}})$ , $P(C_{S}^{\ell_{T}})$ , $P(C_{T}^{\ell_{S}})$ , and $P(C_{T}^{\ell_{T}})$ . As a result we obtain Figure 3 in which we report means and $95\%$ confidence interval over 200 examples.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: Our first patching experiment with a DE to IT source prompt and a FR to ZH target prompt with different concepts. The x-axis shows at which layer the patching was performed and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). In the legend, the prefix "src" stands for source and "tgt" for target concept. The orange dashed line and blue dash-dotted line correspond to the mean accuracy on source and target prompt. We report means and $95\%$ Gaussian confidence intervals computed over 200 source, target prompt pairs featuring 41 source concepts and 38 target concepts.
|
| 137 |
+
|
| 138 |
+
Interpretation. We observe the following pattern while patching at different layers (see Figure 3):
|
| 139 |
+
|
| 140 |
+
- Layers 0–11: Target concept decoded in target language, resulting in large $P(C_{T}^{\mathrm{ZH}})$ .
|
| 141 |
+
- Layers 12-16: Target concept decoded in source language, resulting in large $P(C_T^{\mathrm{IT}})$ .
|
| 142 |
+
- Layers 16-31: Source concept decoded in source language, resulting in large $P(C_{S}^{\mathrm{IT}})$ .
|
| 143 |
+
|
| 144 |
+
This pattern suggests that the model first computes the output language: from layer 12 onwards, we decode in the source output language. This indicates that up until that layer, the need to decode to $\ell^{(out)}$ is being encoded in the residual stream and subsequently remains unchanged. For example, this could be achieved by the model computing a function vector $z_{\ell^{(out)}}$ (Todd et al., 2023). If this
|
| 145 |
+
|
| 146 |
+
hypothesis is correct, patching at layer 12 would overwrite $z_{\ell_T^{(out)}}$ with $z_{\ell_S^{(out)}}$ . The green spike between layer 12 and 16 indicates that at those layer, the concept is not yet represented, so the model keep outputting the target concept but in the source language.
|
| 147 |
+
|
| 148 |
+
In later layers, the model determines the concept: from layer 16 onwards, the source concept is decoded. This suggests that $z_{C_T^{\ell(\mathrm{out})}}$ is overwritten at layer 16.
|
| 149 |
+
|
| 150 |
+
Hypotheses. We are left with two hypotheses compatible with these results:
|
| 151 |
+
|
| 152 |
+
- H1: Concept and language are represented independently. When doing the translation, the model first computes $\ell^{(\mathrm{out})}$ from context, and then identifies $C$ . In the last layers, it then maps $C$ to the first token of $w(C^{\ell^{(\mathrm{out})}})$ .
|
| 153 |
+
- H2: The representation of a concept is always entangled with its language. When doing the translation, the model first computes $\ell^{(\mathrm{out})}$ , then computes $\ell^{(\mathrm{in})}$ and $C^{\ell^{(\mathrm{in})}}$ from its context and solves the language-pair-specific translation task of mapping $C^{\ell^{(\mathrm{in})}}$ to $C^{\ell^{(\mathrm{out})}}$ .
|
| 154 |
+
|
| 155 |
+
# 5 Ruling out hypotheses
|
| 156 |
+
|
| 157 |
+
Next, we run additional experiments to (1) provide further evidence that we are either in H1 or H2 and (2) to disambiguate whether we are in H1 or H2 (3) to show that our findings hold for other models.
|
| 158 |
+
|
| 159 |
+
Further evidence experiment. In the experiments in Sec. 4 we did not observe source concept in target language. However, both H1 and H2 would allow for that to happen via patching in the right way. Therefore, in this experiment, instead of over-writing the residual stream at the last token of the prompt, we overwrite them at the last token of the word to be translated. In order to do that, for the source prompt, we use $\mathrm{TP}^{\mathrm{concept}}$ instead of TP ( $S = \mathrm{TP}^{\mathrm{concept}}(\ell_S^{(\mathrm{in})},\ell_S^{(\mathrm{out})},C_S)$ ). This means that
|
| 160 |
+
|
| 161 |
+
we collect the activations at the last token of $C_S^{\ell_S^{(\mathrm{in})}}$ .
|
| 162 |
+
|
| 163 |
+
Let $\rho_{T}$ denote the position of that token in the target prompt. Since the concept information seems to enter via multiple layers (16-20) into the latent of the last token, we overwrite the latent corresponding to the token at position $\rho_{T}$ at layer $j$ and all subsequent ones. By patching in this way in both H1 and H2 we would expect to see large $P(C_{S}^{\ell_{T}})$ .
|
| 164 |
+
|
| 165 |
+
Formally, we patch by setting $h_{\rho_T}^{(j)}(T) = h_{-1}^{(j)}(S), \ldots, h_{\rho_T}^{(L)}(T) = h_{-1}^{(L)}(S)^6$ .
|
| 166 |
+
|
| 167 |
+
Disambiguation experiment. Both H1 and H2 compute $w(C_S^{\ell_T})$ but in different ways. In H1 one decoding circuit per output language is required in order to compute the expression for the concept $C_S$ in language $\ell_T$ . In contrast, in H2 one translation circuit per input-output language pair is required to map the entangled $C_S^{\ell_S^{(\mathrm{in})}}$ to $C_S^{\ell_T^{(\mathrm{out})}}$ . Therefore, in order to disambiguate the two, we construct a patching experiment that should work under H1, but fail under H2.
|
| 168 |
+
|
| 169 |
+
In order to do so, instead of patching the latent containing $C_S^{\ell_{S}^{(\mathrm{in})}}$ from a single source forward pass, we create multiple source prompts with the same concept $C_S$ but in different input languages $\ell_{S_1}^{(\mathrm{in})} \neq \ldots \neq \ell_{S_k}^{(\mathrm{in})}$ and output languages $\ell_{S_1}^{(\mathrm{out})} \neq \ldots \neq \ell_{S_k}^{(\mathrm{out})}$ and patch by setting
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
h _ {\rho_ {T}} ^ {(\alpha)} (T) = \frac {1}{k} \sum_ {i = 1} ^ {k} h _ {- 1} ^ {(\alpha)} (S _ {i}),
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
for $\alpha \in j,\ldots ,m$ . Let $C_i = C_S^{\ell_{S_i}^{(\mathrm{in})}}$ , under H1, taking the mean of several language-specific concept representations should keep the concept information intact, since for all $i$ , $z_{C_i} = z_{C_S}$ :
|
| 176 |
+
|
| 177 |
+
$$
|
| 178 |
+
\frac {1}{k} \sum_ {i = 1} ^ {k} z _ {C _ {i}} = z _ {C _ {S}} + \frac {1}{k} \sum_ {i = 1} ^ {k} z _ {\ell_ {S _ {i}} ^ {(\mathrm {i n})}}.
|
| 179 |
+
$$
|
| 180 |
+
|
| 181 |
+
Therefore, we'd expect high $P(C_{S}^{\ell_{T}})$ in this case. However, under H2, in which $z_{C_i}$ cannot be disentangled, this mean representation may not correspond to a well-defined concept. Additionally, the interference between multiple input languages should cause difficulties for the language-pair-specific translation, which should result in a drop in $P(C_{S}^{\ell_{T}})$ .
|
| 182 |
+
|
| 183 |
+
Results. In the first experiment, we use the same languages as above and in the second one we used DE, NL, ZH, ES, RU as input and IT, FI, ES, RU, KO as output languages for the source prompts and FR to ZH for the target prompt.
|
| 184 |
+
|
| 185 |
+
In Figure 4 we observe that in both experiments, we obtain very high probability for the source concept in the target language $P(C_S^{\mathrm{ZH}})$ from layers 0 to 15, i.e., exactly until the latents at the last token stop attending to the last concept-token.
|
| 186 |
+
|
| 187 |
+
Therefore, Figure 4 (a) supports that we are indeed either in H1 or H2, since as planned we successfully decode source concepts in the target language $P(C_{S}^{\mathrm{ZH}})$ from layers 0 to 15. Conversely, if we were not able to decode source concept in target language in this way this would have spoken against both H1 and H2.
|
| 188 |
+
|
| 189 |
+
Additionally, Figure 4 (b) supports that we are in H1 and not in H2 because patching in the mean keeps $P(C_{S}^{\mathrm{ZH}})$ intact and even increases it. Therefore, instead of observing interference between the different language-entangled concepts as would have been predicted by H2, we observe a concept-denoising effect by averaging multiple language-agnostic concept representations which only makes sense under H1. Taking the mean over concept representations corresponding to different input languages seems to act like a majority voting mechanism resulting in an increase in $P(C_{S}^{\mathrm{ZH}})$ .<sup>7</sup>
|
| 190 |
+
|
| 191 |
+
Other models. In Appendix D we perform the experiments from Sec. 4 and Sec. 5 on several other models, varying in size, training data and architecture namely, Mistral 7B (Jiang et al., 2023), Llama 3 8B (Dubey et al., 2024), Qwen 1.5 7B (Bai et al., 2023), Llama 2 70B, and Aya 23 8B (Aryabumi et al., 2024) which was specifically trained to be multilingual. We observe the same improvement when we take the mean of a concept across languages for all these models, suggesting that they are all operating under H1 and use some language-agnostic concept representation.
|
| 192 |
+
|
| 193 |
+
# 6 Generating descriptions for latents
|
| 194 |
+
|
| 195 |
+
We just showed that LLMs can effectively translate concept representations averaged across multiple languages, providing evidence for language-agnostic concept representations. In this section,
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
(a) Single source prompt
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
(b) Mean over source prompts
|
| 202 |
+
Figure 4: Here we use different input languages (DE, FR), different concepts, different output languages (IT, ZH) in (a). In (b) we use multiple source input languages DE, NL, ZH, ES, RU and source output languages IT, FI, ES, RU, KO. We patch at the last token of the concept-word at all layers from $j$ to 31. In (a) we patch latents from the single source prompt in (b) we patch the mean of the latents over the source prompts. For each of the plots, the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). The prefix "src" stands for source and "tgt" for target concept. We report means and $95\%$ Gaussian confidence intervals computed over a dataset of size 200.
|
| 203 |
+
|
| 204 |
+
we explore whether these mean representations, which theoretically capture language-independent concepts, can be described by the model in natural language as effectively as concepts expressed in a single language. This approach builds on the definition modeling paradigm (Noraset et al., 2017; Mickus et al., 2022; Chang and Chen, 2019; Gardner et al., 2022), which uses natural language generation as a transparent evaluation of semantic representations.
|
| 205 |
+
|
| 206 |
+
# 6.1 Definition prompt
|
| 207 |
+
|
| 208 |
+
In order to do that, we introduce a new prompt template that tasks the model to describe a concept in natural language. More precisely, given a concept $C$ and a language $\ell$ , we construct a few shot definition prompt $\mathrm{DP}(\ell, C)$ of the form:
|
| 209 |
+
|
| 210 |
+
$$
|
| 211 |
+
\begin{array}{c} \text {` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ``}} \\ \dots \\ \text {` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ``} \\ \text {` * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} \\ \text {` * * * * * * * * * * * * * * * * * * * * * * * * * * * *} \\ \text {` * * * * * * * * * * * * * * * * * * * * *} \\ \text {` . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1} \end{array}
|
| 212 |
+
$$
|
| 213 |
+
|
| 214 |
+
where $C_1^\ell, \ldots, C_n^\ell$ are concepts in language $\ell$ and $D_1^\ell, \ldots, D_n^\ell$ are their descriptions in language $\ell$ . We denote $\mathrm{DP}^{\mathrm{concept}}(\ell, C)$ the prompt template that ends at the last token of $C^\ell$ . For example, $\mathrm{DP}^{\mathrm{concept}}(\mathrm{EN}, \mathrm{ANT})$ could be:
|
| 215 |
+
|
| 216 |
+
$$
|
| 217 |
+
\begin{array}{l} \text {a p p l e "} : \text {F r u i t w i t h r e d o r y e l l o w o r g r e e n s k i n} \\ \dots \\ \text {a n t} \end{array}
|
| 218 |
+
$$
|
| 219 |
+
|
| 220 |
+
For each language, we constructed a definition dataset using the first concept in BabelNet (Navigli et al., 2021) associated with each of the 200 picturable words from the Basic English word list from Wikipedia<sup>8</sup>. For each concept, BabelNet provides several definitions in different languages.
|
| 221 |
+
|
| 222 |
+
# 6.2 Patching setup
|
| 223 |
+
|
| 224 |
+
For languages $\ell_S^1,\ldots ,\ell_S^n$ and $\ell_T$ ,and concepts $C_S\neq C_T$ ,we construct a target prompt $T =$ $\mathrm{DP}(\ell_T,C_T)$ and two sets $S$ of source prompts:
|
| 225 |
+
|
| 226 |
+
From translations: for each language $\ell_S^i$ we pick an input language $\ell_{\mathrm{(in)}}^i$ and choose
|
| 227 |
+
|
| 228 |
+
$$
|
| 229 |
+
\mathcal {S} _ {\text {t r a n s}} = \left\{\mathrm {T P} ^ {\text {c o n c e p t}} \left(\ell_ {(\text {i n})} ^ {i}, \ell_ {S} ^ {i}, C _ {S}\right) \right\} _ {i \in \{1, \dots , n \}}.
|
| 230 |
+
$$
|
| 231 |
+
|
| 232 |
+
From definitions: we choose
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\mathcal {S} _ {\mathrm {d e f}} = \left\{\mathrm {D P} ^ {\text {c o n c e p t}} \left(\ell_ {S} ^ {i}, C _ {S}\right) \right\} _ {i \in \{1, \dots , n \}}.
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
Then, to generate a definition of $C_S$ in language $\ell_T$ , for all layers, we patch the latents of the last token averaged over the source prompts from $S$ to the last token of $C_T$ in the target prompt and let the model generate the definition as depicted in Figure 5. More formally, we patch by setting
|
| 239 |
+
|
| 240 |
+
$$
|
| 241 |
+
h _ {\rho_ {T}} ^ {(j)} (T) = \frac {1}{n} \sum_ {i = 1} ^ {n} h _ {- 1} ^ {(j)} (S _ {i})
|
| 242 |
+
$$
|
| 243 |
+
|
| 244 |
+
for $j \in \{1, \ldots, m\}$ and $\rho_T$ the position of the last token of $C_T$ in the target prompt.
|
| 245 |
+
|
| 246 |
+

|
| 247 |
+
Figure 5: Illustration of the patching setup for the definition prompt experiment. We patch the latents of the last token of the source prompts from $S$ to the last token of $C_T$ in the target prompt.
|
| 248 |
+
|
| 249 |
+
# 6.3 Experiment
|
| 250 |
+
|
| 251 |
+
To compare the quality of the definitions of $C_S$ generated by the model in our experiment, we use the following baselines:
|
| 252 |
+
|
| 253 |
+
- Ground truth: We use a random definition from BabelNet.
|
| 254 |
+
- Prompting: We use the definition generated by the model when prompted with $\mathrm{DP}(\ell_T, C_S)$ .
|
| 255 |
+
- Word patching: We replace $C_T^{\ell_T}$ with $C_S^{\ell_S}$ for a random $j \in \{1, \dots, n\}$ and let the model generate the definition. In this setting, the model is tasked to generate a definition of a word in a language different from the target prompt's language.
|
| 256 |
+
- Repeat word: We use $C_S^{\ell_T}$ as the definition.
|
| 257 |
+
|
| 258 |
+
To evaluate the different definitions, we use the sentence-transformers library (Reimers and Gurevych, 2019) to run paraphrase-multilingual-mpnet-base- $\nu 2^9$ , a semantic similarity model distilled from (Song et al., 2020) using the methods from (Reimers and Gurevych, 2020). To assess the quality of the generated definition, we compute the similarity score between embeddings of the definition and the mean embedding of the ground truth definitions<sup>10</sup>.
|
| 259 |
+
|
| 260 |
+
# 6.4 Results
|
| 261 |
+
|
| 262 |
+
We report the mean similarity score between the definition and the mean embedding of the ground truth definitions for LLama 2 7B in Figure 6. To give an idea of the scale of the similarity scores, we also report the mean similarity between the definition embedding and the embeddings of the definitions of the other concepts in the dataset.
|
| 263 |
+
|
| 264 |
+
We find that patching concept representations from one language to another allows the model to generate high-quality definitions, comparable to or better than direct prompting. The fact that patching mean representations across multiple source languages leads to slightly better results suggests that the model's concept representations are indeed language-agnostic – if they were language-specific, averaging across languages would likely degrade
|
| 265 |
+
|
| 266 |
+

|
| 267 |
+
Figure 6: Mean similarity between the definition and the mean embedding of the ground truth definitions, as well as the mean similarity between the definition embedding and the embeddings of the definitions of the other concepts in the dataset. The results are presented for three target languages: English (with source languages Italian, Finnish, Spanish, Korean, and input languages for source translations: German, Dutch, Chinese, Russian), Chinese (using the same languages), and French (with source languages Korean, Japanese, Estonian, Finnish and English as input language for source translations). We report means and $95\%$ Gaussian confidence intervals computed over a dataset of various sizes<sup>11</sup>.
|
| 268 |
+
|
| 269 |
+
performance. This aligns with our translation experiment findings and adds another perspective on how LLMs process multilingual information.
|
| 270 |
+
|
| 271 |
+
Additionally, the comparable performance between patching from definitions and translations indicates that the model builds similar concept representations regardless of whether it processes a translation or definition prompt. This suggests a unified internal representation of concepts that generalizes across different types of language tasks.
|
| 272 |
+
|
| 273 |
+
Other models. In Appendix D.3 we show that those findings generalize to other models and languages.
|
| 274 |
+
|
| 275 |
+
# 7 Conclusion
|
| 276 |
+
|
| 277 |
+
In this paper, we showed that transformers use language-agnostic latent representations of concepts when processing word-level translation prompts. We achieved this by patching latents between parallel forward passes for translation prompts that differed in both input and output languages, as well as in the specific concepts being translated. Our main finding was that translation performance improves when the transformer is forced to translate a concept representation averaged across multiple languages. This finding speaks for language-agnostic concept representations. As we argued, for language-agnostic concept representations, taking the mean representation of a concept across languages should not impair the LLM's ability to translate this concept. In contrast, for language-specific ones, taking the mean should result in interference between the different language-specific versions of the concept. Thus,
|
| 278 |
+
|
| 279 |
+
our results are consistent with findings from previous work (Wendler et al., 2024) indicating that Llama-2 represents concepts in a concept space independent of the language of the prompt. Our work also provides evidence that findings from BERT models (Conneau et al., 2020b; Pires et al., 2019) generalize to a wide range of decoder-only transformers. Our findings open several important avenues for future research. Understanding these disentangled representations could improve crosslingual transfer learning and reduce the computational costs of multilingual training by leveraging shared concept spaces more efficiently. Moreover, our results provide mechanistic insights into the root causes of Western cultural biases in multilingual LLMs, suggesting that biases may propagate through the shared concept space. We hope these contributions will guide efforts to build more controllable, efficient, and culturally-aware multilingual language models.
|
| 280 |
+
|
| 281 |
+
# Limitations
|
| 282 |
+
|
| 283 |
+
In this work, we studied how transformers represent concepts when processing multilingual text. However, we only considered very simple concepts, maybe some more complex concepts would have shown a different behavior. Also, we did not study language-specific concepts like "Waldeinsamkeit", "The feeling of solitude and connectedness to nature when being alone in the woods". It would be interesting to see how those are represented.
|
| 284 |
+
|
| 285 |
+
Furthermore, more fine-grained probing will be required to determine to which degree transformers are able to specialize a concept to a language and
|
| 286 |
+
|
| 287 |
+
whether concepts and languages are entangled in more subtle ways.
|
| 288 |
+
|
| 289 |
+
# Acknowledgment
|
| 290 |
+
|
| 291 |
+
We would like to thank the team working on NNsight (Fiotto-Kaufman et al., 2024) which is the python package we used to implement all our experiments. We thank Hannes Wendler for multiple fruitful discussions.
|
| 292 |
+
|
| 293 |
+
# References
|
| 294 |
+
|
| 295 |
+
Viraat Aryabumi, John Dang, Dwarak Talupuru, Saurabh Dash, David Cairuz, Hangyu Lin, Bharat Venkitesh, Madeline Smith, Jon Ander Campos, Yi Chern Tan, Kelly Marchisio, Max Bartolo, Sebastian Ruder, Acyr Locatelli, Julia Kreutzer, Nick Frosst, Aidan Gomez, Phil Blunsom, Marzieh Fadaee, Ahmet Üstun, and Sara Hooker. 2024. Aya 23: Open weight releases to further multilingual progress. Preprint, arXiv:2405.15032.
|
| 296 |
+
Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, Binyuan Hui, Luo Ji, Mei Li, Junyang Lin, Runji Lin, Dayiheng Liu, Gao Liu, Chengqiang Lu, Keming Lu, Jianxin Ma, Rui Men, Xingzhang Ren, Xuancheng Ren, Chuanqi Tan, Sinan Tan, Jianhong Tu, Peng Wang, Shijie Wang, Wei Wang, Shengguang Wu, Benfeng Xu, Jin Xu, An Yang, Hao Yang, Jian Yang, Shusheng Yang, Yang Yao, Bowen Yu, Hongyi Yuan, Zheng Yuan, Jianwei Zhang, Xingxuan Zhang, Yichang Zhang, Zhenru Zhang, Chang Zhou, Jingren Zhou, Xiaohuan Zhou, and Tianhang Zhu. 2023. Qwen technical report. Preprint, arXiv:2309.16609.
|
| 297 |
+
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.
|
| 298 |
+
Pengfei Cao, Yuheng Chen, Zhuoran Jin, Yubo Chen, Kang Liu, and Jun Zhao. 2024. One mind, many tongues: A deep dive into language-agnostic knowledge neurons in large language models. arXiv preprint arXiv:2411.17401.
|
| 299 |
+
Ting-Yun Chang and Yun-Nung Chen. 2019. What does this word mean? explaining contextualized embeddings with natural language definition. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 6064-6070.
|
| 300 |
+
Haozhe Chen, Carl Vondrick, and Chengzhi Mao. 2024a. Selfie: Self-interpretation of large language model embeddings. arXiv preprint arXiv:2403.10949.
|
| 301 |
+
|
| 302 |
+
Yuheng Chen, Pengfei Cao, Yubo Chen, Kang Liu, and Jun Zhao. 2024b. Journey to the center of the knowledge neurons: Discoveries of language-independent knowledge neurons and degenerate knowledge neurons. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 17817-17825.
|
| 303 |
+
Ethan A. Chi, John Hewitt, and Christopher D. Manning. 2020. Finding universal grammatical relations in multilingual bert. Preprint, arXiv:2005.04511.
|
| 304 |
+
Nadezhda Chirkova and Vassilina Nikoulina. 2024. Zero-shot cross-lingual transfer in instruction tuning of large language models. arXiv preprint arXiv:2402.14778.
|
| 305 |
+
Rochelle Choenni and Ekaterina Shutova. 2020. What does it mean to be language-agnostic? probing multilingual sentence encoders for typological properties. arXiv preprint arXiv:2009.12862.
|
| 306 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishray Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020a. Unsupervised cross-lingual representation learning at scale. Preprint, arXiv:1911.02116.
|
| 307 |
+
Alexis Conneau, Shijie Wu, Haoran Li, Luke Zettlemoyer, and Veselin Stoyanov. 2020b. Emerging cross-lingual structure in pretrained language models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6022–6034.
|
| 308 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. Preprint, arXiv:1810.04805.
|
| 309 |
+
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.
|
| 310 |
+
Constanza Fierro, Negar Foroutan, Desmond Elliott, and Anders Søgaard. 2025. How do multilingual language models remember facts? arXiv preprint arXiv:2410.14387.
|
| 311 |
+
Jaden Fiotto-Kaufman, Alexander R Loftus, Eric Todd, Jannik Brinkmann, Caden Juang, Koyena Pal, Can Rager, Aaron Mueller, Samuel Marks, Arnab Sen Sharma, et al. 2024. Nnsight and ndif: Democratizing access to foundation model internals. arXiv preprint arXiv:2407.14561.
|
| 312 |
+
Noah Gardner, Hafiz Khan, and Chih-Cheng Hung. 2022. Definition modeling: literature review and dataset analysis. Applied Computing and Intelligence, 2(1):83-98.
|
| 313 |
+
Atticus Geiger, Zhengxuan Wu, Hanson Lu, Josh Rozner, Elisa Kreiss, Thomas Icard, Noah Goodman, and Christopher Potts. 2022. Inducing causal
|
| 314 |
+
|
| 315 |
+
structure for interpretable neural networks. In International Conference on Machine Learning, pages 7324-7338. PMLR.
|
| 316 |
+
Asma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon, and Mor Geva. 2024. Patchscope: A unifying framework for inspecting hidden representations of language models. arXiv preprint arXiv:2401.06102.
|
| 317 |
+
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.
|
| 318 |
+
János Kramár, Tom Lieberum, Rohin Shah, and Neel Nanda. 2024. $\mathrm{Atp^{*}}$ : An efficient and scalable method for localizing llm behaviour to components. arXiv preprint arXiv:2403.00745.
|
| 319 |
+
Xiaochen Li, Zheng Xin Yong, and Stephen Bach. 2024. Preference tuning for toxicity mitigation generalizes across languages. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 13422-13440.
|
| 320 |
+
Jindrich Libovický, Rudolf Rosa, and Alexander Fraser. 2020. On the language neutrality of pretrained multilingual representations. arXiv preprint arXiv:2004.05160.
|
| 321 |
+
Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in gpt. Advances in Neural Information Processing Systems, 35:17359-17372.
|
| 322 |
+
Timothee Mickus, Kees Van Deemter, Mathieu Constant, and Denis Paperno. 2022. Semeval-2022 task 1: Codwoe-comparing dictionaries and word embeddings. arXiv preprint arXiv:2205.13858.
|
| 323 |
+
Basel Mousi, Nadir Durrani, Fahim Dalvi, Majd Hawasly, and Ahmed Abdelali. 2024. Exploring alignment in shared cross-lingual spaces. arXiv preprint arXiv:2405.14535.
|
| 324 |
+
Benjamin Muller, Yanai Elazar, Benoit Sagot, and Djamé Seddah. 2021. First align, then predict: Understanding the cross-lingual ability of multilingual bert. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2214–2231.
|
| 325 |
+
Roberto Navigli, Michele Bevilacqua, Simone Conia, Dario Montagnini, Francesco Ceccconi, et al. 2021. Ten years of babelnet: A survey. In *IJCAI*, pages 4559-4567. International Joint Conferences on Artificial Intelligence Organization.
|
| 326 |
+
Thanapon Noraset, Chen Liang, Larry Birnbaum, and Doug Downey. 2017. Definition modeling: Learning to define word embeddings in natural language. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
|
| 327 |
+
|
| 328 |
+
Nostalgebraist. 2020. Interpreting gpt: The logit lens. LessWrong.
|
| 329 |
+
OpenAI. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.17548.
|
| 330 |
+
Telmo Pires, Eva Schlinger, and Dan Garrette. 2019. How multilingual is multilingual bert? Preprint, arXiv:1906.01502.
|
| 331 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 332 |
+
Nils Reimers and Iryna Gurevych. 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics.
|
| 333 |
+
Nils Reimers and Iryna Gurevych. 2020. Making monolingual sentence embeddings multilingual using knowledge distillation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics.
|
| 334 |
+
Uri Shaham, Jonathan Herzig, Roee Aharoni, Idan Szpektor, Reut Tsarfaty, and Matan Eyal. 2024. Multilingual instruction tuning with just a pinch of multilinguality. arXiv preprint arXiv:2401.01854.
|
| 335 |
+
Freda Shi, Mirac Suzgun, Markus Freitag, Xuezhi Wang, Suraj Srivats, Soroush Vosoughi, Hyung Won Chung, Yi Tay, Sebastian Ruder, Denny Zhou, Dipanjan Das, and Jason Wei. 2022. Language models are multilingual chain-of-thought reasoners. Preprint, arXiv:2210.03057.
|
| 336 |
+
Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and TieYan Liu. 2020. Mpnet: Masked and permuted pre-training for language understanding. Preprint, arXiv:2004.09297.
|
| 337 |
+
Karolina Stanczak, Edoardo Ponti, Lucas Torroba Hennigen, Ryan Cotterell, and Isabelle Augenstein. 2022. Same neurons, different languages: Probing morphosyntax in multilingual pre-trained models. arXiv preprint arXiv:2205.02023.
|
| 338 |
+
Tianyi Tang, Wenyang Luo, Haoyang Huang, Dongdong Zhang, Xiaolei Wang, Xin Zhao, Furu Wei, and Ji-Rong Wen. 2024. Language-specific neurons: The key to multilingual capabilities in large language models. arXiv preprint arXiv:2402.16438.
|
| 339 |
+
Gemma Team, Morgane Riviere, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhupatiraju, Léonard Hussenot, Thomas Mesnard, Bobak Shahriari, Alexandre Ramé, 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,
|
| 340 |
+
|
| 341 |
+
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 Eltyshev, 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, 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, Min suk 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 McCarthy Sarah Cogan 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 RaoMinh Giang Ludovic Peran Tris Warkentin Eli CollinsJoelle BarralZoubin Ghahramani Raia HadsellD.SculleyJeanine BanksAnca 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. Preprint arXiv:2408.00118.
|
| 342 |
+
|
| 343 |
+
Eric Todd, Millicent L Li, Arnab Sen Sharma, Aaron Mueller, Byron C Wallace, and David Bau. 2023. Function vectors in large language models. arXiv preprint arXiv:2310.15213.
|
| 344 |
+
|
| 345 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Al
|
| 346 |
+
|
| 347 |
+
bert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 348 |
+
|
| 349 |
+
Alexandre Variengien and Eric Winsor. 2023. Look before you leap: A universal emergent decomposition of retrieval tasks in language models. arXiv preprint arXiv:2312.10091.
|
| 350 |
+
|
| 351 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
|
| 352 |
+
|
| 353 |
+
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. 2024. Do llamas work in english? on the latent language of multilingual transformers. arXiv preprint arXiv:2402.10588.
|
| 354 |
+
|
| 355 |
+
Zhaofeng Wu, Xinyan Velocity Yu, Dani Yogatama, Ji-asen Lu, and Yoon Kim. 2024. The semantic hub hypothesis: Language models share semantic representations across languages and modalities. Preprint, arXiv:2411.04986.
|
| 356 |
+
|
| 357 |
+
Zhihui Xie, Handong Zhao, Tong Yu, and Shuai Li. 2022. Discovering low-rank subspaces for language-agnostic multilingual representations. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 5617-5633, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 358 |
+
|
| 359 |
+
Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2021. mt5: A massively multilingual pre-trained text-to-text transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics.
|
| 360 |
+
|
| 361 |
+
Hongchuan Zeng, Senyu Han, Lu Chen, and Kai Yu. 2024. Converging to a lingua franca: Evolution of linguistic regions and semantics alignment in multilingual large language models. *Preprint*, arXiv:2410.11718.
|
| 362 |
+
|
| 363 |
+
# A Patchscope experiment
|
| 364 |
+
|
| 365 |
+
We performed an additional experiment using the patchscope lens (Ghandeharioun et al., 2024) to collect more evidence about from which layer it is possible to decode the source concept in Figure 7. The results of this experiment corroborate the findings presented in Section 4. To enable a convenient comparison of the experimental results, we also include Figure 3 in Figure 7.
|
| 366 |
+
|
| 367 |
+

|
| 368 |
+
(a) Activation patching
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
(b) Patchscope lens
|
| 372 |
+
Figure 7: (a) Our first patching experiment with a DE to IT source prompt and a FR to ZH target prompt with different concepts. (b) Our patchscope lens experiment with a DE to IT source prompt and identity target prompt king king\n1135 1135\nhello hello\n? . We patch at the last token respectively. For each of the plots the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). In the legend the prefix "src" stands for source and "tgt" for target concept. The orange dashed line and blue dash-dotted line correspond to the mean accuracy on source and target prompt. We report means and $95\%$ Gaussian confidence intervals computed over 200 source-, target prompt pairs featuring 41 source concepts and 38 target concepts for (a) and 38 prompts for (b).
|
| 373 |
+
|
| 374 |
+
# B Translation Pair Construction
|
| 375 |
+
|
| 376 |
+
To ensure reproducibility of our experiments, we provide the pseudocode for constructing translation pairs used in our activation patching experiments. The complete implementation is available in our codebase at notebooks/obj_batchTranslation.ipynb.
|
| 377 |
+
|
| 378 |
+
# Key constraints:
|
| 379 |
+
|
| 380 |
+
- Different concepts: We ensure that source and target words represent different concepts to enable meaningful patching experiments.
|
| 381 |
+
- No token collisions: As described in Section 3, we track sets of tokens $w(C^{\ell})$ for each concept-language pair. To ensure clean probability measurements, we verify that there is no overlap between the token sets of paired concepts across all languages used in the experiment.
|
| 382 |
+
- Randomization: Pairs are shuffled before selection to avoid systematic biases in concept or language selection.
|
| 383 |
+
|
| 384 |
+
For our experiments, we typically use $n = 200$ pairs, with concepts drawn from the 200 picturable words from the Basic English word list, ensuring
|
| 385 |
+
|
| 386 |
+
# Algorithm 1 Construction of Translation Pairs for Patching Experiments
|
| 387 |
+
|
| 388 |
+
Require: Set of source languages $\mathcal{L}_S$ , target language $\ell_T$ , number of pairs $n$
|
| 389 |
+
|
| 390 |
+
Ensure: Set of valid translation pairs $\mathcal{P}$
|
| 391 |
+
|
| 392 |
+
1: Load BabelNet translations for all languages
|
| 393 |
+
2: $\mathcal{T}_S\gets$ GETTRANSLATIONS $(\mathcal{L}_S)$
|
| 394 |
+
3: $\mathcal{T}_T\gets$ GETTRANSLATIONS( $\ell_T)$
|
| 395 |
+
4: $\mathcal{P}\gets \emptyset$ Initialize valid pairs
|
| 396 |
+
5: $\mathcal{A}\gets \mathrm{COMBINATIONS}(\mathcal{T}_S,\mathcal{T}_T)\triangleright$ All possible pairs
|
| 397 |
+
6: SHUFFLE(A) $\triangleright$ Randomize order
|
| 398 |
+
7: for $(w_{S},w_{T})\in \mathcal{A}$ do
|
| 399 |
+
8: if $\mathrm{concept}(w_S) = \mathrm{concept}(w_T)$ then
|
| 400 |
+
9: continue $\triangleright$ Skip same concepts
|
| 401 |
+
|
| 402 |
+
10: end if
|
| 403 |
+
|
| 404 |
+
11: if HASTOKENCOLLISIONS $(w_{S},w_{T})$ then
|
| 405 |
+
12: continue $\triangleright$ Skip pairs with token overlap
|
| 406 |
+
|
| 407 |
+
13: end if
|
| 408 |
+
|
| 409 |
+
14: $\mathcal{P}\gets \mathcal{P}\cup \{(w_S,w_T)\}$
|
| 410 |
+
15: if $|\mathcal{P}|\geq n$ then
|
| 411 |
+
16: break $\triangleright$ Sufficient pairs collected
|
| 412 |
+
17: end if
|
| 413 |
+
|
| 414 |
+
18: end for
|
| 415 |
+
19: return $\mathcal{P}$
|
| 416 |
+
|
| 417 |
+
sufficient statistical power while maintaining computational feasibility.
|
| 418 |
+
|
| 419 |
+
# C Random prompt task experiment
|
| 420 |
+
|
| 421 |
+
In order to investigate the leftmost part of Figure 7a more deeply, we performed additional experiments in which we explore "random" source prompts instead of translation source prompts.
|
| 422 |
+
|
| 423 |
+
The experimental setting here is similar to the one in Sec. 4, except for the fact that instead of patching in latents from a translation source prompt we patch latents from different "random" source prompts. For the random source prompts, we gradually move away from the prompting template.
|
| 424 |
+
|
| 425 |
+

|
| 426 |
+
(a) Random prompt
|
| 427 |
+
|
| 428 |
+

|
| 429 |
+
(b) Empty prompt
|
| 430 |
+
|
| 431 |
+

|
| 432 |
+
(c) Random prompt with "@" instead of quotation mark
|
| 433 |
+
Figure 8: (a) activation patching experiment with a randomized source prompt (random concepts, and languages, but same template) and a FR to ZH target prompt. (b) we construct a source prompt with empty context. (c) we replace the quotation mark with @ in the random source prompt from (a). (d) we randomly shuffle the source prompts from (c). We patch at the last token respectively. For each of the plots, the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). We only plot the target ("tgt") concept, as there is no source concept to predict. We report means and $95\%$ Gaussian confidence intervals computed over 200 source-, target prompt pairs.
|
| 434 |
+
|
| 435 |
+

|
| 436 |
+
(d) Random shuffled prompt (random hidden state)
|
| 437 |
+
|
| 438 |
+
Same template. In Figure 8a, we randomized both input and output language as well as concepts in the source prompts, resulting in prompts of the following form:
|
| 439 |
+
|
| 440 |
+
$$
|
| 441 |
+
\begin{array}{l} A: ^ {\prime \prime} C A T ^ {D E ^ {\prime \prime}} - B: ^ {\prime \prime} D O G ^ {I T ^ {\prime \prime}} \\ A: ^ {\prime \prime} O W L ^ {J A ^ {\prime \prime}} - B: ^ {\prime \prime} S U N ^ {H I ^ {\prime \prime}} \\ A: ^ {\prime \prime} C I E ^ {F R} - B: ^ {\prime \prime} \\ \end{array}
|
| 442 |
+
$$
|
| 443 |
+
|
| 444 |
+
By doing this, the latent of the source prompt is similar in terms of prompt structure, but the model cannot infer a task vector specifying the output language since the source prompt instantiates an impossible task (to predict a random word in a random language). As shown in Figure 8a, for layers 0-11, we observe no drop in the accuracy, which confirms our hypothesis that in those layers the latent at last token position contains no information specific to the translation task.
|
| 445 |
+
|
| 446 |
+
Instead, we think that in our chosen prompting template the last token, which is a quotation mark, merely indicates where to put the translation result. In order to investigate this, we performed further patching experiments investigating how changes in the prompting template in the source prompt affects the target forward pass ability to compute an answer.
|
| 447 |
+
|
| 448 |
+
Empty context. For example, replacing the source prompt with an empty prompt, merely containing B: results in Figure 8b. In contrast to Figure 8a, the target concept in target language probability drops already starting from layer 4. We think this is due to the fact that until layer 4 the quotation mark token information which is shared among the two prompting templates "dominates" the latent representation and is not yet converted to a task specific position marker yet. Then, starting from layer 4 the latent representation of the last token also aggregates task specific information, in particular, the fact that the quotation mark in this task actually marks the position after which the translated word should be decoded. As a result, replacing the task specific quotation mark embedding, which contains the information that the translated word comes next, with the "empty-context"-one, which does not contain this information, results in a performance drop.
|
| 449 |
+
|
| 450 |
+
Modified template. Next, replacing the quotation marks by “@” (Figure 8c) in the random prompt,
|
| 451 |
+
|
| 452 |
+
$$
|
| 453 |
+
A: @ C A T ^ {D E} @ - B: @ D O G ^ {I T} @
|
| 454 |
+
$$
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
\begin{array}{l} i. e., | A: @ O W L ^ {J A} @ - B: @ S U N ^ {H I} @ \\ \mathrm {A}: @ \mathrm {I C E} ^ {\mathrm {F R}} @ - \mathrm {B}: @ \\ \end{array}
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
leads to a drop of performance for early layers, but for layers 5-11, the model is not much affected by the patching. We postulate that at those layers, position-marker tokens have been already mapped
|
| 461 |
+
|
| 462 |
+
to a general position-marker feature that is similar in between source and target forward pass, even though at input level different symbols have been used.
|
| 463 |
+
|
| 464 |
+
Shuffled tokens. Lastly, in Figure 8d we try to destroy all of the shared structure in between the source and the target prompt by randomly shuffling the characters of the source prompts from the modified template task. As expected, the probability of the target concept in target language becomes very low (albeit surprisingly not zero), which shows that the task cannot be solved without the position marker feature.
|
| 465 |
+
|
| 466 |
+
# D Other models and languages
|
| 467 |
+
|
| 468 |
+
In this section, we report results for additional models, namely, Mistral 7B (Jiang et al., 2023), Llama 3 8B (Dubey et al., 2024), Qwen 1.5 7B (Bai et al., 2023) and Llama 2 70B (Touvron et al., 2023). We also include Aya 23 8B (Aryabumi et al., 2024) for the mean patching experiment in App D.2.
|
| 469 |
+
|
| 470 |
+
# D.1 Exploratory analysis
|
| 471 |
+
|
| 472 |
+
The results of the exploratory analysis outlined in Sec. 4 are in Figure 9.
|
| 473 |
+
|
| 474 |
+
As can be seen in Figure 9, the target concept in source language spike is smaller for Llama 3, Mistral 7B v0.3 and Qwen 1.5 7B. This hints that for those models, $z_{\ell(\mathrm{out})}$ and $C$ computation overlap more than for Llama-2-7B.
|
| 475 |
+
|
| 476 |
+
# D.2 Ruling out hypotheses
|
| 477 |
+
|
| 478 |
+
In this section, we report results for the experiments performed in Sec. 5.
|
| 479 |
+
|
| 480 |
+
In addition, instead of just patching in the mean over different language pairs (Figure 11c, 12c), we also patch in the mean over contexts composed of different concept words in Figure 11b, 12b. In particular, we take the mean over 5 different few-shot contexts from the same language pair. E.g.:
|
| 481 |
+
|
| 482 |
+
Deutsch: "Dorf" - Italiano: "villaggio"
|
| 483 |
+
|
| 484 |
+
:
|
| 485 |
+
|
| 486 |
+
Deutsch: "Buch
|
| 487 |
+
|
| 488 |
+
中
|
| 489 |
+
|
| 490 |
+
Deutsch: "Zitrone" - Italiano: "limone"
|
| 491 |
+
|
| 492 |
+
:
|
| 493 |
+
|
| 494 |
+
Deutsch: "Buch
|
| 495 |
+
|
| 496 |
+
Our results in Figure 11 and Figure 12 show that the mean over contexts does not increase $P(C_{S}^{\ell_{T}})$ ,
|
| 497 |
+
|
| 498 |
+
whereas the mean over language pairs does. This is intuitive, since there may be some languages in which the mapping from words to concept features results in the correct concept feature vector. Therefore, averaging over different language pairs can increase the signal about the source concept. However, having additional random contexts stemming from the same language pair does not bring in any information about the source concept.
|
| 499 |
+
|
| 500 |
+
Note that Figure 9, Figure 11 and Figure 12 are on the next two pages.
|
| 501 |
+
|
| 502 |
+
# D.3 Similarity comparison
|
| 503 |
+
|
| 504 |
+
We experiment with other languages and models in Figure 13 and get the same trends as with our results in Figure 6. We also provide results for another experiment in which instead of measuring embedding similarities, we measure perplexity on ground truth definitions in Figure 14. We did not include this metric in our analysis as it seemed to have less granularity and is more sensitive to the syntax rather than being focused on the semantic.
|
| 505 |
+
|
| 506 |
+

|
| 507 |
+
(a) Mistral-7B v0.3
|
| 508 |
+
|
| 509 |
+

|
| 510 |
+
(b) Llama3-8b
|
| 511 |
+
|
| 512 |
+

|
| 513 |
+
(c) Qwen1.5-7B
|
| 514 |
+
|
| 515 |
+

|
| 516 |
+
(d) Llama2-70B
|
| 517 |
+
Figure 9: Our first patching experiment with a DE to IT source prompt and a FR to ZH target prompt with different concepts. We patch at the last token. For each of the plots the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). In the legend the prefix "src" stands for source and "tgt" for target concept. The orange dashed line and blue dash-dotted line correspond to the mean accuracy on source and target prompt. We report means and $95\%$ Gaussian confidence intervals computed over 200 source-, target prompt pairs featuring 41 source concepts and 38 target concepts.
|
| 518 |
+
|
| 519 |
+

|
| 520 |
+
|
| 521 |
+

|
| 522 |
+
|
| 523 |
+

|
| 524 |
+
Figure 10: Mean patching experiment replicated on multiple languages with 200 pairs each and $95\%$ confidence interval.
|
| 525 |
+
|
| 526 |
+

|
| 527 |
+
|
| 528 |
+

|
| 529 |
+
(a) Single source setup
|
| 530 |
+
|
| 531 |
+

|
| 532 |
+
(b) Mean over contexts
|
| 533 |
+
|
| 534 |
+

|
| 535 |
+
(c) Mean over language pairs
|
| 536 |
+
|
| 537 |
+

|
| 538 |
+
|
| 539 |
+

|
| 540 |
+
Llama-2 7B
|
| 541 |
+
|
| 542 |
+

|
| 543 |
+
|
| 544 |
+

|
| 545 |
+
Figure 11: Here we use different input languages (DE, FR), different concepts, different output languages (IT, ZH) in (a). In (b) we use the same source and target language pairs as in (a). In (c) we use multiple source input languages DE, NL, ZH, ES, RU and output languages IT, FI, ES, RU, KO. We patch at the last token of the concept-word at all layers from $j$ to 31. In (a) we patch latents from the single source prompt. In (b) for each concept, we patch the average latent over different few-shot DE to IT translation contexts. In (c) we patch the mean of the latents over the source prompts. For each of the plots, the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). The prefix "src" stands for source and "tgt" for target concept. We report means and 95% Gaussian confidence intervals computed over a dataset of size 200.
|
| 546 |
+
|
| 547 |
+

|
| 548 |
+
Llama-3 8B
|
| 549 |
+
LLama-2 70B
|
| 550 |
+
|
| 551 |
+

|
| 552 |
+
|
| 553 |
+

|
| 554 |
+
|
| 555 |
+

|
| 556 |
+
Mistral 7B v0.3
|
| 557 |
+
|
| 558 |
+

|
| 559 |
+
|
| 560 |
+

|
| 561 |
+
|
| 562 |
+

|
| 563 |
+
Aya 23 8B
|
| 564 |
+
|
| 565 |
+

|
| 566 |
+
|
| 567 |
+

|
| 568 |
+
Figure 12: Here we use different input languages (DE, FR), different concepts, different output languages (IT, ZH) in (a). In (b) we use the same source and target language pairs as in (a). In (c) we use multiple source input languages DE, NL, ZH, ES, RU and output languages IT, FI, ES, RU, KO. We patch at the last token of the concept-word at all layers from $j$ to 31. In (a) we patch latents from the single source prompt. In (b) for each concept, we patch the average latent over different few-shot DE to IT translation contexts. In (c) we patch the mean of the latents over the source prompts. For each of the plots, the x-axis shows at which layer the patching was performed during the forward pass on the target prompt and the y-axis shows the probability of predicting the correct concept in language $\ell$ (see legend). The prefix "src" stands for source and "tgt" for target concept. We report means and 95% Gaussian confidence intervals computed over a dataset of size 200.
|
| 569 |
+
|
| 570 |
+

|
| 571 |
+
Gemma 2B
|
| 572 |
+
|
| 573 |
+

|
| 574 |
+
|
| 575 |
+

|
| 576 |
+
|
| 577 |
+

|
| 578 |
+
|
| 579 |
+

|
| 580 |
+
|
| 581 |
+

|
| 582 |
+
|
| 583 |
+

|
| 584 |
+
Figure 13: Mean similarity between the definition and the mean embedding of the ground truth definitions, as well as the mean similarity between the definition embedding and the embeddings of the definitions of the other concepts in the dataset. For Aya, the results are presented for three target languages: English (with source languages French and German and input language Spanish), French (with source languages Korean, Japanese, Estonian, Finnish and input language English), and Chinese (with source languages Italian, Finnish, Spanish, Russian, Korean and input languages German, Dutch, Chinese, Spanish, Russian). For Gemma, we show English (with source languages Italian, Finnish, Spanish, Russian, Korean and input languages German, Dutch, Chinese, Spanish, Russian), French (with source languages Spanish, German and input language Italian), and Estonian (with source languages English, French, Chinese, German and input language Hindi). We report means and $95\%$ Gaussian confidence intervals computed over the dataset.
|
| 585 |
+
|
| 586 |
+

|
| 587 |
+
(a) Aya 23 8B
|
| 588 |
+
|
| 589 |
+

|
| 590 |
+
(b) Gemma 2 2B
|
| 591 |
+
|
| 592 |
+

|
| 593 |
+
|
| 594 |
+

|
| 595 |
+
Figure 14: Mean loss on the ground truth definitions. We report $95\%$ confidence intervals.
|
| 596 |
+
|
| 597 |
+

|
| 598 |
+
|
| 599 |
+

|
| 600 |
+
|
| 601 |
+

|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cbb28d76ec9aef82e5778a46e070b39d3ab68903aba7cc89d3527ea20d4729bd
|
| 3 |
+
size 1038932
|
2025/Separating Tongue from Thought_ Activation Patching Reveals Language-Agnostic Concept Representations in Transformers/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/7576d048-0071-44c9-95e0-e24d5d501f3a_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dae0569bfc36dc5e96fa71ee7fb56ade52d0bc1c7b1d5586d6ac10c16b77e5d9
|
| 3 |
+
size 5539480
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/full.md
ADDED
|
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Serial Lifelong Editing via Mixture of Knowledge Experts
|
| 2 |
+
|
| 3 |
+
Yu-Ju Cheng $^{1}$ , Yu-Chu Yu $^{1}$ , Kai-Po Chang $^{1}$ , Yu-Chiang Frank Wang $^{1,2}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ National Taiwan University $^{2}$ NVIDIA
|
| 6 |
+
|
| 7 |
+
{b10901009, r09922104, f11942093}@ntu.edu.tw, frankwang@nvidia.com
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
It is challenging to update Large language models (LLMs) since real-world knowledge evolves. While existing Lifelong Knowledge Editing (LKE) methods efficiently update sequentially incoming edits, they often struggle to precisely overwrite the outdated knowledge with the latest one, resulting in conflicts that hinder LLMs from determining the correct answer. To address this Serial Lifelong Knowledge Editing (sLKE) problem, we propose a novel Mixture-of-Knowledge-Experts scheme with an Activation-guided Routing Mechanism (ARM), which assigns specialized experts to store domain-specific knowledge and ensures that each update completely overwrites old information with the latest data. Furthermore, we introduce a novel sLKE benchmark where answers to the same concept are updated repeatedly, to assess the ability of editing methods to refresh knowledge accurately. Experimental results on both LKE and sLKE benchmarks show that our ARM performs favorably against SOTA knowledge editing methods.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Large language models (OpenAI, 2023; Touvron et al., 2023a,b) (LLMs) have demonstrated remarkable capabilities by leveraging the vast amount of knowledge acquired during large-scale pretraining. However, real-world knowledge is ever-changing (Yao et al., 2023), as a single fact often undergoes multiple and sequential updates over time. This causes these models to become outdated over time. For example, as shown in Fig. 1, the answer to the question: "Which team is the NBA champion this year?" changes for each season, from Lakers in 2020 to Celtics in 2024. To benchmark this scenario, we introduce serial Knowledge Lifelong Editing (sLKE), which focuses on sequentially updating answers to the same question. In contrast to the classic LKE setting explored by recent knowledge editing works (Huang et al., 2023;
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Compared to existing lifelong knowledge editing (LKE) works, our ARM enables serial lifelong knowledge editing (sLKE), allowing the edited model to respond with the correct up-to-date answers.
|
| 19 |
+
|
| 20 |
+
Hartvigsen et al., 2023; Wang et al., 2024), sLKE tackles the challenge of updating a single fact repeatedly over time, reflecting the more challenging scenario faced in real-world applications.
|
| 21 |
+
|
| 22 |
+
Previously, works on Knowledge Editing (KE) generally utilize batch-mode editing, where multiple concepts inside LLMs are simultaneously updated via a single edit. They either employ hypernetworks with meta-learning techniques (Vilalta and Drissi, 2002; Hospedales et al., 2022), or adopt locate-edit paradigms (Fang et al., 2024; Meng et al., 2023, 2022). However, such editing schemes tend to overfit on the latest batch of edits and struggle to generalize across a sequence of edits (Wang and Li, 2024; Tirumala et al., 2022).
|
| 23 |
+
|
| 24 |
+
To handle the scenario where each edit arrives sequentially, research works on Lifelong Knowledge Editing (LKE) have been proposed, which mainly leverage external memories to store edited concepts without modifying the original model parameters. For example, WISE (Wang et al., 2024) employs a Mixture-of-Experts (MoE) architecture by using
|
| 25 |
+
|
| 26 |
+
several side memories as experts to handle sequentially arriving edits and employs a routing mechanism to determine which expert to consult for a given query. Although WISE is capable of storing approximately thousands of edits, similar knowledge edits might be assigned to different memories, resulting in possible inference ambiguity (as illustrated in Fig. 2). Therefore, the above method cannot be easily extended to sLKE.
|
| 27 |
+
|
| 28 |
+
To tackle the problem of serial Lifelong Knowledge Editing, we propose a novel learning scheme of Mixture-of-Knowledge-Experts (MoKE), where each knowledge expert is dedicated to certain concepts. Moreover, we present an Activation-guided Routing Mechanism (ARM) to specialize experts during sLKE training and inference. Specifically, we design an expert selection function that dynamically guides the router during training, ensuring that each incoming edit is assigned to the appropriate domain-specific expert. This strategy effectively mitigates expert ambiguity. Moreover, recognizing the absence of benchmarks for sLKE, we build the first benchmark to systematically test the effectiveness of editing methods to perform sLKE. Additionally, to reduce the memory increased usage brought by using multiple experts to memorize domain-specific knowledge, we integrate the model compression techniques (Duan et al., 2021; Stoica et al., 2024; Li et al., 2023a; Huang et al., 2024) that consolidate multiple experts into a single model. We summarize our contributions as follows:
|
| 29 |
+
|
| 30 |
+
- We introduce a practical setting for lifelong LLM editing, Serial Lifelong Knowledge Editing (sLKE), with a benchmark presented to assess the proposed learning scheme.
|
| 31 |
+
- We propose a learning scheme of Mixture-of-Knowledge-Experts (MoKE) with an Activation-guided Routing Mechanism (ARM), which enables memory-based experts to retain specialized knowledge and alleviates possible inference ambiguity.
|
| 32 |
+
- With a novel benchmark collected, we verify that our proposed framework performs favorably for both LKE and sLKE.
|
| 33 |
+
|
| 34 |
+
# 2 Related Work
|
| 35 |
+
|
| 36 |
+
# 2.1 Knowledge Editing
|
| 37 |
+
|
| 38 |
+
The goal of KE is to edit multiple facts within the model via a single edit. Their methods either employ hypernetworks (Yao et al., 2023; Zhang et al.,
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 2: Ambiguity of Mixture-of-Experts in LKE. Without identifying proper experts for KE, output conflicts might be observed in lifelong settings.
|
| 42 |
+
|
| 43 |
+
2024b), or adopt the locate-and-edit paradigm to perform model editing. As the pioneering work for batch editing, MEND (Mitchell et al., 2022a) introduces the idea of using a hypernetwork which takes the gradients of LLM as input to generate the weight updates (Yao et al., 2023; Zhang et al., 2024b). MALMEN (Tan et al., 2023) further refined MEND by decomposing the gradient descent process, and thus reducing memory consumption. However, HyperNetwork-based methods suffer from overfitting (Tirumala et al., 2022) to the current batch, due to the extensive weight modifications. To address this issue, locate-edit methods have been proposed. These methods first specify the critical part of region parameters, and then they focus on making precise, localized modifications to model weights. For instance, ROME (Meng et al., 2022) employs a two-phase causal tracing approach to identify which feed-forward layer stores the target knowledge before applying edits at that specific location. MEMIT (Meng et al., 2023) tracks vector state values across layers to pinpoint the most relevant layer for modification. While these methods alleviate overfitting and reduce memory usage, they compromise the non-edited or previously edited knowledge in the sLKE setting.
|
| 44 |
+
|
| 45 |
+
# 2.2 Lifelong Knowledge Editing
|
| 46 |
+
|
| 47 |
+
The research works for LKE focus on a specialized setup of KE, where each edit sequentially arrives for fact updates. Compared to KE, LKE is more practical since outdated knowledge requires timely updates. The LKE methods leverage external memories to store the edited facts without modifying the original model weights. T-patcher (Huang et al., 2023) pioneeringly proposes the LKE setup and appends several neurons for learning edits. GRACE (Hartvigsen et al., 2023) utilizes a key-
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 3: Overview of our framework (a) Deployment of MoKE with ARM for sLKE, and (b) Initialization and learning of knowledge experts for MoKE. Note that ARM in (a) trains a projection router to ensure that edits on similar concepts are consistently routed to the same knowledge expert. In (b), we apply the memory compression technique in (Huang et al., 2024) to reduce memory usage during inference.
|
| 51 |
+
|
| 52 |
+
value codebook with adapters (Hu et al., 2022) to learn new edits. WISE (Wang et al., 2024) constructs side memories from the original weights to learn new edits and introduce a simple routing mechanism that directs inputs to either the experts or the original weights. LKE methods have also been extended to the visual domain. For instance, prior work (Chen et al., 2025) constructs external memories as expert repositories designed specifically to handle extensive visual representations, enabling lifelong updates of visual knowledge. Nevertheless, such methods generally retain historical answers to the same question in separate memory components. This might lead to queries being directed to outdated experts and, consequently, incorrect outputs.
|
| 53 |
+
|
| 54 |
+
# 3 Methodology
|
| 55 |
+
|
| 56 |
+
# 3.1 Overview
|
| 57 |
+
|
| 58 |
+
Problem formulation. We first define the setting of our proposed Serial Lifelong Knowledge Editing (sLKE). Given a model $f_{\theta}: X \mapsto Y$ parameterized by $\theta$ , mapping an input domain $X$ (e.g., questions) to an output domain $Y$ (e.g., answers). In sLKE, there are $T$ distinct questions, each updated $P$ times $(P > 1)$ , resulting in a total of $N = T \times P$ edits. This is different from the standard LKE, where all $N$ edits are unique (i.e., $x_i \neq x_j, \forall i \neq j$ ).
|
| 59 |
+
|
| 60 |
+
The goal of sLKE is to update an initial model $\theta_0$ via these $N$ sequential edits on the training set $D_{\mathrm{train}} = \{(x_{t,p},y_{t,p})|t = 1,\ldots ,T,p = 1,\ldots ,P\}$ , resulting in a final model $\theta_N$ . The ideal final model
|
| 61 |
+
|
| 62 |
+
$\theta_N^*$ should correctly reflect the most recent update for each question in the in-sample domain $I_{\mathrm{edit}}$ (i.e., inputs semantically equivalent to those in $D_{\mathrm{train}}$ . Formally, for any question $x \in X$ :
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
f _ {\theta_ {N} ^ {*}} \left(x _ {t}\right) = \left\{ \begin{array}{l l} y _ {P}, & \text {i f} x \in I _ {\mathrm {e d i t}}, \\ f _ {\theta_ {0}} (x), & \text {o t h e r w i s e}, \end{array} \right. \tag {1}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $y_{P}$ denotes the answer from the most recent update for $x$ .
|
| 69 |
+
|
| 70 |
+
Preliminary: Mixture-of-Experts for LKE. Mixture-of-Experts (MoE) (Jiang et al., 2024a; Zadouri et al., 2023; Lu et al., 2023; Wu et al., 2024) is adopted in LKE settings (Wang et al., 2024) to handle sequential edits. This strategy enables the model to integrate new edits while preserving its original performance. Specifically, WISE (Wang et al., 2024) identifies a certain edit layer through empirical analysis and initializes a MoE architecture by duplicating the original model weights to create $K$ experts. Each expert is assigned a unique mask with a mask ratio $\rho$ to ensure specialization and diversity among all experts.
|
| 71 |
+
|
| 72 |
+
Since our proposed sLKE setting can be viewed as a generalized version of LKE by handling repeated updates to the same concept, we follow WISE (Wang et al., 2024) and choose to identify the same edit layer (i.e., same MoE architectures considered for fair comparisons).
|
| 73 |
+
|
| 74 |
+
# 3.2 Activation-Guided Routing for Knowledge Expert Specialization
|
| 75 |
+
|
| 76 |
+
In LKE, edits concerning the same concept may occur repeatedly. To alleviate the potential expert am
|
| 77 |
+
|
| 78 |
+
biguity issue, we propose a novel learning scheme of Mixture-of-Knowledge-Experts (MoKE), where each knowledge expert is dedicated to certain concepts. An Activation-guided Routing Mechanism (ARM) is presented to specialize experts during sLKE training and inference.
|
| 79 |
+
|
| 80 |
+
As shown in Fig. 3(a), MoKE leverages external memories as domain-specific knowledge experts to store and update certain concepts. To ensure that each edit can be correctly routed to the appropriate expert, we incorporate an ARM that first identifies the correct knowledge expert, updates its memory, then trains a projection router to memorize the certain routing rules. In the following subsection, we detail how we utilize external memories as different knowledge experts, and how our proposed ARM ensures edits related to similar concepts are routed to the same expert during sLKE.
|
| 81 |
+
|
| 82 |
+
Knowledge expert specialization. To resolve the ambiguity arising from repeated edits to the same concept, we use external memories as specialized knowledge experts, with each knowledge expert responsible for storing specific concepts. The key challenge is to consistently determine which knowledge expert should handle a given input, and ensuring that the outdated knowledge is correctly updated. To address this issue, we propose to leverage the activation function within each knowledge expert as as an indicator of where a specific concept has been stored.
|
| 83 |
+
|
| 84 |
+
Motivated by previous work (Wang et al., 2024), if an input $\mathbf{x_e}$ has been edited and stored in an expert, the activation score tends to be higher. On the other hand, an unrelated input $\mathbf{x_o}$ typically produces a lower activation score. Based on this observation, we define the activation selection score $S_{i}$ for expert $i$ as follows:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
S _ {i} = \frac {\operatorname {A c t} _ {i} \left(\mathbf {x} _ {\mathbf {e}}\right) - \operatorname {A c t} _ {i} \left(\mathbf {x} _ {\mathbf {o}}\right)}{\operatorname {A c t} _ {i} \left(\mathbf {x} _ {\mathbf {e}}\right)}, \tag {2}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $\mathrm{Act}_i(\cdot)$ denotes the value after passing the activation function inside the feed-forward network of the $i$ -th expert.
|
| 91 |
+
|
| 92 |
+
Using the computed activation selection scores for each expert, we identify which expert is most likely to store the edited knowledge for an edit $\mathbf{x_e}$ . However, if an edit is entirely new (i.e., a new concept that has not been fine-tuned), all experts might show low activation scores. In this case, we randomly select one expert to process and store this new information. Thus, the ground-truth expert
|
| 93 |
+
|
| 94 |
+
index gt for a given edit $\mathbf{x}_{\mathrm{e}}$ and an unrelated input $\mathbf{x}_0$ can be determined by the following formulation:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathrm {g t} = \left\{ \begin{array}{l l} \underset {i} {\arg \max } \left(S _ {i}\right), & \text {i f} \underset {i} {\max } \left(S _ {i}\right) > \varepsilon , \\ \operatorname {U n i} (0, K), & \text {o t h e r w i s e .} \end{array} \right. \tag {3}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $\varepsilon$ is a threshold to determine whether a concept is new to all experts.
|
| 101 |
+
|
| 102 |
+
Learning of knowledge experts. Similar to previous memory-based methods (Wang et al., 2024), we adopt a margin-based loss function to fine-tune the selected $i$ -th knowledge expert. Specifically, we first define the $i$ -th expert's specialized score for an input $\mathbf{x}$ as:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\Delta_ {i} (\mathbf {x}) = \left| \left| W _ {i} (\mathbf {x}) - W _ {\text {o r g}} (\mathbf {x}) \right| \right| _ {2}, \tag {4}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $W_{i}(\cdot)$ denotes the output of the $i - th$ expert, and $W_{\mathrm{org}}(\cdot)$ denotes the original model's output.
|
| 109 |
+
|
| 110 |
+
Given an edited input $\mathbf{x}_{\mathrm{e}}$ and an unrelated input $\mathbf{x_o}$ , the margin-based loss function $L_{\mathrm{mar}}$ (Wang et al., 2024) enforces that the specialized score for $\mathbf{x}_{\mathrm{e}}$ exceeds that for $\mathbf{x_o}$ by a certain margin, as defined below:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\begin{array}{l} L _ {\operatorname {m a r}} = \max \left(0, \beta - \Delta_ {i} (\mathbf {x} _ {\mathbf {e}})\right) \\ + \max \left(0, \Delta_ {i} \left(\mathbf {x} _ {\mathbf {o}}\right) - \alpha\right) \tag {5} \\ + \max \left(0, \gamma - \left[ \Delta_ {i} \left(\mathbf {x} _ {\mathbf {e}}\right) - \Delta_ {i} \left(\mathbf {x} _ {\mathbf {o}}\right) \right]\right), \\ \end{array}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
where $\alpha, \beta, \gamma$ are hyperparameters that control the margins for the respective terms.
|
| 117 |
+
|
| 118 |
+
Inspired by classic replay-based continual learning methods (Rolnick et al., 2019), we further introduce a memory loss $L_{\mathrm{mem}}$ to ensure that for any previously edited input $\mathbf{x}_{\mathbf{m}}$ stored in a different expert $j$ , its specialized score should exceeds that of expert $i$ by a margin $\gamma$ , as defined below:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
L _ {\mathrm {m e m}} = \max \left(0, \gamma - \left[ \Delta_ {j} \left(\mathbf {x} _ {\mathbf {m}}\right) - \Delta_ {i} \left(\mathbf {x} _ {\mathbf {m}}\right) \right]\right). \tag {6}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
The overall loss function used to fine-tune the selected $i$ -th expert is the sum of the margin and the memory loss $L = L_{\mathrm{max}} + L_{\mathrm{mem}}$ .
|
| 125 |
+
|
| 126 |
+
Projection router training. After determining the selected expert index gt through Eq. (3), we train a projection router $f_{\theta_p}: X \mapsto [0,1]^K$ (parameterized by $\theta_p$ ) to act as a classifier that consistently assigns each input edit $\mathbf{x_e}$ to its corresponding expert index gt. This mechanism ensures that edits related to the same concept are always routed
|
| 127 |
+
|
| 128 |
+
to the same expert, enhancing the robustness of our method against repeated updated knowledge in SLE. Specifically, we train the projection router through the standard cross entropy loss (CE):
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
L _ {p} = \operatorname {C E} \left(f _ {\theta_ {p}} \left(\mathbf {x} _ {\mathbf {e}}\right), \mathrm {g t}\right). \tag {7}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
# 3.3 Inference Phase
|
| 135 |
+
|
| 136 |
+
Expert memory compression. As noted in (Wang et al., 2024), MoE-based algorithms suffer from high memory usage when the number of experts increases. To mitigate this issue, we employ EMR Merging (Huang et al., 2024), a tuning-free model merging algorithm that reduces memory consumption during inference, as depicted in Fig. 3(b). This method consolidates $K$ expert weights into a single unified weight along with $K$ boolean masks, thereby decreasing memory usage while also retaining performance. We leave the implementation details of EMR Merging algorithm into appendix, and further analyzes in Sec. 4.4.
|
| 137 |
+
|
| 138 |
+
Inference routing. After compressing the memory usage, we use the trained projection router to identify which expert contains the updated knowledge for a given input question $\mathbf{x}$ . Specifically, we determine the routed expert index as:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\ell = \arg \max \left(f _ {\theta_ {p}} (\mathbf {x})\right). \tag {8}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
If a question is entirely new (i.e., the knowledge has never been updated), the activation selection scores across all experts will be below a certain threshold. In this case, we route the question to the original model weights $W_{\mathrm{org}}$ . The final memory weight $W_{\mathrm{final}}$ is selected as follows:
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
W _ {\text {f i n a l}} = \left\{ \begin{array}{l l} W _ {\text {o r g}}, & \text {i f} \max _ {i} \left(\Delta_ {i}\right) < \beta^ {\prime}, \\ W _ {\ell}, & \text {o t h e r w i s e}, \end{array} \right. \tag {9}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
where $\beta^{\prime}$ is a hyper-parameter that determines whether the knowledge has been updated.
|
| 151 |
+
|
| 152 |
+
# 4 Experiment
|
| 153 |
+
|
| 154 |
+
# 4.1 Model and Benchmark
|
| 155 |
+
|
| 156 |
+
Following existing LKE works (Wang et al., 2024; Mitchell et al., 2022b; Hartvigsen et al., 2023), we select Llama2-7B (Touvron et al., 2023b,a) as our backbone model. During training, each edit sample includes edits $x_{e}$ , rephrased edits $x_{e'}$ , unrelated samples $x_{o}$ , and their corresponding labels $y_{e}$ . The
|
| 157 |
+
|
| 158 |
+
initial model is denoted as $f_{\theta_0}$ , and the post-edited final model, after $n$ edits, is denoted as $f_{\theta_n}$ .
|
| 159 |
+
|
| 160 |
+
To evaluate the LKE setting, we constructed a new LKE dataset based on the existing QA datasets ZsRE (Levy et al., 2017) and Wiki CF (Zhang et al., 2024a). ZsRE is a closed-book factual QA dataset, whereas Wiki CF contains counterfactual QA pairs, making it more suitable for examining the reliability of model editing methods. However, the above datasets only include standard lifelong edit samples, i.e., each question has a single corresponding answer. To address this limitation, we leveraged GPT-4o (OpenAI, 2023; OpenAI and the Co-authors, 2024) to generate 10 plausible alternative answers for each question. We then manually removed any defective or irrelevant answers that were unrelated to the original ones. As a result, each question now has 8 corresponding answers for continual lifelong editing.
|
| 161 |
+
|
| 162 |
+
For ZsRE, the final dataset contains 11,301 different questions sampled from the original training and test sets, resulting in a total LKE edit size of $11,301 \times 8 = 90,408$ . For Wiki CF, the final dataset contains 2,340 different questions sampled from its original training and test sets, leading to a total LKE edit size of $2,340 \times 8 = 18,720$ .
|
| 163 |
+
|
| 164 |
+
# 4.2 Evaluation Metrics
|
| 165 |
+
|
| 166 |
+
Following previous works (Yao et al., 2023; Zhang et al., 2024b), we evaluate $f_{\theta_n}$ using three metrics: Reliability, Generality, and Locality, defined as follows:
|
| 167 |
+
|
| 168 |
+
Reliability (Rel.) calculates answer's average precision for each edit sample $x_{e}^{t}$ , i.e.,
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
\operatorname {R e l}. = \frac {1}{T} \sum_ {t = 1} ^ {T} \mathbb {1} \left(f _ {\theta_ {n}} \left(\mathbf {x} _ {e} ^ {t}\right) = \mathbf {y} _ {e} ^ {t}\right). \tag {10}
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
Generality (Gen.) calculates answer's average precision for paraphrased edit sample $\mathbf{x}_{e'}^t$ by
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\operatorname {G e n}. = \frac {1}{T} \sum_ {t = 1} ^ {T} \mathbb {1} \left(f _ {\theta_ {n}} \left(\mathbf {x} _ {e ^ {\prime}} ^ {t}\right) = \mathbf {y} _ {e} ^ {t}\right). \tag {11}
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
Locality (Loc.) calculates answer's average precision for unrelated sample $\mathbf{x}_{e^j}^t$ by:
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\operatorname {L o c}. = \frac {1}{T} \sum_ {t = 1} ^ {T} \mathbb {1} \left(f _ {\theta_ {n}} \left(\mathbf {x} _ {o} ^ {t}\right) = \mathbf {y} _ {o} ^ {t}\right). \tag {12}
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
For LKE, $T = N$ , where $N$ is the total number of edit samples. For sLKE, with $T$ different questions
|
| 187 |
+
|
| 188 |
+
<table><tr><td rowspan="3">Method</td><td colspan="7">sLKE-ZsRE</td><td colspan="7">sLKE-WiKi-CF</td><td></td></tr><tr><td colspan="4">T=125,N=1000</td><td colspan="3">T=250,N=2000</td><td colspan="4">T=125,N=1000</td><td colspan="3">T=250,N=2000</td><td></td></tr><tr><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td></tr><tr><td>FT</td><td>0.08</td><td>0.04</td><td>0.00</td><td>0.04</td><td>0.07</td><td>0.04</td><td>0.00</td><td>0.04</td><td>0.09</td><td>0.02</td><td>0.01</td><td>0.04</td><td>0.04</td><td>0.02</td><td>0.00</td></tr><tr><td>MEND</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>MALMEN</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>ROME</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.01</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.01</td><td>0.02</td><td>0.01</td><td>0.00</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.01</td></tr><tr><td>MEMIT</td><td>0.02</td><td>0.02</td><td>0.03</td><td>0.02</td><td>0.01</td><td>0.01</td><td>0.01</td><td>0.01</td><td>0.03</td><td>0.02</td><td>0.04</td><td>0.03</td><td>0.01</td><td>0.01</td><td>0.00</td></tr><tr><td>SERAC</td><td>0.07</td><td>0.05</td><td>0.26</td><td>0.13</td><td>0.02</td><td>0.02</td><td>0.11</td><td>0.05</td><td>0.06</td><td>0.05</td><td>0.30</td><td>0.14</td><td>0.02</td><td>0.01</td><td>0.13</td></tr><tr><td>GRACE</td><td>0.01</td><td>0.01</td><td>1.00</td><td>0.34</td><td>0.01</td><td>0.01</td><td>0.98</td><td>0.33</td><td>0.01</td><td>0.01</td><td>1.00</td><td>0.34</td><td>0.01</td><td>0.01</td><td>0.99</td></tr><tr><td>WISE-Merge</td><td>0.68</td><td>0.65</td><td>1.00</td><td>0.77</td><td>0.56</td><td>0.50</td><td>0.99</td><td>0.71</td><td>0.57</td><td>0.54</td><td>1.00</td><td>0.70</td><td>0.52</td><td>0.49</td><td>0.98</td></tr><tr><td>WISE-Retestval</td><td>0.67</td><td>0.62</td><td>1.00</td><td>0.76</td><td>0.63</td><td>0.59</td><td>1.00</td><td>0.74</td><td>0.55</td><td>0.52</td><td>1.00</td><td>0.69</td><td>0.52</td><td>0.49</td><td>0.99</td></tr><tr><td>Ours</td><td>0.85</td><td>0.74</td><td>1.00</td><td>0.86</td><td>0.75</td><td>0.66</td><td>1.00</td><td>0.80</td><td>0.76</td><td>0.66</td><td>1.00</td><td>0.81</td><td>0.70</td><td>0.55</td><td>0.95</td></tr></table>
|
| 189 |
+
|
| 190 |
+
Table 1: Performance comparisons of sLKE on sLKE-ZsRE and sLKE-WiKi-CF datasets. Note that $T$ indicates the number of distinct questions (each question is updated $P = 8$ times, resulting in a total number of $N$ edits.
|
| 191 |
+
|
| 192 |
+
<table><tr><td rowspan="3">Method</td><td colspan="7">ZsRE</td><td colspan="7">WiKi-CF</td><td></td><td></td></tr><tr><td colspan="4">T=1000</td><td colspan="3">T=2000</td><td colspan="4">T=1000</td><td colspan="3">T=2000</td><td></td><td></td></tr><tr><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td></tr><tr><td>FT</td><td>0.14</td><td>0.12</td><td>0.02</td><td>0.09</td><td>0.06</td><td>0.05</td><td>0.02</td><td>0.04</td><td>0.06</td><td>0.03</td><td>0.01</td><td>0.03</td><td>0.05</td><td>0.03</td><td>0.00</td><td>0.03</td></tr><tr><td>MEND</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>MALMEN</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>ROME</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.00</td><td>0.01</td><td>0.02</td><td>0.01</td><td>0.00</td><td>0.01</td><td>0.01</td><td>0.00</td><td>0.00</td><td>0.01</td></tr><tr><td>MEMIT</td><td>0.04</td><td>0.04</td><td>0.02</td><td>0.03</td><td>0.02</td><td>0.02</td><td>0.01</td><td>0.02</td><td>0.04</td><td>0.03</td><td>0.02</td><td>0.03</td><td>0.02</td><td>0.01</td><td>0.01</td><td>0.01</td></tr><tr><td>SERAC</td><td>0.02</td><td>0.02</td><td>0.74</td><td>0.26</td><td>0.02</td><td>0.01</td><td>0.32</td><td>0.11</td><td>0.01</td><td>0.01</td><td>0.44</td><td>0.15</td><td>0.01</td><td>0.01</td><td>0.16</td><td>0.06</td></tr><tr><td>GRACE</td><td>0.98</td><td>0.00</td><td>1.00</td><td>0.66</td><td>0.90</td><td>0.00</td><td>0.97</td><td>0.66</td><td>0.89</td><td>0.01</td><td>0.99</td><td>0.63</td><td>0.80</td><td>0.00</td><td>0.93</td><td>0.57</td></tr><tr><td>WISE-Merge</td><td>0.77</td><td>0.70</td><td>1.00</td><td>0.82</td><td>0.66</td><td>0.63</td><td>1.00</td><td>0.76</td><td>0.54</td><td>0.50</td><td>0.97</td><td>0.67</td><td>0.40</td><td>0.37</td><td>0.92</td><td>0.57</td></tr><tr><td>WISE-Retrieval</td><td>0.81</td><td>0.71</td><td>1.00</td><td>0.84</td><td>0.74</td><td>0.66</td><td>1.00</td><td>0.80</td><td>0.76</td><td>0.68</td><td>1.00</td><td>0.81</td><td>0.66</td><td>0.59</td><td>0.99</td><td>0.73</td></tr><tr><td>Ours</td><td>0.83</td><td>0.74</td><td>1.00</td><td>0.85</td><td>0.76</td><td>0.68</td><td>0.99</td><td>0.81</td><td>0.80</td><td>0.70</td><td>1.00</td><td>0.83</td><td>0.72</td><td>0.62</td><td>0.98</td><td>0.77</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 2: Performance comparisons of standard LKE on ZsRE and WiKi-CF datasets. Note that $T = N$ since each edit is unique in LKE.
|
| 195 |
+
|
| 196 |
+
and $P$ alternative answers for each question, the total number of edits is $N = T \times P$ . We evaluate the last $T$ edits with the associated latest answers.
|
| 197 |
+
|
| 198 |
+
# 4.3 Performance Assessment
|
| 199 |
+
|
| 200 |
+
For LKE in Tab. 2, we follow previous works by setting the maximum number of edits to 1000. For sLKE in Tab. 1, we test 125 different questions, each with 8 alternative answers. The total edit volume is $125 \times 8 = 1000$ , which ensures consistency across both settings.
|
| 201 |
+
|
| 202 |
+
In our experiments, we use instance-based LKE, where the batch size is set to 1. We examine three styles of methods alongside direct finetuning (FT) (Wang et al., 2023). Hypernetwork methods (MEND (Mitchell et al., 2022a), MALMEN (Tan et al., 2023)) and Locate-Edit methods (ROME (Meng et al., 2022), MEMIT (Meng et al., 2023)) demonstrate limited effectiveness for small batch size edits. Among memory-based methods, while not all of them achieve competitive performance, they generally preserve locality better since they reserve original weight.
|
| 203 |
+
|
| 204 |
+
SERAC (Mitchell et al., 2022b) exhibits slightly
|
| 205 |
+
|
| 206 |
+
better performance in locality preservation but is not a feasible solution overall. Furthermore, while GRACE (Hartvigsen et al., 2023) achieves outstanding Rel. and Loc. scores in the standard lifelong edit setting, its performance deteriorates significantly in the LKE setting. GRACE also shows a noticeable deficiency in Gen.. On the other hand, WISE (Wang et al., 2024) performs exceptionally well across all metrics in the standard lifelong edit setting; however, its performance also degrades when applied to our new setting.
|
| 207 |
+
|
| 208 |
+
Our method demonstrates robust performance on both LKE and sLKE tasks. Notably, the improvement in the sLKE setting is particularly significant, as ARM effectively manages repeated concepts within the edit sequence. For the standard LKE setting, our approach also achieves modest performance gains, as the external experts are able to learn and organize well-classified knowledge more efficiently than approaches relying on randomly assigned knowledge (Wang and Li, 2024).
|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
Figure 4: (a) Analysis of the number of experts $K$ and mask ratios for each expert $\rho$ on sLKE-ZsRE. (b) Comparisons of LKE methods (i.e., SERAC (Mitchell et al., 2022b), GRACE (Hartvigsen et al., 2023), WISE (Wang et al., 2024)) with varying expert numbers (i.e., memory consumption) on sLKE-ZsRE. (c) Analysis of the memory compression method (using EMR-Merge (Huang et al., 2024)) on ZsRE and sLKE-ZsRE. Note that Avg Performance is the averaged accuracy of Rel., Gen., and Loc..
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
|
| 217 |
+
<table><tr><td></td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Avg.↑</td></tr><tr><td>Ours</td><td>0.95</td><td>0.85</td><td>1.00</td><td>0.91</td></tr><tr><td>- ARM</td><td>0.83</td><td>0.72</td><td>1.00</td><td>0.85</td></tr><tr><td>- memory loss</td><td>0.90</td><td>0.75</td><td>1.00</td><td>0.88</td></tr><tr><td>- EMR-Merge (+ ties-merge)</td><td>0.87</td><td>0.74</td><td>1.00</td><td>0.87</td></tr></table>
|
| 218 |
+
|
| 219 |
+
Table 3: Ablation study of our method on sLKE-ZsRE $(\mathrm{T} = 125$ and $\mathrm{N} = 1000)$
|
| 220 |
+
|
| 221 |
+
<table><tr><td></td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Route ACC.↑</td></tr><tr><td>Random Selection</td><td>0.88</td><td>0.72</td><td>1.00</td><td>0.89</td></tr><tr><td>Fix Selection</td><td>0.84</td><td>0.70</td><td>1.00</td><td>0.85</td></tr><tr><td>ARM</td><td>0.90</td><td>0.81</td><td>1.00</td><td>0.94</td></tr><tr><td>+ Mem Loss</td><td>0.95</td><td>0.85</td><td>1.00</td><td>0.98</td></tr></table>
|
| 222 |
+
|
| 223 |
+
Table 4: Comparisons of random selection, fixed selection, and ARM for expert specialization on sLKE-ZsRE.
|
| 224 |
+
|
| 225 |
+
# 4.4 Further Analysis and Ablation Studies
|
| 226 |
+
|
| 227 |
+
Memory loss analysis. Memory loss prevents experts from hallucinating that they are the experts for this input. During training, we apply the regulation loss in Eq. (5) to prevent the model from assigning large activation values to unrelated samples. The same idea can be applied to edited samples for other experts. For a certain expert, knowledge from other experts should be regarded as unrelated samples. Hence, we can use the same logic to design memory loss based on regulation loss. In Tab. 3, we observe that memory loss is beneficial for LKE.
|
| 228 |
+
|
| 229 |
+
Training phase routing efficiency test. Training phase routing is the main mechanism how we specialize external memories to experts. As illustrated in Tab. 4, We conduct ablation study for different cases through training, random selection for memories for each question, fixed arrangement that choose experts cyclically and our activation selection. Our routing mechanism gives obvious better result than other cases, meaning training phase routing is beneficial to MoE router (Jiang et al., 2024a; Lu et al., 2023; Liu et al., 2024).
|
| 230 |
+
|
| 231 |
+
Router selection. The activation selection helps the model manage repeated concepts during training and inference, making our method more aligned
|
| 232 |
+
|
| 233 |
+
with sLKE. In practice, activation selection also enhances the performance for LKE since activation score is effective indicator for expert's knowledge. However, as the number of edited concepts increases, the activation selection score becomes neutralized due to the model's decreasing confidence, leading to incorrect routing decisions.
|
| 234 |
+
|
| 235 |
+
In conventional MoE (Zadouri et al., 2023; Lu et al., 2023; Wu et al., 2024), the projection router is the component enabling correct routing for LKE. With assistance of ARM, single projection router for inference can successfully handle sLKE since knowledge is classified throughout training, solving ambiguity of projection router.
|
| 236 |
+
|
| 237 |
+
As indicated in Tab. 5, while single projection router for inference has outperformed current baselines for sLKE, using both projection router and ARM to get ensembled score for experts leads to even better result for LKE and sLKE. The result can be interpreted as a combination of solutions for LKE and sLKE. While projection router is effective for MoE to solve LKE, as manifested in previous works (Jiang et al., 2024a; Zadouri et al., 2023), ARM is inheritedly useful for sLKE since it is designed to classify knowledge for experts.
|
| 238 |
+
|
| 239 |
+
Memory Compression. Fig. 4(b) compares the memory requirements of different LKE methods.
|
| 240 |
+
|
| 241 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">T=1000,N=1000</td><td colspan="3">T=125,N=1000</td></tr><tr><td>Rel.</td><td>Gen.</td><td>Loc.</td><td>Rel.</td><td>Gen.</td><td>Loc.</td></tr><tr><td>WISE-Merge</td><td>0.77</td><td>0.70</td><td>1.00</td><td>0.68</td><td>0.65</td><td>1.00</td></tr><tr><td>Act.</td><td>0.81</td><td>0.70</td><td>1.00</td><td>0.88</td><td>0.75</td><td>1.00</td></tr><tr><td>Proj. Router</td><td>0.83</td><td>0.74</td><td>1.00</td><td>0.85</td><td>0.74</td><td>1.00</td></tr><tr><td>Act.+Router</td><td>0.85</td><td>0.77</td><td>1.00</td><td>0.95</td><td>0.85</td><td>1.00</td></tr></table>
|
| 242 |
+
|
| 243 |
+
Note that SERAC (Mitchell et al., 2022b) employs a large counterfactual model and router for all edits, leading to substantial but constant memory usage, as the counterfactual model dominates resource consumption. GRACE (Hartvigsen et al., 2023) introduces adapters and a codebook to skip redundant edits, but in sLKE, where answers to the same question may change, frequent codebook updates cause memory usage to grow linearly with the number of edits. WISE (Wang et al., 2024) uses side memories and provides two inference strategies: merge, which uses tie-merge (Yadav et al., 2023) and saves memory at the cost of significant performance loss, and retrieval, which preserves performance in LKE but results in linearly increasing memory usage. Our method leverages EMR-Merging (Huang et al., 2024), masking unified experts to reduce interference and closely approximate the original experts. Storing only boolean masks, our approach achieves high memory efficiency.
|
| 244 |
+
|
| 245 |
+
As shown in Fig. 4(b), SERAC maintains high but constant memory usage, GRACE and WISE-Retrieval both increase linearly—with WISE-Retrieval growing faster—while WISE-Merge has low constant memory at the cost of significant performance drop (Tab. 1). Overall, our method provides a strong balance between model performance and resource efficiency.
|
| 246 |
+
|
| 247 |
+
Expert number and mask ratio. In WISE (Wang et al., 2024), the concept of a knowledge anchor (Zheng et al., 2021) is proposed, highlighting that overlap in side memories benefits model performance. However, our philosophy is to specialize each memory. Overlap serves as shared knowledge among memories but is prone to ambiguity, as also mentioned in WISE. Therefore, reducing overlap is preferable in our approach. We evaluate per
|
| 248 |
+
|
| 249 |
+
formance based on different numbers of experts and mask ratios for each expert in Fig. 4. It can be observed that when $K \times \rho > 1$ , the model's performance tends to decline. On the other hand, an extremely low mask ratio prevents the model from learning edit samples effectively. Hence, the optimal parameter setting is $K \times \rho \approx 1$ .
|
| 250 |
+
|
| 251 |
+
Routing Accuracy on sLKE and LKE. In Fig. 5, we evaluate routing accuracy and score for sLKE and LKE using memory-based approaches, including GRACE, WISE, and Ours. The key difference between routing accuracy and the reliability score is that routing accuracy better reflects the routing algorithm behind knowledge editing, whereas the reliability score also assesses the efficiency of edits on model weights. It can be observed that WISE (Wang et al., 2024) and GRACE (Hartvigsen et al., 2023) severely corrupt in sLKE. In contrast, our method outperforms others on both LKE and sLKE since ARM specializes experts, increasing the confidence of both projection router and experts.
|
| 252 |
+
|
| 253 |
+
Training and Inference Efficiency The computational cost of MoE is primarily determined by the number of additional parameters introduced. In Table 6, we list the total number of parameters for each method. Compared to other baseline approaches—such as fine-tuned LLaMA (Touvron et al., 2023a) and WISE (Wang et al., 2024)—our method adds only three expert layers and a projection router during both training and inference. The parameter size of each expert and the projection router is approximately equivalent to a single layer in LLaMA2-7B. Overall, our approach results in less than a $10\%$ increase in computation time relative to baseline methods, while yielding performance improvements exceeding $17\%$ , as listed in Tab. 1.
|
| 254 |
+
|
| 255 |
+
Table 5: Analysis of our routing strategies for ZsRE (left) and sLKE-ZsRE (right). "Act." indicates that directly route to the expert with the highest activation values, while "Act. + Router" is the weighted sum of the activation values and the projection router's prediction. Although "Act. +Router" performs best, we use "Proj. Router" as our inference routing strategy for fair comparisons. Note that all strategies surpass SOTAs.
|
| 256 |
+
|
| 257 |
+
<table><tr><td>Method</td><td>Training</td><td>Inference</td></tr><tr><td>LLaMA2 finetuned</td><td>32 layers</td><td>32 layers</td></tr><tr><td>WISE</td><td>32 layers + 1 expert</td><td>32 layers + 3 experts</td></tr><tr><td>Ours</td><td>32 layers + 3 experts</td><td>32 layers + 3 experts + proj. router</td></tr></table>
|
| 258 |
+
|
| 259 |
+
Table 6: Comparison of model size and architecture in training and inference.
|
| 260 |
+
|
| 261 |
+
# 5 Conclusion
|
| 262 |
+
|
| 263 |
+
We identify a key limitation of lifelong editing for LLM: its limited capability to handle multiple edits of the same concept across time. We refer to this as
|
| 264 |
+
|
| 265 |
+

|
| 266 |
+
Average Performance and Routing Accuracy
|
| 267 |
+
Figure 5: Comparisons of routing acc. and average performances (Rel., Gen., Loc.) for different LKE methods. Note that while WISE and GRACE are not specifically designed for sLKE, our method is preferable for both LKE and sLKE settings.
|
| 268 |
+
|
| 269 |
+
"Serial Lifelong Knowledge Editing" (sLKE) and propose a framework utilizing multiple memory-based knowledge experts. With the proposed routing scheme, we enforce edits of similar concepts to be handled by the same expert. In addition, memory compression for such experts can be further performed, ensuring no extra memory cost is needed when comparing to existing LKE methods. With a novel benchmark corrected for sLKE, our experiments confirm that our proposed method performs favorably against SOTA methods for standard LKE and our challenging sLKE tasks.
|
| 270 |
+
|
| 271 |
+
# 6 Limitation
|
| 272 |
+
|
| 273 |
+
While our method is shown to effectively tackle both LKE and sLKE problems, a number of limitations still exist. One key limitation, illustrated in Fig. 4(a), emerges when the number of edits becomes significantly large. In practice, maintaining scalable memory usage through single-layer editing requires reducing the mask ratio, which can lead to substantial performance degradation due to catastrophic forgetting (Luo et al., 2023).
|
| 274 |
+
|
| 275 |
+
Another limitation involves inefficiency in reasoning tasks. Although ARM effectively captures similarities between questions and maintains overall performance, it struggles to identify complex relationships between concepts, particularly in tasks such as multi-hop knowledge editing (Zhong et al., 2024).
|
| 276 |
+
|
| 277 |
+
Finally, our method does not guarantee straightforward transferability from the language do
|
| 278 |
+
|
| 279 |
+
main to the visual domain. In practice, the visual domain presents greater complexity than textual knowledge, and most current LKE approaches—including ours—are limited to handling purely textual inputs. This highlights an open area for future research on extending knowledge editing techniques to diverse and complex domains.
|
| 280 |
+
|
| 281 |
+
# References
|
| 282 |
+
|
| 283 |
+
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.
|
| 284 |
+
Qizhou Chen, Chengyu Wang, Dakan Wang, Taolin Zhang, Wangyue Li, and Xiaofeng He. 2025. Life-long knowledge editing for vision language models with low-rank mixture-of-experts. Preprint, arXiv:2411.15432.
|
| 285 |
+
Qizhou Chen, Taolin Zhang, Xiaofeng He, Dongyang Li, Chengyu Wang, Longtao Huang, and Hui Xue. 2024. Lifelong knowledge editing for llms with retrieval-augmented continuous prompt learning. *Preprint*, arXiv:2405.03279.
|
| 286 |
+
Zhibin Duan, Hao Zhang, Chaojie Wang, Zhengjue Wang, Bo Chen, and Mingyuan Zhou. 2021. Enslm: Ensemble language model for data diversity by semantic clustering. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL/IJCNLP 2021, (Volume 1: Long Papers), Virtual Event, August 1-6, 2021, pages 2954-2967. Association for Computational Linguistics.
|
| 287 |
+
Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Xiang Wang, Xiangnan He, and Tat seng Chua. 2024. Alphaedit: Null-space constrained knowledge editing for language models. Preprint, arXiv:2410.02355.
|
| 288 |
+
Tom Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim, and Marzyeh Ghassemi. 2023. Aging with grace: Lifelong model editing with discrete key-value adaptors. Advances in Neural Information Processing Systems, 36.
|
| 289 |
+
Timothy Hospedales, Antreas Antoniou, Paul Micaelli, and Amos Storkey. 2022. Meta-learning in neural networks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(9):5149-5169.
|
| 290 |
+
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. Lora: Low-rank adaptation of large language models. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net.
|
| 291 |
+
|
| 292 |
+
Chenyu Huang, Peng Ye, Tao Chen, Tong He, Xiangyu Yue, and Wanli Ouyang. 2024. Emr-merging: Tuning-free high-performance model merging. arXiv preprint arXiv:2405.17461.
|
| 293 |
+
Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, and Zhang Xiong. 2023. Transformer-patcher: One mistake worth one neuron. In The Eleventh International Conference on Learning Representations.
|
| 294 |
+
Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de Las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2024a. Mixtral of experts. CoRR, abs/2401.04088.
|
| 295 |
+
Yuxin Jiang, Yufei Wang, Chuhan Wu, Wanjun Zhong, Xingshan Zeng, Jiahui Gao, Liangyou Li, Xin Jiang, Lifeng Shang, Ruiming Tang, Qun Liu, and Wei Wang. 2024b. Learning to edit: Aligning llms with knowledge editing. Preprint, arXiv:2402.11905.
|
| 296 |
+
Yuxin Jiang, Yufei Wang, Chuhan Wu, Wanjun Zhong, Xingshan Zeng, Jiahui Gao, Liangyou Li, Xin Jiang, Lifeng Shang, Ruiming Tang, Qun Liu, and Wei Wang. 2024c. Learning to edit: Aligning llms with knowledge editing. Preprint, arXiv:2402.11905.
|
| 297 |
+
Diederik Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), San Diego, CA, USA.
|
| 298 |
+
Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. 2017. Zero-shot relation extraction via reading comprehension. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 333-342, Vancouver, Canada. Association for Computational Linguistics.
|
| 299 |
+
Weishi Li, Yong Peng, Miao Zhang, Liang Ding, Han Hu, and Li Shen. 2023a. Deep model fusion: A survey. arXiv preprint arXiv:2309.15698.
|
| 300 |
+
Xiaopeng Li, Shasha Li, Shezheng Song, Jing Yang, Jun Ma, and Jie Yu. 2023b. PMET: precise model editing in a transformer. CoRR, abs/2308.08742.
|
| 301 |
+
Tianlin Liu, Mathieu Blondel, Carlos Riquelme, and Joan Puigcerver. 2024. Routers in vision mixture of experts: An empirical study. Preprint, arXiv:2401.15969.
|
| 302 |
+
Keming Lu, Hongyi Yuan, Runji Lin, Junyang Lin, Zheng Yuan, Chang Zhou, and Jingren Zhou. 2023. Routing to the expert: Efficient reward-guided ensemble of large language models. CoRR, abs/2311.08692.
|
| 303 |
+
|
| 304 |
+
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 arXiv:2308.08747.
|
| 305 |
+
Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in gpt. Advances in Neural Information Processing Systems, 35:17359-17372.
|
| 306 |
+
Kevin Meng, Arnab Sen Sharma, Alex J Andonian, Yonatan Belinkov, and David Bau. 2023. Mass-editing memory in a transformer. In *The Eleventh International Conference on Learning Representations*.
|
| 307 |
+
Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D Manning. 2022a. Fast model editing at scale. In International Conference on Learning Representations.
|
| 308 |
+
Eric Mitchell, Charles Lin, Antoine Bosselut, Christopher D Manning, and Chelsea Finn. 2022b. Memory-based model editing at scale. In International Conference on Machine Learning, pages 15817-15831. PMLR.
|
| 309 |
+
OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.
|
| 310 |
+
OpenAI and the Co-authors. 2024. Gpt-4 technical report. Preprint, arXiv:2303.08774.
|
| 311 |
+
Oded Ovadia, Menachem Brief, Moshik Mishaeli, and Oren Elisha. 2023. Fine-tuning or retrieval? comparing knowledge injection in llms. arXiv preprint arXiv:2312.05934.
|
| 312 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. 2018. Improving language understanding by generative pre-training.
|
| 313 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 314 |
+
David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy P. Lillicrap, and Gregory Wayne. 2019. Experience replay for continual learning. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 348-358.
|
| 315 |
+
Ohad Shamir and Tong Zhang. 2013. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In International conference on machine learning, pages 71-79. PMLR.
|
| 316 |
+
George Stoica, Daniel Bolya, Jakob Brandt Bjorner, Pratik Ramesh, Taylor Hearn, and Judy Hoffman. 2024. Zipit! merging models from different tasks without training. In The Twelfth International Conference on Learning Representations.
|
| 317 |
+
|
| 318 |
+
Chenmien Tan, Ge Zhang, and Jie Fu. 2023. Massive editing for large language model via meta learning. In The Twelfth International Conference on Learning Representations.
|
| 319 |
+
Kushal Tirumala, Aram Markosyan, Luke Zettlemoyer, and Armen Aghajanyan. 2022. Memorization without overfitting: Analyzing the training dynamics of large language models. Advances in Neural Information Processing Systems, 35:38274-38290.
|
| 320 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 321 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 322 |
+
Ricardo Vilalta and Youssef Drissi. 2002. A perspective view and survey of meta-learning. Artificial intelligence review, 18:77-95.
|
| 323 |
+
Peng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu, Yunzhi Yao, Yong Jiang, Pengjun Xie, Fei Huang, and Hua-jun Chen. 2024. Wise: Rethinking the knowledge memory for lifelong model editing of large language models. arXiv preprint arXiv:2405.14768.
|
| 324 |
+
Peng Wang, Ningyu Zhang, Xin Xie, Yunzhi Yao, Bozhong Tian, Mengru Wang, Zekun Xi, Siyuan Cheng, Kangwei Liu, Guozhou Zheng, et al. 2023. EASYedit: An easy-to-use knowledge editing framework for large language models. arXiv preprint arXiv:2308.07269.
|
| 325 |
+
Renzhi Wang and Piji Li. 2024. Lemoe: Advanced mixture of experts adaptor for lifelong model editing of large language models. arXiv preprint arXiv:2406.20030.
|
| 326 |
+
Xun Wu, Shaohan Huang, and Furu Wei. 2024. Mixture of lora experts. CoRR, abs/2404.13628.
|
| 327 |
+
Prateek Yadav, Derek Tam, Leshem Choshen, Colin A Raffel, and Mohit Bansal. 2023. Ties-merging: Resolving interference when merging models. Advances in Neural Information Processing Systems, 36.
|
| 328 |
+
Yunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng, Zhoubo Li, Shumin Deng, Huajun Chen, and Ningyu Zhang. 2023. Editing large language models: Problems, methods, and opportunities. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 10222-10240.
|
| 329 |
+
Ted Zadouri, Ahmet Üstün, Arash Ahmadian, Beyza Ermis, Acyr Locatelli, and Sara Hooker. 2023. Pushing mixture of experts to the limit: Extremely parameter efficient moe for instruction tuning. CoRR, abs/2309.05444.
|
| 330 |
+
|
| 331 |
+
Ningyu Zhang, Yunzhi Yao, Bozhong Tian, Peng Wang, Shumin Deng, Mengru Wang, Zekun Xi, Shengyu Mao, Jintian Zhang, Yuansheng Ni, Siyuan Cheng, Ziwen Xu, Xin Xu, Jia-Chen Gu, Yong Jiang, Pengjun Xie, Fei Huang, Lei Liang, Zhiqiang Zhang, Xiaowei Zhu, Jun Zhou, and Huajun Chen. 2024a. A comprehensive study of knowledge editing for large language models. Preprint, arXiv:2401.01286.
|
| 332 |
+
Ningyu Zhang, Yunzhi Yao, Bozhong Tian, Peng Wang, Shumin Deng, Mengru Wang, Zekun Xi, Shengyu Mao, Jintian Zhang, Yuansheng Ni, et al. 2024b. A comprehensive study of knowledge editing for large language models. arXiv preprint arXiv:2401.01286.
|
| 333 |
+
Xiawu Zheng, Yang Zhang, Sirui Hong, Huixia Li, Lang Tang, Youcheng Xiong, Jin Zhou, Yan Wang, Xiaoshuai Sun, Pengfei Zhu, et al. 2021. Evolving fully automated machine learning via life-long knowledge anchors. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(9):3091-3107.
|
| 334 |
+
Zexuan Zhong, Zhengxuan Wu, Christopher D. Manning, Christopher Potts, and Danqi Chen. 2024. Mquake: Assessing knowledge editing in language models via multi-hop questions. Preprint, arXiv:2305.14795.
|
| 335 |
+
|
| 336 |
+
# A Dateset Details
|
| 337 |
+
|
| 338 |
+
ZsRE. The ZsRE dataset is a context-free factual Question Answering (QA) dataset extensively studied in model editing research. Each record in this dataset includes an editing statement $\mathbf{x}_e$ with target answer $\mathbf{y}_e$ , a paraphrase prompt $\mathbf{x}_{\mathrm{e}}^{\prime}$ , and a locality prompt $\mathbf{x}_0$ . ZsRE consists of 163,196 training examples and 19,086 test examples. We divide the test examples into our train/test set. For standard lifelong editing, we randomly select 1000 samples for our experiments. For continual lifelong editing, we use the same 1000 samples to generate alternative answers for the sLKE benchmark. To generate alternative answers, we use GPT-4o (Radford et al., 2018, 2019; Brown et al., 2020; OpenAI and the Co-authors, 2024) and manually remove unreasonable cases. The generation process is the same for both datasets, ZsRE and Wiki CF.
|
| 339 |
+
|
| 340 |
+
Wiki CF. Since models often fail to capture tail entities, rendering them unsuitable for testing modification edits, Wiki CF (Zhang et al., 2024a) collects triplets involving popular entities, where the topic corresponds to one of the most-viewed pages on Wikipedia. In addition, the Counterfact dataset can evaluate model performance, as it is possible for a model to correctly answer an edit sample before the edit, enabling the dataset to maintain its effectiveness over time.
|
| 341 |
+
|
| 342 |
+
Similar to ZsRE, Wiki CF includes an editing statement $\mathbf{x}_e$ with a target answer $\mathbf{y}_e$ , a paraphrase prompt $\mathbf{x}_{\mathrm{e}}$ , and a locality prompt $\mathbf{x}_{\mathrm{o}}$ . The original dataset contains 1,455 edit samples in the training set and 855 edits in the test set. Each edit has multiple versions of paraphrased answers, such as "Subject Aliasing," which rephrases the subject of an edit sample, and "Relation Specificity," which rephrases the relationship between the subject and object. In our experiments, we use Subject Aliasing for generality testing.
|
| 343 |
+
|
| 344 |
+
Continual Dataset Generation. We use GPT-40 API to generate Continual lifelong dataset. Each PROMPT and GROUND TRUTH are directly from original dataset. It is possible that the outputs include repeated answer even the prompt has the requirement of non-repeating. Hence, we manually remove repeated answer. At last, each question have 8 alternative answers.
|
| 345 |
+
|
| 346 |
+
<table><tr><td>System Prompt</td></tr><tr><td>You are an AI assistant specializing in generating high-quality question-answer datasets. Your task is to create structured QA data by generating a correct answer and multiple plausible alternative answers for a given question.</td></tr><tr><td>Generation Prompt</td></tr><tr><td>Given the sentence: 'PROMPT' and the correct answer: 'GROUND TRUTH', generate ten plausible alternative answers that fit the same format as the correct answer. The alternatives should be distinct, non-repetitive, and contextually relevant while maintaining the same style and structure as the correct answer.</td></tr></table>
|
| 347 |
+
|
| 348 |
+
Figure 6: Prompt to use GPT-4o to generate dataset of sLKE from those of LE
|
| 349 |
+
|
| 350 |
+
# B Training Details
|
| 351 |
+
|
| 352 |
+
# B.1 Hyperparameter
|
| 353 |
+
|
| 354 |
+
For all baselines, we use the code from EasyEdit (Wang et al., 2023) and follow the parameter settings from original works. For all experiments, we follow the principle of instance sequential editing, setting batch size to 1. Experiments are conducted on an NVIDIA V100 GPU, and all results are reproducible on a single GPU within four hours.
|
| 355 |
+
|
| 356 |
+
To ensure a fair comparison, we edit the model by modifying the appropriate layer from the original works for each baseline. All hyperparameters, including the learning rate, optimizer (Kingma and Ba, 2015; Shamir and Zhang, 2013), scheduler, and others, follow the settings from the original works.
|
| 357 |
+
|
| 358 |
+
As for fine-tuning (FT), since there is no original work focused on fine-tuning the model for lifelong editing, we modify only model.layers[21].mlp.down Projekt.weight, which is commonly used in previous works (Meng et al., 2023, 2022; Li et al., 2023b).
|
| 359 |
+
|
| 360 |
+
All hyperparameter settings used in our method are summarized in Table 6. We perform edits on LLaMA2-7B by specifically modifying model.layers[27].mlp.down Projekt.weight, following previous works (Wang et al., 2024, 2023) that have identified the optimal layer for modification through comprehensive ablation studies. Regarding the hyperparameters $\alpha$ , $\beta$ , and $\gamma$ in the loss function, we adopt the values
|
| 361 |
+
|
| 362 |
+
<table><tr><td>Dataset</td><td>Type</td><td>Text</td></tr><tr><td rowspan="3">ZsRE</td><td>xe,ye</td><td>Which continent is Berkner Island in? South America</td></tr><tr><td>xo,yo</td><td>who gets the golden boot if its a tie? shared</td></tr><tr><td>xe',ye'</td><td>On which continent is Berkner Island located? South America</td></tr><tr><td rowspan="3">WiKi CF</td><td>xe,ye</td><td>The name of the country which Goursez Vreizh is associated with is? Italy</td></tr><tr><td>xo,yo</td><td>what is the most current season of the walking dead? The eighth season</td></tr><tr><td>xe',ye'</td><td>The name of the country which Gorsedd of Brittany is associated with is? Italy</td></tr></table>
|
| 363 |
+
|
| 364 |
+
Table 7: An editing dataset example from ZsRE and Wiki CF.
|
| 365 |
+
|
| 366 |
+
<table><tr><td>Hyper-Parameters</td><td>Values</td></tr><tr><td>Optimizer</td><td>SGD</td></tr><tr><td>Experts LR</td><td>1.0</td></tr><tr><td>Project LR</td><td>10-4</td></tr><tr><td>Mask Ratio ρ</td><td>0.3</td></tr><tr><td>α</td><td>5.0</td></tr><tr><td>β</td><td>20.0</td></tr><tr><td>γ</td><td>10.0</td></tr><tr><td>Knowledge Shards k</td><td>3</td></tr></table>
|
| 367 |
+
|
| 368 |
+
Table 8: Ours hyper-parameters during editing and merging.
|
| 369 |
+
|
| 370 |
+
<table><tr><td></td><td>ε=0.25</td><td>ε=0.45</td><td>ε=0.35 (Ours)</td></tr><tr><td>Avg. Accuracy</td><td>0.91</td><td>0.90</td><td>0.91</td></tr></table>
|
| 371 |
+
|
| 372 |
+
Table 9: Ablation of $\varepsilon$ on Avg. Accuracy. of sLKE with $125*8$ edits
|
| 373 |
+
|
| 374 |
+
established in prior literature (Wang et al., 2024, 2023). For the hyperparameter $\epsilon$ , we select a fixed value of 0.35 without further tuning, as its purpose is primarily to distinguish expert-related knowledge from unrelated concepts—a task that generally exhibits low sensitivity to exact threshold values. To further verify the insensitivity to this parameter, we conduct additional experiments with alternative settings (e.g., $\epsilon = 0.25$ and $\epsilon = 0.45$ ). As demonstrated in Tab. 9, MoKE consistently achieves stable and state-of-the-art performance across this range, confirming that our method is robust to variations in the exact choice of $\epsilon$ .
|
| 375 |
+
|
| 376 |
+
To equip model with ability to identify questions relevant to edits, we use random prefix for edit samples, which works as a noise to strengthen models ability to detect relevant concepts. The prefix is generated by giving an beginning to model and generating a sequence of meaningless words. Random prefixes massively increase generality ac
|
| 377 |
+
|
| 378 |
+
curacy for both SLE and LE settings. In addition to random prefix, we add noise to subject of each edits. We randomly choose a process from adding middle words for subject, removing middle words for subjects and adding title for subject. Both random prefix and subject noise are randomly applied, which prevent in-sample overfitting.
|
| 379 |
+
|
| 380 |
+
# B.2 Memory Loss
|
| 381 |
+
|
| 382 |
+
We design memory loss to prevent ambiguity between experts. During the editing process, we first store each edit along with its corresponding expert's index. Then, for each edit, we randomly select one edit from the database that does not belong to the current expert. To maintain low memory usage and preserve the intrinsic meaning of instance-sequential edit, we store at most 50 edits. Once memory reaches this limit, the randomly selected sample for each round is deleted and will not be used again. In this way, we regulate the maximum resource usage and prevent accessing a large number of edits at once, which would diminish the value of instance edits.
|
| 383 |
+
|
| 384 |
+
# C Case Study
|
| 385 |
+
|
| 386 |
+
We investigate which types of questions are most troublesome in SLE. It can be observed that models often produce incorrect outputs for multi-word edit targets, resulting in partial errors in the answers. Typically, the first word is incorrect, while the remaining part of the answer remains correct.
|
| 387 |
+
|
| 388 |
+
# D Detail of Memory Based Methods
|
| 389 |
+
|
| 390 |
+
# D.1 Method Insight
|
| 391 |
+
|
| 392 |
+
SERAC. SERAC is one of the earliest works to propose utilizing external memory to inject knowledge into large models and a router to identify knowledge related to edited samples. The pipeline consists of three main components: edit mem
|
| 393 |
+
|
| 394 |
+
<table><tr><td>Modification</td><td>Text</td></tr><tr><td>Random Prefix 1</td><td>I'm a 4 {Question}</td></tr><tr><td>Random Prefix 2</td><td>Yes, I know it' {Question}</td></tr><tr><td>Random Prefix 3</td><td>Q: 1. What is the {Question}</td></tr><tr><td>Title adding</td><td>The name of the country which Dr. Goursez Vreizh is associated with is?</td></tr><tr><td>Middle word insertion</td><td>The mother tongue of Danielle Parthenia Darrieux is</td></tr><tr><td>Middle word deletion</td><td>Nancy Astor, Viscountess Astor was employed in</td></tr></table>
|
| 395 |
+
|
| 396 |
+
Table 10: Random prefix and subject noise for QA pair.
|
| 397 |
+
|
| 398 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">T=1000</td><td colspan="4">T=125,N=1000</td></tr><tr><td>Rel.</td><td>Gen.</td><td>Loc.</td><td>Avg.</td><td>Rel.</td><td>Gen.</td><td>Loc.</td><td>Avg.</td></tr><tr><td>w/o augmentation</td><td>0.96</td><td>0.03</td><td>1.00</td><td>0.66</td><td>0.96</td><td>0.03</td><td>1.00</td><td>0.66</td></tr><tr><td>with augmentation</td><td>0.64</td><td>0.58</td><td>0.55</td><td>0.59</td><td>0.58</td><td>0.53</td><td>0.47</td><td>0.53</td></tr></table>
|
| 399 |
+
|
| 400 |
+
Table 11: Ablation for the effectiveness of input augmentation
|
| 401 |
+
|
| 402 |
+
ory, a scope classifier, and a counterfactual model. The edit memory stores user-supplied data, which serves as input for the scope classifier. The scope classifier determines whether the current input is related to the edit database. If the input is relevant, it is routed to the counterfactual model to generate the post-edit answer. Otherwise, if it is not relevant to the edit database, the original LLM handles the input.
|
| 403 |
+
|
| 404 |
+
This pipeline effectively preserves the original model weights, ensuring locality when the number of edits is low. However, as the number of edits increases, the system degrades rapidly. The edit memory requires significant storage to maintain, the scope classifier's accuracy decreases as the classification task becomes more challenging with additional edit samples, and a single counterfactual model can handle only hundreds of edits—far from sufficient for the thousands of edits required for lifelong learning.
|
| 405 |
+
|
| 406 |
+
GRACE. GRACE introduces a key-value codebook with a deferral radius to store the correct routing for edits. Each concept is stored as a key-value pair, where the key is the logits from pre-edit layers and the value is the logits from post-edit layers. Inputs with logits values within the deferral radius of a certain key are considered to share the same concept as the key, meaning the adapter does not need to learn this new edit since it is a repetition with the same ground truth answer. In contrast, if the edit target does not align with the key's concept, a new key-value pair is generated, and the adapter must be trained on this new sample.
|
| 407 |
+
|
| 408 |
+
The deferral radius is the most important com
|
| 409 |
+
|
| 410 |
+
ponent for GRACE to maintain editing efficiency. For similar edits with the same ground truth target, the deferral radius for the corresponding key-value pair expands, enhancing the region of this concept. Conversely, the deferral radius decreases to prevent key conflicts.
|
| 411 |
+
|
| 412 |
+
WISE. WISE is the newest memory based method, which enable constant memory usage and maintain great performance on standard lifelong edit. It generates multiple experts from original weight to learn new edit. To reduce memory usage, it leverage ties-merge to compress experts to one. To ensure compression quality, they propose the idea of knowledge anchoring, stating that overlap in side memories is beneficial to model compression since it serves as a intermediate point to transfer knowledge between different memories' subspaces. They also mention the trade-off of knowledge anchor and conflict. Anchoring leads to conflict in some cases, which is unfavorable for expertising model. Hence, we do not adopt anchoring for our experts.
|
| 413 |
+
|
| 414 |
+
For routing, they design rule-base routing mechanism. Correct inference routing can be determined without training additional router.
|
| 415 |
+
|
| 416 |
+
Retrieval Methods. Retrieval methods (Jiang et al., 2024b; Chen et al., 2024; Jiang et al., 2024c) are regarded as a part of memory based methods. Yet, we do not take these methods into consideration since the objective and philosophy are entirely different between memory-based and retrieval methods (Ovadia et al., 2023). Retrieval methods focus on how to retrieve correct data from a large database and how to utilize the data to update models knowledge with in-context learning. Resource usage is not quite important in this case since database can be accessed externally in real-world application
|
| 417 |
+
|
| 418 |
+
<table><tr><td></td><td>Prompt</td><td>Edit Target</td><td>Post-Edit Output</td></tr><tr><td>ia)</td><td>What was the designer of Évry Cathedral's name?</td><td>Gae Aulenti</td><td>illes Aulenti ×</td></tr><tr><td>ib)</td><td>What designer was in charge of Évry Cathedral?</td><td>-</td><td>illes Aulenti ×</td></tr><tr><td>ic)</td><td>Which place does Fukrey exist in?</td><td>Kuala Lumpur</td><td>unala Lumpur ×</td></tr><tr><td>id)</td><td>What is Fukrey's place?</td><td>-</td><td>unala Lumpur ×</td></tr><tr><td>iia)</td><td>Which family does Synsphaeria belong to?</td><td>Lycaenidae</td><td>copenidae ×</td></tr><tr><td>iib)</td><td>What family belongs to Synsphaeria?</td><td>-</td><td>copenidae ×</td></tr><tr><td>iic)</td><td>What is the final year of Atlanta Flames?</td><td>1976</td><td>1989 ×</td></tr><tr><td>iid)</td><td>What year ended with Atlanta Flames?</td><td>-</td><td>1989 ×</td></tr><tr><td>iiiia)</td><td>Of what did Earl Hooker die?</td><td>tuberculosis</td><td>Pneumonia ×</td></tr><tr><td>iiib)</td><td>What was Earl Hooker the cause of death?</td><td>-</td><td>tuberculosis ×</td></tr></table>
|
| 419 |
+
|
| 420 |
+
# D.2 Pitfalls of Serial Lifelong Editing
|
| 421 |
+
|
| 422 |
+
While memory-based methods are well-suited for lifelong editing, we have shown that their performance degrades significantly in the context of sLKE. This issue is particularly evident in methods such as WISE and GRACE, both of which perform exceptionally well for standard lifelong editing.
|
| 423 |
+
|
| 424 |
+
In the case of GRACE, the deficiency arises from the flawed cooperation between the codebook and the adaptor. The codebook mechanism dictates that edit concepts falling within the same region of the deferral radius undergo one of two operations: expansion or contraction. However, in sLKE, the same concept may correspond to different answers over time, causing the radius to continuously shrink. This leads to the generation of multiple key-value pairs for the same concept, resulting in knowledge becoming inconsistent and ambiguous. Consequently, we observe a significant decline in performance for sLKE.
|
| 425 |
+
|
| 426 |
+
In the case of WISE, the deficiency arises from conflict between experts. It adds side memories incrementally. Hence, it is inevitable that side memories have conflicts with each other since edits with similar concept are not conduct at the same time. Consequently, routing accuracy drop down for sLKE.
|
| 427 |
+
|
| 428 |
+
# D.3 Model Compression
|
| 429 |
+
|
| 430 |
+
To reduce memory usage in the inference phase, we apply EMR merging (Huang et al., 2024), which is a tuning-free model merging algorithm. It merges $K$ weights into one unified weight and $K$ boolean masks, which are 1/32 the size of the original weights. This method enables high merging efficiency and retains performance for experts.
|
| 431 |
+
|
| 432 |
+
The process can be divided into three steps: elect,
|
| 433 |
+
|
| 434 |
+
Table 12: Failure cases of our method to edit LLaMA-2-7B. ✗represents errors in part of the answer, Xrepresents complete output errors, and √indicates the expected exact match.
|
| 435 |
+
|
| 436 |
+
<table><tr><td></td><td>Rel.↑</td><td>Gen.↑</td><td>Loc.↑</td><td>Route ACC.↑</td></tr><tr><td>Linear</td><td>0.78</td><td>0.74</td><td>1.00</td><td>0.80</td></tr><tr><td>Slerp</td><td>0.78</td><td>0.74</td><td>1.00</td><td>0.80</td></tr><tr><td>Ties-Merge</td><td>0.87</td><td>0.74</td><td>1.00</td><td>0.87</td></tr><tr><td>Dare-Merge</td><td>0.90</td><td>0.81</td><td>1.00</td><td>0.94</td></tr><tr><td>EMR-Merge</td><td>0.94</td><td>0.85</td><td>1.00</td><td>0.93</td></tr></table>
|
| 437 |
+
|
| 438 |
+
Table 13: Performance of different merging methods on ${125} * 8$ SLE
|
| 439 |
+
|
| 440 |
+
mask, and rescale. To unify experts, we elect entries by following the sign of the summation of each entry, then fill the entry with the maximum value that has the same sign as the summation. The algorithm can be represented as $\gamma_{uni} = \mathrm{sgn}(\sum_{t=1}^{K} \tau_t)$ , $\tau_{uni} = \gamma_{uni} \odot \epsilon_{uni}$ , where $\tau_t = W_v \cdot -W_v$ for each expert, and $\epsilon_{uni}$ is a weight with the maximum absolute value of each entry, consistent in sign with $\gamma_{uni}$ from all the task vectors.
|
| 441 |
+
|
| 442 |
+
After generating the unified vector, we can generate the mask by $M_{i} = (\tau_{i}\odot \tau_{uni} > 0)$ . These masks can mimic the original task vector $\tau_{i}$ by applying the map on the unified vector, $\tau_i^m = M_i\odot \tau_{uni}$ .
|
| 443 |
+
|
| 444 |
+
However, masking entries in the weight affects the FFN output magnitude. Hence, a rescaler is applied to adjust the values. The rescaler, $\lambda_{i} = \frac{\mathrm{sum}(\mathrm{abs}(\tau_{i}))}{\mathrm{sum}(\mathrm{abs}(M_{i}\odot\tau_{uni}))}$ , can be interpreted as rescaling the masked vector to the same magnitude as the original task vector. Hence, the final masked vector will be:
|
| 445 |
+
|
| 446 |
+
$$
|
| 447 |
+
\tau_ {i} ^ {m} = \lambda_ {i} \cdot M _ {i} \odot \tau_ {\text {u n i}} \tag {13}
|
| 448 |
+
$$
|
| 449 |
+
|
| 450 |
+
We conduct ablation study using different merging strategy to give unify our experts. It can be observed that EMR-Merging is more suitable for our methods.
|
| 451 |
+
|
| 452 |
+
- Linear. It combines weight with in linear
|
| 453 |
+
|
| 454 |
+
weight average of multiple model.
|
| 455 |
+
|
| 456 |
+
- Slerp. It combines weight with spherical interpolation.
|
| 457 |
+
- Ties-Merge. It combines weight by three process, TRIM, ELECT and Sign. TRIM removes redundant weight. ELECT selects important weight across different weights. SIGN determines the sign of each entry.
|
| 458 |
+
- Dare-Ties. It use bernoulli distribution to remove redundant weight and use ties-merge to merge model weight. The main difference lies in the ELECT process.
|
| 459 |
+
- EMR-Merging It combines weight by three process, ELECT, MASK, RESCALE. ELECT selects important weight in each weight by comparing entry's magnitude. MASK generate masks from unified model to mimic actions of original weight. RESCALE adjust the value of feed forward process since some entries are masked. This is the method we apply in our work.
|
| 460 |
+
|
| 461 |
+
# E Liscence
|
| 462 |
+
|
| 463 |
+
The Llama models are licensed under the applicable Llama Community License Agreement and accompanying Acceptable Use Policy.
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9b89b882b8e6a4b1d5b974c75e9bb5de42a81fb060e932877e9fb9c15a88d15
|
| 3 |
+
size 844938
|
2025/Serial Lifelong Editing via Mixture of Knowledge Experts/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Shaping the Safety Boundaries_ Understanding and Defending Against Jailbreaks in Large Language Models/ceeecb44-5196-49b7-b0ec-91443e35354e_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|