Add Batch 018cf232-3973-43b1-ba71-c3ddd95e97fb data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +58 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_content_list.json +0 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_model.json +0 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_origin.pdf +3 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/full.md +283 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/images.zip +3 -0
- 2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/layout.json +0 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_content_list.json +1980 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_model.json +0 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_origin.pdf +3 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/full.md +324 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/images.zip +3 -0
- 2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/layout.json +0 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_content_list.json +0 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_model.json +0 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_origin.pdf +3 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/full.md +297 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/images.zip +3 -0
- 2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/layout.json +0 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_content_list.json +0 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_model.json +0 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_origin.pdf +3 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/full.md +371 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/images.zip +3 -0
- 2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/layout.json +0 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_content_list.json +2057 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_model.json +0 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_origin.pdf +3 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/full.md +369 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/images.zip +3 -0
- 2025/The Unreasonable Ineffectiveness of the Deeper Layers/layout.json +0 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_content_list.json +0 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_model.json +0 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_origin.pdf +3 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/full.md +0 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/images.zip +3 -0
- 2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/layout.json +0 -0
- 2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_content_list.json +0 -0
- 2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_model.json +0 -0
- 2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_origin.pdf +3 -0
- 2025/The Value of Sensory Information to a Robot/full.md +491 -0
- 2025/The Value of Sensory Information to a Robot/images.zip +3 -0
- 2025/The Value of Sensory Information to a Robot/layout.json +0 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_content_list.json +0 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_model.json +0 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_origin.pdf +3 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/full.md +0 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/images.zip +3 -0
- 2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/layout.json +0 -0
- 2025/Theory on Score-Mismatched Diffusion Models and Zero-Shot Conditional Samplers/887518bc-c461-436b-8636-e17d34e69852_content_list.json +0 -0
.gitattributes
CHANGED
|
@@ -3030,3 +3030,61 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 3030 |
2025/The[[:space:]]Optimization[[:space:]]Landscape[[:space:]]of[[:space:]]SGD[[:space:]]Across[[:space:]]the[[:space:]]Feature[[:space:]]Learning[[:space:]]Strength/bcd122f3-4d9a-40ea-a48d-d55f1f1e4222_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3031 |
2025/The[[:space:]]Pitfalls[[:space:]]of[[:space:]]Memorization_[[:space:]]When[[:space:]]Memorization[[:space:]]Hurts[[:space:]]Generalization/3a0a533b-b411-4d4e-90ea-ff2e0e0d7fbe_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3032 |
2025/The[[:space:]]_Law''[[:space:]]of[[:space:]]the[[:space:]]Unconscious[[:space:]]Contrastive[[:space:]]Learner_[[:space:]]Probabilistic[[:space:]]Alignment[[:space:]]of[[:space:]]Unpaired[[:space:]]Modalities/7ef449cd-85d8-46a1-bae5-bddba54cdc90_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3030 |
2025/The[[:space:]]Optimization[[:space:]]Landscape[[:space:]]of[[:space:]]SGD[[:space:]]Across[[:space:]]the[[:space:]]Feature[[:space:]]Learning[[:space:]]Strength/bcd122f3-4d9a-40ea-a48d-d55f1f1e4222_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3031 |
2025/The[[:space:]]Pitfalls[[:space:]]of[[:space:]]Memorization_[[:space:]]When[[:space:]]Memorization[[:space:]]Hurts[[:space:]]Generalization/3a0a533b-b411-4d4e-90ea-ff2e0e0d7fbe_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3032 |
2025/The[[:space:]]_Law''[[:space:]]of[[:space:]]the[[:space:]]Unconscious[[:space:]]Contrastive[[:space:]]Learner_[[:space:]]Probabilistic[[:space:]]Alignment[[:space:]]of[[:space:]]Unpaired[[:space:]]Modalities/7ef449cd-85d8-46a1-bae5-bddba54cdc90_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3033 |
+
2025/The[[:space:]]Ramanujan[[:space:]]Library[[:space:]]-[[:space:]]Automated[[:space:]]Discovery[[:space:]]on[[:space:]]the[[:space:]]Hypergraph[[:space:]]of[[:space:]]Integer[[:space:]]Relations/02fea622-26af-446a-a631-f318cc1b21be_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3034 |
+
2025/The[[:space:]]Rise[[:space:]]and[[:space:]]Down[[:space:]]of[[:space:]]Babel[[:space:]]Tower_[[:space:]]Investigating[[:space:]]the[[:space:]]Evolution[[:space:]]Process[[:space:]]of[[:space:]]Multilingual[[:space:]]Code[[:space:]]Large[[:space:]]Language[[:space:]]Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3035 |
+
2025/The[[:space:]]Same[[:space:]]but[[:space:]]Different_[[:space:]]Structural[[:space:]]Similarities[[:space:]]and[[:space:]]Differences[[:space:]]in[[:space:]]Multilingual[[:space:]]Language[[:space:]]Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3036 |
+
2025/The[[:space:]]Semantic[[:space:]]Hub[[:space:]]Hypothesis_[[:space:]]Language[[:space:]]Models[[:space:]]Share[[:space:]]Semantic[[:space:]]Representations[[:space:]]Across[[:space:]]Languages[[:space:]]and[[:space:]]Modalities/ddf51567-8546-4629-bb78-420f5e1af635_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3037 |
+
2025/The[[:space:]]Unreasonable[[:space:]]Ineffectiveness[[:space:]]of[[:space:]]the[[:space:]]Deeper[[:space:]]Layers/4f5247c0-bc20-47fa-960b-775294408235_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3038 |
+
2025/The[[:space:]]Utility[[:space:]]and[[:space:]]Complexity[[:space:]]of[[:space:]]In-[[:space:]]and[[:space:]]Out-of-Distribution[[:space:]]Machine[[:space:]]Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3039 |
+
2025/The[[:space:]]Value[[:space:]]of[[:space:]]Sensory[[:space:]]Information[[:space:]]to[[:space:]]a[[:space:]]Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3040 |
+
2025/The[[:space:]]impact[[:space:]]of[[:space:]]allocation[[:space:]]strategies[[:space:]]in[[:space:]]subset[[:space:]]learning[[:space:]]on[[:space:]]the[[:space:]]expressive[[:space:]]power[[:space:]]of[[:space:]]neural[[:space:]]networks/4718a298-31bb-4669-bbd7-e75ba44d850e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3041 |
+
2025/Theory[[:space:]]on[[:space:]]Score-Mismatched[[:space:]]Diffusion[[:space:]]Models[[:space:]]and[[:space:]]Zero-Shot[[:space:]]Conditional[[:space:]]Samplers/887518bc-c461-436b-8636-e17d34e69852_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3042 |
+
2025/Theory,[[:space:]]Analysis,[[:space:]]and[[:space:]]Best[[:space:]]Practices[[:space:]]for[[:space:]]Sigmoid[[:space:]]Self-Attention/ea7790cb-59a6-46dc-a02c-efb51a26faa5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3043 |
+
2025/ThermalGaussian_[[:space:]]Thermal[[:space:]]3D[[:space:]]Gaussian[[:space:]]Splatting/3573b5dd-555d-40af-836c-997c2005b0e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3044 |
+
2025/Think[[:space:]]Then[[:space:]]React_[[:space:]]Towards[[:space:]]Unconstrained[[:space:]]Action-to-Reaction[[:space:]]Motion[[:space:]]Generation/43485816-d67e-4771-9683-12d9841f4db8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3045 |
+
2025/Think[[:space:]]Thrice[[:space:]]Before[[:space:]]You[[:space:]]Act_[[:space:]]Progressive[[:space:]]Thought[[:space:]]Refinement[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/bd9accd5-d952-4e53-8f01-8301152d8085_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3046 |
+
2025/Think[[:space:]]while[[:space:]]You[[:space:]]Generate_[[:space:]]Discrete[[:space:]]Diffusion[[:space:]]with[[:space:]]Planned[[:space:]]Denoising/97a0b961-9e02-4c8c-9e08-15dcf5b9aa5b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3047 |
+
2025/Think-on-Graph[[:space:]]2.0_[[:space:]]Deep[[:space:]]and[[:space:]]Faithful[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Reasoning[[:space:]]with[[:space:]]Knowledge-guided[[:space:]]Retrieval[[:space:]]Augmented[[:space:]]Generation/82393cfb-8bbd-4d48-b9a2-206f600732f0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3048 |
+
2025/ThinkBot_[[:space:]]Embodied[[:space:]]Instruction[[:space:]]Following[[:space:]]with[[:space:]]Thought[[:space:]]Chain[[:space:]]Reasoning/6ca776fa-154d-417d-a239-7976b5c1eefc_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3049 |
+
2025/Three[[:space:]]Mechanisms[[:space:]]of[[:space:]]Feature[[:space:]]Learning[[:space:]]in[[:space:]]a[[:space:]]Linear[[:space:]]Network/d8458b00-bc12-4d28-9a75-0003cca56de1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3050 |
+
2025/TidalDecode_[[:space:]]Fast[[:space:]]and[[:space:]]Accurate[[:space:]]LLM[[:space:]]Decoding[[:space:]]with[[:space:]]Position[[:space:]]Persistent[[:space:]]Sparse[[:space:]]Attention/599e0808-844a-44ab-b513-53c59d961564_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3051 |
+
2025/Tight[[:space:]]Clusters[[:space:]]Make[[:space:]]Specialized[[:space:]]Experts/16622924-78ef-4be8-8319-294464733bd5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3052 |
+
2025/Tight[[:space:]]Time[[:space:]]Complexities[[:space:]]in[[:space:]]Parallel[[:space:]]Stochastic[[:space:]]Optimization[[:space:]]with[[:space:]]Arbitrary[[:space:]]Computation[[:space:]]Dynamics/052eb235-2abe-47fb-b14d-91a502d5283f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3053 |
+
2025/Tighter[[:space:]]Privacy[[:space:]]Auditing[[:space:]]of[[:space:]]DP-SGD[[:space:]]in[[:space:]]the[[:space:]]Hidden[[:space:]]State[[:space:]]Threat[[:space:]]Model/05a5cc04-c53b-467d-9d7a-6b0e87e48973_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3054 |
+
2025/Time[[:space:]]After[[:space:]]Time_[[:space:]]Deep-Q[[:space:]]Effect[[:space:]]Estimation[[:space:]]for[[:space:]]Interventions[[:space:]]on[[:space:]]When[[:space:]]and[[:space:]]What[[:space:]]to[[:space:]]do/221c71c4-c5cf-41ca-9797-63fba562942f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3055 |
+
2025/Time-to-Event[[:space:]]Pretraining[[:space:]]for[[:space:]]3D[[:space:]]Medical[[:space:]]Imaging/0bc2371a-2ddb-4d6a-ba67-d69db7deb959_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3056 |
+
2025/TimeInf_[[:space:]]Time[[:space:]]Series[[:space:]]Data[[:space:]]Contribution[[:space:]]via[[:space:]]Influence[[:space:]]Functions/98f9c189-8c5d-47da-8b70-5efa66747a08_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3057 |
+
2025/To[[:space:]]Clip[[:space:]]or[[:space:]]not[[:space:]]to[[:space:]]Clip_[[:space:]]the[[:space:]]Dynamics[[:space:]]of[[:space:]]SGD[[:space:]]with[[:space:]]Gradient[[:space:]]Clipping[[:space:]]in[[:space:]]High-Dimensions/69e41223-c475-4640-9877-bca88cf796d9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3058 |
+
2025/ToVE_[[:space:]]Efficient[[:space:]]Vision-Language[[:space:]]Learning[[:space:]]via[[:space:]]Knowledge[[:space:]]Transfer[[:space:]]from[[:space:]]Vision[[:space:]]Experts/7a171ccc-7be9-4bf9-b012-b8519e2fdbac_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3059 |
+
2025/ToddlerDiffusion_[[:space:]]Interactive[[:space:]]Structured[[:space:]]Image[[:space:]]Generation[[:space:]]with[[:space:]]Cascaded[[:space:]]Schrödinger[[:space:]]Bridge/085fbc63-3297-4165-ad51-31ac0f75c226_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3060 |
+
2025/Token-Supervised[[:space:]]Value[[:space:]]Models[[:space:]]for[[:space:]]Enhancing[[:space:]]Mathematical[[:space:]]Problem-Solving[[:space:]]Capabilities[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/f01f8183-c6b1-40d8-ba6e-ff439be3aa47_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3061 |
+
2025/Tool-Planner_[[:space:]]Task[[:space:]]Planning[[:space:]]with[[:space:]]Clusters[[:space:]]across[[:space:]]Multiple[[:space:]]Tools/274f626e-fb7b-4930-83c7-e1211c6d2c20_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3062 |
+
2025/ToolACE_[[:space:]]Winning[[:space:]]the[[:space:]]Points[[:space:]]of[[:space:]]LLM[[:space:]]Function[[:space:]]Calling/dd98ed10-d3f9-4a26-9e99-ff7f460dc9ad_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3063 |
+
2025/ToolDial_[[:space:]]Multi-turn[[:space:]]Dialogue[[:space:]]Generation[[:space:]]Method[[:space:]]for[[:space:]]Tool-Augmented[[:space:]]Language[[:space:]]Models/988c4de6-70af-49b4-a882-a1c1bfd02e2a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3064 |
+
2025/ToolGen_[[:space:]]Unified[[:space:]]Tool[[:space:]]Retrieval[[:space:]]and[[:space:]]Calling[[:space:]]via[[:space:]]Generation/4a8218e7-53fa-48f4-abc4-bc60bd0e4cc6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3065 |
+
2025/TopoDiffusionNet_[[:space:]]A[[:space:]]Topology-aware[[:space:]]Diffusion[[:space:]]Model/9cf61d35-48d7-4e49-9f5c-2335ca882861_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3066 |
+
2025/TopoGaussian_[[:space:]]Inferring[[:space:]]Internal[[:space:]]Topology[[:space:]]Structures[[:space:]]from[[:space:]]Visual[[:space:]]Clues/331d4306-949b-4beb-97bb-17773abe96e7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3067 |
+
2025/Topological[[:space:]]Zigzag[[:space:]]Spaghetti[[:space:]]for[[:space:]]Diffusion-based[[:space:]]Generation[[:space:]]and[[:space:]]Prediction[[:space:]]on[[:space:]]Graphs/f9ad75ca-bd11-4d1b-b8f8-36ebac878cef_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3068 |
+
2025/TorchTitan_[[:space:]]One-stop[[:space:]]PyTorch[[:space:]]native[[:space:]]solution[[:space:]]for[[:space:]]production[[:space:]]ready[[:space:]]LLM[[:space:]]pretraining/2c824261-cf4a-4373-a4c1-6b8cc1ce29a3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3069 |
+
2025/Toward[[:space:]]Efficient[[:space:]]Multi-Agent[[:space:]]Exploration[[:space:]]With[[:space:]]Trajectory[[:space:]]Entropy[[:space:]]Maximization/243349f0-181f-4cfa-915a-c410f9e2f070_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3070 |
+
2025/Toward[[:space:]]Exploratory[[:space:]]Inverse[[:space:]]Constraint[[:space:]]Inference[[:space:]]with[[:space:]]Generative[[:space:]]Diffusion[[:space:]]Verifiers/16271a0c-d543-4b63-adb3-eb528cc00ee0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3071 |
+
2025/Toward[[:space:]]Generalizing[[:space:]]Visual[[:space:]]Brain[[:space:]]Decoding[[:space:]]to[[:space:]]Unseen[[:space:]]Subjects/c4da3841-7298-4ed5-bcf8-b87fd795f808_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3072 |
+
2025/Toward[[:space:]]Understanding[[:space:]]In-context[[:space:]]vs.[[:space:]]In-weight[[:space:]]Learning/178e6bc7-beaa-478f-b465-edfb6672c1c0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3073 |
+
2025/Towards[[:space:]]Auto-Regressive[[:space:]]Next-Token[[:space:]]Prediction_[[:space:]]In-context[[:space:]]Learning[[:space:]]Emerges[[:space:]]from[[:space:]]Generalization/26169743-0527-4e15-9c88-fe7b0ba38c2a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3074 |
+
2025/Towards[[:space:]]Bridging[[:space:]]Generalization[[:space:]]and[[:space:]]Expressivity[[:space:]]of[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/e5fb333b-1c7e-42c4-949a-437263cd602c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3075 |
+
2025/Towards[[:space:]]Calibrated[[:space:]]Deep[[:space:]]Clustering[[:space:]]Network/d863b00b-1d8a-4313-94bd-515e260c2f15_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3076 |
+
2025/Towards[[:space:]]Certification[[:space:]]of[[:space:]]Uncertainty[[:space:]]Calibration[[:space:]]under[[:space:]]Adversarial[[:space:]]Attacks/2f7db9b9-204d-4580-b8a9-89de167beef2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3077 |
+
2025/Towards[[:space:]]Continuous[[:space:]]Reuse[[:space:]]of[[:space:]]Graph[[:space:]]Models[[:space:]]via[[:space:]]Holistic[[:space:]]Memory[[:space:]]Diversification/d752dcfe-5b73-4cf8-8764-4e1999d37aa1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3078 |
+
2025/Towards[[:space:]]Domain[[:space:]]Adaptive[[:space:]]Neural[[:space:]]Contextual[[:space:]]Bandits/fb3b3d1d-71f5-46d4-8d75-8b60e2a7a2e7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3079 |
+
2025/Towards[[:space:]]Effective[[:space:]]Evaluations[[:space:]]and[[:space:]]Comparisons[[:space:]]for[[:space:]]LLM[[:space:]]Unlearning[[:space:]]Methods/5d09c1b0-80f0-46e1-86ed-385e9e4c7719_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3080 |
+
2025/Towards[[:space:]]Empowerment[[:space:]]Gain[[:space:]]through[[:space:]]Causal[[:space:]]Structure[[:space:]]Learning[[:space:]]in[[:space:]]Model-Based[[:space:]]Reinforcement[[:space:]]Learning/6306e43c-6c96-4409-a584-b07b4df9cfb7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3081 |
+
2025/Towards[[:space:]]Explaining[[:space:]]the[[:space:]]Power[[:space:]]of[[:space:]]Constant-depth[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks[[:space:]]for[[:space:]]Structured[[:space:]]Linear[[:space:]]Programming/2ba640a1-243d-4b73-877b-b7b51dafb932_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3082 |
+
2025/Towards[[:space:]]Fast,[[:space:]]Specialized[[:space:]]Machine[[:space:]]Learning[[:space:]]Force[[:space:]]Fields_[[:space:]]Distilling[[:space:]]Foundation[[:space:]]Models[[:space:]]via[[:space:]]Energy[[:space:]]Hessians/95746b42-a82a-43ad-982b-51d46191ed20_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3083 |
+
2025/Towards[[:space:]]Faster[[:space:]]Decentralized[[:space:]]Stochastic[[:space:]]Optimization[[:space:]]with[[:space:]]Communication[[:space:]]Compression/f124779c-33cf-48b0-9ff5-43b9774c92ed_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3084 |
+
2025/Towards[[:space:]]Federated[[:space:]]RLHF[[:space:]]with[[:space:]]Aggregated[[:space:]]Client[[:space:]]Preference[[:space:]]for[[:space:]]LLMs/28af9828-6311-43e4-aa52-b9cc1bdc624d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3085 |
+
2025/Towards[[:space:]]Foundation[[:space:]]Models[[:space:]]for[[:space:]]Mixed[[:space:]]Integer[[:space:]]Linear[[:space:]]Programming/3692b2ae-0591-4003-8462-742fb2fc4823_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3086 |
+
2025/Towards[[:space:]]Generalizable[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]via[[:space:]]Causality-Guided[[:space:]]Self-Adaptive[[:space:]]Representations/a7177a4c-928e-4e9e-ac1e-88b7f26a58c3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3087 |
+
2025/Towards[[:space:]]Generalization[[:space:]]Bounds[[:space:]]of[[:space:]]GCNs[[:space:]]for[[:space:]]Adversarially[[:space:]]Robust[[:space:]]Node[[:space:]]Classification/9437a371-ae89-430a-9e3f-22ce29d0566f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3088 |
+
2025/Towards[[:space:]]Hierarchical[[:space:]]Rectified[[:space:]]Flow/9cf7051c-488e-4222-b227-ebe0b4249f38_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3089 |
+
2025/Towards[[:space:]]Homogeneous[[:space:]]Lexical[[:space:]]Tone[[:space:]]Decoding[[:space:]]from[[:space:]]Heterogeneous[[:space:]]Intracranial[[:space:]]Recordings/ba8ac19e-d864-4a51-a07b-4038719690ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3090 |
+
2025/Towards[[:space:]]Improving[[:space:]]Exploration[[:space:]]through[[:space:]]Sibling[[:space:]]Augmented[[:space:]]GFlowNets/e50e6ead-601b-49ea-9268-a9ea9a0e21ef_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/02fea622-26af-446a-a631-f318cc1b21be_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42650b435291ac033ef7b33ec3d1078a30c0926d8a12bae739df114282632c9d
|
| 3 |
+
size 963005
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/full.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE RAMANUJAN LIBRARY - AUTOMATED DISCOVERY ON THE HYPERGRAPH OF INTEGER RELATIONS
|
| 2 |
+
|
| 3 |
+
Itay Beit-Halachmi and Ido Kaminer
|
| 4 |
+
|
| 5 |
+
The Ramanujan Machine Team, Faculty of Electrical and Computer Engineering
|
| 6 |
+
|
| 7 |
+
Technion - Israel Institute of Technology
|
| 8 |
+
|
| 9 |
+
Haifa 3200003, Israel
|
| 10 |
+
|
| 11 |
+
itaybe@campus.technion.ac.il, ido.kaminer@gmail.com
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Fundamental mathematical constants appear in nearly every field of science, from physics to biology. Formulas that connect different constants often bring great insight by hinting at connections between previously disparate fields. Discoveries of such relations, however, have remained scarce events, relying on sporadic strokes of creativity by human mathematicians. Recent developments of algorithms for automated conjecture generation have accelerated the discovery of formulas for specific constants. Yet, the discovery of connections between constants has not been addressed. In this paper, we present the first library dedicated to mathematical constants and their interrelations. This library can serve as a central repository of knowledge for scientists from different areas, and as a collaborative platform for development of new algorithms. The library is based on a new representation that we propose for organizing the formulas of mathematical constants: a hypergraph, with each node representing a constant and each edge representing a formula. Using this representation, we propose and demonstrate a systematic approach for automatically enriching this library using PSLQ, an integer relation algorithm based on QR decomposition and lattice construction. During its development and testing, our strategy led to the discovery of 75 previously unknown connections between constants, including a new formula for the 'first continued fraction' constant $C_1$ , novel formulas for natural logarithms, and new formulas connecting $\pi$ and $e$ . The latter formulas generalize a century-old relation between $\pi$ and $e$ by Ramanujan, which until now was considered a singular formula and is now found to be part of a broader mathematical structure. The code supporting this library is a public, open-source API that can serve researchers in experimental mathematics and other fields of science.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
With the rise in computing power and the rise of artificial intelligence, efforts have been made to harness these tools to further scientific discovery. Some of the earliest examples of such automated discovery efforts include the Automated Mathematician and later Eurisko (Lenat and Brown, 1984), systems that automatically discovered concepts in mathematics and later in other scientific domains. Another notable early discovery system is Graffiti (Fajtlowicz, 1988), which automatically generated conjectures in graph theory. Since then, the usage of computer algorithms as scientific tools (Wang, 1960; Davis and Lenat, 1982; Wolfram et al., 2002), and in particular as tools for aiding with mathematical proofs (Appel and Haken, 1976; Zeilberger, 1990; Wilf and Zeilberger, 1992; Buchberger et al., 2006), has skyrocketed. Noteworthy recent examples include papers by Google DeepMind (Davies et al., 2021; Fawzi et al., 2022; Romera-Paredes et al., 2023), which have utilized AI to find new algorithms for matrix multiplication, and generate conjectures in topology, representation theory, and combinatorics.
|
| 20 |
+
|
| 21 |
+
A noteworthy example of computers assisting mathematicians is the Ramanujan Machine project (Raayoni et al., 2021; Razon et al., 2023; Elimelech et al., 2024), which specializes in automated conjecture generation in number theory. This project, named in honor of Srinivasa Ramanujan's substantial mathematical contributions (Berndt, 2012) and his unconventional work style, demonstrated
|
| 22 |
+
|
| 23 |
+
an automated discovery of formulas involving fundamental mathematical constants. The discovered formulas and the properties they exhibited (Ben David et al., 2024) enabled the construction of a previously unknown mathematical structure (David, 2023; Elimelech et al., 2024) that forms a systematic framework for the generation of new formulas and for proofs of irrationality of constants, even in places where no systematic proofs were known (e.g., Apéry (1979); David (2023)).
|
| 24 |
+
|
| 25 |
+
Fundamental mathematical constants like $\pi, e$ , or $\zeta(3)$ are central in several branches of mathematics and in other fields of science (Finch, 2003). The appearance of the same mathematical constant in different fields that may seem unrelated can lead to surprising connections. One of the earliest such connections is the Basel problem, posed in 1650 and solved by Euler (Euler, 1748; Ayoub, 1974), establishing that one of the values of the Riemann zeta function is $\zeta(2) = \pi^2/6$ , and also providing a family of formulas expressing all positive even values $\zeta(2n)$ using $\pi^{2n}$ . Due to the connection of the Riemann zeta function to the distribution of prime numbers, this formula established the profound and nontrivial importance of $\pi$ in regards to prime numbers. This example shows how discovery of new connections on fundamental constants has great potential in connecting different fields and leading to new discoveries. Another such example is a connection involving $\pi$ and $e$ found by Ramanujan, presented in figure 1. Though it is not known if $\pi$ and $e$ are algebraically independent Morandi (1996), this is one of many formulas that show how else they can be connected.
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: Automatically discovered formulas, showing a section of the full hypergraph in figure 4. The first formula was found by Ramanujan (Berndt et al., 1999), and the second formula is novel.
|
| 29 |
+
|
| 30 |
+
In this paper, we propose a new approach to the discovery of relations between mathematical constants, and collect its results in a publicly-accessible database. This database is the first to collect and organize the known mathematical constants and their relations, and will provide a unique resource for experimental mathematicians and number theorists worldwide.
|
| 31 |
+
|
| 32 |
+
We expand our database into a library that also collects the known relations between the constants and organizes them into a hypergraph, which we show to be an effective representation of the structure among formulas of mathematical constants and among the constants themselves. Going beyond the collection of known relations, we develop algorithms that use the database to search for new relations between its constants, successfully generating 75 new formulas. These algorithms are used for further (automated) enrichment of the library. We present two enrichment strategies: (1) automated search of relations within the database using a polynomial integer relation algorithm (see section 2.1) and (2) the identify algorithm (see section 4) executed on each new constant introduced to the library to find its relations to existing constants and formulas in the database. Both strategies rely on the integer relation algorithm PSLQ (Ferguson and Bailey, 1992; Ferguson et al., 1999). We developed a new methodology for quantifying the PSLQ results and for determining which ones constitute new likely formulas, so they can be further analyzed to greater precision. Our algorithm is the first to discover nonlinear (polynomial) relations, rather than focusing on linear relations. For comparison, we show that identify succeeded in cases for which the state-of-the-art commercial solution (in Wolfram Alpha) was unsuccessful.
|
| 33 |
+
|
| 34 |
+
# 2 INTRODUCING THE HYPERGRAPH OF MATHEMATICAL CONSTANTS AND THEIR RELATIONS
|
| 35 |
+
|
| 36 |
+
Recall that an (ordinary) undirected graph on a vertex set $V$ is defined by an edge set $E$ , each connecting two vertices. An undirected hypergraph, then, generalizes the concept of an edge so each one can connect more than two vertices. More explicitly, each edge is now a set of arbitrary size, instead of a set of size 2. In our (undirected) hypergraph, the vertices will all be mathematical constants, either given explicitly (e.g., $\pi, e$ , up to a user-defined precision) or given by a formula converging to the constant. We choose to represent formulas using a canonical form that captures general continued fractions and infinite sums, namely the $\mathcal{C}$ -transforms of a complex sequence $f_{n}$ :
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\mathcal {C} [ f _ {n} ] = 1 + \frac {f _ {1}}{1 + \frac {f _ {2}}{1 + \frac {f _ {3}}{\ddots}}}. \tag {1}
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
This definition can always be treated as a formal expression, and when it converges it is instead defined as the limiting value. In practice, we generate each $f_{n}$ using a rational function. $C$ -transforms (and continued fractions in general) are powerful as they contain, for example, all infinite sums (that can be converted using Euler's approach (Euler, 1748)), whereas not every continued fraction can be converted back to an infinite sum. The $C$ -transform captures any continued fraction in a canonical form that removes redundancy. The special case of $f_{n}$ being a rational function already generalizes all polynomial continued fractions (Khinchin, 1964), which are general mathematical constructs that capture all trigonometric functions, Bessel functions, generalized hypergeometric functions and much more. The $C$ -transform notation helps facilitating the systematic automated research in our work (see appendix A for further discussion).
|
| 43 |
+
|
| 44 |
+
The undirected edges (equivalently hyperedges) in our hypergraph are integer polynomial relations, forming a representation that generalizes a large number of formula structures. To define an integer polynomial relation, we first introduce integer relations: An integer relation on a vector of real numbers $x_{1}, x_{2}, \ldots$ is a vector of integers $a_{1}, a_{2}, \ldots$ , not all of which are 0, such that $a_{1}x_{1} + a_{2}x_{2} + \ldots = 0$ . As an example, the formula $\phi = \frac{\sqrt{5} + 1}{2}$ is equivalent to the integer relation $2\phi - \sqrt{5} - 1 = 0$ , with the constants being $\phi, \sqrt{5}, 1$ and the integer coefficients being $2, -1, -1$ . This example illustrates how integer relations are a general structure that captures mathematical equalities.
|
| 45 |
+
|
| 46 |
+
We expand on this definition by introducing polynomial relations, which have $a_1, a_2, \ldots$ as the integer coefficients of a (nonzero) multi-variable polynomial $p$ , looking for a solution satisfying $p(x_1, x_2, \ldots) = 0$ . For each identified polynomial, we define its degree as the greatest sum of all exponents in each monomial, and its order as the largest exponent that appears in it. These quantities let us measure how "complex" a given polynomial is, which we use for eliminating redundancies in our algorithm. As another example, consider the relation between $\pi$ and $e$ , captured by the Ramanujan formula in figure 1. These types of relations constitute the edges of the hypergraph we construct automatically in this work.
|
| 47 |
+
|
| 48 |
+
To account for possible numerical inaccuracies arising from our computational methods, we propose a definition that allows for a (typically small) error $\varepsilon \coloneqq |a_1x_1 + a_2x_2 + \ldots| \geq 0$ . This definition also applies to polynomial relations, in which case $\varepsilon = |p(x_1,x_2,\dots)|$ . Then, the precision of the relation is defined as $\lfloor -\log_2\varepsilon \rfloor$ . With the ability to quantify each constant's numerical error as $\varepsilon_1,\varepsilon_2,\ldots$ , we instead replace $\varepsilon$ in the precision with $\max \{\varepsilon ,\varepsilon_1,\varepsilon_2,\ldots\}$ , allowing the discovered relation to account for the inaccuracy of its constants.
|
| 49 |
+
|
| 50 |
+
Hypergraph edges stand for either linear relations with integer coefficients, like that between $\sqrt{5}$ and $\phi = \frac{\sqrt{5} + 1}{2}$ , or nonlinear (polynomial) relations, like that between $\pi$ and $\zeta(2) = \frac{\pi^2}{6}$ . Interestingly, all edges representing linear relations satisfy a kind of transitivity in any subgraph they form: given an integer relation on a set of constants $A$ , and another on a set of constants $B$ , such that $A$ and $B$ share at least one constant $x$ , it is possible to construct a relation on $(A \cup B) \setminus \{x\}$ . However, edges like the ones we show between $\pi$ and $e$ impose a more intricate structure that does not conform to regular transitivity but requires its generalization. A simple example of such transitivity is the (non-linear) polynomial relations between $\pi$ and its higher powers, or $e$ and its rational exponents.
|
| 51 |
+
|
| 52 |
+
# 2.1 ALGORITHMS FOR AUTOMATED ENRICHMENT OF THE HYPERGRAPH
|
| 53 |
+
|
| 54 |
+
Our algorithms populate the hypergraph of integer relations by searching for sets of constants $x_{1}, x_{2}, \ldots$ and polynomials $p$ such that $p(x_{1}, x_{2}, \ldots) = 0$ up to some tolerance. Section 3.1 summarizes the results, with a full listing in appendix F. The underlying mechanism is as follows:
|
| 55 |
+
|
| 56 |
+
Beginning with a totally disconnected hypergraph (i.e. no relations are known yet), choose the search space of constants, partitioned into user-defined subsets, one of which may be fundamental mathematical constants, and another may be constants provided as limits of formulas (generally described by $\mathcal{C}$ -transforms). Then, each run of the algorithm takes some or all of the subsets in the partition, filters them further, and then takes their product space. In addition, the algorithm requires a choice of maximum degree and order for the polynomials. For example, the hypergraph in figure 1 resulted from a search that yielded an edge of degree $d = 6$ and order $o = 2$ for the polynomials on $\pi$ and $e$ , which can be represented using a simpler degree 5 edge on the constant $\pi e$ instead.
|
| 57 |
+
|
| 58 |
+
Second, once the search space is decided, each set of constants is run through an integer relation algorithm to obtain a polynomial relation, using multiple precision arithmetic (see section 3 for details). For this we have chosen the PSLQ algorithm, whose supporting theorems ensure that it can recover a relation with the working precision for almost all real vectors (Ferguson et al., 1999), except for some special cases we note in appendix B. We discuss in the next section how we run PSLQ and what heuristic we use to filter integer relations that are likely to be false positives. This is the most resource-intensive part of the algorithm, with each run of PSLQ having a time complexity of $O(m^4)$ where $m$ is the maximal number of monomials in a polynomial with degree $d$ and order $o$ (see appendix C for a more detailed analysis). However, each run of PSLQ is independent from every other run, making the algorithm embarrassingly parallel, allowing us to scale the search space with the number of processors available.
|
| 59 |
+
|
| 60 |
+
Lastly, once significant relations have been collected in the previous step to populate the hypergraph, these integer relations are then used in future runs of the algorithm to save time: Given a set of constants $X$ , if the hypergraph already has an edge $e \subseteq X$ whose degree and order are no more than the current maximal degree and order, then we do not run $X$ through PSLQ again. Essentially, as the algorithm learns more edges of the hypergraph of integer relations, future runs become more efficient. This also means that the algorithm can accept a hypergraph of integer relations at any point (even if partially filled), using the given integer relations to save time.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2: Automated search of integer relations. The process begins by collecting fundamental constants and continued fractions from the literature and organizing them into a database. Then, the algorithm checks subsets of constants for polynomial relations using PSLQ. We identify that a relation is significant by a high Return on Investment (Roi), as described in section 3. Such events are generally extremely rare, and each one is returned to the database and saved, enriching the hypergraph and adding to our knowledge about mathematical constants and their relations. Each such discovered relation also saves time on future runs of PSLQ. In addition, our novel identify utility (see section 4) allows for manually adding constants and continued fractions to the database regardless of the automated search.
|
| 64 |
+
|
| 65 |
+
# 3 IDENTIFYING INTEGER RELATIONS BETWEEN MATHEMATICAL CONSTANTS USING PSLQ
|
| 66 |
+
|
| 67 |
+
PSLQ is a numerically stable integer relation algorithm (Ferguson and Bailey, 1992). This algorithm uses a partial sum of squares scheme to manipulate a lattice, in a similar manner to the PSOS algorithm (Bailey and Ferguson, 1998), using LQ matrix decomposition (transposed QR decomposition). Follow-up works on PSLQ applied it in a wide range of settings (Bailey and Broadhurst, 2001). PSLQ accepts a vector of real numbers $x_{1}, x_{2}, \ldots$ , and returns integers $a_{1}, a_{2}, \ldots$ , such that $a_{1}x_{1} + a_{2}x_{2} + \ldots = 0$ within user-set tolerance, maximum number of steps, and maximum absolute value for all $a_{i}$ (or nothing if no such relation exists). Ordinarily, any of the three user-set parameters can terminate the algorithm's calculations, but in this section, we demonstrate how and why we run PSLQ only until tolerance is exhausted, and present a novel heuristic for deciding if its result is significant, which we have termed Return on Investment (RoI).
|
| 68 |
+
|
| 69 |
+
From a purely theoretical perspective, integer relations are either true or false, with the latter providing no insight towards the former. That is, if a certain integer relation is accurate to 100 digits of accuracy, but is then found to be incorrect at the 101st digit, it does not imply that any "similar" integer relation will be fully accurate. To identify promising relations despite the finite precision, we rely on a perspective motivated by data compression and statistics: Given $d$ binary digits, one can express about $2^{1 + d}$ integers (including negatives). Thus, if our working precision is $d$ binary digits, and an integer relation algorithm yielded numbers with $d$ binary digits, the result is most likely a false positive. With a tighter analysis, if one splits this reasoning into $n$ integers, each with $d_{1}, d_{2}, \ldots, d_{n}$ binary digits, then the total amount of options for all integers is about $2^{1 + d_{1}} \cdot 2^{1 + d_{2}} \cdots = 2^{n + d_{1} + d_{2} + \cdots}$ . As such, for precision of $d$ binary digits, any integer relation algorithm yielding integers with $d_{1}, d_{2}, \ldots$ binary digits such that $n + d_{1} + d_{2} + \ldots \approx d$ is most likely a false positive.
|
| 70 |
+
|
| 71 |
+
Based on the above analysis, we introduce and apply the concept of Return on Investment (RoI) to analyse the validity of integer relations: Given an integer relation with a precision of $d$ , on $n$ integers each with $d_1, d_2, \ldots$ binary digits, the RoI is defined as $\frac{d}{n + d_1 + d_2 + \ldots}$ . With this definition in mind, it is reasonable to state that the higher the RoI, the more likely an integer relation is to be true. This assertion matches theory, as in that case, if an integer relation is theoretically true, then the RoI grows to $\infty$ as the working precision increases.
|
| 72 |
+
|
| 73 |
+
Experimenting with the PSLQ algorithm to determine an empirical lower bound for RoI, beyond which integer relations can be considered significant, shows that an RoI of 2 seems to comfortably separate random results from false positives, with a generous margin of error (see figure 3). As such, this has been decided as the lower cutoff for integer relations generated by PSLQ to be considered significant as part of the algorithm in section 2.1. In order to further show how general RoI can be, we performed a similar experiment using a different integer relation algorithm called LLL (Lenstra et al., 1982), and described its findings in appendix D.
|
| 74 |
+
|
| 75 |
+
# 3.1 CONTINUED FRACTION CALCULATION AND CONVERGENCE
|
| 76 |
+
|
| 77 |
+
Motivated by previous works of the Ramanujan Machine (Raayoni et al., 2021; Elimelech et al., 2024), generalized continued fractions (represented as $\mathcal{C}$ -transforms) are a highly expressive framework of generating constants. One of the challenges of working with such mathematical formulas is that it is not always known in advance whether a certain formula converges to a limit. Nevertheless, our numerical experiments suggest that the asymptotics of each sequence determines its convergence properties and speed, leading to the following conjecture and analysis. This analysis aids in populating our database of continued fractions by rejecting formulas that do not converge and helping with numerical identification tasks (see section 4). We propose the following conjecture, which generalizes on previous works (e.g., (Raayoni et al., 2021; Ben David et al., 2024)), providing the complete convergence conditions that we use when given an arbitrary $\mathcal{C}$ -transform:
|
| 78 |
+
|
| 79 |
+
Conjecture 1 Let $f_{n}$ be a real sequence. The formula $\mathcal{C}[f_n]$ converges in the following cases, at a rate provided by the error $\varepsilon_{n} := |1 + f_{1} / (1 + f_{2} / (\dots + f_{n})) - \mathcal{C}[f_{n}]|$ .
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\cdot \text {I f} f _ {n} = O \left(n ^ {k}\right) \text {f o r s o m e} k < 0, \text {t h e n} \varepsilon_ {n} = O \left(\left(n! \right.) ^ {k}\right)
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 3: Experimental analysis of the Return on Investment (Rol) property, showing its use for identifying integer relations. (a) For each $n$ , we ran PSLQ 100 times with a pre-selected binary precision of $50 + 5n$ . We present the average Rol for each $n$ . The standard deviation for each $n$ is presented as fading errorbars, with the half length of each darkest error bar being equal to one standard deviation. The lighter dashed line is the constant Rol of 1.25 and the darker dashed line is the constant Rol of 1.5, which the plot suggests are viable options for minimum Rol for filtering integer relations. (b) Sampled formulas are listed with their Rol on panel (a). Thanks to their high precision, their Rol is much greater than our recommended Rol cutoff. (c) For each $d,n$ , we ran PSLQ 100 times until tolerance (equal to $65\%$ of the working precision, see appendix B for more details), each with $n$ numbers between 0 and 1, each with $d$ uniformly random binary digits. Then, we present the average Rol across all 100 runs for each $d,n$ . For a fixed $n$ , the average Rol is close to constant in $d$ .
|
| 87 |
+
|
| 88 |
+
- If $1 + 4f_{n} = C + o(1)$ for some constant $C \neq 1$ , then $\varepsilon_{n} = O\left(\left|\frac{1 + \sqrt{C}}{1 - \sqrt{C}}\right|^{-n}\right)$ .
|
| 89 |
+
- If $1 + 4f_{n} = Cn^{k} + o(n^{k})$ for some $k\in (0,1]$ , then $\varepsilon_{n} = O\left(e^{-4\sqrt{n / C}}\right)$
|
| 90 |
+
- If $1 + 4f_{n} = O(n^{k})$ with $k < 0$ or $k \in (1,2]$ , then $\varepsilon_{n} = O(n^{m})$ for some $m < 0$ .
|
| 91 |
+
|
| 92 |
+
Otherwise, $\mathcal{C}[f_n]$ does not converge.
|
| 93 |
+
|
| 94 |
+
Another challenge we face when analyzing continued fraction formulas is explicitly determining the limit of a converging $\mathcal{C}$ -transform. In lieu of this, if a $\mathcal{C}$ -transform converges then it is sufficient to stop at some finite evaluation depth and use the resulting convergents to calculate an approximation of the limit. Then, though it would be beneficial to know the exact error of the resulting approximation, it is much easier and readily available to calculate an error proxy based on the difference to the previous depth's approximation. Table 1 shows a few examples of this procedure, which also showcase the convergence model in action.
|
| 95 |
+
|
| 96 |
+
# 4 THE RAMANUJAN LIBRARY: PROVIDING PUBLIC ACCESS TO THE DATABASE OF INTEGER RELATIONS AND MATHEMATICAL CONSTANTS
|
| 97 |
+
|
| 98 |
+
The code we have written and the library we have curated are open-source and publicly-accessible, including the novel database of mathematical constants and the hypergraph of integer relations.
|
| 99 |
+
|
| 100 |
+
Table 1: The predicted vs measured convergence properties of selected continued fractions in their canonical forms: error analysis. Without prior knowledge, it is not possible to know exactly how inaccurate a given $\mathcal{C}$ -transform's approximations are. Thankfully, the error predicted by the convergence model usually provides a good estimate of the error proxy, which is usually a lower bound on the true error. Both the error proxy and the true error are measured in terms of how many decimal digits agree between the approximation and the true limit. Each $\mathcal{C}$ -transform here was either taken from the literature, in which case its limit is known, or otherwise found numerically, and then its limit is denoted with an asterisk and awaits proof. Note the lack of predicted error for $\mathcal{C}[n^2]$ , due to no known formula for such $\mathcal{C}$ -transforms (see conjecture 1).
|
| 101 |
+
|
| 102 |
+
<table><tr><td>C-transform</td><td>Evaluation depth</td><td>Predicted error</td><td>Error proxy</td><td>Limit</td><td>True error</td></tr><tr><td>C[1/n]</td><td>210</td><td>2640</td><td>2644</td><td>e-1</td><td>2647</td></tr><tr><td>C[1]</td><td>210</td><td>428</td><td>427</td><td>(1+√5)/2</td><td>428</td></tr><tr><td>C[n]</td><td>210</td><td>27</td><td>26</td><td>1/√πe/2 erf c 1/√2</td><td>26</td></tr><tr><td>C[n2]</td><td>220</td><td>N/A</td><td>5</td><td>1/ln2 (*)</td><td>5</td></tr></table>
|
| 103 |
+
|
| 104 |
+
Table 2: Sampled formulas from the hypergraph of integer relations. Each formula here is taken from figure 4. As an example, consider how the first relation can be found using PSLQ: Assuming a polynomial with degree 2 and order 1, and given Catalan's constant $G$ and $\mathcal{C}\left[\frac{-2n^4}{9n^4 - 3n^2 + 1}\right]$ , PSLQ can find integers $n_1, n_2, n_3, n_4$ such that $n_1\mathcal{C}\left[\frac{-2n^4}{9n^4 - 3n^2 + 1}\right]G + n_2\mathcal{C}\left[\frac{-2n^4}{9n^4 - 3n^2 + 1}\right] + n_3G + n_4 = 0$ . In this case, one can find $n_1 = 2, n_2 = 0, n_3 = 0, n_4 = -1$ , and given that both $\mathcal{C}\left[\frac{-2n^4}{9n^4 - 3n^2 + 1}\right]$ and $G$ are known to high precision, this is a signal that an integer relation exists. The other relations here can be captured in a similar way, using more complex integer polynomials.
|
| 105 |
+
|
| 106 |
+
<table><tr><td>Relation</td><td>Icon</td></tr><tr><td>C[-2n4/9n4-3n2+1] = 1/2G</td><td>G</td></tr><tr><td>ln 2 = 1/C[π2/4-16n2] - 2/5C[π2/25-100n2]</td><td>ln2</td></tr><tr><td>πe/2 = (1/C[n] + C[1/2n])2</td><td>Π</td></tr><tr><td>C[(-(n+4)(n+2)2(2n+1)/9n4+84n3+259n2+294n+95] = 296-192π+180ζ(2)/1444-912π+855ζ(2)</td><td>πT
|
| 107 |
+
ζ(2)</td></tr></table>
|
| 108 |
+
|
| 109 |
+
Our code also contains specialized algorithms for working with the hypergraph and for testing new candidate constants and candidate formulas. Access to the database from our code is established using psycopg2 and sqlchemy (Bayer, 2012). Our code contains for example the automated search algorithm described in section 2.1, along with additional utilities like the $C$ -transform calculator and the numerical identification suite we call identify, which are described in this section.
|
| 110 |
+
|
| 111 |
+
The computation of continued fractions is fairly straightforward thanks to the recursive relation mentioned in appendix A, and so the $C$ -transform calculator was developed to allow us to compute $C$ -transforms to arbitrary depths. The calculator utilizes three libraries for its computation: sympy (Meurer et al., 2017), gmpy2, and mphpath (mpmath development team, 2023). Using the above libraries, computation up to a depth of 1 million can be achieved in a few minutes at most on a typical personal computer, for most continued fractions. Using the error proxy and convergence model mentioned in section 3.1, we also give a preemptive analysis of any given $C$ -transform of a rational function, which is also useful to warn of $C$ -transforms that are expected to not converge
|
| 112 |
+
|
| 113 |
+
or to have a slow rate of convergence. This preemptive analysis also allows the user to specify their desired error proxy instead of having to guess an explicit depth in advance. Finally, when operating on $\mathcal{C}$ -transforms of rational functions specifically, the calculator automatically shifts the given function so as to avoid its singularities and zeroes, resulting in an equivalent $\mathcal{C}$ -transform up to some number of steps forwards or backwards (see figure 2 for a demonstration of this equivalence).
|
| 114 |
+
|
| 115 |
+
The integer relation machine depicted in figure 2 has two uses, one of which has been described in section 2.1, and the other is identify: a novel numerical identification tool. The input to identify is an array of decimal expansions representing one or more constants and/or their implicit $\mathcal{C}$ -transforms. The output is the result of putting all values into the integer relation machine to attempt to extract meaningful relations. If enabled, identify can also automatically fetch specific mathematical constants or $\mathcal{C}$ -transforms from our database and match them against its input, informing the user of what the database is familiar with, if applicable. If at any point, identify is given a $\mathcal{C}$ -transform that the database is unfamiliar with, identify will then automatically upload it to the database. Similarly, if a new relation is found in the process, it will also be uploaded to the database.
|
| 116 |
+
|
| 117 |
+
# 5 SELECTED DISCOVERED RELATIONS BETWEEN MATHEMATICAL CONSTANTS
|
| 118 |
+
|
| 119 |
+
The novel algorithm described in section 2.1 has yielded results which we summarize here. These results were found after running the algorithm on a smaller scale (an 8-core AWS machine) for several months. The total compute time of our results is, thus, about 16 compute months. However, since the algorithm is embarrassingly parallel, runtimes of the algorithm in practice go down with the number of CPU cores used. This shows the potential of our algorithm for running on much larger compute resources. Figure 4 shows 118 of the relations found, of which 43 were known in the literature and 75 are novel to the best of our knowledge. Figure 2 shows some example relations. Appendix F catalogues all relations in detail. These results were found after starting with a completely disconnected hypergraph, containing the constants of interest, and no initial relations. Here we present notable discovered relations involving $\pi$ , $e$ , $ln2$ and the Lemniscate constants.
|
| 120 |
+
|
| 121 |
+
We recall the following formula, attributed to Ramanujan (Berndt et al., 1999) (using the notation defined in equation 1, section 2):
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\sqrt {\frac {\pi e}{2}} = \frac {1}{\mathcal {C} [ n ]} + \frac {1}{2 \mathcal {C} [ (1 - 2 n) / (4 n (n + 1)) ] - 1}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
The search job unearthed a family of conjectures that generalizes the second $\mathcal{C}$ -transform in this relation, given in table 3.
|
| 128 |
+
|
| 129 |
+
Next, we examined the family of constants $\mathcal{C}[n^2/(k^2(1 - 4n^2))]$ for integers $k \geq 1$ , first noted in Ben David et al. (2024) (table 4 column 1). When they were first discovered, these $\mathcal{C}$ -transforms were known to converge but their limits were unknown. Our search algorithm connected three of these $\mathcal{C}$ -transforms to $\ln 2$ in pairs:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array}{l} \ln 2 = \frac {1}{2 \mathcal {C} [ n ^ {2} / (4 (1 - 4 n ^ {2})) ]} + \frac {1}{7 \mathcal {C} [ n ^ {2} / (4 9 (1 - 4 n ^ {2})) ]} = \\ = \frac {2}{5 \mathcal {C} [ n ^ {2} / (2 5 (1 - 4 n ^ {2})) ]} + \frac {2}{7 \mathcal {C} [ n ^ {2} / (4 9 (1 - 4 n ^ {2})) ]} = \\ = \frac {1}{\mathcal {C} [ n ^ {2} / (4 (1 - 4 n ^ {2})) ]} - \frac {2}{5 \mathcal {C} [ n ^ {2} / (2 5 (1 - 4 n ^ {2})) ]} \\ \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
Thanks to the high precision to which these equations have been verified, our Return on Investment (RoI) measure (section 3) quantifies how unlikely they are to be false conjectures. These conjectures are also listed in appendix F. Later investigation has revealed:
|
| 136 |
+
|
| 137 |
+
Conjecture 2 For all $k \geq 1$ , $\mathcal{C}\left[\frac{n^2}{k^2(1 - 4n^2)}\right] = \frac{2 / k}{\ln(k + 1) - \ln(k - 1)}$ .
|
| 138 |
+
|
| 139 |
+
Table 3: Discovered Ramanujan-like formulas for $\sqrt{\pi e}$ . For brevity, we denote $R_{2} = \sqrt{\frac{\pi e}{2}}\mathrm{erf}\frac{1}{\sqrt{2}}$ . The rows in this table represent the 8 formulas we discovered for $\sqrt{\pi e}$ , generalizing Ramanujan's original formula that was so far unique. We proved the first 4 rows using transformations on Ramanujan's original formula. The latter 4 rows are still unproven (yet equivalent, such that proving any one of them will prove all four). The last row of each set of four is an infinite family of formulas: for any integer $k \geq 0$ there exist integers $\alpha, \beta, \gamma, \delta$ that satisfy an equality between the two sides.
|
| 140 |
+
|
| 141 |
+
<table><tr><td>C-transform</td><td>Limit</td></tr><tr><td>C[(1-2n)/(4n(n+1))]</td><td>(R2+1)/2R2</td></tr><tr><td>C[(1-2n)/(4(n+1)(n+2))]</td><td>(2R2+1)/4</td></tr><tr><td>C[(1-2n)/(4(n+2)(n+3))]</td><td>(R2+1)/(6R2-1)</td></tr><tr><td>C[(1-2n)/(4(n+k)(n+k+1))]</td><td>(αR2+β)/(γR2+δ)</td></tr><tr><td>C[n/(2n(n+1))]</td><td>1/(2R2-1)</td></tr><tr><td>C[(n+1)/(2n(n+1))]</td><td>R2</td></tr><tr><td>C[(n+2)/(2n(n+1))]</td><td>(2R2+1)/(R2+1)</td></tr><tr><td>C[(n+k)/(2n(n+1))]</td><td>(αR2+β)/(γR2+δ)</td></tr></table>
|
| 142 |
+
|
| 143 |
+
As a final example of notable results, we compared the performance of identify with commercial numerical identification tools such as Wolfram Alpha $^{3}$ . Our identify method was successful in cases for which Wolfram Alpha was unsuccessful in identifying the constant. This was the case for formulas such as $\mathcal{C}[-(2n + 3)^2 / (18n(n + 1))]$ (as an example of a larger family of $\mathcal{C}$ -transforms). Executing identify found that the limit is $\frac{5A + 6B}{5A - 9B}$ (to 50 digits of accuracy initially, and further thousands upon reconfirming), where $A, B$ are respectively the first and second Lemniscate constants.
|
| 144 |
+
|
| 145 |
+
# 6 LIMITATIONS AND OUTLOOK
|
| 146 |
+
|
| 147 |
+
Our work presented a successful approach to automated formula discovery in number theory. The numerical nature of our algorithms means that results are not theorems, but rather conjectures awaiting proofs. In many cases, the discovered relations between formulas led to patterns that enabled generalizing formulas into families. Some of these families are connected such that proving one formula proves the entire family. We provided proofs for selected cases (shown in appendix E), hinting that the other discovered formulas can also be proven. In a similar vein, our findings reveal the complete rules of convergence of general continued fractions, yet these discovered rules lack a formal proof for many of the special cases. Future work by number theorists can follow on our groundwork to complete the proof and build the complete theory of convergence of continued fractions.
|
| 148 |
+
|
| 149 |
+
The Return on Investment (RoI) mechanism that we presented to quantify the success of the PSLQ algorithm can be directly extended to other integer relation algorithms such as LLL (Lenstra et al., 1982) (see also appendix D). This quantitative approach can contribute to the application of such algorithms in a wider range of fields, and will benefit from a thorough theoretical investigation.
|
| 150 |
+
|
| 151 |
+
Our approach and implementation can benefit from many improvements. The search algorithm was implemented in a way that allows for distributed computing. We are now adapting the algorithm to utilize additional computing power using the online distributing network BOINC (Anderson, 2004). Such large-scale computing efforts will be very promising in generating new, more elaborate formulas and interrelations. The increase in the number of interrelations will require corresponding methods to eliminate false positives, which could be accomplished automatically by retesting them over time with higher precision constants. Sufficient precision will eventually reveal each potential false positive. Moreover, the current automated search algorithm relies on a pre-selected, static set of constants, which directly determines which relations can be found. Methods of automatically adding "interesting" constants to the database can improve the potential for finding novel relations.
|
| 152 |
+
|
| 153 |
+
Looking forward, the publicly-available Ramanujan library that we developed can now serve number theorists for investigating mathematical constants with more powerful tools that are easily accessible. The hypergraph of integer relations may be viewed like a knowledge graph, and as a public resource, it can help open such areas of investigations to a broader community with different levels of expertise.
|
| 154 |
+
|
| 155 |
+
By presenting fascinating connections between constants, we hope that this resource will invoke curiosity in younger audiences and encouraging mathematical experimentation as a path for learning mathematics. In its next generations, the Ramanujan library can be improved by augmenting the hypergraph with written explanations on constants and links to relevant papers, forming a public hub of knowledge on constants and their relations.
|
| 156 |
+
|
| 157 |
+
# ACKNOWLEDGEMENTS
|
| 158 |
+
|
| 159 |
+
This research is supported by the generosity of Eric and Wendy Schmidt by recommendation of the Schmidt Futures Polymaths program.
|
| 160 |
+
|
| 161 |
+
This research received software engineering support from the Georgia Institute of Technology's Scientific Software Engineering supported by Schmidt Sciences, as part of the Virtual Institute for Scientific Software (VISS) Program
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 4: The hypergraph of integer relations: each vertex is a constant, and each edge is a formula. The hypergraph summarizes our automated discovery of relations between mathematical constants, presenting selected formulas from our database. This hypergraph does not show all discovered relations for clarity's sake. Empty circles denote constants (written inside). Colored circles denote continued fractions. Black denotes continued fractions whose limit is known in the broader literature. Green denotes continued fractions whose limit is found in (Raayoni et al., 2021). Blue denotes continued fractions whose limit was unknown before our work, to the best of our knowledge. We denote order-1 connections (Mobius-like) with solid lines, and higher-order connections (constants may appear squared, cubed, etc.) with dashed lines. Edges that connect more than two vertices are marked with small empty squares, denoting formulas that involve more than two constants of formulas (example in the inset at the top right). Each algebraic constant has an edge of size 1, also marked with a small empty square (placed at the top left). Such degenerate edges correspond to the minimal polynomial of the constant.
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
David P Anderson. Boinc: A system for public-resource computing and storage. In Proceedings of the 5th IEEE/ACM International Workshop on Grid Computing, pages 4-10, 2004.
|
| 169 |
+
Roger Apéry. Irrationalité de $\zeta(2)$ et $\zeta(3)$ . Astérisque, 61:11-13, 1979.
|
| 170 |
+
Kenneth I. Appel and Wolfgang Haken. Every planar map is four colorable. Bulletin of the American Mathematical Society, 82:711-712, 1976.
|
| 171 |
+
Raymond Ayoub. Euler and the Zeta Function. The American Mathematical Monthly, 81:1067-1086, 1974.
|
| 172 |
+
David Bailey and David Broadhurst. Parallel integer relation detection: Techniques and applications. Mathematics of Computation, 70:1719-1736, 2001.
|
| 173 |
+
David Bailey and Helaman Ferguson. Numerical results on relations between fundamental constants using a new algorithm. Mathematics of Computation, 53:649-656, 1998.
|
| 174 |
+
Michael Bayer. SQLalchemy. In Amy Brown and Greg Wilson, editors, The Architecture of Open Source Applications Volume II: Structure, Scale, and a Few More Fearless Hacks. aosabook.org, 2012.
|
| 175 |
+
Nadav Ben David, Guy Nimri, Uri Mendlovic, Yahel Manor, Carlos De la Cruz Mengual, and Ido Kaminer. On the Connection Between Irrationality Measures and Polynomial Continued Fractions. Arnold Mathematical Journal, 2024.
|
| 176 |
+
Bruce C. Berndt. Ramanujans notebooks: Part III. Springer Science & Business Media, New York, NY, United States, 2012.
|
| 177 |
+
Bruce C. Berndt, Youn-seo Choi, and Soon-Yi Kang. The problems submitted by ramanujan to the journal of the indian mathematical society. 236, 1999.
|
| 178 |
+
Bruno Buchberger, Adrian Crciun, Tudor Jebelean, Laura Kovacs, Temur Kutsia, Koji Nakagawa, Florina Piroi, Nikolaj Popov, Judit Robu, Markus Rosenkranz, et al. Theorema: Towards computer-aided mathematical theory exploration. Journal of applied logic, 4:470-504, 2006.
|
| 179 |
+
Ofir David. The conservative matrix field. arXiv:2303.09318, 2023.
|
| 180 |
+
Alex Davies, Petar Velicković, Lars Buesing, Sam Blackwell, Daniel Zheng, Nenad Tomašev, Richard Tanburn, Peter Battaglia, Charles Blundell, András Juhász, et al. Advancing mathematics by guiding human intuition with AI. Nature, 600:70-74, 2021.
|
| 181 |
+
Randall Davis and Douglas B Lenat. Knowledge-Based Systems in Artificial Intelligence: 2 Case Studies. McGraw-Hill Professional Book Group, New York, NY, United States, 1982.
|
| 182 |
+
Rotem Elimelech, Ofir David, Carlos De la Cruz Mengual, Rotem Kalisch, Wolfgang Berndt, Michael Shalyt, Mark Silberstein, Yaron Hadad, and Ido Kaminer. Algorithm-assisted discovery of an intrinsic order among mathematical constants. Proceedings of the National Academy of Sciences, 121:e2321440121, 2024.
|
| 183 |
+
Leonhard Euler. Introductio in analysin infinitorum. Apud Marcum-Michaelem Bousquet & Socios, 1748.
|
| 184 |
+
Siemion Fajtlowicz. On conjectures of Graffiti. Annals of Discrete Mathematics, 38:113-118, 1988.
|
| 185 |
+
Alhussein Fawzi, Matej Balog, Aja Huang, Thomas Hubert, Bernardino Romera-Paredes, Moham-madamin Barekatain, Alexander Novikov, Francisco J R Ruiz, Julian Schrittwieser, Grzegorz Swirszcz, et al. Discovering faster matrix multiplication algorithms with reinforcement learning. Nature, 610:47-53, 2022.
|
| 186 |
+
Helaman Ferguson, David Bailey, and Steve Arno. Analysis of PSLQ, an integer relation finding algorithm. Mathematics of Computation, 68:351-369, 1999.
|
| 187 |
+
|
| 188 |
+
Helaman RP Ferguson and David H Bailey. A polynomial time, numerically stable integer relation algorithm. Technical report, 1992.
|
| 189 |
+
Steven R. Finch. Mathematical constants. Cambridge University Press, 2003.
|
| 190 |
+
Aleksander Ya. Khinchin. Continued fractions. The University of Chicago Press, 1964.
|
| 191 |
+
Douglas B Lenat and John Seely Brown. Why AM and EURISKO appear to work. Artificial intelligence, 23:269-294, 1984.
|
| 192 |
+
Arjen Lenstra, Hendrik Lenstra, and Lovász László. Factoring polynomials with rational coefficients. Mathematische Annalen, 261:515-534, 1982.
|
| 193 |
+
Aaron Meurer, Christopher P. Smith, Mateusz Paprocki, Ondřej Čertík, Sergey B. Kirpichev, Matthew Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K. Moore, Sartaj Singh, Thilina Rathnayake, Sean Vig, Brian E. Granger, Richard P. Muller, Francesco Bonazzi, Harsh Gupta, Shivam Vats, Fredrik Johansson, Fabian Pedregosa, Matthew J. Curry, Andy R. Terrel, Štepan Roučka, Ashutosh Saboo, Isuru Fernando, Sumith Kulal, Robert Cirmrnan, and Anthony Scopatz. Sympy: symbolic computing in python. PeerJ Computer Science, 3:e103, jan 2017. ISSN 2376-5992. doi: 10.7717/peerj-cs.103. URL https://doi.org/10.7717/peerj-cs.103.
|
| 194 |
+
Patrick Morandi. Field and Galois Theory. Graduate Texts in Mathematics. Springer, 1996.
|
| 195 |
+
The mpmath development team. mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 1.3.0), 2023. http://mpmath.org/.
|
| 196 |
+
Gal Raayoni, Shahar Gottlieb, Yahel Manor, George Pisha, Yoav Harris, Uri Mendlovic, Doron Haviv, Yaron Hadad, and Ido Kaminer. Generating conjectures on fundamental constants with the Ramanujan Machine. Nature, 590:67-73, 2021.
|
| 197 |
+
Ofir Razon, Yoav Harris, Shahar Gottlieb, Dan Carmon, Ofir David, and Ido Kaminer. Automated Search for Conjectures on Mathematical Constants using Analysis of Integer Sequences. International Conference on Machine Learning, 202:28809-28842, 2023.
|
| 198 |
+
Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M. Kumar, Emilien Dupont, Francisco Ruiz, Jordan Ellenberg, Pengming Wang, Omar Fawzi, Pushmeet Kohli, and Alhussein Fawzi. Mathematical discoveries from program search with large language models. Nature, 625:468-475, 2023.
|
| 199 |
+
Hao Wang. Toward mechanical mathematics. IBM Journal of Research and Development, 4:2-22, 1960.
|
| 200 |
+
Herbert S Wilf and Doron Zeilberger. An algorithmic proof theory for hypergeometric (ordinary and q) multisum/integral identities. Inventiones mathematicae, 108:575-633, 1992.
|
| 201 |
+
Stephen Wolfram et al. A new kind of science. Wolfram Media, Champaign, IL, United States, 2002.
|
| 202 |
+
Doron Zeilberger. A fast algorithm for proving terminating hypergeometric identities. Discrete mathematics, 80:207-211, 1990.
|
| 203 |
+
|
| 204 |
+
# A ON GENERALIZED CONTINUED FRACTIONS
|
| 205 |
+
|
| 206 |
+
A generalized continued fraction, given two sequences $a_{n},b_{n}$ , is the following formal expression:
|
| 207 |
+
|
| 208 |
+
$$
|
| 209 |
+
G C F [ a _ {n}, b _ {n} ] = a _ {0} + \frac {b _ {1}}{a _ {1} + \frac {b _ {2}}{a _ {2} + \frac {b _ {3}}{\ddots}}}
|
| 210 |
+
$$
|
| 211 |
+
|
| 212 |
+
In practice, one defines two sequences $p_n, q_n$ called the convergents, such that
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
a _ {0} + \frac {b _ {1}}{a _ {1} + \frac {b _ {2}}{a _ {2} + \frac {b _ {3}}{\ddots + \frac {b _ {n}}{a _ {n}}}}} = \frac {p _ {n}}{q _ {n}}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
and then both sequences satisfy a recurrence relation, summarized by the following matrix product:
|
| 219 |
+
|
| 220 |
+
$$
|
| 221 |
+
\left[ \begin{array}{c c} 1 & a _ {0} \\ 0 & 1 \end{array} \right] \prod_ {i = 1} ^ {n} \left[ \begin{array}{c c} 0 & b _ {i} \\ 1 & a _ {i} \end{array} \right] = \left[ \begin{array}{c c} p _ {n - 1} & p _ {n} \\ q _ {n - 1} & q _ {n} \end{array} \right]
|
| 222 |
+
$$
|
| 223 |
+
|
| 224 |
+
The special case of $b_{n} \equiv 1$ is called a (regular) continued fraction. $\mathcal{C}$ -transforms are the special case of $a_{n} \equiv 1$ . Using basic transformations, any generalized continued fraction can be converted into this latter form.
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
Figure 5: Equivalences between continued fractions. Expanding on figure 1, our representation of the continued fractions enables each integer relation to capture an infinite family of formulas. This redundancy is mostly eliminated by using the $\mathcal{C}$ -transform. Additional equivalences still exist, as discussed in section 4 and shown by the second integer relation.
|
| 228 |
+
|
| 229 |
+
Our choice of $\mathcal{C}$ -transforms arises from the following equivalence transformation property of continued fractions: Given any $GCF[a_n, b_n]$ and nonzero sequence $c_n$ , the following equality holds:
|
| 230 |
+
|
| 231 |
+
$$
|
| 232 |
+
a _ {0} + \frac {b _ {1}}{a _ {1} + \frac {b _ {2}}{a _ {2} + \frac {b _ {3}}{\ddots}}} = a _ {0} + \frac {c _ {1} b _ {1}}{c _ {1} a _ {1} + \frac {c _ {1} c _ {2} b _ {2}}{c _ {2} a _ {2} + \frac {c _ {2} c _ {3} b _ {3}}{\ddots}}}
|
| 233 |
+
$$
|
| 234 |
+
|
| 235 |
+
Or, more compactly, $c_{0}GCF[a_{n},b_{n}] = GCF[c_{n}a_{n},c_{n - 1}c_{n}b_{n}]$ (see figure 5 for more concrete examples). This equality holds even if neither side converges, in which case the convergents still coincide for all $n$ . As such, if $a_{n}\neq 0$ , the choice of $c_{n} = \frac{1}{a_{n}}$ yields $\frac{1}{a_0} GCF[a_n,b_n] = \mathcal{C}[b_n / (a_{n - 1}a_n)]$ .
|
| 236 |
+
|
| 237 |
+
# B REBOUNDING DETECTION
|
| 238 |
+
|
| 239 |
+
Since we have elected to nullify two of the three stopping conditions of PSLQ, we must consider whether or not the remaining stopping condition can always be achieved. Namely, can every run of PSLQ terminate when only stopping once tolerance has been achieved. Even with a fairly standard choice of $75\%$ tolerance, the answer is no, at least for the implementation we use. However, our experiments show that all such cases appear to exhibit the same general behavior: PSLQ first gradually increases the precision of the integer relation as usual, and at some point before reaching tolerance, it reverses course and starts reducing the precision (see figure 6 for an example run).
|
| 240 |
+
|
| 241 |
+
Our implementation of PSLQ includes a failsafe that detects this behavior: As PSLQ iterates in the main algorithm, remember $p_{best}$ the best precision ever obtained in the current run. If at any point $p_{current}$ the current precision satisfies $2p_{current} < p_{best}$ , abort the algorithm and return no integer relation. However, this mechanism is only enabled after an initial grace period of 100 steps. This grace period was chosen since it was observed that during the phase where the precision increases, it does not always increase monotonically, and can fluctuate.
|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
Figure 6: Example run of PSLQ showcasing the rebounding phenomenon. The y axis represents the precision of the best integer relation that PSLQ finds at each step number, which must reach the dashed line to terminate. The red dot is where the failsafe would have triggered, except that it is being prevented by the grace period to enable computing this example.
|
| 245 |
+
|
| 246 |
+
# C TIME COMPLEXITY OF THE PSLQ ALGORITHM
|
| 247 |
+
|
| 248 |
+
Given $x$ a vector of $m$ real numbers, and assuming the minimal euclidean norm of all integer relations on it is $M_x \in \mathbb{R}$ , running PSLQ to retrieve an integer relation on $x$ has a time complexity of $O(m^4 + m^3 \log M_x)$ (see (Ferguson et al., 1999) corollary 2). To estimate the time complexity of our runs of PSLQ, we substitute $M_x$ with a constant based on the working precision. When applying PSLQ on a large scale, choosing an upper bound for the precisions of the constants involved prevents this $M_x$ term from dominating the runtime, and so we can asymptotically treat this as a constant, leaving us with a time complexity of $O(m^4)$ .
|
| 249 |
+
|
| 250 |
+
Since we run PSLQ to detect specifically polynomial relations, we should evaluate $m$ in terms of the amount of constants $n$ , the maximal degree $d$ , and the order $o$ of the relation, as these dictate how many monomials we expect the polynomial to have, and in turn determine $m$ . If we ignore the limitation on the order, counting all possible monomials of a polynomial on $n$ variables with degree $d$ is identical to counting all multisets of size $d$ on $n + 1$ items, each of which represents either one of the variables, or a dummy variable that completes the monomial to degree $d$ . This has a closed form solution based on the stars and bars method:
|
| 251 |
+
|
| 252 |
+
$$
|
| 253 |
+
m = \left( \begin{array}{c} n + 1 + d - 1 \\ d \end{array} \right) = \left( \begin{array}{c} n + d \\ d \end{array} \right) = \frac {(n + d) !}{d ! n !}.
|
| 254 |
+
$$
|
| 255 |
+
|
| 256 |
+
When including the limitation on the order, one obtains a smaller value than this through a more delicate analysis, but to the best of our knowledge, no closed form solution exists. Regardless, this means that each run of PSLQ will have a time complexity of $O\left(\binom{n+d}{d}^4\right)$ .
|
| 257 |
+
|
| 258 |
+
# D THE GENERALIZEABILITY OF RETURN ON INVESTMENT (ROI)
|
| 259 |
+
|
| 260 |
+
The RoI measure that we introduced in section 3 is defined on numerically-conjectured integer relations. Our work relies on the PSLQ algorithm, which is one of many integer relation algorithms, and so it is natural to ask if RoI can be applied to other integer relation algorithms and reach the same conclusions. Here we motivate a positive answer to this question by demonstrating the same experiment shown in section 3 (specifically figure 3), but performed on the LLL algorithm instead (Lenstra et al., 1982).
|
| 261 |
+
|
| 262 |
+
Figure 7, which is structured in an identical manner to figure 3, demonstrates a nearly identical experiment, except the PSLQ algorithm is replaced by the LLL algorithm. This experiment used the olll python package for an implementation of LLL. The result shows how the algorithms are similar yet different in terms of RoI: as $n$ increases, both algorithms exhibit greater average RoI, up to some apparent upper limit less than 1.5. However, PSLQ showed greater standard deviation than LLL, which is also visible as greater noise on each figure's (c) panel.
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
Figure 7: Experimental analysis of the Return on Investment (Rol) property, demonstrated on the LLL algorithm. (a) For each $n$ we ran LLL 100 times, with a preselected binary precision of $50 + 5n$ , and present the average Rol for each $n$ . The standard deviation for each $n$ is presented as fading errorbars, with the half length of each darkest error bar being equal to one standard deviation. The dashed line is the constant Rol of 1.3, which the plot suggests is a viable option for minimum Rol for filtering integer relations from LLL. (b) Sampled formulas listed with their Rol on panel (a). Thanks to their high precision, their Rol is much larger than our recommended Rol cutoff. (c) For each $d,n$ , we ran LLL 100 times, each with $n$ numbers between 0 and 1, each with $d$ uniformly random binary digits. Then, we present the average Rol across all 100 runs for each $d,n$ . For a fixed $n$ , the average Rol is close to constant in $d$ .
|
| 266 |
+
|
| 267 |
+
# E PROVEN FORMULAS
|
| 268 |
+
|
| 269 |
+
After having found the formulas shown in the hypergraph (figure 4), we proved some of them, and we list these proven formulas here. We also plan joint works with mathematicians that focus on the proofs of the formulas and their potential impact in the relevant fields of mathematics, to be submitted to mathematics journals. This effort complements our main contribution in this work, which is concerned with the automated generation of the formulas.
|
| 270 |
+
|
| 271 |
+
In total, we proved 47 formulas of the form $a_0 + b_1 / (a_1 + b_2 / (\ldots + b_n / (a_n + \ldots)))$ , of which 22 we showcase in this table. 6 of the formulas can be generalized to three parametric families,
|
| 272 |
+
|
| 273 |
+
presented in lines 1-9. Lines 10-25 describe additional proven formulas. The proofs rely on (1) inverting Euler's continued fraction formula with parameters $h_1, h_2, f$ to (2) create an infinite sum, which we (3) translate into a hypergeometric-function form, and (4) complete the proof using known hypergeometric identities.
|
| 274 |
+
|
| 275 |
+
Table 4: Selected list of formulas that we proved.
|
| 276 |
+
|
| 277 |
+
<table><tr><td>an</td><td>bn</td><td>h1</td><td>h2</td><td>f</td><td>Known limit of resulting infinite sum</td></tr><tr><td>ω+1</td><td>n2+ωn</td><td>-n</td><td>n+ω</td><td>1</td><td>(1+ω)(2F1(1,1,ω+2,-1)-1)</td></tr><tr><td>5</td><td>n2+4n</td><td>-n</td><td>n+4</td><td>1</td><td>-12/131+192 log 2</td></tr><tr><td>4</td><td>n2+3n</td><td>-n</td><td>n+3</td><td>1</td><td>3/-16+24 log 2</td></tr><tr><td>ω</td><td>(ωn+1)2</td><td>-ωn-1</td><td>ωn+1</td><td>1</td><td>(ω+1)(2F1(1,ω+1/ω,2ω+1/ω,-1)-1)</td></tr><tr><td>2</td><td>4n2+4n+1</td><td>-2n-1</td><td>2n+1</td><td>1</td><td>π/4-π</td></tr><tr><td>1</td><td>n2+2n+1</td><td>-n-1</td><td>n+1</td><td>1</td><td>log(2)/1-log 2</td></tr><tr><td>ω</td><td>n2+(ω+1)n+ω</td><td>-n-1</td><td>n+ω</td><td>1</td><td>(ω+1)(2F1(1,2,ω+2,-1)-1)</td></tr><tr><td>3</td><td>n2+4n+3</td><td>-n-1</td><td>n+3</td><td>1</td><td>-1+4/34-48 log 2</td></tr><tr><td>2</td><td>n2+3n+2</td><td>-n-1</td><td>n+2</td><td>1</td><td>-1+3/9-12 log 2</td></tr><tr><td>5</td><td>n2+2n</td><td>n</td><td>n+2</td><td>n+3/2</td><td>-2/17-24 log 2</td></tr><tr><td>5</td><td>n2+4n+3</td><td>-n-1</td><td>n+3</td><td>n+5/2</td><td>-3/5+28/5(-1162/3+560 log 2)</td></tr><tr><td>4</td><td>n2+n</td><td>-n</td><td>n+1</td><td>n+1</td><td>4/12-16 log 2</td></tr><tr><td>4</td><td>n2+3n+2</td><td>-n-1</td><td>n+2</td><td>n+2</td><td>-1/2+9/2(-99+144 log 2)</td></tr><tr><td>4</td><td>4n2+4n</td><td>-2n</td><td>2n+2</td><td>1</td><td>4/-2+4 log 2</td></tr><tr><td>3</td><td>n2</td><td>-n</td><td>n</td><td>n+1/2</td><td>3/3-3 log 2</td></tr><tr><td>3</td><td>n2+2n+1</td><td>-n-1</td><td>n+1</td><td>n+3/2</td><td>-1/3+10/3(-20+30 log 2)</td></tr><tr><td>3</td><td>n2+4n+4</td><td>-n-2</td><td>-n+2</td><td>n+5/2</td><td>-6/5-21/5(147/2+105 log 2)</td></tr><tr><td>1</td><td>n2+4n+4</td><td>n+2</td><td>-n-2</td><td>1</td><td>-2+3/3/2+3 log 2</td></tr><tr><td>4</td><td>4n2-1</td><td>-2n+1</td><td>2n+1</td><td>1</td><td>3/3-3/2+3π/4+1</td></tr><tr><td>2</td><td>4n2-4n-1</td><td>-2n+1</td><td>2n-1</td><td>1</td><td>4/π+1</td></tr><tr><td>5</td><td>4n2+2n-2</td><td>-2n-1</td><td>2n+2</td><td>1</td><td>4/(-20/3+16√2/3)+1</td></tr><tr><td>5</td><td>4n2+2n</td><td>-2n-1</td><td>2n</td><td>n+3/4</td><td>3+2√2</td></tr><tr><td>3</td><td>4n2-2n</td><td>-2n+1</td><td>2n</td><td>1</td><td>2+√2</td></tr><tr><td>2n2+2n+1</td><td>-n4</td><td>n2</td><td>n2</td><td>1</td><td>1/ζ(2)</td></tr><tr><td>2n+1</td><td>n4</td><td>-n2</td><td>n2</td><td>1</td><td>2/ζ(2)</td></tr></table>
|
| 278 |
+
|
| 279 |
+
# F DETAILED INTEGER RELATIONS FROM THE HYPERGRAPH
|
| 280 |
+
|
| 281 |
+
This section provides the full data underlying the hypergraph (figure 4). Recall that according to appendix A, each of the integer relations presented here can be connected to infinitely many generalized continued fractions, and the $\mathcal{C}$ -transform is chosen as a representative for them all. Thus, every vertex in the hypergraph could represent infinite formulas that we consider trivially equivalent. This reasoning motivated the use of the $\mathcal{C}$ -transform as the canonical representative that defines the vertex. The edges in the hypergraph provide additional (non-trivial) equivalences. Some of the formulas and relations shown here can be found in the literature, and others are novel, to the best of our knowledge (as denoted in the left-most column). Every integer relation has been rearranged for clarity, though binary precision and RoI (rounded down) are still computed in terms of the original integer relation.
|
| 282 |
+
|
| 283 |
+
<table><tr><td>Novelty</td><td>Integer relation</td><td>Precision</td><td>RoI</td></tr><tr><td>Known</td><td>C[1156n6-765n4+219n2-25] = 6/5ζ(3)</td><td>53147</td><td>6643.3</td></tr><tr><td>Known</td><td>C[-n6/36n6-21n4+7n2-1] = 8/7ζ(3)</td><td>53146</td><td>5905.1</td></tr><tr><td>Known</td><td>C[-16n6/100n6-45n4+21n2-4] = 6/7ζ(3)</td><td>53147</td><td>6643.3</td></tr><tr><td>New</td><td>C[-n10/4n10+63n8+264n6-154n4+57n2-9] = 2/6ζ(5)-6ζ(3)+3</td><td>160</td><td>11.4</td></tr><tr><td>New</td><td>C[-n10/4n10+63n8+296n6+158n4+137n2-49] = 2/14ζ(5)+42ζ(3)-63</td><td>162</td><td>7.3</td></tr><tr><td>New</td><td>C[-n10/4n10+143n8+1364n6+286n4+517n2-169] = 64/832ζ(5)+2288ζ(3)-3549</td><td>234</td><td>5.2</td></tr><tr><td>New</td><td>C[-n6/4n6+99n4+651n2-169] = 8/104ζ(3)-117</td><td>197</td><td>9.3</td></tr><tr><td>New</td><td>C[-n6/4n6+195n4+2451n2-625] = 216/5400ζ(3)-6275</td><td>269</td><td>7.2</td></tr><tr><td>New</td><td>C[-4n6-2n5/9n6+33n5+25n4-13n3-12n2+2n+2] = 5/4ζ(3)</td><td>53147</td><td>6643.3</td></tr><tr><td>New</td><td>C[-n6/4n6+35n4+91n2-25] = 1/5ζ(3)-5</td><td>122</td><td>12.2</td></tr><tr><td>New</td><td>C[-4n6/16n6+572n4+5332n2-1369] = 6750/874125ζ(3)-1043992</td><td>226</td><td>4</td></tr><tr><td>New</td><td>C[-4n6/16n6+252n4+1092n2-289] = 54/3213ζ(3)-3808</td><td>156</td><td>4.7</td></tr><tr><td>New</td><td>C[-n6/4n6+323n4+6643n2-1681] = 1728/70848ζ(3)-83435</td><td>341</td><td>7.1</td></tr><tr><td>New</td><td>C[-n6/4n6+675n4+28731n2-7225] = 4800/408000ζ(3)-485639</td><td>487</td><td>9</td></tr><tr><td>New</td><td>C[-n6/4n6+483n4+14763n2-3721] = 216000/13176000ζ(3)-15622283</td><td>409</td><td>5.9</td></tr><tr><td>Known</td><td>C[-2n4-9n3-12n2-4n/9n4+48n3+85n2+56n+9] = 8/54-27ζ(2)</td><td>53146</td><td>2952.5</td></tr><tr><td>Known</td><td>C[-n4/121n4-55n2+9] = 5/3ζ(2)</td><td>53149</td><td>7592.7</td></tr><tr><td>Known</td><td>C[-2n4-13n3-22n2-8n/9n4+72n3+189n2+180n+45] = 16/240-135ζ(2)</td><td>53144</td><td>2214.3</td></tr><tr><td>Known</td><td>C[-4n4-6n3/25n4+90n3+111n2+54n+10] = 9/30ζ(2)-40</td><td>53146</td><td>2952.5</td></tr><tr><td>Known</td><td>C[-2n4-5n3-3n2+n+1/9n4+36n3+51n2+30n+7] = 3ζ(2)+2/42-21ζ(2)</td><td>53146</td><td>2797.1</td></tr><tr><td>Known</td><td>C[-2n4-9n3-9n2+n+3/9n4+60n3+139n2+130n+39] = 9ζ(2)/208-117ζ(2)</td><td>53144</td><td>2415.6</td></tr><tr><td>Known</td><td>C[-2n4-7n3-4n2+4n/9n4+48n3+85n2+56n+9] = 8/27ζ(2)-36</td><td>53146</td><td>2952.5</td></tr><tr><td>Known</td><td>C[-2n4-11n3-18n2-4n+8/9n4+72n3+213n2+276n+133] = 12ζ(2)-32/456-285ζ(2)</td><td>53142</td><td>1660.6</td></tr><tr><td>Known</td><td>C[-8n4/49n4-21n2+4] = 2/ζ(2)</td><td>53151</td><td>10630.2</td></tr><tr><td>Known</td><td>C[-2n4+n3/9n4-3n2+1] = 4/3ζ(2)</td><td>53149</td><td>7592.7</td></tr><tr><td>Known</td><td>C[-4n4+2n3/25n4+10n3-9n2-2n+2] = 3/2ζ(2)</td><td>53150</td><td>8858.3</td></tr><tr><td>New</td><td>C[-2n4-9n3-9n2+n+3/9n4+48n3+61n2-8n-15] = 45ζ(2)-48π+66/225ζ(2)-240π-370</td><td>53143</td><td>1062.8</td></tr><tr><td>New</td><td>C[-n4/4n4+24n2+49] = 2/14ζ(2)-21</td><td>101</td><td>7.2</td></tr><tr><td>New</td><td>C[-n4/4n4+48n2+169] = 18/403-234ζ(2)</td><td>138</td><td>5.5</td></tr><tr><td>New</td><td>5ln2 = 5/c[-n2/16n2-4] - 2/c[-n2/100n2-25]</td><td>53150</td><td>4831.8</td></tr><tr><td>New</td><td>14ln2 = 2/c[-n2/196n2-49] + 7/c[-n2/16n2-4]</td><td>53148</td><td>4429</td></tr><tr><td>New</td><td>35ln2 = 10/c[-n2/196n2-49] + 14/c[-n2/100n2-25]</td><td>53147</td><td>3126.2</td></tr><tr><td>New</td><td>C[-n2/36n2-9] = 2/3ln2</td><td>53150</td><td>8858.3</td></tr><tr><td>New</td><td>C\(\left[\frac{-4n^4-6n^3}{16n^4+24n^3+117n^2+81n+238}\right]=\frac{3}{544\ln 2-374}\)</td><td>108</td><td>4.5</td></tr><tr><td>Known</td><td>C\(\left[\frac{-2n^4-10n^3-14n^2-6n}{9n^4+60n^3+139n^2+130n+39}\right]=\frac{6}{221-234G}\)</td><td>53144</td><td>2415.6</td></tr><tr><td>Known</td><td>C\(\left[\frac{-2n^4-4n^3}{9n^4+24n^3+13n^2-4n-3}\right]=\frac{2}{6G-3}\)</td><td>53149</td><td>5314.9</td></tr><tr><td>Known</td><td>C\(\left[\frac{-2n^4-8n^3-8n^2}{9n^4+48n^3+85n^2+56n+9}\right]=\frac{4}{54G-45}\)</td><td>53146</td><td>2952.5</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-6n^3}{9n^4-3n^2+1}\right]=\frac{720}{450G-299}\)</td><td>53140</td><td>1714.1</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-12n^3-24n^2-16n}{9n^4+48n^3+85n^2+56n+9}\right]=\frac{32}{18G+45}\)</td><td>53148</td><td>2657.4</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-14n^3-32n^2-24n}{9n^4+48n^3+85n^2+56n+9}\right]=\frac{64}{54G+39}\)</td><td>53146</td><td>2415.7</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-2n^3}{9n^4-3n^2+1}\right]=\frac{2}{2G-1}\)</td><td>53149</td><td>6643.6</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-12n^3-16n^2}{9n^4+72n^3+189n^2+180n+45}\right]=\frac{16}{450G-395}\)</td><td>53143</td><td>2043.9</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-14n^3-28n^2-16n}{9n^4+72n^3+189n^2+180n+45}\right]=\frac{32}{285-270G}\)</td><td>53144</td><td>1968.2</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-16n^3-40n^2-32n}{9n^4+72n^3+189n^2+180n+45}\right]=\frac{128}{255-90G}\)</td><td>53145</td><td>2044</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-4n^3}{9n^4-3n^2+1}\right]=\frac{24}{18G-11}\)</td><td>53145</td><td>3126.1</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-12n^3-24n^2-16n}{9n^4+72n^3+213n^2+276n+133}\right]=\frac{8}{1026G-931}\)</td><td>53141</td><td>1897.8</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-14n^3-30n^2-18n}{9n^4+84n^3+283n^2+406n+207}\right]=\frac{12}{1909-2070G}\)</td><td>53141</td><td>1771.3</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-8n^3-8n^2}{9n^4+24n^3+13n^2-4n-3}\right]=\frac{16}{18G-3}\)</td><td>53147</td><td>3543.1</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-10n^3-12n^2}{9n^4+24n^3+13n^2-4n-3}\right]=\frac{96}{90G-31}\)</td><td>53151</td><td>10630.2</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-6n^3-6n^2-2n}{9n^4+36n^3+51n^2+30n+7}\right]=\frac{1}{14-14G}\)</td><td>53144</td><td>2415.6</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-6n^3-4n^2}{9n^4+24n^3+13n^2-4n-3}\right]=\frac{4}{6G+3}\)</td><td>53150</td><td>4831.8</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-10n^3-8n^2}{9n^4+48n^3+61n^2-8n-15}\right]=\frac{16}{30G-5}\)</td><td>53147</td><td>3321.6</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-12n^3-16n^2}{9n^4+48n^3+61n^2-8n-15}\right]=\frac{64}{90G+65}\)</td><td>53146</td><td>2214.4</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-8n^3}{9n^4+48n^3+61n^2-8n-15}\right]=\frac{24}{90G-55}\)</td><td>53145</td><td>2530.7</td></tr><tr><td>New</td><td>C\(\left[\frac{-2n^4-10n^3-16n^2-8n}{9n^4+48n^3+85n^2+56n+9}\right]=\frac{8}{27-18G}\)</td><td>53148</td><td>3126.3</td></tr><tr><td>Known</td><td>φ² - φ - 1 = 0</td><td>53148</td><td>8858</td></tr><tr><td>Known</td><td>√2² = 2</td><td>53147</td><td>10629.4</td></tr><tr><td>Known</td><td>√3² = 3</td><td>53147</td><td>10629.4</td></tr><tr><td>Known</td><td>C[-1/5] = φ+2/5</td><td>53149</td><td>5905.4</td></tr><tr><td>Known</td><td>C[-1/9] = φ+1/3</td><td>53149</td><td>7592.7</td></tr><tr><td>Known</td><td>C[1/5] = φ+1/2φ-1</td><td>53149</td><td>5905.4</td></tr><tr><td>Known</td><td>C[1] = φ+1/φ</td><td>53150</td><td>8858.3</td></tr><tr><td>Known</td><td>C[1/2] = √3+1/2</td><td>53149</td><td>7592.7</td></tr><tr><td>Known</td><td>C[-1/8] = √2+1/2√2</td><td>53149</td><td>7592.7</td></tr><tr><td>Known</td><td>C[1/4] = 1/2√2-2</td><td>53147</td><td>6643.3</td></tr><tr><td>Known</td><td>9C[2/9]² - 9C[2/9] - 2 = 0</td><td>53153</td><td>4088.6</td></tr><tr><td>New</td><td>C[6n²+3n/n²+3n+2] = φ√3+3φ+√3/2√3+2</td><td>53147</td><td>4088.2</td></tr><tr><td>New</td><td>C [4n/2n+3] = √2√3-2√2-2√3+2/3-3√2</td><td>53146</td><td>3126.2</td></tr><tr><td>New</td><td>25C [n2+3n/3n2+9n+6]2 - 27C [n2+3n/3n2+9n+6] - 3 = 0</td><td>53151</td><td>3543.4</td></tr><tr><td>New</td><td>9C [4n/2n+3]2 - 12C [4n/2n+3] - 2 = 0</td><td>53152</td><td>4088.6</td></tr><tr><td>Known</td><td>C [3/n] = 4C2e+14e-17/9</td><td>53145</td><td>2657.2</td></tr><tr><td>Known</td><td>C2 = e2-7/2</td><td>53146</td><td>5905.1</td></tr><tr><td>New</td><td>C [2n/n2+7n+12] = 1/15C2-2</td><td>53147</td><td>5314.7</td></tr><tr><td>New</td><td>C [2n/n2+9n+20] = 4C2+14/5C2+15</td><td>53152</td><td>2952.8</td></tr><tr><td>New</td><td>C [2n/n2+7n+12] = 2C2+7/2C2+8</td><td>53151</td><td>3543.4</td></tr><tr><td>New</td><td>C [2/n] = C2 + 2</td><td>53151</td><td>7593</td></tr><tr><td>New</td><td>C [2n+4/n2+n] = 2C2+8/C2+3</td><td>53152</td><td>4088.6</td></tr><tr><td>New</td><td>C [2n/n2+3n+2] = 2/3C2+1</td><td>53149</td><td>6643.6</td></tr><tr><td>New</td><td>C [2n/n2+5n+6] = 2C2+7/3C2+9</td><td>53153</td><td>3543.5</td></tr><tr><td>New</td><td>C [2n/n2+5n+6] = 2/9C2</td><td>53148</td><td>6643.5</td></tr><tr><td>New</td><td>(36e-81)C [2n/4n2+8n+3]2 - 18C [2n/4n2+8n+3] - 1 = 0</td><td>53143</td><td>2310.5</td></tr><tr><td>New</td><td>(e-1)C [2n/4n2-1]2 - 2C [2n/4n2-1] - 1 = 0</td><td>53147</td><td>5905.2</td></tr><tr><td>New</td><td>(e-1)9C [2n/4n2+8n+3]2 - 6eC [2n/4n2+8n+3] + e = 0</td><td>53147</td><td>3321.6</td></tr><tr><td>Known</td><td>C [4n-4n2-2n+2/16n4+48n3+36n2-5] = 2e-2/5e-10</td><td>53147</td><td>3543.1</td></tr><tr><td>Known</td><td>C [1/16n2-4] = e+1/2e-2</td><td>53148</td><td>5314.8</td></tr><tr><td>Known</td><td>C [1/n] = e-1</td><td>53149</td><td>8858.1</td></tr><tr><td>Known</td><td>C [n-1/n2+5n+6] = e/3</td><td>53149</td><td>10629.8</td></tr><tr><td>Known</td><td>C [n-4n2-6n/16n4+80n3+132n2+80n+11] = 3/33-11e</td><td>53145</td><td>3543</td></tr><tr><td>Known</td><td>C [n-2n/n2+3n+2] = e/2e-2</td><td>53149</td><td>6643.6</td></tr><tr><td>Known</td><td>C [n-3n-2n2/n4+4n3+7n2+6n+3] = 4e/6e-3</td><td>53148</td><td>4831.6</td></tr><tr><td>Known</td><td>C [n/n2+5n+6] = 1/18e-48</td><td>53144</td><td>3542.9</td></tr><tr><td>Known</td><td>C [n-1/n2+7n+12] = e/4e-8</td><td>53147</td><td>4831.5</td></tr><tr><td>Known</td><td>C [n-1/n2+11n+30] = e/54e-144</td><td>53143</td><td>2952.3</td></tr><tr><td>Known</td><td>C [n/n2+3n+2] = 1/4e-10</td><td>53147</td><td>4831.5</td></tr><tr><td>Known</td><td>C [n-1/n2+9n+20] = e/30-10e</td><td>53145</td><td>4088</td></tr><tr><td>Known</td><td>C [n-3n2/n4+10n3+33n2+40n+14] = 6e/14e-21</td><td>53146</td><td>3543</td></tr><tr><td>New</td><td>C [n/n2+9n+20] = 1/600e-1630</td><td>53139</td><td>2125.5</td></tr><tr><td>New</td><td>C [n/n2+7n+12] = 1/96e-260</td><td>53142</td><td>2657.1</td></tr><tr><td>Known</td><td>C [n-2n2-n+1/9n2+15n+4] = π/16-4π</td><td>53150</td><td>4429.1</td></tr><tr><td>Known</td><td>C [n2+2n/4n2+8n+3] = 4/3π-6</td><td>53150</td><td>4831.8</td></tr><tr><td>Known</td><td>C [n2/4n2-1] = 4/π</td><td>53151</td><td>8858.5</td></tr><tr><td>Known</td><td>C[−2n2−n/9n2+15n+4] = 1/20-6π</td><td>53149</td><td>4429</td></tr><tr><td>Known</td><td>C[na+4n/4n2+16n+15] = 8/15π-40</td><td>53147</td><td>3126.2</td></tr><tr><td>Known</td><td>C[−2n2−3n/9n2+21n+10] = 6/15π-40</td><td>53148</td><td>3321.7</td></tr><tr><td>Known</td><td>C[1-2n/9n+9] = 4/9π-24</td><td>53148</td><td>3543.2</td></tr><tr><td>Known</td><td>C[−2n2+n/9n2+3n-2] = 1/π-2</td><td>53152</td><td>7593.1</td></tr><tr><td>Known</td><td>C[1-2n/9n] = π/6</td><td>53153</td><td>5905.8</td></tr><tr><td>Known</td><td>C[−2n2−3n+2/9n2+33n+28] = 6π-32/448-147π</td><td>53145</td><td>1771.5</td></tr><tr><td>Known</td><td>C[−2n2−n+1/9n2+21n+10] = 4-3π/30π-100</td><td>53147</td><td>2530.8</td></tr><tr><td>Known</td><td>C[−2n2−3n+2/9n2+21n+10] = 2π+8/5π</td><td>53151</td><td>4429.2</td></tr><tr><td>Known</td><td>C[−2n2+n/9n2−3n-2] = 2/π</td><td>53152</td><td>10630.4</td></tr><tr><td>New</td><td>C[−2n4−9n3−9n2+n+3/9n4+36n3+39n2+6n-5] = 6π+21/10π+25</td><td>53148</td><td>2530.8</td></tr><tr><td>New</td><td>C[−2n2−5n+3/9n2+39n+40] = 9π/256-72π</td><td>53146</td><td>2310.6</td></tr><tr><td>New</td><td>C[1-2n/9n+18] = 32-15π/270π-864</td><td>53144</td><td>1610.4</td></tr><tr><td>New</td><td>C[−2n2−5n+3/9n2+33n+28] = 9π+24/56</td><td>53148</td><td>2952.6</td></tr><tr><td>New</td><td>C[−2n2+n/9n2+21n+10] = 48/525π-1600</td><td>53143</td><td>1771.4</td></tr><tr><td>New</td><td>C[−2n2−5n+3/9n2+21n+10] = 27π+84/30π+100</td><td>53147</td><td>1898.1</td></tr><tr><td>New</td><td>C[−2n2−n/9n2+21n+10] = 4/240-75π</td><td>53147</td><td>2530.8</td></tr><tr><td>New</td><td>C[−2n2−5n+3/9n2+27n+18] = 5π+16/6π+16</td><td>53150</td><td>2657.5</td></tr><tr><td>New</td><td>C[−2n2+n/9n2+15n+4] = 3/15π-44</td><td>53149</td><td>3543.2</td></tr><tr><td>Known</td><td>πe/2 = (1/C[n] + 1/2C[1-2n/4n2+4n-1])^2</td><td>2946</td><td>84.1</td></tr><tr><td>New</td><td>πe/2 = (1/C[n] + C[1/2n])^2</td><td>2947</td><td>245.5</td></tr><tr><td>New</td><td>πe/2 = (1/C[n] - C[1+2n/2n2+2n-1]/C[1-2n/2n2+2n-2]^2)</td><td>2949</td><td>62.7</td></tr><tr><td>Known</td><td>C[1/n^2+n] = 1/C1</td><td>53151</td><td>13287.75</td></tr><tr><td>New</td><td>C[4n^2+4n-3/4n^4+20n^3+39n^2+35n+14] = 3C1+3/7C1</td><td>53149</td><td>5314.9</td></tr></table>
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed6f4992cd95e6e6bcd5bf4c66e431b2bf78a75d08efeb316a05723ffaa7b25e
|
| 3 |
+
size 1478969
|
2025/The Ramanujan Library - Automated Discovery on the Hypergraph of Integer Relations/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_content_list.json
ADDED
|
@@ -0,0 +1,1980 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "THE RISE AND DOWN OF BABEL TOWER: INVESTIGATING THE EVOLUTION PROCESS OF MULTILINGUAL CODE LARGE LANGUAGE MODEL",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
171,
|
| 8 |
+
98,
|
| 9 |
+
826,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Jiawei Chen $^{1,2}$ , Wentao Chen $^{3}$ , Jing Su $^{3}$ , Jingjing Xu $^{3}$ , Hongyu Lin $^{1}$ *, Mengjie Ren $^{1,2}$ , Yaojie Lu $^{1}$ , Xianpei Han $^{1}$ , Le Sun $^{1}$ ,",
|
| 17 |
+
"bbox": [
|
| 18 |
+
179,
|
| 19 |
+
193,
|
| 20 |
+
787,
|
| 21 |
+
223
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "$^{1}$ Chinese Information Processing Laboratory, Institute of Software, Chinese Academy of Sciences \n $^{2}$ University of Chinese Academy of Sciences",
|
| 28 |
+
"bbox": [
|
| 29 |
+
179,
|
| 30 |
+
223,
|
| 31 |
+
825,
|
| 32 |
+
248
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "3ByteDance Inc.",
|
| 39 |
+
"bbox": [
|
| 40 |
+
181,
|
| 41 |
+
250,
|
| 42 |
+
294,
|
| 43 |
+
266
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "ABSTRACT",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
450,
|
| 53 |
+
303,
|
| 54 |
+
547,
|
| 55 |
+
318
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Large language models (LLMs) have shown significant multilingual capabilities. However, the mechanisms underlying the development of these capabilities during pre-training are not well understood. In this paper, we use code LLMs as an experimental platform to explore the evolution of multilingual capabilities in LLMs during the pre-training process. Based on our observations, we propose the Babel Tower Hypothesis, which describes the entire process of LLMs acquiring new language capabilities. During the learning process, multiple languages initially share a single knowledge system dominated by the primary language and gradually develop language-specific knowledge systems. We then validate the above hypothesis by tracking the internal states of the LLMs through identifying working languages and language transferring neurons. Experimental results show that the internal state changes of the LLM are consistent with our Babel Tower Hypothesis. Building on these insights, we propose a novel method to construct an optimized pre-training corpus for multilingual code LLMs, which significantly outperforms LLMs trained on the original corpus. The proposed Babel Tower Hypothesis provides new insights into designing pre-training data distributions to achieve optimal multilingual capabilities in LLMs.",
|
| 62 |
+
"bbox": [
|
| 63 |
+
228,
|
| 64 |
+
334,
|
| 65 |
+
767,
|
| 66 |
+
571
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "A united human race speaking a single language migrates to Shinar where they agree to build a great city with a tower that would reach the sky. Yahweh, observing these efforts and remarking on humanity's power in unity, confounds their speech so that they can no longer understand each other and scatters them around the world, leaving the city unfinished.",
|
| 73 |
+
"bbox": [
|
| 74 |
+
227,
|
| 75 |
+
595,
|
| 76 |
+
754,
|
| 77 |
+
660
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "- The story of Babel Tower",
|
| 84 |
+
"bbox": [
|
| 85 |
+
596,
|
| 86 |
+
664,
|
| 87 |
+
767,
|
| 88 |
+
680
|
| 89 |
+
],
|
| 90 |
+
"page_idx": 0
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"type": "text",
|
| 94 |
+
"text": "1 INTRODUCTION",
|
| 95 |
+
"text_level": 1,
|
| 96 |
+
"bbox": [
|
| 97 |
+
171,
|
| 98 |
+
737,
|
| 99 |
+
336,
|
| 100 |
+
752
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Large language models (LLMs) have demonstrated remarkable multilingual capabilities (Philippy et al., 2023; Choenni et al., 2023), even in some low-resource languages (Lai et al., 2023; Chirkova & Nikoulina, 2024). Remarkably, LLMs are commonly pre-trained on multilingual corpora and demonstrate multilingual capabilities during the pre-training stage (Tanwar et al., 2023; Cahyawijaya et al., 2024). Consequently, an important question arises: how do the multilingual capabilities of LLMs evolve during pre-training process?",
|
| 107 |
+
"bbox": [
|
| 108 |
+
169,
|
| 109 |
+
768,
|
| 110 |
+
826,
|
| 111 |
+
854
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Many previous works have explored the multilingual mechanisms of LLMs. However, most of them are limited to investigating existing pre-trained LLMs rather than the dynamic process of",
|
| 118 |
+
"bbox": [
|
| 119 |
+
169,
|
| 120 |
+
859,
|
| 121 |
+
826,
|
| 122 |
+
888
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "header",
|
| 128 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 129 |
+
"bbox": [
|
| 130 |
+
171,
|
| 131 |
+
32,
|
| 132 |
+
478,
|
| 133 |
+
47
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "page_footnote",
|
| 139 |
+
"text": "* Corresponding authors.",
|
| 140 |
+
"bbox": [
|
| 141 |
+
189,
|
| 142 |
+
896,
|
| 143 |
+
346,
|
| 144 |
+
909
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 0
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "page_footnote",
|
| 150 |
+
"text": "<https://en.wikipedia.org/wiki/Tower_of_Babel",
|
| 151 |
+
"bbox": [
|
| 152 |
+
192,
|
| 153 |
+
910,
|
| 154 |
+
588,
|
| 155 |
+
922
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 0
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "page_number",
|
| 161 |
+
"text": "1",
|
| 162 |
+
"bbox": [
|
| 163 |
+
493,
|
| 164 |
+
948,
|
| 165 |
+
504,
|
| 166 |
+
959
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 0
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "pre-training. Some works have found that multilingual capabilities are similar to the translation process (Zhang et al., 2023). The LLMs form distinct language systems within their intermediate layers (Zhong et al., 2024; Wendler et al., 2024), and during generating, the LLMs transform the knowledge in these systems into target language tokens using language-specific neurons at top layers (Tang et al., 2024). Although these works explain the multilingual mechanism of existing LLMs, the formation of the mechanism during pre-training remains unexplored.",
|
| 173 |
+
"bbox": [
|
| 174 |
+
169,
|
| 175 |
+
103,
|
| 176 |
+
826,
|
| 177 |
+
189
|
| 178 |
+
],
|
| 179 |
+
"page_idx": 1
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "In this paper, we use code LLMs as an experimental platform to explore the evolution of multilingual capabilities in LLMs during the pre-training process (Li et al., 2023a; Guo et al., 2024). Specifically, we conducted preliminary experiments to analyze how monolingual LLMs learn a new language by continual pre-training the monolingual LLM on the corpus with the new language, similar to the setting of Zheng et al. (2024). As illustrated in Figure 1, our key finding is that the model's capabilities in newly added languages exhibit a pattern of rapid initial improvement, followed by a decline, and then stabilization (or slow improvement). Additionally, we observed that the point at which the capabilities of new languages begins to decline initially aligns closely with the point at which the knowledge transferred from the dominant language starts to decline. In the later stages of learning new languages, their performance gradually diverges from that of the domi",
|
| 184 |
+
"bbox": [
|
| 185 |
+
169,
|
| 186 |
+
194,
|
| 187 |
+
454,
|
| 188 |
+
526
|
| 189 |
+
],
|
| 190 |
+
"page_idx": 1
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "text",
|
| 194 |
+
"text": "nant language. This phenomenon suggests that in the early stages of learning, the capabilities of new language entirely rely on the capabilities of the dominant language existing in the LLM. As training progresses, the performance of the new languages gradually diverges from that of the dominant language. Based on these findings, we propose the Babel Tower Hypothesis, which posits that during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses. With Babel Tower Hypothesis, the process of LLMs learning a new language can be divided into three stages: (1) Translation Stage: The LLM extensively relies on the dominant language knowledge system to response to the new language. (2) Transition Stage: The knowledge system of the new language is gradually established, and the generation of the new language increasingly transitions from the dominant language system to the new language system. (3) Stabilization Stage: The new language's responses primarily depend on its own system. To validate Babel Tower Hypothesis, we further track the internal states of the LLMs at various stages by identifying working languages (Wendler et al., 2024) and language transferring neurons (Tang et al., 2024) and found that the internal state changes of the LLM are consistent with our hypothesis: the generation of new language tokens progressively shifts from translating the primary language to utilizing its own system.",
|
| 195 |
+
"bbox": [
|
| 196 |
+
169,
|
| 197 |
+
527,
|
| 198 |
+
826,
|
| 199 |
+
763
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 1
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "text",
|
| 205 |
+
"text": "Additionally, our experiments have revealed that the establishment of new language knowledge systems does not necessarily lead to improved performance in those languages. In other words, for many languages, relying on a strong dominant language and translating its knowledge is more effective than building a new knowledge system using their own data. Building on these insights, we propose a novel method to construct the pre-training corpus for multilingual code LLM pre-training to achieve optimal performance. Specifically, we utilize the new language acquisition experiments to establish the relationship between performance and pre-training data distribution across different languages. By estimating the language distribution that corresponds to optimal performance, we can construct a pre-training corpus with an optimal distribution. Experimental results show that the code LLMs pre-trained with our optimized pre-training corpus significantly outperform those pretrained with the original corpus by a large margin. Therefore, the proposed Babel Tower Hypothesis",
|
| 206 |
+
"bbox": [
|
| 207 |
+
169,
|
| 208 |
+
768,
|
| 209 |
+
826,
|
| 210 |
+
924
|
| 211 |
+
],
|
| 212 |
+
"page_idx": 1
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"type": "image",
|
| 216 |
+
"img_path": "images/571b610ae0093c319f5cb637b46c5092a50753943b1cf93f25a8e4a43a2d607a.jpg",
|
| 217 |
+
"image_caption": [
|
| 218 |
+
"Figure 1: The evolution of a LLM learning a new language. In this figure, Python serves as the initial dominant language, with PHP as the new language. The process consists of three distinct stages: (1) Translation Stage: the performance of PHP improves rapidly and the Python system is dominated in the LLM, and PHP generation primarily relies on the Python system; (2) Transition Stage: the performance of PHP begins to decline while it gradually forms its own system; (3) Stabilization Stage: the performance of PHP stabilizes, and the generation of PHP depends on its own system."
|
| 219 |
+
],
|
| 220 |
+
"image_footnote": [],
|
| 221 |
+
"bbox": [
|
| 222 |
+
480,
|
| 223 |
+
204,
|
| 224 |
+
807,
|
| 225 |
+
349
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 1
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "header",
|
| 231 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 232 |
+
"bbox": [
|
| 233 |
+
173,
|
| 234 |
+
32,
|
| 235 |
+
478,
|
| 236 |
+
47
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 1
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "page_number",
|
| 242 |
+
"text": "2",
|
| 243 |
+
"bbox": [
|
| 244 |
+
491,
|
| 245 |
+
946,
|
| 246 |
+
504,
|
| 247 |
+
959
|
| 248 |
+
],
|
| 249 |
+
"page_idx": 1
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"type": "text",
|
| 253 |
+
"text": "provides a new insight into how we should design the data ratios for different languages during the pre-training stage to achieve optimal multilingual capabilities in LLMs.",
|
| 254 |
+
"bbox": [
|
| 255 |
+
169,
|
| 256 |
+
103,
|
| 257 |
+
823,
|
| 258 |
+
133
|
| 259 |
+
],
|
| 260 |
+
"page_idx": 2
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"type": "text",
|
| 264 |
+
"text": "Generally speaking, the contributions of this paper are:",
|
| 265 |
+
"bbox": [
|
| 266 |
+
171,
|
| 267 |
+
138,
|
| 268 |
+
535,
|
| 269 |
+
154
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 2
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "list",
|
| 275 |
+
"sub_type": "text",
|
| 276 |
+
"list_items": [
|
| 277 |
+
"- We propose the Babel Tower Hypothesis to explain the evolution process of multilingual LLM during pre-training: during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses.",
|
| 278 |
+
"- We validate the Babel Tower Hypothesis in code LLMs by employing two methods to probe and analyze the internal states of LLMs during pre-training. Meanwhile, we revealed that for many languages, relying on a strong dominant language and translating its knowledge is more effective than building a new knowledge system using their own data.",
|
| 279 |
+
"- We design an effective method to construct a pre-training corpus with optimal distribution across different languages, providing a guide for the pre-training process."
|
| 280 |
+
],
|
| 281 |
+
"bbox": [
|
| 282 |
+
215,
|
| 283 |
+
165,
|
| 284 |
+
826,
|
| 285 |
+
330
|
| 286 |
+
],
|
| 287 |
+
"page_idx": 2
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "text",
|
| 291 |
+
"text": "2 RELATED WORK",
|
| 292 |
+
"text_level": 1,
|
| 293 |
+
"bbox": [
|
| 294 |
+
171,
|
| 295 |
+
349,
|
| 296 |
+
341,
|
| 297 |
+
366
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 2
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "Previous works mainly focused on studying the multilingual mechanisms within existing pre-trained LLMs. The primary approach they employ involves designing experiments to observe the generated outputs or internal states of these models. The primary methods of investigation can be categorized into three types: (1) analyzing the generation of the model: on the one hand, LLM can leverage knowledge acquired in various languages to generate outputs (Chen et al., 2022; Zhang et al., 2023; Kew et al., 2023; Yao et al., 2024). On the other hand, in many cases, the consistency of generated content across different languages remains low (Ohmer et al., 2023; Qi et al., 2023; Gao et al., 2024). (2) analyzing the output of intermediate layers: Wendler et al. (2024) use the logit lens method (Nostalgebraist, 2020) to detect the output tokens of intermediate layers in LLaMA-2 (Touvron et al., 2023). They discovered that these layers primarily operate in English, generating English tokens in the intermediate layers, even when the final output tokens are in other languages. Additionally, Zhong et al. (2024) found that the working languages are related to pre-training corpora. For instance, after continual pre-training using a Japanese corpus, LLaMA consistently produces Japanese tokens at the intermediate layers during token generation. (3) analyzing the activation states of neurons: some works identified language-specific neurons in LLMs that will be activated exclusively when processing specific languages (Tang et al., 2024; Kojima et al., 2024). Tang et al. (2024) found that these identified neurons are predominantly located in the top and bottom layers of the LLMs, serving to transform input into a unified semantic space or to transform the unified semantic space into output. Zhang et al. (2024) identify the core region in the parameters of LLMs that will influence the multilingual alignment and generalization, and they also observe that monolingual regions that will influence the ability of specific languages. In contrast to previous works, we investigate the evolution process of code LLMs during pre-training.",
|
| 304 |
+
"bbox": [
|
| 305 |
+
169,
|
| 306 |
+
382,
|
| 307 |
+
826,
|
| 308 |
+
689
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "3 THE EVOLUTION PROCESS OF MULTILINGUAL SYSTEMS",
|
| 315 |
+
"text_level": 1,
|
| 316 |
+
"bbox": [
|
| 317 |
+
171,
|
| 318 |
+
708,
|
| 319 |
+
676,
|
| 320 |
+
724
|
| 321 |
+
],
|
| 322 |
+
"page_idx": 2
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "text",
|
| 326 |
+
"text": "In this section, we investigate the evolution of multilingual capabilities in LLMs during pre-training. Specifically, we introduce the Babel Tower Hypothesis to explain how these capabilities develop and then validate this hypothesis by tracking the internal system state of the LLM using two methods.",
|
| 327 |
+
"bbox": [
|
| 328 |
+
169,
|
| 329 |
+
739,
|
| 330 |
+
583,
|
| 331 |
+
811
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 2
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "table",
|
| 337 |
+
"img_path": "images/1b419aa47bd1cc27fa9bd6044136450e80bb0c21067d7696f25c6c73d89d779a.jpg",
|
| 338 |
+
"table_caption": [
|
| 339 |
+
"Table 1: The statistics of pretraining corpus."
|
| 340 |
+
],
|
| 341 |
+
"table_footnote": [],
|
| 342 |
+
"table_body": "<table><tr><td></td><td>PHP</td><td>Go</td><td>C#</td><td>C++</td><td>Python</td></tr><tr><td>#Instances</td><td>23M</td><td>11M</td><td>37M</td><td>35M</td><td>16M</td></tr><tr><td>#Tokens</td><td>23B</td><td>11B</td><td>16B</td><td>28B</td><td>11B</td></tr></table>",
|
| 343 |
+
"bbox": [
|
| 344 |
+
607,
|
| 345 |
+
784,
|
| 346 |
+
808,
|
| 347 |
+
823
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 2
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "3.1 EXPERIMENTAL SETUP",
|
| 354 |
+
"text_level": 1,
|
| 355 |
+
"bbox": [
|
| 356 |
+
171,
|
| 357 |
+
827,
|
| 358 |
+
375,
|
| 359 |
+
842
|
| 360 |
+
],
|
| 361 |
+
"page_idx": 2
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"type": "text",
|
| 365 |
+
"text": "In this paper, the pre-training corpus is collected from GitHub, and its statistics are presented in Table 1. We conducted experiments utilizing the GPT-2 architecture (1.3 billion parameters). We consider Python as the dominant language due to its widespread use in various scenarios. The majority of experiments are conducted on a Python monolingual LLM, which will be pre-trained on corpus of other languages such as PHP, C#, Go, or C++. The training step is set to 50,000 and the",
|
| 366 |
+
"bbox": [
|
| 367 |
+
169,
|
| 368 |
+
854,
|
| 369 |
+
826,
|
| 370 |
+
925
|
| 371 |
+
],
|
| 372 |
+
"page_idx": 2
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"type": "header",
|
| 376 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 377 |
+
"bbox": [
|
| 378 |
+
171,
|
| 379 |
+
32,
|
| 380 |
+
478,
|
| 381 |
+
47
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 2
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "page_number",
|
| 387 |
+
"text": "3",
|
| 388 |
+
"bbox": [
|
| 389 |
+
493,
|
| 390 |
+
948,
|
| 391 |
+
504,
|
| 392 |
+
959
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "image",
|
| 398 |
+
"img_path": "images/918a5b648b860a075338ede72dcfe82776847ffcc1365c4f0d7ab310a2e0b613.jpg",
|
| 399 |
+
"image_caption": [
|
| 400 |
+
"Figure 2: The performance of PHP/C# (left y-axis) and the proportion of correct answers requiring knowledge from the Python corpus (Knowledge transferred from Python, right y-axis) across training steps (x-axis). Based on the performance curve, we divide the entire process into three stages. The performance improves initially, then gradually declines, and eventually stabilizes. Concurrently, in the early stages, the proportion of correct answers requiring knowledge from the Python corpus is relatively high but subsequently decreases."
|
| 401 |
+
],
|
| 402 |
+
"image_footnote": [
|
| 403 |
+
"PHP/C# performance Knowledge transferred from Python"
|
| 404 |
+
],
|
| 405 |
+
"bbox": [
|
| 406 |
+
192,
|
| 407 |
+
95,
|
| 408 |
+
498,
|
| 409 |
+
243
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 3
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "image",
|
| 415 |
+
"img_path": "images/89ab4b446003922119193a800c077b12b735e9b05030b839170f9ffb3d81b87f.jpg",
|
| 416 |
+
"image_caption": [],
|
| 417 |
+
"image_footnote": [],
|
| 418 |
+
"bbox": [
|
| 419 |
+
501,
|
| 420 |
+
95,
|
| 421 |
+
800,
|
| 422 |
+
243
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 3
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "text",
|
| 428 |
+
"text": "global batch size is 1,024. To trace the performance of Python, we incorporated a small amount of Python data (a total of 100 million tokens) into the monolingual corpus of other languages.",
|
| 429 |
+
"bbox": [
|
| 430 |
+
169,
|
| 431 |
+
371,
|
| 432 |
+
823,
|
| 433 |
+
402
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 3
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "text",
|
| 439 |
+
"text": "3.2 BABEL TOWER HYPOTHESIS",
|
| 440 |
+
"text_level": 1,
|
| 441 |
+
"bbox": [
|
| 442 |
+
171,
|
| 443 |
+
422,
|
| 444 |
+
413,
|
| 445 |
+
435
|
| 446 |
+
],
|
| 447 |
+
"page_idx": 3
|
| 448 |
+
},
|
| 449 |
+
{
|
| 450 |
+
"type": "text",
|
| 451 |
+
"text": "To investigate multilingual evolution during pre-training, we conducted a preliminary experiment to observe the process by which LLMs acquire new languages. Taking PHP and C# as an example, we analyze the performance variations in HumanEval (Chen et al., 2021) during pre-training. HumanEval is a problem-solving code evaluation benchmark focused on Python, which has been translated into various programming languages and is suitable for exploring the cross-language transfer abilities of LLMs (Zheng et al., 2023; Guo et al., 2024). To identify the sources of an LLM's capabilities, especially whether it leverages knowledge from the Python corpus during generation, we measure the proportion of correct answers requiring knowledge from the Python corpus. Specifically, we constructed a Python-specific subset of HumanEval that necessarily requires Python knowledge for solving by collecting problems that the Python monolingual LLM could correctly solve but which fail to be correctly solved by PHP or C# monolingual LLMs. Formally, let set $\\mathbb{P}$ be the Python-specific subset and set $\\mathbb{C}$ be the questions correctly solved by the LLM. The proportion of correct answers requiring knowledge from the Python corpus is calculated as $\\frac{|\\mathbb{P} \\cap \\mathbb{C}|}{|\\mathbb{C}|}$ .",
|
| 452 |
+
"bbox": [
|
| 453 |
+
169,
|
| 454 |
+
450,
|
| 455 |
+
823,
|
| 456 |
+
637
|
| 457 |
+
],
|
| 458 |
+
"page_idx": 3
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"type": "text",
|
| 462 |
+
"text": "The experimental result is shown in Figure 2. We can see that based on performance curve, the pre-training process can be divided into three stages:",
|
| 463 |
+
"bbox": [
|
| 464 |
+
169,
|
| 465 |
+
643,
|
| 466 |
+
823,
|
| 467 |
+
672
|
| 468 |
+
],
|
| 469 |
+
"page_idx": 3
|
| 470 |
+
},
|
| 471 |
+
{
|
| 472 |
+
"type": "list",
|
| 473 |
+
"sub_type": "text",
|
| 474 |
+
"list_items": [
|
| 475 |
+
"(1) In the initial stage of pre-training, the performance of PHP and C# improved significantly. Concurrently, the proportion of correct answers necessarily relying on Python knowledge was notably high. We hypothesize that the LLMs are utilizing their Python knowledge to generate solutions for PHP and C# problems. The internal processing of the LLM may be analogous to translation; hence, we term this the translation stage.",
|
| 476 |
+
"(2) Subsequently, the performance gradually declined, accompanied by a decrease in the proportion of correct answers necessarily relying on Python knowledge. This could be because the PHP/C# system gradually formed, leading to a gradual transformation from the Python system to the PHP/C# system during generation. We term this the transition stage.",
|
| 477 |
+
"(3) Finally, the performance stabilized, there are almost no correct answers that necessarily require Python knowledge to solve. We hypothesize that the LLM might have reached a stable internal state dominated by PHP/C#. We term this the stabilization stage."
|
| 478 |
+
],
|
| 479 |
+
"bbox": [
|
| 480 |
+
169,
|
| 481 |
+
679,
|
| 482 |
+
823,
|
| 483 |
+
861
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 3
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "This phenomenon indicates that in the early stages of learning, the capabilities of a new language entirely rely on the capabilities of the dominant language existing in the LLM. Over time, as training progresses, the performance of the new languages gradually diverges from that of the dominant language. To this end, we propose the Babel Tower Hypothesis.",
|
| 490 |
+
"bbox": [
|
| 491 |
+
169,
|
| 492 |
+
867,
|
| 493 |
+
823,
|
| 494 |
+
925
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 3
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "header",
|
| 500 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 501 |
+
"bbox": [
|
| 502 |
+
171,
|
| 503 |
+
32,
|
| 504 |
+
478,
|
| 505 |
+
47
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "page_number",
|
| 511 |
+
"text": "4",
|
| 512 |
+
"bbox": [
|
| 513 |
+
493,
|
| 514 |
+
948,
|
| 515 |
+
503,
|
| 516 |
+
959
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 3
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "Babel Tower Hypothesis During the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses.",
|
| 523 |
+
"bbox": [
|
| 524 |
+
169,
|
| 525 |
+
103,
|
| 526 |
+
823,
|
| 527 |
+
160
|
| 528 |
+
],
|
| 529 |
+
"page_idx": 4
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"type": "text",
|
| 533 |
+
"text": "The Babel Tower Hypothesis explains the evolution of multilingual LLMs during the pre-training process. We will further validate this hypothesis in the next sections.",
|
| 534 |
+
"bbox": [
|
| 535 |
+
169,
|
| 536 |
+
166,
|
| 537 |
+
823,
|
| 538 |
+
196
|
| 539 |
+
],
|
| 540 |
+
"page_idx": 4
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"type": "text",
|
| 544 |
+
"text": "3.3 INTERNAL STATE OF LLMS",
|
| 545 |
+
"text_level": 1,
|
| 546 |
+
"bbox": [
|
| 547 |
+
171,
|
| 548 |
+
214,
|
| 549 |
+
406,
|
| 550 |
+
228
|
| 551 |
+
],
|
| 552 |
+
"page_idx": 4
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "text",
|
| 556 |
+
"text": "To comprehensively understand the characteristics and differences among the three stages of the pre-training process in LLMs, we track the internal states of LLMs during pre-training using two distinct methods:",
|
| 557 |
+
"bbox": [
|
| 558 |
+
169,
|
| 559 |
+
241,
|
| 560 |
+
823,
|
| 561 |
+
285
|
| 562 |
+
],
|
| 563 |
+
"page_idx": 4
|
| 564 |
+
},
|
| 565 |
+
{
|
| 566 |
+
"type": "text",
|
| 567 |
+
"text": "(1) Working languages Similar to Wendler et al. (2024), we employ the logit lens (Nostalgebraist, 2020) to generate predicted tokens in intermediate layers, which can be seen as the working languages of the LLMs. In contrast to natural languages, the majority of programming languages are based on English, and a significant number of tokens overlap across different languages, making it difficult to identify the corresponding language simply through generated tokens. To accurately determine the working language, we use built-in functions or statements with identical functionalities but different tokens as identifiers. For example, to return the length of an array, Python uses the \"len() function, while PHP uses the \"count\") function. When the \"count\") function is generated in PHP, we can easily identify that an internally generated \"len\" is a Python token. In the end, we identified five such identifiers for each new language and utilized GPT-4o to generate ten code completion problems for each identifier, guiding the LLM to generate the corresponding tokens. When these identifiers are generated, we employ the logit lens method to identify the corresponding tokens generated in the intermediate layers (excluding the last five layers). Specifically, we count the number of generated tokens in each language and calculate the frequency of for each language. This frequency is used to estimate the proportion of working language. Formally, for language $i$ , the proportion of it being the working language is calculated as follows:",
|
| 568 |
+
"bbox": [
|
| 569 |
+
169,
|
| 570 |
+
301,
|
| 571 |
+
826,
|
| 572 |
+
525
|
| 573 |
+
],
|
| 574 |
+
"page_idx": 4
|
| 575 |
+
},
|
| 576 |
+
{
|
| 577 |
+
"type": "equation",
|
| 578 |
+
"text": "\n$$\n\\mathcal {R} _ {i} = \\frac {\\epsilon_ {i}}{\\sum_ {j} \\epsilon_ {j}} \\tag {1}\n$$\n",
|
| 579 |
+
"text_format": "latex",
|
| 580 |
+
"bbox": [
|
| 581 |
+
450,
|
| 582 |
+
532,
|
| 583 |
+
823,
|
| 584 |
+
566
|
| 585 |
+
],
|
| 586 |
+
"page_idx": 4
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"type": "text",
|
| 590 |
+
"text": "where $\\mathcal{R}_i$ the proportion of $i$ being the working language and $\\epsilon_{i}$ is the number of generated tokens of language $i$ in the intermediate layers. The work language can measure the internal system of the model. When generating in the new language, if the Python system is dominant in the LLM, then the working language will primarily be Python.",
|
| 591 |
+
"bbox": [
|
| 592 |
+
169,
|
| 593 |
+
573,
|
| 594 |
+
823,
|
| 595 |
+
631
|
| 596 |
+
],
|
| 597 |
+
"page_idx": 4
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "text",
|
| 601 |
+
"text": "(2) Language transferring Neurons Based on Tang et al. (2024), there are language-specific neurons which will be activated in response to particular languages, and they are typically distributed across both the bottom and top layers in the LLM, representing the transformation process from input to intermediate layers and from intermediate layers to output. Therefore, we refer to these neurons as language transferring neurons. We will investigate the variations in the number of language transferring neurons during pre-training. Specifically, following Tang et al. (2024), we calculate the Language Activation Probability Entropy (LAPE) for each neuron, and identify language transferring neurons for each language. The number of language-transferring neurons per language serves as the final metric. When the primary language system dominates the LLM, a large number of neurons will be involved in language transfer for other languages. This is because these language transferring neurons are required to facilitate the transformation from intermediate layers to top layers and from bottom layers to intermediate layers.",
|
| 602 |
+
"bbox": [
|
| 603 |
+
169,
|
| 604 |
+
647,
|
| 605 |
+
826,
|
| 606 |
+
815
|
| 607 |
+
],
|
| 608 |
+
"page_idx": 4
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "text",
|
| 612 |
+
"text": "The experimental results are shown in Figure 3 and 4, we summarize the characteristics of the internal states of LLMs during the pre-training process as follows:",
|
| 613 |
+
"bbox": [
|
| 614 |
+
169,
|
| 615 |
+
821,
|
| 616 |
+
823,
|
| 617 |
+
849
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 4
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "text",
|
| 623 |
+
"text": "Translation Stage In the early stage of pre-training, Python serves as the primary working language, with a significantly higher number of language transferring neurons activated for the new language. This indicates that the LLM activates extra neurons to transform Python knowledge into tokens of the new language, akin to a translation process.",
|
| 624 |
+
"bbox": [
|
| 625 |
+
169,
|
| 626 |
+
867,
|
| 627 |
+
823,
|
| 628 |
+
925
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 4
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "header",
|
| 634 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 635 |
+
"bbox": [
|
| 636 |
+
171,
|
| 637 |
+
32,
|
| 638 |
+
478,
|
| 639 |
+
47
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 4
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "page_number",
|
| 645 |
+
"text": "5",
|
| 646 |
+
"bbox": [
|
| 647 |
+
493,
|
| 648 |
+
948,
|
| 649 |
+
504,
|
| 650 |
+
959
|
| 651 |
+
],
|
| 652 |
+
"page_idx": 4
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "image",
|
| 656 |
+
"img_path": "images/673ccc4f0913730bc117c73fae68961a059e18b19c38a8bfbf210caad243eb40.jpg",
|
| 657 |
+
"image_caption": [],
|
| 658 |
+
"image_footnote": [],
|
| 659 |
+
"bbox": [
|
| 660 |
+
181,
|
| 661 |
+
101,
|
| 662 |
+
330,
|
| 663 |
+
186
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 5
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "image",
|
| 669 |
+
"img_path": "images/fa13d0741bbde93d73f79f21420b9c5b30f75d6068c72e0b0e088949cba46f60.jpg",
|
| 670 |
+
"image_caption": [],
|
| 671 |
+
"image_footnote": [],
|
| 672 |
+
"bbox": [
|
| 673 |
+
341,
|
| 674 |
+
101,
|
| 675 |
+
486,
|
| 676 |
+
186
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 5
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "image",
|
| 682 |
+
"img_path": "images/88fa048714d286e461ef2c6b47adfef48a7346b44424965cf31be0ef2551ac10.jpg",
|
| 683 |
+
"image_caption": [],
|
| 684 |
+
"image_footnote": [],
|
| 685 |
+
"bbox": [
|
| 686 |
+
501,
|
| 687 |
+
101,
|
| 688 |
+
645,
|
| 689 |
+
186
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 5
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "image",
|
| 695 |
+
"img_path": "images/9830d59687983e99aafdcea19036ae8013f81e8bd1541855fcd3b0b874a556fe.jpg",
|
| 696 |
+
"image_caption": [],
|
| 697 |
+
"image_footnote": [],
|
| 698 |
+
"bbox": [
|
| 699 |
+
661,
|
| 700 |
+
101,
|
| 701 |
+
805,
|
| 702 |
+
186
|
| 703 |
+
],
|
| 704 |
+
"page_idx": 5
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"type": "image",
|
| 708 |
+
"img_path": "images/841b784c855463d7f40e220d7c7220bf4dd07d6401483b93f86b8160b7160c1c.jpg",
|
| 709 |
+
"image_caption": [
|
| 710 |
+
"Figure 3: The proportion of a language being the working language (WL proportion, y-axis) when generating new languages across training steps (x-axis). Throughout the pre-training process, the working languages gradually transition from Python to the new languages."
|
| 711 |
+
],
|
| 712 |
+
"image_footnote": [],
|
| 713 |
+
"bbox": [
|
| 714 |
+
181,
|
| 715 |
+
241,
|
| 716 |
+
330,
|
| 717 |
+
325
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 5
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "image",
|
| 723 |
+
"img_path": "images/8e5008551b1e690b6755e8c704e1217d29ecd6ac527f42eabd6a688318fab5db.jpg",
|
| 724 |
+
"image_caption": [
|
| 725 |
+
"Figure 4: The number of language transferring neurons in different languages (#LT neurons, y-axis) across training steps (x-axis). Throughout the pre-training process, the language transferring neurons for new languages activated gradually diminish, whereas those for Python activated progressively increase."
|
| 726 |
+
],
|
| 727 |
+
"image_footnote": [],
|
| 728 |
+
"bbox": [
|
| 729 |
+
341,
|
| 730 |
+
241,
|
| 731 |
+
486,
|
| 732 |
+
325
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 5
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "image",
|
| 738 |
+
"img_path": "images/c76d4b05d3954415a20113fe6852fb63a831d39ef568879bccb586e06bb59111.jpg",
|
| 739 |
+
"image_caption": [],
|
| 740 |
+
"image_footnote": [],
|
| 741 |
+
"bbox": [
|
| 742 |
+
501,
|
| 743 |
+
241,
|
| 744 |
+
647,
|
| 745 |
+
325
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 5
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "image",
|
| 751 |
+
"img_path": "images/c6348893a7e7d053026238dc541596d238c2f9e9738a836c8bd29e3a8504622b.jpg",
|
| 752 |
+
"image_caption": [],
|
| 753 |
+
"image_footnote": [],
|
| 754 |
+
"bbox": [
|
| 755 |
+
661,
|
| 756 |
+
241,
|
| 757 |
+
805,
|
| 758 |
+
325
|
| 759 |
+
],
|
| 760 |
+
"page_idx": 5
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"type": "text",
|
| 764 |
+
"text": "Transition Stage Throughout the pre-training process, the working language gradually transitions from Python to the new language, and the proportion of neurons related to new languages decreases accordingly. This indicates that the Python system gradually shifts to the new language system during the entire pre-training process.",
|
| 765 |
+
"bbox": [
|
| 766 |
+
169,
|
| 767 |
+
402,
|
| 768 |
+
823,
|
| 769 |
+
460
|
| 770 |
+
],
|
| 771 |
+
"page_idx": 5
|
| 772 |
+
},
|
| 773 |
+
{
|
| 774 |
+
"type": "text",
|
| 775 |
+
"text": "Stabilization Stage In the final stage, the LLMs mainly work on the new languages, with the number of language transferring neurons associated with the new language continues to decrease.",
|
| 776 |
+
"bbox": [
|
| 777 |
+
169,
|
| 778 |
+
474,
|
| 779 |
+
823,
|
| 780 |
+
503
|
| 781 |
+
],
|
| 782 |
+
"page_idx": 5
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"type": "text",
|
| 786 |
+
"text": "This demonstrates the process of system shifting during pre-training: from a single language system that shares knowledge across multiple languages to forming multiple systems for different languages.",
|
| 787 |
+
"bbox": [
|
| 788 |
+
169,
|
| 789 |
+
508,
|
| 790 |
+
823,
|
| 791 |
+
554
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 5
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "4 ACHIEVING OPTIMAL MULTILINGUAL PERFORMANCE",
|
| 798 |
+
"text_level": 1,
|
| 799 |
+
"bbox": [
|
| 800 |
+
171,
|
| 801 |
+
573,
|
| 802 |
+
650,
|
| 803 |
+
588
|
| 804 |
+
],
|
| 805 |
+
"page_idx": 5
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"type": "text",
|
| 809 |
+
"text": "Based on Figure 2, the performance peak occurs during the translation stage. This suggests that, for PHP and C#, leveraging the Python system is more effective than building their own systems. To achieve optimal performance, an intuitive approach would be to stop pre-training when the translation stage is reached. However, in practical multilingual pre-training, the pre-training corpus contains various languages that cannot reach their optimal stages simultaneously. As discussed in subsequent sections, $\\mathrm{C} + +$ reaches optimal performance during the stabilization stage. Therefore, the early-stop strategy cannot be employed. To this end, we attempt to adjust the distribution of pre-training data in different languages to enable different languages to achieve optimal states concurrently. In this section, we analyze the impact of pre-training data distribution on performance and internal states of LLMs and propose a simple yet effective method to estimate the optimal pretraining data distribution.",
|
| 810 |
+
"bbox": [
|
| 811 |
+
169,
|
| 812 |
+
603,
|
| 813 |
+
826,
|
| 814 |
+
758
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 5
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "text",
|
| 820 |
+
"text": "4.1 THE IMPACT ON PRE-TRAINING DATA DISTRIBUTION",
|
| 821 |
+
"text_level": 1,
|
| 822 |
+
"bbox": [
|
| 823 |
+
171,
|
| 824 |
+
773,
|
| 825 |
+
578,
|
| 826 |
+
787
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 5
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "To understand the impact of pre-training data distribution on the performance and internal states of LLMs, we pre-train the Python monolingual LLM with a mixed corpus of Python and a new language. By varying the proportions of these languages within the pre-training corpus, we observed different final performances and internal states.",
|
| 833 |
+
"bbox": [
|
| 834 |
+
169,
|
| 835 |
+
799,
|
| 836 |
+
823,
|
| 837 |
+
857
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 5
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "4.1.1 EXPERIMENTAL SETUP",
|
| 844 |
+
"text_level": 1,
|
| 845 |
+
"bbox": [
|
| 846 |
+
171,
|
| 847 |
+
871,
|
| 848 |
+
390,
|
| 849 |
+
885
|
| 850 |
+
],
|
| 851 |
+
"page_idx": 5
|
| 852 |
+
},
|
| 853 |
+
{
|
| 854 |
+
"type": "text",
|
| 855 |
+
"text": "In this section, we conduct experiments on PHP and will extend the conclusions to other languages in Section 4.2. The experimental setup is the same as in Section 3.1.",
|
| 856 |
+
"bbox": [
|
| 857 |
+
169,
|
| 858 |
+
895,
|
| 859 |
+
823,
|
| 860 |
+
925
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 5
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "header",
|
| 866 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 867 |
+
"bbox": [
|
| 868 |
+
171,
|
| 869 |
+
32,
|
| 870 |
+
478,
|
| 871 |
+
47
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 5
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "page_number",
|
| 877 |
+
"text": "6",
|
| 878 |
+
"bbox": [
|
| 879 |
+
493,
|
| 880 |
+
948,
|
| 881 |
+
504,
|
| 882 |
+
959
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 5
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "image",
|
| 888 |
+
"img_path": "images/4bb9b8b31be3e3e572d8db5b790505b59542b0584a07bcace53d5c80fb4f584c.jpg",
|
| 889 |
+
"image_caption": [],
|
| 890 |
+
"image_footnote": [
|
| 891 |
+
"(a) The HumanEval Performance. (b) The proportion of a language being the working language (left, WL As the number of tokens in the PHP Proportion) and the number of language transferring neurons (right, corpus increases, the performance #LT Nerons). As the number of tokens in the PHP corpus increases, of PHP does not show correspond- the proportion of PHP as a working language also increases and the ing improvement. number of language transferring neurons for PHP declines.",
|
| 892 |
+
"Metrics We focus on the performance and internal state of the LLM. Specifically, we report three metrics using the last checkpoint of pre-training process: HumanEval performance on PHP, the proportion of PHP used as the working language, and the number of language transferring neurons for PHP. Given the variability in HumanEval performance, we obtain the final performance by calculating the average performance over a sliding window with a width of five, conducting evaluations every 1,000 steps."
|
| 893 |
+
],
|
| 894 |
+
"bbox": [
|
| 895 |
+
189,
|
| 896 |
+
103,
|
| 897 |
+
395,
|
| 898 |
+
215
|
| 899 |
+
],
|
| 900 |
+
"page_idx": 6
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "image",
|
| 904 |
+
"img_path": "images/abf8fb83406df2a06a7f1df90f43716430a2cb8c0a01425d4d359068efa54f8e.jpg",
|
| 905 |
+
"image_caption": [],
|
| 906 |
+
"image_footnote": [
|
| 907 |
+
"Figure 5: The final internal states under different pre-training corpus. The X-axis represents the number of PHP tokens in the pre-training corpus, while the Y-axis indicates the performance, the proportion of the working languages, and the number of language transferring neurons corresponding to the final state."
|
| 908 |
+
],
|
| 909 |
+
"bbox": [
|
| 910 |
+
401,
|
| 911 |
+
102,
|
| 912 |
+
604,
|
| 913 |
+
215
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 6
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "image",
|
| 919 |
+
"img_path": "images/f3f143793958ffccb43191d0e9dde5481e77ec967e3851c80169d4ee2d15104c.jpg",
|
| 920 |
+
"image_caption": [],
|
| 921 |
+
"image_footnote": [
|
| 922 |
+
"Pre-training Corpus We downsample the original PHP pre-training corpus (23B tokens) and construct different PHP pre-training corpora based on the number of tokens, including 1B, 2B, 5B, and 10B. We then mix the PHP corpus with the Python corpus for pre-training."
|
| 923 |
+
],
|
| 924 |
+
"bbox": [
|
| 925 |
+
609,
|
| 926 |
+
103,
|
| 927 |
+
810,
|
| 928 |
+
215
|
| 929 |
+
],
|
| 930 |
+
"page_idx": 6
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"type": "text",
|
| 934 |
+
"text": "4.1.2 EXPERIMENTAL RESULT",
|
| 935 |
+
"text_level": 1,
|
| 936 |
+
"bbox": [
|
| 937 |
+
171,
|
| 938 |
+
526,
|
| 939 |
+
397,
|
| 940 |
+
539
|
| 941 |
+
],
|
| 942 |
+
"page_idx": 6
|
| 943 |
+
},
|
| 944 |
+
{
|
| 945 |
+
"type": "text",
|
| 946 |
+
"text": "The experimental results are presented in Figure 5. We can see that:",
|
| 947 |
+
"bbox": [
|
| 948 |
+
171,
|
| 949 |
+
550,
|
| 950 |
+
617,
|
| 951 |
+
565
|
| 952 |
+
],
|
| 953 |
+
"page_idx": 6
|
| 954 |
+
},
|
| 955 |
+
{
|
| 956 |
+
"type": "text",
|
| 957 |
+
"text": "The pre-training data distribution across different languages determines the internal state of the LLM at the Stabilization Stage. As shown in Figure 5b, when the number of PHP tokens in the pre-training corpus increases, the proportion of PHP in the working languages gradually rises, while the number of language transferring neurons for PHP decreases. This indicates that increasing the number of PHP tokens will ultimately lead to a higher proportion of PHP system in the LLMs.",
|
| 958 |
+
"bbox": [
|
| 959 |
+
169,
|
| 960 |
+
579,
|
| 961 |
+
823,
|
| 962 |
+
650
|
| 963 |
+
],
|
| 964 |
+
"page_idx": 6
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"type": "text",
|
| 968 |
+
"text": "Achieving the optimal pre-training data distribution across different languages is crucial for effective cross-lingual transfer. As shown in Figure 5a, increasing the number of PHP tokens initially enhances performance but subsequently leads to a decline. This trend indicates that, for HumanEval, the LLM benefits from the Python system for cross-language transfer. Therefore, achieving optimal performance requires establishing the optimal internal state within the LLM. Given the unpredictable natural distribution of different languages, utilizing all collected tokens for pretraining does not necessarily yield positive results.",
|
| 969 |
+
"bbox": [
|
| 970 |
+
169,
|
| 971 |
+
664,
|
| 972 |
+
823,
|
| 973 |
+
763
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 6
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "The results indicate that the establishment of PHP knowledge system with more data does not necessarily enhance performance in it. Instead, reliance on the dominant Python system proves to be more effective. Compared to Figure 2, we observed a similar trend in PHP performance. This suggests that by adjusting the distribution of different languages in the corpus, it is possible to emulate the internal state observed at peak performance in Figure 2.",
|
| 980 |
+
"bbox": [
|
| 981 |
+
169,
|
| 982 |
+
768,
|
| 983 |
+
823,
|
| 984 |
+
839
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 6
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "text",
|
| 990 |
+
"text": "4.2 METHOD TO CONSTRUCT PRE-TRAINING CORPUS",
|
| 991 |
+
"text_level": 1,
|
| 992 |
+
"bbox": [
|
| 993 |
+
171,
|
| 994 |
+
856,
|
| 995 |
+
555,
|
| 996 |
+
869
|
| 997 |
+
],
|
| 998 |
+
"page_idx": 6
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"type": "text",
|
| 1002 |
+
"text": "The above experiments indicate that adjusting the pre-training data distribution in different languages can achieve an optimal performance at the stabilization stage. In this section, we propose a method for estimating the optimal pre-training data distribution.",
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
169,
|
| 1005 |
+
881,
|
| 1006 |
+
823,
|
| 1007 |
+
924
|
| 1008 |
+
],
|
| 1009 |
+
"page_idx": 6
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"type": "header",
|
| 1013 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1014 |
+
"bbox": [
|
| 1015 |
+
171,
|
| 1016 |
+
32,
|
| 1017 |
+
478,
|
| 1018 |
+
47
|
| 1019 |
+
],
|
| 1020 |
+
"page_idx": 6
|
| 1021 |
+
},
|
| 1022 |
+
{
|
| 1023 |
+
"type": "page_number",
|
| 1024 |
+
"text": "7",
|
| 1025 |
+
"bbox": [
|
| 1026 |
+
493,
|
| 1027 |
+
948,
|
| 1028 |
+
503,
|
| 1029 |
+
959
|
| 1030 |
+
],
|
| 1031 |
+
"page_idx": 6
|
| 1032 |
+
},
|
| 1033 |
+
{
|
| 1034 |
+
"type": "text",
|
| 1035 |
+
"text": "Algorithm 1 Estimate the corpus size of target language for optimal performance",
|
| 1036 |
+
"bbox": [
|
| 1037 |
+
173,
|
| 1038 |
+
102,
|
| 1039 |
+
709,
|
| 1040 |
+
118
|
| 1041 |
+
],
|
| 1042 |
+
"page_idx": 7
|
| 1043 |
+
},
|
| 1044 |
+
{
|
| 1045 |
+
"type": "text",
|
| 1046 |
+
"text": "Input: LLM $\\mathcal{M}$ ; Checkpoint save interval $i$ ; The target language corpus $\\mathbb{T}$ ; The validation set $\\mathbb{V}$ ; The number of tokens in the Python corpus $\\eta_{\\mathrm{python}}$ ;",
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
173,
|
| 1049 |
+
121,
|
| 1050 |
+
823,
|
| 1051 |
+
151
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 7
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "Output: The number of tokens in the target language corpus;",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
173,
|
| 1060 |
+
151,
|
| 1061 |
+
584,
|
| 1062 |
+
166
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 7
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "list",
|
| 1068 |
+
"sub_type": "text",
|
| 1069 |
+
"list_items": [
|
| 1070 |
+
"1: Continual pre-training $\\mathcal{M}$ with $\\mathbb{T}$ , saving checkpoints every $i$ steps and recording the corresponding training losses $\\{\\ell_1, \\ell_2, \\ldots, \\ell_n\\}$ ;",
|
| 1071 |
+
"2: Recording the initial loss $\\alpha$ and the lowest loss $\\beta$ ;",
|
| 1072 |
+
"3: Evaluating the saved checkpoints using $\\mathbb{V}$ to obtain the performance set $\\{s_1, s_2, \\ldots, s_n\\}$ , and determine the index $j = \\arg \\max \\{s_1, s_2, \\ldots, s_n\\}$ ;",
|
| 1073 |
+
"4: Estimating the proportion of the Python system $\\mathcal{P}(\\ell_j)$ using $\\ell_j, \\alpha, \\beta$ based on Equation 2;",
|
| 1074 |
+
"5: Estimating the number of tokens in the target language corpus using $\\mathcal{P}(\\ell_j)$ , $\\eta_{\\mathrm{python}}$ based on Equation 3, i.e., $\\eta_{\\mathrm{target}} = \\eta_{\\mathrm{python}} / \\mathcal{P}(\\ell_j) - \\eta_{\\mathrm{python}}$ ;"
|
| 1075 |
+
],
|
| 1076 |
+
"bbox": [
|
| 1077 |
+
179,
|
| 1078 |
+
176,
|
| 1079 |
+
825,
|
| 1080 |
+
291
|
| 1081 |
+
],
|
| 1082 |
+
"page_idx": 7
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"type": "text",
|
| 1086 |
+
"text": "To determine the relationship between overall performance and the pre-training data distribution across different languages, we use the internal states of LLMs as mediators since they are related to both of them. Specifically, we divide the method into two steps: (1) constructing the relationship between internal states and overall performance and (2) constructing the relationship between internal states and the pre-training data distribution.",
|
| 1087 |
+
"bbox": [
|
| 1088 |
+
169,
|
| 1089 |
+
319,
|
| 1090 |
+
826,
|
| 1091 |
+
391
|
| 1092 |
+
],
|
| 1093 |
+
"page_idx": 7
|
| 1094 |
+
},
|
| 1095 |
+
{
|
| 1096 |
+
"type": "text",
|
| 1097 |
+
"text": "4.2.1 RELATIONSHIP BETWEEN INTERNAL STATES AND OVERALL PERFORMANCE",
|
| 1098 |
+
"text_level": 1,
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
169,
|
| 1101 |
+
404,
|
| 1102 |
+
750,
|
| 1103 |
+
419
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 7
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Considering the similar trends in PHP performance depicted in Figures 2 and 5a, we establish a correlation between internal states and overall performance based on the new language acquisition experiment in Section 3.2. In the experiment, we transformed a Python monolingual LLM into monolingual LLM of a new language. We hypothesize that the proportion of the Python system decreases from $100\\%$ to $0\\%$ , while the proportion of the new language system increases from $0\\%$ to $100\\%$ . Consequently, we can use the observed performance changes during the pre-training process to estimate relationship between internal states and overall performance.",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
169,
|
| 1112 |
+
429,
|
| 1113 |
+
823,
|
| 1114 |
+
527
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 7
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Specifically, we use training loss as a metric to measure system proportions for the following reasons: (1) it exhibits trends akin to those of working language metrics, characterized by continuous increases or decreases and an initially rapid rate of change that later decelerates; and (2) it demands less computational effort compared to working language metrics:",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
169,
|
| 1123 |
+
532,
|
| 1124 |
+
823,
|
| 1125 |
+
590
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 7
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "equation",
|
| 1131 |
+
"text": "\n$$\n\\mathcal {P} (\\ell) \\approx \\frac {\\ell - \\beta}{\\alpha - \\beta} \\tag {2}\n$$\n",
|
| 1132 |
+
"text_format": "latex",
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
444,
|
| 1135 |
+
593,
|
| 1136 |
+
823,
|
| 1137 |
+
626
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 7
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "where $\\mathcal{P}(\\ell)$ is the estimated proportion of the Python system at the step whose loss is $\\ell$ . $\\alpha$ is the initial loss of LLM. Due to the excessively high value of the initial loss, the average loss of steps 90-100 is selected as the initial loss. $\\beta$ is the final loss of LLM, and we use the lowest loss in pre-training as the final loss.",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
169,
|
| 1146 |
+
630,
|
| 1147 |
+
825,
|
| 1148 |
+
686
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 7
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "4.2.2 RELATIONSHIP BETWEEN INTERNAL STATES AND DISTRIBUTION",
|
| 1155 |
+
"text_level": 1,
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
169,
|
| 1158 |
+
700,
|
| 1159 |
+
674,
|
| 1160 |
+
715
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 7
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "We use an intuitive approach to construct the relationship between internal states and the pre-training data distribution across different languages: using the proportion of a language tokens in the corpus as the final system proportion:",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
169,
|
| 1169 |
+
724,
|
| 1170 |
+
823,
|
| 1171 |
+
767
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 7
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "equation",
|
| 1177 |
+
"text": "\n$$\n\\bar {\\mathcal {P}} \\left(\\eta_ {i}\\right) \\approx \\frac {\\eta_ {i}}{\\sum_ {j} \\eta_ {j}} \\tag {3}\n$$\n",
|
| 1178 |
+
"text_format": "latex",
|
| 1179 |
+
"bbox": [
|
| 1180 |
+
441,
|
| 1181 |
+
767,
|
| 1182 |
+
823,
|
| 1183 |
+
797
|
| 1184 |
+
],
|
| 1185 |
+
"page_idx": 7
|
| 1186 |
+
},
|
| 1187 |
+
{
|
| 1188 |
+
"type": "text",
|
| 1189 |
+
"text": "where $\\bar{\\mathcal{P}} (\\eta_i)$ is the estimated proportion of the system of language $i$ , and $\\eta_{i}$ is the number of tokens of language $i$ in the pre-training corpus.",
|
| 1190 |
+
"bbox": [
|
| 1191 |
+
169,
|
| 1192 |
+
800,
|
| 1193 |
+
823,
|
| 1194 |
+
829
|
| 1195 |
+
],
|
| 1196 |
+
"page_idx": 7
|
| 1197 |
+
},
|
| 1198 |
+
{
|
| 1199 |
+
"type": "text",
|
| 1200 |
+
"text": "4.2.3 OVERALL PROCESS",
|
| 1201 |
+
"text_level": 1,
|
| 1202 |
+
"bbox": [
|
| 1203 |
+
171,
|
| 1204 |
+
843,
|
| 1205 |
+
366,
|
| 1206 |
+
857
|
| 1207 |
+
],
|
| 1208 |
+
"page_idx": 7
|
| 1209 |
+
},
|
| 1210 |
+
{
|
| 1211 |
+
"type": "text",
|
| 1212 |
+
"text": "To fully utilize the knowledge of Python for cross-language transfer, in this paper, we fix the Python corpus and control corpus size of others languages in corpus. Based on the above methods, the optimal number of tokens corresponding to a target language can be estimated. The specific process is shown in Algorithm 1.",
|
| 1213 |
+
"bbox": [
|
| 1214 |
+
169,
|
| 1215 |
+
867,
|
| 1216 |
+
825,
|
| 1217 |
+
925
|
| 1218 |
+
],
|
| 1219 |
+
"page_idx": 7
|
| 1220 |
+
},
|
| 1221 |
+
{
|
| 1222 |
+
"type": "header",
|
| 1223 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1224 |
+
"bbox": [
|
| 1225 |
+
171,
|
| 1226 |
+
32,
|
| 1227 |
+
478,
|
| 1228 |
+
47
|
| 1229 |
+
],
|
| 1230 |
+
"page_idx": 7
|
| 1231 |
+
},
|
| 1232 |
+
{
|
| 1233 |
+
"type": "page_number",
|
| 1234 |
+
"text": "8",
|
| 1235 |
+
"bbox": [
|
| 1236 |
+
493,
|
| 1237 |
+
948,
|
| 1238 |
+
504,
|
| 1239 |
+
959
|
| 1240 |
+
],
|
| 1241 |
+
"page_idx": 7
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"type": "image",
|
| 1245 |
+
"img_path": "images/34352f877ee0e89fa5634ead730bf621b472b70afe62d2c2a8adcc70c94cf6b2.jpg",
|
| 1246 |
+
"image_caption": [
|
| 1247 |
+
"Figure 6: The average HumanEval performance of Python and the new language varies with the proportion of the Python system. Blue dots indicate the predicted results, while orange triangles represent the actual results obtained from pre-training."
|
| 1248 |
+
],
|
| 1249 |
+
"image_footnote": [],
|
| 1250 |
+
"bbox": [
|
| 1251 |
+
181,
|
| 1252 |
+
103,
|
| 1253 |
+
333,
|
| 1254 |
+
186
|
| 1255 |
+
],
|
| 1256 |
+
"page_idx": 8
|
| 1257 |
+
},
|
| 1258 |
+
{
|
| 1259 |
+
"type": "image",
|
| 1260 |
+
"img_path": "images/4de8e6d22037272e807ac091cb72f8e00d498f7103ad66d79b8c2b53abadd586.jpg",
|
| 1261 |
+
"image_caption": [],
|
| 1262 |
+
"image_footnote": [],
|
| 1263 |
+
"bbox": [
|
| 1264 |
+
341,
|
| 1265 |
+
103,
|
| 1266 |
+
491,
|
| 1267 |
+
186
|
| 1268 |
+
],
|
| 1269 |
+
"page_idx": 8
|
| 1270 |
+
},
|
| 1271 |
+
{
|
| 1272 |
+
"type": "image",
|
| 1273 |
+
"img_path": "images/438b0b6f617f71c4c08ea0e9513fda3ba5b654329489524e8dd16f7b58bc8773.jpg",
|
| 1274 |
+
"image_caption": [],
|
| 1275 |
+
"image_footnote": [],
|
| 1276 |
+
"bbox": [
|
| 1277 |
+
501,
|
| 1278 |
+
103,
|
| 1279 |
+
651,
|
| 1280 |
+
186
|
| 1281 |
+
],
|
| 1282 |
+
"page_idx": 8
|
| 1283 |
+
},
|
| 1284 |
+
{
|
| 1285 |
+
"type": "image",
|
| 1286 |
+
"img_path": "images/25f5f1fef1b84347c2c5a13690a7f8405ec1d30be2a21547fb41275683404757.jpg",
|
| 1287 |
+
"image_caption": [],
|
| 1288 |
+
"image_footnote": [],
|
| 1289 |
+
"bbox": [
|
| 1290 |
+
661,
|
| 1291 |
+
103,
|
| 1292 |
+
810,
|
| 1293 |
+
186
|
| 1294 |
+
],
|
| 1295 |
+
"page_idx": 8
|
| 1296 |
+
},
|
| 1297 |
+
{
|
| 1298 |
+
"type": "image",
|
| 1299 |
+
"img_path": "images/3e97f8392ab96c148372f68c15ccf4a45569cf6411f365007d4735a3b6098311.jpg",
|
| 1300 |
+
"image_caption": [
|
| 1301 |
+
"Figure 7: The HumanEval performance of the new language varies with the proportion of the Python system. Blue dots indicate the predicted results, while orange triangles represent the actual results obtained from pre-training."
|
| 1302 |
+
],
|
| 1303 |
+
"image_footnote": [],
|
| 1304 |
+
"bbox": [
|
| 1305 |
+
181,
|
| 1306 |
+
247,
|
| 1307 |
+
333,
|
| 1308 |
+
332
|
| 1309 |
+
],
|
| 1310 |
+
"page_idx": 8
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"type": "image",
|
| 1314 |
+
"img_path": "images/3b3e3b99a07b5b2f3b1fb9ed2e1a80cd9060409670beb1bd909ce158c7914318.jpg",
|
| 1315 |
+
"image_caption": [],
|
| 1316 |
+
"image_footnote": [],
|
| 1317 |
+
"bbox": [
|
| 1318 |
+
341,
|
| 1319 |
+
247,
|
| 1320 |
+
491,
|
| 1321 |
+
332
|
| 1322 |
+
],
|
| 1323 |
+
"page_idx": 8
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"type": "image",
|
| 1327 |
+
"img_path": "images/ee2ac6dd8d470efe99b16f5732f0e981fed21697d919a31c461f39e4bfbd2a88.jpg",
|
| 1328 |
+
"image_caption": [],
|
| 1329 |
+
"image_footnote": [],
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
501,
|
| 1332 |
+
247,
|
| 1333 |
+
651,
|
| 1334 |
+
332
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 8
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "image",
|
| 1340 |
+
"img_path": "images/7ac4163b159798a97bec6482c061369f9645c82cf400520d973040cb8be1769a.jpg",
|
| 1341 |
+
"image_caption": [],
|
| 1342 |
+
"image_footnote": [],
|
| 1343 |
+
"bbox": [
|
| 1344 |
+
661,
|
| 1345 |
+
247,
|
| 1346 |
+
810,
|
| 1347 |
+
332
|
| 1348 |
+
],
|
| 1349 |
+
"page_idx": 8
|
| 1350 |
+
},
|
| 1351 |
+
{
|
| 1352 |
+
"type": "text",
|
| 1353 |
+
"text": "In this way, we are able to determine the optimal number of tokens in the pre-training corpus of other languages, thereby achieving better overall performance. Next, we will conduct experiments to validate the proposed method.",
|
| 1354 |
+
"bbox": [
|
| 1355 |
+
169,
|
| 1356 |
+
397,
|
| 1357 |
+
825,
|
| 1358 |
+
439
|
| 1359 |
+
],
|
| 1360 |
+
"page_idx": 8
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"type": "text",
|
| 1364 |
+
"text": "4.3 EXPERIMENT",
|
| 1365 |
+
"text_level": 1,
|
| 1366 |
+
"bbox": [
|
| 1367 |
+
171,
|
| 1368 |
+
457,
|
| 1369 |
+
305,
|
| 1370 |
+
470
|
| 1371 |
+
],
|
| 1372 |
+
"page_idx": 8
|
| 1373 |
+
},
|
| 1374 |
+
{
|
| 1375 |
+
"type": "text",
|
| 1376 |
+
"text": "4.3.1 SETUP",
|
| 1377 |
+
"text_level": 1,
|
| 1378 |
+
"bbox": [
|
| 1379 |
+
171,
|
| 1380 |
+
483,
|
| 1381 |
+
274,
|
| 1382 |
+
496
|
| 1383 |
+
],
|
| 1384 |
+
"page_idx": 8
|
| 1385 |
+
},
|
| 1386 |
+
{
|
| 1387 |
+
"type": "text",
|
| 1388 |
+
"text": "The experimental setup is the same as Section 3.1, and the new languages are PHP, C#, Go, or C++. We use the average HumanEval performance of Python and the new language and the performance of the new language as the final performance. In addition, we validate the estimated results by pretraining it on corpora with varying proportions. Notably, for C++, we observed that it relies less on the Python system. Consequently, we verified the results at only a few key points.",
|
| 1389 |
+
"bbox": [
|
| 1390 |
+
169,
|
| 1391 |
+
508,
|
| 1392 |
+
823,
|
| 1393 |
+
579
|
| 1394 |
+
],
|
| 1395 |
+
"page_idx": 8
|
| 1396 |
+
},
|
| 1397 |
+
{
|
| 1398 |
+
"type": "text",
|
| 1399 |
+
"text": "4.3.2 EXPERIMENTAL RESULT",
|
| 1400 |
+
"text_level": 1,
|
| 1401 |
+
"bbox": [
|
| 1402 |
+
171,
|
| 1403 |
+
594,
|
| 1404 |
+
397,
|
| 1405 |
+
607
|
| 1406 |
+
],
|
| 1407 |
+
"page_idx": 8
|
| 1408 |
+
},
|
| 1409 |
+
{
|
| 1410 |
+
"type": "text",
|
| 1411 |
+
"text": "The experimental results are shown in Figure 6 and 7. Despite potential numerical discrepancies, the trend between the predicted and actual results remains consistent, emphasizing the effectiveness of our method. For most languages, as the proportion of Python integration increases, the predicted final performance initially rises and then declines. This pattern indicates that the new language can utilize the knowledge of the Python system for generation. However, when the proportion of the new language is excessively high, it may compete with the Python system, resulting in decreased performance. Conversely, a significantly low proportion of the new language in the model hinders its ability to generate the new language effectively. For $C++$ , we found that it does not depend on the Python system and can achieve optimal performance through its own system. Our method is applicable to such languages, indicating its universality.",
|
| 1412 |
+
"bbox": [
|
| 1413 |
+
169,
|
| 1414 |
+
618,
|
| 1415 |
+
825,
|
| 1416 |
+
758
|
| 1417 |
+
],
|
| 1418 |
+
"page_idx": 8
|
| 1419 |
+
},
|
| 1420 |
+
{
|
| 1421 |
+
"type": "text",
|
| 1422 |
+
"text": "4.3.3 PRE-TRAINING FROM SCRATCH",
|
| 1423 |
+
"text_level": 1,
|
| 1424 |
+
"bbox": [
|
| 1425 |
+
171,
|
| 1426 |
+
773,
|
| 1427 |
+
447,
|
| 1428 |
+
787
|
| 1429 |
+
],
|
| 1430 |
+
"page_idx": 8
|
| 1431 |
+
},
|
| 1432 |
+
{
|
| 1433 |
+
"type": "text",
|
| 1434 |
+
"text": "To further demonstrate the effectiveness of our method, we pre-train multilingual LLMs with 1.3 billion and 6.7 billion parameters from scratch using a mixture of corpora from five different languages. We compare the original corpora with our optimized versions. In addition to HumanEval (Chen et al., 2021), we evaluate the LLMs using the MBXP benchmark (Athiwaratkun et al., 2022). Specifically, based on Figure 6, we randomly down-sampled the token quantity for PHP and C# to 5 billion and 10 billion tokens, respectively, while keeping the token quantities for the other languages unchanged. The final metrics were derived from the average HumanEval and MBXP performances across all five languages. For 1.3B LLM, the total number of processed tokens is set to 500 billion. For 6.7B LLM, the total number of processed tokens is set to 800 billion.",
|
| 1435 |
+
"bbox": [
|
| 1436 |
+
169,
|
| 1437 |
+
797,
|
| 1438 |
+
823,
|
| 1439 |
+
924
|
| 1440 |
+
],
|
| 1441 |
+
"page_idx": 8
|
| 1442 |
+
},
|
| 1443 |
+
{
|
| 1444 |
+
"type": "header",
|
| 1445 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1446 |
+
"bbox": [
|
| 1447 |
+
171,
|
| 1448 |
+
32,
|
| 1449 |
+
478,
|
| 1450 |
+
47
|
| 1451 |
+
],
|
| 1452 |
+
"page_idx": 8
|
| 1453 |
+
},
|
| 1454 |
+
{
|
| 1455 |
+
"type": "page_number",
|
| 1456 |
+
"text": "9",
|
| 1457 |
+
"bbox": [
|
| 1458 |
+
493,
|
| 1459 |
+
948,
|
| 1460 |
+
504,
|
| 1461 |
+
959
|
| 1462 |
+
],
|
| 1463 |
+
"page_idx": 8
|
| 1464 |
+
},
|
| 1465 |
+
{
|
| 1466 |
+
"type": "table",
|
| 1467 |
+
"img_path": "images/2e6ff6442182f19f0b4cb04b04231de65ec80bcac7c881def65f246280fc8097.jpg",
|
| 1468 |
+
"table_caption": [
|
| 1469 |
+
"Table 2: The HumanEval and MBXP performance (Pass@1) of different languages during pretraining. We compare the performance of LLMs pre-trained using the original corpus (Original) with those pre-trained using our optimized corpus (Optimized). The evaluated LLMs contain 1.3 billion (1.3B) and 6.7 billion (6.7B) parameters. AVE is the average performance of HumanEval and MBXP. Bold indicates the best results, and underline indicates the second-best results."
|
| 1470 |
+
],
|
| 1471 |
+
"table_footnote": [],
|
| 1472 |
+
"table_body": "<table><tr><td></td><td colspan=\"6\">HumanEval</td><td colspan=\"6\">MBXP</td></tr><tr><td></td><td>Python</td><td>PHP</td><td>C#</td><td>Go</td><td>C++</td><td>AVE</td><td>Python</td><td>PHP</td><td>C#</td><td>Go</td><td>C++</td><td>AVE</td></tr><tr><td colspan=\"13\">1B+ Models</td></tr><tr><td>StarCoder-1B (Li et al., 2023b)</td><td>15.17</td><td>13.04</td><td>15.19</td><td>8.44</td><td>14.63</td><td>13.29</td><td>29.80</td><td>18.56</td><td>23.29</td><td>58.93</td><td>26.18</td><td>31.35</td></tr><tr><td>StarCoder-3B (Li et al., 2023b)</td><td>21.46</td><td>21.12</td><td>16.46</td><td>14.29</td><td>24.39</td><td>19.54</td><td>39.80</td><td>30.13</td><td>39.27</td><td>74.78</td><td>35.91</td><td>43.98</td></tr><tr><td>DeepseekCoder-1.3B (Guo et al., 2024)</td><td>29.88</td><td>23.60</td><td>27.22</td><td>20.13</td><td>31.10</td><td>26.39</td><td>52.40</td><td>45.41</td><td>48.40</td><td>78.35</td><td>55.11</td><td>55.93</td></tr><tr><td>Original-1.3B (ours)</td><td>28.66</td><td>24.22</td><td>23.42</td><td>21.43</td><td>27.44</td><td>25.03</td><td>41.20</td><td>33.41</td><td>43.38</td><td>79.24</td><td>45.39</td><td>49.81</td></tr><tr><td>Optimized-1.3B (ours)</td><td>32.93</td><td>26.08</td><td>29.75</td><td>16.88</td><td>27.44</td><td>26.61</td><td>45.40</td><td>46.29</td><td>40.64</td><td>77.90</td><td>49.63</td><td>51.97</td></tr><tr><td colspan=\"13\">6B+ Models</td></tr><tr><td>StarCoder-7B (Li et al., 2023b)</td><td>28.37</td><td>24.22</td><td>27.85</td><td>17.53</td><td>25.61</td><td>24.72</td><td>46.20</td><td>42.36</td><td>45.66</td><td>71.88</td><td>43.64</td><td>49.95</td></tr><tr><td>StarCoder2-7B (Lozhkov et al., 2024)</td><td>35.40</td><td>32.30</td><td>39.24</td><td>22.08</td><td>34.76</td><td>32.76</td><td>53.13</td><td>55.02</td><td>54.79</td><td>82.37</td><td>55.61</td><td>60.18</td></tr><tr><td>CodeLlama-7B (Rozière et al., 2024)</td><td>33.50</td><td>24.22</td><td>34.81</td><td>20.13</td><td>27.44</td><td>28.02</td><td>49.80</td><td>43.89</td><td>48.40</td><td>72.32</td><td>48.63</td><td>52.61</td></tr><tr><td>DeepseekCoder-6.7B (Guo et al., 2024)</td><td>46.95</td><td>37.89</td><td>47.47</td><td>31.82</td><td>44.51</td><td>41.73</td><td>65.80</td><td>66.16</td><td>66.67</td><td>89.78</td><td>67.58</td><td>71.20</td></tr><tr><td>Original-6.7B (ours)</td><td>46.95</td><td>38.51</td><td>39.24</td><td>26.62</td><td>40.24</td><td>38.31</td><td>59.00</td><td>57.86</td><td>61.19</td><td>83.04</td><td>60.60</td><td>64.34</td></tr><tr><td>Optimized-6.7B (ours)</td><td>48.17</td><td>41.61</td><td>44.94</td><td>31.17</td><td>43.90</td><td>41.96</td><td>63.60</td><td>59.83</td><td>61.42</td><td>81.03</td><td>64.84</td><td>66.14</td></tr></table>",
|
| 1473 |
+
"bbox": [
|
| 1474 |
+
179,
|
| 1475 |
+
181,
|
| 1476 |
+
818,
|
| 1477 |
+
347
|
| 1478 |
+
],
|
| 1479 |
+
"page_idx": 9
|
| 1480 |
+
},
|
| 1481 |
+
{
|
| 1482 |
+
"type": "text",
|
| 1483 |
+
"text": "The experimental results are shown in Table 2. Compared to the original pre-training corpus, the corpus optimized with our method exhibits a significant average performance improvement, indicating that our approach is suitable for a broader range of pre-training scenarios. Furthermore, our method remains effective even when applied to an LLM with 6.7 billion parameters, indicating the universality of our approach. In future work, our method could be integrated with the filtering of pre-training corpora to construct higher-quality pre-training data.",
|
| 1484 |
+
"bbox": [
|
| 1485 |
+
169,
|
| 1486 |
+
362,
|
| 1487 |
+
826,
|
| 1488 |
+
446
|
| 1489 |
+
],
|
| 1490 |
+
"page_idx": 9
|
| 1491 |
+
},
|
| 1492 |
+
{
|
| 1493 |
+
"type": "text",
|
| 1494 |
+
"text": "5 DISCUSSIONS",
|
| 1495 |
+
"text_level": 1,
|
| 1496 |
+
"bbox": [
|
| 1497 |
+
171,
|
| 1498 |
+
469,
|
| 1499 |
+
320,
|
| 1500 |
+
484
|
| 1501 |
+
],
|
| 1502 |
+
"page_idx": 9
|
| 1503 |
+
},
|
| 1504 |
+
{
|
| 1505 |
+
"type": "text",
|
| 1506 |
+
"text": "Analogy to second language acquisition The development of multilingual capabilities in large language models (LLMs) resembles second language acquisition (SLA) in humans (Krashen, 1981). During the learning process, systems for various languages gradually take shape (Cook, 2016). Additionally, the acquisition of a second language is influenced by previously mastered languages, resulting in language transfer (Lightbown & Spada, 2021). This correlation between multilingual learning in LLMs and human language acquisition may enable the application of human cognitive theories to explain various behaviours of LLMs in the future.",
|
| 1507 |
+
"bbox": [
|
| 1508 |
+
169,
|
| 1509 |
+
501,
|
| 1510 |
+
823,
|
| 1511 |
+
599
|
| 1512 |
+
],
|
| 1513 |
+
"page_idx": 9
|
| 1514 |
+
},
|
| 1515 |
+
{
|
| 1516 |
+
"type": "text",
|
| 1517 |
+
"text": "The significance of this paper Firstly, this paper reveals the mechanisms underlying the multilingual capabilities of LLMs during the pre-training process. It provides guidance for multilingual pre-training, such as data proportioning. Additionally, our findings indicate that pre-training strategies may differ across languages. For example, for some low-resource languages, thinking mainly within the primary language system rather than constructing an entirely new system might be the optimal strategy. Lastly, the findings highlight potential limitations of previous multilingual LLMs (Cui et al., 2023; Csaki et al., 2024; Faysse et al., 2024; Zheng et al., 2024). For instance, using a specific language's corpus for continual pre-training does not necessarily enhance the LLM's performance.",
|
| 1518 |
+
"bbox": [
|
| 1519 |
+
169,
|
| 1520 |
+
617,
|
| 1521 |
+
823,
|
| 1522 |
+
729
|
| 1523 |
+
],
|
| 1524 |
+
"page_idx": 9
|
| 1525 |
+
},
|
| 1526 |
+
{
|
| 1527 |
+
"type": "text",
|
| 1528 |
+
"text": "6 CONCLUSIONS",
|
| 1529 |
+
"text_level": 1,
|
| 1530 |
+
"bbox": [
|
| 1531 |
+
171,
|
| 1532 |
+
752,
|
| 1533 |
+
330,
|
| 1534 |
+
766
|
| 1535 |
+
],
|
| 1536 |
+
"page_idx": 9
|
| 1537 |
+
},
|
| 1538 |
+
{
|
| 1539 |
+
"type": "text",
|
| 1540 |
+
"text": "In this paper, to explain the evolution process of multilingual capabilities in LLMs during pretraining, we propose Baber Tower Hypothesis: during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses. Taking code LLMs as an example, we employ two methods to validate the hypothesis. We further found that for some languages, leveraging a dominant language and transferring knowledge from it is often more effective than building a new knowledge system with additional pre-training data. Finally, we propose a simple and effective method to estimate the optimal distribution of pre-training corpora across different languages. In the future, our approach can be extended to natural language scenarios and scaled to larger models.",
|
| 1541 |
+
"bbox": [
|
| 1542 |
+
169,
|
| 1543 |
+
784,
|
| 1544 |
+
826,
|
| 1545 |
+
924
|
| 1546 |
+
],
|
| 1547 |
+
"page_idx": 9
|
| 1548 |
+
},
|
| 1549 |
+
{
|
| 1550 |
+
"type": "header",
|
| 1551 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1552 |
+
"bbox": [
|
| 1553 |
+
173,
|
| 1554 |
+
32,
|
| 1555 |
+
478,
|
| 1556 |
+
47
|
| 1557 |
+
],
|
| 1558 |
+
"page_idx": 9
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"type": "page_number",
|
| 1562 |
+
"text": "10",
|
| 1563 |
+
"bbox": [
|
| 1564 |
+
490,
|
| 1565 |
+
946,
|
| 1566 |
+
509,
|
| 1567 |
+
959
|
| 1568 |
+
],
|
| 1569 |
+
"page_idx": 9
|
| 1570 |
+
},
|
| 1571 |
+
{
|
| 1572 |
+
"type": "text",
|
| 1573 |
+
"text": "7 ACKNOWLEDGE",
|
| 1574 |
+
"text_level": 1,
|
| 1575 |
+
"bbox": [
|
| 1576 |
+
171,
|
| 1577 |
+
102,
|
| 1578 |
+
343,
|
| 1579 |
+
118
|
| 1580 |
+
],
|
| 1581 |
+
"page_idx": 10
|
| 1582 |
+
},
|
| 1583 |
+
{
|
| 1584 |
+
"type": "text",
|
| 1585 |
+
"text": "We sincerely thank the reviewers for their insightful comments and valuable suggestions. This work was supported by Beijing Natural Science Foundation (L243006), the Basic Research Program of ISCAS (Grant No. ISCAS-JCZD-202303, ISCAS-ZD-202402).",
|
| 1586 |
+
"bbox": [
|
| 1587 |
+
171,
|
| 1588 |
+
133,
|
| 1589 |
+
826,
|
| 1590 |
+
178
|
| 1591 |
+
],
|
| 1592 |
+
"page_idx": 10
|
| 1593 |
+
},
|
| 1594 |
+
{
|
| 1595 |
+
"type": "text",
|
| 1596 |
+
"text": "REFERENCES",
|
| 1597 |
+
"text_level": 1,
|
| 1598 |
+
"bbox": [
|
| 1599 |
+
171,
|
| 1600 |
+
199,
|
| 1601 |
+
287,
|
| 1602 |
+
214
|
| 1603 |
+
],
|
| 1604 |
+
"page_idx": 10
|
| 1605 |
+
},
|
| 1606 |
+
{
|
| 1607 |
+
"type": "list",
|
| 1608 |
+
"sub_type": "ref_text",
|
| 1609 |
+
"list_items": [
|
| 1610 |
+
"Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, Sujan Kumar Gonugondla, Hantian Ding, Varun Kumar, Nathan Fulton, Arash Farahani, Siddhartha Jain, Robert Giaquinto, Haifeng Qian, Murali Krishna Ramanathan, Ramesh Nallapati, Baishakhi Ray, Parminder Bhatia, Sudipta Sengupta, Dan Roth, and Bing Xiang. Multi-lingual evaluation of code generation models. 2022. doi: 10.48550/ARXIV.2210.14868. URL https://arxiv.org/abs/2210.14868.",
|
| 1611 |
+
"Samuel Cahyawijaya, Holy Lovenia, and Pascale Fung. LLMs are few-shot in-context low-resource language learners. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 405-433, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.24. URL https://aclanthology.org/2024.nacl-long.24.",
|
| 1612 |
+
"Fuxiang Chen, Fatemeh H. Fard, David Lo, and Timofey Bryksin. On the transferability of pretrained language models for low-resource programming languages. In Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension, ICPC '22, pp. 401-412, New York, NY, USA, 2022. Association for Computing Machinery. ISBN 9781450392983. doi: 10.1145/3524610.3527917. URL https://doi.org/10.1145/3524610.3527917.",
|
| 1613 |
+
"Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code, 2021.",
|
| 1614 |
+
"Nadezhda Chirkova and Vassilina Nikoulina. Key ingredients for effective zero-shot cross-lingual knowledge transfer in generative tasks. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 7222-7238, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.401. URL https://aclanthology.org/2024.nacl-long.401.",
|
| 1615 |
+
"Rochelle Choenni, Dan Garrette, and Ekaterina Shutova. How do languages influence each other? studying cross-lingual data sharing during LM fine-tuning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 13244–13257, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.818. URL https://aclanthology.org/2023.emnlp-main.818.",
|
| 1616 |
+
"Vivian Cook. Second language learning and language teaching. Routledge, 2016.",
|
| 1617 |
+
"Zoltan Csaki, Bo Li, Jonathan Li, Qiantong Xu, Pian Pawakapan, Leon Zhang, Yun Du, Hengyu Zhao, Changran Hu, and Urmish Thakker. Sambalingo: Teaching large language models new languages, 2024. URL https://arxiv.org/abs/2404.05829."
|
| 1618 |
+
],
|
| 1619 |
+
"bbox": [
|
| 1620 |
+
173,
|
| 1621 |
+
223,
|
| 1622 |
+
825,
|
| 1623 |
+
924
|
| 1624 |
+
],
|
| 1625 |
+
"page_idx": 10
|
| 1626 |
+
},
|
| 1627 |
+
{
|
| 1628 |
+
"type": "header",
|
| 1629 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1630 |
+
"bbox": [
|
| 1631 |
+
171,
|
| 1632 |
+
32,
|
| 1633 |
+
478,
|
| 1634 |
+
47
|
| 1635 |
+
],
|
| 1636 |
+
"page_idx": 10
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"type": "page_number",
|
| 1640 |
+
"text": "11",
|
| 1641 |
+
"bbox": [
|
| 1642 |
+
490,
|
| 1643 |
+
948,
|
| 1644 |
+
506,
|
| 1645 |
+
959
|
| 1646 |
+
],
|
| 1647 |
+
"page_idx": 10
|
| 1648 |
+
},
|
| 1649 |
+
{
|
| 1650 |
+
"type": "list",
|
| 1651 |
+
"sub_type": "ref_text",
|
| 1652 |
+
"list_items": [
|
| 1653 |
+
"Yiming Cui, Ziqing Yang, and Xin Yao. Efficient and effective text encoding for chinese llama and alpaca. arXiv preprint arXiv:2304.08177, 2023. URL https://arxiv.org/abs/2304.08177.",
|
| 1654 |
+
"Manuel Faysse, Patrick Fernandes, Nuno M. Guerreiro, Antonio Loison, Duarte M. Alves, Caio Corro, Nicolas Boizard, João Alves, Ricardo Rei, Pedro H. Martins, Antoni Bigata Casademunt, François Yvon, André F. T. Martins, Gautier Viaud, Céline Hudelot, and Pierre Colombo. Croissantllm: A truly bilingual french-english language model, 2024. URL https://arxiv.org/abs/2402.00786.",
|
| 1655 |
+
"Changjiang Gao, Hongda Hu, Peng Hu, Jiajun Chen, Jixing Li, and Shujian Huang. Multilingual pretraining and instruction tuning improve cross-lingual knowledge alignment, but only shallowly. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 6101-6117, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.naacl-long.339. URL https://aclanthology.org/2024.naacl-long.339.",
|
| 1656 |
+
"Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y. Wu, Y. K. Li, Fuli Luo, Yingfei Xiong, and Wenfeng Liang. Deepseek-coder: When the large language model meets programming - the rise of code intelligence, 2024. URL https://arxiv.org/abs/2401.14196.",
|
| 1657 |
+
"Tannon Kew, Florian Schottmann, and Rico Sennrich. Turning english-centric llms into polygons: How much multilinguality is needed?, 2023. URL https://arxiv.org/abs/2312.12683.",
|
| 1658 |
+
"Takeshi Kojima, Itsuki Okimura, Yusuke Iwasawa, Hitomi Yanaka, and Yutaka Matsuo. On the multilingual ability of decoder-based pre-trained language models: Finding and controlling language-specific neurons. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 6919-6971, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.384. URL https://aclanthology.org/2024.nacl-long.384.",
|
| 1659 |
+
"Stephen Krashen. Second language acquisition. Second Language Learning, 3(7):19-39, 1981.",
|
| 1660 |
+
"Viet Lai, Nghia Ngo, Amir Pouran Ben Veyseh, Hieu Man, Franck Dernoncourt, Trung Bui, and Thien Nguyen. ChatGPT beyond English: Towards a comprehensive evaluation of large language models in multilingual learning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 13171-13189, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023-findings-emnlp.878. URL https://aclanthology.org/2023-findings-emnlp.878.",
|
| 1661 |
+
"Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhskii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, João Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nour Fahmy, Urvashi Bhattacharyya, Wenhao Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jan Ebert, Tri Dao, Mayank Mishra, Alex Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you!, 2023a. URL https://arxiv.org/abs/2305.06161.",
|
| 1662 |
+
"Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhskii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, Joao"
|
| 1663 |
+
],
|
| 1664 |
+
"bbox": [
|
| 1665 |
+
171,
|
| 1666 |
+
102,
|
| 1667 |
+
826,
|
| 1668 |
+
925
|
| 1669 |
+
],
|
| 1670 |
+
"page_idx": 11
|
| 1671 |
+
},
|
| 1672 |
+
{
|
| 1673 |
+
"type": "header",
|
| 1674 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1675 |
+
"bbox": [
|
| 1676 |
+
171,
|
| 1677 |
+
32,
|
| 1678 |
+
478,
|
| 1679 |
+
47
|
| 1680 |
+
],
|
| 1681 |
+
"page_idx": 11
|
| 1682 |
+
},
|
| 1683 |
+
{
|
| 1684 |
+
"type": "page_number",
|
| 1685 |
+
"text": "12",
|
| 1686 |
+
"bbox": [
|
| 1687 |
+
490,
|
| 1688 |
+
946,
|
| 1689 |
+
509,
|
| 1690 |
+
960
|
| 1691 |
+
],
|
| 1692 |
+
"page_idx": 11
|
| 1693 |
+
},
|
| 1694 |
+
{
|
| 1695 |
+
"type": "list",
|
| 1696 |
+
"sub_type": "ref_text",
|
| 1697 |
+
"list_items": [
|
| 1698 |
+
"Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nour Fahmy, Urvashi Bhattacharyya, Wenhao Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jan Ebert, Tri Dao, Mayank Mishra, Alex Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you! 2023b.",
|
| 1699 |
+
"Patsy M Lightbown and Nina Spada. How languages are learned 5th Edition. Oxford university press, 2021.",
|
| 1700 |
+
"Anton Lozhkov, Raymond Li, Loubna Ben Allal, Federico Cassano, Joel Lamy-Poirier, Nouamane Tazi, Ao Tang, Dmytro Pykhtar, Jiawei Liu, Yuxiang Wei, Tianyang Liu, Max Tian, Denis Kocetkov, Arthur Zucker, Younes Belkada, Zijian Wang, Qian Liu, Dmitry Abulkhanov, Indraneil Paul, Zhuang Li, Wen-Ding Li, Megan Risdal, Jia Li, Jian Zhu, Terry Yue Zhuo, Evgenii Zheltonozhskii, Nii Osae Osae Dade, Wenhao Yu, Lucas Krauß, Naman Jain, Yixuan Su, Xuanli He, Manan Dey, Edoardo Abati, Yekun Chai, Niklas Muennighoff, Xiangru Tang, Muhtasham Oblokulov, Christopher Akiki, Marc Marone, Chenghao Mou, Mayank Mishra, Alex Gu, Binyuan Hui, Tri Dao, Armel Zebaze, Olivier Dehaene, Nicolas Patry, Canwen Xu, Julian McAuley, Han Hu, Torsten Scholak, Sebastien Paquet, Jennifer Robinson, Carolyn Jane Anderson, Nicolas Chapados, Mostofa Patwary, Nima Tajbakhsh, Yacine Jernite, Carlos Munoz Ferrandis, Lingming Zhang, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder 2 and the stack v2: The next generation, 2024. URL https://arxiv.org/abs/2402.19173.",
|
| 1701 |
+
"Nostalgebraist. interpreting gpt: the logit lens. LessWrong, 2020. URL https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/ interpreting-gpt-the-logit-lens.",
|
| 1702 |
+
"Xenia Ohmer, Elia Bruni, and Dieuwke Hupkes. Separating form and meaning: Using self-consistency to quantify task understanding across multiple senses. In Sebastian Gehrmann, Alex Wang, João Sedoc, Elizabeth Clark, Kaustubh Dhole, Khyathi Raghavi Chandu, Enrico Santus, and Hooman Sedghamiz (eds.), Proceedings of the Third Workshop on Natural Language Generation, Evaluation, and Metrics (GEM), pp. 258-276, Singapore, December 2023. Association for Computational Linguistics. URL https://aclanthology.org/2023.gem-1.22.",
|
| 1703 |
+
"Fred Philipp, Siwen Guo, and Shohreh Haddadan. Towards a common understanding of contributing factors for cross-lingual transfer in multilingual language models: A review. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5877-5891, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.323. URL https://aclanthology.org/2023.acl-long.323.",
|
| 1704 |
+
"Jirui Qi, Raquel Fernández, and Arianna Bisazza. Cross-lingual consistency of factual knowledge in multilingual language models. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 10650–10666, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.658. URL https://aclanthology.org/2023.emnlp-main.658.",
|
| 1705 |
+
"Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, Jérémy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafori, Wenhan Xiong, Alexandre Défossez, Jade Copet, Faisal Azhar, Hugo Touvron, Louis Martin, Nicolas Usunier, Thomas Scialom, and Gabriel Synnaeve. Code llama: Open foundation models for code, 2024. URL https://arxiv.org/abs/2308.12950.",
|
| 1706 |
+
"Tianyi Tang, Wenyang Luo, Haoyang Huang, Dongdong Zhang, Xiaolei Wang, Xin Zhao, Furu Wei, and Ji-Rong Wen. Language-specific neurons: The key to multilingual capabilities in large"
|
| 1707 |
+
],
|
| 1708 |
+
"bbox": [
|
| 1709 |
+
171,
|
| 1710 |
+
103,
|
| 1711 |
+
823,
|
| 1712 |
+
924
|
| 1713 |
+
],
|
| 1714 |
+
"page_idx": 12
|
| 1715 |
+
},
|
| 1716 |
+
{
|
| 1717 |
+
"type": "header",
|
| 1718 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1719 |
+
"bbox": [
|
| 1720 |
+
171,
|
| 1721 |
+
32,
|
| 1722 |
+
478,
|
| 1723 |
+
47
|
| 1724 |
+
],
|
| 1725 |
+
"page_idx": 12
|
| 1726 |
+
},
|
| 1727 |
+
{
|
| 1728 |
+
"type": "page_number",
|
| 1729 |
+
"text": "13",
|
| 1730 |
+
"bbox": [
|
| 1731 |
+
490,
|
| 1732 |
+
948,
|
| 1733 |
+
508,
|
| 1734 |
+
959
|
| 1735 |
+
],
|
| 1736 |
+
"page_idx": 12
|
| 1737 |
+
},
|
| 1738 |
+
{
|
| 1739 |
+
"type": "list",
|
| 1740 |
+
"sub_type": "ref_text",
|
| 1741 |
+
"list_items": [
|
| 1742 |
+
"language models. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5701-5715, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.309.",
|
| 1743 |
+
"Eshaan Tanwar, Subhabrata Dutta, Manish Borthakur, and Tanmoy Chakraborty. Multilingual LLMs are better cross-lingual in-context learners with alignment. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6292-6307, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.346. URL https://aclanthology.org/2023.acl-long.346.",
|
| 1744 |
+
"Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models. 2023. URL https://arxiv.org/abs/2307.09288.",
|
| 1745 |
+
"Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. Do llamas work in English? on the latent language of multilingual transformers. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 15366–15394, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.820.",
|
| 1746 |
+
"Feng Yao, Yufan Zhuang, Zihao Sun, Sunan Xu, Animesh Kumar, and Jingbo Shang. Data contamination can cross language barriers, 2024. URL https://arxiv.org/abs/2406.13236.",
|
| 1747 |
+
"Xiang Zhang, Senyu Li, Bradley Hauer, Ning Shi, and Grzegorz Kondrak. Don't trust ChatGPT when your question is not in English: A study of multilingual abilities and types of LLMs. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 7915-7927, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.491. URL https://aclanthology.org/2023.emnlp-main.491.",
|
| 1748 |
+
"Zhihao Zhang, Jun Zhao, Qi Zhang, Tao Gui, and Xuanjing Huang. Unveiling linguistic regions in large language models. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6228-6247, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.338.",
|
| 1749 |
+
"Qinkai Zheng, Xiao Xia, Xu Zou, Yuxiao Dong, Shan Wang, Yufei Xue, Zihan Wang, Lei Shen, Andi Wang, Yang Li, Teng Su, Zhilin Yang, and Jie Tang. Codegeex: A pre-trained model for code generation with multilingual benchmarking on humaneval-x. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 5673-5684, 2023.",
|
| 1750 |
+
"Wenzhen Zheng, Wenbo Pan, Xu Xu, Libo Qin, Li Yue, and Ming Zhou. Breaking language barriers: Cross-lingual continual pre-training at scale, 2024. URL https://arxiv.org/abs/2407.02118.",
|
| 1751 |
+
"Chengzhi Zhong, Fei Cheng, Qianying Liu, Junfeng Jiang, Zhen Wan, Chenhui Chu, Yugo Murawaki, and Sadao Kurohashi. Beyond english-centric llms: What language do multilingual language models think in?, 2024. URL https://arxiv.org/abs/2408.10811."
|
| 1752 |
+
],
|
| 1753 |
+
"bbox": [
|
| 1754 |
+
171,
|
| 1755 |
+
103,
|
| 1756 |
+
826,
|
| 1757 |
+
919
|
| 1758 |
+
],
|
| 1759 |
+
"page_idx": 13
|
| 1760 |
+
},
|
| 1761 |
+
{
|
| 1762 |
+
"type": "header",
|
| 1763 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1764 |
+
"bbox": [
|
| 1765 |
+
171,
|
| 1766 |
+
32,
|
| 1767 |
+
478,
|
| 1768 |
+
47
|
| 1769 |
+
],
|
| 1770 |
+
"page_idx": 13
|
| 1771 |
+
},
|
| 1772 |
+
{
|
| 1773 |
+
"type": "page_number",
|
| 1774 |
+
"text": "14",
|
| 1775 |
+
"bbox": [
|
| 1776 |
+
490,
|
| 1777 |
+
946,
|
| 1778 |
+
509,
|
| 1779 |
+
960
|
| 1780 |
+
],
|
| 1781 |
+
"page_idx": 13
|
| 1782 |
+
},
|
| 1783 |
+
{
|
| 1784 |
+
"type": "image",
|
| 1785 |
+
"img_path": "images/6bb1bb2d9edaac4e91efa07a2724d1475b40b83bcd470a5abc783402d48fcaa3.jpg",
|
| 1786 |
+
"image_caption": [
|
| 1787 |
+
"Figure 8: The performances of Python and PHP/C# (y-axis) across training steps (x-axis)."
|
| 1788 |
+
],
|
| 1789 |
+
"image_footnote": [],
|
| 1790 |
+
"bbox": [
|
| 1791 |
+
212,
|
| 1792 |
+
104,
|
| 1793 |
+
483,
|
| 1794 |
+
258
|
| 1795 |
+
],
|
| 1796 |
+
"page_idx": 14
|
| 1797 |
+
},
|
| 1798 |
+
{
|
| 1799 |
+
"type": "image",
|
| 1800 |
+
"img_path": "images/287917bc634cf0459109cf4f122b7dc24c886fee94892a1e1abc14b026d332f6.jpg",
|
| 1801 |
+
"image_caption": [],
|
| 1802 |
+
"image_footnote": [],
|
| 1803 |
+
"bbox": [
|
| 1804 |
+
508,
|
| 1805 |
+
104,
|
| 1806 |
+
781,
|
| 1807 |
+
261
|
| 1808 |
+
],
|
| 1809 |
+
"page_idx": 14
|
| 1810 |
+
},
|
| 1811 |
+
{
|
| 1812 |
+
"type": "image",
|
| 1813 |
+
"img_path": "images/8ae92cfbb38c123ce3ea09d78927ff6f901860ffc5c40255587a517e674ee783.jpg",
|
| 1814 |
+
"image_caption": [
|
| 1815 |
+
"Figure 9: The estimated proportion of Python system (y-axis) across training steps (x-axis). The orange line represents the proportion of the Python system estimated using the training loss, i.e., equation 2. The blue line represents the proportion of the Python system using the proportion of Python as the working language."
|
| 1816 |
+
],
|
| 1817 |
+
"image_footnote": [],
|
| 1818 |
+
"bbox": [
|
| 1819 |
+
212,
|
| 1820 |
+
309,
|
| 1821 |
+
480,
|
| 1822 |
+
465
|
| 1823 |
+
],
|
| 1824 |
+
"page_idx": 14
|
| 1825 |
+
},
|
| 1826 |
+
{
|
| 1827 |
+
"type": "image",
|
| 1828 |
+
"img_path": "images/ca4aa9932e85714b0da13e3dc3086cdde1eeb6256da1ae82903db73ad551bc77.jpg",
|
| 1829 |
+
"image_caption": [],
|
| 1830 |
+
"image_footnote": [],
|
| 1831 |
+
"bbox": [
|
| 1832 |
+
508,
|
| 1833 |
+
309,
|
| 1834 |
+
774,
|
| 1835 |
+
465
|
| 1836 |
+
],
|
| 1837 |
+
"page_idx": 14
|
| 1838 |
+
},
|
| 1839 |
+
{
|
| 1840 |
+
"type": "text",
|
| 1841 |
+
"text": "A APPENDIX",
|
| 1842 |
+
"text_level": 1,
|
| 1843 |
+
"bbox": [
|
| 1844 |
+
171,
|
| 1845 |
+
564,
|
| 1846 |
+
302,
|
| 1847 |
+
579
|
| 1848 |
+
],
|
| 1849 |
+
"page_idx": 14
|
| 1850 |
+
},
|
| 1851 |
+
{
|
| 1852 |
+
"type": "text",
|
| 1853 |
+
"text": "A.1 WORKING LANGUAGES DETECTION",
|
| 1854 |
+
"text_level": 1,
|
| 1855 |
+
"bbox": [
|
| 1856 |
+
171,
|
| 1857 |
+
599,
|
| 1858 |
+
468,
|
| 1859 |
+
614
|
| 1860 |
+
],
|
| 1861 |
+
"page_idx": 14
|
| 1862 |
+
},
|
| 1863 |
+
{
|
| 1864 |
+
"type": "text",
|
| 1865 |
+
"text": "To determine the language of the generated tokens, we use built-in functions or statements with identical functionalities but different tokens as identifiers. The identifiers are shown in Figure 3. When the PHP identifier \"strlen\" is generated, we will use logit lens method to generate tokens in the intermediate layers. The generated \"len\" will be considered as Python while \"strlen\" will be considered as PHP.",
|
| 1866 |
+
"bbox": [
|
| 1867 |
+
169,
|
| 1868 |
+
628,
|
| 1869 |
+
823,
|
| 1870 |
+
698
|
| 1871 |
+
],
|
| 1872 |
+
"page_idx": 14
|
| 1873 |
+
},
|
| 1874 |
+
{
|
| 1875 |
+
"type": "table",
|
| 1876 |
+
"img_path": "images/e2cbef58857820c98772df1c281f3c731d650b607fc234956bf70f32465d62f1.jpg",
|
| 1877 |
+
"table_caption": [
|
| 1878 |
+
"Table 3: The identifiers for detecting the working languages and the corresponding Python tokens."
|
| 1879 |
+
],
|
| 1880 |
+
"table_footnote": [],
|
| 1881 |
+
"table_body": "<table><tr><td>PHP</td><td>"strlen": "len", "count": "len", "sort": "sorted", "ctype": "type", "array_sum": "sum";</td></tr><tr><td>C#</td><td>"Console.WriteLine": "print", "Console.ReadLine": "input", ".find", ".index", "catch": "except", ".Add": ".append";</td></tr><tr><td>Go</td><td>"=append": ".append", "true": "True", "false": "False", "func": "def", "&": "and", "|": "or", "&": "not", "nil": "None";</td></tr><tr><td>C++</td><td>".push_back": ".append", "catch": "except", "&": "and", "|": "or", "&": "not", ".erase": ".pop", "to_string", "str";</td></tr></table>",
|
| 1882 |
+
"bbox": [
|
| 1883 |
+
187,
|
| 1884 |
+
741,
|
| 1885 |
+
805,
|
| 1886 |
+
800
|
| 1887 |
+
],
|
| 1888 |
+
"page_idx": 14
|
| 1889 |
+
},
|
| 1890 |
+
{
|
| 1891 |
+
"type": "text",
|
| 1892 |
+
"text": "A.2 THE PERFORMANCE OF PYTHON",
|
| 1893 |
+
"text_level": 1,
|
| 1894 |
+
"bbox": [
|
| 1895 |
+
171,
|
| 1896 |
+
839,
|
| 1897 |
+
444,
|
| 1898 |
+
853
|
| 1899 |
+
],
|
| 1900 |
+
"page_idx": 14
|
| 1901 |
+
},
|
| 1902 |
+
{
|
| 1903 |
+
"type": "text",
|
| 1904 |
+
"text": "We report the Python performance in the experiments in Section 3.2. As shown in Figure 8, in the first stage, the performance of the new language increases, while Python experiences a slight decline. During the second stage, as the new language system is established and competes with Python, Python's performance significantly declines. Finally, Python's performance stabilizes.",
|
| 1905 |
+
"bbox": [
|
| 1906 |
+
169,
|
| 1907 |
+
867,
|
| 1908 |
+
823,
|
| 1909 |
+
925
|
| 1910 |
+
],
|
| 1911 |
+
"page_idx": 14
|
| 1912 |
+
},
|
| 1913 |
+
{
|
| 1914 |
+
"type": "header",
|
| 1915 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1916 |
+
"bbox": [
|
| 1917 |
+
171,
|
| 1918 |
+
32,
|
| 1919 |
+
478,
|
| 1920 |
+
47
|
| 1921 |
+
],
|
| 1922 |
+
"page_idx": 14
|
| 1923 |
+
},
|
| 1924 |
+
{
|
| 1925 |
+
"type": "page_number",
|
| 1926 |
+
"text": "15",
|
| 1927 |
+
"bbox": [
|
| 1928 |
+
490,
|
| 1929 |
+
946,
|
| 1930 |
+
508,
|
| 1931 |
+
959
|
| 1932 |
+
],
|
| 1933 |
+
"page_idx": 14
|
| 1934 |
+
},
|
| 1935 |
+
{
|
| 1936 |
+
"type": "text",
|
| 1937 |
+
"text": "A.3 THE ESTIMATED PROPORTION OF THE PYTHON SYSTEM",
|
| 1938 |
+
"text_level": 1,
|
| 1939 |
+
"bbox": [
|
| 1940 |
+
171,
|
| 1941 |
+
104,
|
| 1942 |
+
602,
|
| 1943 |
+
118
|
| 1944 |
+
],
|
| 1945 |
+
"page_idx": 15
|
| 1946 |
+
},
|
| 1947 |
+
{
|
| 1948 |
+
"type": "text",
|
| 1949 |
+
"text": "To further demonstrate the relationship between the training loss and estimated proportion of the python system, we used working language for verification since the working language can reflect the internal state of the LLM. Specifically, we calculate the proportion of Python as the working language at each checkpoint and assume that this can be approximated to the proportion of Python systems. We then compare this result with the proportion of Python systems estimated from the corresponding training loss. The results are presented in Figure 9. We can see that the proportion of the Python system estimated from the training loss closely approximates that estimated from the working language, thereby substantiating the relationship between training loss and the estimated proportion of the Python system.",
|
| 1950 |
+
"bbox": [
|
| 1951 |
+
169,
|
| 1952 |
+
128,
|
| 1953 |
+
826,
|
| 1954 |
+
256
|
| 1955 |
+
],
|
| 1956 |
+
"page_idx": 15
|
| 1957 |
+
},
|
| 1958 |
+
{
|
| 1959 |
+
"type": "header",
|
| 1960 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1961 |
+
"bbox": [
|
| 1962 |
+
171,
|
| 1963 |
+
32,
|
| 1964 |
+
478,
|
| 1965 |
+
47
|
| 1966 |
+
],
|
| 1967 |
+
"page_idx": 15
|
| 1968 |
+
},
|
| 1969 |
+
{
|
| 1970 |
+
"type": "page_number",
|
| 1971 |
+
"text": "16",
|
| 1972 |
+
"bbox": [
|
| 1973 |
+
490,
|
| 1974 |
+
946,
|
| 1975 |
+
509,
|
| 1976 |
+
960
|
| 1977 |
+
],
|
| 1978 |
+
"page_idx": 15
|
| 1979 |
+
}
|
| 1980 |
+
]
|
2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/cfca1251-9b3a-45d0-b4de-5277174fae1f_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2aa20952aa54983e57cc30dd8ac750f00c41b1ed46c7c205005053323d58fc8b
|
| 3 |
+
size 1318074
|
2025/The Rise and Down of Babel Tower_ Investigating the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ROCESS OF MULTILINGUAL CODE LARGE LANGUAGE MODEL
|
| 2 |
+
|
| 3 |
+
Jiawei Chen $^{1,2}$ , Wentao Chen $^{3}$ , Jing Su $^{3}$ , Jingjing Xu $^{3}$ , Hongyu Lin $^{1}$ *, Mengjie Ren $^{1,2}$ , Yaojie Lu $^{1}$ , Xianpei Han $^{1}$ , Le Sun $^{1}$ ,
|
| 4 |
+
|
| 5 |
+
$^{1}$ Chinese Information Processing Laboratory, Institute of Software, Chinese Academy of Sciences
|
| 6 |
+
$^{2}$ University of Chinese Academy of Sciences
|
| 7 |
+
|
| 8 |
+
3ByteDance Inc.
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Large language models (LLMs) have shown significant multilingual capabilities. However, the mechanisms underlying the development of these capabilities during pre-training are not well understood. In this paper, we use code LLMs as an experimental platform to explore the evolution of multilingual capabilities in LLMs during the pre-training process. Based on our observations, we propose the Babel Tower Hypothesis, which describes the entire process of LLMs acquiring new language capabilities. During the learning process, multiple languages initially share a single knowledge system dominated by the primary language and gradually develop language-specific knowledge systems. We then validate the above hypothesis by tracking the internal states of the LLMs through identifying working languages and language transferring neurons. Experimental results show that the internal state changes of the LLM are consistent with our Babel Tower Hypothesis. Building on these insights, we propose a novel method to construct an optimized pre-training corpus for multilingual code LLMs, which significantly outperforms LLMs trained on the original corpus. The proposed Babel Tower Hypothesis provides new insights into designing pre-training data distributions to achieve optimal multilingual capabilities in LLMs.
|
| 13 |
+
|
| 14 |
+
A united human race speaking a single language migrates to Shinar where they agree to build a great city with a tower that would reach the sky. Yahweh, observing these efforts and remarking on humanity's power in unity, confounds their speech so that they can no longer understand each other and scatters them around the world, leaving the city unfinished.
|
| 15 |
+
|
| 16 |
+
- The story of Babel Tower
|
| 17 |
+
|
| 18 |
+
# 1 INTRODUCTION
|
| 19 |
+
|
| 20 |
+
Large language models (LLMs) have demonstrated remarkable multilingual capabilities (Philippy et al., 2023; Choenni et al., 2023), even in some low-resource languages (Lai et al., 2023; Chirkova & Nikoulina, 2024). Remarkably, LLMs are commonly pre-trained on multilingual corpora and demonstrate multilingual capabilities during the pre-training stage (Tanwar et al., 2023; Cahyawijaya et al., 2024). Consequently, an important question arises: how do the multilingual capabilities of LLMs evolve during pre-training process?
|
| 21 |
+
|
| 22 |
+
Many previous works have explored the multilingual mechanisms of LLMs. However, most of them are limited to investigating existing pre-trained LLMs rather than the dynamic process of
|
| 23 |
+
|
| 24 |
+
pre-training. Some works have found that multilingual capabilities are similar to the translation process (Zhang et al., 2023). The LLMs form distinct language systems within their intermediate layers (Zhong et al., 2024; Wendler et al., 2024), and during generating, the LLMs transform the knowledge in these systems into target language tokens using language-specific neurons at top layers (Tang et al., 2024). Although these works explain the multilingual mechanism of existing LLMs, the formation of the mechanism during pre-training remains unexplored.
|
| 25 |
+
|
| 26 |
+
In this paper, we use code LLMs as an experimental platform to explore the evolution of multilingual capabilities in LLMs during the pre-training process (Li et al., 2023a; Guo et al., 2024). Specifically, we conducted preliminary experiments to analyze how monolingual LLMs learn a new language by continual pre-training the monolingual LLM on the corpus with the new language, similar to the setting of Zheng et al. (2024). As illustrated in Figure 1, our key finding is that the model's capabilities in newly added languages exhibit a pattern of rapid initial improvement, followed by a decline, and then stabilization (or slow improvement). Additionally, we observed that the point at which the capabilities of new languages begins to decline initially aligns closely with the point at which the knowledge transferred from the dominant language starts to decline. In the later stages of learning new languages, their performance gradually diverges from that of the domi
|
| 27 |
+
|
| 28 |
+
nant language. This phenomenon suggests that in the early stages of learning, the capabilities of new language entirely rely on the capabilities of the dominant language existing in the LLM. As training progresses, the performance of the new languages gradually diverges from that of the dominant language. Based on these findings, we propose the Babel Tower Hypothesis, which posits that during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses. With Babel Tower Hypothesis, the process of LLMs learning a new language can be divided into three stages: (1) Translation Stage: The LLM extensively relies on the dominant language knowledge system to response to the new language. (2) Transition Stage: The knowledge system of the new language is gradually established, and the generation of the new language increasingly transitions from the dominant language system to the new language system. (3) Stabilization Stage: The new language's responses primarily depend on its own system. To validate Babel Tower Hypothesis, we further track the internal states of the LLMs at various stages by identifying working languages (Wendler et al., 2024) and language transferring neurons (Tang et al., 2024) and found that the internal state changes of the LLM are consistent with our hypothesis: the generation of new language tokens progressively shifts from translating the primary language to utilizing its own system.
|
| 29 |
+
|
| 30 |
+
Additionally, our experiments have revealed that the establishment of new language knowledge systems does not necessarily lead to improved performance in those languages. In other words, for many languages, relying on a strong dominant language and translating its knowledge is more effective than building a new knowledge system using their own data. Building on these insights, we propose a novel method to construct the pre-training corpus for multilingual code LLM pre-training to achieve optimal performance. Specifically, we utilize the new language acquisition experiments to establish the relationship between performance and pre-training data distribution across different languages. By estimating the language distribution that corresponds to optimal performance, we can construct a pre-training corpus with an optimal distribution. Experimental results show that the code LLMs pre-trained with our optimized pre-training corpus significantly outperform those pretrained with the original corpus by a large margin. Therefore, the proposed Babel Tower Hypothesis
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 1: The evolution of a LLM learning a new language. In this figure, Python serves as the initial dominant language, with PHP as the new language. The process consists of three distinct stages: (1) Translation Stage: the performance of PHP improves rapidly and the Python system is dominated in the LLM, and PHP generation primarily relies on the Python system; (2) Transition Stage: the performance of PHP begins to decline while it gradually forms its own system; (3) Stabilization Stage: the performance of PHP stabilizes, and the generation of PHP depends on its own system.
|
| 34 |
+
|
| 35 |
+
provides a new insight into how we should design the data ratios for different languages during the pre-training stage to achieve optimal multilingual capabilities in LLMs.
|
| 36 |
+
|
| 37 |
+
Generally speaking, the contributions of this paper are:
|
| 38 |
+
|
| 39 |
+
- We propose the Babel Tower Hypothesis to explain the evolution process of multilingual LLM during pre-training: during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses.
|
| 40 |
+
- We validate the Babel Tower Hypothesis in code LLMs by employing two methods to probe and analyze the internal states of LLMs during pre-training. Meanwhile, we revealed that for many languages, relying on a strong dominant language and translating its knowledge is more effective than building a new knowledge system using their own data.
|
| 41 |
+
- We design an effective method to construct a pre-training corpus with optimal distribution across different languages, providing a guide for the pre-training process.
|
| 42 |
+
|
| 43 |
+
# 2 RELATED WORK
|
| 44 |
+
|
| 45 |
+
Previous works mainly focused on studying the multilingual mechanisms within existing pre-trained LLMs. The primary approach they employ involves designing experiments to observe the generated outputs or internal states of these models. The primary methods of investigation can be categorized into three types: (1) analyzing the generation of the model: on the one hand, LLM can leverage knowledge acquired in various languages to generate outputs (Chen et al., 2022; Zhang et al., 2023; Kew et al., 2023; Yao et al., 2024). On the other hand, in many cases, the consistency of generated content across different languages remains low (Ohmer et al., 2023; Qi et al., 2023; Gao et al., 2024). (2) analyzing the output of intermediate layers: Wendler et al. (2024) use the logit lens method (Nostalgebraist, 2020) to detect the output tokens of intermediate layers in LLaMA-2 (Touvron et al., 2023). They discovered that these layers primarily operate in English, generating English tokens in the intermediate layers, even when the final output tokens are in other languages. Additionally, Zhong et al. (2024) found that the working languages are related to pre-training corpora. For instance, after continual pre-training using a Japanese corpus, LLaMA consistently produces Japanese tokens at the intermediate layers during token generation. (3) analyzing the activation states of neurons: some works identified language-specific neurons in LLMs that will be activated exclusively when processing specific languages (Tang et al., 2024; Kojima et al., 2024). Tang et al. (2024) found that these identified neurons are predominantly located in the top and bottom layers of the LLMs, serving to transform input into a unified semantic space or to transform the unified semantic space into output. Zhang et al. (2024) identify the core region in the parameters of LLMs that will influence the multilingual alignment and generalization, and they also observe that monolingual regions that will influence the ability of specific languages. In contrast to previous works, we investigate the evolution process of code LLMs during pre-training.
|
| 46 |
+
|
| 47 |
+
# 3 THE EVOLUTION PROCESS OF MULTILINGUAL SYSTEMS
|
| 48 |
+
|
| 49 |
+
In this section, we investigate the evolution of multilingual capabilities in LLMs during pre-training. Specifically, we introduce the Babel Tower Hypothesis to explain how these capabilities develop and then validate this hypothesis by tracking the internal system state of the LLM using two methods.
|
| 50 |
+
|
| 51 |
+
Table 1: The statistics of pretraining corpus.
|
| 52 |
+
|
| 53 |
+
<table><tr><td></td><td>PHP</td><td>Go</td><td>C#</td><td>C++</td><td>Python</td></tr><tr><td>#Instances</td><td>23M</td><td>11M</td><td>37M</td><td>35M</td><td>16M</td></tr><tr><td>#Tokens</td><td>23B</td><td>11B</td><td>16B</td><td>28B</td><td>11B</td></tr></table>
|
| 54 |
+
|
| 55 |
+
# 3.1 EXPERIMENTAL SETUP
|
| 56 |
+
|
| 57 |
+
In this paper, the pre-training corpus is collected from GitHub, and its statistics are presented in Table 1. We conducted experiments utilizing the GPT-2 architecture (1.3 billion parameters). We consider Python as the dominant language due to its widespread use in various scenarios. The majority of experiments are conducted on a Python monolingual LLM, which will be pre-trained on corpus of other languages such as PHP, C#, Go, or C++. The training step is set to 50,000 and the
|
| 58 |
+
|
| 59 |
+
Figure 2: The performance of PHP/C# (left y-axis) and the proportion of correct answers requiring knowledge from the Python corpus (Knowledge transferred from Python, right y-axis) across training steps (x-axis). Based on the performance curve, we divide the entire process into three stages. The performance improves initially, then gradually declines, and eventually stabilizes. Concurrently, in the early stages, the proportion of correct answers requiring knowledge from the Python corpus is relatively high but subsequently decreases.
|
| 60 |
+

|
| 61 |
+
PHP/C# performance Knowledge transferred from Python
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
|
| 65 |
+
global batch size is 1,024. To trace the performance of Python, we incorporated a small amount of Python data (a total of 100 million tokens) into the monolingual corpus of other languages.
|
| 66 |
+
|
| 67 |
+
# 3.2 BABEL TOWER HYPOTHESIS
|
| 68 |
+
|
| 69 |
+
To investigate multilingual evolution during pre-training, we conducted a preliminary experiment to observe the process by which LLMs acquire new languages. Taking PHP and C# as an example, we analyze the performance variations in HumanEval (Chen et al., 2021) during pre-training. HumanEval is a problem-solving code evaluation benchmark focused on Python, which has been translated into various programming languages and is suitable for exploring the cross-language transfer abilities of LLMs (Zheng et al., 2023; Guo et al., 2024). To identify the sources of an LLM's capabilities, especially whether it leverages knowledge from the Python corpus during generation, we measure the proportion of correct answers requiring knowledge from the Python corpus. Specifically, we constructed a Python-specific subset of HumanEval that necessarily requires Python knowledge for solving by collecting problems that the Python monolingual LLM could correctly solve but which fail to be correctly solved by PHP or C# monolingual LLMs. Formally, let set $\mathbb{P}$ be the Python-specific subset and set $\mathbb{C}$ be the questions correctly solved by the LLM. The proportion of correct answers requiring knowledge from the Python corpus is calculated as $\frac{|\mathbb{P} \cap \mathbb{C}|}{|\mathbb{C}|}$ .
|
| 70 |
+
|
| 71 |
+
The experimental result is shown in Figure 2. We can see that based on performance curve, the pre-training process can be divided into three stages:
|
| 72 |
+
|
| 73 |
+
(1) In the initial stage of pre-training, the performance of PHP and C# improved significantly. Concurrently, the proportion of correct answers necessarily relying on Python knowledge was notably high. We hypothesize that the LLMs are utilizing their Python knowledge to generate solutions for PHP and C# problems. The internal processing of the LLM may be analogous to translation; hence, we term this the translation stage.
|
| 74 |
+
(2) Subsequently, the performance gradually declined, accompanied by a decrease in the proportion of correct answers necessarily relying on Python knowledge. This could be because the PHP/C# system gradually formed, leading to a gradual transformation from the Python system to the PHP/C# system during generation. We term this the transition stage.
|
| 75 |
+
(3) Finally, the performance stabilized, there are almost no correct answers that necessarily require Python knowledge to solve. We hypothesize that the LLM might have reached a stable internal state dominated by PHP/C#. We term this the stabilization stage.
|
| 76 |
+
|
| 77 |
+
This phenomenon indicates that in the early stages of learning, the capabilities of a new language entirely rely on the capabilities of the dominant language existing in the LLM. Over time, as training progresses, the performance of the new languages gradually diverges from that of the dominant language. To this end, we propose the Babel Tower Hypothesis.
|
| 78 |
+
|
| 79 |
+
Babel Tower Hypothesis During the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses.
|
| 80 |
+
|
| 81 |
+
The Babel Tower Hypothesis explains the evolution of multilingual LLMs during the pre-training process. We will further validate this hypothesis in the next sections.
|
| 82 |
+
|
| 83 |
+
# 3.3 INTERNAL STATE OF LLMS
|
| 84 |
+
|
| 85 |
+
To comprehensively understand the characteristics and differences among the three stages of the pre-training process in LLMs, we track the internal states of LLMs during pre-training using two distinct methods:
|
| 86 |
+
|
| 87 |
+
(1) Working languages Similar to Wendler et al. (2024), we employ the logit lens (Nostalgebraist, 2020) to generate predicted tokens in intermediate layers, which can be seen as the working languages of the LLMs. In contrast to natural languages, the majority of programming languages are based on English, and a significant number of tokens overlap across different languages, making it difficult to identify the corresponding language simply through generated tokens. To accurately determine the working language, we use built-in functions or statements with identical functionalities but different tokens as identifiers. For example, to return the length of an array, Python uses the "len() function, while PHP uses the "count") function. When the "count") function is generated in PHP, we can easily identify that an internally generated "len" is a Python token. In the end, we identified five such identifiers for each new language and utilized GPT-4o to generate ten code completion problems for each identifier, guiding the LLM to generate the corresponding tokens. When these identifiers are generated, we employ the logit lens method to identify the corresponding tokens generated in the intermediate layers (excluding the last five layers). Specifically, we count the number of generated tokens in each language and calculate the frequency of for each language. This frequency is used to estimate the proportion of working language. Formally, for language $i$ , the proportion of it being the working language is calculated as follows:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\mathcal {R} _ {i} = \frac {\epsilon_ {i}}{\sum_ {j} \epsilon_ {j}} \tag {1}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\mathcal{R}_i$ the proportion of $i$ being the working language and $\epsilon_{i}$ is the number of generated tokens of language $i$ in the intermediate layers. The work language can measure the internal system of the model. When generating in the new language, if the Python system is dominant in the LLM, then the working language will primarily be Python.
|
| 94 |
+
|
| 95 |
+
(2) Language transferring Neurons Based on Tang et al. (2024), there are language-specific neurons which will be activated in response to particular languages, and they are typically distributed across both the bottom and top layers in the LLM, representing the transformation process from input to intermediate layers and from intermediate layers to output. Therefore, we refer to these neurons as language transferring neurons. We will investigate the variations in the number of language transferring neurons during pre-training. Specifically, following Tang et al. (2024), we calculate the Language Activation Probability Entropy (LAPE) for each neuron, and identify language transferring neurons for each language. The number of language-transferring neurons per language serves as the final metric. When the primary language system dominates the LLM, a large number of neurons will be involved in language transfer for other languages. This is because these language transferring neurons are required to facilitate the transformation from intermediate layers to top layers and from bottom layers to intermediate layers.
|
| 96 |
+
|
| 97 |
+
The experimental results are shown in Figure 3 and 4, we summarize the characteristics of the internal states of LLMs during the pre-training process as follows:
|
| 98 |
+
|
| 99 |
+
Translation Stage In the early stage of pre-training, Python serves as the primary working language, with a significantly higher number of language transferring neurons activated for the new language. This indicates that the LLM activates extra neurons to transform Python knowledge into tokens of the new language, akin to a translation process.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 3: The proportion of a language being the working language (WL proportion, y-axis) when generating new languages across training steps (x-axis). Throughout the pre-training process, the working languages gradually transition from Python to the new languages.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 4: The number of language transferring neurons in different languages (#LT neurons, y-axis) across training steps (x-axis). Throughout the pre-training process, the language transferring neurons for new languages activated gradually diminish, whereas those for Python activated progressively increase.
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
|
| 119 |
+
Transition Stage Throughout the pre-training process, the working language gradually transitions from Python to the new language, and the proportion of neurons related to new languages decreases accordingly. This indicates that the Python system gradually shifts to the new language system during the entire pre-training process.
|
| 120 |
+
|
| 121 |
+
Stabilization Stage In the final stage, the LLMs mainly work on the new languages, with the number of language transferring neurons associated with the new language continues to decrease.
|
| 122 |
+
|
| 123 |
+
This demonstrates the process of system shifting during pre-training: from a single language system that shares knowledge across multiple languages to forming multiple systems for different languages.
|
| 124 |
+
|
| 125 |
+
# 4 ACHIEVING OPTIMAL MULTILINGUAL PERFORMANCE
|
| 126 |
+
|
| 127 |
+
Based on Figure 2, the performance peak occurs during the translation stage. This suggests that, for PHP and C#, leveraging the Python system is more effective than building their own systems. To achieve optimal performance, an intuitive approach would be to stop pre-training when the translation stage is reached. However, in practical multilingual pre-training, the pre-training corpus contains various languages that cannot reach their optimal stages simultaneously. As discussed in subsequent sections, $\mathrm{C} + +$ reaches optimal performance during the stabilization stage. Therefore, the early-stop strategy cannot be employed. To this end, we attempt to adjust the distribution of pre-training data in different languages to enable different languages to achieve optimal states concurrently. In this section, we analyze the impact of pre-training data distribution on performance and internal states of LLMs and propose a simple yet effective method to estimate the optimal pretraining data distribution.
|
| 128 |
+
|
| 129 |
+
# 4.1 THE IMPACT ON PRE-TRAINING DATA DISTRIBUTION
|
| 130 |
+
|
| 131 |
+
To understand the impact of pre-training data distribution on the performance and internal states of LLMs, we pre-train the Python monolingual LLM with a mixed corpus of Python and a new language. By varying the proportions of these languages within the pre-training corpus, we observed different final performances and internal states.
|
| 132 |
+
|
| 133 |
+
# 4.1.1 EXPERIMENTAL SETUP
|
| 134 |
+
|
| 135 |
+
In this section, we conduct experiments on PHP and will extend the conclusions to other languages in Section 4.2. The experimental setup is the same as in Section 3.1.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
(a) The HumanEval Performance. (b) The proportion of a language being the working language (left, WL As the number of tokens in the PHP Proportion) and the number of language transferring neurons (right, corpus increases, the performance #LT Nerons). As the number of tokens in the PHP corpus increases, of PHP does not show correspond- the proportion of PHP as a working language also increases and the ing improvement. number of language transferring neurons for PHP declines.
|
| 139 |
+
Metrics We focus on the performance and internal state of the LLM. Specifically, we report three metrics using the last checkpoint of pre-training process: HumanEval performance on PHP, the proportion of PHP used as the working language, and the number of language transferring neurons for PHP. Given the variability in HumanEval performance, we obtain the final performance by calculating the average performance over a sliding window with a width of five, conducting evaluations every 1,000 steps.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 5: The final internal states under different pre-training corpus. The X-axis represents the number of PHP tokens in the pre-training corpus, while the Y-axis indicates the performance, the proportion of the working languages, and the number of language transferring neurons corresponding to the final state.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Pre-training Corpus We downsample the original PHP pre-training corpus (23B tokens) and construct different PHP pre-training corpora based on the number of tokens, including 1B, 2B, 5B, and 10B. We then mix the PHP corpus with the Python corpus for pre-training.
|
| 146 |
+
|
| 147 |
+
# 4.1.2 EXPERIMENTAL RESULT
|
| 148 |
+
|
| 149 |
+
The experimental results are presented in Figure 5. We can see that:
|
| 150 |
+
|
| 151 |
+
The pre-training data distribution across different languages determines the internal state of the LLM at the Stabilization Stage. As shown in Figure 5b, when the number of PHP tokens in the pre-training corpus increases, the proportion of PHP in the working languages gradually rises, while the number of language transferring neurons for PHP decreases. This indicates that increasing the number of PHP tokens will ultimately lead to a higher proportion of PHP system in the LLMs.
|
| 152 |
+
|
| 153 |
+
Achieving the optimal pre-training data distribution across different languages is crucial for effective cross-lingual transfer. As shown in Figure 5a, increasing the number of PHP tokens initially enhances performance but subsequently leads to a decline. This trend indicates that, for HumanEval, the LLM benefits from the Python system for cross-language transfer. Therefore, achieving optimal performance requires establishing the optimal internal state within the LLM. Given the unpredictable natural distribution of different languages, utilizing all collected tokens for pretraining does not necessarily yield positive results.
|
| 154 |
+
|
| 155 |
+
The results indicate that the establishment of PHP knowledge system with more data does not necessarily enhance performance in it. Instead, reliance on the dominant Python system proves to be more effective. Compared to Figure 2, we observed a similar trend in PHP performance. This suggests that by adjusting the distribution of different languages in the corpus, it is possible to emulate the internal state observed at peak performance in Figure 2.
|
| 156 |
+
|
| 157 |
+
# 4.2 METHOD TO CONSTRUCT PRE-TRAINING CORPUS
|
| 158 |
+
|
| 159 |
+
The above experiments indicate that adjusting the pre-training data distribution in different languages can achieve an optimal performance at the stabilization stage. In this section, we propose a method for estimating the optimal pre-training data distribution.
|
| 160 |
+
|
| 161 |
+
Algorithm 1 Estimate the corpus size of target language for optimal performance
|
| 162 |
+
|
| 163 |
+
Input: LLM $\mathcal{M}$ ; Checkpoint save interval $i$ ; The target language corpus $\mathbb{T}$ ; The validation set $\mathbb{V}$ ; The number of tokens in the Python corpus $\eta_{\mathrm{python}}$ ;
|
| 164 |
+
|
| 165 |
+
Output: The number of tokens in the target language corpus;
|
| 166 |
+
|
| 167 |
+
1: Continual pre-training $\mathcal{M}$ with $\mathbb{T}$ , saving checkpoints every $i$ steps and recording the corresponding training losses $\{\ell_1, \ell_2, \ldots, \ell_n\}$ ;
|
| 168 |
+
2: Recording the initial loss $\alpha$ and the lowest loss $\beta$ ;
|
| 169 |
+
3: Evaluating the saved checkpoints using $\mathbb{V}$ to obtain the performance set $\{s_1, s_2, \ldots, s_n\}$ , and determine the index $j = \arg \max \{s_1, s_2, \ldots, s_n\}$ ;
|
| 170 |
+
4: Estimating the proportion of the Python system $\mathcal{P}(\ell_j)$ using $\ell_j, \alpha, \beta$ based on Equation 2;
|
| 171 |
+
5: Estimating the number of tokens in the target language corpus using $\mathcal{P}(\ell_j)$ , $\eta_{\mathrm{python}}$ based on Equation 3, i.e., $\eta_{\mathrm{target}} = \eta_{\mathrm{python}} / \mathcal{P}(\ell_j) - \eta_{\mathrm{python}}$ ;
|
| 172 |
+
|
| 173 |
+
To determine the relationship between overall performance and the pre-training data distribution across different languages, we use the internal states of LLMs as mediators since they are related to both of them. Specifically, we divide the method into two steps: (1) constructing the relationship between internal states and overall performance and (2) constructing the relationship between internal states and the pre-training data distribution.
|
| 174 |
+
|
| 175 |
+
# 4.2.1 RELATIONSHIP BETWEEN INTERNAL STATES AND OVERALL PERFORMANCE
|
| 176 |
+
|
| 177 |
+
Considering the similar trends in PHP performance depicted in Figures 2 and 5a, we establish a correlation between internal states and overall performance based on the new language acquisition experiment in Section 3.2. In the experiment, we transformed a Python monolingual LLM into monolingual LLM of a new language. We hypothesize that the proportion of the Python system decreases from $100\%$ to $0\%$ , while the proportion of the new language system increases from $0\%$ to $100\%$ . Consequently, we can use the observed performance changes during the pre-training process to estimate relationship between internal states and overall performance.
|
| 178 |
+
|
| 179 |
+
Specifically, we use training loss as a metric to measure system proportions for the following reasons: (1) it exhibits trends akin to those of working language metrics, characterized by continuous increases or decreases and an initially rapid rate of change that later decelerates; and (2) it demands less computational effort compared to working language metrics:
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\mathcal {P} (\ell) \approx \frac {\ell - \beta}{\alpha - \beta} \tag {2}
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
where $\mathcal{P}(\ell)$ is the estimated proportion of the Python system at the step whose loss is $\ell$ . $\alpha$ is the initial loss of LLM. Due to the excessively high value of the initial loss, the average loss of steps 90-100 is selected as the initial loss. $\beta$ is the final loss of LLM, and we use the lowest loss in pre-training as the final loss.
|
| 186 |
+
|
| 187 |
+
# 4.2.2 RELATIONSHIP BETWEEN INTERNAL STATES AND DISTRIBUTION
|
| 188 |
+
|
| 189 |
+
We use an intuitive approach to construct the relationship between internal states and the pre-training data distribution across different languages: using the proportion of a language tokens in the corpus as the final system proportion:
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\bar {\mathcal {P}} \left(\eta_ {i}\right) \approx \frac {\eta_ {i}}{\sum_ {j} \eta_ {j}} \tag {3}
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
where $\bar{\mathcal{P}} (\eta_i)$ is the estimated proportion of the system of language $i$ , and $\eta_{i}$ is the number of tokens of language $i$ in the pre-training corpus.
|
| 196 |
+
|
| 197 |
+
# 4.2.3 OVERALL PROCESS
|
| 198 |
+
|
| 199 |
+
To fully utilize the knowledge of Python for cross-language transfer, in this paper, we fix the Python corpus and control corpus size of others languages in corpus. Based on the above methods, the optimal number of tokens corresponding to a target language can be estimated. The specific process is shown in Algorithm 1.
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 6: The average HumanEval performance of Python and the new language varies with the proportion of the Python system. Blue dots indicate the predicted results, while orange triangles represent the actual results obtained from pre-training.
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
Figure 7: The HumanEval performance of the new language varies with the proportion of the Python system. Blue dots indicate the predicted results, while orange triangles represent the actual results obtained from pre-training.
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
|
| 219 |
+
In this way, we are able to determine the optimal number of tokens in the pre-training corpus of other languages, thereby achieving better overall performance. Next, we will conduct experiments to validate the proposed method.
|
| 220 |
+
|
| 221 |
+
# 4.3 EXPERIMENT
|
| 222 |
+
|
| 223 |
+
# 4.3.1 SETUP
|
| 224 |
+
|
| 225 |
+
The experimental setup is the same as Section 3.1, and the new languages are PHP, C#, Go, or C++. We use the average HumanEval performance of Python and the new language and the performance of the new language as the final performance. In addition, we validate the estimated results by pretraining it on corpora with varying proportions. Notably, for C++, we observed that it relies less on the Python system. Consequently, we verified the results at only a few key points.
|
| 226 |
+
|
| 227 |
+
# 4.3.2 EXPERIMENTAL RESULT
|
| 228 |
+
|
| 229 |
+
The experimental results are shown in Figure 6 and 7. Despite potential numerical discrepancies, the trend between the predicted and actual results remains consistent, emphasizing the effectiveness of our method. For most languages, as the proportion of Python integration increases, the predicted final performance initially rises and then declines. This pattern indicates that the new language can utilize the knowledge of the Python system for generation. However, when the proportion of the new language is excessively high, it may compete with the Python system, resulting in decreased performance. Conversely, a significantly low proportion of the new language in the model hinders its ability to generate the new language effectively. For $C++$ , we found that it does not depend on the Python system and can achieve optimal performance through its own system. Our method is applicable to such languages, indicating its universality.
|
| 230 |
+
|
| 231 |
+
# 4.3.3 PRE-TRAINING FROM SCRATCH
|
| 232 |
+
|
| 233 |
+
To further demonstrate the effectiveness of our method, we pre-train multilingual LLMs with 1.3 billion and 6.7 billion parameters from scratch using a mixture of corpora from five different languages. We compare the original corpora with our optimized versions. In addition to HumanEval (Chen et al., 2021), we evaluate the LLMs using the MBXP benchmark (Athiwaratkun et al., 2022). Specifically, based on Figure 6, we randomly down-sampled the token quantity for PHP and C# to 5 billion and 10 billion tokens, respectively, while keeping the token quantities for the other languages unchanged. The final metrics were derived from the average HumanEval and MBXP performances across all five languages. For 1.3B LLM, the total number of processed tokens is set to 500 billion. For 6.7B LLM, the total number of processed tokens is set to 800 billion.
|
| 234 |
+
|
| 235 |
+
Table 2: The HumanEval and MBXP performance (Pass@1) of different languages during pretraining. We compare the performance of LLMs pre-trained using the original corpus (Original) with those pre-trained using our optimized corpus (Optimized). The evaluated LLMs contain 1.3 billion (1.3B) and 6.7 billion (6.7B) parameters. AVE is the average performance of HumanEval and MBXP. Bold indicates the best results, and underline indicates the second-best results.
|
| 236 |
+
|
| 237 |
+
<table><tr><td></td><td colspan="6">HumanEval</td><td colspan="6">MBXP</td></tr><tr><td></td><td>Python</td><td>PHP</td><td>C#</td><td>Go</td><td>C++</td><td>AVE</td><td>Python</td><td>PHP</td><td>C#</td><td>Go</td><td>C++</td><td>AVE</td></tr><tr><td colspan="13">1B+ Models</td></tr><tr><td>StarCoder-1B (Li et al., 2023b)</td><td>15.17</td><td>13.04</td><td>15.19</td><td>8.44</td><td>14.63</td><td>13.29</td><td>29.80</td><td>18.56</td><td>23.29</td><td>58.93</td><td>26.18</td><td>31.35</td></tr><tr><td>StarCoder-3B (Li et al., 2023b)</td><td>21.46</td><td>21.12</td><td>16.46</td><td>14.29</td><td>24.39</td><td>19.54</td><td>39.80</td><td>30.13</td><td>39.27</td><td>74.78</td><td>35.91</td><td>43.98</td></tr><tr><td>DeepseekCoder-1.3B (Guo et al., 2024)</td><td>29.88</td><td>23.60</td><td>27.22</td><td>20.13</td><td>31.10</td><td>26.39</td><td>52.40</td><td>45.41</td><td>48.40</td><td>78.35</td><td>55.11</td><td>55.93</td></tr><tr><td>Original-1.3B (ours)</td><td>28.66</td><td>24.22</td><td>23.42</td><td>21.43</td><td>27.44</td><td>25.03</td><td>41.20</td><td>33.41</td><td>43.38</td><td>79.24</td><td>45.39</td><td>49.81</td></tr><tr><td>Optimized-1.3B (ours)</td><td>32.93</td><td>26.08</td><td>29.75</td><td>16.88</td><td>27.44</td><td>26.61</td><td>45.40</td><td>46.29</td><td>40.64</td><td>77.90</td><td>49.63</td><td>51.97</td></tr><tr><td colspan="13">6B+ Models</td></tr><tr><td>StarCoder-7B (Li et al., 2023b)</td><td>28.37</td><td>24.22</td><td>27.85</td><td>17.53</td><td>25.61</td><td>24.72</td><td>46.20</td><td>42.36</td><td>45.66</td><td>71.88</td><td>43.64</td><td>49.95</td></tr><tr><td>StarCoder2-7B (Lozhkov et al., 2024)</td><td>35.40</td><td>32.30</td><td>39.24</td><td>22.08</td><td>34.76</td><td>32.76</td><td>53.13</td><td>55.02</td><td>54.79</td><td>82.37</td><td>55.61</td><td>60.18</td></tr><tr><td>CodeLlama-7B (Rozière et al., 2024)</td><td>33.50</td><td>24.22</td><td>34.81</td><td>20.13</td><td>27.44</td><td>28.02</td><td>49.80</td><td>43.89</td><td>48.40</td><td>72.32</td><td>48.63</td><td>52.61</td></tr><tr><td>DeepseekCoder-6.7B (Guo et al., 2024)</td><td>46.95</td><td>37.89</td><td>47.47</td><td>31.82</td><td>44.51</td><td>41.73</td><td>65.80</td><td>66.16</td><td>66.67</td><td>89.78</td><td>67.58</td><td>71.20</td></tr><tr><td>Original-6.7B (ours)</td><td>46.95</td><td>38.51</td><td>39.24</td><td>26.62</td><td>40.24</td><td>38.31</td><td>59.00</td><td>57.86</td><td>61.19</td><td>83.04</td><td>60.60</td><td>64.34</td></tr><tr><td>Optimized-6.7B (ours)</td><td>48.17</td><td>41.61</td><td>44.94</td><td>31.17</td><td>43.90</td><td>41.96</td><td>63.60</td><td>59.83</td><td>61.42</td><td>81.03</td><td>64.84</td><td>66.14</td></tr></table>
|
| 238 |
+
|
| 239 |
+
The experimental results are shown in Table 2. Compared to the original pre-training corpus, the corpus optimized with our method exhibits a significant average performance improvement, indicating that our approach is suitable for a broader range of pre-training scenarios. Furthermore, our method remains effective even when applied to an LLM with 6.7 billion parameters, indicating the universality of our approach. In future work, our method could be integrated with the filtering of pre-training corpora to construct higher-quality pre-training data.
|
| 240 |
+
|
| 241 |
+
# 5 DISCUSSIONS
|
| 242 |
+
|
| 243 |
+
Analogy to second language acquisition The development of multilingual capabilities in large language models (LLMs) resembles second language acquisition (SLA) in humans (Krashen, 1981). During the learning process, systems for various languages gradually take shape (Cook, 2016). Additionally, the acquisition of a second language is influenced by previously mastered languages, resulting in language transfer (Lightbown & Spada, 2021). This correlation between multilingual learning in LLMs and human language acquisition may enable the application of human cognitive theories to explain various behaviours of LLMs in the future.
|
| 244 |
+
|
| 245 |
+
The significance of this paper Firstly, this paper reveals the mechanisms underlying the multilingual capabilities of LLMs during the pre-training process. It provides guidance for multilingual pre-training, such as data proportioning. Additionally, our findings indicate that pre-training strategies may differ across languages. For example, for some low-resource languages, thinking mainly within the primary language system rather than constructing an entirely new system might be the optimal strategy. Lastly, the findings highlight potential limitations of previous multilingual LLMs (Cui et al., 2023; Csaki et al., 2024; Faysse et al., 2024; Zheng et al., 2024). For instance, using a specific language's corpus for continual pre-training does not necessarily enhance the LLM's performance.
|
| 246 |
+
|
| 247 |
+
# 6 CONCLUSIONS
|
| 248 |
+
|
| 249 |
+
In this paper, to explain the evolution process of multilingual capabilities in LLMs during pretraining, we propose Baber Tower Hypothesis: during the learning process of large language models (LLMs), multiple languages initially share a single knowledge system dominated by a primary language and then gradually shift to developing multiple language-specific knowledge systems as training in new languages progresses. Taking code LLMs as an example, we employ two methods to validate the hypothesis. We further found that for some languages, leveraging a dominant language and transferring knowledge from it is often more effective than building a new knowledge system with additional pre-training data. Finally, we propose a simple and effective method to estimate the optimal distribution of pre-training corpora across different languages. In the future, our approach can be extended to natural language scenarios and scaled to larger models.
|
| 250 |
+
|
| 251 |
+
# 7 ACKNOWLEDGE
|
| 252 |
+
|
| 253 |
+
We sincerely thank the reviewers for their insightful comments and valuable suggestions. This work was supported by Beijing Natural Science Foundation (L243006), the Basic Research Program of ISCAS (Grant No. ISCAS-JCZD-202303, ISCAS-ZD-202402).
|
| 254 |
+
|
| 255 |
+
# REFERENCES
|
| 256 |
+
|
| 257 |
+
Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, Sujan Kumar Gonugondla, Hantian Ding, Varun Kumar, Nathan Fulton, Arash Farahani, Siddhartha Jain, Robert Giaquinto, Haifeng Qian, Murali Krishna Ramanathan, Ramesh Nallapati, Baishakhi Ray, Parminder Bhatia, Sudipta Sengupta, Dan Roth, and Bing Xiang. Multi-lingual evaluation of code generation models. 2022. doi: 10.48550/ARXIV.2210.14868. URL https://arxiv.org/abs/2210.14868.
|
| 258 |
+
Samuel Cahyawijaya, Holy Lovenia, and Pascale Fung. LLMs are few-shot in-context low-resource language learners. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 405-433, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.24. URL https://aclanthology.org/2024.nacl-long.24.
|
| 259 |
+
Fuxiang Chen, Fatemeh H. Fard, David Lo, and Timofey Bryksin. On the transferability of pretrained language models for low-resource programming languages. In Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension, ICPC '22, pp. 401-412, New York, NY, USA, 2022. Association for Computing Machinery. ISBN 9781450392983. doi: 10.1145/3524610.3527917. URL https://doi.org/10.1145/3524610.3527917.
|
| 260 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code, 2021.
|
| 261 |
+
Nadezhda Chirkova and Vassilina Nikoulina. Key ingredients for effective zero-shot cross-lingual knowledge transfer in generative tasks. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 7222-7238, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.401. URL https://aclanthology.org/2024.nacl-long.401.
|
| 262 |
+
Rochelle Choenni, Dan Garrette, and Ekaterina Shutova. How do languages influence each other? studying cross-lingual data sharing during LM fine-tuning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 13244–13257, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.818. URL https://aclanthology.org/2023.emnlp-main.818.
|
| 263 |
+
Vivian Cook. Second language learning and language teaching. Routledge, 2016.
|
| 264 |
+
Zoltan Csaki, Bo Li, Jonathan Li, Qiantong Xu, Pian Pawakapan, Leon Zhang, Yun Du, Hengyu Zhao, Changran Hu, and Urmish Thakker. Sambalingo: Teaching large language models new languages, 2024. URL https://arxiv.org/abs/2404.05829.
|
| 265 |
+
|
| 266 |
+
Yiming Cui, Ziqing Yang, and Xin Yao. Efficient and effective text encoding for chinese llama and alpaca. arXiv preprint arXiv:2304.08177, 2023. URL https://arxiv.org/abs/2304.08177.
|
| 267 |
+
Manuel Faysse, Patrick Fernandes, Nuno M. Guerreiro, Antonio Loison, Duarte M. Alves, Caio Corro, Nicolas Boizard, João Alves, Ricardo Rei, Pedro H. Martins, Antoni Bigata Casademunt, François Yvon, André F. T. Martins, Gautier Viaud, Céline Hudelot, and Pierre Colombo. Croissantllm: A truly bilingual french-english language model, 2024. URL https://arxiv.org/abs/2402.00786.
|
| 268 |
+
Changjiang Gao, Hongda Hu, Peng Hu, Jiajun Chen, Jixing Li, and Shujian Huang. Multilingual pretraining and instruction tuning improve cross-lingual knowledge alignment, but only shallowly. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 6101-6117, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.naacl-long.339. URL https://aclanthology.org/2024.naacl-long.339.
|
| 269 |
+
Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y. Wu, Y. K. Li, Fuli Luo, Yingfei Xiong, and Wenfeng Liang. Deepseek-coder: When the large language model meets programming - the rise of code intelligence, 2024. URL https://arxiv.org/abs/2401.14196.
|
| 270 |
+
Tannon Kew, Florian Schottmann, and Rico Sennrich. Turning english-centric llms into polygons: How much multilinguality is needed?, 2023. URL https://arxiv.org/abs/2312.12683.
|
| 271 |
+
Takeshi Kojima, Itsuki Okimura, Yusuke Iwasawa, Hitomi Yanaka, and Yutaka Matsuo. On the multilingual ability of decoder-based pre-trained language models: Finding and controlling language-specific neurons. In Kevin Duh, Helena Gomez, and Steven Bethard (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 6919-6971, Mexico City, Mexico, June 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.nacl-long.384. URL https://aclanthology.org/2024.nacl-long.384.
|
| 272 |
+
Stephen Krashen. Second language acquisition. Second Language Learning, 3(7):19-39, 1981.
|
| 273 |
+
Viet Lai, Nghia Ngo, Amir Pouran Ben Veyseh, Hieu Man, Franck Dernoncourt, Trung Bui, and Thien Nguyen. ChatGPT beyond English: Towards a comprehensive evaluation of large language models in multilingual learning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 13171-13189, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023-findings-emnlp.878. URL https://aclanthology.org/2023-findings-emnlp.878.
|
| 274 |
+
Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhskii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, João Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nour Fahmy, Urvashi Bhattacharyya, Wenhao Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jan Ebert, Tri Dao, Mayank Mishra, Alex Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you!, 2023a. URL https://arxiv.org/abs/2305.06161.
|
| 275 |
+
Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhskii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, Joao
|
| 276 |
+
|
| 277 |
+
Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nour Fahmy, Urvashi Bhattacharyya, Wenhao Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jan Ebert, Tri Dao, Mayank Mishra, Alex Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you! 2023b.
|
| 278 |
+
Patsy M Lightbown and Nina Spada. How languages are learned 5th Edition. Oxford university press, 2021.
|
| 279 |
+
Anton Lozhkov, Raymond Li, Loubna Ben Allal, Federico Cassano, Joel Lamy-Poirier, Nouamane Tazi, Ao Tang, Dmytro Pykhtar, Jiawei Liu, Yuxiang Wei, Tianyang Liu, Max Tian, Denis Kocetkov, Arthur Zucker, Younes Belkada, Zijian Wang, Qian Liu, Dmitry Abulkhanov, Indraneil Paul, Zhuang Li, Wen-Ding Li, Megan Risdal, Jia Li, Jian Zhu, Terry Yue Zhuo, Evgenii Zheltonozhskii, Nii Osae Osae Dade, Wenhao Yu, Lucas Krauß, Naman Jain, Yixuan Su, Xuanli He, Manan Dey, Edoardo Abati, Yekun Chai, Niklas Muennighoff, Xiangru Tang, Muhtasham Oblokulov, Christopher Akiki, Marc Marone, Chenghao Mou, Mayank Mishra, Alex Gu, Binyuan Hui, Tri Dao, Armel Zebaze, Olivier Dehaene, Nicolas Patry, Canwen Xu, Julian McAuley, Han Hu, Torsten Scholak, Sebastien Paquet, Jennifer Robinson, Carolyn Jane Anderson, Nicolas Chapados, Mostofa Patwary, Nima Tajbakhsh, Yacine Jernite, Carlos Munoz Ferrandis, Lingming Zhang, Sean Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder 2 and the stack v2: The next generation, 2024. URL https://arxiv.org/abs/2402.19173.
|
| 280 |
+
Nostalgebraist. interpreting gpt: the logit lens. LessWrong, 2020. URL https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/ interpreting-gpt-the-logit-lens.
|
| 281 |
+
Xenia Ohmer, Elia Bruni, and Dieuwke Hupkes. Separating form and meaning: Using self-consistency to quantify task understanding across multiple senses. In Sebastian Gehrmann, Alex Wang, João Sedoc, Elizabeth Clark, Kaustubh Dhole, Khyathi Raghavi Chandu, Enrico Santus, and Hooman Sedghamiz (eds.), Proceedings of the Third Workshop on Natural Language Generation, Evaluation, and Metrics (GEM), pp. 258-276, Singapore, December 2023. Association for Computational Linguistics. URL https://aclanthology.org/2023.gem-1.22.
|
| 282 |
+
Fred Philipp, Siwen Guo, and Shohreh Haddadan. Towards a common understanding of contributing factors for cross-lingual transfer in multilingual language models: A review. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5877-5891, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.323. URL https://aclanthology.org/2023.acl-long.323.
|
| 283 |
+
Jirui Qi, Raquel Fernández, and Arianna Bisazza. Cross-lingual consistency of factual knowledge in multilingual language models. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 10650–10666, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.658. URL https://aclanthology.org/2023.emnlp-main.658.
|
| 284 |
+
Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, Jérémy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafori, Wenhan Xiong, Alexandre Défossez, Jade Copet, Faisal Azhar, Hugo Touvron, Louis Martin, Nicolas Usunier, Thomas Scialom, and Gabriel Synnaeve. Code llama: Open foundation models for code, 2024. URL https://arxiv.org/abs/2308.12950.
|
| 285 |
+
Tianyi Tang, Wenyang Luo, Haoyang Huang, Dongdong Zhang, Xiaolei Wang, Xin Zhao, Furu Wei, and Ji-Rong Wen. Language-specific neurons: The key to multilingual capabilities in large
|
| 286 |
+
|
| 287 |
+
language models. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5701-5715, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.309.
|
| 288 |
+
Eshaan Tanwar, Subhabrata Dutta, Manish Borthakur, and Tanmoy Chakraborty. Multilingual LLMs are better cross-lingual in-context learners with alignment. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6292-6307, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.346. URL https://aclanthology.org/2023.acl-long.346.
|
| 289 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models. 2023. URL https://arxiv.org/abs/2307.09288.
|
| 290 |
+
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. Do llamas work in English? on the latent language of multilingual transformers. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 15366–15394, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.820.
|
| 291 |
+
Feng Yao, Yufan Zhuang, Zihao Sun, Sunan Xu, Animesh Kumar, and Jingbo Shang. Data contamination can cross language barriers, 2024. URL https://arxiv.org/abs/2406.13236.
|
| 292 |
+
Xiang Zhang, Senyu Li, Bradley Hauer, Ning Shi, and Grzegorz Kondrak. Don't trust ChatGPT when your question is not in English: A study of multilingual abilities and types of LLMs. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 7915-7927, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.491. URL https://aclanthology.org/2023.emnlp-main.491.
|
| 293 |
+
Zhihao Zhang, Jun Zhao, Qi Zhang, Tao Gui, and Xuanjing Huang. Unveiling linguistic regions in large language models. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6228-6247, Bangkok, Thailand, August 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.acl-long.338.
|
| 294 |
+
Qinkai Zheng, Xiao Xia, Xu Zou, Yuxiao Dong, Shan Wang, Yufei Xue, Zihan Wang, Lei Shen, Andi Wang, Yang Li, Teng Su, Zhilin Yang, and Jie Tang. Codegeex: A pre-trained model for code generation with multilingual benchmarking on humaneval-x. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 5673-5684, 2023.
|
| 295 |
+
Wenzhen Zheng, Wenbo Pan, Xu Xu, Libo Qin, Li Yue, and Ming Zhou. Breaking language barriers: Cross-lingual continual pre-training at scale, 2024. URL https://arxiv.org/abs/2407.02118.
|
| 296 |
+
Chengzhi Zhong, Fei Cheng, Qianying Liu, Junfeng Jiang, Zhen Wan, Chenhui Chu, Yugo Murawaki, and Sadao Kurohashi. Beyond english-centric llms: What language do multilingual language models think in?, 2024. URL https://arxiv.org/abs/2408.10811.
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 8: The performances of Python and PHP/C# (y-axis) across training steps (x-axis).
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
Figure 9: The estimated proportion of Python system (y-axis) across training steps (x-axis). The orange line represents the proportion of the Python system estimated using the training loss, i.e., equation 2. The blue line represents the proportion of the Python system using the proportion of Python as the working language.
|
| 305 |
+
|
| 306 |
+

|
| 307 |
+
|
| 308 |
+
# A APPENDIX
|
| 309 |
+
|
| 310 |
+
# A.1 WORKING LANGUAGES DETECTION
|
| 311 |
+
|
| 312 |
+
To determine the language of the generated tokens, we use built-in functions or statements with identical functionalities but different tokens as identifiers. The identifiers are shown in Figure 3. When the PHP identifier "strlen" is generated, we will use logit lens method to generate tokens in the intermediate layers. The generated "len" will be considered as Python while "strlen" will be considered as PHP.
|
| 313 |
+
|
| 314 |
+
Table 3: The identifiers for detecting the working languages and the corresponding Python tokens.
|
| 315 |
+
|
| 316 |
+
<table><tr><td>PHP</td><td>"strlen": "len", "count": "len", "sort": "sorted", "ctype": "type", "array_sum": "sum";</td></tr><tr><td>C#</td><td>"Console.WriteLine": "print", "Console.ReadLine": "input", ".find", ".index", "catch": "except", ".Add": ".append";</td></tr><tr><td>Go</td><td>"=append": ".append", "true": "True", "false": "False", "func": "def", "&": "and", "|": "or", "&": "not", "nil": "None";</td></tr><tr><td>C++</td><td>".push_back": ".append", "catch": "except", "&": "and", "|": "or", "&": "not", ".erase": ".pop", "to_string", "str";</td></tr></table>
|
| 317 |
+
|
| 318 |
+
# A.2 THE PERFORMANCE OF PYTHON
|
| 319 |
+
|
| 320 |
+
We report the Python performance in the experiments in Section 3.2. As shown in Figure 8, in the first stage, the performance of the new language increases, while Python experiences a slight decline. During the second stage, as the new language system is established and competes with Python, Python's performance significantly declines. Finally, Python's performance stabilizes.
|
| 321 |
+
|
| 322 |
+
# A.3 THE ESTIMATED PROPORTION OF THE PYTHON SYSTEM
|
| 323 |
+
|
| 324 |
+
To further demonstrate the relationship between the training loss and estimated proportion of the python system, we used working language for verification since the working language can reflect the internal state of the LLM. Specifically, we calculate the proportion of Python as the working language at each checkpoint and assume that this can be approximated to the proportion of Python systems. We then compare this result with the proportion of Python systems estimated from the corresponding training loss. The results are presented in Figure 9. We can see that the proportion of the Python system estimated from the training loss closely approximates that estimated from the working language, thereby substantiating the relationship between training loss and the estimated proportion of the Python system.
|
2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9cd59b3d92c4088836ff0d74ef3b79615163e0456444187fc2aecfdcbb892d2
|
| 3 |
+
size 375815
|
2025/The Rise and Down of Babel Tower_ Investigating the Evolution Process of Multilingual Code Large Language Model/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/2c051265-4be5-4d52-90f6-c2fb87f39a59_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0e0859a8f6615c65d36893388f8377c1b6b8bed41e3f15247af0a9591667452
|
| 3 |
+
size 9213676
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/full.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE SAME BUT DIFFERENT: STRUCTURAL SIMILARITIES AND DIFFERENCES IN MULTILINGUAL LANGUAGE MODELING
|
| 2 |
+
|
| 3 |
+
Ruochen Zhang $^{1*}$ Qinan Yu $^{2*†}$ Matianyu Zang $^{1}$ Carsten Eickhoff $^{3}$ Ellie Pavlick $^{1}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Brown University $^{2}$ Stanford University $^{3}$ University of Tübingen
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
We employ new tools from mechanistic interpretability to ask whether the internal structure of large language models (LLMs) shows correspondence to the linguistic structures which underlie the languages on which they are trained. In particular, we ask (1) when two languages employ the same morphosyntactic processes, do LLMs handle them using shared internal circuitry? and (2) when two languages require different morphosyntactic processes, do LLMs handle them using different internal circuitry? In a focused case study on English and Chinese multilingual and monolingual models, we analyze the internal circuitry involved in two tasks. We find evidence that models employ the same circuit to handle the same syntactic process independently of the language in which it occurs, and that this is the case even for monolingual models trained completely independently. Moreover, we show that multilingual models employ language-specific components (attention heads and feed-forward networks) when needed to handle linguistic processes (e.g., morphological marking) that only exist in some languages. Together, our results are revealing about how LLMs trade off between exploiting common structures and preserving linguistic differences when tasked with modeling multiple languages simultaneously, opening the door for future work in this direction.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
As large language models (LLMs) have become the undisputed state of the art for building English language technology, there is decided interest in replicating their success across the full range of human languages. However, very little is known about the internal structure of LLMs, and whether such structure is conducive to acquiring broad multilingual capabilities. In fact, recent research has produced seemingly contradictory findings, such as evidence that multilingual models adopt language-specific representations (Tang et al., 2024; Choenni et al., 2024), while simultaneously showing good transfer across languages even in cases that would appear to have no superficial similarities that can be exploited to aid such transfer (Pires et al., 2019). Given the importance of building technology for diverse languages, there is a need for a more precise understanding of how LLMs represent structural similarities and differences across languages, and whether such representations accord with our intuitive understanding of how languages work.
|
| 14 |
+
|
| 15 |
+
In this paper, we present a focused case study on the relationship between English and Chinese processing in LLMs. We employ tools from the growing subfield of mechanistic interpretability in order to ask whether the internal structure of LLMs show correspondence to the linguistic structures which underlie the languages on which they are trained. We focus on only the most minimal criteria of correspondence. In particular, we ask (1) when these two languages employ the same morphosyntactic processes, do LLMs handle them using shared internal circuitry? and (2) when these two languages require different morphosyntactic processes, do LLMs handle them using different internal circuitry? While these questions seem simple, their answers are non-obvious. LLMs readily employ overlapping circuitry for tasks that do not necessarily seem "the same" to humans
|
| 16 |
+
|
| 17 |
+
(Merullo et al., 2024), and at the same time, neural networks frequently differentiate concepts due to surface form variation (Olah et al., 2020), even when humans would easily identify them as part of the same abstract category.
|
| 18 |
+
|
| 19 |
+
Using English and Chinese multilingual and monolingual models, we analyze the internal circuitry involved in two tasks, one focusing on indirect object identification (IOI) which is virtually identical between the languages, and one which involves generating paste tense verbs that require morphological marking in English but not in Chinese. Our contributions are as follows:
|
| 20 |
+
|
| 21 |
+
- We show that a multilingual model uses a single circuit to handle the same syntactic process independently of the language in which it occurs (§3.4).
|
| 22 |
+
- We show that even monolingual models trained independently on English and Chinese each adopt nearly the same circuit for this task (§3.5), suggesting a surprising amount of consistency with how LLMs learn to handle this particular aspect of language modeling.
|
| 23 |
+
- Finally, we show that, when faced with similar tasks that require language-specific morphological processes, multilingual models still invoke a largely overlapping circuit, but employ language-specific components as needed. Specifically, in our task, we find that the model uses a circuit that consists primarily of attention heads to perform most of the task, but employs the feed-forward networks in English only to perform morphological marking that is necessary in English but not in Chinese (§4).
|
| 24 |
+
|
| 25 |
+
Although the scope of our study is restricted to one language pair and a few phenomena, our results provide informative insights into how LLMs trade off between exploiting common structures and preserving linguistic differences when tasked with modeling multiple languages simultaneously. Our experiments can lay the groundwork for future works which seek to improve cross-lingual transfer through more principled parameter updates (Wu et al., 2024), as well as work which seeks to use LLMs in order to improve the study of linguistic and grammatical structure for its own sake (Lakretz et al., 2021; Misra & Kim, 2024).
|
| 26 |
+
|
| 27 |
+
# 2 ANALYSIS METHODS
|
| 28 |
+
|
| 29 |
+
In this work, we are interested in analyzing how large language models (LLMs) trained in different languages differ in terms of the algorithms and mechanisms they invoke to handle various aspects of language processing. To do this, we employ a few recently developed analysis techniques, described below. These techniques are similar in spirit, but differ in certain details that matter for our analysis. For the most part, we find converging evidence for the paper's main claims across both techniques. When results differ in interesting ways, we comment in our results sections.
|
| 30 |
+
|
| 31 |
+
# 2.1 PATH PACHING
|
| 32 |
+
|
| 33 |
+
Path patching (Wang et al., 2023; Goldowsky-Dill et al., 2023; Vig et al., 2020; Hanna et al., 2023; Tigges et al., 2023b) has become the most standard and widely-accepted technique within the still-new subfield of mechanistic interpretability. The goal of path patching is to localize specific circuits within the weights in a trained neural network that play a causal role in model behavior. The setup requires a pair of contrastive inputs, one referred to as the clean input and the other as the corrupted input. Path patching caches the activations for both inputs and then replaces the values of individual heads on the clean input with the values those heads would have taken had they been run on the corrupted input. In this way, the method aims to find the specific important head which maximally explains the final logits. Working backward, i.e., through patching the important heads at each layer, path patching has been used to identify full circuits that carry out the task. On its own, path patching only identifies important heads. To gain insight into the specific functions of these heads, path patching is usually used with logit attribution (Nostalgebraist, 2020; Belrose et al., 2023; Dar et al., 2023; Yu et al., 2023) which projects activations into the vocabulary space, as well as with bespoke analysis techniques invented by prior work to explain specific types of heads, such as duplicate-token detection heads or copy heads (Wang et al., 2023).
|
| 34 |
+
|
| 35 |
+
The advantage of path patching is primarily its wide adoption, which makes it easier to trust results, and enables us to compare with prior work in order to vet the results we are seeing (i.e., checking that we reproduce prior work when we expect to do so). The primary downside is that the method
|
| 36 |
+
|
| 37 |
+
requires careful design of the minimal pair templates. The circuit that is discovered is highly dependent on how these pairs are defined. Moreover, in some of our language pairs, a comparable design of such templates is not possible (see § 4). Thus, we explore additional techniques.
|
| 38 |
+
|
| 39 |
+
# 2.2 INFORMATION FLOW ROUTES
|
| 40 |
+
|
| 41 |
+
Given the aforementioned drawbacks of path patching, we also employ the information flow routes method (Ferrando & Voita, 2024; Tufanov et al., 2024). At each timestep, this method computes the contribution of each head to the residual streams. These heads are then aggregated over the entire attention block to construct a graph of the information flow that show which residual stream at which layer is important to the current residual stream value update across different timesteps. In this method, different from path patching where we can see circuit components across layers, the importance can only be computed every two layers. Compared to path patching, information flow routes have the advantage of not requiring minimal pairs of inputs. The tradeoff is that (1) the method is new and thus we do not benefit from clear expectations about what it should yield in certain settings and (2) this method tends to discover more generic components and larger circuits. In our paper, we thus use both information flow routes, and path patching along with logit attribution in conjunction for analysis at different granularity levels. Unless otherwise stated, both methods produce results that are consistent with the primary claims we make in each experimental section.
|
| 42 |
+
|
| 43 |
+
# 3 TASKS WITH COMMON LINGUISTIC STRUCTURE ACROSS LANGUAGES
|
| 44 |
+
|
| 45 |
+
# 3.1 QUESTIONS
|
| 46 |
+
|
| 47 |
+
We first ask whether large language models (LLMs) will learn to use shared circuitry for different languages, specifically for aspects of language processing that reflect similar structures across languages. That is: if two distinct languages use similar morphosyntactic structure but realize it using different lexical items, will an LLM treat these as the same (handling them with the same abstract internal circuit) or as different (handling them with distinct, language-specific circuits)? We ask this question first in the case of multilingual models, and second in the case of monolingual models.
|
| 48 |
+
|
| 49 |
+
# 3.2 INDIRECT OBJECT IDENTIFICATION (IOI) TASK
|
| 50 |
+
|
| 51 |
+
We set up our data following the original IOI paper (Wang et al., 2023). IOI consists of sentences such as "Susan and Mary went to the bar. Susan gave a drink to [BLANK]", in which the model is expected to predict Mary. These names are tokenized as one single token in the models. To diversify the data, we use fifteen different templates for the actions. We also use ChatGPT to translate the templates and names into Chinese and have them manually inspected by native speakers.
|
| 52 |
+
|
| 53 |
+
Wang et al. (2023) identifies a specific circuit within GPT2 (Radford et al., 2019) for performing the IOI task. At a high level, the circuit reveals that the model runs the following algorithm: first, it identifies that there is a duplicated name (in the above example, Susan). Second, it inhibits attention to this duplicated name. Third, it copies the remaining (non-duplicated) name. These steps are carried out by a set of functionally specialized attention heads: Previous Token Heads, Duplicate Token Heads, Induction Heads, S-inhibition Heads, and Name Mover Heads. Duplicate Token Heads attend to the token position of Susan and identify this name token is mentioned twice in the sentence. S-inhibition Heads inhibit the Name Movers' attention to both occurrences of Susan. The Name Mover Heads output the remaining name (Mary). More detailed descriptions of these heads are given in prior work (Wang et al., 2023; Merullo et al., 2024). For our purposes, what is important is whether the same heads are important and perform the same roles across languages.
|
| 54 |
+
|
| 55 |
+
# 3.3 MODELS
|
| 56 |
+
|
| 57 |
+
We use BLOOM-560M $^1$ (Workshop et al., 2022) as our multilingual model. We first evaluate whether BLOOM is able to complete the task by checking if it always prefers the correct name over the incorrect name. We use both accuracy and zero-rank rate to measure the model performances. Accuracy computes the percentage of times when the probability of predicting the correct
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: Attention heads activation frequency comparison between English IOI, Chinese IOI and English control tasks. Left: Comparison between English IOI and Chinese IOI on BLOOM (with specific functional heads in different marker types). Right: Comparison between English IOI and English Tense on BLOOM. For pairs of heads with non-zero activation frequency, they are shaded based on their value difference. Darker gray means smaller differences. The left graph has more number of shaded head pairs compared to the right, indicating a greater similarity between the activated heads.
|
| 61 |
+
|
| 62 |
+
name is higher than the other name. The zero-rank rate measures the percentage of times where the correct name is the actual top answer. In the IOI task, BLOOM has an accuracy of $100\%$ and a zero-rank accuracy of $96\%$ in English and $95\%$ accuracy and $93\%$ zero-rank accuracy in Chinese. As a multilingual model, BLOOM has a high and comparable performance between Chinese and English.
|
| 63 |
+
|
| 64 |
+
For experiments with monolingual models, we select GPT2-small (Radford et al., 2019) as our English-only model and CPM-distilled ${}^{2}$ as our Chinese-only model ${}^{3}$ . These two models have the same architecture and contain the same number of parameters. GPT2-small has a 99.5% accuracy and CPM has an 84.5% accuracy. The zero-rank rate for GPT2 is 97.5% meaning that the correct name has the highest probability most of the time. CPM has a zero-rank accuracy of 57.5%. Both models are able to complete the task while the performance of GPT2 is comparably better.
|
| 65 |
+
|
| 66 |
+
# 3.4 RESULTS ON MULTILINGUAL MODEL
|
| 67 |
+
|
| 68 |
+
We first validate whether the English and Chinese tasks share the same important heads. We use the information flow routes technique across 50 examples respectively in English and Chinese. We calculate the activation frequency for every head component. If one head is highly activated<sup>4</sup> then it indicates this head is important for the task. In Figure 1, we observe a high overlap in the important heads used between languages. The heads that are shown to be important to solve the task in English are also important in Chinese. As a comparison, we compare with the BLOOM's activated heads
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Figure 2: Illustration of IOI circuits of English and Chinese on BLOOM-560M model. Blue-framed rectangles or texts are the components used in English IOI and orange-framed ones are for Chinese IOI. Heads marked in black are the shared functional heads between English and Chinese IOI. The English and Chinese IOI circuits are highly similar as they use most of the same components for the same functionality to implement the algorithms.
|
| 72 |
+
|
| 73 |
+
from an unrelated task (specifically, the past tense task described in § 4.2) as a control. If the circuit overlap is indeed indicative of the model exploiting shared algorithmic structure, we would expect that the overlap between English and Chinese variants of the same linguistic task should be higher than the overlap between English for two tasks that invoke dissimilar linguistic (i.e., syntactic and semantic) structures. Indeed, compared with the high overlap between the IOI task in Chinese and English, significantly different heads are used in the control task. To measure the similarity between the activation patterns, we compute the Pearson Correlation Coefficient $\rho$ (Freedman et al., 2007) between the head activation frequency for the two task pairs. While $\rho$ between English and Chinese IOI task is $0.72$ , $\rho$ between English IOI and English control task is $0.48$ . Anecdotally, we observe that many of the heads that are shared between English IOI and control are also shared with Chinese IOI. This suggests that these might be generically important heads which we expect to appear in a wide range of tasks, although further work is needed to test this hypothesis quantitatively.
|
| 74 |
+
|
| 75 |
+
We continue to examine if these shared functionalities are the same as the ones defined in Wang et al. (2023). In Figure 2, we identified functionalities of the important components in Figure 1 in Chinese and English in BLOOM. We first use path patching to identify the components and then use the specific metrics mentioned in Wang et al. (2023) to validate their functionalities. Both of these experiments return highly similar results<sup>5</sup>. The functionalities we identify align with Wang et al. (2023). This suggests that not only is the mechanism (i.e., the heads and their functionality) shared across English models (GPT2 and BLOOM), but moreover this same mechanism is shared nearly exactly between Chinese and English within BLOOM.
|
| 76 |
+
|
| 77 |
+
# 3.5 RESULTS ON MONOLINGUAL MODELS
|
| 78 |
+
|
| 79 |
+
While the cross-lingual circuit overlap in a multilingual model is not obvious (i.e., it requires abstracting over patterns that manifest using disjoint sets of surface forms), it is also reasonable to assume that the convergence stems from the model's broader multilingual training data and objective. We thus ask whether similar patterns arise even when models are trained independently in English and in Chinese. For this analysis, as mentioned, we use the English-only model GPT2-small and a distilled version of the Chinese-only model CPM-Generate (Zhang et al., 2020) for their exact same architecture.
|
| 80 |
+
|
| 81 |
+
We discover circuits with path patching which gives similar results and identifies the same components that are important for the circuits. In both GPT2 and CPM, we identified similar circuits as Wang et al. (2023) outlined in Figure 3. This is surprising as it suggests that at a high level, the
|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
Figure 3: English and Chinese IOI task circuits. Blue highlights are components used and inputs for the English task in GPT2. Orange highlights are for CPM. The components with both blue and orange frames are shared in both the English and Chinese circuits. In each of these heads, blue texts indicate the heads in the English Circuit and orange in Chinese. The Negative Name Mover heads appear only in the English model. Copy Suppression Head appears only in the Chinese model. Despite trained on completely different data, models still implement largely similar algorithms to solve tasks in different languages.
|
| 85 |
+
|
| 86 |
+
LLMs consistently converge to highly similar algorithms for solving this type of task, even when trained on very different languages. That said, we do observe some differences between the circuits. In GPT2, Wang et al. (2023) identifies Negative Name Mover Heads. These heads write negatively in the direction of the name tokens. Similarly, Negative Name Mover Heads are found in the circuit in GPT2. However, we didn't observe any Negative Name Mover Heads in CPM, instead of observed the Copy Suppression Head. Such heads are identified by McDougall et al. (2023b) in the Pythia model (Biderman et al., 2023). Instead of reading the information flow from the S-inhibition head, Copy Suppression Heads read directly from the Duplicate Token Heads and suppress the logit of the repeated token in the output. This divergence could provide a good starting point for future work on predicting when and how specific circuitry emerges during training (see Discussion §5).
|
| 87 |
+
|
| 88 |
+
# 4 TASKS WITH LANGUAGE-SPECIFIC STRUCTURE
|
| 89 |
+
|
| 90 |
+
# 4.1 QUESTIONS
|
| 91 |
+
|
| 92 |
+
The above results show that LLMs are capable of recognizing structural parallels across languages, and even that monolingual models, trained without explicit influence from other languages, converge on similar algorithms for similar structures. We next ask: what happens when languages exhibit dissimilar structures? In reality, languages exhibit immense morphological and syntactic variation, and there is never a perfect one-to-one correspondence between the structural elements of different languages. A straightforward example of this phenomenon is the fact that English includes morphological markers for tense (e.g., walk vs. walked) while Chinese does not. We thus ask, given such variation, do LLMs adopt different circuitry for different languages, or rather do they continue to invoke shared circuitry but employ language-specific subroutines as needed?
|
| 93 |
+
|
| 94 |
+
# 4.2 PAST TENSE TASK
|
| 95 |
+
|
| 96 |
+
We construct minimum pair templates in English: "Now I verb present. Yesterday I also verb past." and "Yesterday I verb past. Now I also verb present". For Chinese, we construct the exact same template in Chinese "现在我verb present。昨天我也verb past." and "昨天我verb past。现在我也verb present"。 To collect the verbs, we start with the English verb tense dataset from Big-bench (Srivastava et al., 2022) and filter the verbs to only retain those with regular inflection rules. Then all English verbs are translated, deduplicated and filtered with native speakers' manual inspection. Notice that in Chinese, there are no morphological markers between verb present and verb past. Both of them refer to the stem
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 4: (a) Head activation frequency comparison between English and Chinese past tense task on Qwen. (b) Illustration of the tense circuits in Qwen that contains three components we focus on: copy heads, past tense heads and feed-forward layers. (c) Top promoted tokens from copy head and past tense head. Words highlighted in either blue and orange are expected model predictions. Gray tokens are the specific tokens that the head promotes. Here the copy head is 21.3 and the past tense head is 19.4. As shown in (a), the copy head has a similarly high activation frequency in both languages whereas the past tense head is only frequently activated in English.
|
| 100 |
+
|
| 101 |
+
form of the verb. By leveraging this distinction between the English and Chinese languages, we are able to investigate the mechanistic differences required when models process semantic equivalent tasks but with different morphosyntactic rules. Our analysis on this task focuses more specifically on multilingual models instead of monolingual models since they allow us to more directly observe the structural similarities between the circuitries.
|
| 102 |
+
|
| 103 |
+
# 4.3 MODELS
|
| 104 |
+
|
| 105 |
+
We use Qwen2-0.5B-instruct $^{7}$ (Yang et al., 2024) for the task for its better benchmark performance compared to BLOOM $^{8}$ . The final verb collection contains 62 English verb instances and their Chinese translation and themselves are both single tokens after being processed by the Qwen tokenizer. For the English task, Qwen reaches $96.77\%$ accuracy for the normal input and $58.06\%$ for the zero-rank rate. In Chinese, as there are no minimal pairs, we can only obtain a zero-rank rate of $25.81\%$ .
|
| 106 |
+
|
| 107 |
+
# 4.4 RESULTS
|
| 108 |
+
|
| 109 |
+
In Figure 4, compared to the active heads distribution on the IOI task, we notice that some early-layer heads have high activation frequencies that are shared in both English and Chinese tasks. However, there are much fewer shared heads in the later layers of the model. Specifically for the Chinese task, we observe that almost no heads have high activation frequency in the later layers (Layer 19-20). We posit that some heads that are shown to be more active in these later layers are responsible for the additional inflection rule unique to the English task in our setting, which is unnecessary to the Chinese task.
|
| 110 |
+
|
| 111 |
+
# 4.5 FUNCTION-SPECIFIC HEADS
|
| 112 |
+
|
| 113 |
+
Through path patching, we observe that heads 19.4 and $19.5^{9}$ exert the most significant influence on the final logits (Refer to Appendix C for details). Examining the top promoted words from the most positive projections into the model vocabulary space (Figure 4 (c)), we find that they generally favor past-tense words in English (e.g., was, were, and other past-tense verbs unrelated to the target verb). Among the top-promoted tokens, we also notice Chinese verbs with the suffix "了" (e.g.,进行了,can be translated to "done"). where "了" is commonly used to indicate the completion of an action. Even when provided with Chinese input, these heads continue to strongly encode past-tense concepts. In Figure 4(a), head 19.4 appears frequently activated for English but not for Chinese, suggesting that these heads are predominantly engaged in English processing rather than in Chinese.
|
| 114 |
+
|
| 115 |
+
To validate our findings, we ablate<sup>10</sup> the heads 19.4 and 19.5 and analyze their impact on the tasks. The rank of correct past tense verbs in English remains relatively unchanged. Whereas other nonrelevant past tense verbs move backward slightly to make spaces for the corresponding present tense verbs, resulting in their ranks getting promoted by an average of 83.21 positions. In the Chinese task, the rank of the correct verb moves forward by an average of 4.58 positions. Notably, after ablating these past-tense heads and projecting the final-layer logits to the vocabulary space, present-tense verbs emerge as the second most probable token (See Figure 12 for details). These results suggest that in English, past-tense heads actively suppress present-tense verbs to disambiguate between verb tenses. However, these heads do not play a similar role in the Chinese task.
|
| 116 |
+
|
| 117 |
+
In Ferrando & Voita (2024), they mention that patching can only emphasize the heads that are important for the original tasks but not the contrastive baseline. In the past tense task, we locate past tense heads that are in charge of disambiguating past tense verbs from present tense ones via path patching. These heads are discovered due to the additional morphological markers between the original and contrastive sentence. However, how do models know to promote that specific verb (with or without the marker) without confusing it with others?
|
| 118 |
+
|
| 119 |
+
To address this question, we compute the total score of each head projecting onto either past tense or present tense verb groups (see Appendix C.1). The primary heads identified are 21.3, 21.4, and 21.13. We observe that these heads not only emphasize different morphological variants of the target verb but also promote tokens that are orthographically similar or semantically related, such as synonyms and antonyms (see Figure 12 in Appendix). These heads are crucial for both English and Chinese tasks.
|
| 120 |
+
|
| 121 |
+
To assess their impact, we perform ablation studies on these heads and observe significant impacts on model performance. In English, the average rank of past tense verbs drops by 141.95, while present tense verbs experience a much larger average demotion of 221.39. This disparity suggests that past tense verbs are less affected, possibly because the identified past tense heads remain active, suppressing present tense verbs. As shown in Figure 12, the top-promoted words after ablation are still predominantly general past tense verbs. For Chinese, the model performance also declines, with verbs in general experiencing an average rank demotion of 201.82. These ablation results indicate that the copy heads are essential for both English and Chinese tasks, while the past tense heads are specifically activated in English, where they are crucial for task completion. However, qualitative inspection also suggests that the semantics of the verb is not entirely decoupled from the tense, highlighting a need for further work in order to produce more nuanced descriptions of the function of these heads in this circuit, and in general.
|
| 122 |
+
|
| 123 |
+
# 4.6 FEED-FORWARD NETWORKS
|
| 124 |
+
|
| 125 |
+
Previous work (Merullo et al., 2023) discusses the role of the feed-forward networks (FFN) in retrieving the correct transformation required for the past tense tasks. Specifically, these FFNs are found in the last few layers of the models where the ranked position of the present-tense verb and past-tense verb switch. Comparing the English and Chinese tasks, we assume that these FFN layers play a role in predicting the past-tense verb in English but remain unactivated for the Chinese task. When we ablate out the FFNs from layer 20-24, the accuracy on the English task drops from
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 5: Illustration of the effects of late feed-forward layers ablation (layer 20-23). Left: Zero-rank rate changes comparison between English and Chinese past tense task. Right: Top predicted tokens comparison for before and after ablation. We observe that English performance is significantly impacted after ablation but Chinese is barely influenced. Qualitative results on the right show that the correction token move backward in English but remain the top prediction in Chinese.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
|
| 132 |
+
97.44% to 47.44% and the zero-rank rate from 58.06% to 17.74%. However, for the Chinese task, the zero-rank rate is barely changed (25.08% to 24.19%).<sup>11</sup>
|
| 133 |
+
|
| 134 |
+
In the English example, when examining top predicted tokens qualitatively in Figure 5, we see that the rank of the correct past tense answer visited moved back by 1 position after ablating the MLP layers. Additionally, it is worth noting that morphological variants (E.g. visit, visits, etc.) or semantically relevant tokens (E.g.参观,访问<sup>12</sup>) move to the top predictions. These are also tokens that are actively promoted by the copy heads mentioned earlier. In the Chinese example, we see that the top token as the correct prediction still remain at the same position, unaffected by the FFN layers removal.
|
| 135 |
+
|
| 136 |
+
# 5 RELATED WORK AND DISCUSSION
|
| 137 |
+
|
| 138 |
+
Mechanistic Interpretability We built on previous work on mechanistic interpretability to reverse engineer the mechanism of neural network. Circuits are a significant paradigm of model analysis that has emerged from this field. Originated from the vision model (Olah et al., 2020) and continued to transformer language model (Meng et al., 2023; Wang et al., 2023; Hanna et al., 2023; Varma et al., 2023; Merullo et al., 2024; Lieberum et al., 2023; Tigges et al., 2023a), works in mechanistic interpretability try to characterize the function of individual components in completing certain tasks. Beyond the work in understanding the role of attention heads (Olsson et al., 2022; Chen et al., 2024; Singh et al., 2024; Gould et al., 2023; McDougall et al., 2023a), efforts are made in understanding neurons and feed-forward network in (Vig et al., 2020; Finlayson et al., 2021; Sajjad et al., 2022; Gurnee et al., 2023; Voita et al., 2023; Merullo et al., 2023). These studies mainly use causal methods with minimal pairs to locate the components and their functionalities (Vig et al., 2020; Chan et al., 2022; Geiger et al., 2021; 2023; Meng et al., 2023; Wang et al., 2023; Chan et al., 2023; Cohen et al., 2023). However, these methods heavily rely on manual inspection, which limits their scalability to larger models. Therefore other recent works have attempted to automate the causal process (Conmy et al., 2023; Bills et al., 2023; Syed et al., 2023; Hanna et al., 2024) or use input attribution to trace the subgraph of important components lifting the burden of defining minimal pairs (Ferrando & Voita, 2024).
|
| 139 |
+
|
| 140 |
+
Multilingual Interpretability With English-centric large language models demonstrating outstanding generation and reasoning capabilities, more current efforts have been devoted to expanding such capabilities to multilingual settings (Workshop et al., 2022; Yang et al., 2024; Üstün et al., 2024; Aryabumi et al., 2024). Many works (Wu & Dredze, 2019; Winata et al., 2022) have lever
|
| 141 |
+
|
| 142 |
+
aged transfer learning to boost performances on low-resource languages as an alternative to tackling data deficiency problems. Meanwhile, language models have also been reported to suffer from the "curse of multilinguality" (Conneau, 2019; Chang et al., 2023) where languages interfere with each other given fixed model capacities.
|
| 143 |
+
|
| 144 |
+
Previous works have attempted to investigate cross-lingual representation alignment in BERT-based models (Artetxe et al., 2020; Muller et al., 2021; Conneau et al., 2020; Del & Fishel, 2021; 2022; Hammerl et al., 2024), observing the "First Align, the Predict" paradigm (i.e. models first converge cross-lingual representation to language neutrality then become language specific again across the layers). Other works also quantify their effects on transfer learning abilities on downstream tasks (Malkin et al., 2022; Choenni et al., 2023). More recent works such as Wendler et al. (2024) observe that multilingual generative models go through language conversion phrases with the reasoning process mainly conducted in English. Tang et al. (2024) specifically locates these language-specific neurons and manipulates the output language by activating or deactivating different language-specific neurons. Li et al. (2024) also observe that Multi-Layer Perceptron (MLP) is associated with how toxic concepts are encoded crosslingually. However, it remains unclear how models utilize their components when receiving inputs in different languages: when a task is prompted in different languages, are the underlying circuits shared or does there exist completely separate paths? While Merullo et al. (2024) has reported the reuse of circuit components across different tasks in the same language, no prior work has investigated this phenomenon at the cross-lingual level. Additionally, considering language construction is unlikely to be exactly the same across languages, how are model components used to reflect these differences? In this paper, with the help of mechanistic interpretability techniques like path patching and information flow routes, we provide an initial analysis to quantify to what extent model components are shared when solving tasks for different languages.
|
| 145 |
+
|
| 146 |
+
We investigate when and how large language models (LLMs) encode structural similarities between languages. Specifically, we ask (1) whether linguistic tasks that are structurally similar across languages are handled by the same LLM circuitry and (2) whether linguistic tasks that employ language-specific structure are handled by specialized LLM circuitry. Through a series of experiments employing different tasks and models in both English and Chinese, we find that indeed cross-lingual structural similarity is represented within the LLM using shared circuits which invoke the same algorithm independent of language. We find that these shared algorithms emerge even in monolingual models trained on different languages. We also show that when tasks require language-specific components—specifically past tense morphology in English-LLMs localize the corresponding processing such that it plays a causal role in some languages but not in others.
|
| 147 |
+
|
| 148 |
+
This work builds on previous literature (Artetxe et al., 2020; Muller et al., 2021; Conneau et al., 2020) that discuss the "First Align, then Predict" paradigm, where parameter sharing between models allows for better alignment of cross-lingual structures. Our work in generative models provide supportive evidence by diving deeper into the specific attention and FFN weights that are responsible for such structural similarities. Taken together, our results provide a first step in using mechanistic analysis about LLMs' inner workings in order to ask higher-level questions about how linguistic structures are reflected in state-of-the-art AI models.
|
| 149 |
+
|
| 150 |
+
Our results are limited to specific tasks and datasets, future work will be necessary to replicate and generalize our findings. Even so, our studies yield several interesting and encouraging insights which can inspire new lines of inquiry. For example, we find that the same circuit emerges across different models trained on entirely different languages. This raises questions about what type of structure is shared across otherwise-dissimilar languages, or even shared universally? That is, what regularities exist in the distribution of both English and Chinese such that they give rise to the same highly specific functional components organized in the same way? While the details of this discussion are specific to LLMs, the spirit shares much with long-running linguistic discussions of universality and of learnability in language (Yang, 2004). Deeper cross-disciplinary collaborations could possibly exploit LLMs in order to gain fresh perspectives on such questions. Another important direction concerns practical considerations for developing state-of-the-art technology in languages other than English. This includes not only building LLMs in other languages (Wu et al., 2024), but also ensuring their safety and robustness (Yong et al., 2023; Deng et al., 2023) across languages. Insights into specific mechanisms that are shared between languages could guide more principled approaches to transferring parameters or anticipating failure modes. Future work could explore whether circuit overlap like what we document here can be exploited towards these goals.
|
| 151 |
+
|
| 152 |
+
# 6 ACKNOWLEDGEMENTS
|
| 153 |
+
|
| 154 |
+
We thank Benjamin Muller, Zhaofeng Wu, Javier Ferrando, Yong Zheng-Xin, Jacob Li, Rui-Jie Yew, members of the Lunar lab and Health NLP lab at Brown, and the anonymous reviewers for their valuable discussions and feedback on this work.
|
| 155 |
+
|
| 156 |
+
# REFERENCES
|
| 157 |
+
|
| 158 |
+
Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. On the cross-lingual transferability of monolingual representations. In Dan Jurafsky, Joyce Chai, Natalie Schluter, and Joel Tetreault (eds.), Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 4623–4637, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.421. URL https://aclanthology.org/2020.acl-main.421.
|
| 159 |
+
Viraat Aryabumi, John Dang, Dwarak Talupuru, Saurabh Dash, David Cairuz, Hangyu Lin, Bharat Venkitesh, Madeline Smith, Kelly Marchisio, Sebastian Ruder, et al. Aya 23: Open weight releases to further multilingual progress. arXiv preprint arXiv:2405.15032, 2024.
|
| 160 |
+
Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens, 2023.
|
| 161 |
+
Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar Van Der Wal. Pythia: a suite for analyzing large language models across training and scaling. In Proceedings of the 40th International Conference on Machine Learning, ICML'23. JMLR.org, 2023.
|
| 162 |
+
Steven Bills, Nick Cammarata, Dan Mossing, Henk Tillman, Leo Gao, Gabriel Goh, Ilya Sutskever, Jan Leike, Jeff Wu, and William Saunders. Language models can explain neurons in language models. https://openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html, 2023.
|
| 163 |
+
Lawrence Chan, Adrià Garriga-Alonso, Nicholas Goldwosky-Dill, Ryan Greenblatt, Jenny Nitishinskaya, Ansh Radhakrishnan, Buck Shlegeris, and Nate Thomas. Causal scrubbing, a method for rigorously testing interpretability hypotheses. AI Alignment Forum, 2022. https://wwwalignmentforum.org/posts/JvZhhzycHu2Yd57RN/ causal-scrubbing-a-method-for-rigorously-testing.
|
| 164 |
+
Lawrence Chan, Adrià Garriga-Alonso, Nicholas Goldowsky-Dill, Ryan Greenblatt, Jenny Nitzhinskaya, Ansh Radhakrishnan, Buck Shlegeris, and Nate Thomas. Causal scrubbing: a method for rigorously testing interpretability hypotheses [redwood research]. Alignment Forum, 2023. URL https://wwwalignmentforum.org/posts/JvZhhhzycHu2Yd57RN/ causal-scrubbing-a-method-for-rigorously-testing. Accessed: 17th Sep 2023.
|
| 165 |
+
Tyler A Chang, Catherine Arnett, Zhuowen Tu, and Benjamin K Bergen. When is multilinguality a curse? language modeling for 250 high-and low-resource languages. arXiv preprint arXiv:2311.09205, 2023.
|
| 166 |
+
Angelica Chen, Ravid Shwartz-Ziv, Kyunghyun Cho, Matthew L Leavitt, and Naomi Saphra. Sudden drops in the loss: Syntax acquisition, phase transitions, and simplicity bias in MLMs. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=M05PiKHELW.
|
| 167 |
+
Rochelle Choenni, Dan Garrette, and Ekaterina Shutova. How do languages influence each other? studying cross-lingual data sharing during llm fine-tuning. arXiv preprint arXiv:2305.13286, 2023.
|
| 168 |
+
Rochelle Choenni, Ekaterina Shutova, and Dan Garrette. Examining modularity in multilingual lms via language-specialized subnetworks. In Findings of the Association for Computational Linguistics: NAACL 2024, pp. 287-301, 2024.
|
| 169 |
+
|
| 170 |
+
Roi Cohen, Eden Biran, Ori Yoran, Amir Globerson, and Mor Geva. Evaluating the ripple effects of knowledge editing in language models, 2023.
|
| 171 |
+
Arthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adrià Garriga-Alonso. Towards automated circuit discovery for mechanistic interpretability. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=89ia77nZ8u.
|
| 172 |
+
A Conneau. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116, 2019.
|
| 173 |
+
Alexis Conneau, Shijie Wu, Haoran Li, Luke Zettlemoyer, and Veselin Stoyanov. Emerging crosslingual structure in pretrained language models. In Dan Jurafsky, Joyce Chai, Natalie Schluter, and Joel Tetreault (eds.), Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6022-6034, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.536. URL https://aclanthology.org/2020.acl-main.536.
|
| 174 |
+
Guy Dar, Mor Geva, Ankit Gupta, and Jonathan Berant. Analyzing transformers in embedding space, 2023.
|
| 175 |
+
Maksym Del and Mark Fishel. Similarity of sentence representations in multilingual lms: Resolving conflicting literature and a case study of baltic languages. Balt. J. Mod. Comput., 10, 2021. URL https://api-semanticscholar.org/CorpusID:249921326.
|
| 176 |
+
Maksym Del and Mark Fishel. Cross-lingual similarity of multilingual representations revisited. In Yulan He, Heng Ji, Sujian Li, Yang Liu, and Chua-Hui Chang (eds.), Proceedings of the 2nd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 185–195, Online only, November 2022. Association for Computational Linguistics. URL https://aclanthology.org/2022.aacl-main.15.
|
| 177 |
+
Yue Deng, Wenxuan Zhang, Sinno Jialin Pan, and Lidong Bing. Multilingual jailbreak challenges in large language models. arXiv preprint arXiv:2310.06474, 2023.
|
| 178 |
+
Javier Ferrando and Elena Voita. Information flow routes: Automatically interpreting language models at scale. arXiv preprint arXiv:2403.00824, 2024.
|
| 179 |
+
Matthew Finlayson, Aaron Mueller, Sebastian Gehrmann, Stuart Shieber, Tal Linzen, and Yonatan Belinkov. Causal analysis of syntactic agreement mechanisms in neural language models. In Chengqing Zong, Fei Xia, Wenjie Li, and Roberto Navigli (eds.), Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1828-1843, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.144. URL https://aclanthology.org/2021.acl-long.144.
|
| 180 |
+
David Freedman, Robert Pisani, and Roger Purves. Statistics (international student edition). Pisani, R. Purves, 4th edn. WW Norton & Company, New York, 2007.
|
| 181 |
+
Atticus Geiger, Hanson Lu, Thomas Icard, and Christopher Potts. Causal abstractions of neural networks. In Advances in Neural Information Processing Systems, volume 34, pp. 9574-9586, 2021. URL https://papers.nips.cc/paper/2021/bit/4f5c422f4d49a5a807eda27434231040-Abstract.html.
|
| 182 |
+
Atticus Geiger, Christopher Potts, and Thomas Icard. Causal abstraction for faithful model interpretation. Ms., Stanford University, 2023. URL https://arxiv.org/abs/2301.04709.
|
| 183 |
+
Nicholas Goldowsky-Dill, Chris MacLeod, Lucas Sato, and Aryaman Arora. Localizing model behavior with path patching. arXiv preprint arXiv:2304.05969, 2023.
|
| 184 |
+
Rhys Gould, Euan Ong, George Ogden, and Arthur Conmy. Successor heads: Recurring, interpretable attention heads in the wild, 2023.
|
| 185 |
+
Wes Gurnee, Neel Nanda, Matthew Pauly, Katherine Harvey, Dmitrii Troitskii, and Dimitris Bertsi-mas. Finding neurons in a haystack: Case studies with sparse probing, 2023.
|
| 186 |
+
|
| 187 |
+
Katharina Hammerl, Jindrich Libovický, and Alexander Fraser. Understanding cross-lingual Alignment—A survey. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Findings of the Association for Computational Linguistics: ACL 2024, pp. 10922–10943, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024-findings-acl.649. URL https://aclanthology.org/2024-findings-acl.649.
|
| 188 |
+
Michael Hanna, Ollie Liu, and Alexandre Variengien. How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id= p4PckNQR8k.
|
| 189 |
+
Michael Hanna, Sandro Pezzelle, and Yonatan Belinkov. Have faith in faithfulness: Going beyond circuit overlap when finding model mechanisms, 2024.
|
| 190 |
+
Yair Lakretz, Dieuwke Hupkes, Alessandra Vergallito, Marco Marelli, Marco Baroni, and Stanislas Dehaene. Mechanisms for handling nested dependencies in neural-network language models and humans. Cognition, 213:104699, 2021.
|
| 191 |
+
Xiaochen Li, Zheng-Xin Yong, and Stephen H Bach. Preference tuning for toxicity mitigation generalizes across languages. arXiv preprint arXiv:2406.16235, 2024.
|
| 192 |
+
Tom Lieberum, Matthew Rahtz, János Kramár, Neel Nanda, Geoffrey Irving, Rohin Shah, and Vladimir Mikulik. Does circuit analysis interpretability scale? evidence from multiple choice capabilities in chinchilla, 2023.
|
| 193 |
+
Dan Malkin, Tomasz Limisiewicz, and Gabriel Stanovsky. A balanced data approach for evaluating cross-lingual transfer: Mapping the linguistic blood bank. In Marine Carpuat, Marie-Catherine de Marneffe, and Ivan Vladimir Meza Ruiz (eds.), Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 4903-4915, Seattle, United States, July 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.naacl-main.361. URL https://aclanthology.org/2022.naacl-main.361.
|
| 194 |
+
Callum McDougall, Arthur Conmy, Cody Rushing, Thomas McGrath, and Neel Nanda. Copy suppression: Comprehensively understanding an attention head, 2023a.
|
| 195 |
+
Callum McDougall, Arthur Conmy, Cody Rushing, Thomas McGrath, and Neel Nanda. Copy suppression: Comprehensively understanding an attention head, 2023b. URL https://arxiv.org/abs/2310.04625.
|
| 196 |
+
Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt, 2023.
|
| 197 |
+
Jack Merullo, Carsten Eickhoff, and Ellie Pavlick. Language models implement simple word2vec-style vector arithmetic. arXiv preprint arXiv:2305.16130, 2023.
|
| 198 |
+
Jack Merullo, Carsten Eickhoff, and Ellie Pavlick. Circuit component reuse across tasks in transformer language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=fpoAYV6Wsk.
|
| 199 |
+
Kanishka Misra and Najoung Kim. Generating novel experimental hypotheses from language models: A case study on cross-dative generalization. arXiv preprint arXiv:2408.05086, 2024.
|
| 200 |
+
Benjamin Muller, Yanai Elazar, Benoit Sagot, and Djamé Seddah. First align, then predict: Understanding the cross-lingual ability of multilingual BERT. In Paola Merlo, Jorg Tiedemann, and Reut Tsarfaty (eds.), Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pp. 2214–2231, Online, April 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.eacl-main.189. URL https://aclanthology.org/2021.eacl-main.189.
|
| 201 |
+
Neel Nanda and Joseph Bloom. Transformerlens. https://github.com/neelnanda-io/TransformerLens, 2022.
|
| 202 |
+
|
| 203 |
+
Nostalgebraist. Interpreting gpt: the logit lens, 2020. URL https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens.
|
| 204 |
+
Chris Olah, Nick Cammarata, Ludwig Schubert, Gabriel Goh, Michael Petrov, and Shan Carter. Zoom in: An introduction to circuits. Distill, 2020. doi: 10.23915/distill.00024.001. https://distill.pub/2020/circuits/zoom-in.
|
| 205 |
+
Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. In-context learning and induction heads. Transformer Circuits Thread, 2022. https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html.
|
| 206 |
+
Telmo Pires, Eva Schlinger, and Dan Garrette. How multilingual is multilingual BERT? In Anna Korhonen, David Traum, and Lluis Márquez (eds.), Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4996-5001, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1493. URL https://aclanthology.org/P19-1493.
|
| 207 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
|
| 208 |
+
Hassan Sajjad, Nadir Durrani, and Fahim Dalvi. Neuron-level interpretation of deep nlp models: A survey, 2022. URL https://arxiv.org/abs/2108.13138.
|
| 209 |
+
Aaditya K. Singh, Ted Moskovitz, Felix Hill, Stephanie C. Y. Chan, and Andrew M. Saxe. What needs to go right for an induction head? a mechanistic study of in-context learning circuits and their formation, 2024.
|
| 210 |
+
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. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. arXiv preprint arXiv:2206.04615, 2022.
|
| 211 |
+
Aaquib Syed, Can Rager, and Arthur Conmy. Attribution patching outperforms automated circuit discovery, 2023.
|
| 212 |
+
Tianyi Tang, Wenyang Luo, Haoyang Huang, Dongdong Zhang, Xiaolei Wang, Xin Zhao, Furu Wei, and Ji-Rong Wen. Language-specific neurons: The key to multilingual capabilities in large language models. arXiv preprint arXiv:2402.16438, 2024.
|
| 213 |
+
Curt Tiggs, Oskar John Hollinsworth, Atticus Geiger, and Neel Nanda. Linear representations of sentiment in large language models, 2023a.
|
| 214 |
+
Curt Tiggs, Oskar John Hollinsworth, Atticus Geiger, and Neel Nanda. Linear representations of sentiment in large language models, 2023b. URL https://arxiv.org/abs/2310.15154.
|
| 215 |
+
Igor Tufanov, Karen Hambardzumyan, Javier Ferrando, and Elena Voita. Lm transparency tool: Interactive tool for analyzing transformer language models. arXiv preprint arXiv:2404.07004, 2024.
|
| 216 |
+
Ahmet Üstün, Viraat Aryabumi, Zheng-Xin Yong, Wei-Yin Ko, Daniel D'souza, Gbemileke Onilude, Neel Bhandari, Shivalika Singh, Hui-Lee Ooi, Amr Kayid, et al. Aya model: An instruction finetuned open-access multilingual language model. arXiv preprint arXiv:2402.07827, 2024.
|
| 217 |
+
Vikrant Varma, Rohin Shah, Zachary Kenton, János Kramár, and Ramana Kumar. Explaining grokking through circuit efficiency, 2023. URL https://arxiv.org/abs/2309.02390.
|
| 218 |
+
Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Simas Sakenis, Jason Huang, Yaron Singer, and Stuart Shieber. Causal mediation analysis for interpreting neural nlp: The case of gender bias, 2020.
|
| 219 |
+
|
| 220 |
+
Elena Voita, Javier Ferrando, and Christoforos Nalmpantis. Neurons in large language models: Dead, n-gram, positional, 2023.
|
| 221 |
+
Kevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, and Jacob Steinhardt. Interpretability in the wild: a circuit for indirect object identification in GPT-2 small. In *The Eleventh International Conference on Learning Representations*, 2023. URL https://openreview.net/forum?id=NpsVSN6o4ul.
|
| 222 |
+
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. Do llamas work in english? on the latent language of multilingual transformers. arXiv preprint arXiv:2402.10588, 2024.
|
| 223 |
+
Genta Winata, Shijie Wu, Mayank Kulkarni, Thamar Solorio, and Daniel Preotjiuc-Pietro. Cross-lingual few-shot learning on unseen languages. In Proceedings of the 2nd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 777–791, 2022.
|
| 224 |
+
BigScience Workshop, Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman Castagné, Alexandra Sasha Luccioni, François Yvon, et al. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100, 2022.
|
| 225 |
+
Shijie Wu and Mark Dredze. Beto, bentz, becas: The surprising cross-lingual effectiveness of bert. arXiv preprint arXiv:1904.09077, 2019.
|
| 226 |
+
Zhengxuan Wu, Aryaman Arora, Zheng Wang, Atticus Geiger, Dan Jurafsky, Christopher D Manning, and Christopher Potts. Reft: Representation finetuning for language models. arXiv preprint arXiv:2404.03592, 2024.
|
| 227 |
+
An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. Qwen2 technical report. arXiv preprint arXiv:2407.10671, 2024.
|
| 228 |
+
Charles D Yang. Universal grammar, statistics or both? Trends in cognitive sciences, 8(10):451-456, 2004.
|
| 229 |
+
Zheng-Xin Yong, Cristina Menghini, and Stephen H Bach. Low-resource languages jailbreak gpt-4. arXiv preprint arXiv:2310.02446, 2023.
|
| 230 |
+
Qinan Yu, Jack Merullo, and Ellie Pavlick. Characterizing mechanisms for factual recall in language models. arXiv preprint arXiv:2310.15910, 2023.
|
| 231 |
+
Zhengyan Zhang, Xu Han, Hao Zhou, Ke Pei, Yuxian Gu, Deming Ye, Yujia Qin, Yusheng Su, Haozhe Ji, Jian Guan, et al. Cpm: A large-scale generative Chinese pre-tuned language model. arXiv preprint arXiv:2012.00413, 2020.
|
| 232 |
+
|
| 233 |
+
# A TASK BENCHMARK PERFORMANCES
|
| 234 |
+
|
| 235 |
+
In this section, we present the accuracy and zero-rank rate of both the IOI tasks and Past Tense tasks discussed in § 3 and § 4. In Table 1, we see that all monolingual models and multilingual models perform well on the IOI tasks. For the past tense task, BLOOM obtains good performance in English but not in Chinese. In comparison, Qwen performs slightly worse in English but much better in Chinese. As a result, we focus on Qwen for our language-specific analysis.
|
| 236 |
+
|
| 237 |
+
<table><tr><td>Model</td><td>Lang.</td><td colspan="2">Accuracy</td><td colspan="2">Zero-Rank Rate</td></tr><tr><td colspan="6">IOI Task</td></tr><tr><td></td><td></td><td>normal</td><td>flipped</td><td>normal</td><td>flipped</td></tr><tr><td>GPT2-small</td><td>EN</td><td>99.5</td><td>99.5</td><td>97.5</td><td>95.5</td></tr><tr><td>CPM-Generate-distill</td><td>ZH</td><td>84.5</td><td>86.5</td><td>57.5</td><td>73.0</td></tr><tr><td>BLOOM-560M</td><td>EN</td><td>100.0</td><td>100.0</td><td>96.0</td><td>91.0</td></tr><tr><td>BLOOM-560M</td><td>ZH</td><td>95.0</td><td>100.0</td><td>93.0</td><td>99.5</td></tr><tr><td colspan="6">Past Tense Task</td></tr><tr><td></td><td></td><td>normal</td><td>flipped</td><td>normal</td><td>flipped</td></tr><tr><td>BLOOM-560M</td><td>EN</td><td>90.3</td><td>51.6</td><td>80.7</td><td>37.1</td></tr><tr><td>BLOOM-560M</td><td>ZH</td><td>-</td><td>-</td><td>12.9</td><td>1.6</td></tr><tr><td>Qwen2-0.5B-instruct</td><td>EN</td><td>96.8</td><td>69.4</td><td>58.1</td><td>24.2</td></tr><tr><td>Qwen2-0.5B-instruct</td><td>ZH</td><td>-</td><td>-</td><td>25.9</td><td>21.0</td></tr></table>
|
| 238 |
+
|
| 239 |
+
Table 1: Model performances for the IOI and past tense tasks. Note that we are unable to compute accuracy for the past tense task in Chinese (marked by -) due to the absence of minimal pairs.
|
| 240 |
+
|
| 241 |
+
# B PACHING DETAILS OF THE IOI TASK
|
| 242 |
+
|
| 243 |
+
# B.1 MULTILINGUAL MODELS
|
| 244 |
+
|
| 245 |
+
To extract the IOI circuits on the BLOOM model, we use the transformer-lens library (Nanda & Bloom, 2022) and follow the practices of Wang et al. (2023). Figure 6 shows the main steps to discover specific function heads for both English and Chinese tasks on BLOOM. Throughout each of the steps, we notice the important heads discovered between English and Chinese are highly similar, leading to largely overlapping circuits. Figure 7 validates the functions of the Duplicate Token Heads, Previous Token Heads and Induction Heads found by showing their attention scores on sequences of random tokens. Please refer to more detailed definitions and experiment designs on these metrics in Wang et al. (2023). Additionally, we provide IOI circuits identified in Qwen2-0.5B-instruct by carrying out the same procedure as above (shown in Figure 8).
|
| 246 |
+
|
| 247 |
+
# B.2 MONOLINGUAL MODELS
|
| 248 |
+
|
| 249 |
+
For path patching on CPM, we add the CPM models to the transformer-lens library and follow the same steps as the multilingual model described above. Figure 9 presents the comparison between English and Chinese inputs when we patch to the residual stream on GPT2 and CPM respectively. Notice that here the heatmap patterns are quite different because they are trained on completely different data despite the same architecture (with the same number of layers and heads). Then we perform patching to individual heads and follow Wang et al. (2023) to find out their functionalities. Figure 9 Right shows the attention patterns of the name mover heads and copy suppression heads. We see that mover heads 8.9 and 9.10 show copying behaviors toward the IO tokens and 11.7 shows copying behavior toward both IO and S tokens. The copy suppression head 11.2 on the other hand suppresses the copying action of the S token. Figure 10 shows our validation experiments on the functions of Induction heads, Duplicate Token Heads and S-inhibition heads. Specifically for the S-inhibition head 7.0, when we ablate the head, the original name movers stop preferring the IO tokens but start to promote both IO and S tokens.
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 6: Path Patching steps for extracting IOI circuits on BLOOM-560M. Left: English Input. Right: Chinese Input.
|
| 253 |
+
|
| 254 |
+
# C PACHING DETAILS OF THE PAST TENSE TASK
|
| 255 |
+
|
| 256 |
+
# C.1 PATH PACHING
|
| 257 |
+
|
| 258 |
+
For the Past Tense task, we conduct path patching with the English templates since there are no minimal pairs available for Chinese. As shown in Figure 11 Left, two heads on layer 19 are the most
|
| 259 |
+
|
| 260 |
+

|
| 261 |
+
Figure 7: Metrics for Duplicate Token Head, Previous Token Head, and Induction Head on English Inputs (Top) and Chinese Inputs (Bottom).
|
| 262 |
+
|
| 263 |
+
prominent. We later use head attribution and see that they are past tense heads that pay attention to general past-tense concepts and suppress present-tense verbs (shown in Figure 12). In Figure 11 Right, we project all the head outputs to the vocabulary space and see how much each head writes to the direction of either past tense verbs, present tense verbs in English, or verbs in Chinese. Again we notice that the patterns are similar and a few heads on Layer 21 writes strongly to both past tense and present tense verbs. These heads also show up in the path patching results but do not influence the final logits as strongly as the past tense heads. By examining the top-promoted tokens by these heads, we see that these heads promote orthographically similar or semantically adjacent tokens. These could contain verb forms with various morphological markers as well as synonyms and antonyms (See Figure 12). More detailed discussions can be seen in $\S 4.5$ .
|
| 264 |
+
|
| 265 |
+
# C.2 ABLATION EXPERIMENTS
|
| 266 |
+
|
| 267 |
+
Figure 12 shows rank changes on the verbs and contains qualitative examples when each type of the function-specific heads are zero-ablated. In general, we notice that past tense heads are specifically activated for English tasks only and therefore the rank of past tense verbs moves forward when these heads are ablated. However, the prediction does not get impacted when we ablate these heads for the Chinese task. Copy heads, on the other hand, are important for both English and Chinese tasks.
|
| 268 |
+
|
| 269 |
+

|
| 270 |
+
Figure 8: Illustration of IOI circuits of English and Chinese on Qwen2-0.5B-instruct model. Blue-framed rectangles or texts are the components used in English IOI and orange-framed ones are for Chinese IOI.
|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
Figure 9: Left: Path patching comparison between GPT2 on English task and CPM on Chinese task. Right: Attention probability vs. head projection output into the IO and S space.
|
| 274 |
+
|
| 275 |
+
Past-tense, present-tense verbs in English and Chinese verbs are all demoted significantly when copy heads are ablated, indicating these heads are shared components implementing the same functions for both English and Chinese circuits.
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
|
| 279 |
+

|
| 280 |
+
Input: Paul Daniel Paul Daniel Paul Daniel Paul Daniel
|
| 281 |
+
|
| 282 |
+

|
| 283 |
+
Figure 10: Top: Induction head scores on random tokens and its attention pattern. Middle: Duplicate token attention patterns on ABAB random strings. Bottom: S-inhibition head ablation effects on name movers.
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
Figure 11: Left: Path Patching on English Past Tense Task. Right: Verb Promotion Heatmaps for English and Chinese Past Tense Task.
|
| 287 |
+
|
| 288 |
+

|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
|
| 292 |
+
<table><tr><td colspan="8">Now I restore. Yesterday I also ____________</td><td></td></tr><tr><td>Before</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>restored</td><td>got</td><td>had</td><td>tried</td><td>went</td><td>started</td><td>found</td><td>took</td><td>saw</td></tr><tr><td>After</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>restored</td><td>restore</td><td>got</td><td>head</td><td>tried</td><td>started</td><td>found</td><td>have</td><td>took</td></tr></table>
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 12: Effects of Past Tense Heads and Copy Head Ablation.
|
| 296 |
+
|
| 297 |
+
<table><tr><td colspan="8">Now I change. Yesterday I also ___________</td><td></td></tr><tr><td>Before</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>changed</td><td>had</td><td>went</td><td>did</td><td>tried</td><td>took</td><td>made</td><td>wrote</td><td>started</td></tr><tr><td>After</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>had</td><td>went</td><td>did</td><td>took</td><td>made</td><td>tried</td><td>changed</td><td>wrote</td><td>started</td></tr><tr><td colspan="8">现在我改变。昨天我也 ___________</td><td></td></tr><tr><td>Before</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>改变</td><td>去</td><td>想</td><td>在</td><td>做了</td><td>说</td><td>吃了</td><td>改变了</td><td>开始</td></tr><tr><td>After</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td colspan="9">+47</td></tr><tr><td>在</td><td>去</td><td>做了</td><td>想</td><td>说</td><td>开始</td><td>吃了</td><td>...</td><td>改变</td></tr></table>
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2edc813a9f8613e27553580f7b68cebca368a2f61ba23a6e309aa8499682313d
|
| 3 |
+
size 724063
|
2025/The Same but Different_ Structural Similarities and Differences in Multilingual Language Modeling/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/ddf51567-8546-4629-bb78-420f5e1af635_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:869ddf630eea48f392d25df3e6456deb7a202f0f8bf6396fa9beb3c1867ad205
|
| 3 |
+
size 3101395
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/full.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE SEMANTIC HUB HYPOTHESIS: LANGUAGE MODELS SHARE SEMANTIC REPRESENTATIONS ACROSS LANGUAGES AND MODALITIES
|
| 2 |
+
|
| 3 |
+
Zhaofeng $\mathbf{W}\mathbf{u}^{\text{心}}$ Xinyan Velocity $\mathbf{Y}\mathbf{u}^{\text{II}}$ Dani Yogatama $^{\text{II}}$ Jiasen Lu $^{\text{=}}$ Yoon Kim $^{\text{心}}$
|
| 4 |
+
|
| 5 |
+
MIT II University of Southern California = Allen Institute for AI
|
| 6 |
+
|
| 7 |
+
zfw@csail.mit.edu
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Modern language models can process inputs across diverse languages and modalities. We hypothesize that models acquire this capability through learning a shared representation space across heterogeneous data types (e.g., different languages and modalities), which places semantically similar inputs near one another, even if they are from different modalities/languages. We term this the semantic hub hypothesis, following the hub-and-spoke model from neuroscience (Patterson et al., 2007) which posits that semantic knowledge in the human brain is organized through a transmodal semantic "hub" which integrates information from various modality-specific "spokes" regions. We first show that model representations for semantically equivalent inputs in different languages are similar in the intermediate layers, and that this space can be interpreted using the model's dominant pretraining language via the logit lens. This tendency extends to other data types, including arithmetic expressions, code, and visual/audio inputs. Interventions in the shared representation space in one data type also predictably affect model outputs in other data types, suggesting that this shared representations space is not simply a vestigial byproduct of large-scale training on broad data, but something that is actively utilized by the model during input processing.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: Examples of the semantic hub effect across input data types. For every other layer, we show the closest output token to the hidden state based on the logit lens. Llama-3's hidden states are often closest to English tokens when processing Chinese texts, arithmetic expressions (in §C in the appendix), and code, in a semantically corresponding way. LLaVA, a vision-language model, and SALMONN, an audio-language model, have similar behavior when processing images/audio. As shown for the arithmetic expression example, models can be intervened cross-lingually or cross-modally, such as using English even though the input is non-English, and be steered towards corresponding effects. Boldface is only for emphasis.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Modern language and multimodal models (LMs)<sup>1</sup> can process heterogeneous data types: text in different languages, non-linguistic inputs such as code and math expressions, and even other modalities such as images and sound. How do LMs process these distinct data types with a single set of parameters? One strategy might be to learn specialized subspaces for each data type that are only employed when processing it. Often, however, surface-distinct data types share underlying semantic concepts. This is most obvious for sentences in different languages with the same meaning; but such shared concepts are present across other data types, e.g., between an image and its caption, or a piece of code and its natural language description. The human brain, for example, is believed to have a transmodal "semantic hub" (Patterson et al., 2007; Ralph et al., 2017) that integrates semantic information from modality-specific "spokes" (e.g., visual/auditory cortices). A model, leveraging structural commonalities across data types, could similarly project their surface forms into a shared representation space, perform computations in it, and then project back out into surface forms.
|
| 19 |
+
|
| 20 |
+
To what extent is this idealized strategy adopted by actual models? Wendler et al. (2024) find that on simple synthetic tasks, Llama-2 (Touvron et al., 2023b) maps various input languages into a shared "English space", hinting that it leverages this shared representation scheme to an extent. We show that this is in fact a much more general phenomenon: when a model processes inputs from multiple data types, there is a shared representation space, and this space can be interpreted to an extent in the LM's inherently dominant language (usually English) via the logit lens (nostalgebraist, 2020). Concretely, we say that this space is scaffolded by tokens in the LM's dominant language.
|
| 21 |
+
|
| 22 |
+
We first show that LMs represent semantically similar inputs from distinct data types (across languages, or between natural language and arithmetic expressions, code, formal semantic structures, and multimodal inputs) to be close to one another in intermediate LM layers. We further show that we can interpret these hidden representations to an extent using the LM's dominant data type—e.g., when processing a Chinese input, an English-dominant LM "thinks" in English before projecting back out to a Chinese space. Finally, we perform intervention experiments showing that intervening in the shared representation space using the LM's dominant data type, predictably affects model output when processing other data types; that is, the shared representation space (and the processing of these representations through subsequent layers) is not a vestigial byproduct of the model's being trained on (say) English-dominant text, but causally impacts model behavior.
|
| 23 |
+
|
| 24 |
+
Our work is complementary and distinct from prior work which finds structural similarities between the representation spaces of models trained (usually independently) on different data types, such as those showing that text representations from text-only LMs can be aligned, via a transformation, to vision/audio representations of modality-specific models (Ilharco et al., 2021; Merullo et al., 2022; Li et al., 2023; Ngo & Kim, 2024; Huh et al., 2024; i.a.), the literature on cross-lingual word embedding alignment (Mikolov et al., 2013; Artetxe et al., 2017; Conneau et al., 2018; Schuster et al., 2019; i.a.), and work on cross-task transfer (Moschella et al., 2023; Wu et al., 2024; i.a.). We instead show that an LM trained on multiple data types represents and processes them in a shared space without requiring explicit alignment transformation. We hope our findings inspire ways to more easily interpret the mechanisms of current models and future work aimed at better controlling models.
|
| 25 |
+
|
| 26 |
+
# 2 THE SEMANTIC HUB HYPOTHESIS
|
| 27 |
+
|
| 28 |
+
Let $\mathcal{X}_z$ be the domain of a data type $z\in \mathcal{Z}$ where $\mathcal{Z}$ denotes all model-supported data types. E.g., for languages, $\mathcal{X}_{\mathrm{Chinese}}$ could be all Chinese tokens, while for images $\mathcal{X}_{\mathrm{Image}} = [0,255]^{w\times h\times 3}$ could be the RGB values for an $w\times h$ -sized patch. Consider a function $M_z:\mathcal{X}_z^*\to S_z$ mapping an input sequence into a semantic representation space $S_{z}$ (the "hub"), and a verbalization function $V_{z}:S_{z}\rightarrow \mathcal{X}_{z}^{*}$ . Given an input prefix $w_{1:t}^{z}\in \mathcal{X}_{z}^{*}$ of length $t$ where $w_{i}^{z}\in \mathcal{X}_{z}$ , a sensible (implementation-agnostic) way to continue the sequence is to first encode it into a modality-agnostic representation, $m^{in} = M_z(w_{1:t})$ , reason and formulate a representation of futures $m^{out}\in S_z$ , and finally verbalizing via $V_{z}(m^{out})$ .
|
| 29 |
+
|
| 30 |
+
An LM parameterizes a similar process: it uses $M_{\mathrm{LM}}$ to map various input data types into a representation space $S_{\mathrm{LM}} \subseteq \mathbb{R}^d$ (early layers), performs computations in the space (middle layers), and verbalizes the output via $V_{\mathrm{LM}}$ (end layers and the LM head). However, it is unknown how different
|
| 31 |
+
|
| 32 |
+
data types are structured in the representation space. E.g., one possibility is that the LM partitions $\mathbb{R}^d$ into disjoint subspaces for each data type and processes them separately. We instead hypothesize that LMs learn to represent and process different data types in a shared representation space that functions as a modality-agnostic "semantic hub." That is, semantically similar inputs $w_{1:t}^{z_1}$ and $w_{1:t'}^{z_2}$ from distinct data types—e.g., texts in different languages that are mutual translations—are similarly mapped in $S_{\mathrm{LM}}$ ; informally, $M_{\mathrm{LM}}(w_{1:t}^{z_1}) \approx M_{\mathrm{LM}}(w_{1:t'}^{z_2})$ . However, absolute similarity measures (i.e., $\mathrm{sim}(M_{\mathrm{LM}}(w_{1:t}^{z_1}), M_{\mathrm{LM}}(w_{1:t'}^{z_2})))$ are generally difficult and unintuitive to interpret in high dimensional spaces. We thus focus on relative similarity measures, taking a semantically unrelated sequence $u_{1:t'}^{z_2}$ , and evaluating whether $w_{1:t}^{z_1}$ is closer to $w_{1:t'}^{z_2}$ than $u_{1:t''}^{z_2}$ . We formalize this hypothesis as:
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\left. \operatorname {s i m} \left(M _ {\mathrm {L M}} \left(w _ {1: t} ^ {z _ {1}}\right), M _ {\mathrm {L M}} \left(w _ {1: t ^ {\prime}} ^ {z _ {2}}\right)\right) > \operatorname {s i m} \left(M _ {\mathrm {L M}} \left(w _ {1: t} ^ {z _ {1}}\right), M _ {\mathrm {L M}} \left(u _ {1: t ^ {\prime \prime}} ^ {z _ {2}}\right)\right). \right. \tag {1}
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
Moreover, when the LM has a dominant data type $z^{\star}$ in training (e.g., English for Llama-2), we hypothesize that this shared representation space is "anchored" by $z^{\star}$ , in the sense that Eq. 1 holds strongly enough that we can probe out to $z^{\star}$ from $M_{\mathrm{LM}}(w_{1:t}^{z})$ . We further expect this to hold for model representations of the future, which autoregressive LMs are trained to model. I.e., the representation of a prefix should better align with a verbalization of the future in $z^{\star}$ than a non-dominant $z^{\circ}$ (though we now need a different kind of model representation, denoted with $\mathrm{repr}_{\mathrm{LM}}$ ):
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\left. \operatorname {s i m} \left(M _ {\mathrm {L M}} \left(w _ {1: t} ^ {z}\right), \operatorname {r e p r} _ {\mathrm {L M}} \left(w _ {> t} ^ {z ^ {\star}}\right)\right) > \operatorname {s i m} \left(M _ {\mathrm {L M}} \left(w _ {1: t} ^ {z}\right), \operatorname {r e p r} _ {\mathrm {L M}} \left(w _ {> t} ^ {z ^ {\circ}}\right)\right). \right. \tag {2}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
We hypothesize that this holds even when $z = z^{\circ}$ . E.g., with an English-dominant LM, its encoding of the Chinese prefix $w_{1:t}^{\circ} =$ "这篇论文太难" (trans. "This paper is so hard to") should be closer to the representation of the English word $w_{t+1}^{z^{\star}} =$ "write" than its Chinese translation $w_{t+1}^{z^{\circ}} =$ "写".
|
| 45 |
+
|
| 46 |
+
# 2.1 METHOD:TESTING THE SEMANTIC HUB HYPOTHESIS
|
| 47 |
+
|
| 48 |
+
We test the semantic hub hypothesis by considering pairs of distinct data types, the dominant one $z^{\star}$ and a non-dominant one $z^{\circ}$ , different for each experiment. Whenever semantically related inputs are available (e.g., an image and its caption), we directly test Eq. 1 by using $h_t^\ell$ , the LM's hidden state at position $t$ and layer $\ell$ , as $M_{\mathrm{LM}}(w_{1:t}^{z})$ , and further using cosine similarity for the similarity function.
|
| 49 |
+
|
| 50 |
+
We operationalize Eq. 2 via the logit lens (nostalgebraist, 2020), a simple training-free approach for interpreting the hidden states of a model. Transformer-based LMs produce the next-token distribution using softmax $\left(Oh_t^L\right)$ (omitting the bias term) where $O$ is the output token embeddings (or "unembeddings") and $h_t^L$ is the final layer hidden state. Logit lens applies the same operation to the intermediate layers to obtain $p^{\mathrm{logitens}}(\cdot \mid h_t^\ell) \coloneqq \mathrm{softmax}\left(Oh_t^\ell\right)$ . Logit lens has been found to produce meaningful distributions that shed light on an LM's internal representations and computations.
|
| 51 |
+
|
| 52 |
+
Under the logit lens, $\mathrm{repr}_{\mathrm{LM}}$ in Eq. 2 considers the output embedding of single tokens, $\tau^{z^{\star}} \in \mathcal{X}_{z^{\star}}$ and $\tau^{z^{\circ}} \in \mathcal{X}_{z^{\circ}}$ . We use the first token of $w_{>t}^{z^{\star}}$ and $w_{>t}^{z^{\circ}}$ . Using the dot product for $\sin(\cdot)$ , Eq. 2 is equivalent to comparing the logit lens probabilities,
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
p ^ {\text {l o g i t l e n s}} \left(\tau^ {z ^ {\star}} \mid h _ {t} ^ {\ell}\right) > p ^ {\text {l o g i t l e n s}} \left(\tau^ {z ^ {\circ}} \mid h _ {t} ^ {\ell}\right), \tag {3}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
i.e., testing whether the probability of the continuation in the dominant language is more likely than the continuation in the original input data type. Since the logit lens is tailored for probing out a single token, we usually consider short-enough verbalizations such that a single BPE token can reliability identify it. This often means that the two verbalizations are two single words that are semantic equivalents. Nevertheless, we also consider longer future verbalizations when its first token unambiguously suggests one interpretation in that context, which allows more flexibility.
|
| 59 |
+
|
| 60 |
+
While the above test is simple, $\tau^{z^{\circ}}$ is unavailable in many multimodal models without vocabulary tokens for $z^{\circ}$ . We thus only focus on testing Eq. 1, though logit lens enables an additional test:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
p ^ {\text {l o g i t l e n s}} \left(\tau^ {z ^ {\star}} \mid h _ {t} ^ {\ell}\right) > p ^ {\text {l o g i t l e n s}} \left(v ^ {z ^ {\star}} \mid h _ {t} ^ {\ell}\right), \tag {4}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $v$ is an unrelated token. Also, using the next token as $\tau^{z^{\star}}$ is unsuitable for multimodal models never been trained to output at non-dominant data type positions $t$ , but the non-language data types are
|
| 67 |
+
|
| 68 |
+
Figure 2: Results for the multilingual experiments. The $95\%$ CI is plotted in all. Parallel texts have similar representations. Hidden states for Chinese texts are close to the unembedding of English tokens.
|
| 69 |
+

|
| 70 |
+
(a) The cosine similarity of intermediate representations of English and Chinese parallel texts.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
(b) Same as (a), but subtracted by a baseline over non-parallel texts.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
(c) Llama-3 logit lens log prob. of parallel English vs. Chinese tokens when processing Chinese text.
|
| 77 |
+
|
| 78 |
+
only encoded as prefixes. For such models, we hypothesize that they still fully represent the current input in a shared space. We thus take $\tau^{z^{\star}}$ to be the last token of $w_{1:t'}^{z^{\star}}$ (which is the interpretation of $w_{1:t}^{z^{\circ}}$ under $z^{\star}$ ; e.g., if $w_{1:t}^{z^{\circ}}$ is an image, $w_{1:t'}^{z^{\star}}$ can be the objects in the image described in language).
|
| 79 |
+
|
| 80 |
+
# 3 EVIDENCE OF A SEMANTIC HUB
|
| 81 |
+
|
| 82 |
+
We apply our tests across diverse data types and find evidence of a shared representation space in all cases. We show additional experiments on arithmetic data in $\S C$ with similar trends.
|
| 83 |
+
|
| 84 |
+
# 3.1 MULTILINGUAL
|
| 85 |
+
|
| 86 |
+
Wendler et al. (2024) find that when processing specific in-context learning (ICL) templates for highly synthetic lexical-level tasks (word repetition, word translation, etc.) in non-English languages, the intermediate hidden states of Llama-2 are closer to the unembeddings of English tokens than the output language. This is consistent with our hypothesis, albeit constrained to a simple synthetic task and one LM. We show that this shared representation space is a general property of LMs when they face naturally occurring text.
|
| 87 |
+
|
| 88 |
+
Experiment 1: Representation similarity of mutual translations. Translation datasets enable a direct test for Eq. 1, with semantically equivalent cross-lingual sentences as $w_{1:t}^{z_1}$ and $w_{1:t'}^{z_2}$ and a randomly chosen non-matching sentence as $u_{1:t''}^{z_2}$ . We use the professionally-translated English-Chinese parallel sentences from Chen et al. (2016) ( $N = 5260$ ). For each sentence pair, we use a template to transform each sentence and compute the representation cosine similarity for each layer, using the last token position as the sentence representation following Wu et al. (2023), which preserves sentence information (Morris et al., 2023). We consider two English-dominant LMs, Llama-2 and Llama-3, one Chinese-dominant LM, Baichuan-2 (Yang et al., 2023), and one multilingual LM, BLOOM (BigScience, 2023), specifically the 7B/8B variants. §A.1 contains more details.
|
| 89 |
+
|
| 90 |
+
In Figure 2a, the raw cosine similarity is high, up to $>80\%$ (left), and it is also significantly higher than the non-matching pairs' similarities (right), but only in the middle layers. These trends support the hypothesis that the middle layers act as the semantic hub of the LM. Notably, this trend also exists for BLOOM which does not have a dominant pretraining language.
|
| 91 |
+
|
| 92 |
+
Experiment 2: Probing out continuations in the dominant language. We next test Eq. 3: whether continuations in the dominant language have higher probability than those in the input language. We use 1,000 Chinese and English sentences from Wikipedia (Wikipedia-Foundation, 2023). For the English-dominant Llama-3, we use a Chinese prefix $w_{1:t}^{z^{\circ}}$ as input and take $\tau^{z^{\circ}}$ to be the next Chinese token (i.e., $w_{t+1}^{z^{\circ}}$ ) and $\tau^{z^{\star}}$ to be the (first token of the) English translation of $w_{t+1}^{z^{\circ}}$ . §A.1 has further details. Figure 2c plots the logit lens probability for the two tokens as well as the uniform distribution probability. In early layers, we cannot read out either token better than random chance. After layer 17, the model representations are substantially closer to the English token than the Chinese token until layer 31, showing that the model hidden space is indeed better scaffolded by English than Chinese.
|
| 93 |
+
|
| 94 |
+
Next, we extend this analysis to consider global language-level trends across languages. We first compute $p(w \mid z)$ , the token distribution under a language $z$ , by running the LM tokenizer on the language-specific split of the mC4 dataset (Xue et al., 2021). We then use Bayes' rule to estimate
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 3: Language prob. of English and Chinese (and the top language when it is neither, which only happens for Bloom). Regardless of the input language, the dominant LM language is more salient in early-middle layers, and the input language is more salient in the final layers. Bloom has no clear intermediate language.
|
| 98 |
+
|
| 99 |
+
$p(z\mid w)\propto p(w\mid z)p(z)$ with a uniform prior $p(z)$ .<sup>3</sup> We finally compute the probability of $h_t^\ell$ belonging to each language as $p(z\mid h_t^\ell)\propto \sum_{w\in \mathcal{V}}p(z\mid w)p^{\mathrm{logitdens}}(w\mid h_t^\ell)$ . If our hypothesis that the universal representation space is better scaffolded by the dominant language is true, we expect the dominant language $z^{\star}$ to have the highest probability across input languages in the middle layers.
|
| 100 |
+
|
| 101 |
+
Figure 3 shows the layer-wise probability of English and Chinese on 10,000 English/Chinese Wikipedia sentences. When English-dominant models process Chinese text, Wendler et al.'s finding generalizes, where English dominates in intermediate layers and Chinese only dominates in the final layers. On the Chinese-dominant LM, this trend flips: when processing English text, its intermediate layers are closer to Chinese tokens and the final layers are closer to English tokens. For BLOOM, a multilingual model with a relatively balanced training language mixture, we do not see a clear dominating language in intermediate layers; when we manually inspect the closest tokens, in most cases they are symbols with no clear semantics (though this does not mean it lacks a unified representation space: see Exp. 1). 70B model trends in §A.1 are highly similar to the 7B/8B ones.
|
| 102 |
+
|
| 103 |
+
# 3.2 CODE
|
| 104 |
+
|
| 105 |
+
Many recent LMs are trained on code corpora (Touvron et al., 2023a;b; Llama-3-Team, 2024; Gemini-Team, 2024). We find that they similarly process code by projecting it into a unified representation space shared with regular language tokens. Figure 4 shows examples, where LMs in the intermediate layers tend to verbalize the future in free-form English, unconstrained by program syntax. E.g., in the first program, given the Python prefix "... for idx, elem in enumerate(numbers): for idx2, elem2 in enumerate(numbers", instead of the groundtruth continuation in Python": if idx != idx2: ...", the most salient intermediate token is "except", likely attempting to predict in English "(for each element in numbers) except if it is equal to idx". Similarly, in
|
| 106 |
+
|
| 107 |
+
a list expression "[1.0, 2.0," instead of continuing in Python " 3.0", it predicts "and", which is a natural way to continue in English. In these cases, it is difficult to obtain semantically equivalent English-Python pairs, so we only test Eq. 3 across targeted cases in Python below.
|
| 108 |
+
|
| 109 |
+
Experiment 1: Simple Python list literals. We systematically test the list case, where $h_t^l$ is the hidden state after processing “,”, $\tau^{z^\star} =$ and“, and $\tau^{z^\circ}$ is the actual next token. Figure 5a shows
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 4: Logit lens analysis on Llama-2 processing Python programs. For every other layer, we show the closest token (sometimes whitespace) to the hidden states before the grayed-out texts. The model tends to verbalize the future prediction in English that corresponds to the code continuations (in gray).
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
(a) Llama-2 logit lens log probabilities (and the $95\%$ CI) at commas in Python list literals, of the English "and" token (and baseline tokens) vs. the actual next token in the program, from MBPP.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
(b) The distance between Llama-2 hidden states when predicting a function argument, to the unembedding of the argument's name (its semantic role) vs. the actual argument expression, in MBPP.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 5: Results for the code experiments. Code expressions are close to semantically meaningful free-form English words in early-middle layers, such as "and" in list literals and the argument's semantic role in function calls; in the final layers, the representation converges to the context-constrained Python token.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
(a) The cosine similarity difference between intermediate representations of matching images and captions, over non-matching ones.
|
| 125 |
+
(b) The frequency of the closest token to LLaVA's hidden states describing the image color, against a baseline using "white".
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
(c) The cosine similarity difference between intermediate SALMONN representations of matching audios and labels, over non-matching ones.
|
| 129 |
+
Figure 6: Results for the multimodal experiments. The $95\%$ CI is plotted in all. Model representation of (a) visual and (c) audio inputs and their textual labels are similar. Furthermore, in (b), model representations of individual color patch tokens are close to English words for those colors.
|
| 130 |
+
|
| 131 |
+
that this trend holds systematically on all such commas in the MBPP dataset (Austin et al., 2021) $(N = 6923$ , including unit tests): as expected, in the final layers, the representation is closer to the ground truth next token's unembedding, and closer to "and" in the middle layers. We also show the probability with two other tokens, "or" and "not", as baselines, both of which are lower than "and".
|
| 132 |
+
|
| 133 |
+
Experiment 2: Python function call arguments. Function arguments have names in the definition, such as "range(start, end, step)"; but when invoked, they are filled with actual context-appropriate expressions. We call the argument names "semantic roles", and the context-specific expressions the "surface forms", inspired by thematic relations in linguistics (Fillmore, 1968). In the second example in Figure 1, we show that LMs predict the arguments by first "thinking" about their semantic role $(\tau^{z^{\star}})$ and then instantiating with surface-constrained expressions $(\tau^{z^{\circ}})$ . We extract all function calls and arguments from MBPP with simple filtering, resulting in 540 arguments (see §A.2 for details). For each argument, we use the logit lens to inspect the hidden states at the preceding token ("(" or ","). For each argument, Figure 5b visualizes if the semantic role or the surface form is closer to each layer's hidden state of Llama-2. The semantic role $(\tau^{z^{\star}})$ dominates for the early to middle layers, even though the role token usually does not appear in the context at all, and only in the final layers do the representations converge towards the surface form argument $(\tau^{z^{\circ}})$ .
|
| 134 |
+
|
| 135 |
+
# 3.3 VISUAL INPUT
|
| 136 |
+
|
| 137 |
+
Past work has investigated the representation of separately trained vision and text models, often finding that their representation spaces are similarly structured and alignable (Merullo et al., 2022; Li et al., 2023; Huh et al., 2024; i.a.). We show that when trained together, vision-language models learn to project both modalities into a joint representation space. Current vision-language models typically represent images by segmenting them into patches, embedding them into "image tokens",
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
(a) Caption, LLaVA
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 7: When processing an image patch, model logit lens probabilities of either the nouns in the corresponding caption or the patch segmentation label, as well as a baseline for each with no correspondence between the patch and the label. The image representations better match the semantically corresponding English words.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
(b) Caption, Chameleon
|
| 147 |
+
(c) Segment., LLaVA
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
(d) Segment., Chameleon
|
| 151 |
+
|
| 152 |
+
and then feeding them into the transformer model along with other text tokens (Lu et al., 2023; 2024; Liu et al., 2023; i.a.). We hypothesize that the intermediate representations of the image patches are close to the corresponding language tokens that describe the scene. Experimental details are in $\S A.3$ .
|
| 153 |
+
|
| 154 |
+
Experiment 1: Representation similarity between an image and its caption. Though not constituting exact semantic equivalence, an image paired with its caption provides one possible test for Eq. 1. We take 1000 images and corresponding captions in the MSCOCO dataset (Lin et al., 2014) and measure their hidden states cosine similarity in LLaVA-7B (Liu et al., 2023) and Chameleon-7B (Chameleon-Team, 2024). As in Eq. 1, we subtract the average cosine similarity between non-matching image-caption pairs as a baseline, separately for each layer. Figure 6a shows that semantically matching inputs, even though in different modalities, are more similarly mapped in the models' hidden space, though the similarities are lower than for mutual translations ( $\S 3.1$ ).
|
| 155 |
+
|
| 156 |
+
Experiment 2: Patch-level analysis using logit lens. We now test the image-description similarity using the logit lens, in Eq. 4. First, as a toy setting for illustration, we inspect LLaVA's representations of pure color images, specifically those in red, green, blue, and black. Figure 6b shows that, in up to more than $20\%$ of the time in the intermediate layers (averaged across the patches and the four colors, $N = 2304$ ), the closest token is the corresponding color word (out of all vocabulary tokens).
|
| 157 |
+
|
| 158 |
+
We next consider the image captions, the same 1000. For each image patch, we compute a scalar patch-caption alignment score (for each layer separately) by summing over the logit lens probabilities for all nouns in its caption (as a proxy for objects in the image) at that image patch position. For the irrelevant token baseline, we compute the alignment score in the same way but using an unrelated caption. We normalize by the number of nouns so that the score is comparable. We average this alignment score over all patches in all images. Figures 7a and 7b show that the matching caption better aligns with the image patch representations than an unmatched caption, reliable across all layers for LLaVA and consistently in the middle-upper layers for Chameleon.
|
| 159 |
+
|
| 160 |
+
Finally, we perform a finer-grained study using not caption information but segmentation information, with object labels in specific image locations. The setup is near-identical captions, but the scalar
|
| 161 |
+
|
| 162 |
+
alignment score for a given patch is not computed using its logit lens probability of caption nouns, but of its corresponding object label. For the irrelevant token baseline, we compute the alignment by aligning each patch with a different randomly chosen object category from all categories. Figures 7c and 7d show that, for LLaVA, the patches are much better aligned to the corresponding labels than randomly assigned labels (which have near-0 logit lens probability). For Chameleon, this is the case for only one middle layer, and not in a statistically significant way, though we will show in §4 that Chameleon's latent space can be reliably steered using English tokens.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 8: When SALMONN processes an audio clip, the logit lens prob. of the English words in the audio label vs. another random label. The audio representations better match the semantically corresponding label in English.
|
| 166 |
+
|
| 167 |
+
# 3.4 AUDIO
|
| 168 |
+
|
| 169 |
+
Audio is another modality that is often modeled jointly with text (Lu et al., 2024; Gong et al., 2024; 2023; i.a.), and we perform similar experiments using SALMONN, an audio-text model. We use the VGGSound dataset (Chen et al., 2020) which contains 10-second audio clips with labels, e.g., "duck quacking" or "playing cello". We use the same two multimodal tests as in the vision case.
|
| 170 |
+
|
| 171 |
+
Table 1: Steering Llama-3's output sentiments using trigger words in English vs. the input language (either Spanish or Chinese). We report the mean sentiment, disfluency (perplexity), and relevance of the continuation, as well as the standard deviation across 10 seeds. Cross-lingual steering is consistently successful, sometimes even more than monolingual steering, without substantial damage in text fluency and relevance.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Text Lang.</td><td>Steering Dir.</td><td>Steering Lang.</td><td>Sentiment</td><td>Disfluency (↓)</td><td>Relevance (↑)</td></tr><tr><td rowspan="5">Spanish</td><td>None</td><td>None</td><td>0.143±0.022</td><td>7.35±1.19</td><td>0.861±0.002</td></tr><tr><td rowspan="2">↓</td><td>Spanish</td><td>0.125±0.034</td><td>10.54±2.39</td><td>0.842±0.004</td></tr><tr><td>English</td><td>0.139±0.026</td><td>8.75±2.20</td><td>0.857±0.002</td></tr><tr><td rowspan="2">↑</td><td>Spanish</td><td>0.175±0.035</td><td>7.98±2.04</td><td>0.856±0.002</td></tr><tr><td>English</td><td>0.159±0.026</td><td>7.35±1.01</td><td>0.859±0.003</td></tr><tr><td rowspan="5">Chinese</td><td>None</td><td>None</td><td>0.178±0.030</td><td>11.06±3.12</td><td>0.869±0.004</td></tr><tr><td rowspan="2">↓</td><td>Chinese</td><td>0.152±0.040</td><td>10.78±2.66</td><td>0.866±0.005</td></tr><tr><td>English</td><td>0.161±0.029</td><td>11.36±1.13</td><td>0.864±0.004</td></tr><tr><td rowspan="2">↑</td><td>Chinese</td><td>0.153±0.034</td><td>11.12±3.12</td><td>0.870±0.004</td></tr><tr><td>English</td><td>0.179±0.032</td><td>10.90±3.25</td><td>0.869±0.003</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Experiment 1: Representation similarity between audio and its label. We study the representation cosine similarity between an audio and its label description, and subtract from it a baseline which is the average cosine similarity between non-matching pairs, separately for each layer. On 1000 samples from VGGSound, we see in Figure 6c that semantically matching audios and labels have more similar representations in the intermediate layers.
|
| 176 |
+
|
| 177 |
+
Experiment 2: Token-level analysis using logit lens. Unlike for vision-language models where we can map individual image patches to model token positions, such correspondence does not exist in SALMONN. This limits us to position-agnostic evaluations like the captioning study, preventing fine-grained analysis such as segmentation. Similar to the captioning experimental design, we measure the average logit lens probabilities of the words in the label, and consider a random label in the dataset with no word overlap as the baseline. On the same 1000 samples, Figure 8 shows a familiar trend, where the audio hidden states are closer to semantically corresponding label words. We note that this is a lower bound—many words in some labels, such as the prepositions in the label "writing on blackboard with chalk", are unlikely to be represented in the audio hidden states.
|
| 178 |
+
|
| 179 |
+
# 4 INTERVENING IN THE SEMANTIC HUB
|
| 180 |
+
|
| 181 |
+
Interpretability results should be tested under a causal framework to ensure that the observation is not a vestigial byproduct of model training with no effect on model behavior (Vig et al., 2020; Ravichander et al., 2021; Elazar et al., 2021; Chan et al., 2022; i.a.). Here, we show that the semantic hub does causally affect model output: Semantically transforming $\tau^{z^{\star}}$ in English interpretably leads to corresponding behavior changes in the non-dominant data type. §B reports relevant hyperparameters.
|
| 182 |
+
|
| 183 |
+
Multilingual. Past work has shown that (monolingual) interventions in the middle layers can steer LM outputs predictably (Subramani et al., 2022; Turner et al., 2024; Rimsky et al., 2024; i.a.). If English-dominant LMs have a shared representation space, we should be able to intervene on it in English even with non-English inputs. We use a common intervention method, Activation Addition (ActAdd; Turner et al., 2024), which has two stages: (1) taking a steering word (and optionally a contrastive one) that semantically represents the steering effect, passing it through the same model, and taking its hidden states at an intermediate layer; (2) adding the steering hidden states to those in the original forward pass of the regular generation process, at the same layer. We take their sentiment-steering experiment but generalize it cross-lingually. See Turner et al. (2024) for details.
|
| 184 |
+
|
| 185 |
+
We consider two non-dominant languages, Spanish and Chinese, and take 1000 texts in the InterTASS dataset (Spanish; Díaz-Galiano et al., 2018) and the multilingual Amazon reviews corpus (Chinese; Keung et al., 2020), and generate continuations either without modifications or intervened using ActAdd. As the steering vector, we use the difference between a positive sentiment trigger word and a negative one, in the appropriate direction for negative or positive steering. Specifically, we use "Good" and "Bad" for English, "Bueno" and "Malo" for Spanish, and "好" and "坏" for Chinese. In addition to sentiment evaluation, we also measure the generation fluency and compute the relevance
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
(a) Steering a single-argument "range (end)" call to be predicted as double argument.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
(b) Replacing image representations of a color with language tokens of another color, and expecting the model to predict the new color.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
(c) Steering mammal sounds to be predicted as non-mammal sounds, and vice versa.
|
| 195 |
+
Figure 9: For (a) code, (b) images, and (c) audio, steering model output using English words, for various intervention strengths ((a) and (c)) and layers ((b)). (a) and (b) measure successfulness with the proportion of instances steered to the correct output, and (c) measures the probability of predicting mammals. Overall, intervening in the unified representation space in English reliably leads to desired model output changes.
|
| 196 |
+
|
| 197 |
+
of the generation with the prefix using trained models, following Turner et al. (2024). Ideally, the intervention should achieve the desired sentiment without hurting text fluency/relevance (see §B.1).
|
| 198 |
+
|
| 199 |
+
Because we take intermediate layer representations of the steering words (step (1)), if the semantic hub is language-agnostic, we expect similar representations and similar steering effectiveness across steering languages. Table 1 shows that this is indeed true on Llama-3: ActAdd in the text language is in most cases effective, achieving the intended effect on sentiment, with usually only a modest decrease in fluency and relevance, often statistically insignificant. This aligns with the English-only findings in Turner et al. (2024). And intervening in English is similarly effective as using the text language. Table 2 (appendix) shows the results for Llama-2, with very similar trends.
|
| 200 |
+
|
| 201 |
+
Code. Based on our semantic role observation in §3.2, we run a intervention experiment using the "range" function. We focus on two overloaded versions of "range": "range(start, end)" and "range(end)". If the semantic hub causally affects model output, then intervening in it using the semantic role tokens should affect the function version used in a given context.
|
| 202 |
+
|
| 203 |
+
We take all single-argument “range(end)” calls in the MBPP dataset $(N = 159)$ and attempt to expand it into “range(θ, end)”. As the intervention, we use an even simpler method than ActAdd: because the unembedding vectors of the semantic roles are close to the intermediate hidden states, we simply compute the difference between the unembeddings of two contrasting trigger tokens (“start” – “end”), scale it by a constant coefficient, and add it to the hidden representation corresponding to the open parenthesis “(” at an intermediate layer (layer 17). For all these “range” call in the dataset, we let Llama-2<sup>4</sup> generate without and with intervention. Figure 9a shows that, with increasing intervention strength, more instances are successfully steered to “range(θ, end)”, up to $67\%$ .
|
| 204 |
+
|
| 205 |
+
Visual inputs. We show that we can steer the output of vision-language models by intervening on image patches using language tokens and analyze how this affects textual output. We focus on Chameleon which showed a weaker trend in §3.3. Focusing on the color setup, if the representation of a color is similar between visual and language inputs, we hypothesize that we can replace the image hidden states corresponding to one pure color image patch with the unembedding of the language token for another color, and mislead the model to "perceive" the new color when asked about it. Note that replacing the hidden state is a more invasive intervention than addition. But there is one confounder: the intervened word may lexically bias the model to generate the same word, without any reasoning that incorporates the new color. To control for this, we show two colors in one image and only intervene at the positions corresponding to one color: if the intervention unconditionally and lexically biases the generation to the new color, this effect would (incorrectly) affect both colors.<sup>5</sup>
|
| 206 |
+
|
| 207 |
+
We consider all color pairs using the same colors as in §3.3: red, green, blue, and black, and picking one color in the pair and intervene to a new third color ( $N = 48$ ). As the intervention, we start from a layer $\ell$ and replace all hidden states at and after $\ell$ to be the unembedding of the new color minus the old color. We ask the model what the two colors in the image are, and only consider the intervention successful if the model answers both the new color and the other unintervened color correctly. Figure 9b shows the success rate across all $\ell$ : it gets as high as above $80\%$ .<sup>6</sup> We highlight that, for both this experiment and the earlier ones in this section, the interventions are not even necessarily guaranteed to lead sensible outputs, let alone correct ones.
|
| 208 |
+
|
| 209 |
+
Audio. We perform a similar intervention with SALMONN, with the same desideratum that the QA process should require reasoning rather than outputting the intervened token as-is. We consider 1000 animal sounds in the VGGSound dataset, specifically only single-word animals, and ask "Is this animal a mammal?" We intervene both on mammal sounds with a random non-mammal word and vice versa, in case the intervention only biases the model in a certain direction. We perform the invention similarly to the code case, adding the unembedding difference between the new trigger word and the original animal name, scaled by a constant, at layer 13. We measure the probability of the "Yes" token and the "No" token and compute the normalized "Yes" probability. Figure 9c visualizes the two cases across intervention strengths. As the strength increases, the model is more likely to predict in the steered direction, again demonstrating cross-data-type intervention effectiveness.
|
| 210 |
+
|
| 211 |
+
# 5 RELATED WORK
|
| 212 |
+
|
| 213 |
+
Representation alignment between separately trained models. A long line of work has investigated the representations of separately trained mono-data-type models, and showed that they can be aligned through a transformation. In the multilingual case, it has been found that separately trained word embeddings for different languages can be aligned (Mikolov et al., 2013; Smith et al., 2017; Cao et al., 2020; i.a.). Similarly, prior work has shown that visual representations and text representations from different models can be mapped together (Merullo et al., 2022; Koh et al., 2023; Maniparambil et al., 2024; i.a.). Huh et al. (2024) argued that these are possible because the different data modalities are projections of the same underlying reality. Our work, in contrast, looks at a single model that processes multiple input data types and finds that the resulting representations align, without needing a transformation. Xia et al. (2023) considered an objective that explicitly trains the model to increase such alignment, while we analyze how it organically emerges through autoregressive training.
|
| 214 |
+
|
| 215 |
+
Representation evolution throughout layers. Past work has analyzed the representation evolution throughout transformer layers, inspecting how it affects reasoning (Yang et al., 2024), factuality (Chuang et al., 2024), knowledge (Jin et al., 2024), etc. From another angle, work on layer pruning and early exiting also speaks to representation dynamics across layers (Gromov et al., 2024; Sanyal et al., 2024; i.a.). Mechanistically, Elhage et al. (2021), Merullo et al. (2024), Todd et al. (2024), Hendel et al. (2023), i.a., more precisely characterized the representation changes algorithmically.
|
| 216 |
+
|
| 217 |
+
Inspecting model hidden states. We adopted the logit lens for its simplicity which brings few confounders. However, alternatives exist, usually requiring some training (Belrose et al., 2023; Ghandeharoui et al., 2024; Templeton et al., 2024; i.a.). They allow for more expressive explanations, though at the risk of overfitting. Similar methods have been developed for other modalities, such as Toker et al. (2024). Testing our hypothesis using these methods would be valuable future work.
|
| 218 |
+
|
| 219 |
+
# 6 CONCLUSION
|
| 220 |
+
|
| 221 |
+
We proposed and investigated the semantic hub hypothesis, which posits that LMs represent semantically similar inputs from distinct modalities near one another in intermediate layers. We find evidence of this phenomenon across multiple LMs and data types, and further observe that intervening in this space in the model's dominant language (usually English) leads to predictable behavior changes.
|
| 222 |
+
|
| 223 |
+
# ACKNOWLEDGMENTS
|
| 224 |
+
|
| 225 |
+
We thank Alex Gu, Alexis Ross, Alisa Liu, Aryaman Arora, Asma Ghandeharioun, Cedegao E. Zhang, Freda Shi, Han Guo, Jack Merullo, Linlu Qiu, Mor Geva, Naman Jain, Ruochen Zhang, Sarah Wiegreffe, Shushan Akakelyan, and Yung-Sung Chuang for discussions and help at various stages of this project. Figure 1 uses icons from flatican.com. This study was supported by funds from MIT-IBM Watson AI Lab.
|
| 226 |
+
|
| 227 |
+
# REFERENCES
|
| 228 |
+
|
| 229 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning bilingual word embeddings with (almost) no bilingual data. In Proceedings of Annual Meeting of the Association for Computational Linguistics (ACL), 2017. URL https://aclanthology.org/P17-1042.
|
| 230 |
+
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint, 2021. URL https://arxiv.org/abs/2108.07732.
|
| 231 |
+
Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens. arXiv preprint, 2023. URL https://arxiv.org/abs/2303.08112.
|
| 232 |
+
Kevin S. Beyer, Jonathan Goldstein, Raghu Ramakrishnan, and Uri Shaft. When is "nearest neighbor" meaningful? In Proceedings of the 7th International Conference on Database Theory, ICDT '99, pp. 217-235, Berlin, Heidelberg, 1999. Springer-Verlag. ISBN 3540654526.
|
| 233 |
+
BigScience. Bloom: A 176b-parameter open-access multilingual language model. arXiv Preprint, 2023. URL https://arxiv.org/abs/2211.05100.
|
| 234 |
+
Steven Cao, Nikita Kitaev, and Dan Klein. Multilingual alignment of contextual word representations. In Proceedings of the International Conference on Learning Representations (ICLR), 2020. URL https://openreview.net/forum?id=r1xCMyBtPS.
|
| 235 |
+
Chameleon-Team. Chameleon: Mixed-modal early-fusion foundation models. arXiv preprint, 2024. URL https://arXiv.org/abs/2405.09818.
|
| 236 |
+
Lawrence Chan, Adrià Garriga-Alonso, Nicholas Goldwosky-Dill, Ryan Greenblatt, Jenny Nitishinskaya, Ansh Radhakrishnan, Buck Shlegeris, and Nate Thomas. Causal scrubbing, a method for rigorously testing interpretability hypotheses. AI Alignment Forum, 2022. URL https://wwwalignmentforum.org/posts/JvZhhzycHu2Yd57RN/ causal-scrubbing-a-method-for-rigorously-testing.
|
| 237 |
+
Honglie Chen, Weidi Xie, Andrea Vedaldi, and Andrew Zisserman. Vggsound: A large-scale audiovisual dataset. In Proceedings of the International Conference on Acoustics, Speech, and Signal Processing (ICASSP), 2020. URL https://ieeexplore.ieee.org/document/9053174.
|
| 238 |
+
Song Chen, Gary Krug, and Stephanie Strassel. Gale phase 3 and 4 chinese newswire parallel text. Linguistic Data Consortium, 2016. URL https://catalog.ldc.upenn.edu/LDC2016T25.
|
| 239 |
+
Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James R. Glass, and Pengcheng He. Dola: Decoding by contrasting layers improves factuality in large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=Th6NyL07na.
|
| 240 |
+
Alexis Conneau, Guillaume Lample, Marc'Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. Word translation without parallel data. In Proceedings of International Conference on Learning Representations (ICLR), 2018. URL https://arxiv.org/abs/1710.04087.
|
| 241 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Unsupervised cross-lingual representation learning at scale. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2020. URL https://aclanthology.org/2020.acl-main.747.
|
| 242 |
+
|
| 243 |
+
Manuel Carlos Diaz-Galiano, Eugenio Martinez-Camara, Miguel Angel Garcia Cumbreras, Manuel Garcia Vega, and Julio Villena-Román. The democratization of deep learning in tass 2017. Proces. del Leng. Natural, 2018. URL https://api-semanticscholar.org/CorpusID: 13667878.
|
| 244 |
+
Yanai Elazar, Shauli Ravfogel, Alon Jacovi, and Yoav Goldberg. Amnesic Probing: Behavioral Explanation with Amnesic Counterfactuals. Transactions of the Association for Computational Linguistics (TACL), 2021. URL https://doi.org/10.1162/tacl_a_00359.
|
| 245 |
+
Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. A mathematical framework for transformer circuits. Transformer Circuits Thread, 2021. https://transformer-circuits.pub/2021/framework/index.html.
|
| 246 |
+
Charles J. Fillmore. The case for case. In Emmon Bach and Robert T. Harms (eds.), *Universals in Linguistic Theory*, pp. 0-88. Holt, Rinehart and Winston, New York, 1968.
|
| 247 |
+
Gemini-Team. Gemini: A family of highly capable multimodal models. arXiv preprint, 2024. URL https://arxiv.org/abs/2312.11805.
|
| 248 |
+
Asma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon, and Mor Geva. Patchscopes: A unifying framework for inspecting hidden representations of language models. arXiv preprint, 2024. URL https://arxiv.org/abs/2401.06102.
|
| 249 |
+
Yuan Gong, Alexander H. Liu, Hongyin Luo, Leonid Karlinsky, and James Glass. Joint audio and speech understanding. In Proceedings of the IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), 2023. URL https://arxiv.org/abs/2309.14405.
|
| 250 |
+
Yuan Gong, Hongyin Luo, Alexander H. Liu, Leonid Karlinsky, and James R. Glass. Listen, think, and understand. In Proceedings of the International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=nBZBPXdJc.
|
| 251 |
+
Andrey Gromov, Kushal Tirumala, Hassan Shapourian, Paolo Glorioso, and Daniel A. Roberts. The unreasonable ineffectiveness of the deeper layers. arXiv preprint, 2024. URL https://arxiv.org/abs/2403.17887.
|
| 252 |
+
Roee Hendel, Mor Geva, and Amir Globerson. In-context learning creates task vectors. In Findings of the Association for Computational Linguistics: EMNLP, December 2023. URL https://aclanthology.org/2023-findings-emnlp.624.
|
| 253 |
+
Matthew Honnibal and Ines Montani. spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing. To appear, 2017. URL https://spacy.io.
|
| 254 |
+
Minyoung Huh, Brian Cheung, Tongzhou Wang, and Phillip Isola. The platonic representation hypothesis. In Proceedings of Machine Learning Research (ICML), 2024. URL https://proceedings.mlr.press/v235/huh24a.html.
|
| 255 |
+
Gabriel Ilharco, Rowan Zellers, Ali Farhadi, and Hannaneh Hajishirzi. Probing contextual language models for common ground with visual representations. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2021. URL https://aclanthology.org/2021.nacl-main.422.
|
| 256 |
+
Mingyu Jin, Qinkai Yu, Jingyuan Huang, Qingcheng Zeng, Zhenting Wang, Wenyue Hua, Haiyan Zhao, Kai Mei, Yanda Meng, Kaize Ding, et al. Exploring concept depth: How large language models acquire knowledge at different layers? arXiv preprint, 2024. URL https://arxiv.org/abs/2404.07066.
|
| 257 |
+
Phillip Keung, Yichao Lu, György Szarvas, and Noah A. Smith. The multilingual Amazon reviews corpus. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. URL https://aclanthology.org/2020.emnlp-main.369.
|
| 258 |
+
|
| 259 |
+
Jing Yu Koh, Ruslan Salakhutdinov, and Daniel Fried. Grounding language models to images for multimodal inputs and outputs. In Proceedings of the International Conference on Machine Learning (ICLR), 2023. URL https://arxiv.org/abs/2301.13823.
|
| 260 |
+
Jiaang Li, Yova Kementchedjhieva, and Anders Søgaard. Implications of the convergence of language and vision model geometries. arXiv preprint, 2023. URL https://arxiv.org/abs/2302.06555.
|
| 261 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and Larry Zitnick. Microsoft coco: Common objects in context. In Proceedings of the European Conference on Computer Vision (ECCV), 2014. URL https://www.microsoft.com/en-us/research/publication/microsoft-coco-common-objects-in-context/.
|
| 262 |
+
Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In Advances in Neural Information Processing Systems (NeurIPS), 2023. URL https://arxiv.org/abs/2304.08485.
|
| 263 |
+
The Llama-3-Team. The llama 3 herd of models. arXiv Preprint, 2024. URL https://arxiv.org/abs/2407.21783.
|
| 264 |
+
Jiasen Lu, Christopher Clark, Rowan Zellers, Roozbeh Mottaghi, and Aniruddha Kembhavi. UNIFIED-IO: A unified model for vision, language, and multi-modal tasks. In Proceedings of the International Conference on Learning Representations (ICLR), 2023. URL https://openreview.net/forum?id=E01k9048soZ.
|
| 265 |
+
Jiasen Lu, Christopher Clark, Sangho Lee, Zichen Zhang, Savya Khosla, Ryan Marten, Derek Hoiem, and Aniruddha Kembhavi. Unified-io 2: Scaling autoregressive multimodal models with vision language audio and action. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024. URL https://arxiv.org/abs/2312.17172.
|
| 266 |
+
Mayug Maniparambil, Raiymbek Akshulakov, Yasser Abdelaziz Dahou Djilali, Mohamed El Amine Seddik, Sanath Narayan, Karttikeya Mangalam, and Noel E. O'Connor. Do vision and language encoders represent the world similarly? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024. URL https://arxiv.org/abs/2401.05224.
|
| 267 |
+
MDBG. Mdbg chinese-english dictionary (cc-ceduct). MBDG, 2024. URL https://www.mdbg.net/ chinese/dictionary?page $\equiv$ cc-ceduct. Downloaded: 2024-09-25.
|
| 268 |
+
Jack Merullo, Louis Castricato, Carsten Eickhoff, and Ellie Pavlick. Linearly mapping from image to text space. arXiv preprint, 2022. URL https://arxiv.org/abs/2209.15162.
|
| 269 |
+
Jack Merullo, Carsten Eickhoff, and Ellie Pavlick. Language models implement simple Word2Vec-style vector arithmetic. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2024. URL https://aclanthology.org/2024.nacl-long.281.
|
| 270 |
+
Tomas Mikolov, Quoc V Le, and Ilya Sutskever. Exploiting similarities among languages for machine translation. arXiv preprint, 2013. URL https://arxiv.org/abs/1309.4168.
|
| 271 |
+
John Morris, Volodymyr Kuleshov, Vitaly Shmatikov, and Alexander Rush. Text embeddings reveal (almost) as much as text. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023. URL https://aclanthology.org/2023.emnlp-main.765.
|
| 272 |
+
Luca Moschella, Valentino Maiorca, Marco Fumero, Antonio Norelli, Francesco Locatello, and Emanuele Rodolà. Relative representations enable zero-shot latent space communication. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=SrC-nwieGJ.
|
| 273 |
+
Jerry Ngo and Yoon Kim. What do language models hear? probing for auditory representations in language models. In Proceedings of Annual Meeting of the Association for Computational Linguistics (ACL), 2024. URL https://arxiv.org/abs/2402.16998.
|
| 274 |
+
|
| 275 |
+
nostalgebraist. Interpreting gpt: the logit lens. LessWrong, 2020. URL https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens.
|
| 276 |
+
Karalyn Patterson, Peter J Nestor, and Timothy T Rogers. Where do you know what you know? the representation of semantic knowledge in the human brain. Nature reviews neuroscience, 8(12): 976-987, 2007.
|
| 277 |
+
Matthew A Lambon Ralph, Elizabeth Jefferies, Karalyn Patterson, and Timothy T Rogers. The neural and computational bases of semantic cognition. Nature reviews neuroscience, 18(1):42-55, 2017.
|
| 278 |
+
Abhilasha Ravichander, Yonatan Belinkov, and Eduard Hovy. Probing the probing paradigm: Does probing accuracy entail task relevance? In Proceedings of the Conference of the European Chapter of the Association for Computational Linguistics (EACL), 2021. URL https://aclanthology.org/2021.eacl-main.295.
|
| 279 |
+
Nina Rimsky, Nick Gabrieli, Julian Schulz, Meg Tong, Evan Hubinger, and Alexander Turner. Steering llama 2 via contrastive activation addition. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL), 2024. URL https://aclanthology.org/2024.acl-long.828.
|
| 280 |
+
Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint, 2020. URL https://arxiv.org/abs/1910.01108.
|
| 281 |
+
Sunny Sanyal, Sujay Sanghavi, and Alexandros G. Dimakis. Pre-training small base lms with fewer tokens. arXiv preprint, 2024. URL https://arxiv.org/abs/2404.08634.
|
| 282 |
+
Tal Schuster, Ori Ram, Regina Barzilay, and Amir Globerson. Cross-lingual alignment of contextual word embeddings, with applications to zero-shot dependency parsing. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2019. URL https://aclanthology.org/N19-1162.
|
| 283 |
+
Samuel L. Smith, David H. P. Turban, Steven Hamblin, and Nils Y. Hammerla. Offline bilingual word vectors, orthogonal transformations and the inverted softmax. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. URL https://openreview.net/forum?id=r1Aab85gg.
|
| 284 |
+
Nishant Subramani, Nivedita Suresh, and Matthew Peters. Extracting latent steering vectors from pretrained language models. In *Findings of the Association for Computational Linguistics: ACL*, 2022. URL https://aclanthology.org/2022-findings-acl.48.
|
| 285 |
+
Junyi Sun. Jieba: Chinese text segmentation tool. Github, 2024. URL https://github.com/fxsjy/ jieba. Accessed: 2024-09-25.
|
| 286 |
+
Adly Templeton, Tom Conerly, Jonathan Marcus, Jack Lindsey, Trenton Bricken, Brian Chen, Adam Pearce, Craig Citro, Emmanuel Ameisen, Andy Jones, Hoagy Cunningham, Nicholas L Turner, Callum McDougall, Monte MacDiarmid, C. Daniel Freeman, Theodore R. Sumers, Edward Rees, Joshua Batson, Adam Jermyn, Shan Carter, Chris Olah, and Tom Henighan. Scaling monoseismicity: Extracting interpretable features from claude 3 sonnet. Transformer Circuits Thread, 2024. URL https://transformer-circuits.pub/2024/scaling-monoseismicity/index.html.
|
| 287 |
+
Eric Todd, Millicent Li, Arnab Sen Sharma, Aaron Mueller, Byron C Wallace, and David Bau. Function vectors in large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=AwyxtyMwaG.
|
| 288 |
+
Michael Toker, Hadas Orgad, Mor Ventura, Dana Arad, and Yonatan Belinkov. Diffusion lens: Interpreting text encoders in text-to-image pipelines. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2024. URL https://aclanthology.org/2024.acl-long.524.
|
| 289 |
+
|
| 290 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models. arXiv preprint, 2023a. URL https://arxiv.org/abs/2302.13971.
|
| 291 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint, 2023b. URL https://arxiv.org/abs/2307.09288.
|
| 292 |
+
Alexander Matt Turner, Lisa Thiergart, Gavin Leech, David Udell, Juan J. Vazquez, Ulisse Mini, and Monte MacDiarmid. Activation addition: Steering language models without optimization. arXiv preprint, 2024. URL https://arxiv.org/abs/2308.10248.
|
| 293 |
+
Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. Investigating gender bias in language models using causal mediation analysis. In Advances in Neural Information Processing Systems (NeurIPS), 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/92650b2e92217715fe312e6fa7b90d82-Paper.pdf.
|
| 294 |
+
Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, and Furu Wei. Multilingual e5 text embeddings: A technical report. arXiv preprint, 2024. URL https://arxiv.org/abs/2402.05672.
|
| 295 |
+
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. Do llamas work in English? on the latent language of multilingual transformers. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2024. URL https://aclanthology.org/2024. acl-long.820.
|
| 296 |
+
Wikipedia-Foundation. Wikipedia downloads, 2023. URL https://dumps.wikipedia.org.
|
| 297 |
+
Zhaofeng Wu, William Merrill, Hao Peng, Iz Beltagy, and Noah A. Smith. Transparency Helps Reveal When Language Models Learn Meaning. Transactions of the Association for Computational Linguistics (TACL), 2023. URL https://doi.org/10.1162/tacl_a_00565.
|
| 298 |
+
Zijun Wu, Yongkang Wu, and Lili Mou. Zero-shot continuous prompt transfer: Generalizing task semantics across language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=26Xphug0cS.
|
| 299 |
+
Yan Xia, Hai Huang, Jieming Zhu, and Zhou Zhao. Achieving cross modal generalization with multimodal unified representation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=t7ZowrDWw.
|
| 300 |
+
Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. mT5: A massively multilingual pre-trained text-to-text transformer. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2021. URL https://aclanthology.org/2021.naacl-main.41.
|
| 301 |
+
Aiyuan Yang, Bin Xiao, Bingning Wang, Borong Zhang, Ce Bian, Chao Yin, Chenxu Lv, Da Pan, Dian Wang, Dong Yan, Fan Yang, Fei Deng, Feng Wang, Feng Liu, Guangwei Ai, Guosheng Dong, Haizhou Zhao, Hang Xu, Haoze Sun, Hongda Zhang, Hui Liu, Jiaming Ji, Jian Xie, JunTao Dai, Kun Fang, Lei Su, Liang Song, Lifeng Liu, Liyun Ru, Luyao Ma, Mang Wang, Mickel Liu, MingAn Lin, Nuolan Nie, Peidong Guo, Ruiyang Sun, Tao Zhang, Tianpeng Li, Tianyu Li, Wei Cheng, Weipeng Chen, Xiangrong Zeng, Xiaochuan Wang, Xiaoxi Chen, Xin Men, Xin Yu, Xuehai Pan, Yanjun Shen, Yiding Wang, Yiyu Li, Youxin Jiang, Yuchen Gao, Yupeng Zhang, Zenan Zhou, and Zhiying Wu. Baichuan 2: Open large-scale language models. arXiv Preprint, 2023. URL https://arxiv.org/abs/2309.10305.
|
| 302 |
+
Sohee Yang, Elena Gribovskaya, Nora Kassner, Mor Geva, and Sebastian Riedel. Do large language models latently perform multi-hop reasoning? In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2024. URL https://aclanthology.org/2024.acl-long.550.
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
Figure 10: Language probabilities of English and Chinese (and the top language, when it is neither, which only happens for Bloom). Regardless of the input language, the dominant LM language is more salient in the early-middle layers, and the input language is more salient in the final layers. Bloom does not have a clear intermediate latent language.
|
| 306 |
+
|
| 307 |
+
# A EXPERIMENTAL DETAILS FOR §3
|
| 308 |
+
|
| 309 |
+
# A.1 MULTILINGUAL
|
| 310 |
+
|
| 311 |
+
For Experiment 1, for each sentence pair, we use a template to transform each sentence. This is due to the automatic code-switching behavior of LMs. For an English model processing Chinese text, we expect the Chinese tokens to have high probabilities in the final layer because they need to be output; however, we observe these models tend to code-switch back to their dominant language after a full sentence, which confounds our analysis. We therefore put the parallel sentences into a template, “{English Sentence} This represents” (and the corresponding Chinese version), as the model is less likely to code-switch mid-sentence after “represents”. We experimented with other templates that led to similar results. Furthermore, for sentence in GALE (Chen et al., 2016), we make sure the transcript;unicode is not empty for both the source and the translation.
|
| 312 |
+
|
| 313 |
+
For Experiment 2, due to tokenization, it is challenging to obtain exactly parallel English-Chinese tokens, and hence we perform aggressive filtering. We consider only text positions where the next BPE token (1) is a valid Chinese word (as segmented by Jieba (Sun, 2024)), and (2) has an English translation (using the English-Chinese dictionary CC-CEDICT (MDBG, 2024)). For example, “今天是开心的一天” (Today is a happy day), Llama-3 tokenizes it as {'今天', '是', '开', '心', '的' '天'} while Jieba segments it to be {'今天', '是', '开心', '的', '一天'} We only keep {'今天', '是'} Furthermore, only '今天's translation is a single token, the only token that survives the cutoff is '今天'.
|
| 314 |
+
|
| 315 |
+
The full result of Figure 3 is in Figure 10. We observe that the 7B/8B and 70B models of the same model family have highly similar trends, so we only consider the 7B/8B models in other experiments.
|
| 316 |
+
|
| 317 |
+
# A.2 CODE
|
| 318 |
+
|
| 319 |
+
We consider all non-zero-argument function calls in the MBPP dataset, excluding unit tests. We automatically identify the argument names (the "semantic roles") by function inspection for built-in functions and by looking at the function definition for those defined in-context, and skip when this is not possible. We also ignore arguments whose semantic roles are generically called "obj" or "object", and instances where the instantiated surface-form argument is the same as the semantic role. We look the hidden state corresponding to the previous token, either "(," or ",", except when tokenization renders this impossible (e.g., when the previous token is merged with a part of the surface argument). This leaves 540 arguments.
|
| 320 |
+
|
| 321 |
+
Table 2: Steering Llama-2's output sentiments using trigger words in English vs. the input language (either Spanish or Chinese). We report the mean sentiment, disfluency (perplexity), and relevance of the continuation, as well as the standard deviation across 10 seeds. Cross-lingual steering is consistently successful, sometimes even more than monolingual steering, without substantial damage in text fluency and relevance.
|
| 322 |
+
|
| 323 |
+
<table><tr><td>Text Lang.</td><td>Steering Dir.</td><td>Steering Lang.</td><td>Sentiment</td><td>Disfluency (↓)</td><td>Relevance (↑)</td></tr><tr><td rowspan="5">Spanish</td><td>None</td><td>None</td><td>0.144±0.014</td><td>8.58±0.57</td><td>0.850±0.006</td></tr><tr><td rowspan="2">↓</td><td>Spanish</td><td>0.143±0.012</td><td>8.84±0.79</td><td>0.847±0.006</td></tr><tr><td>English</td><td>0.097±0.024</td><td>8.99±0.72</td><td>0.847±0.005</td></tr><tr><td rowspan="2">↑</td><td>Spanish</td><td>0.164±0.018</td><td>9.11±0.50</td><td>0.844±0.005</td></tr><tr><td>English</td><td>0.149±0.015</td><td>8.35±0.30</td><td>0.849±0.006</td></tr><tr><td rowspan="5">Chinese</td><td>None</td><td>None</td><td>0.223±0.036</td><td>14.63±2.65</td><td>0.844±0.009</td></tr><tr><td rowspan="2">↓</td><td>Chinese</td><td>0.117±0.080</td><td>15.29±2.47</td><td>0.840±0.011</td></tr><tr><td>English</td><td>0.156±0.076</td><td>14.80±2.24</td><td>0.842±0.008</td></tr><tr><td rowspan="2">↑</td><td>Chinese</td><td>0.359±0.077</td><td>545.94±1544.36</td><td>0.839±0.010</td></tr><tr><td>English</td><td>0.227±0.038</td><td>14.14±2.42</td><td>0.845±0.009</td></tr></table>
|
| 324 |
+
|
| 325 |
+
# A.3 VISION-LANGUAGE
|
| 326 |
+
|
| 327 |
+
To pass the images through the model, we embed them in templates, only for the logit lens experiments. For the color experiment, we use the template "USER: What is the color in the image?<image>\n ASSISTANT:". For the caption and segmentation experiments, we use "USER: What is in the image? \n <image> ASSISTANT:" for LLaVA and "What is in the image? \n <image>" for Chameleon.
|
| 328 |
+
|
| 329 |
+
For all caption and segmentation experiments, we use the MSCOCO 2017 dataset. For the caption evaluation, for each image patch (with the associated caption for the entire image), we compute a scalar patch-caption alignment score (for each layer separately) with nouns in the caption. We consider words with NOUN or PROPN tags given by SpaCy's en_core_web_trf model (Honnibal & Montani, 2017).
|
| 330 |
+
|
| 331 |
+
For the segmentation evaluation, we use the MSCOCO 2017 panoptic segmentation labels. The metric calculation is similar as above. Instead of a scalar patch-caption alignment score, we consider a scalar patch-label alignment score between a patch and its matching segmentation label, computed likewise using the logit lens. We consider a patch and a label as matching if there is an image segment with that label that occupies more than half of the pixels in the patch. Under this definition, a patch cannot have more than one label. When a patch is not matched with any label, we disregard it. In the baseline, we use a randomly chosen incorrect label from all possible labels for the alignment score. Finally, we average this alignment score across all patches in all images to obtain the curves in Figure 7c and 7d.
|
| 332 |
+
|
| 333 |
+
# B EXPERIMENTAL DETAILS FOR §4
|
| 334 |
+
|
| 335 |
+
For both the code and vision-language intervention experiments, we use argmax decoding.
|
| 336 |
+
|
| 337 |
+
# B.1 MULTILINGUAL
|
| 338 |
+
|
| 339 |
+
For each language, we sample $N = 1000$ instances from the training set of InterTASS for Spanish and the multilingual Amazon reviews corpus for Chinese. Following Turner et al. (2024), we use trained models for various metrics. We automatically evaluate the sentiment of the generation using a DistillBERT-based (Sanh et al., 2020) model finetuned for multilingual sentiment analysis,7 judge the generation fluency by taking the conditional perplexity of the generation given the prefix from
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
(a) Cosine similarity between an arithmetic expression in Arabic numerals vs. English words, broken down into separate categories.
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
(b) Same as (a), but only the exact translation similarities subtracted by the others.
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
(c) Logit lens log probability when predicting a number, between either the number itself or its English equivalent.
|
| 349 |
+
Figure 11: Results for the arithmetic experiments. The $95\%$ CI is plotted in all. Expressions in Arabic numerals have similar representation as corresponding expressions in English, as well as the unembeddings of corresponding number words in English.
|
| 350 |
+
|
| 351 |
+
Llama-3.1-70B (Llama-3-Team, 2024),<sup>8</sup> and compute the relevance of the generation with the prefix by computing the cosine similarity between the generation and the prefix using a XLM-R-Large-based (Conneau et al., 2020) model finetuned for sentence representation (Wang et al., 2024). All these models support both Spanish and Chinese.
|
| 352 |
+
|
| 353 |
+
We perform ActAdd by passing both the positive and negative steering words through the LM, taking their hidden states at layer 17, computing their difference, scaling it by a constant, and adding it to the normal generation forward pass also at layer 17, exactly following Turner et al. (2024), except we use a scaling coefficient of 5, rather than 2 in their experiments, for which we observed a larger effect. For generation, we use a temperature of 1, top- $p = 0.3$ , and a frequency penalty of 1, all following Turner et al. (2024), without tuning.
|
| 354 |
+
|
| 355 |
+
We showed the Llama-3 intervention results in Table 1, and here in Table 2 we show the results on Llama2, with similar trends.
|
| 356 |
+
|
| 357 |
+
# C EXPERIMENTS WITH ARITHMETIC EXPRESSIONS
|
| 358 |
+
|
| 359 |
+
We hypothesize that a similar trend exists when LMs process arithmetic expressions where they route to a shared space anchored by numerical words in English in intermediate layers. We consider simple expressions in the form of “ $a = b + c$ ” or “ $a = b * c$ ”; for simplicity, we restrict “ $a$ ” and “ $b$ ” to be at most two digits and “ $c$ ” to be a single positive digit.
|
| 360 |
+
|
| 361 |
+
Experiment 1: Representations are similar for translations. Here, we only consider the right-hand side, “ $b + c$ ” and “ $b*c$ ”, as $w_{1:t}^{z_1}$ in Eq. 1. Like in the multilingual case, we translate them into English (e.g., “five plus three”) as $w_{1:t'}^{z_2}$ , and evaluate the representation cosine similarity between every English expression and every numeric expression, throughout layers. We group the pairwise cosine similarities in three buckets: (1) exact translation (e.g., “ $5+3$ ” and “five plus three”; $N = 1123$ ), (2) non-exact but same value (e.g., “ $5+3$ ” and “two plus six”; $N = 13293$ ), and (3) different value ( $N = 1247836$ ). Figure 11a shows that exact translations have high cosine similarity, although this is to be expected since embeddings of numbers and their corresponding English words are near one another (thus even a bag-of-word-embeddings should also have high similarity). More interestingly, we that the similarities are still higher when the surface forms are distinct but the “meaning” of the expression (i.e., the value of the expression) is the same. Next, like in §3.1, we subtract the cosine similarities among non-translation pairs as a baseline $(u_{1:t'}^{z_2})$ . Figure 11b shows high similarity in the early-middle layers for translations over the baseline, but gradually decreasing to near 0.
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 12: Steering arithmetic expressions' results to a different value.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 13: The Llama-3 hidden representation evolution when predicting a number, projected by PCA where the principal components are learned on the output embeddings of 20 number tokens, 10 in English and 10 numerals.
|
| 368 |
+
|
| 369 |
+
Experiment 2: Representations are anchored by semantically-equivalent English words. We hypothesize that, for some prefix such as “a=b+”, the intermediate representations $h_t^\ell$ are close to the English word for “c” that would make the equality hold. First, we randomly sample 100 such prefixes and take the representation of the last token at all layers. For each prefix, we plot the representation evolution throughout layers using PCA, as well as the unembeddings of numbers in English $\tau^{z^{\star}}$ vs. numerals $\tau^{z^{\circ}}$ . Figure 13 shows that the representations indeed go through the space occupied by the English words in intermediate layers. Next, we repeat our logit lens experiments, inspecting the log probability of the following numeral token vs. its English version ( $N = 1123$ ). Figure 11c shows that the two tokens have similar log probability until around layer 25, after which the numeral token dominates.
|
| 370 |
+
|
| 371 |
+
Experiment 3: Intervention. We perform intervention using our arithmetic expressions, for example “ $4 = 1 + 3$ ”. We intervene by attempting to modify the token after “+” to be one smaller, e.g. “2” here, and expect this to not only lead the model to output “2” instead of “3”, but also fundamentally affects the model’s reasoning process and causes the model to patch this error with an additional suffix “+1”, i.e., “ $4 = 1 + 2 + 1$ ”. We use ActAdd except for adding the intervention vector (e.g., “three” – “two”) only at the position of “+”. For all addition expressions in our data ( $N = 846$ ), we perform such intervention at an intermediate layer (25 for Llama-3 and 30 for Llama-2) and measure how often this leads to the model correctly outputting the decremented number followed by “+1”, versus unchanged, or changed to some other output. Figure 12 shows that, as the intervention coefficient (i.e., the scaling constant of the vector) increases, this procedure leads to the expected output for up to $>90\%$ of the instances.
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28cd610ff7e0c1112a7702a68dd97cc23979e1e9182441881ff34ba93367772f
|
| 3 |
+
size 601395
|
2025/The Semantic Hub Hypothesis_ Language Models Share Semantic Representations Across Languages and Modalities/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_content_list.json
ADDED
|
@@ -0,0 +1,2057 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "THE UNREASONABLE INEFFECTIVENESS OF THE DEeper LAYERS",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
171,
|
| 8 |
+
99,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Andrey Gromov*",
|
| 17 |
+
"bbox": [
|
| 18 |
+
181,
|
| 19 |
+
170,
|
| 20 |
+
308,
|
| 21 |
+
184
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Meta FAIR & UMD",
|
| 28 |
+
"bbox": [
|
| 29 |
+
181,
|
| 30 |
+
184,
|
| 31 |
+
318,
|
| 32 |
+
196
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Kushal Tirumala*",
|
| 39 |
+
"bbox": [
|
| 40 |
+
357,
|
| 41 |
+
170,
|
| 42 |
+
486,
|
| 43 |
+
183
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Meta FAIR",
|
| 50 |
+
"bbox": [
|
| 51 |
+
357,
|
| 52 |
+
184,
|
| 53 |
+
434,
|
| 54 |
+
196
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "Hassan Shapourian",
|
| 61 |
+
"bbox": [
|
| 62 |
+
527,
|
| 63 |
+
170,
|
| 64 |
+
668,
|
| 65 |
+
184
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "Cisco",
|
| 72 |
+
"bbox": [
|
| 73 |
+
527,
|
| 74 |
+
185,
|
| 75 |
+
568,
|
| 76 |
+
198
|
| 77 |
+
],
|
| 78 |
+
"page_idx": 0
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Paolo Glorioso",
|
| 83 |
+
"bbox": [
|
| 84 |
+
707,
|
| 85 |
+
170,
|
| 86 |
+
813,
|
| 87 |
+
183
|
| 88 |
+
],
|
| 89 |
+
"page_idx": 0
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "text",
|
| 93 |
+
"text": "Zyphra",
|
| 94 |
+
"bbox": [
|
| 95 |
+
707,
|
| 96 |
+
185,
|
| 97 |
+
759,
|
| 98 |
+
199
|
| 99 |
+
],
|
| 100 |
+
"page_idx": 0
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"type": "text",
|
| 104 |
+
"text": "Daniel A. Roberts",
|
| 105 |
+
"bbox": [
|
| 106 |
+
181,
|
| 107 |
+
219,
|
| 108 |
+
310,
|
| 109 |
+
232
|
| 110 |
+
],
|
| 111 |
+
"page_idx": 0
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"type": "text",
|
| 115 |
+
"text": "MIT & Sequoia Capital",
|
| 116 |
+
"bbox": [
|
| 117 |
+
181,
|
| 118 |
+
233,
|
| 119 |
+
341,
|
| 120 |
+
248
|
| 121 |
+
],
|
| 122 |
+
"page_idx": 0
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"type": "text",
|
| 126 |
+
"text": "ABSTRACT",
|
| 127 |
+
"text_level": 1,
|
| 128 |
+
"bbox": [
|
| 129 |
+
450,
|
| 130 |
+
284,
|
| 131 |
+
545,
|
| 132 |
+
299
|
| 133 |
+
],
|
| 134 |
+
"page_idx": 0
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"type": "text",
|
| 138 |
+
"text": "How is knowledge stored in an LLM's weights? We study this via layer pruning: if removing a certain layer does not affect model performance in common question-answering benchmarks, then the weights in that layer are not necessary for storing the knowledge needed to answer those questions. To find these unnecessary parameters, we identify the optimal block of layers to prune by considering similarity across layers; then, to \"heal\" the damage, we perform a small amount of finetuning. Surprisingly, with this method we find minimal degradation of performance until after a large fraction (up to half) of the layers are removed for some common open-weight models. From a scientific perspective, the robustness of these LLMs to the deletion of layers implies either that current pretraining methods are not properly leveraging the parameters in the deeper layers of the network or that the shallow layers play a critical role in storing knowledge. For our study, we use parameter-efficient finetuning (PEFT) methods, specifically quantization and Low Rank Adapters (QLoRA), such that each of our experiments can be performed on a single 40GB A100 GPU.",
|
| 139 |
+
"bbox": [
|
| 140 |
+
228,
|
| 141 |
+
316,
|
| 142 |
+
769,
|
| 143 |
+
526
|
| 144 |
+
],
|
| 145 |
+
"page_idx": 0
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"type": "text",
|
| 149 |
+
"text": "1 INTRODUCTION",
|
| 150 |
+
"text_level": 1,
|
| 151 |
+
"bbox": [
|
| 152 |
+
173,
|
| 153 |
+
558,
|
| 154 |
+
336,
|
| 155 |
+
571
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 0
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "In this work we study a very simple pruning strategy using open-weight LLMs. In particular, we develop a method that uses the similarity between the representations at different layers to identify the optimal layers to prune for a given pruning fraction; then, after removing these layers we \"heal\" the pruning-induced mismatch with a small amount of fine tuning (using QLoRA). Our main result is that we can remove a substantial fraction of the deepest layers from models with minimal degradation in downstream question-answering benchmarks. For example, for Llama-2-70B (Touvron et al., 2023) we can eliminate up to roughly half of the layers before the performance collapses. An overview of our strategy and the results of pruning Llama-2-70B are shown in Figure1.",
|
| 162 |
+
"bbox": [
|
| 163 |
+
169,
|
| 164 |
+
590,
|
| 165 |
+
826,
|
| 166 |
+
705
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 0
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "Our intuition for dropping layers comes from considering the residual structure of the transformer architecture. In more detail, the output of the final layer can be decomposed as a sum over the outputs of all the model layers plus the embedded input. If such a sum had numerous and independent terms, then removing a handful of them should not significantly change the output. However, since the terms are not independent - each layer is input to the following layer - we should expect to be able to remove terms if the residual contribution from a particular layer is small. In other words, if the output of each layer does not change too much from layer to layer",
|
| 173 |
+
"bbox": [
|
| 174 |
+
169,
|
| 175 |
+
709,
|
| 176 |
+
828,
|
| 177 |
+
809
|
| 178 |
+
],
|
| 179 |
+
"page_idx": 0
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "header",
|
| 183 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 184 |
+
"bbox": [
|
| 185 |
+
171,
|
| 186 |
+
32,
|
| 187 |
+
478,
|
| 188 |
+
47
|
| 189 |
+
],
|
| 190 |
+
"page_idx": 0
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "page_footnote",
|
| 194 |
+
"text": "*Co-first authors; please direct correspondence to the union of {gromovand@meta.com, kushaltirumala99@gmail.com, drob@mit.edu}.",
|
| 195 |
+
"bbox": [
|
| 196 |
+
169,
|
| 197 |
+
820,
|
| 198 |
+
826,
|
| 199 |
+
848
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 0
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "page_footnote",
|
| 205 |
+
"text": "This is strongly suggested by \"lens\" investigations that studied the evolution of the token distribution as a function of layer index such as the \"logit lens\" [2020] and the \"tuned lens\" [Belrose et al. 2023]. A separate line of reasoning along these lines previously inspired neural ODEs (Chen et al. 2018), and led Yang et al. 2023) to argue that ideally representation should change substantially from layer to layer in order to most effectively make use of the parameters of a network.",
|
| 206 |
+
"bbox": [
|
| 207 |
+
169,
|
| 208 |
+
859,
|
| 209 |
+
826,
|
| 210 |
+
925
|
| 211 |
+
],
|
| 212 |
+
"page_idx": 0
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"type": "page_number",
|
| 216 |
+
"text": "1",
|
| 217 |
+
"bbox": [
|
| 218 |
+
493,
|
| 219 |
+
948,
|
| 220 |
+
503,
|
| 221 |
+
959
|
| 222 |
+
],
|
| 223 |
+
"page_idx": 0
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"type": "image",
|
| 227 |
+
"img_path": "images/dbd5ea749726f6312ed221bc92012eac2c8cfa5ff3e33cfd7355e636f968f4c2.jpg",
|
| 228 |
+
"image_caption": [
|
| 229 |
+
"(a)"
|
| 230 |
+
],
|
| 231 |
+
"image_footnote": [],
|
| 232 |
+
"bbox": [
|
| 233 |
+
205,
|
| 234 |
+
107,
|
| 235 |
+
325,
|
| 236 |
+
314
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 1
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "image",
|
| 242 |
+
"img_path": "images/6944a07881f7101eb6aec6b635d473e6967befea9843f47693ca500c4d68bbf0.jpg",
|
| 243 |
+
"image_caption": [
|
| 244 |
+
"(b)"
|
| 245 |
+
],
|
| 246 |
+
"image_footnote": [],
|
| 247 |
+
"bbox": [
|
| 248 |
+
357,
|
| 249 |
+
107,
|
| 250 |
+
483,
|
| 251 |
+
313
|
| 252 |
+
],
|
| 253 |
+
"page_idx": 1
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"type": "image",
|
| 257 |
+
"img_path": "images/14f99af2ee70f0c288a56a893fbe8a8376a6bd6e9f5cac980f6abbe87b1d1a50.jpg",
|
| 258 |
+
"image_caption": [
|
| 259 |
+
"(d)"
|
| 260 |
+
],
|
| 261 |
+
"image_footnote": [],
|
| 262 |
+
"bbox": [
|
| 263 |
+
521,
|
| 264 |
+
95,
|
| 265 |
+
823,
|
| 266 |
+
318
|
| 267 |
+
],
|
| 268 |
+
"page_idx": 1
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
"type": "image",
|
| 272 |
+
"img_path": "images/81ba4b39f5268947605eba08d3a0744cf8883eb148b6a35ae4d86585672885d2.jpg",
|
| 273 |
+
"image_caption": [
|
| 274 |
+
"Figure 1: Overview of our layer-pruning strategy and example results: $(a)$ a flowchart describing the algorithm: if removing $n$ layers, we find the layer, $\\ell^{*}$ , that minimizes the angular distance, $d$ , between layers $\\ell$ and $\\ell + n$ ; we then remove the $n$ layers beginning with layer $\\ell^{*}$ ; finally, if necessary, we can \"heal\" the damage with a small amount of (parameter-efficient) finetuning. $(b)$ a schematic depicting the removal of $n$ total layers, indexed from $\\ell^{*}$ to $\\ell^{*} + n - 1$ . $(c)$ angular distance, $d$ , between different numbers of layers, $n$ , vs. the layer number, $\\ell$ , that indexes the beginning of the block of $n$ ; the bottom curve (darkest purple) represents $n = 1$ , while the top curve (lightest yellow) represents $n = 64$ ; the black line traces $\\ell^{*}(n)$ , the minimum of the angular distance across the different sized layer blocks. $(d)$ results of pruning Llama-2-70B with healing (light blue) and without healing (dark blue) as a function of the fraction of layers removed: the top (middle) panel gives the accuracy on the MMLU (BoolQ) question-answering benchmark, while the bottom panel the autoregressive loss on a subset of the C4 validation set; here, the dashed red lines (dashed gray lines) indicate the accuracy or loss of the original unpruned model (of random guessing); these plots illustrate that typical behavior we find in which there are sharp transitions in performance for the accuracy of question-answering tasks (here between $40\\% - 50\\%$ pruning fraction), but continuity and very slow growth in the healed loss (light blue) up to at least to $80\\%$ pruning fraction."
|
| 275 |
+
],
|
| 276 |
+
"image_footnote": [],
|
| 277 |
+
"bbox": [
|
| 278 |
+
511,
|
| 279 |
+
319,
|
| 280 |
+
823,
|
| 281 |
+
434
|
| 282 |
+
],
|
| 283 |
+
"page_idx": 1
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"type": "image",
|
| 287 |
+
"img_path": "images/7c5754e80759961bcff59bbef42e8dc25749a212fa883ea8937c02e8bb8fd14a.jpg",
|
| 288 |
+
"image_caption": [
|
| 289 |
+
"(c)"
|
| 290 |
+
],
|
| 291 |
+
"image_footnote": [],
|
| 292 |
+
"bbox": [
|
| 293 |
+
178,
|
| 294 |
+
316,
|
| 295 |
+
504,
|
| 296 |
+
433
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 1
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "In conjunction with our layer pruning, we investigate the similarity of layer representations at different separations and find broadly that deeper layers are qualitatively more similar to neighboring layers than shallow layers (with the exception of the very final layer). This suggests an even simpler pruning strategy: remove layers beginning at the penultimate layer and proceed from deep to shallow until the desired number of layers have been removed. In this case, we find that, after healing the damage with a small amount of QLoRA finetuning, we can achieve performance that nearly matches the more involved similarity-informed layer pruning strategy. The effectiveness of this method is evidence that LLMs might not properly leverage the parameters in the deeper layers of the network.",
|
| 303 |
+
"bbox": [
|
| 304 |
+
169,
|
| 305 |
+
720,
|
| 306 |
+
823,
|
| 307 |
+
834
|
| 308 |
+
],
|
| 309 |
+
"page_idx": 1
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "text",
|
| 313 |
+
"text": "That said, while question-answering (QA) benchmarks such as MMLU and BoolQ are robust to a large amount of layer pruning, other measures of performance are not: if we look at the loss on next-token predictions for an IID dataset (C4 validation set), we find that the model is smoothly damaged in proportion to the fraction of the number of layers pruned. Since perplexity typically correlates strongly with downstream metrics, this naturally begs the question: which tasks are less robust than QA benchmarks to pruning? As part of our final discussion, we explore reasoning",
|
| 314 |
+
"bbox": [
|
| 315 |
+
169,
|
| 316 |
+
839,
|
| 317 |
+
826,
|
| 318 |
+
925
|
| 319 |
+
],
|
| 320 |
+
"page_idx": 1
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"type": "header",
|
| 324 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 325 |
+
"bbox": [
|
| 326 |
+
173,
|
| 327 |
+
32,
|
| 328 |
+
478,
|
| 329 |
+
47
|
| 330 |
+
],
|
| 331 |
+
"page_idx": 1
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "page_number",
|
| 335 |
+
"text": "2",
|
| 336 |
+
"bbox": [
|
| 337 |
+
493,
|
| 338 |
+
948,
|
| 339 |
+
503,
|
| 340 |
+
959
|
| 341 |
+
],
|
| 342 |
+
"page_idx": 1
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "related tasks (GSM8k and HellaSwag) and see that they are harmed by any amount of pruning. Altogether, this leads to the following accounting of state: the shallow layers likely play a critical role in the storing of knowledge and retrieving of information, while the deeper layers are important for higher-level computations such as mathematical reasoning.",
|
| 347 |
+
"bbox": [
|
| 348 |
+
169,
|
| 349 |
+
103,
|
| 350 |
+
826,
|
| 351 |
+
161
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 2
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "The structure of this paper is as follows. In §2 we first perform a literature review of both practical post-training strategies and science-of-deep-learning investigations that motivate our work. Then, in §3 we give intuition for our layer pruning strategy and explain our method in detail, while in §4 we iterate over all our experimental results. Finally, we conclude in §5 by exploring tasks beyond QA benchmarks, such as reasoning, and highlighting directions of future work. Specific model, finetuning, dataset, and evaluation details can be found in Appendix B and evaluation ablations can be found in Appendix C",
|
| 358 |
+
"bbox": [
|
| 359 |
+
169,
|
| 360 |
+
166,
|
| 361 |
+
826,
|
| 362 |
+
267
|
| 363 |
+
],
|
| 364 |
+
"page_idx": 2
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "2 LITERATURE REVIEW",
|
| 369 |
+
"text_level": 1,
|
| 370 |
+
"bbox": [
|
| 371 |
+
171,
|
| 372 |
+
284,
|
| 373 |
+
387,
|
| 374 |
+
301
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 2
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "Pruning for neural networks has a long history (LeCun et al., 1989; Hassibi and Stork, 1992): while initial work focused on unstructured pruning (Han et al., 2015; Chen et al., 2015; Srinivas and Babu, 2015), structured pruning techniques were developed to make sparse networks more efficient (Li et al., 2016; Wen et al., 2016; Hu et al., 2016; He et al., 2017; Huang et al., 2018; Murray and Chiang, 2015; See et al., 2016; Kim and Rush, 2016). Recent work, of course, focused on structured pruning of transformers (Voita et al., 2019; Michel et al., 2019; Kim and Awadalla, 2020; Fan et al., 2019; Zhang and He, 2020; Fan et al., 2021; Jha et al., 2023; Sajjad et al., 2023; Liu et al., 2023a; Hou et al., 2020; Sharma et al., 2023; Ashkboos et al., 2024; Xia et al., 2022; Lagunas et al., 2021; Men et al., 2024). Our work focuses on pruning the layers of decoder-only GPT style open-weight large language models after they've been pretrained. For an extended literature review, please see Appendix A",
|
| 381 |
+
"bbox": [
|
| 382 |
+
169,
|
| 383 |
+
315,
|
| 384 |
+
826,
|
| 385 |
+
470
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 2
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "3 METHOD",
|
| 392 |
+
"text_level": 1,
|
| 393 |
+
"bbox": [
|
| 394 |
+
171,
|
| 395 |
+
489,
|
| 396 |
+
282,
|
| 397 |
+
505
|
| 398 |
+
],
|
| 399 |
+
"page_idx": 2
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"text": "In this section, we give intuition for why we think layer pruning works (§3.1) and then we explain our method in detail (§3.2).",
|
| 404 |
+
"bbox": [
|
| 405 |
+
169,
|
| 406 |
+
521,
|
| 407 |
+
823,
|
| 408 |
+
551
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 2
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "3.1 INTUITION",
|
| 415 |
+
"text_level": 1,
|
| 416 |
+
"bbox": [
|
| 417 |
+
171,
|
| 418 |
+
566,
|
| 419 |
+
290,
|
| 420 |
+
579
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 2
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "Our intuition for layer dropping comes from thinking about the representations as a slowly changing function of layer index. In particular, the layer-to-layer evolution of representations for a transformer is given by a residual iteration equation",
|
| 427 |
+
"bbox": [
|
| 428 |
+
169,
|
| 429 |
+
593,
|
| 430 |
+
825,
|
| 431 |
+
635
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 2
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "equation",
|
| 437 |
+
"text": "\n$$\nx ^ {(\\ell + 1)} = x ^ {(\\ell)} + f \\left(x ^ {(\\ell)}, \\theta^ {(\\ell)}\\right), \\tag {1}\n$$\n",
|
| 438 |
+
"text_format": "latex",
|
| 439 |
+
"bbox": [
|
| 440 |
+
395,
|
| 441 |
+
642,
|
| 442 |
+
825,
|
| 443 |
+
662
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 2
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "where $(x^{(\\ell)},\\theta^{(\\ell)})$ , respectively, are the multi-dimensional input and parameter vectors for layer $\\ell$ , and $f(x,\\theta)$ describes the transformation of one multi-head self-attention and MLP layer block. As for any residual network, if we unroll this iteration, we see that after $L$ total layers the output is described as a sum over the transformations of all the layers",
|
| 450 |
+
"bbox": [
|
| 451 |
+
169,
|
| 452 |
+
667,
|
| 453 |
+
826,
|
| 454 |
+
727
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 2
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "equation",
|
| 460 |
+
"text": "\n$$\nx ^ {(L)} = x ^ {(0)} + \\sum_ {\\ell = 0} ^ {L - 1} f \\left(x ^ {(\\ell)}, \\theta^ {(\\ell)}\\right). \\tag {2}\n$$\n",
|
| 461 |
+
"text_format": "latex",
|
| 462 |
+
"bbox": [
|
| 463 |
+
387,
|
| 464 |
+
734,
|
| 465 |
+
825,
|
| 466 |
+
775
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 2
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "If the terms in the sum were numerous, $(L \\gg 1)$ , and independent, e.g. if the block functions were instead a function of the overall input as $f(x^{(0)},\\theta^{(\\ell)})$ , then perhaps any particular contribution to the sum (2) could be neglected.",
|
| 473 |
+
"bbox": [
|
| 474 |
+
169,
|
| 475 |
+
782,
|
| 476 |
+
823,
|
| 477 |
+
828
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 2
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "Of course, they are not at all independent: if we delete layer $\\ell - 1$ , then we must now connect the old input to that layer, $x^{(\\ell - 1)}$ , into the block function of layer $\\ell$ as",
|
| 484 |
+
"bbox": [
|
| 485 |
+
169,
|
| 486 |
+
832,
|
| 487 |
+
823,
|
| 488 |
+
863
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 2
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "equation",
|
| 494 |
+
"text": "\n$$\nx ^ {(\\ell + 1)} = x ^ {(\\ell - 1)} + f \\left(x ^ {(\\ell - 1)}, \\theta^ {(\\ell)}\\right), \\tag {3}\n$$\n",
|
| 495 |
+
"text_format": "latex",
|
| 496 |
+
"bbox": [
|
| 497 |
+
379,
|
| 498 |
+
869,
|
| 499 |
+
825,
|
| 500 |
+
888
|
| 501 |
+
],
|
| 502 |
+
"page_idx": 2
|
| 503 |
+
},
|
| 504 |
+
{
|
| 505 |
+
"type": "text",
|
| 506 |
+
"text": "where, for clarity, we are not relabeling layers or inputs despite the deletion. In general, such a mismatch between the original input and new input should be very damaging for the network.",
|
| 507 |
+
"bbox": [
|
| 508 |
+
169,
|
| 509 |
+
895,
|
| 510 |
+
826,
|
| 511 |
+
925
|
| 512 |
+
],
|
| 513 |
+
"page_idx": 2
|
| 514 |
+
},
|
| 515 |
+
{
|
| 516 |
+
"type": "header",
|
| 517 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 518 |
+
"bbox": [
|
| 519 |
+
171,
|
| 520 |
+
32,
|
| 521 |
+
478,
|
| 522 |
+
47
|
| 523 |
+
],
|
| 524 |
+
"page_idx": 2
|
| 525 |
+
},
|
| 526 |
+
{
|
| 527 |
+
"type": "page_number",
|
| 528 |
+
"text": "3",
|
| 529 |
+
"bbox": [
|
| 530 |
+
493,
|
| 531 |
+
948,
|
| 532 |
+
503,
|
| 533 |
+
959
|
| 534 |
+
],
|
| 535 |
+
"page_idx": 2
|
| 536 |
+
},
|
| 537 |
+
{
|
| 538 |
+
"type": "text",
|
| 539 |
+
"text": "However, if, after some number of initial layers, the representations converge to a slowly changing function with respect to layer index,",
|
| 540 |
+
"bbox": [
|
| 541 |
+
169,
|
| 542 |
+
103,
|
| 543 |
+
823,
|
| 544 |
+
132
|
| 545 |
+
],
|
| 546 |
+
"page_idx": 3
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "equation",
|
| 550 |
+
"text": "\n$$\nx ^ {(\\ell)} \\approx x ^ {(\\ell - 1)} + \\epsilon , \\tag {4}\n$$\n",
|
| 551 |
+
"text_format": "latex",
|
| 552 |
+
"bbox": [
|
| 553 |
+
431,
|
| 554 |
+
138,
|
| 555 |
+
825,
|
| 556 |
+
157
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 3
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "with $\\epsilon \\ll x^{(\\ell)}$ in some appropriate sense, then the effect of deleting a particular layer $\\ell$ , e.g. making the replacement $x^{(\\ell)} \\to x^{(\\ell-1)}$ in going from (1) to (3), should only change the representation in the subsequent layer, $x^{(\\ell+1)}$ , by a small amount. Similarly, to successfully prune the $n$ layers before layer $\\ell$ , i.e. those indexed from $\\ell - n, \\ldots, \\ell - 1$ , we'd want that the input to the pruned block should be very similar to the output of the pruned block:",
|
| 563 |
+
"bbox": [
|
| 564 |
+
169,
|
| 565 |
+
162,
|
| 566 |
+
826,
|
| 567 |
+
236
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 3
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "equation",
|
| 573 |
+
"text": "\n$$\nx ^ {(\\ell)} \\approx x ^ {(\\ell - n)} + \\epsilon . \\tag {5}\n$$\n",
|
| 574 |
+
"text_format": "latex",
|
| 575 |
+
"bbox": [
|
| 576 |
+
431,
|
| 577 |
+
241,
|
| 578 |
+
825,
|
| 579 |
+
260
|
| 580 |
+
],
|
| 581 |
+
"page_idx": 3
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
"type": "text",
|
| 585 |
+
"text": "Regardless, any layer removal has a cascading effect: since post pruning $x^{(\\ell + 1)}$ is computed by a different function than before, cf. (1) vs. (3), and since then $x^{(\\ell + 1)}$ is directly or indirectly input to subsequent layers, $\\ell + 2, \\ldots, L$ , deleting a shallow layer should have a much greater impact than deleting a deeper layer.",
|
| 586 |
+
"bbox": [
|
| 587 |
+
169,
|
| 588 |
+
273,
|
| 589 |
+
823,
|
| 590 |
+
333
|
| 591 |
+
],
|
| 592 |
+
"page_idx": 3
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "text",
|
| 596 |
+
"text": "From this, we have the following hypotheses that we will test experimentally:",
|
| 597 |
+
"bbox": [
|
| 598 |
+
169,
|
| 599 |
+
338,
|
| 600 |
+
681,
|
| 601 |
+
354
|
| 602 |
+
],
|
| 603 |
+
"page_idx": 3
|
| 604 |
+
},
|
| 605 |
+
{
|
| 606 |
+
"type": "list",
|
| 607 |
+
"sub_type": "text",
|
| 608 |
+
"list_items": [
|
| 609 |
+
"(0) We should be able to prune layers of a residual network.",
|
| 610 |
+
"(1) We should have greater success pruning deeper layers.",
|
| 611 |
+
"(2) Blocks of layers we successfully prune should have outputs that are similar to their inputs."
|
| 612 |
+
],
|
| 613 |
+
"bbox": [
|
| 614 |
+
200,
|
| 615 |
+
364,
|
| 616 |
+
821,
|
| 617 |
+
417
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 3
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "text",
|
| 623 |
+
"text": "In the next subsection, §3.2 we will explain the details of our pruning algorithm and in the following section, §4 we will present experimental evidence for points (0)-(2).",
|
| 624 |
+
"bbox": [
|
| 625 |
+
169,
|
| 626 |
+
426,
|
| 627 |
+
823,
|
| 628 |
+
458
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 3
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "text",
|
| 634 |
+
"text": "3.2 LAYER-PRUNING ALGORITHM(S)",
|
| 635 |
+
"text_level": 1,
|
| 636 |
+
"bbox": [
|
| 637 |
+
171,
|
| 638 |
+
473,
|
| 639 |
+
444,
|
| 640 |
+
488
|
| 641 |
+
],
|
| 642 |
+
"page_idx": 3
|
| 643 |
+
},
|
| 644 |
+
{
|
| 645 |
+
"type": "text",
|
| 646 |
+
"text": "Our principal layer pruning algorithm is very simple:",
|
| 647 |
+
"bbox": [
|
| 648 |
+
169,
|
| 649 |
+
500,
|
| 650 |
+
522,
|
| 651 |
+
515
|
| 652 |
+
],
|
| 653 |
+
"page_idx": 3
|
| 654 |
+
},
|
| 655 |
+
{
|
| 656 |
+
"type": "text",
|
| 657 |
+
"text": "0. Pick a number of layers to prune $n$ .",
|
| 658 |
+
"bbox": [
|
| 659 |
+
207,
|
| 660 |
+
525,
|
| 661 |
+
477,
|
| 662 |
+
540
|
| 663 |
+
],
|
| 664 |
+
"page_idx": 3
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"type": "list",
|
| 668 |
+
"sub_type": "text",
|
| 669 |
+
"list_items": [
|
| 670 |
+
"1. Compute the angular distance $d(x^{(\\ell)},x^{(\\ell +n)})$ , cf. below, between the input to layer $\\ell$ and the input to layer $\\ell +n$ on a neutral pretraining dataset or on a dataset representative of a downstream task of interest.",
|
| 671 |
+
"2. Find the layer, $\\ell^{*}$ , that minimizes that distance:"
|
| 672 |
+
],
|
| 673 |
+
"bbox": [
|
| 674 |
+
209,
|
| 675 |
+
542,
|
| 676 |
+
826,
|
| 677 |
+
606
|
| 678 |
+
],
|
| 679 |
+
"page_idx": 3
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"type": "equation",
|
| 683 |
+
"text": "\n$$\n\\ell^ {\\star} (n) \\equiv \\underset {\\ell} {\\arg \\min } d \\left(x ^ {(\\ell)}, x ^ {(\\ell + n)}\\right). \\tag {6}\n$$\n",
|
| 684 |
+
"text_format": "latex",
|
| 685 |
+
"bbox": [
|
| 686 |
+
411,
|
| 687 |
+
612,
|
| 688 |
+
825,
|
| 689 |
+
638
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 3
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "list",
|
| 695 |
+
"sub_type": "text",
|
| 696 |
+
"list_items": [
|
| 697 |
+
"3. Drop layers $\\ell^{\\star}$ to $\\ell^{\\star} + n - 1$ ; connect the old input to layer $\\ell^{\\star}$ to the old $(\\ell^{\\star} + n)$ th layer block.",
|
| 698 |
+
"4. (Optionally) heal the mismatch at layer $\\ell^{\\star} + n$ with a small amount of fine tuning on a neutral pretraining dataset or particular dataset of interest."
|
| 699 |
+
],
|
| 700 |
+
"bbox": [
|
| 701 |
+
207,
|
| 702 |
+
647,
|
| 703 |
+
826,
|
| 704 |
+
696
|
| 705 |
+
],
|
| 706 |
+
"page_idx": 3
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"type": "text",
|
| 710 |
+
"text": "If fewer words inside of a figure are more helpful to you than the text in an enumerated list, then note that this algorithm is also depicted in panels (a)-(b) of Figure 1",
|
| 711 |
+
"bbox": [
|
| 712 |
+
169,
|
| 713 |
+
707,
|
| 714 |
+
823,
|
| 715 |
+
739
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 3
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "text",
|
| 721 |
+
"text": "Elaborating on the first step, the angular distance on a single sequence of length $T$ is given by",
|
| 722 |
+
"bbox": [
|
| 723 |
+
169,
|
| 724 |
+
743,
|
| 725 |
+
787,
|
| 726 |
+
758
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 3
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "equation",
|
| 732 |
+
"text": "\n$$\nd \\left(x ^ {(\\ell)}, x ^ {(\\ell + n)}\\right) \\equiv \\frac {1}{\\pi} \\operatorname {a r c c o s} \\left(\\frac {x _ {T} ^ {(\\ell)} \\cdot x _ {T} ^ {(\\ell + n)}}{\\left\\| x _ {T} ^ {(\\ell)} \\right\\| \\left\\| x _ {T} ^ {(\\ell + n)} \\right\\|}\\right), \\tag {7}\n$$\n",
|
| 733 |
+
"text_format": "latex",
|
| 734 |
+
"bbox": [
|
| 735 |
+
328,
|
| 736 |
+
763,
|
| 737 |
+
825,
|
| 738 |
+
815
|
| 739 |
+
],
|
| 740 |
+
"page_idx": 3
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"type": "text",
|
| 744 |
+
"text": "where the inner product is over the hidden dimension of the model for the final token $T$ of the sequence, $\\| \\cdot \\|$ denotes the $L^2$ -norm, and the factor of $1 / \\pi$ is a convention. This distance should",
|
| 745 |
+
"bbox": [
|
| 746 |
+
169,
|
| 747 |
+
819,
|
| 748 |
+
826,
|
| 749 |
+
851
|
| 750 |
+
],
|
| 751 |
+
"page_idx": 3
|
| 752 |
+
},
|
| 753 |
+
{
|
| 754 |
+
"type": "header",
|
| 755 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 756 |
+
"bbox": [
|
| 757 |
+
171,
|
| 758 |
+
32,
|
| 759 |
+
478,
|
| 760 |
+
47
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 3
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "page_footnote",
|
| 766 |
+
"text": "2Layers are often contained in a data structure, such a ModuleList in PyTorch, so to drop these layers we would simply define a new ModuleList that removes the layers from $\\ell^{\\star}$ to $\\ell^{\\star} + n - 1$ .",
|
| 767 |
+
"bbox": [
|
| 768 |
+
169,
|
| 769 |
+
858,
|
| 770 |
+
825,
|
| 771 |
+
883
|
| 772 |
+
],
|
| 773 |
+
"page_idx": 3
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"type": "page_footnote",
|
| 777 |
+
"text": "3Two comments: $(i)$ we do not expect our choice of angular distance - in lieu of any other reasonable metric, e.g., such as cosine similarity - to be particular significant; and $(ii)$ , we chose to focus on the final token since, due to the causal attention mask, its embedding is the only one that depends on the entire sequence.",
|
| 778 |
+
"bbox": [
|
| 779 |
+
169,
|
| 780 |
+
883,
|
| 781 |
+
826,
|
| 782 |
+
925
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 3
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "page_number",
|
| 788 |
+
"text": "4",
|
| 789 |
+
"bbox": [
|
| 790 |
+
493,
|
| 791 |
+
948,
|
| 792 |
+
504,
|
| 793 |
+
959
|
| 794 |
+
],
|
| 795 |
+
"page_idx": 3
|
| 796 |
+
},
|
| 797 |
+
{
|
| 798 |
+
"type": "text",
|
| 799 |
+
"text": "then be summed over a number of examples that is large enough to get a low-fluctuation estimate but overall should be quite small.",
|
| 800 |
+
"bbox": [
|
| 801 |
+
169,
|
| 802 |
+
103,
|
| 803 |
+
823,
|
| 804 |
+
132
|
| 805 |
+
],
|
| 806 |
+
"page_idx": 4
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"type": "text",
|
| 810 |
+
"text": "Elaborating on the \"optionality\" of the final step, we find that the near-lack of performance degradation on question-answering benchmarks, cf. Figure 1(d) and others in §4.1 can be extended to greater pruning fractions with a small amount of finetuning. Depending on resource constraints and intended application of the pruned model, this may not be necessary. However, the healing procedure does have a substantial impact on perplexity, cf. Figure 1(d) and others in §4.2.",
|
| 811 |
+
"bbox": [
|
| 812 |
+
169,
|
| 813 |
+
138,
|
| 814 |
+
823,
|
| 815 |
+
210
|
| 816 |
+
],
|
| 817 |
+
"page_idx": 4
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
"type": "text",
|
| 821 |
+
"text": "For both the angular distance measuring and the healing, if the ultimate goal is to supervise finetune (SFT) a model for a downstream task, it could be useful to evaluate the distance of a sample from that dataset and then combine the healing process with the SFT. In contrast, for the greatest generality, it's most natural to measure distance and heal with a pretraining dataset that approximates the statistics under which the model was originally pretrained.",
|
| 822 |
+
"bbox": [
|
| 823 |
+
169,
|
| 824 |
+
215,
|
| 825 |
+
826,
|
| 826 |
+
287
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 4
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "Finally, we also investigated an even simpler pruning strategy inspired by analyzing the angular distances across different model families: drop the deepest layers, excluding the final layer before the LLM head, and then (non-optionally) heal the damage. For complete clarity, this means that if we are pruning $n$ layers from an $L$ -layer model, then we would remove layers $(L - n)$ to $(L - 1)$ , inclusive.",
|
| 833 |
+
"bbox": [
|
| 834 |
+
169,
|
| 835 |
+
292,
|
| 836 |
+
828,
|
| 837 |
+
349
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 4
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "4 RESULTS",
|
| 844 |
+
"text_level": 1,
|
| 845 |
+
"bbox": [
|
| 846 |
+
171,
|
| 847 |
+
380,
|
| 848 |
+
282,
|
| 849 |
+
396
|
| 850 |
+
],
|
| 851 |
+
"page_idx": 4
|
| 852 |
+
},
|
| 853 |
+
{
|
| 854 |
+
"type": "text",
|
| 855 |
+
"text": "In this section, we demonstrate the effectiveness of our pruning strategy on different question-answering (QA) benchmarks and highlight a robust pruning-driven transition in performance (\\$4.1), while, in contrast, we find that the autoregressive perplexities of the healed pruned models are continuous across their transition points (\\$4.2); then, after comparing the similarity statistics between different layers across model sizes and families (\\$4.3), we contrast our principal similarity-informed pruning strategy with a simpler remove-the-deepest-layers strategy (\\$4.4).",
|
| 856 |
+
"bbox": [
|
| 857 |
+
169,
|
| 858 |
+
419,
|
| 859 |
+
826,
|
| 860 |
+
505
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 4
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "text",
|
| 866 |
+
"text": "For our experiments, we pruned a wide variety of large-scale LLMs from 2.7B to 70B parameters spanning 32 to 80 total unpruned layers. Specifically, we used models in the Llama-2 family (Touvron et al., 2023), the Qwen family (Bai et al., 2023), Mistral-7B (Jiang et al., 2023a), and Phi-2 (Javaheripi and Bubeck, 2023). For these models, we executed the \"healing\" step using QLoRA (Dettmers et al., 2023): our models were quantized to 4-bit precision and then finetuned, using QLoRA for efficient training, on either 164M or 328M tokens from the Colossal Clean Crawled Corpus (C4) (Raffel et al., 2020), a common pretraining dataset. As a result, each experiment of ours can be performed on a single 40GB A100 GPU. For our QA evals, we used Massive Multitask Language Understanding (MMLU) (Hendrycks et al., 2020), a common world-knowledge and problem solving benchmark, and BoolQ (Clark et al., 2019), a common yes/no reading comprehension benchmark where the answer has to be inferred from the text itself. The specifics of our models, healing procedure, dataset choices, and evaluation details can be found across Appendix B; ablations of different hyperparameter choices can be found across Appendix C",
|
| 867 |
+
"bbox": [
|
| 868 |
+
169,
|
| 869 |
+
508,
|
| 870 |
+
826,
|
| 871 |
+
693
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 4
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "text",
|
| 877 |
+
"text": "4.1 ACCURACY ON QA BENCHMARKS",
|
| 878 |
+
"text_level": 1,
|
| 879 |
+
"bbox": [
|
| 880 |
+
171,
|
| 881 |
+
719,
|
| 882 |
+
452,
|
| 883 |
+
734
|
| 884 |
+
],
|
| 885 |
+
"page_idx": 4
|
| 886 |
+
},
|
| 887 |
+
{
|
| 888 |
+
"type": "text",
|
| 889 |
+
"text": "Our first set of results are shown in Figure 2, where we plot 5-shot MMLU accuracy as a function of the fraction of layers removed: in the left panel we present the Llama-2 family, in the middle panel we present models from the Qwen family, and in the right panel we show Mistral-7B and Phi-2. In order to better compare models of different total number of layers, in these plots we opted to normalize the $x$ -axis by the fraction of layers removed (rather than the absolute number of layers removed). Note that since MMLU contains multiple choice questions with four possible responses, the expected accuracy of random guessing is $25\\%$ .",
|
| 890 |
+
"bbox": [
|
| 891 |
+
169,
|
| 892 |
+
750,
|
| 893 |
+
826,
|
| 894 |
+
848
|
| 895 |
+
],
|
| 896 |
+
"page_idx": 4
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"type": "text",
|
| 900 |
+
"text": "Importantly, we see a characteristic flat region of robust performance followed by a sharp transition to random accuracy at a pruning fraction around $45\\% - 55\\%$ for models in the Llama-2 family, $35\\%$ for Mistral 7B, $25\\%$ for Phi-2, and $20\\%$ for models from the Qwen family. This implies that the essential knowledge required to achieve a model's top score isn't removed by significant layer removal – even though the fraction can be quite large(!) – until eventually that knowledge is lost at a critical",
|
| 901 |
+
"bbox": [
|
| 902 |
+
169,
|
| 903 |
+
854,
|
| 904 |
+
828,
|
| 905 |
+
925
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 4
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "header",
|
| 911 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 912 |
+
"bbox": [
|
| 913 |
+
171,
|
| 914 |
+
32,
|
| 915 |
+
478,
|
| 916 |
+
47
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 4
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "page_number",
|
| 922 |
+
"text": "5",
|
| 923 |
+
"bbox": [
|
| 924 |
+
493,
|
| 925 |
+
948,
|
| 926 |
+
504,
|
| 927 |
+
959
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 4
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "image",
|
| 933 |
+
"img_path": "images/5dda9243779ea8d859d0ac104329421db17c6f3547dde550e8273be4bec54afe.jpg",
|
| 934 |
+
"image_caption": [
|
| 935 |
+
"Figure 2: MMLU accuracy (5-shot) vs. fraction of layers dropped for different model families. (Left: Llama-2 family; Middle: Qwen family; Right: Mistral-7B and Phi-2.) The solid lines represent performance after dropping layers and healing, dotted lines show performance after dropping layers only (no healing), and the dashed gray line is the score for guessing randomly. For these models, healing leads to modest improvements, and performances are quite robust until $20\\% - 55\\%$ pruning fractions, depending on model family and size, at which point they transitions to random guessing."
|
| 936 |
+
],
|
| 937 |
+
"image_footnote": [],
|
| 938 |
+
"bbox": [
|
| 939 |
+
174,
|
| 940 |
+
101,
|
| 941 |
+
405,
|
| 942 |
+
224
|
| 943 |
+
],
|
| 944 |
+
"page_idx": 5
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"type": "image",
|
| 948 |
+
"img_path": "images/0ad870e5eaeca2529169ec057c961e31d0204a5de25351bf4b692c5c0db1c92e.jpg",
|
| 949 |
+
"image_caption": [],
|
| 950 |
+
"image_footnote": [],
|
| 951 |
+
"bbox": [
|
| 952 |
+
406,
|
| 953 |
+
101,
|
| 954 |
+
614,
|
| 955 |
+
224
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 5
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "image",
|
| 961 |
+
"img_path": "images/1b78011acd782086f5816f380facec1224533aa320fcf5564b82d54690111c11.jpg",
|
| 962 |
+
"image_caption": [],
|
| 963 |
+
"image_footnote": [],
|
| 964 |
+
"bbox": [
|
| 965 |
+
614,
|
| 966 |
+
101,
|
| 967 |
+
823,
|
| 968 |
+
224
|
| 969 |
+
],
|
| 970 |
+
"page_idx": 5
|
| 971 |
+
},
|
| 972 |
+
{
|
| 973 |
+
"type": "text",
|
| 974 |
+
"text": "model-dependent threshold.4 Contrasting the curves with and without healing, we see that finetuning offers a modest improvement by better preserving the unpruned performance and pushing the phase transition to random guessing to slightly larger pruning fractions.",
|
| 975 |
+
"bbox": [
|
| 976 |
+
169,
|
| 977 |
+
382,
|
| 978 |
+
823,
|
| 979 |
+
426
|
| 980 |
+
],
|
| 981 |
+
"page_idx": 5
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"type": "text",
|
| 985 |
+
"text": "Broadly we see that layer pruning is more robust for the larger and deeper models, e.g. Llama-2-13B and Llama-2-70B, which we hypothesize could be related to the fact that either the smaller models are more overtrained, making parameters less redundant, or that the deeper models can afford to lose more layers in an absolute sense. Also, the Qwen family is strange, a fact we will further elaborate on in §4.3",
|
| 986 |
+
"bbox": [
|
| 987 |
+
169,
|
| 988 |
+
431,
|
| 989 |
+
825,
|
| 990 |
+
505
|
| 991 |
+
],
|
| 992 |
+
"page_idx": 5
|
| 993 |
+
},
|
| 994 |
+
{
|
| 995 |
+
"type": "text",
|
| 996 |
+
"text": "4.2 LOSS ON NEXT-TOKEN PREDICTIONS",
|
| 997 |
+
"text_level": 1,
|
| 998 |
+
"bbox": [
|
| 999 |
+
171,
|
| 1000 |
+
537,
|
| 1001 |
+
470,
|
| 1002 |
+
551
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 5
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "text",
|
| 1008 |
+
"text": "In this section, we look at the effect of layer pruning on the pretraining optimization objective – the cross-entropy loss of next-token prediction – when evaluated on a subset of the C4 validation dataset. In order to have a fair comparison across models with different sized vocabularies $V$ , we normalize the loss by $\\log V$ , which corresponds to the loss of sampling tokens randomly with uniform probability. (See Appendix B.2 for more details.)",
|
| 1009 |
+
"bbox": [
|
| 1010 |
+
169,
|
| 1011 |
+
571,
|
| 1012 |
+
826,
|
| 1013 |
+
643
|
| 1014 |
+
],
|
| 1015 |
+
"page_idx": 5
|
| 1016 |
+
},
|
| 1017 |
+
{
|
| 1018 |
+
"type": "text",
|
| 1019 |
+
"text": "In Figure 3, we plot the normalized C4 validation loss for all seven of our models, after healing (left panel) and before healing (right panel), as a function of the fraction layers removed. Without healing, we see that there is a somewhat sharp(ish) transition to random guessing for each model at approximately the pruning fraction that the QA benchmark accuracies also sharply transition to random guessing, suggesting that models are hopelessly harmed at this point, cf. Figure 2 Next, contrasting the scales of both plots, we see that healing significantly restores the next-token prediction ability of all the models to near-unpruned levels, with the loss increasing slowly and linearly with layer dropping. Most strikingly – from a scientific perspective – is the post-healing continuity through the pruning fractions where we previously found sharp transitions for the QA benchmarks: this decoupling illustrates one way of disconnecting (or creating a miscalibration) between performance on downstream tasks – such as MMLU and BoolQ – and continuous measures of performance – such as the cross-entropy loss.",
|
| 1020 |
+
"bbox": [
|
| 1021 |
+
169,
|
| 1022 |
+
647,
|
| 1023 |
+
826,
|
| 1024 |
+
818
|
| 1025 |
+
],
|
| 1026 |
+
"page_idx": 5
|
| 1027 |
+
},
|
| 1028 |
+
{
|
| 1029 |
+
"type": "header",
|
| 1030 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1031 |
+
"bbox": [
|
| 1032 |
+
171,
|
| 1033 |
+
32,
|
| 1034 |
+
478,
|
| 1035 |
+
47
|
| 1036 |
+
],
|
| 1037 |
+
"page_idx": 5
|
| 1038 |
+
},
|
| 1039 |
+
{
|
| 1040 |
+
"type": "page_footnote",
|
| 1041 |
+
"text": "This effect is rather robust to choice of QA benchmark: in Figure we plot the average 0-shot BoolQ accuracy for our model families and observe analogous behavior.",
|
| 1042 |
+
"bbox": [
|
| 1043 |
+
169,
|
| 1044 |
+
856,
|
| 1045 |
+
823,
|
| 1046 |
+
883
|
| 1047 |
+
],
|
| 1048 |
+
"page_idx": 5
|
| 1049 |
+
},
|
| 1050 |
+
{
|
| 1051 |
+
"type": "page_footnote",
|
| 1052 |
+
"text": "<sup>5</sup>We make sure that none of the validation data are seen during the healing stage.",
|
| 1053 |
+
"bbox": [
|
| 1054 |
+
192,
|
| 1055 |
+
883,
|
| 1056 |
+
669,
|
| 1057 |
+
897
|
| 1058 |
+
],
|
| 1059 |
+
"page_idx": 5
|
| 1060 |
+
},
|
| 1061 |
+
{
|
| 1062 |
+
"type": "page_footnote",
|
| 1063 |
+
"text": "This is consistent with Schaeffer et al. (2023) that argued jumps in one kind of metric may not be visible in others.",
|
| 1064 |
+
"bbox": [
|
| 1065 |
+
169,
|
| 1066 |
+
896,
|
| 1067 |
+
823,
|
| 1068 |
+
922
|
| 1069 |
+
],
|
| 1070 |
+
"page_idx": 5
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"type": "page_number",
|
| 1074 |
+
"text": "6",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
493,
|
| 1077 |
+
948,
|
| 1078 |
+
504,
|
| 1079 |
+
959
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 5
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "image",
|
| 1085 |
+
"img_path": "images/65d3a1588a63fc529128c6c8470f26655be98d35a46ae5315aca7b85b1e8da3c.jpg",
|
| 1086 |
+
"image_caption": [
|
| 1087 |
+
"Figure 3: Normalized C4 validation loss vs. fraction of layers dropped before healing (left) and after healing (right); each curve is normalized by the cross-entropy loss of sampling uniformly from the model's vocabulary. For the experiments before healing, the loss for each model transitions to random guessing (gray dashed line) at approximately the same pruning fractions that the QA benchmarks transition to random guessing; after healing, there is continuity through the regions of sharp transition on QA tasks, cf. Figure 2 Contrasting the overall scale of both plots, it's clear that healing significantly restores the performance on next-token prediction to near-unpruned levels."
|
| 1088 |
+
],
|
| 1089 |
+
"image_footnote": [],
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
174,
|
| 1092 |
+
103,
|
| 1093 |
+
517,
|
| 1094 |
+
237
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 6
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "image",
|
| 1100 |
+
"img_path": "images/f74be1eba4ec612201f0c3859d22725b37d1e492b80142891ab3b54277862efe.jpg",
|
| 1101 |
+
"image_caption": [],
|
| 1102 |
+
"image_footnote": [],
|
| 1103 |
+
"bbox": [
|
| 1104 |
+
522,
|
| 1105 |
+
103,
|
| 1106 |
+
816,
|
| 1107 |
+
236
|
| 1108 |
+
],
|
| 1109 |
+
"page_idx": 6
|
| 1110 |
+
},
|
| 1111 |
+
{
|
| 1112 |
+
"type": "text",
|
| 1113 |
+
"text": "4.3 ANGULAR DISTANCES BETWEEN REPRESENTATIONS",
|
| 1114 |
+
"text_level": 1,
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
171,
|
| 1117 |
+
393,
|
| 1118 |
+
576,
|
| 1119 |
+
407
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 6
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Given the central role the angular distance $\\boxed{7}$ plays in our pruning strategy, let's take a subsection to look at these distances across our seven models. For this analysis, the angular distances for each model were averaged over 10k samples from the C4 validation set.",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
169,
|
| 1128 |
+
417,
|
| 1129 |
+
823,
|
| 1130 |
+
462
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 6
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "Recall from earlier Figure 1(c): for Llama-2-70B this plotted the angular distance $d(x^{(\\ell)}, x^{(\\ell + n)})$ that compared the $\\ell$ -th layer to the $(\\ell + n)$ -th layer, across all initial indexes $\\ell$ for block sizes from $n = 1$ to $n = 64$ ; the minimum of the curves, $\\ell^*(n)$ , gave the optimal block to prune for a given $n$ , cf. (6).",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
169,
|
| 1139 |
+
467,
|
| 1140 |
+
826,
|
| 1141 |
+
527
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 6
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "A more compact way to display this same data is shown in the heat maps of Figure 4: each square is colored to depict the row-normalized angular distance between layer $\\ell$ and $\\ell + n$ across all possible $\\ell$ , and $n$ up to very large fractions of the total number of layers; the optimal layer to prune for a given block size, $\\ell^{*}(n)$ , corresponds to the minimal distance in each row.",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
169,
|
| 1150 |
+
532,
|
| 1151 |
+
826,
|
| 1152 |
+
589
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 6
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "Across models, we make two generalizations: (i) the smallest distances are found across the deeper blocks, meaning deeper layers are typically quite similar to each other and can be more easily dropped; (ii) the distances across the deepest blocks – the blocks that include the last layer – take either maximal or nearly-maximal values, meaning one should never drop the final layer. While broadly true, there are a few exceptions. For some models, e.g. Phi-2-2.7B, or for the largest blocks in some models, e.g. Llama-2-7B, final few layers seem important. As previously noted, the Qwen family is somewhat unusual: here we see that there are a few odd “islands” of high similarity for shallow blocks; this likely explains the shorter region of robust performance in Figure 2",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
169,
|
| 1161 |
+
595,
|
| 1162 |
+
826,
|
| 1163 |
+
709
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 6
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "4.4 A SIMPLER PRUNING STRATEGY",
|
| 1170 |
+
"text_level": 1,
|
| 1171 |
+
"bbox": [
|
| 1172 |
+
171,
|
| 1173 |
+
724,
|
| 1174 |
+
437,
|
| 1175 |
+
738
|
| 1176 |
+
],
|
| 1177 |
+
"page_idx": 6
|
| 1178 |
+
},
|
| 1179 |
+
{
|
| 1180 |
+
"type": "text",
|
| 1181 |
+
"text": "Inspired by our recent conclusions, we experiment with a very simple heuristic pruning strategy: (1) if pruning $n$ layers from an $L$ -layer model, drop layers $(L - n)$ to $(L - 1)$ so as to remove the deepest block that excludes the final layer; then (2) heal with a small amount of finetuning as before. Compared with our principal similarity-informed pruning strategy, this simpler heuristic algorithm has the advantage of never requiring practitioners to load onto a GPU or inference the unpruned model. It also provides a meaningful ablation of the importance of optimizing the block to prune.",
|
| 1182 |
+
"bbox": [
|
| 1183 |
+
169,
|
| 1184 |
+
750,
|
| 1185 |
+
826,
|
| 1186 |
+
835
|
| 1187 |
+
],
|
| 1188 |
+
"page_idx": 6
|
| 1189 |
+
},
|
| 1190 |
+
{
|
| 1191 |
+
"type": "text",
|
| 1192 |
+
"text": "In Figure 5 we contrast our two pruning strategies, both before healing (left panels) and after healing (right panels), for the QA benchmarks (MMLU/BoolQ, top/middle panels) and the autoregressive loss (C4 validation, bottom panels). On the one hand, the simple heuristic performs quite poorly without healing the damage incurred by pruning: accuracy on the QA benchmarks decays rapidly to (near-) random with increased pruning fraction, and the loss begins to increase very rapidly even with small amounts of pruning. On the other hand, the results for the two pruning strategies across evaluations",
|
| 1193 |
+
"bbox": [
|
| 1194 |
+
169,
|
| 1195 |
+
839,
|
| 1196 |
+
826,
|
| 1197 |
+
925
|
| 1198 |
+
],
|
| 1199 |
+
"page_idx": 6
|
| 1200 |
+
},
|
| 1201 |
+
{
|
| 1202 |
+
"type": "header",
|
| 1203 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1204 |
+
"bbox": [
|
| 1205 |
+
171,
|
| 1206 |
+
32,
|
| 1207 |
+
478,
|
| 1208 |
+
47
|
| 1209 |
+
],
|
| 1210 |
+
"page_idx": 6
|
| 1211 |
+
},
|
| 1212 |
+
{
|
| 1213 |
+
"type": "page_number",
|
| 1214 |
+
"text": "7",
|
| 1215 |
+
"bbox": [
|
| 1216 |
+
493,
|
| 1217 |
+
948,
|
| 1218 |
+
503,
|
| 1219 |
+
959
|
| 1220 |
+
],
|
| 1221 |
+
"page_idx": 6
|
| 1222 |
+
},
|
| 1223 |
+
{
|
| 1224 |
+
"type": "image",
|
| 1225 |
+
"img_path": "images/8c6b59fcf47275558bac4ac82e9e4a8b3d83813b93cc7bb60eb74e62388d2158.jpg",
|
| 1226 |
+
"image_caption": [
|
| 1227 |
+
"(a) Llama-2-7B",
|
| 1228 |
+
"(b) Llama-2-13B"
|
| 1229 |
+
],
|
| 1230 |
+
"image_footnote": [],
|
| 1231 |
+
"bbox": [
|
| 1232 |
+
174,
|
| 1233 |
+
116,
|
| 1234 |
+
348,
|
| 1235 |
+
244
|
| 1236 |
+
],
|
| 1237 |
+
"page_idx": 7
|
| 1238 |
+
},
|
| 1239 |
+
{
|
| 1240 |
+
"type": "image",
|
| 1241 |
+
"img_path": "images/9bc26784672f7897b1aac29e2bf1576cd2c48f496d193edfee8fd544a7c94fe4.jpg",
|
| 1242 |
+
"image_caption": [
|
| 1243 |
+
"(c) Llama-2-70B"
|
| 1244 |
+
],
|
| 1245 |
+
"image_footnote": [],
|
| 1246 |
+
"bbox": [
|
| 1247 |
+
349,
|
| 1248 |
+
118,
|
| 1249 |
+
504,
|
| 1250 |
+
244
|
| 1251 |
+
],
|
| 1252 |
+
"page_idx": 7
|
| 1253 |
+
},
|
| 1254 |
+
{
|
| 1255 |
+
"type": "image",
|
| 1256 |
+
"img_path": "images/f58a783d19630bde8c17ad7db24c105259b9ce99c9077527432bfaf38f0c59ec.jpg",
|
| 1257 |
+
"image_caption": [],
|
| 1258 |
+
"image_footnote": [],
|
| 1259 |
+
"bbox": [
|
| 1260 |
+
501,
|
| 1261 |
+
118,
|
| 1262 |
+
660,
|
| 1263 |
+
244
|
| 1264 |
+
],
|
| 1265 |
+
"page_idx": 7
|
| 1266 |
+
},
|
| 1267 |
+
{
|
| 1268 |
+
"type": "image",
|
| 1269 |
+
"img_path": "images/aa4976545ada8b904ca185daa82773eb7c6f5b9e1aef5fb648087e2639d34fa8.jpg",
|
| 1270 |
+
"image_caption": [],
|
| 1271 |
+
"image_footnote": [],
|
| 1272 |
+
"bbox": [
|
| 1273 |
+
681,
|
| 1274 |
+
117,
|
| 1275 |
+
846,
|
| 1276 |
+
226
|
| 1277 |
+
],
|
| 1278 |
+
"page_idx": 7
|
| 1279 |
+
},
|
| 1280 |
+
{
|
| 1281 |
+
"type": "image",
|
| 1282 |
+
"img_path": "images/167bd8d1164f6fff91f518e40ef4297fa3ffe393be0f69d8d7ff2fc13fe1c3eb.jpg",
|
| 1283 |
+
"image_caption": [
|
| 1284 |
+
"(d) Qwen-7B",
|
| 1285 |
+
"Figure 4: Normalized angular distance (7) from initial layer $\\ell$ (x-axis) with block size $n$ (y-axis) for each of the seven models we evaluated; the distance for each $n$ is shifted and rescaled to span the same range, [0, 1] (yellow to purple): the optimal block to prune, $\\ell^{*}(n)$ , corresponds to the deepest yellow for each row. Across models, the deeper layers tend to be very similar, though the deepest blocks that include the final layer (squares along the outer diagonal) are (near-)maximally dissimilar."
|
| 1286 |
+
],
|
| 1287 |
+
"image_footnote": [],
|
| 1288 |
+
"bbox": [
|
| 1289 |
+
176,
|
| 1290 |
+
266,
|
| 1291 |
+
348,
|
| 1292 |
+
393
|
| 1293 |
+
],
|
| 1294 |
+
"page_idx": 7
|
| 1295 |
+
},
|
| 1296 |
+
{
|
| 1297 |
+
"type": "image",
|
| 1298 |
+
"img_path": "images/18753bf5a49c3be49bd1e5756a3f6c065ae974236c47efef5631b7e4bbab5b19.jpg",
|
| 1299 |
+
"image_caption": [
|
| 1300 |
+
"(e) Qwen-14B",
|
| 1301 |
+
"(f) Mistral-7B"
|
| 1302 |
+
],
|
| 1303 |
+
"image_footnote": [],
|
| 1304 |
+
"bbox": [
|
| 1305 |
+
349,
|
| 1306 |
+
266,
|
| 1307 |
+
504,
|
| 1308 |
+
393
|
| 1309 |
+
],
|
| 1310 |
+
"page_idx": 7
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"type": "image",
|
| 1314 |
+
"img_path": "images/626f123181e2065a4238adcc08ae28544dbfab4ba6a3ffdeed798f5c0a2ba994.jpg",
|
| 1315 |
+
"image_caption": [],
|
| 1316 |
+
"image_footnote": [],
|
| 1317 |
+
"bbox": [
|
| 1318 |
+
501,
|
| 1319 |
+
266,
|
| 1320 |
+
660,
|
| 1321 |
+
393
|
| 1322 |
+
],
|
| 1323 |
+
"page_idx": 7
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"type": "image",
|
| 1327 |
+
"img_path": "images/3a73a002278c7bcf82c4a7029132a3538519b8d055252539722206154724fb7d.jpg",
|
| 1328 |
+
"image_caption": [
|
| 1329 |
+
"(g) Phi-2-2.7B"
|
| 1330 |
+
],
|
| 1331 |
+
"image_footnote": [],
|
| 1332 |
+
"bbox": [
|
| 1333 |
+
661,
|
| 1334 |
+
266,
|
| 1335 |
+
821,
|
| 1336 |
+
393
|
| 1337 |
+
],
|
| 1338 |
+
"page_idx": 7
|
| 1339 |
+
},
|
| 1340 |
+
{
|
| 1341 |
+
"type": "text",
|
| 1342 |
+
"text": "are quite comparable after healing: for the QA benchmarks, the similarity-informed algorithm slightly better preserves the accuracy before the phase transition, though the simple algorithm perhaps pushes the phase transition to slightly greater pruning factions; and for the loss, the curves nearly lie on top of each other, though the similarity-informed strategy does marginally outperform for all amounts of pruning. These experiments are strong evidence that the purpose of post-pruning finetuning is the healing of damage at the pruning interface and not the acquisition of additional knowledge.",
|
| 1343 |
+
"bbox": [
|
| 1344 |
+
169,
|
| 1345 |
+
527,
|
| 1346 |
+
826,
|
| 1347 |
+
613
|
| 1348 |
+
],
|
| 1349 |
+
"page_idx": 7
|
| 1350 |
+
},
|
| 1351 |
+
{
|
| 1352 |
+
"type": "text",
|
| 1353 |
+
"text": "5 DISCUSSION AND FUTURE DIRECTIONS",
|
| 1354 |
+
"text_level": 1,
|
| 1355 |
+
"bbox": [
|
| 1356 |
+
171,
|
| 1357 |
+
641,
|
| 1358 |
+
537,
|
| 1359 |
+
657
|
| 1360 |
+
],
|
| 1361 |
+
"page_idx": 7
|
| 1362 |
+
},
|
| 1363 |
+
{
|
| 1364 |
+
"type": "text",
|
| 1365 |
+
"text": "At the end of this work, many readers are puzzled by the following: are the deeper layers entirely useless? So far, we've provided evidence that the elimination of the deeper layers does not affect performance on QA tasks like MMLU (Figure 2), while at the same time have shown that their removal does disrupt the next-token predictions of the underlying model (Figure 3). Since perplexity often correlates with performance on downstream tasks, which are the tasks that are hurt by layer pruning?",
|
| 1366 |
+
"bbox": [
|
| 1367 |
+
169,
|
| 1368 |
+
676,
|
| 1369 |
+
823,
|
| 1370 |
+
762
|
| 1371 |
+
],
|
| 1372 |
+
"page_idx": 7
|
| 1373 |
+
},
|
| 1374 |
+
{
|
| 1375 |
+
"type": "text",
|
| 1376 |
+
"text": "Here are two hypotheses consistent with the fact that the model's perplexity is disturbed proportionally to pruning fraction:",
|
| 1377 |
+
"bbox": [
|
| 1378 |
+
169,
|
| 1379 |
+
768,
|
| 1380 |
+
823,
|
| 1381 |
+
797
|
| 1382 |
+
],
|
| 1383 |
+
"page_idx": 7
|
| 1384 |
+
},
|
| 1385 |
+
{
|
| 1386 |
+
"type": "list",
|
| 1387 |
+
"sub_type": "text",
|
| 1388 |
+
"list_items": [
|
| 1389 |
+
"(i) The deeper layers are not essential for storing knowledge, but are useful for more complicated computations, such as those that involve reasoning.",
|
| 1390 |
+
"(ii) The deeper layers are necessary when the model has to generate many tokens before answering a question, such as when it produces a chain-of-thought (CoT)."
|
| 1391 |
+
],
|
| 1392 |
+
"bbox": [
|
| 1393 |
+
200,
|
| 1394 |
+
811,
|
| 1395 |
+
823,
|
| 1396 |
+
880
|
| 1397 |
+
],
|
| 1398 |
+
"page_idx": 7
|
| 1399 |
+
},
|
| 1400 |
+
{
|
| 1401 |
+
"type": "text",
|
| 1402 |
+
"text": "We test these hypotheses by evaluating our layer-pruned models on tasks that involve CoTs or reasoning. For the former, we'll look at Chain-of-Thought MMLU (CoT-MMLU); for the latter, we'll",
|
| 1403 |
+
"bbox": [
|
| 1404 |
+
169,
|
| 1405 |
+
895,
|
| 1406 |
+
825,
|
| 1407 |
+
925
|
| 1408 |
+
],
|
| 1409 |
+
"page_idx": 7
|
| 1410 |
+
},
|
| 1411 |
+
{
|
| 1412 |
+
"type": "header",
|
| 1413 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
171,
|
| 1416 |
+
32,
|
| 1417 |
+
478,
|
| 1418 |
+
47
|
| 1419 |
+
],
|
| 1420 |
+
"page_idx": 7
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"type": "page_number",
|
| 1424 |
+
"text": "8",
|
| 1425 |
+
"bbox": [
|
| 1426 |
+
493,
|
| 1427 |
+
948,
|
| 1428 |
+
503,
|
| 1429 |
+
959
|
| 1430 |
+
],
|
| 1431 |
+
"page_idx": 7
|
| 1432 |
+
},
|
| 1433 |
+
{
|
| 1434 |
+
"type": "image",
|
| 1435 |
+
"img_path": "images/37818427580925b4032660e08b84b421055bb696316ecd9f23bd0a7415f82593.jpg",
|
| 1436 |
+
"image_caption": [],
|
| 1437 |
+
"image_footnote": [],
|
| 1438 |
+
"bbox": [
|
| 1439 |
+
174,
|
| 1440 |
+
102,
|
| 1441 |
+
504,
|
| 1442 |
+
196
|
| 1443 |
+
],
|
| 1444 |
+
"page_idx": 8
|
| 1445 |
+
},
|
| 1446 |
+
{
|
| 1447 |
+
"type": "image",
|
| 1448 |
+
"img_path": "images/258ebef295d2e8f110a39afe45c3937f2c235bb4bebce31b6a4548121b7042e9.jpg",
|
| 1449 |
+
"image_caption": [],
|
| 1450 |
+
"image_footnote": [],
|
| 1451 |
+
"bbox": [
|
| 1452 |
+
504,
|
| 1453 |
+
102,
|
| 1454 |
+
821,
|
| 1455 |
+
196
|
| 1456 |
+
],
|
| 1457 |
+
"page_idx": 8
|
| 1458 |
+
},
|
| 1459 |
+
{
|
| 1460 |
+
"type": "image",
|
| 1461 |
+
"img_path": "images/027151a842b93d21bbba8668ae1ad787954640d4b932e7f347de3f883bfe4f0a.jpg",
|
| 1462 |
+
"image_caption": [],
|
| 1463 |
+
"image_footnote": [],
|
| 1464 |
+
"bbox": [
|
| 1465 |
+
173,
|
| 1466 |
+
199,
|
| 1467 |
+
504,
|
| 1468 |
+
282
|
| 1469 |
+
],
|
| 1470 |
+
"page_idx": 8
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"type": "image",
|
| 1474 |
+
"img_path": "images/755ddc52f8d215a8aca8f2731e060feaa679b5d9b9437af61298d5dc6361430f.jpg",
|
| 1475 |
+
"image_caption": [],
|
| 1476 |
+
"image_footnote": [],
|
| 1477 |
+
"bbox": [
|
| 1478 |
+
504,
|
| 1479 |
+
199,
|
| 1480 |
+
821,
|
| 1481 |
+
282
|
| 1482 |
+
],
|
| 1483 |
+
"page_idx": 8
|
| 1484 |
+
},
|
| 1485 |
+
{
|
| 1486 |
+
"type": "image",
|
| 1487 |
+
"img_path": "images/22502858b91375fed617cbc40eb98735c6cef0c844cd03101e986a12616211d8.jpg",
|
| 1488 |
+
"image_caption": [
|
| 1489 |
+
"Figure 5: Evaluation of Llama-2-70B with the simple pruning heuristic (solid red line), shown along with scores for the similarity-informed pruning strategy (solid blue line), scores of the unpruned Llama-2-70B (red dashed line), and scores for randomly guessing (gray dashed line). (Left: before healing, Right: after healing; Top: MMLU, Middle: BoolQ, Bottom: C4 Validation Loss.) Without healing, the simple heuristic performs poorly across all evals; with healing, the scores of both methods are quite similar."
|
| 1490 |
+
],
|
| 1491 |
+
"image_footnote": [
|
| 1492 |
+
"Similarity Simple Baseline Random"
|
| 1493 |
+
],
|
| 1494 |
+
"bbox": [
|
| 1495 |
+
173,
|
| 1496 |
+
285,
|
| 1497 |
+
504,
|
| 1498 |
+
390
|
| 1499 |
+
],
|
| 1500 |
+
"page_idx": 8
|
| 1501 |
+
},
|
| 1502 |
+
{
|
| 1503 |
+
"type": "image",
|
| 1504 |
+
"img_path": "images/bbc01b2de84d3100e7729560f72bff087e01f52dc500d6a94e44b229bd5292ee.jpg",
|
| 1505 |
+
"image_caption": [],
|
| 1506 |
+
"image_footnote": [],
|
| 1507 |
+
"bbox": [
|
| 1508 |
+
504,
|
| 1509 |
+
285,
|
| 1510 |
+
821,
|
| 1511 |
+
390
|
| 1512 |
+
],
|
| 1513 |
+
"page_idx": 8
|
| 1514 |
+
},
|
| 1515 |
+
{
|
| 1516 |
+
"type": "text",
|
| 1517 |
+
"text": "look at GSM8K (Cobbe et al. 2021), a grade-school math benchmark, and HellaSwag (Zellers et al. 2019), a multiple choice common-sense reasoning benchmark",
|
| 1518 |
+
"bbox": [
|
| 1519 |
+
168,
|
| 1520 |
+
560,
|
| 1521 |
+
823,
|
| 1522 |
+
593
|
| 1523 |
+
],
|
| 1524 |
+
"page_idx": 8
|
| 1525 |
+
},
|
| 1526 |
+
{
|
| 1527 |
+
"type": "text",
|
| 1528 |
+
"text": "In Figure 6 we plot the performance of Llama-2 70B pruned with the similarity-informed pruning strategy across CoT-MMLU (left), GSM8K (center), and HellaSwag (right): on the one hand, both GSM8K and HellaSwag, our two reasoning tasks, exhibit immediate degradation in performance with any amount of pruning, correlating with a similar decrease in the perplexity evals (Figure 3); on the other hand, CoT-MMLU shows a relatively flat region of robust performance with pruning, analogous to our previous results on QA benchmarks (e.g. Figure 2). This is some initial evidence for hypothesis $(i)$ over hypothesis $(ii)$ : the deeper layers may be useful for higher-level reasoning tasks, while less important for knowledge intensive QA tasks; moreover, perplexity errors due to pruning do not compound to hurt QA evals when the model is required to generate many tokens.",
|
| 1529 |
+
"bbox": [
|
| 1530 |
+
169,
|
| 1531 |
+
595,
|
| 1532 |
+
826,
|
| 1533 |
+
723
|
| 1534 |
+
],
|
| 1535 |
+
"page_idx": 8
|
| 1536 |
+
},
|
| 1537 |
+
{
|
| 1538 |
+
"type": "text",
|
| 1539 |
+
"text": "Now at the conclusion of the work, we are left with the following questions:",
|
| 1540 |
+
"bbox": [
|
| 1541 |
+
169,
|
| 1542 |
+
728,
|
| 1543 |
+
671,
|
| 1544 |
+
744
|
| 1545 |
+
],
|
| 1546 |
+
"page_idx": 8
|
| 1547 |
+
},
|
| 1548 |
+
{
|
| 1549 |
+
"type": "header",
|
| 1550 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1551 |
+
"bbox": [
|
| 1552 |
+
171,
|
| 1553 |
+
32,
|
| 1554 |
+
478,
|
| 1555 |
+
47
|
| 1556 |
+
],
|
| 1557 |
+
"page_idx": 8
|
| 1558 |
+
},
|
| 1559 |
+
{
|
| 1560 |
+
"type": "page_footnote",
|
| 1561 |
+
"text": "Here are the details for how we performed these three evaluations:",
|
| 1562 |
+
"bbox": [
|
| 1563 |
+
191,
|
| 1564 |
+
753,
|
| 1565 |
+
593,
|
| 1566 |
+
768
|
| 1567 |
+
],
|
| 1568 |
+
"page_idx": 8
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "page_footnote",
|
| 1572 |
+
"text": "- For CoT-MMLU, we followed the flan_cot_fewshot evaluation in EleutherAI (Gao et al. 2023), in which models produce a chain of thought before generating their answer. Note that the accuracy at $0\\%$ pruning fraction for MMLU without CoT is much better than the analogous accuracy at $0\\%$ pruning fraction for CoT-MMLU ( $\\sim 69\\%$ vs. $\\sim 43\\%$ , respectively; cf. Figures 2 and 6), consistent with some previous work (e.g., see Table 16 of Chung et al. 2024).",
|
| 1573 |
+
"bbox": [
|
| 1574 |
+
215,
|
| 1575 |
+
771,
|
| 1576 |
+
825,
|
| 1577 |
+
838
|
| 1578 |
+
],
|
| 1579 |
+
"page_idx": 8
|
| 1580 |
+
},
|
| 1581 |
+
{
|
| 1582 |
+
"type": "page_footnote",
|
| 1583 |
+
"text": "- For GSM8K, we used the gsm8k_cot evaluation in EleutherAI (Gao et al., 2023) and measured pass@1; for each problem we extracted an answer from a single generation (with CoT) and checked for correctness against the ground-truth answer.",
|
| 1584 |
+
"bbox": [
|
| 1585 |
+
215,
|
| 1586 |
+
840,
|
| 1587 |
+
823,
|
| 1588 |
+
881
|
| 1589 |
+
],
|
| 1590 |
+
"page_idx": 8
|
| 1591 |
+
},
|
| 1592 |
+
{
|
| 1593 |
+
"type": "page_footnote",
|
| 1594 |
+
"text": "- For HellaSwag, we used the hellaswag evaluation in EleutherAI (Gao et al., 2023). Note that HellaSwag is a multiple-choice benchmark, so random performance is $25\\%$ .",
|
| 1595 |
+
"bbox": [
|
| 1596 |
+
215,
|
| 1597 |
+
883,
|
| 1598 |
+
823,
|
| 1599 |
+
912
|
| 1600 |
+
],
|
| 1601 |
+
"page_idx": 8
|
| 1602 |
+
},
|
| 1603 |
+
{
|
| 1604 |
+
"type": "page_number",
|
| 1605 |
+
"text": "9",
|
| 1606 |
+
"bbox": [
|
| 1607 |
+
493,
|
| 1608 |
+
948,
|
| 1609 |
+
504,
|
| 1610 |
+
959
|
| 1611 |
+
],
|
| 1612 |
+
"page_idx": 8
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"type": "image",
|
| 1616 |
+
"img_path": "images/a050f2f33f7935e130ee41d0f9354b3b8be063851f54c4b015908d34790efd30.jpg",
|
| 1617 |
+
"image_caption": [
|
| 1618 |
+
"Figure 6: Evaluation of Llama-2 70B with the similarity-informed pruning strategy across different evaluation tasks. (Left: Chain-of-Thought MMLU (CoT-MMLU), Center: GSM8K, Right: HellaSwag.) We see that GSM8K and HellaSwag show immediate degradation of performance with any level of pruning, while CoT-MMLU behaves qualitatively similarly to MMLU without CoT; this suggests that the deeper layers are likely necessary for reasoning tasks."
|
| 1619 |
+
],
|
| 1620 |
+
"image_footnote": [
|
| 1621 |
+
"Llama-2-70B (Similarity) Baseline Random"
|
| 1622 |
+
],
|
| 1623 |
+
"bbox": [
|
| 1624 |
+
171,
|
| 1625 |
+
97,
|
| 1626 |
+
380,
|
| 1627 |
+
224
|
| 1628 |
+
],
|
| 1629 |
+
"page_idx": 9
|
| 1630 |
+
},
|
| 1631 |
+
{
|
| 1632 |
+
"type": "image",
|
| 1633 |
+
"img_path": "images/48bf6fec7e4314b939d036d8c51b5a685505c3d0f9736cf29d3bff6b22f6b389.jpg",
|
| 1634 |
+
"image_caption": [],
|
| 1635 |
+
"image_footnote": [],
|
| 1636 |
+
"bbox": [
|
| 1637 |
+
388,
|
| 1638 |
+
98,
|
| 1639 |
+
604,
|
| 1640 |
+
224
|
| 1641 |
+
],
|
| 1642 |
+
"page_idx": 9
|
| 1643 |
+
},
|
| 1644 |
+
{
|
| 1645 |
+
"type": "image",
|
| 1646 |
+
"img_path": "images/6ce4d4c6e1559736d8ddf3884d83fae86e247cd8185cce52f86400e1f7aab9ff.jpg",
|
| 1647 |
+
"image_caption": [],
|
| 1648 |
+
"image_footnote": [],
|
| 1649 |
+
"bbox": [
|
| 1650 |
+
609,
|
| 1651 |
+
98,
|
| 1652 |
+
825,
|
| 1653 |
+
224
|
| 1654 |
+
],
|
| 1655 |
+
"page_idx": 9
|
| 1656 |
+
},
|
| 1657 |
+
{
|
| 1658 |
+
"type": "list",
|
| 1659 |
+
"sub_type": "text",
|
| 1660 |
+
"list_items": [
|
| 1661 |
+
"What are better layer-pruning strategies? What are better approaches to healing?",
|
| 1662 |
+
"- Why does healing eliminate the phase transition in the loss but not in the QA accuracies?",
|
| 1663 |
+
"- With more comprehensive evals, will accuracy on different tasks degrade at different depths?",
|
| 1664 |
+
"- Relatedly, is knowledge generally stored in shallow or middle layers, or is it delocalized?",
|
| 1665 |
+
"- Can we devise a pruning strategy that is robust for reasoning tasks?",
|
| 1666 |
+
"- Do pretraining details affect the ability to prune, e.g., are scaling-law over-trained or distilled models more difficult to prune?",
|
| 1667 |
+
"- How can we enable LLMs to more effectively use the parameters in their deepest layers?"
|
| 1668 |
+
],
|
| 1669 |
+
"bbox": [
|
| 1670 |
+
215,
|
| 1671 |
+
364,
|
| 1672 |
+
823,
|
| 1673 |
+
508
|
| 1674 |
+
],
|
| 1675 |
+
"page_idx": 9
|
| 1676 |
+
},
|
| 1677 |
+
{
|
| 1678 |
+
"type": "text",
|
| 1679 |
+
"text": "Some of these questions would benefit from studying both layer similarity and pruning across different pretraining checkpoints; for instance, at what point does the sharp phase transition and critical depth in the QA accuracies emerge, and does more training lead to better use of the prunable parameters? Others suggest explorations with different pretraining architectures and objectives, e.g. in order better make use of the deeper layers (for example, one can imagine applying layer dropout (Fan et al. 2019) or early exit during pre-training (Elhoushi et al., 2024) to induce equal usage of layers). With more comprehensive evaluations, if different kinds of QA tasks degrade at very different depths, then this might indicate that the knowledge required to complete those tasks is stored across different layers. It would be very interesting to use pruning to systematically study these kind of interpretability questions.",
|
| 1680 |
+
"bbox": [
|
| 1681 |
+
169,
|
| 1682 |
+
521,
|
| 1683 |
+
826,
|
| 1684 |
+
661
|
| 1685 |
+
],
|
| 1686 |
+
"page_idx": 9
|
| 1687 |
+
},
|
| 1688 |
+
{
|
| 1689 |
+
"type": "text",
|
| 1690 |
+
"text": "ACKNOWLEDGMENTS AND DISCLOSURE OF FUNDING",
|
| 1691 |
+
"text_level": 1,
|
| 1692 |
+
"bbox": [
|
| 1693 |
+
171,
|
| 1694 |
+
681,
|
| 1695 |
+
624,
|
| 1696 |
+
696
|
| 1697 |
+
],
|
| 1698 |
+
"page_idx": 9
|
| 1699 |
+
},
|
| 1700 |
+
{
|
| 1701 |
+
"type": "text",
|
| 1702 |
+
"text": "We thank Aaron Schwartz for his initial collaboration, Aaditya Singh and Sho Yaida for discussions, and Aaditya Singh for comments on the draft. We would also like to acknowledge the 2023 NeurIPS Large Language Model Efficiency Challenge for initializing us for work on this project. A.G. is supported by the NSF CAREER grant DMR-2045181, the Sloan Foundation, and by the Laboratory for Physical Sciences through the Condensed Matter Theory Center. D.R. acknowledges support from",
|
| 1703 |
+
"bbox": [
|
| 1704 |
+
169,
|
| 1705 |
+
710,
|
| 1706 |
+
826,
|
| 1707 |
+
784
|
| 1708 |
+
],
|
| 1709 |
+
"page_idx": 9
|
| 1710 |
+
},
|
| 1711 |
+
{
|
| 1712 |
+
"type": "equation",
|
| 1713 |
+
"text": "\n$$\n\\mathcal {L} _ {\\mathrm {a u x}} \\sim \\left(x ^ {(\\ell^ {*} + n)} \\left(\\theta_ {0}\\right) - x ^ {(\\ell^ {*})} (\\theta)\\right) ^ {2}, \\tag {8}\n$$\n",
|
| 1714 |
+
"text_format": "latex",
|
| 1715 |
+
"bbox": [
|
| 1716 |
+
385,
|
| 1717 |
+
837,
|
| 1718 |
+
825,
|
| 1719 |
+
863
|
| 1720 |
+
],
|
| 1721 |
+
"page_idx": 9
|
| 1722 |
+
},
|
| 1723 |
+
{
|
| 1724 |
+
"type": "text",
|
| 1725 |
+
"text": "where $\\theta_0$ are the frozen parameters of the unpruned model, and $\\theta$ are the parameters of the pruned model to be healed; thus, $x^{(\\ell^* + n)}(\\theta_0)$ is the input to the $(\\ell^* + n)$ -th layer in the unpruned model, $x^{(\\ell^*)}(\\theta)$ is the input to that same layer after pruning, and $\\mathcal{L}_{\\mathrm{aux}}$ minimizes their mismatch. We thank Sho Yaida for this observation.",
|
| 1726 |
+
"bbox": [
|
| 1727 |
+
169,
|
| 1728 |
+
868,
|
| 1729 |
+
823,
|
| 1730 |
+
909
|
| 1731 |
+
],
|
| 1732 |
+
"page_idx": 9
|
| 1733 |
+
},
|
| 1734 |
+
{
|
| 1735 |
+
"type": "text",
|
| 1736 |
+
"text": "${}^{9}$ Alternatively,one could measure $d\\left( {{x}^{\\left( \\ell \\right) },{x}^{\\left( \\ell + n\\right) }}\\right)$ or find ${\\ell }^{ * }\\left( n\\right)$ as a function of different eval datasets.",
|
| 1737 |
+
"bbox": [
|
| 1738 |
+
189,
|
| 1739 |
+
909,
|
| 1740 |
+
797,
|
| 1741 |
+
924
|
| 1742 |
+
],
|
| 1743 |
+
"page_idx": 9
|
| 1744 |
+
},
|
| 1745 |
+
{
|
| 1746 |
+
"type": "header",
|
| 1747 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1748 |
+
"bbox": [
|
| 1749 |
+
171,
|
| 1750 |
+
32,
|
| 1751 |
+
478,
|
| 1752 |
+
47
|
| 1753 |
+
],
|
| 1754 |
+
"page_idx": 9
|
| 1755 |
+
},
|
| 1756 |
+
{
|
| 1757 |
+
"type": "page_footnote",
|
| 1758 |
+
"text": "At the cost of introducing another hyperparameter and requiring both pruned and unpruned models to fit in memory during finetuning, one natural way to improve healing is by adding an auxiliary student-teacher loss that explicitly addresses the pruning mismatch [5], such as",
|
| 1759 |
+
"bbox": [
|
| 1760 |
+
169,
|
| 1761 |
+
791,
|
| 1762 |
+
823,
|
| 1763 |
+
832
|
| 1764 |
+
],
|
| 1765 |
+
"page_idx": 9
|
| 1766 |
+
},
|
| 1767 |
+
{
|
| 1768 |
+
"type": "page_number",
|
| 1769 |
+
"text": "10",
|
| 1770 |
+
"bbox": [
|
| 1771 |
+
488,
|
| 1772 |
+
946,
|
| 1773 |
+
508,
|
| 1774 |
+
959
|
| 1775 |
+
],
|
| 1776 |
+
"page_idx": 9
|
| 1777 |
+
},
|
| 1778 |
+
{
|
| 1779 |
+
"type": "text",
|
| 1780 |
+
"text": "the National Science Foundation under Cooperative Agreement PHY-2019786 (the NSF AI Institute for Artificial Intelligence and Fundamental Interactions, http://iaifi.org/) and appreciates both the sanction and support of Sequoia Capital. This paper has been brought to you residually by the letters $G$ , $P$ , and $U$ , after summing over many layers.",
|
| 1781 |
+
"bbox": [
|
| 1782 |
+
171,
|
| 1783 |
+
103,
|
| 1784 |
+
825,
|
| 1785 |
+
161
|
| 1786 |
+
],
|
| 1787 |
+
"page_idx": 10
|
| 1788 |
+
},
|
| 1789 |
+
{
|
| 1790 |
+
"type": "text",
|
| 1791 |
+
"text": "REFERENCES",
|
| 1792 |
+
"text_level": 1,
|
| 1793 |
+
"bbox": [
|
| 1794 |
+
173,
|
| 1795 |
+
180,
|
| 1796 |
+
287,
|
| 1797 |
+
196
|
| 1798 |
+
],
|
| 1799 |
+
"page_idx": 10
|
| 1800 |
+
},
|
| 1801 |
+
{
|
| 1802 |
+
"type": "list",
|
| 1803 |
+
"sub_type": "ref_text",
|
| 1804 |
+
"list_items": [
|
| 1805 |
+
"Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.",
|
| 1806 |
+
"nostalgebraist. interpreting gpt: the logit lens. https://www.lesswrong.com/posts/ AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens 2020.",
|
| 1807 |
+
"Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens. arXiv preprint arXiv:2303.08112, 2023.",
|
| 1808 |
+
"Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018.",
|
| 1809 |
+
"Greg Yang, Dingli Yu, Chen Zhu, and Soufiane Hayou. Tensor programs vi: Feature learning in infinite-depth neural networks. arXiv preprint arXiv:2310.02244, 2023.",
|
| 1810 |
+
"Yann LeCun, John Denker, and Sara Solla. Optimal brain damage. In D. Touretzky, editor, Advances in Neural Information Processing Systems, volume 2. Morgan-Kaufmann, 1989.",
|
| 1811 |
+
"Babak Hassibi and David Stork. Second order derivatives for network pruning: Optimal brain surgeon. In S. Hanson, J. Cowan, and C. Giles, editors, Advances in Neural Information Processing Systems, volume 5. Morgan-Kaufmann, 1992.",
|
| 1812 |
+
"Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. Advances in neural information processing systems, 28, 2015.",
|
| 1813 |
+
"Wenlin Chen, James Wilson, Stephen Tyree, Kilian Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In International conference on machine learning, pages 2285-2294. PMLR, 2015.",
|
| 1814 |
+
"Suraj Srinivas and R Venkatesh Babu. Data-free parameter pruning for deep neural networks. arXiv preprint arXiv:1507.06149, 2015.",
|
| 1815 |
+
"Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.",
|
| 1816 |
+
"Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. Advances in neural information processing systems, 29, 2016.",
|
| 1817 |
+
"Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016.",
|
| 1818 |
+
"Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In Proceedings of the IEEE international conference on computer vision, pages 1389-1397, 2017.",
|
| 1819 |
+
"Gao Huang, Shichen Liu, Laurens Van der Maaten, and Kilian Q Weinberger. Condensenet: An efficient densenet using learned group convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2752-2761, 2018.",
|
| 1820 |
+
"Kenton Murray and David Chiang. Auto-sizing neural networks: With applications to n-gram language models. arXiv preprint arXiv:1508.05051, 2015.",
|
| 1821 |
+
"Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. arXiv preprint arXiv:1606.09274, 2016."
|
| 1822 |
+
],
|
| 1823 |
+
"bbox": [
|
| 1824 |
+
171,
|
| 1825 |
+
203,
|
| 1826 |
+
826,
|
| 1827 |
+
924
|
| 1828 |
+
],
|
| 1829 |
+
"page_idx": 10
|
| 1830 |
+
},
|
| 1831 |
+
{
|
| 1832 |
+
"type": "header",
|
| 1833 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1834 |
+
"bbox": [
|
| 1835 |
+
171,
|
| 1836 |
+
32,
|
| 1837 |
+
478,
|
| 1838 |
+
47
|
| 1839 |
+
],
|
| 1840 |
+
"page_idx": 10
|
| 1841 |
+
},
|
| 1842 |
+
{
|
| 1843 |
+
"type": "page_number",
|
| 1844 |
+
"text": "11",
|
| 1845 |
+
"bbox": [
|
| 1846 |
+
488,
|
| 1847 |
+
946,
|
| 1848 |
+
506,
|
| 1849 |
+
959
|
| 1850 |
+
],
|
| 1851 |
+
"page_idx": 10
|
| 1852 |
+
},
|
| 1853 |
+
{
|
| 1854 |
+
"type": "list",
|
| 1855 |
+
"sub_type": "ref_text",
|
| 1856 |
+
"list_items": [
|
| 1857 |
+
"Yoon Kim and Alexander M Rush. Sequence-level knowledge distillation. arXiv preprint arXiv:1606.07947, 2016.",
|
| 1858 |
+
"Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. arXiv preprint arXiv:1905.09418, 2019.",
|
| 1859 |
+
"Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? Advances in neural information processing systems, 32, 2019.",
|
| 1860 |
+
"Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models for natural language understanding. arXiv preprint arXiv:2010.13382, 2020.",
|
| 1861 |
+
"Angela Fan, Edouard Grave, and Armand Joulin. Reducing transformer depth on demand with structured dropout. arXiv preprint arXiv:1909.11556, 2019.",
|
| 1862 |
+
"Minjia Zhang and Yuxiong He. Accelerating training of transformer-based language models with progressive layer dropping. Advances in Neural Information Processing Systems, 33:14011-14023, 2020.",
|
| 1863 |
+
"Chun Fan, Jiwei Li, Xiang Ao, Fei Wu, Yuxian Meng, and Xiaofei Sun. Layer-wise model pruning based on mutual information. arXiv preprint arXiv:2108.12594, 2021.",
|
| 1864 |
+
"Ananya Harsh Jha, Dirk Groeneveld, Emma Strubell, and Iz Beltagy. Large language model distillation doesn't need a teacher. arXiv preprint arXiv:2305.14864, 2023.",
|
| 1865 |
+
"Hassan Sajjad, Fahim Dalvi, Nadir Durrani, and Preslav Nakov. On the effect of dropping layers of pre-trained transformer models. Computer Speech & Language, 77:101429, 2023.",
|
| 1866 |
+
"Wei Liu, Zhiyuan Peng, and Tan Lee. Comflp: Correlation measure based fast search on asr layer pruning. arXiv preprint arXiv:2309.11768, 2023a.",
|
| 1867 |
+
"Lu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang, Xiao Chen, and Qun Liu. Dynabert: Dynamic bert with adaptive width and depth. Advances in Neural Information Processing Systems, 33: 9782-9793, 2020.",
|
| 1868 |
+
"Pratyusha Sharma, Jordan T Ash, and Dipendra Misra. The truth is in there: Improving reasoning in language models with layer-selective rank reduction. arXiv preprint arXiv:2312.13558, 2023.",
|
| 1869 |
+
"Saleh Ashkboos, Maximilian L. Croci, Marcelo Gennari do Nascimento, Torsten Hoefler, and James Hensman. Slicingpt: Compress large language models by deleting rows and columns. arXiv preprint arXiv:2401.15024, 2024.",
|
| 1870 |
+
"Mengzhou Xia, Zexuan Zhong, and Danqi Chen. Structured pruning learns compact and accurate models. arXiv preprint arXiv:2204.00408, 2022.",
|
| 1871 |
+
"François Lagunas, Ella Charlaix, Victor Sanh, and Alexander M Rush. Block pruning for faster transformers. arXiv preprint arXiv:2109.04838, 2021.",
|
| 1872 |
+
"Xin Men, Mingyu Xu, Qingyu Zhang, Bingning Wang, Hongyu Lin, Yaojie Lu, Xianpei Han, and Weipeng Chen. Shortgpt: Layers in large language models are more redundant than you expect. arXiv preprint arXiv:2403.03853, 2024.",
|
| 1873 |
+
"Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023.",
|
| 1874 |
+
"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. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023a.",
|
| 1875 |
+
"Mojan Javaheripi and Sébastien Bubeck. Phi-2: The surprising power of small language models, Dec 2023.",
|
| 1876 |
+
"Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. arXiv preprint arXiv:2305.14314, 2023."
|
| 1877 |
+
],
|
| 1878 |
+
"bbox": [
|
| 1879 |
+
171,
|
| 1880 |
+
102,
|
| 1881 |
+
825,
|
| 1882 |
+
924
|
| 1883 |
+
],
|
| 1884 |
+
"page_idx": 11
|
| 1885 |
+
},
|
| 1886 |
+
{
|
| 1887 |
+
"type": "header",
|
| 1888 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1889 |
+
"bbox": [
|
| 1890 |
+
171,
|
| 1891 |
+
32,
|
| 1892 |
+
478,
|
| 1893 |
+
47
|
| 1894 |
+
],
|
| 1895 |
+
"page_idx": 11
|
| 1896 |
+
},
|
| 1897 |
+
{
|
| 1898 |
+
"type": "page_number",
|
| 1899 |
+
"text": "12",
|
| 1900 |
+
"bbox": [
|
| 1901 |
+
488,
|
| 1902 |
+
946,
|
| 1903 |
+
508,
|
| 1904 |
+
960
|
| 1905 |
+
],
|
| 1906 |
+
"page_idx": 11
|
| 1907 |
+
},
|
| 1908 |
+
{
|
| 1909 |
+
"type": "list",
|
| 1910 |
+
"sub_type": "ref_text",
|
| 1911 |
+
"list_items": [
|
| 1912 |
+
"Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485-5551, 2020.",
|
| 1913 |
+
"Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020.",
|
| 1914 |
+
"Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. arXiv preprint arXiv:1905.10044, 2019.",
|
| 1915 |
+
"Rylan Schaeffer, Brando Miranda, and Sanmi Koyejo. Are emergent abilities of large language models a mirage? arXiv preprint arXiv:2304.15004, 2023.",
|
| 1916 |
+
"Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.",
|
| 1917 |
+
"Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830, 2019.",
|
| 1918 |
+
"Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A framework for few-shot language model evaluation, 12 2023. URL https://zenodo.org/records/10256836.",
|
| 1919 |
+
"Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53, 2024.",
|
| 1920 |
+
"Mostafa Elhoushi, Akshit Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, et al. Layer skip: Enabling early exit inference and self-speculative decoding. arXiv preprint arXiv:2404.16710, 2024.",
|
| 1921 |
+
"Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.",
|
| 1922 |
+
"Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.",
|
| 1923 |
+
"Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. URL https://cdn.openai.com/better-language-models/language_models—are_unsupervisedMULTITASK_LEARNers.pdf",
|
| 1924 |
+
"Qihuang Zhong, Liang Ding, Juhua Liu, Bo Du, and Dacheng Tao. Can chatgpt understand too? a comparative study on chatgpt and fine-tuned bert. arXiv preprint arXiv:2302.10198, 2023.",
|
| 1925 |
+
"Kawin Ethayarajh. How contextual are contextualized word representations? comparing the geometry of bert, elmo, and gpt-2 embeddings. arXiv preprint arXiv:1909.00512, 2019.",
|
| 1926 |
+
"Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in neural information processing systems, 33:12449-12460, 2020.",
|
| 1927 |
+
"Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.",
|
| 1928 |
+
"Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. Knowledge distillation of large language models. arXiv preprint arXiv:2306.08543, 2023."
|
| 1929 |
+
],
|
| 1930 |
+
"bbox": [
|
| 1931 |
+
171,
|
| 1932 |
+
102,
|
| 1933 |
+
825,
|
| 1934 |
+
924
|
| 1935 |
+
],
|
| 1936 |
+
"page_idx": 12
|
| 1937 |
+
},
|
| 1938 |
+
{
|
| 1939 |
+
"type": "header",
|
| 1940 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1941 |
+
"bbox": [
|
| 1942 |
+
171,
|
| 1943 |
+
32,
|
| 1944 |
+
478,
|
| 1945 |
+
47
|
| 1946 |
+
],
|
| 1947 |
+
"page_idx": 12
|
| 1948 |
+
},
|
| 1949 |
+
{
|
| 1950 |
+
"type": "page_number",
|
| 1951 |
+
"text": "13",
|
| 1952 |
+
"bbox": [
|
| 1953 |
+
488,
|
| 1954 |
+
946,
|
| 1955 |
+
506,
|
| 1956 |
+
959
|
| 1957 |
+
],
|
| 1958 |
+
"page_idx": 12
|
| 1959 |
+
},
|
| 1960 |
+
{
|
| 1961 |
+
"type": "list",
|
| 1962 |
+
"sub_type": "ref_text",
|
| 1963 |
+
"list_items": [
|
| 1964 |
+
"Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019.",
|
| 1965 |
+
"Shuohang Wang, Yang Liu, Yichong Xu, Chenguang Zhu, and Michael Zeng. Want to reduce labeling cost? gpt-3 can help. arXiv preprint arXiv:2108.13487, 2021.",
|
| 1966 |
+
"Ronen Eldan and Yuanzhi Li. Tinystories: How small can language models be and still speak coherent english? arXiv preprint arXiv:2305.07759, 2023.",
|
| 1967 |
+
"Yuanzhi Li, Sebastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, and Yin Tat Lee. Textbooks are all you need ii: phi-1.5 technical report. arXiv preprint arXiv:2309.05463, 2023a.",
|
| 1968 |
+
"Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio Cesar Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, et al. Textbooks are all you need. arXiv preprint arXiv:2306.11644, 2023.",
|
| 1969 |
+
"Yao Fu, Hao Peng, Litu Ou, Ashish Sabharwal, and Tushar Khot. Specializing smaller language models towards multi-step reasoning. arXiv preprint arXiv:2301.12726, 2023.",
|
| 1970 |
+
"Cheng-Yu Hsieh, Chun-Liang Li, Chih-Kuan Yeh, Hootan Nakhost, Yasuhisa Fujii, Alexander Ratner, Ranjay Krishna, Chen-Yu Lee, and Tomas Pfister. Distilling step-by-step! outperforming larger language models with less training data and smaller model sizes. arXiv preprint arXiv:2305.02301, 2023.",
|
| 1971 |
+
"Yuxin Jiang, Chunkit Chan, Mingyang Chen, and Wei Wang. Lion: Adversarial distillation of closed-source large language model. arXiv preprint arXiv:2305.12870, 2023b.",
|
| 1972 |
+
"Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.",
|
| 1973 |
+
"Yixiao Li, Yifan Yu, Chen Liang, Pengcheng He, Nikos Karampatziakis, Weizhu Chen, and Tuo Zhao. Loftq: Lora-fine-tuning-aware quantization for large language models. arXiv preprint arXiv:2310.08659, 2023b.",
|
| 1974 |
+
"Qingru Zhang, Minshuo Chen, Alexander Bukharin, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. Adaptive budget allocation for parameter-efficient fine-tuning. arXiv preprint arXiv:2303.10512, 2023.",
|
| 1975 |
+
"Yaniv Leviathan, Matan Kalman, and Yossi Matias. Fast inference from transformers via speculative decoding. In International Conference on Machine Learning, pages 19274-19286. PMLR, 2023.",
|
| 1976 |
+
"Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D Lee, Deming Chen, and Tri Dao. Medusa: Simple llm inference acceleration framework with multiple decoding heads. arXiv preprint arXiv:2401.10774, 2024.",
|
| 1977 |
+
"Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt. Advances in Neural Information Processing Systems, 35:17359-17372, 2022.",
|
| 1978 |
+
"Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. arXiv preprint arXiv:2104.08696, 2021.",
|
| 1979 |
+
"Peter Hase, Mohit Bansal, Been Kim, and Asma Ghandeharioun. Does localization inform editing? surprising differences in causality-based localization vs. knowledge editing in language models. arXiv preprint arXiv:2301.04213, 2023.",
|
| 1980 |
+
"Mor Geva, Jasmijn Bastings, Katja Filippova, and Amir Globerson. Dissecting recall of factual associations in auto-regressive language models. arXiv preprint arXiv:2304.14767, 2023.",
|
| 1981 |
+
"Alexander Yom Din, Taelin Karidi, Leshem Choshen, and Mor Geva. Jump to conclusions: Short-cutting transformers with linear transformations. arXiv preprint arXiv:2303.09435, 2023.",
|
| 1982 |
+
"Wes Gurnee and Max Tegmark. Language models represent space and time. arXiv preprint arXiv:2310.02207, 2023."
|
| 1983 |
+
],
|
| 1984 |
+
"bbox": [
|
| 1985 |
+
171,
|
| 1986 |
+
102,
|
| 1987 |
+
828,
|
| 1988 |
+
924
|
| 1989 |
+
],
|
| 1990 |
+
"page_idx": 13
|
| 1991 |
+
},
|
| 1992 |
+
{
|
| 1993 |
+
"type": "header",
|
| 1994 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 1995 |
+
"bbox": [
|
| 1996 |
+
171,
|
| 1997 |
+
32,
|
| 1998 |
+
478,
|
| 1999 |
+
47
|
| 2000 |
+
],
|
| 2001 |
+
"page_idx": 13
|
| 2002 |
+
},
|
| 2003 |
+
{
|
| 2004 |
+
"type": "page_number",
|
| 2005 |
+
"text": "14",
|
| 2006 |
+
"bbox": [
|
| 2007 |
+
488,
|
| 2008 |
+
946,
|
| 2009 |
+
508,
|
| 2010 |
+
960
|
| 2011 |
+
],
|
| 2012 |
+
"page_idx": 13
|
| 2013 |
+
},
|
| 2014 |
+
{
|
| 2015 |
+
"type": "list",
|
| 2016 |
+
"sub_type": "ref_text",
|
| 2017 |
+
"list_items": [
|
| 2018 |
+
"Elena Voita, Javier Ferrando, and Christoforos Nalmpantis. Neurons in large language models: Dead, n-gram, positional. arXiv preprint arXiv:2309.04827, 2023.",
|
| 2019 |
+
"Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Re, et al. Deja vu: Contextual sparsity for efficient llms at inference time. In International Conference on Machine Learning, pages 22137-22176. PMLR, 2023b.",
|
| 2020 |
+
"Abhishek Panigrahi, Nikunj Saunshi, Haoyu Zhao, and Sanjeev Arora. Task-specific skill localization in fine-tuned language models. arXiv preprint arXiv:2302.06600, 2023.",
|
| 2021 |
+
"Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierrick Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online, October 2020. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/2020-emnlp-demos.6",
|
| 2022 |
+
"Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints, 2019.",
|
| 2023 |
+
"Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, Sayak Paul, and Benjamin Bossan. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/huggingface/peft, 2022.",
|
| 2024 |
+
"Ariel N Lee, Cole J Hunter, and Nataniel Ruiz. Platypus: Quick, cheap, and powerful refinement of llms. arXiv preprint arXiv:2308.07317, 2023.",
|
| 2025 |
+
"Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. Llm. int8(): 8-bit matrix multiplication for transformers at scale. arXiv preprint arXiv:2208.07339, 2022."
|
| 2026 |
+
],
|
| 2027 |
+
"bbox": [
|
| 2028 |
+
171,
|
| 2029 |
+
102,
|
| 2030 |
+
828,
|
| 2031 |
+
535
|
| 2032 |
+
],
|
| 2033 |
+
"page_idx": 14
|
| 2034 |
+
},
|
| 2035 |
+
{
|
| 2036 |
+
"type": "header",
|
| 2037 |
+
"text": "Published as a conference paper at ICLR 2025",
|
| 2038 |
+
"bbox": [
|
| 2039 |
+
171,
|
| 2040 |
+
32,
|
| 2041 |
+
478,
|
| 2042 |
+
47
|
| 2043 |
+
],
|
| 2044 |
+
"page_idx": 14
|
| 2045 |
+
},
|
| 2046 |
+
{
|
| 2047 |
+
"type": "page_number",
|
| 2048 |
+
"text": "15",
|
| 2049 |
+
"bbox": [
|
| 2050 |
+
490,
|
| 2051 |
+
946,
|
| 2052 |
+
506,
|
| 2053 |
+
959
|
| 2054 |
+
],
|
| 2055 |
+
"page_idx": 14
|
| 2056 |
+
}
|
| 2057 |
+
]
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/4f5247c0-bc20-47fa-960b-775294408235_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7decdc8f994c6701c26fb5eb561e3376ffc0625af62128fbd2117bf2abd7a356
|
| 3 |
+
size 3187479
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/full.md
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
| 6 |
+
|
| 7 |
+
Kushal Tirumala*
|
| 8 |
+
|
| 9 |
+
Meta FAIR
|
| 10 |
+
|
| 11 |
+
Hassan Shapourian
|
| 12 |
+
|
| 13 |
+
Cisco
|
| 14 |
+
|
| 15 |
+
Paolo Glorioso
|
| 16 |
+
|
| 17 |
+
Zyphra
|
| 18 |
+
|
| 19 |
+
Daniel A. Roberts
|
| 20 |
+
|
| 21 |
+
MIT & Sequoia Capital
|
| 22 |
+
|
| 23 |
+
# ABSTRACT
|
| 24 |
+
|
| 25 |
+
How is knowledge stored in an LLM's weights? We study this via layer pruning: if removing a certain layer does not affect model performance in common question-answering benchmarks, then the weights in that layer are not necessary for storing the knowledge needed to answer those questions. To find these unnecessary parameters, we identify the optimal block of layers to prune by considering similarity across layers; then, to "heal" the damage, we perform a small amount of finetuning. Surprisingly, with this method we find minimal degradation of performance until after a large fraction (up to half) of the layers are removed for some common open-weight models. From a scientific perspective, the robustness of these LLMs to the deletion of layers implies either that current pretraining methods are not properly leveraging the parameters in the deeper layers of the network or that the shallow layers play a critical role in storing knowledge. For our study, we use parameter-efficient finetuning (PEFT) methods, specifically quantization and Low Rank Adapters (QLoRA), such that each of our experiments can be performed on a single 40GB A100 GPU.
|
| 26 |
+
|
| 27 |
+
# 1 INTRODUCTION
|
| 28 |
+
|
| 29 |
+
In this work we study a very simple pruning strategy using open-weight LLMs. In particular, we develop a method that uses the similarity between the representations at different layers to identify the optimal layers to prune for a given pruning fraction; then, after removing these layers we "heal" the pruning-induced mismatch with a small amount of fine tuning (using QLoRA). Our main result is that we can remove a substantial fraction of the deepest layers from models with minimal degradation in downstream question-answering benchmarks. For example, for Llama-2-70B (Touvron et al., 2023) we can eliminate up to roughly half of the layers before the performance collapses. An overview of our strategy and the results of pruning Llama-2-70B are shown in Figure1.
|
| 30 |
+
|
| 31 |
+
Our intuition for dropping layers comes from considering the residual structure of the transformer architecture. In more detail, the output of the final layer can be decomposed as a sum over the outputs of all the model layers plus the embedded input. If such a sum had numerous and independent terms, then removing a handful of them should not significantly change the output. However, since the terms are not independent - each layer is input to the following layer - we should expect to be able to remove terms if the residual contribution from a particular layer is small. In other words, if the output of each layer does not change too much from layer to layer
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
(a)
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
(b)
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
(d)
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 1: Overview of our layer-pruning strategy and example results: $(a)$ a flowchart describing the algorithm: if removing $n$ layers, we find the layer, $\ell^{*}$ , that minimizes the angular distance, $d$ , between layers $\ell$ and $\ell + n$ ; we then remove the $n$ layers beginning with layer $\ell^{*}$ ; finally, if necessary, we can "heal" the damage with a small amount of (parameter-efficient) finetuning. $(b)$ a schematic depicting the removal of $n$ total layers, indexed from $\ell^{*}$ to $\ell^{*} + n - 1$ . $(c)$ angular distance, $d$ , between different numbers of layers, $n$ , vs. the layer number, $\ell$ , that indexes the beginning of the block of $n$ ; the bottom curve (darkest purple) represents $n = 1$ , while the top curve (lightest yellow) represents $n = 64$ ; the black line traces $\ell^{*}(n)$ , the minimum of the angular distance across the different sized layer blocks. $(d)$ results of pruning Llama-2-70B with healing (light blue) and without healing (dark blue) as a function of the fraction of layers removed: the top (middle) panel gives the accuracy on the MMLU (BoolQ) question-answering benchmark, while the bottom panel the autoregressive loss on a subset of the C4 validation set; here, the dashed red lines (dashed gray lines) indicate the accuracy or loss of the original unpruned model (of random guessing); these plots illustrate that typical behavior we find in which there are sharp transitions in performance for the accuracy of question-answering tasks (here between $40\% - 50\%$ pruning fraction), but continuity and very slow growth in the healed loss (light blue) up to at least to $80\%$ pruning fraction.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
(c)
|
| 47 |
+
|
| 48 |
+
In conjunction with our layer pruning, we investigate the similarity of layer representations at different separations and find broadly that deeper layers are qualitatively more similar to neighboring layers than shallow layers (with the exception of the very final layer). This suggests an even simpler pruning strategy: remove layers beginning at the penultimate layer and proceed from deep to shallow until the desired number of layers have been removed. In this case, we find that, after healing the damage with a small amount of QLoRA finetuning, we can achieve performance that nearly matches the more involved similarity-informed layer pruning strategy. The effectiveness of this method is evidence that LLMs might not properly leverage the parameters in the deeper layers of the network.
|
| 49 |
+
|
| 50 |
+
That said, while question-answering (QA) benchmarks such as MMLU and BoolQ are robust to a large amount of layer pruning, other measures of performance are not: if we look at the loss on next-token predictions for an IID dataset (C4 validation set), we find that the model is smoothly damaged in proportion to the fraction of the number of layers pruned. Since perplexity typically correlates strongly with downstream metrics, this naturally begs the question: which tasks are less robust than QA benchmarks to pruning? As part of our final discussion, we explore reasoning
|
| 51 |
+
|
| 52 |
+
related tasks (GSM8k and HellaSwag) and see that they are harmed by any amount of pruning. Altogether, this leads to the following accounting of state: the shallow layers likely play a critical role in the storing of knowledge and retrieving of information, while the deeper layers are important for higher-level computations such as mathematical reasoning.
|
| 53 |
+
|
| 54 |
+
The structure of this paper is as follows. In §2 we first perform a literature review of both practical post-training strategies and science-of-deep-learning investigations that motivate our work. Then, in §3 we give intuition for our layer pruning strategy and explain our method in detail, while in §4 we iterate over all our experimental results. Finally, we conclude in §5 by exploring tasks beyond QA benchmarks, such as reasoning, and highlighting directions of future work. Specific model, finetuning, dataset, and evaluation details can be found in Appendix B and evaluation ablations can be found in Appendix C
|
| 55 |
+
|
| 56 |
+
# 2 LITERATURE REVIEW
|
| 57 |
+
|
| 58 |
+
Pruning for neural networks has a long history (LeCun et al., 1989; Hassibi and Stork, 1992): while initial work focused on unstructured pruning (Han et al., 2015; Chen et al., 2015; Srinivas and Babu, 2015), structured pruning techniques were developed to make sparse networks more efficient (Li et al., 2016; Wen et al., 2016; Hu et al., 2016; He et al., 2017; Huang et al., 2018; Murray and Chiang, 2015; See et al., 2016; Kim and Rush, 2016). Recent work, of course, focused on structured pruning of transformers (Voita et al., 2019; Michel et al., 2019; Kim and Awadalla, 2020; Fan et al., 2019; Zhang and He, 2020; Fan et al., 2021; Jha et al., 2023; Sajjad et al., 2023; Liu et al., 2023a; Hou et al., 2020; Sharma et al., 2023; Ashkboos et al., 2024; Xia et al., 2022; Lagunas et al., 2021; Men et al., 2024). Our work focuses on pruning the layers of decoder-only GPT style open-weight large language models after they've been pretrained. For an extended literature review, please see Appendix A
|
| 59 |
+
|
| 60 |
+
# 3 METHOD
|
| 61 |
+
|
| 62 |
+
In this section, we give intuition for why we think layer pruning works (§3.1) and then we explain our method in detail (§3.2).
|
| 63 |
+
|
| 64 |
+
# 3.1 INTUITION
|
| 65 |
+
|
| 66 |
+
Our intuition for layer dropping comes from thinking about the representations as a slowly changing function of layer index. In particular, the layer-to-layer evolution of representations for a transformer is given by a residual iteration equation
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
x ^ {(\ell + 1)} = x ^ {(\ell)} + f \left(x ^ {(\ell)}, \theta^ {(\ell)}\right), \tag {1}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $(x^{(\ell)},\theta^{(\ell)})$ , respectively, are the multi-dimensional input and parameter vectors for layer $\ell$ , and $f(x,\theta)$ describes the transformation of one multi-head self-attention and MLP layer block. As for any residual network, if we unroll this iteration, we see that after $L$ total layers the output is described as a sum over the transformations of all the layers
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
x ^ {(L)} = x ^ {(0)} + \sum_ {\ell = 0} ^ {L - 1} f \left(x ^ {(\ell)}, \theta^ {(\ell)}\right). \tag {2}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
If the terms in the sum were numerous, $(L \gg 1)$ , and independent, e.g. if the block functions were instead a function of the overall input as $f(x^{(0)},\theta^{(\ell)})$ , then perhaps any particular contribution to the sum (2) could be neglected.
|
| 79 |
+
|
| 80 |
+
Of course, they are not at all independent: if we delete layer $\ell - 1$ , then we must now connect the old input to that layer, $x^{(\ell - 1)}$ , into the block function of layer $\ell$ as
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
x ^ {(\ell + 1)} = x ^ {(\ell - 1)} + f \left(x ^ {(\ell - 1)}, \theta^ {(\ell)}\right), \tag {3}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where, for clarity, we are not relabeling layers or inputs despite the deletion. In general, such a mismatch between the original input and new input should be very damaging for the network.
|
| 87 |
+
|
| 88 |
+
However, if, after some number of initial layers, the representations converge to a slowly changing function with respect to layer index,
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
x ^ {(\ell)} \approx x ^ {(\ell - 1)} + \epsilon , \tag {4}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
with $\epsilon \ll x^{(\ell)}$ in some appropriate sense, then the effect of deleting a particular layer $\ell$ , e.g. making the replacement $x^{(\ell)} \to x^{(\ell-1)}$ in going from (1) to (3), should only change the representation in the subsequent layer, $x^{(\ell+1)}$ , by a small amount. Similarly, to successfully prune the $n$ layers before layer $\ell$ , i.e. those indexed from $\ell - n, \ldots, \ell - 1$ , we'd want that the input to the pruned block should be very similar to the output of the pruned block:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
x ^ {(\ell)} \approx x ^ {(\ell - n)} + \epsilon . \tag {5}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
Regardless, any layer removal has a cascading effect: since post pruning $x^{(\ell + 1)}$ is computed by a different function than before, cf. (1) vs. (3), and since then $x^{(\ell + 1)}$ is directly or indirectly input to subsequent layers, $\ell + 2, \ldots, L$ , deleting a shallow layer should have a much greater impact than deleting a deeper layer.
|
| 101 |
+
|
| 102 |
+
From this, we have the following hypotheses that we will test experimentally:
|
| 103 |
+
|
| 104 |
+
(0) We should be able to prune layers of a residual network.
|
| 105 |
+
(1) We should have greater success pruning deeper layers.
|
| 106 |
+
(2) Blocks of layers we successfully prune should have outputs that are similar to their inputs.
|
| 107 |
+
|
| 108 |
+
In the next subsection, §3.2 we will explain the details of our pruning algorithm and in the following section, §4 we will present experimental evidence for points (0)-(2).
|
| 109 |
+
|
| 110 |
+
# 3.2 LAYER-PRUNING ALGORITHM(S)
|
| 111 |
+
|
| 112 |
+
Our principal layer pruning algorithm is very simple:
|
| 113 |
+
|
| 114 |
+
0. Pick a number of layers to prune $n$ .
|
| 115 |
+
|
| 116 |
+
1. Compute the angular distance $d(x^{(\ell)},x^{(\ell +n)})$ , cf. below, between the input to layer $\ell$ and the input to layer $\ell +n$ on a neutral pretraining dataset or on a dataset representative of a downstream task of interest.
|
| 117 |
+
2. Find the layer, $\ell^{*}$ , that minimizes that distance:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\ell^ {\star} (n) \equiv \underset {\ell} {\arg \min } d \left(x ^ {(\ell)}, x ^ {(\ell + n)}\right). \tag {6}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
3. Drop layers $\ell^{\star}$ to $\ell^{\star} + n - 1$ ; connect the old input to layer $\ell^{\star}$ to the old $(\ell^{\star} + n)$ th layer block.
|
| 124 |
+
4. (Optionally) heal the mismatch at layer $\ell^{\star} + n$ with a small amount of fine tuning on a neutral pretraining dataset or particular dataset of interest.
|
| 125 |
+
|
| 126 |
+
If fewer words inside of a figure are more helpful to you than the text in an enumerated list, then note that this algorithm is also depicted in panels (a)-(b) of Figure 1
|
| 127 |
+
|
| 128 |
+
Elaborating on the first step, the angular distance on a single sequence of length $T$ is given by
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
d \left(x ^ {(\ell)}, x ^ {(\ell + n)}\right) \equiv \frac {1}{\pi} \operatorname {a r c c o s} \left(\frac {x _ {T} ^ {(\ell)} \cdot x _ {T} ^ {(\ell + n)}}{\left\| x _ {T} ^ {(\ell)} \right\| \left\| x _ {T} ^ {(\ell + n)} \right\|}\right), \tag {7}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where the inner product is over the hidden dimension of the model for the final token $T$ of the sequence, $\| \cdot \|$ denotes the $L^2$ -norm, and the factor of $1 / \pi$ is a convention. This distance should
|
| 135 |
+
|
| 136 |
+
then be summed over a number of examples that is large enough to get a low-fluctuation estimate but overall should be quite small.
|
| 137 |
+
|
| 138 |
+
Elaborating on the "optionality" of the final step, we find that the near-lack of performance degradation on question-answering benchmarks, cf. Figure 1(d) and others in §4.1 can be extended to greater pruning fractions with a small amount of finetuning. Depending on resource constraints and intended application of the pruned model, this may not be necessary. However, the healing procedure does have a substantial impact on perplexity, cf. Figure 1(d) and others in §4.2.
|
| 139 |
+
|
| 140 |
+
For both the angular distance measuring and the healing, if the ultimate goal is to supervise finetune (SFT) a model for a downstream task, it could be useful to evaluate the distance of a sample from that dataset and then combine the healing process with the SFT. In contrast, for the greatest generality, it's most natural to measure distance and heal with a pretraining dataset that approximates the statistics under which the model was originally pretrained.
|
| 141 |
+
|
| 142 |
+
Finally, we also investigated an even simpler pruning strategy inspired by analyzing the angular distances across different model families: drop the deepest layers, excluding the final layer before the LLM head, and then (non-optionally) heal the damage. For complete clarity, this means that if we are pruning $n$ layers from an $L$ -layer model, then we would remove layers $(L - n)$ to $(L - 1)$ , inclusive.
|
| 143 |
+
|
| 144 |
+
# 4 RESULTS
|
| 145 |
+
|
| 146 |
+
In this section, we demonstrate the effectiveness of our pruning strategy on different question-answering (QA) benchmarks and highlight a robust pruning-driven transition in performance (\$4.1), while, in contrast, we find that the autoregressive perplexities of the healed pruned models are continuous across their transition points (\$4.2); then, after comparing the similarity statistics between different layers across model sizes and families (\$4.3), we contrast our principal similarity-informed pruning strategy with a simpler remove-the-deepest-layers strategy (\$4.4).
|
| 147 |
+
|
| 148 |
+
For our experiments, we pruned a wide variety of large-scale LLMs from 2.7B to 70B parameters spanning 32 to 80 total unpruned layers. Specifically, we used models in the Llama-2 family (Touvron et al., 2023), the Qwen family (Bai et al., 2023), Mistral-7B (Jiang et al., 2023a), and Phi-2 (Javaheripi and Bubeck, 2023). For these models, we executed the "healing" step using QLoRA (Dettmers et al., 2023): our models were quantized to 4-bit precision and then finetuned, using QLoRA for efficient training, on either 164M or 328M tokens from the Colossal Clean Crawled Corpus (C4) (Raffel et al., 2020), a common pretraining dataset. As a result, each experiment of ours can be performed on a single 40GB A100 GPU. For our QA evals, we used Massive Multitask Language Understanding (MMLU) (Hendrycks et al., 2020), a common world-knowledge and problem solving benchmark, and BoolQ (Clark et al., 2019), a common yes/no reading comprehension benchmark where the answer has to be inferred from the text itself. The specifics of our models, healing procedure, dataset choices, and evaluation details can be found across Appendix B; ablations of different hyperparameter choices can be found across Appendix C
|
| 149 |
+
|
| 150 |
+
# 4.1 ACCURACY ON QA BENCHMARKS
|
| 151 |
+
|
| 152 |
+
Our first set of results are shown in Figure 2, where we plot 5-shot MMLU accuracy as a function of the fraction of layers removed: in the left panel we present the Llama-2 family, in the middle panel we present models from the Qwen family, and in the right panel we show Mistral-7B and Phi-2. In order to better compare models of different total number of layers, in these plots we opted to normalize the $x$ -axis by the fraction of layers removed (rather than the absolute number of layers removed). Note that since MMLU contains multiple choice questions with four possible responses, the expected accuracy of random guessing is $25\%$ .
|
| 153 |
+
|
| 154 |
+
Importantly, we see a characteristic flat region of robust performance followed by a sharp transition to random accuracy at a pruning fraction around $45\% - 55\%$ for models in the Llama-2 family, $35\%$ for Mistral 7B, $25\%$ for Phi-2, and $20\%$ for models from the Qwen family. This implies that the essential knowledge required to achieve a model's top score isn't removed by significant layer removal – even though the fraction can be quite large(!) – until eventually that knowledge is lost at a critical
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 2: MMLU accuracy (5-shot) vs. fraction of layers dropped for different model families. (Left: Llama-2 family; Middle: Qwen family; Right: Mistral-7B and Phi-2.) The solid lines represent performance after dropping layers and healing, dotted lines show performance after dropping layers only (no healing), and the dashed gray line is the score for guessing randomly. For these models, healing leads to modest improvements, and performances are quite robust until $20\% - 55\%$ pruning fractions, depending on model family and size, at which point they transitions to random guessing.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
|
| 163 |
+
model-dependent threshold.4 Contrasting the curves with and without healing, we see that finetuning offers a modest improvement by better preserving the unpruned performance and pushing the phase transition to random guessing to slightly larger pruning fractions.
|
| 164 |
+
|
| 165 |
+
Broadly we see that layer pruning is more robust for the larger and deeper models, e.g. Llama-2-13B and Llama-2-70B, which we hypothesize could be related to the fact that either the smaller models are more overtrained, making parameters less redundant, or that the deeper models can afford to lose more layers in an absolute sense. Also, the Qwen family is strange, a fact we will further elaborate on in §4.3
|
| 166 |
+
|
| 167 |
+
# 4.2 LOSS ON NEXT-TOKEN PREDICTIONS
|
| 168 |
+
|
| 169 |
+
In this section, we look at the effect of layer pruning on the pretraining optimization objective – the cross-entropy loss of next-token prediction – when evaluated on a subset of the C4 validation dataset. In order to have a fair comparison across models with different sized vocabularies $V$ , we normalize the loss by $\log V$ , which corresponds to the loss of sampling tokens randomly with uniform probability. (See Appendix B.2 for more details.)
|
| 170 |
+
|
| 171 |
+
In Figure 3, we plot the normalized C4 validation loss for all seven of our models, after healing (left panel) and before healing (right panel), as a function of the fraction layers removed. Without healing, we see that there is a somewhat sharp(ish) transition to random guessing for each model at approximately the pruning fraction that the QA benchmark accuracies also sharply transition to random guessing, suggesting that models are hopelessly harmed at this point, cf. Figure 2 Next, contrasting the scales of both plots, we see that healing significantly restores the next-token prediction ability of all the models to near-unpruned levels, with the loss increasing slowly and linearly with layer dropping. Most strikingly – from a scientific perspective – is the post-healing continuity through the pruning fractions where we previously found sharp transitions for the QA benchmarks: this decoupling illustrates one way of disconnecting (or creating a miscalibration) between performance on downstream tasks – such as MMLU and BoolQ – and continuous measures of performance – such as the cross-entropy loss.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 3: Normalized C4 validation loss vs. fraction of layers dropped before healing (left) and after healing (right); each curve is normalized by the cross-entropy loss of sampling uniformly from the model's vocabulary. For the experiments before healing, the loss for each model transitions to random guessing (gray dashed line) at approximately the same pruning fractions that the QA benchmarks transition to random guessing; after healing, there is continuity through the regions of sharp transition on QA tasks, cf. Figure 2 Contrasting the overall scale of both plots, it's clear that healing significantly restores the performance on next-token prediction to near-unpruned levels.
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
|
| 178 |
+
# 4.3 ANGULAR DISTANCES BETWEEN REPRESENTATIONS
|
| 179 |
+
|
| 180 |
+
Given the central role the angular distance $\boxed{7}$ plays in our pruning strategy, let's take a subsection to look at these distances across our seven models. For this analysis, the angular distances for each model were averaged over 10k samples from the C4 validation set.
|
| 181 |
+
|
| 182 |
+
Recall from earlier Figure 1(c): for Llama-2-70B this plotted the angular distance $d(x^{(\ell)}, x^{(\ell + n)})$ that compared the $\ell$ -th layer to the $(\ell + n)$ -th layer, across all initial indexes $\ell$ for block sizes from $n = 1$ to $n = 64$ ; the minimum of the curves, $\ell^*(n)$ , gave the optimal block to prune for a given $n$ , cf. (6).
|
| 183 |
+
|
| 184 |
+
A more compact way to display this same data is shown in the heat maps of Figure 4: each square is colored to depict the row-normalized angular distance between layer $\ell$ and $\ell + n$ across all possible $\ell$ , and $n$ up to very large fractions of the total number of layers; the optimal layer to prune for a given block size, $\ell^{*}(n)$ , corresponds to the minimal distance in each row.
|
| 185 |
+
|
| 186 |
+
Across models, we make two generalizations: (i) the smallest distances are found across the deeper blocks, meaning deeper layers are typically quite similar to each other and can be more easily dropped; (ii) the distances across the deepest blocks – the blocks that include the last layer – take either maximal or nearly-maximal values, meaning one should never drop the final layer. While broadly true, there are a few exceptions. For some models, e.g. Phi-2-2.7B, or for the largest blocks in some models, e.g. Llama-2-7B, final few layers seem important. As previously noted, the Qwen family is somewhat unusual: here we see that there are a few odd “islands” of high similarity for shallow blocks; this likely explains the shorter region of robust performance in Figure 2
|
| 187 |
+
|
| 188 |
+
# 4.4 A SIMPLER PRUNING STRATEGY
|
| 189 |
+
|
| 190 |
+
Inspired by our recent conclusions, we experiment with a very simple heuristic pruning strategy: (1) if pruning $n$ layers from an $L$ -layer model, drop layers $(L - n)$ to $(L - 1)$ so as to remove the deepest block that excludes the final layer; then (2) heal with a small amount of finetuning as before. Compared with our principal similarity-informed pruning strategy, this simpler heuristic algorithm has the advantage of never requiring practitioners to load onto a GPU or inference the unpruned model. It also provides a meaningful ablation of the importance of optimizing the block to prune.
|
| 191 |
+
|
| 192 |
+
In Figure 5 we contrast our two pruning strategies, both before healing (left panels) and after healing (right panels), for the QA benchmarks (MMLU/BoolQ, top/middle panels) and the autoregressive loss (C4 validation, bottom panels). On the one hand, the simple heuristic performs quite poorly without healing the damage incurred by pruning: accuracy on the QA benchmarks decays rapidly to (near-) random with increased pruning fraction, and the loss begins to increase very rapidly even with small amounts of pruning. On the other hand, the results for the two pruning strategies across evaluations
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
(a) Llama-2-7B
|
| 196 |
+
(b) Llama-2-13B
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
(c) Llama-2-70B
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
(d) Qwen-7B
|
| 207 |
+
Figure 4: Normalized angular distance (7) from initial layer $\ell$ (x-axis) with block size $n$ (y-axis) for each of the seven models we evaluated; the distance for each $n$ is shifted and rescaled to span the same range, [0, 1] (yellow to purple): the optimal block to prune, $\ell^{*}(n)$ , corresponds to the deepest yellow for each row. Across models, the deeper layers tend to be very similar, though the deepest blocks that include the final layer (squares along the outer diagonal) are (near-)maximally dissimilar.
|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
(e) Qwen-14B
|
| 211 |
+
(f) Mistral-7B
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
(g) Phi-2-2.7B
|
| 217 |
+
|
| 218 |
+
are quite comparable after healing: for the QA benchmarks, the similarity-informed algorithm slightly better preserves the accuracy before the phase transition, though the simple algorithm perhaps pushes the phase transition to slightly greater pruning factions; and for the loss, the curves nearly lie on top of each other, though the similarity-informed strategy does marginally outperform for all amounts of pruning. These experiments are strong evidence that the purpose of post-pruning finetuning is the healing of damage at the pruning interface and not the acquisition of additional knowledge.
|
| 219 |
+
|
| 220 |
+
# 5 DISCUSSION AND FUTURE DIRECTIONS
|
| 221 |
+
|
| 222 |
+
At the end of this work, many readers are puzzled by the following: are the deeper layers entirely useless? So far, we've provided evidence that the elimination of the deeper layers does not affect performance on QA tasks like MMLU (Figure 2), while at the same time have shown that their removal does disrupt the next-token predictions of the underlying model (Figure 3). Since perplexity often correlates with performance on downstream tasks, which are the tasks that are hurt by layer pruning?
|
| 223 |
+
|
| 224 |
+
Here are two hypotheses consistent with the fact that the model's perplexity is disturbed proportionally to pruning fraction:
|
| 225 |
+
|
| 226 |
+
(i) The deeper layers are not essential for storing knowledge, but are useful for more complicated computations, such as those that involve reasoning.
|
| 227 |
+
(ii) The deeper layers are necessary when the model has to generate many tokens before answering a question, such as when it produces a chain-of-thought (CoT).
|
| 228 |
+
|
| 229 |
+
We test these hypotheses by evaluating our layer-pruned models on tasks that involve CoTs or reasoning. For the former, we'll look at Chain-of-Thought MMLU (CoT-MMLU); for the latter, we'll
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
|
| 239 |
+
Figure 5: Evaluation of Llama-2-70B with the simple pruning heuristic (solid red line), shown along with scores for the similarity-informed pruning strategy (solid blue line), scores of the unpruned Llama-2-70B (red dashed line), and scores for randomly guessing (gray dashed line). (Left: before healing, Right: after healing; Top: MMLU, Middle: BoolQ, Bottom: C4 Validation Loss.) Without healing, the simple heuristic performs poorly across all evals; with healing, the scores of both methods are quite similar.
|
| 240 |
+

|
| 241 |
+
Similarity Simple Baseline Random
|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
|
| 245 |
+
look at GSM8K (Cobbe et al. 2021), a grade-school math benchmark, and HellaSwag (Zellers et al. 2019), a multiple choice common-sense reasoning benchmark
|
| 246 |
+
|
| 247 |
+
In Figure 6 we plot the performance of Llama-2 70B pruned with the similarity-informed pruning strategy across CoT-MMLU (left), GSM8K (center), and HellaSwag (right): on the one hand, both GSM8K and HellaSwag, our two reasoning tasks, exhibit immediate degradation in performance with any amount of pruning, correlating with a similar decrease in the perplexity evals (Figure 3); on the other hand, CoT-MMLU shows a relatively flat region of robust performance with pruning, analogous to our previous results on QA benchmarks (e.g. Figure 2). This is some initial evidence for hypothesis $(i)$ over hypothesis $(ii)$ : the deeper layers may be useful for higher-level reasoning tasks, while less important for knowledge intensive QA tasks; moreover, perplexity errors due to pruning do not compound to hurt QA evals when the model is required to generate many tokens.
|
| 248 |
+
|
| 249 |
+
Now at the conclusion of the work, we are left with the following questions:
|
| 250 |
+
|
| 251 |
+
Figure 6: Evaluation of Llama-2 70B with the similarity-informed pruning strategy across different evaluation tasks. (Left: Chain-of-Thought MMLU (CoT-MMLU), Center: GSM8K, Right: HellaSwag.) We see that GSM8K and HellaSwag show immediate degradation of performance with any level of pruning, while CoT-MMLU behaves qualitatively similarly to MMLU without CoT; this suggests that the deeper layers are likely necessary for reasoning tasks.
|
| 252 |
+

|
| 253 |
+
Llama-2-70B (Similarity) Baseline Random
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
|
| 257 |
+

|
| 258 |
+
|
| 259 |
+
What are better layer-pruning strategies? What are better approaches to healing?
|
| 260 |
+
- Why does healing eliminate the phase transition in the loss but not in the QA accuracies?
|
| 261 |
+
- With more comprehensive evals, will accuracy on different tasks degrade at different depths?
|
| 262 |
+
- Relatedly, is knowledge generally stored in shallow or middle layers, or is it delocalized?
|
| 263 |
+
- Can we devise a pruning strategy that is robust for reasoning tasks?
|
| 264 |
+
- Do pretraining details affect the ability to prune, e.g., are scaling-law over-trained or distilled models more difficult to prune?
|
| 265 |
+
- How can we enable LLMs to more effectively use the parameters in their deepest layers?
|
| 266 |
+
|
| 267 |
+
Some of these questions would benefit from studying both layer similarity and pruning across different pretraining checkpoints; for instance, at what point does the sharp phase transition and critical depth in the QA accuracies emerge, and does more training lead to better use of the prunable parameters? Others suggest explorations with different pretraining architectures and objectives, e.g. in order better make use of the deeper layers (for example, one can imagine applying layer dropout (Fan et al. 2019) or early exit during pre-training (Elhoushi et al., 2024) to induce equal usage of layers). With more comprehensive evaluations, if different kinds of QA tasks degrade at very different depths, then this might indicate that the knowledge required to complete those tasks is stored across different layers. It would be very interesting to use pruning to systematically study these kind of interpretability questions.
|
| 268 |
+
|
| 269 |
+
# ACKNOWLEDGMENTS AND DISCLOSURE OF FUNDING
|
| 270 |
+
|
| 271 |
+
We thank Aaron Schwartz for his initial collaboration, Aaditya Singh and Sho Yaida for discussions, and Aaditya Singh for comments on the draft. We would also like to acknowledge the 2023 NeurIPS Large Language Model Efficiency Challenge for initializing us for work on this project. A.G. is supported by the NSF CAREER grant DMR-2045181, the Sloan Foundation, and by the Laboratory for Physical Sciences through the Condensed Matter Theory Center. D.R. acknowledges support from
|
| 272 |
+
|
| 273 |
+
$$
|
| 274 |
+
\mathcal {L} _ {\mathrm {a u x}} \sim \left(x ^ {(\ell^ {*} + n)} \left(\theta_ {0}\right) - x ^ {(\ell^ {*})} (\theta)\right) ^ {2}, \tag {8}
|
| 275 |
+
$$
|
| 276 |
+
|
| 277 |
+
where $\theta_0$ are the frozen parameters of the unpruned model, and $\theta$ are the parameters of the pruned model to be healed; thus, $x^{(\ell^* + n)}(\theta_0)$ is the input to the $(\ell^* + n)$ -th layer in the unpruned model, $x^{(\ell^*)}(\theta)$ is the input to that same layer after pruning, and $\mathcal{L}_{\mathrm{aux}}$ minimizes their mismatch. We thank Sho Yaida for this observation.
|
| 278 |
+
|
| 279 |
+
${}^{9}$ Alternatively,one could measure $d\left( {{x}^{\left( \ell \right) },{x}^{\left( \ell + n\right) }}\right)$ or find ${\ell }^{ * }\left( n\right)$ as a function of different eval datasets.
|
| 280 |
+
|
| 281 |
+
the National Science Foundation under Cooperative Agreement PHY-2019786 (the NSF AI Institute for Artificial Intelligence and Fundamental Interactions, http://iaifi.org/) and appreciates both the sanction and support of Sequoia Capital. This paper has been brought to you residually by the letters $G$ , $P$ , and $U$ , after summing over many layers.
|
| 282 |
+
|
| 283 |
+
# REFERENCES
|
| 284 |
+
|
| 285 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
|
| 286 |
+
nostalgebraist. interpreting gpt: the logit lens. https://www.lesswrong.com/posts/ AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens 2020.
|
| 287 |
+
Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens. arXiv preprint arXiv:2303.08112, 2023.
|
| 288 |
+
Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018.
|
| 289 |
+
Greg Yang, Dingli Yu, Chen Zhu, and Soufiane Hayou. Tensor programs vi: Feature learning in infinite-depth neural networks. arXiv preprint arXiv:2310.02244, 2023.
|
| 290 |
+
Yann LeCun, John Denker, and Sara Solla. Optimal brain damage. In D. Touretzky, editor, Advances in Neural Information Processing Systems, volume 2. Morgan-Kaufmann, 1989.
|
| 291 |
+
Babak Hassibi and David Stork. Second order derivatives for network pruning: Optimal brain surgeon. In S. Hanson, J. Cowan, and C. Giles, editors, Advances in Neural Information Processing Systems, volume 5. Morgan-Kaufmann, 1992.
|
| 292 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. Advances in neural information processing systems, 28, 2015.
|
| 293 |
+
Wenlin Chen, James Wilson, Stephen Tyree, Kilian Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In International conference on machine learning, pages 2285-2294. PMLR, 2015.
|
| 294 |
+
Suraj Srinivas and R Venkatesh Babu. Data-free parameter pruning for deep neural networks. arXiv preprint arXiv:1507.06149, 2015.
|
| 295 |
+
Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
|
| 296 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. Advances in neural information processing systems, 29, 2016.
|
| 297 |
+
Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016.
|
| 298 |
+
Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In Proceedings of the IEEE international conference on computer vision, pages 1389-1397, 2017.
|
| 299 |
+
Gao Huang, Shichen Liu, Laurens Van der Maaten, and Kilian Q Weinberger. Condensenet: An efficient densenet using learned group convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2752-2761, 2018.
|
| 300 |
+
Kenton Murray and David Chiang. Auto-sizing neural networks: With applications to n-gram language models. arXiv preprint arXiv:1508.05051, 2015.
|
| 301 |
+
Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. arXiv preprint arXiv:1606.09274, 2016.
|
| 302 |
+
|
| 303 |
+
Yoon Kim and Alexander M Rush. Sequence-level knowledge distillation. arXiv preprint arXiv:1606.07947, 2016.
|
| 304 |
+
Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. arXiv preprint arXiv:1905.09418, 2019.
|
| 305 |
+
Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? Advances in neural information processing systems, 32, 2019.
|
| 306 |
+
Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models for natural language understanding. arXiv preprint arXiv:2010.13382, 2020.
|
| 307 |
+
Angela Fan, Edouard Grave, and Armand Joulin. Reducing transformer depth on demand with structured dropout. arXiv preprint arXiv:1909.11556, 2019.
|
| 308 |
+
Minjia Zhang and Yuxiong He. Accelerating training of transformer-based language models with progressive layer dropping. Advances in Neural Information Processing Systems, 33:14011-14023, 2020.
|
| 309 |
+
Chun Fan, Jiwei Li, Xiang Ao, Fei Wu, Yuxian Meng, and Xiaofei Sun. Layer-wise model pruning based on mutual information. arXiv preprint arXiv:2108.12594, 2021.
|
| 310 |
+
Ananya Harsh Jha, Dirk Groeneveld, Emma Strubell, and Iz Beltagy. Large language model distillation doesn't need a teacher. arXiv preprint arXiv:2305.14864, 2023.
|
| 311 |
+
Hassan Sajjad, Fahim Dalvi, Nadir Durrani, and Preslav Nakov. On the effect of dropping layers of pre-trained transformer models. Computer Speech & Language, 77:101429, 2023.
|
| 312 |
+
Wei Liu, Zhiyuan Peng, and Tan Lee. Comflp: Correlation measure based fast search on asr layer pruning. arXiv preprint arXiv:2309.11768, 2023a.
|
| 313 |
+
Lu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang, Xiao Chen, and Qun Liu. Dynabert: Dynamic bert with adaptive width and depth. Advances in Neural Information Processing Systems, 33: 9782-9793, 2020.
|
| 314 |
+
Pratyusha Sharma, Jordan T Ash, and Dipendra Misra. The truth is in there: Improving reasoning in language models with layer-selective rank reduction. arXiv preprint arXiv:2312.13558, 2023.
|
| 315 |
+
Saleh Ashkboos, Maximilian L. Croci, Marcelo Gennari do Nascimento, Torsten Hoefler, and James Hensman. Slicingpt: Compress large language models by deleting rows and columns. arXiv preprint arXiv:2401.15024, 2024.
|
| 316 |
+
Mengzhou Xia, Zexuan Zhong, and Danqi Chen. Structured pruning learns compact and accurate models. arXiv preprint arXiv:2204.00408, 2022.
|
| 317 |
+
François Lagunas, Ella Charlaix, Victor Sanh, and Alexander M Rush. Block pruning for faster transformers. arXiv preprint arXiv:2109.04838, 2021.
|
| 318 |
+
Xin Men, Mingyu Xu, Qingyu Zhang, Bingning Wang, Hongyu Lin, Yaojie Lu, Xianpei Han, and Weipeng Chen. Shortgpt: Layers in large language models are more redundant than you expect. arXiv preprint arXiv:2403.03853, 2024.
|
| 319 |
+
Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023.
|
| 320 |
+
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. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023a.
|
| 321 |
+
Mojan Javaheripi and Sébastien Bubeck. Phi-2: The surprising power of small language models, Dec 2023.
|
| 322 |
+
Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. arXiv preprint arXiv:2305.14314, 2023.
|
| 323 |
+
|
| 324 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485-5551, 2020.
|
| 325 |
+
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020.
|
| 326 |
+
Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. arXiv preprint arXiv:1905.10044, 2019.
|
| 327 |
+
Rylan Schaeffer, Brando Miranda, and Sanmi Koyejo. Are emergent abilities of large language models a mirage? arXiv preprint arXiv:2304.15004, 2023.
|
| 328 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
|
| 329 |
+
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830, 2019.
|
| 330 |
+
Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A framework for few-shot language model evaluation, 12 2023. URL https://zenodo.org/records/10256836.
|
| 331 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53, 2024.
|
| 332 |
+
Mostafa Elhoushi, Akshit Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, et al. Layer skip: Enabling early exit inference and self-speculative decoding. arXiv preprint arXiv:2404.16710, 2024.
|
| 333 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
|
| 334 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 335 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. URL https://cdn.openai.com/better-language-models/language_models—are_unsupervisedMULTITASK_LEARNers.pdf
|
| 336 |
+
Qihuang Zhong, Liang Ding, Juhua Liu, Bo Du, and Dacheng Tao. Can chatgpt understand too? a comparative study on chatgpt and fine-tuned bert. arXiv preprint arXiv:2302.10198, 2023.
|
| 337 |
+
Kawin Ethayarajh. How contextual are contextualized word representations? comparing the geometry of bert, elmo, and gpt-2 embeddings. arXiv preprint arXiv:1909.00512, 2019.
|
| 338 |
+
Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in neural information processing systems, 33:12449-12460, 2020.
|
| 339 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 340 |
+
Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. Knowledge distillation of large language models. arXiv preprint arXiv:2306.08543, 2023.
|
| 341 |
+
|
| 342 |
+
Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019.
|
| 343 |
+
Shuohang Wang, Yang Liu, Yichong Xu, Chenguang Zhu, and Michael Zeng. Want to reduce labeling cost? gpt-3 can help. arXiv preprint arXiv:2108.13487, 2021.
|
| 344 |
+
Ronen Eldan and Yuanzhi Li. Tinystories: How small can language models be and still speak coherent english? arXiv preprint arXiv:2305.07759, 2023.
|
| 345 |
+
Yuanzhi Li, Sebastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, and Yin Tat Lee. Textbooks are all you need ii: phi-1.5 technical report. arXiv preprint arXiv:2309.05463, 2023a.
|
| 346 |
+
Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio Cesar Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, et al. Textbooks are all you need. arXiv preprint arXiv:2306.11644, 2023.
|
| 347 |
+
Yao Fu, Hao Peng, Litu Ou, Ashish Sabharwal, and Tushar Khot. Specializing smaller language models towards multi-step reasoning. arXiv preprint arXiv:2301.12726, 2023.
|
| 348 |
+
Cheng-Yu Hsieh, Chun-Liang Li, Chih-Kuan Yeh, Hootan Nakhost, Yasuhisa Fujii, Alexander Ratner, Ranjay Krishna, Chen-Yu Lee, and Tomas Pfister. Distilling step-by-step! outperforming larger language models with less training data and smaller model sizes. arXiv preprint arXiv:2305.02301, 2023.
|
| 349 |
+
Yuxin Jiang, Chunkit Chan, Mingyang Chen, and Wei Wang. Lion: Adversarial distillation of closed-source large language model. arXiv preprint arXiv:2305.12870, 2023b.
|
| 350 |
+
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
|
| 351 |
+
Yixiao Li, Yifan Yu, Chen Liang, Pengcheng He, Nikos Karampatziakis, Weizhu Chen, and Tuo Zhao. Loftq: Lora-fine-tuning-aware quantization for large language models. arXiv preprint arXiv:2310.08659, 2023b.
|
| 352 |
+
Qingru Zhang, Minshuo Chen, Alexander Bukharin, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. Adaptive budget allocation for parameter-efficient fine-tuning. arXiv preprint arXiv:2303.10512, 2023.
|
| 353 |
+
Yaniv Leviathan, Matan Kalman, and Yossi Matias. Fast inference from transformers via speculative decoding. In International Conference on Machine Learning, pages 19274-19286. PMLR, 2023.
|
| 354 |
+
Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D Lee, Deming Chen, and Tri Dao. Medusa: Simple llm inference acceleration framework with multiple decoding heads. arXiv preprint arXiv:2401.10774, 2024.
|
| 355 |
+
Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt. Advances in Neural Information Processing Systems, 35:17359-17372, 2022.
|
| 356 |
+
Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. arXiv preprint arXiv:2104.08696, 2021.
|
| 357 |
+
Peter Hase, Mohit Bansal, Been Kim, and Asma Ghandeharioun. Does localization inform editing? surprising differences in causality-based localization vs. knowledge editing in language models. arXiv preprint arXiv:2301.04213, 2023.
|
| 358 |
+
Mor Geva, Jasmijn Bastings, Katja Filippova, and Amir Globerson. Dissecting recall of factual associations in auto-regressive language models. arXiv preprint arXiv:2304.14767, 2023.
|
| 359 |
+
Alexander Yom Din, Taelin Karidi, Leshem Choshen, and Mor Geva. Jump to conclusions: Short-cutting transformers with linear transformations. arXiv preprint arXiv:2303.09435, 2023.
|
| 360 |
+
Wes Gurnee and Max Tegmark. Language models represent space and time. arXiv preprint arXiv:2310.02207, 2023.
|
| 361 |
+
|
| 362 |
+
Elena Voita, Javier Ferrando, and Christoforos Nalmpantis. Neurons in large language models: Dead, n-gram, positional. arXiv preprint arXiv:2309.04827, 2023.
|
| 363 |
+
Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Re, et al. Deja vu: Contextual sparsity for efficient llms at inference time. In International Conference on Machine Learning, pages 22137-22176. PMLR, 2023b.
|
| 364 |
+
Abhishek Panigrahi, Nikunj Saunshi, Haoyu Zhao, and Sanjeev Arora. Task-specific skill localization in fine-tuned language models. arXiv preprint arXiv:2302.06600, 2023.
|
| 365 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierrick Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online, October 2020. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/2020-emnlp-demos.6
|
| 366 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints, 2019.
|
| 367 |
+
Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, Sayak Paul, and Benjamin Bossan. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/huggingface/peft, 2022.
|
| 368 |
+
Ariel N Lee, Cole J Hunter, and Nataniel Ruiz. Platypus: Quick, cheap, and powerful refinement of llms. arXiv preprint arXiv:2308.07317, 2023.
|
| 369 |
+
Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. Llm. int8(): 8-bit matrix multiplication for transformers at scale. arXiv preprint arXiv:2208.07339, 2022.
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:baba5d521667a216f0607f494675a3c3cabce9aa366846cb39800d6c438c95e8
|
| 3 |
+
size 530260
|
2025/The Unreasonable Ineffectiveness of the Deeper Layers/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/9dd372a3-62c5-4f0d-89da-a56cfdf7f7d1_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd5383ce756764da17e3d8e88817fff5645866b6e24a7e96623d1e9b9b47f7bf
|
| 3 |
+
size 726282
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:593dfca8d13a089eefcab129082bfada104ee537db10841db741b9adb3370f3f
|
| 3 |
+
size 1321661
|
2025/The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The Value of Sensory Information to a Robot/67a5244f-829c-4eb5-88e1-6e31e060ff61_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:421021d167f14d5e1ecba2f356f43aad6c89648afc506e8ffd069a2d77e7998a
|
| 3 |
+
size 8320822
|
2025/The Value of Sensory Information to a Robot/full.md
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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| 19 |
+
A decision-making agent, such as a robot, must observe and react to any new task-relevant information that becomes available from its environment. We seek to study a fundamental scientific question: what value does sensory information hold to an agent at various moments in time during the execution of a task? Towards this, we empirically study agents of varying architectures, generated with varying policy synthesis approaches (imitation, RL, model-based control), on diverse robotics tasks. For each robotic agent, we characterize its regret in terms of performance degradation when state observations are withheld from it at various task states for varying lengths of time. We find that sensory information is surprisingly rarely task-critical in many commonly studied task setups. Task characteristics such as stochastic dynamics largely dictate the value of sensory information for a well-trained robot; policy architectures such as planning vs. reactive control generate more nuanced second-order effects. Further, sensing efficiency is curiously correlated with task proficiency: in particular, fully trained high-performing agents are more robust to sensor loss than novice agents early in their training. Overall, our findings characterize the tradeoffs between sensory information and task performance in practical sequential decision making tasks, and pave the way towards the design of more resource-efficient decision-making agents. Appendices, videos, and more at https://sites.google.com/view/vosi-robotics/
|
| 20 |
+
|
| 21 |
+
# 1 INTRODUCTION
|
| 22 |
+
|
| 23 |
+
Over time, as a robot moves, information emerges in its environment (e.g. an occlusion is removed and a new object becomes visible, or a pair of dice settles on an outcome), some of it is captured by the robot's sensors, and the robot then acts on this information. Any information not acquired at sensing is lost to all downstream decision-making computations, and perhaps for this reason, it is often taken for granted during the design of a robot that more sensing always improves task performance. However, sensing is not always an asset (Mason, 1993; Erdmann & Mason, 1988). Sensing and the processing of sensed information entail the use of several key resources in robotics: computation latency, power, controller complexity, and by extension for learning robots, training data. Even discounting these resource costs, over-sensing can still hurt task performance by causing fragile robot behaviors that respond to task-irrelevant sensed details in the environment (Mason, 1993).
|
| 24 |
+
|
| 25 |
+
Understanding the relationship between the sensing setup (how much information is sensed, what is sensed, quality, timing, latency etc.) and the performance of a downstream policy is an important scientific problem in robotics and more broadly, all of sequential decision-making (Donald, 1995; LaValle, 2019; Tishby & Polani, 2010; Koditschek, 2021; Xu et al., 2021; Majumdar et al., 2023). In this paper, we first propose a novel approach to empirically study one slice of this question: at what instances along the robot's trajectory does environment feedback reveal valuable information? In particular, we assume a fixed policy and a simulated perfect sensor that instantaneously reveals the full Markov state of the environment. In this setting, our approach (Section 5) characterizes: at what moments did access to the sensed information critically improve the robot's actions? We study several benchmark tasks spanning varying robot morphologies, and diverse policy synthesis approaches, particularly focusing on state-of-the-art imitation and reinforcement learning techniques. Our analysis yields several interesting findings, of which we highlight a select few here. In most tasks, sensing only improves agent actions significantly at some rare moments during task execution. Further, the reliance on environment feedback is similar for high-performing policies synthesized
|
| 26 |
+
|
| 27 |
+
through very different techniques and represented with very different architectures. Finally, and rather counter-intuitively, policy performance is inversely correlated with sensor dependency. Well-trained policies respond to sensed information much less frequently. We summarize our contributions below:
|
| 28 |
+
|
| 29 |
+
- We propose a novel approach to quantify the value of sensory information (VoSI) in complex task setups focusing on environments with perfect sensing and deterministic dynamics.
|
| 30 |
+
- With VoSI as a probing tool, we systematically analyze diverse robotics-inspired tasks and state-of-the-art lookahead policies, revealing novel insights into the role of sensing.
|
| 31 |
+
- While these robotic settings largely feature deterministic dynamics and perfect sensing, we also validate VoSI in more toy tasks with stochastic dynamics and model or sensing noise.
|
| 32 |
+
- We highlight the potential of VoSI for enabling efficient policy execution by demonstrating how to construct a policy that only senses at key sensing moments.
|
| 33 |
+
|
| 34 |
+
# 2 RELATED WORK
|
| 35 |
+
|
| 36 |
+
Information Parsimony through Constrained Optimization. Agents in the real world often incur significant costs in acquiring and processing sensory information. The trade-off between maximizing task-performance and minimizing associated sensing costs has motivated extensive work on synthesizing efficient controllers under resource constraints. Hansen et al. (1996) ascribe a fixed cost to any sensing action and learn to optimize when to sense along with maximizing a task objective in discrete MDPs. Recently, Treven et al. (2024); Holt et al. (2024) associate constraints with the number of interactions in continuous time control settings. Tishby & Polani (2010); Eysenbach et al. (2021); Lu et al. (2023) propose associating a cost with the bits of information inferred from observations without any direct constraints on sensing itself. In control theory, the event-triggered formalism (Astrom, 2008) enables the design of controllers that process full-state information only when some coarsely sensed deviations are observed, thereby reducing the computational overhead. These works set up specific models for the resource costs entailed by sensing, and aim to generate good task policies under constraints on those costs. Complementing these approaches, we instead build a general tool to understand the sensory requirements for a fixed task performance behavior, as represented in a frozen controller. We do this by setting up and measuring the "value of sensory information". Our notions of task value are pertinent for efficient execution of that behavior under any resource cost models and constraints, when the robot looks to act efficiently. We show that our approach reveals interesting insights into the properties of lookahead-policies on challenging tasks.
|
| 37 |
+
|
| 38 |
+
Value of Information (VoI) For Sequential Decision Making Agents. Howard (1966) first described the "value of information" (VoI) towards decision making, placing a value on the reduction of uncertainty about various random variables relevant to a task. Inspired by this highly influential framework, we propose to measure the "value of sensory information" for a sequential decision making agent, to assign values to sensory measurements made at various moments in time. We are not, however, the first to apply VoI-related ideas in control. Notably, Flaspohler et al. (2020) build on VoI to synthesize near-optimal model-based planners for PoMDPs: they construct open loop "macro actions" that significantly reduce the planning complexity. Their macro-actions represent a restriction of the mixed loop policy executions that we study. Further, their experimental validation is restricted to stylized simple environments. Majumdar et al. (2023) characterize the task-relevant information potential of sensed information and provide fundamental bounds on the performance achievable by any sensor-based policy. This characterization requires environments that can be expressed in simple analytic forms or that are tractable for sampling based assessments (requiring finite actions and short task horizon), and this is reflected in their experiments. Further, they do not offer insights on when to sense. In this work, we propose a novel empirical analysis approach that can be applied to much more complex environments and policy representations than these prior works. Through it, we study state-of-the-art robotic policy architectures, on standard benchmark tasks in the robot learning literature, revealing insights about the value of sensory information to an agent.
|
| 39 |
+
|
| 40 |
+
# 3 SETUP AND NOTATION
|
| 41 |
+
|
| 42 |
+
We model the environment as a controlled Markov Process $(S, A, \mu, \mathcal{P})$ , where $S$ is the set of states $s$ , $A$ is the set of control actions $a$ available to a robot, $\mu$ is the distribution of start states, and
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
Figure 1: Illustration of a mixed loop (MixL) execution of a look-ahead policy $\pi$ . At state $s_0$ , the agent executes the open loop action plan $a_{0:3} \sim \pi_{0:3}(s_0)$ for the next $h = 3$ steps. Over this open loop execution, uncertainty accrues due to stochastic dynamics and/or an imperfect environment model, that is then resolved when the agent senses the state at $t = 3$ .
|
| 46 |
+
|
| 47 |
+
$\mathcal{P}(s_{t + 1}|s_t,a_t)$ is the transition probability distribution specifying how the environment state $s_t$ at time $t$ evolves in response to a robot action decision $a_t$ . We consider two common modes of "task specification". The first is imitation learning, where the agent must mimic expert actions closely. The second is reinforcement learning, where a reward function $r_t = r(s_t,a_t)$ specifies feedback, and the agent must maximize (undiscounted) cumulative rewards $\mathbb{E}_{\mathcal{P}}[\sum_{t = 0}^{T}r(s_{t},a_{t})]$ .
|
| 48 |
+
|
| 49 |
+
Look-Ahead Policies. For our analysis, we consider the popular class of "look-ahead" policies $\pi : S \to A^n$ that, after observing the current state $s_t$ , prescribe not just the immediate action $a_t$ , but an $n$ -step "chunk" of future actions $\pi(a_{t:t+n}|s_t)$ . This is a common feature in recently popular imitation learning architectures such as diffusion policy (Chi et al., 2023), as well as popular planning-based approaches such as the model-based RL architecture TD-MPC2 (Hansen et al., 2023).
|
| 50 |
+
|
| 51 |
+
Mixed Loop and Fixed-Rate Execution. Crucially for our analysis, such look-ahead policies permit execution in a "mixed loop mode". At any given state $s_t$ , the agent can commit to executing any $h \leq n$ steps of the action chunk $a_{t:t + h}$ in an open loop manner. At time $t + h$ , the loop is closed by sensing and reacting to $s_{t + h}$ (see Figure 1). Fixing $h = 1$ corresponds to closed loop execution. Popular look-ahead policies often reduce resource usage for on-robot execution by sensing and acting periodically with fixed "execution period" $h > 1$ to reduce resource usage (Chi et al., 2023). In other words, the agent forgoes sensory information between times $t$ and $t + h$ .<sup>1</sup> We call this "fixed-rate" mixed loop execution. More generally, $h < n$ need not be fixed. We denote the distribution of actions for $h$ timesteps conditioned on observing $s_t$ as $a_{t:t + h} \sim \pi_{0:h}(\cdot | s_t)$ .
|
| 52 |
+
|
| 53 |
+
# 4 HOW FREQUENTLY DO AGENTS NEED TO SENSE?
|
| 54 |
+
|
| 55 |
+
Our efforts to study the value of sensory information start by envisioning a robotic agent that is provided with a look-ahead policy $\pi : S \to A^n$ , synthesized by any means of our choice e.g., model-based control, imitation learning, or reinforcement learning. It must then decide "how to execute" this policy starting from some state $s_0$ , in particular, whether to "sense" or "not" at each time instant $t = 1, 2, \ldots$ . As motivated in the introduction, each "sense" decision carries resource costs to real agents. However, for most of our investigation, rather than set specific resource costs, we instead study how much positive value in terms of task performance improvements each instant of sensory information brings to the agent to offset any potential resource costs.
|
| 56 |
+
|
| 57 |
+
Mixed loop execution with lookahead policies enables us to empirically study the impact of forgoing sensing at any time(s) on the performance of the policy $\pi$ . In the general mixed loop setting, for a time duration $T$ starting at a sensed state $s_0$ , there are $2^T$ possible executions, including fully closed loop (sense at each moment) and fully open loop (never sense), amongst which our agent must choose. For this first experiment, we restrict our attention to the simpler class of fixed-rate mixed loop executions with varying execution period $h$ , to arrive at an approximate understanding of the relationship between the sensing budget (as reflected in the sensing rate $1 / h$ ), and task performance.
|
| 58 |
+
|
| 59 |
+
We study 7 diverse robotic tasks, depicted in Figure 2, sourced from DM-control (Tassa et al., 2018), Robosuite (Zhu et al., 2020; Mandlekar et al., 2023), and the Push-T task (adopted from Chi et al. (2023)). The DM-Control tasks involve dynamic behaviors with varied robots and action spaces, like swinging up a cartpole, catching a ball in an actuated cup, and spinning a wheel at high angular
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 2: The seven robotic tasks considered in our analyses.
|
| 63 |
+
|
| 64 |
+
velocity with an actuated 2-jointed finger. Robosuite is a popular robot learning benchmark for static tabletop object manipulation tasks: we study square-nut: picking up and placing a square nut around a square peg, coffee-pod: placing a coffee pod into a coffee machine slot, and threading: a high-precision task involving threading a thin needle through a small hole on a light movable platform. Finally, Push-T is a stylized 2D non-prehensile manipulation task that involves complex contact dynamics between a cylindrical end-effector (projected to a circle) and a T-shaped object that must be pushed into a target configuration.
|
| 65 |
+
|
| 66 |
+
For each task, we train state-based lookahead-policies with TD-MPC2 (Hansen et al., 2023) and DiffusionPolicy (DP) (Chi et al., 2023), which represent the state of the art in model-based RL and imitation respectively. TD-MPC2 failed to produce effective policies on the Robosuite manipulation tasks, and DP failed on finger-spin and cup-catch tasks. We study the other policies, which all performed well. More details of training setup and data-collection are provided in Appendix A.
|
| 67 |
+
|
| 68 |
+
Figure 3 plots the best mean reward with $95\%$ confidence intervals i.e. lowest regret achieved by fixed-rate mixed loop executions as the budget varies. "Normalized regret" is measured as a fraction of the mean closed loop execution reward, which is always positive in our tasks. There are several outstanding trends: most task policies in our study perform just as well as closed loop ( $\approx 0$ normalized regret), even when executed once every 5 steps. The three Robosuite tasks are remarkable: for all these manipulation tasks, policy performance does not deteriorate substantially even when sensing happens only once, at the beginning of each trajectory. We refer to such "one-time-sensing" execution as "open loop" in this paper. This surprising effectiveness of open loop executions is in line with observations made in recent works Dasari et al. (2022); Raffin et al. (2023); Wang et al. (2024) for other standard robot learning benchmark tasks. Two tasks DM-control swingup and Push-T afford comparing TD-MPC2 and DP policies. Trends are largely similar for the two: on Push-T, TD-MPC2 appears to be slightly more robust (lower regret) to reduced sensing. Finally, cup-catch, finger-spin and Push-T all show smoothly accelerating regret as the sensing rate decreases.
|
| 69 |
+
|
| 70 |
+
A Note On Regret Profiles and Task Complexities. Each task's regret profile may also be interpreted as a measure of its "sensory complexity": low regrets indicate low sensory complexity. By this measure, the tasks in order of difficulty are: coffee-pod ≈ square-nut ≈ threading < swingup < cup-catch < finger-spin ≈ Push-T. There is thus also quite a clear complexity ordering among task suites: Robosuite < DM-control < Push-T. Speculating a little, robot learning benchmarks for manipulation as represented by these three Robosuite tasks may be outliers in terms of how little sensing / perceptual capabilities they require.
|
| 71 |
+
|
| 72 |
+
# 4.1 WHICH CONDITIONS NECESSITATE SENSING?
|
| 73 |
+
|
| 74 |
+
To appropriately interpret these task regret profiles, we now analyze how task characteristics and policy architectures drive policy performance under reduced sensing.
|
| 75 |
+
|
| 76 |
+
The Sensing Needs of Optimal Infinitely Expressive Policies. Sensing has value to an agent to the extent that it delivers information that the agent does not already know, or more explicitly, what the agent could not have predicted without sensing. Let us consider how a particular observation $s_t$ can be informative to an optimal policy $\pi^*$ , without limitations on its expressivity or capacity. Observe that we can construct one such optimal $\pi^*$ that operates by optimizing future actions $a_{t:T}$ through the true environment transition function $P(s'|s,a)$ , either learned or manually specified. Now, if an agent operating with $\pi^*$ knows the current state $s_t$ , then its uncertainty about $s_{t+1}$ is the entropy of the
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 3: Task regret profiles on our 7 main tasks. Plots demonstrating what fraction of closed loop policy returns are lost ("normalized regret") when a policy is instead run in fixed-rate mixed loop mode. We group the tasks into DM-control (left), Robosuite (middle), and Push-T (right).
|
| 80 |
+
|
| 81 |
+

|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 4: Task regret profiles on our toy four-rooms task (left) illustrate how stochastic dynamics (middle) and dynamics model error (right) necessitate more sensing.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
|
| 90 |
+
transition distribution: $H(s_{t + 1}) = -\sum_{s'}P(s'|s_t,a_t)\log P(s'|s_t,a_t)$ . In other words, sensing $s_{t + 1}$ delivers $H(s_{t + 1})$ bits of information. It follows that the task-relevant information value of sensing $s_{t + 1}$ is bounded as $H_{tr}(s_{t + 1}) < H(s_{t + 1})$ . If the dynamics $P(s'|s,a)$ are always deterministic, then $H(s_{t + 1}) = 0$ : there is no value to sensing $s_{t + 1}$ , or by induction, any future states. This is intuitive: $\pi^*$ can precisely simulate $s_{t + 1}$ ; and can therefore act optimally without ever needing to actually sense the environment.
|
| 91 |
+
|
| 92 |
+
Thus, there is at least one task-optimal policy $\pi^{*}$ that can operate "open loop" (i.e., sensing only at $t = 0$ ) when sensing is perfect and dynamics are deterministic. A corollary of this result is that if the task reward includes any non-zero cost $c > 0$ associated with sensing, then $\pi^{*}$ must be open loop.
|
| 93 |
+
|
| 94 |
+
To illustrate, consider a simple 11x11 four-rooms discrete grid-world task where a robot is tasked to reach and stay at a fixed goal location starting from anywhere (see Figure 4). The robot has one stay-in-place action and 4 directional actions, and gets a sparse reward of 1 when it reaches the goal. We assume perfect sensing in all environments in this work, but we now introduce stochastic dynamics in four-rooms: an action other than the desired command $a$ is executed at random with probability $p$ . We obtain a task-optimal model-based agent $(\pi^{*},\hat{P}^{*} = P)$ for each environment, and compute similar sensory-regret profiles for fixed-rate mixed loop executors of agents across different levels of stochasticity $(p)$ . Observe that an optimal agent gains no additional value from sensing after the first timestep under deterministic environment dynamics $(p = 0)$ and that the value gain from sensing (performance regret) is correlated with the level of stochasticity.
|
| 95 |
+
|
| 96 |
+
How Finite Expressivity Influences Sensing Needs: Complexity $\leftrightarrow$ Uncertainty. Our 7 simulated robotic tasks above have perfect sensing and deterministic dynamics, as in most robotic benchmark tasks. Why then do agents still perform worse when they can't sense and react to environment states? We argue that for "finite policies" (e.g. finite in expressivity or training data), complexity plays a similar role to stochasticity in the above analysis. Intuitively, finite policies struggle to simulate complex dynamics, such as of a ball bouncing off a rocky forest floor, or of a swimmer swimming through a perturbed river stream. This also applies to complexity in sensing or actuation: provided with a perfect high-resolution 3-D map of the forest floor or a flow field of the river stream, finite policies may not successfully process such observations into the task-relevant state. To see this in
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 5: Task regret profiles on two tasks, showing how increasing policy competency affects sensing needs, through (left) various training stages, and (right) various model capacities.
|
| 100 |
+
|
| 101 |
+
our grid-world family, consider agents on a deterministic grid, but with different levels of model error $\epsilon$ , such that $D_{\mathrm{KL}}(P,\hat{P}) = \epsilon \forall (s,a)$ , simulating the implications of finite expressivity (see Appendix B for more details on how $\hat{P}$ is generated). As Figure 4 shows, these model errors generate similar regret profiles to true environment stochasticity above. On the robotic benchmark tasks finger-spin and Push-T we explore the implications of finite training data and model-capacity by evaluating the task regret profiles of fixed-rate mixed loop executors of TD-MPC2 agent checkpoints at different stages of training: early (beginner), middle (novice), and latest (expert) and different representation capacities (modulated by the size of the latent dimensions of the MLP) in Figure 5 (details of the experiment design in Appendix A.1.1). In line with the arguments above, agents with higher model capacity or those exposed to more training data appear to degrade less at lower sensing rates. Note that the relative drop in performance requires some interpretation in the context of the reward function and absolute returns attained – we discuss this in Appendix F.
|
| 102 |
+
|
| 103 |
+
# 5 WHEN SHOULD AN AGENT SENSE?
|
| 104 |
+
|
| 105 |
+
We have interpreted the regret plots of Figure 3 as coarsely profiling the importance of sensory information in a task. However, those experiments only considered fixed-rate mixed loop policies and studied the impact of a fixed sensing frequency on task performance. They do not support finer-grained questions about the moments in time at which sensing is more valuable or less valuable. For example, in the push-T task, where contact dynamics only come into play when the end-effector is near the T, states at the beginning of an episode as the end-effector moves to the T might not require closed loop execution (as we will show later in Figure 8). We now build on from the methodology of Section 4 to permit such detailed analysis.
|
| 106 |
+
|
| 107 |
+
The Value of Sensory Information (VoSI). Having sensed the state $s_t$ of the world at time $t$ , we seek to understand how much task-relevant value an agent loses by choosing to not sense the state of the world for $h$ timesteps compared to operating closed loop. To empirically characterize this state-wise regret, let us first consider $\eta_{\mathrm{MixL}}(s_t, h)$ , a mixed loop "execution strategy" that observes state $s_t$ at time $t$ , then forgoes sensing for the next $h$ steps, and operates closed loop forever after. This strategy $\eta_{\mathrm{MixL}}(s_t, h)$ induces a distribution over trajectories $\tau_{\mathrm{MixL}}(s_t, h)$ of episode length $T$ . For convenience, we denote the distribution induced by closed loop control $(h = 0)$ as
|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 6: $\tau_{\mathrm{MixL}}(s_0,h)$ and $\tau_{\mathrm{CL}}(s_0)$ for four-rooms.
|
| 111 |
+
|
| 112 |
+
$\tau_{\mathrm{CL}}(s_t) \coloneqq \tau_{\mathrm{MixL}}(s_t, 0)$ . Some $\tau_{\mathrm{CL}}$ and $\tau_{\mathrm{MixL}}$ trajectories are visualized in Figure 6 for four-rooms with stochastic dynamics. The open loop phase of $\tau_{\mathrm{MixL}}$ trajectories are depicted in gray, and the closed loop phase that follows, in green.
|
| 113 |
+
|
| 114 |
+
The idea is simple: $\tau_{\mathrm{MixL}}$ represents the best behaviors when sensing is withheld over the window $(t, t + h]$ , and $\tau_{\mathrm{CL}}$ in turn represents the best behaviors without any sensing restrictions. Thus, any deterioration in task performance from $\tau_{\mathrm{CL}}$ to $\tau_{\mathrm{MixL}}$ may be attributed to task-relevant sensory information lost during $(t, t + h]$ , and a measure of that deterioration also serves to quantify the "value of sensory information" (VoSI) in that window. When a reward function is available, as in our
|
| 115 |
+
|
| 116 |
+
tasks, an obvious choice of a task-relevant deterioration measure is the loss of rewards of the mixed loop execution relative to a closed loop execution, until the end of the episode. Thus the VoSI is:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\operatorname {V o S I} (s, h) := \underset {\tau_ {\mathrm {C L}} (s)} {\mathbb {E}} \left[ \sum_ {t = 0} ^ {T} r _ {t} \right] - \underset {\tau_ {\mathrm {M i x L}} (s, h)} {\mathbb {E}} \left[ \sum_ {t = 0} ^ {T} r _ {t} \right]. \tag {1}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
This is closely related to the task-level regret profiles analysis of Section 4. When measured for a fixed state $s$ , with increasing $h$ , VoSI $(s, h = [1,2,\dots])$ represents a kind of state-wise regret profile: it measures how task performance degrades when acting open loop starting from $s$ for increasing durations of time. We call these VoSI profiles. Later, we will define and compare other alternative measures of deterioration from $\tau_{\mathrm{CL}}$ to $\tau_{\mathrm{MixL}}$ , to plug into VoSI computation in specific settings, such as when no reward is available.
|
| 123 |
+
|
| 124 |
+
Before moving on to further experiments using this measure of the value of sensory information, a note: recall from the beginning of Section 4 that our study is limited to an agent considering various "executions" of a frozen look-ahead policy $\pi$ , distinguished only by the moments in time when it is afforded access to sensory inputs $s_t$ . One practical issue in this evaluation is that the standard pre-trained look-ahead policies $\pi$ (such as TD-MPC2, DiffusionPolicy) are designed for closed loop performance, and would be operating out-of-distribution when executed in mixed loop mode. Thus $\tau_{\mathrm{MixL}}$ as defined above might produce erratic behaviors, and might not produce the best execution of $\pi$ subject to the constraint of not sensing within a time window. However, in our experiments, mixed loop $\tau_{\mathrm{MixL}}$ executions of these policies appear to hold up well enough to produce coherent and interpretable findings, and those findings themselves align with the expectations we arrive at through reasoning as in Section 4.1.
|
| 125 |
+
|
| 126 |
+
Implementing VoSI Profiles. We measure VoSI on all 7 tasks from Figure 2, for TD-MPC2 (DM-control, Push-T) and DP policies (Robosuite). In all cases, we first execute the policies closed loop starting from the task's initial state distribution, and then measure VoSI on states $s$ from these closed loop trajectories as follows. For each state $s$ , we first reset the simulator to that state, and then run mixed loop strategies $\eta_{\mathrm{MixL}}(s,h)$ with the open loop length $h$ varying from 1 to 100 steps. For each $h$ , we generate 5 full trajectories starting at $s$ and ending at episode termination (after $T$ steps). This permits a Monte Carlo estimate of the expectation over $\tau_{\mathrm{MixL}}(s,h)$ in the second term in Equation (1). For the expectation over $\tau_{\mathrm{CL}}$ in the first term, we similarly use 5 trajectory rollouts to estimate this quantity. These are expensive evaluations: for each state for which we compute VoSI, we must generate $100 \times 5 = 500$ trajectories. For DP which is computationally expensive to run, we restrict the analysis to interesting states, ignoring states where the arm is primarily moving in free space (details in Appendix A.3).
|
| 127 |
+
|
| 128 |
+
The Informative Shapes Of VoSI Profiles. Figure 7 presents a few representative VoSI profiles $\mathrm{VoSI}(s, h = [1, 2, \ldots])$ from across all tasks, sorted into three prototypical profile "shapes".
|
| 129 |
+
|
| 130 |
+
$\triangleright$ "Flat" VoSI profiles (Figure 7-1) occur when the agent derives very little value from sensing in $(t, t + h]$ even at high $h$ . In other words, having sensed the state at $t$ , the agent can operate without sensing, losing nearly no task reward. In Robosuite, as suggested earlier by the task regret profiles of Figure 3, VoSI profiles are surprisingly flat even during object interactions (see e.g. Figure 7-1g). On DM-control and Push-T, VoSI profiles usually only become "flat" after the task goal is effectively achieved (e.g. the T is already in place in Push-T, see Figure 7-1e), and the agent does not need to do much other than wait for episode termination. For swingup, VoSI profiles are flat both near the starting states where the dynamic swing action must be initiated (Figure 7-1b), and more surprisingly, even in the upright phase (Figure 7-1c) up to about 70 steps ( $\approx$ 0.7 seconds). Figure 8-1 offers some insight on this latter case: closed and open loop trajectories ( $\tau_{\mathrm{CL}}$ and $\tau_{\mathrm{MixL}}$ ) look remarkably alike, because good policies barely actuate the cartpole base in the upright phase.
|
| 131 |
+
|
| 132 |
+
▶ "Gradual" VoSI profiles (Figure 7-2) involve steadily accruing VoSI as the window length $h$ increases, suggesting that the task-relevant value of sensing grows steadily with the delay in acquiring new information. Sustained and repetitive contacts as in Push-T and finger-spin (Figure 7-2a-e) often induce this VoSI prototype. This is understandable: contact is hard to model precisely, so the true realizations of contact dynamics as represented in sensed states always resolve some ambiguity when available. Figure 8-2 zooms into the Push-T state in (Figure 7-2e): over the course of a push, small missteps from open loop execution cause steady drift from optimal trajectories. This requires extra recovery time when closed loop control resumes after $h$ steps, affecting task reward.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 7: VoSI profiles of states encountered in our experiments on 7 robotic tasks can be broadly sorted into three prototypical profile shapes, shown here as 1) flat, 2) gradual, and 3) stepped profiles.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 8: Time-aligned visualization of one closed loop trajectory $\tau_{\mathrm{CL}}(s_t)$ and the open loop phase of one mixed loop trajectory $\tau_{\mathrm{MixL}}(s_t,h)$ , starting from an initial state $s_t$ . The VoSI profile of $s_t$ is plotted on the left, and indicates a measurement of the task-relevant deviation between $\tau_{\mathrm{CL}}$ and $\tau_{\mathrm{MixL}}$ .
|
| 139 |
+
|
| 140 |
+
$\triangleright$ "Stepped" VoSI profiles (Figure 7-3) involve sharp increases at some values of $h$ followed by steady increases or flat stretches. These are indicative of phase changes in the task. For example, in cup-catch(Figure 7-3c-e), failing to closely track the ball's complex dynamics as it is dynamically
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 9: Visualization of all the VoSI profiles overlayed for four tasks.
|
| 144 |
+
|
| 145 |
+
thrown up can can make the difference between the ball landing in the cup, or instead colliding with its lip. Similarly, in swingup, not sensing during a short and dynamic phase can prevent the agent from correcting for overshoot or undershoot, causing sharp reward losses.
|
| 146 |
+
|
| 147 |
+
Finally, in Figure 9 we take a step back and overlay the VoSI profiles for all states encountered in $\tau_{\mathrm{CL}}$ executions on each task. These plots reveal information about characteristic VoSI profiles in each task. Further, the dark "gradual" and "stepped" curves in finger-spin and swingup correspond to frequently repeated states in these tasks involving periodic movements.
|
| 148 |
+
|
| 149 |
+
Observing VoSI Evolution Over Time. Our analysis above has focused on individual states sampled from across all tasks, but we now plot the evolution of VoSI profiles of states encountered in a closed loop rollout of the cup-catch task in Figure 10. Each column here corresponds to the VoSI for a specific time-step in the following manner: the x-axis corresponds to the time $t_1$ at which the VoSI profile $\mathrm{VoSI}(s_{t_1}, h)$ starts, and the y-axis represents absolute times $t_2 = t_1 + h$ at which the VoSI is evaluated. In other words, $(t_1, t_2)$ in the plot corresponds to $\mathrm{VoSI}(s_{t_1}, t_2 - t_1)$ . Each row of this visualization thus lines up the VoSI measurements for a future time instant $t'$ , from all past time instants $t < t'$ .
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 10: VoSI profiles over a trajectory.
|
| 153 |
+
|
| 154 |
+
This makes it possible to easily evaluate temporal consistency trends. For example, all states $t_1$ prior
|
| 155 |
+
|
| 156 |
+
to $t = 20$ largely "agreed" on the same VoSI values to assign all states. This consistency indicates that no task-relevant information was sensed during $0 < t < 20$ . Further, the large VoSI values assigned to futures beyond $t = 20$ at all times before that moment indicate a kind of event horizon. Sure enough, VoSI estimates at timesteps after $t = 20$ diverge from those before: the moment the agent had sensed at $t = 20$ , its value for sensing at all future moments dropped to 0. Rare critical information was observed at $t = 20$ . We overlay visualizations of the states at $t = 0, 20, 40$ over the plot: $t = 20$ represents a tipping point after which the ball is destined to fall into the cup, so that no further sensing is necessary. We provide more details and examples of such plots in Appendix E.
|
| 157 |
+
|
| 158 |
+
Reward-Free and Interaction-Free Measures of VoSI. As introduced in Equation (1), VoSI requires task rewards, and must be computed through additional interaction with the environment starting from each state. To make our analysis accessible outside of simulated RL benchmark tasks where these conditions can be easily met, we study two alternative implementations of VoSI, explained in detail in Appendix C. Briefly, the state disagreement VoSI-S measures the mean state-wise distance of mixed loop trajectories from closed loop trajectories. This requires no reward function, but still requires the execution of the mixed-loop trajectory. When no more interaction with the environment is possible, we propose the plan disagreement VoSI-P, which measures how much the look-ahead policy $\pi$ 's action plans formed at $s_t$ differ from actions executed in the closed loop.
|
| 159 |
+
|
| 160 |
+
Table 1 shows that these alternatives generally have high rank correlation with the reward loss-based VoSI from Equation (1) (VoSI-R). As we show in Appendix C.1, disagreements can often be traced down to some degen
|
| 161 |
+
|
| 162 |
+
<table><tr><td>correlation</td><td>swingup</td><td>cup-catch</td><td>finger-spin</td><td>push-T</td></tr><tr><td>ρ(VoSI-R, VoSI-S)</td><td>0.78</td><td>0.88*</td><td>0.98</td><td>0.53*</td></tr><tr><td>ρ(VoSI-R, VoSI-P)</td><td>0.54</td><td>0.18*</td><td>0.73</td><td>0.37*</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 1: Correlations between VoSI metrics.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 11: Visualization of task regrets profiles achieved for different scenarios on four-rooms by the fixed-rate mixed loop execution strategy and greedy strategy utilizing the state-wise VoSI profiles.
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
|
| 173 |
+
erate phases of a task, such as after the T is already at the target position in Push-T so we discount them from computing the correlation*. At this time, agent actions do not matter to task rewards (as measured in VoSI-R), but can generate potentially large action disagreements (VoSI-P).
|
| 174 |
+
|
| 175 |
+
Towards Synthesizing Efficient Execution Strategies. Our primary goals in this manuscript have been to develop a new toolkit to study foundational scientific questions in robotics and decision making, and get the first answers in some settings of practical interest. Answers to these questions have many potential practical uses, and we now showcase a simple implementation that is within reach given the extensive analyses above: synthesizing execution strategies for a look-ahead policy $\pi$ that are efficient efficient in terms of sensing and other entailed resource costs.
|
| 176 |
+
|
| 177 |
+
We present a simple greedy strategy that sets the open loop execution length $h = \eta_{\mathrm{greedy}}(s; (B, T))$ , where $s$ is the currently observed state, $B$ is the task regret budget (how much reward we are willing to lose relative to closed loop), $T$ is the remaining episode length. Starting after sensing the state $s_0$ at time $t = 0$ , $\eta_{\mathrm{greedy}}$ sets the largest horizon $h$ such that $\mathrm{VoSI}(s, h) < \frac{hB}{T}$ . It then decrements the budget $B$ and time $T$ by $\mathrm{VoSI}(s, h)$ and $h$ respectively (see Algorithm 1 for more details). Varying the initial budget available to $\eta_{\mathrm{greedy}}$ generates a family of execution profiles with varying degrees of parsimony (measured as the average sensing rate achieved). For evaluation, recall the task regret analysis in Figures 3 to 5, where we plotted the normalized regret vs. sensing rate of fixed rate executions with varying fixed $h$ . In Figure 11, we compare the $\eta_{\mathrm{greedy}}$ family against fixed rate executions on variations of the four-rooms task from Section 4.1. $\eta_{\mathrm{greedy}}$ effectively exploits VoSI to achieve better performance at most sensing rates than the naive fixed rate strategy. We compare the proposed strategy with a baseline that is designed to reduce sensing requirements in Appendix H.
|
| 178 |
+
|
| 179 |
+
# 6 DISCUSSION AND CONCLUSIONS
|
| 180 |
+
|
| 181 |
+
We have presented a framework to empirically investigate sensory requirements of sequential decision-making agents through a value of information-inspired lens. Our framework permits a first investigation of what sensory information matters and how much, to state of the art policy architectures, in representative robotic tasks. The insights here offer a first glimpse of the value of sensory information, and the efficiencies that understanding it can enable.
|
| 182 |
+
|
| 183 |
+
However, our empirical study is still only a small step towards understanding the sensory needs of robots. The VoSI framework in this paper is limited to a particular kind of robot: one that is provided with a pre-trained closed loop look-ahead policy $\pi$ , and is then charged with making decisions about when to sense such that the policy performance is not overly affected by the omitted sensory inputs. As such, while we might like to have insights on the value of sensory information based on the best possible behavior under each sensing pattern, our findings can only approximate this through what $\pi$ can achieve. Even beyond this, we have studied when robots need to sense their environments under the most generous assumptions on the task and sensing apparatus: largely deterministic environments except in a toy gridworld setting, and noise-free instantaneous actuation and sensing. In Appendices, we have included proof-of-concept examples of VoSI analyses: in a cartpole swingup task with noisy vision-based state estimation (Appendix I), and in a multi-sensory realistic quadruped climbing task (Appendix J). Future work could further widen the scope of real-world tasks for studying VoSI, and study how it can inform efficient policies.
|
| 184 |
+
|
| 185 |
+
# ACKNOWLEDGMENT
|
| 186 |
+
|
| 187 |
+
This research was supported in part by NSF CAREER Award 2239301, NSF Award 2331783, DARPA TIAMAT (HR00112490421), and a generous gift from AWS AI to the ASSET Center for Trustworthy AI at Penn Engineering. The authors would like to thank the members of the Perception, Action, & Learning group at Penn for the insightful discussions, and the ICLR reviewers for their valuable and constructive feedback.
|
| 188 |
+
|
| 189 |
+
# REFERENCES
|
| 190 |
+
|
| 191 |
+
Karl J Aström. Event based control. In Analysis and design of nonlinear control systems: In honor of Alberto Isidori, pp. 127-147. Springer, 2008. 2, 22
|
| 192 |
+
Karl Johan Åström and Bo Bernhardsson. Comparison of periodic and event based sampling for first-order stochastic systems. IFAC Proceedings Volumes, 32(2):5006-5011, 1999. 22
|
| 193 |
+
Xuxin Cheng, Kexin Shi, Ananye Agarwal, and Deepak Pathak. Extreme parkour with legged robots. In 2024 IEEE International Conference on Robotics and Automation (ICRA), pp. 11443-11450. IEEE, 2024. 28
|
| 194 |
+
Cheng Chi, Siyuan Feng, Yilun Du, Zhenjia Xu, Eric Cousineau, Benjamin Burchfiel, and Shuran Song. Diffusion policy: Visuomotor policy learning via action diffusion. arXiv preprint arXiv:2303.04137, 2023. 3, 4, 15
|
| 195 |
+
Sudeep Dasari, Jianren Wang, Joyce Hong, Shikhar Bahl, Yixin Lin, Austin Wang, Abitha Thankaraj, Karanbir Chahal, Berk Calli, Saurabh Gupta, et al. Rb2: Robotic manipulation benchmarking with a twist. arXiv preprint arXiv:2203.08098, 2022.4
|
| 196 |
+
Bruce Randall Donald. On information invariants in robotics. Artificial Intelligence, 72(1-2):217-304, 1995. 1, 22
|
| 197 |
+
Michael Erdmann. Understanding action and sensing by designing action-based sensors. The International journal of robotics research, 14(5):483-509, 1995. 22
|
| 198 |
+
Michael A Erdmann and Matthew T Mason. An exploration of sensorless manipulation. IEEE Journal on Robotics and Automation, 4(4):369-379, 1988. 1
|
| 199 |
+
Ben Eysenbach, Russ R Salakhutdinov, and Sergey Levine. Robust predictable control. Advances in Neural Information Processing Systems, 34:27813-27825, 2021. 2, 22
|
| 200 |
+
Genevieve Flaspohler, Nicholas A Roy, and John W Fisher III. Belief-dependent macro-action discovery in pomdpss using the value of information. Advances in Neural Information Processing Systems, 33:11108-11118, 2020. 2
|
| 201 |
+
Roy Fox and Naftali Tishby. Optimal selective attention in reactive agents. arXiv preprint arXiv:1512.08575, 2015. 23
|
| 202 |
+
Siddhant Haldar, Jyothish Pari, Anant Rai, and Lerrel Pinto. Teach a robot to fish: Versatile imitation from one minute of demonstrations. arXiv preprint arXiv:2303.01497, 2023. 18
|
| 203 |
+
Eric Hansen, Andrew Barto, and Shlomo Zilberstein. Reinforcement learning for mixed open-loop and closed-loop control. Advances in Neural Information Processing Systems, 9, 1996. 2
|
| 204 |
+
Nicklas Hansen, Hao Su, and Xiaolong Wang. Td-mpc2: Scalable, robust world models for continuous control. In The Twelfth International Conference on Learning Representations, 2023. 3, 4
|
| 205 |
+
Wilhelmus PMH Heemels, Karl Henrik Johansson, and Paulo Tabuada. An introduction to event-triggered and self-triggered control. In 2012 IEEE 51st IEEE conference on decision and control (cdc), pp. 3270-3285. IEEE, 2012. 22
|
| 206 |
+
Samuel Holt, Alihan Hüyük, and Mihaela van der Schaar. Active observing in continuous-time control. Advances in Neural Information Processing Systems, 36, 2024. 2
|
| 207 |
+
|
| 208 |
+
Ronald A Howard. Information value theory. IEEE Transactions on systems science and cybernetics, 2(1):22-26, 1966. 2
|
| 209 |
+
Daniel E Koditschek. What is robotics? why do we need it and how can we get it? Annual Review of Control, Robotics, and Autonomous Systems, 4:1-33, 2021. 1, 22
|
| 210 |
+
Ashish Kumar, Zipeng Fu, Deepak Pathak, and Jitendra Malik. Rma: Rapid motor adaptation for legged robots. arXiv preprint arXiv:2107.04034, 2021. 28
|
| 211 |
+
Steven M LaValle. Sensor lattices: structures for comparing information feedback. In 2019 12th International Workshop on Robot Motion and Control (RoMoCo), pp. 239-246. IEEE, 2019. 1, 22
|
| 212 |
+
Xiuyuan Lu, Benjamin Van Roy, Vikranth Dwaracherla, Morteza Ibrahimi, Ian Osband, Zheng Wen, et al. Reinforcement learning, bit by bit. Foundations and Trends® in Machine Learning, 16(6): 733-865, 2023. 2, 22, 23
|
| 213 |
+
Yicheng Luo, Zhengyao Jiang, Samuel Cohen, Edward Grefenstette, and Marc Peter Deisenroth. Optimal transport for offline imitation learning. arXiv preprint arXiv:2303.13971, 2023. 18
|
| 214 |
+
Bartosz Mačkowiak, Filip Matejka, and Mirko Wiederholt. Rational inattention: A review. Journal of Economic Literature, 61(1):226-273, 2023. 23
|
| 215 |
+
Anirudha Majumdar, Zhiting Mei, and Vincent Pacelli. Fundamental limits for sensor-based robot control. The International Journal of Robotics Research, 42(12):1051-1069, 2023. 1, 2
|
| 216 |
+
Ajay Mandlekar, Soroush Nasiriany, Bowen Wen, Iretiayo Akinola, Yashraj Narang, Linxi Fan, Yuke Zhu, and Dieter Fox. Mimicgen: A data generation system for scalable robot learning using human demonstrations. arXiv preprint arXiv:2310.17596, 2023. 3, 15
|
| 217 |
+
Matthew T Mason. Kicking the sensing habit. AI magazine, 14(1):58-59, 1993. 1
|
| 218 |
+
Grace McFassel and Dylan A Shell. Reactivity and statefulness: Action-based sensors, plans, and necessary state. The International Journal of Robotics Research, 42(6):385-411, 2023. 22
|
| 219 |
+
Antonin Raffin, Olivier Sigaud, Jens Kober, Alin Albu-Schäffer, João Silvário, and Freek Stulp. A simple open-loop baseline for reinforcement learning locomotion tasks. arXiv preprint arXiv:2310.05808, 2023.4
|
| 220 |
+
Christopher A Sims. Implications of rational inattention. Journal of monetary Economics, 50(3): 665-690, 2003. 23
|
| 221 |
+
Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdelmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.3
|
| 222 |
+
Naftali Tishby and Daniel Polani. Information theory of decisions and actions. In Perception-action cycle: Models, architectures, and hardware, pp. 601-636. Springer, 2010. 1, 2, 22, 23
|
| 223 |
+
Lenart Treven, Bhavya Sukhija, Yarden As, Florian Dörfler, and Andreas Krause. When to sense and control? a time-adaptive approach for continuous-time rl. arXiv preprint arXiv:2406.01163, 2024. 2
|
| 224 |
+
Sebastian Trimpe and Raffaello D'Andrea. An experimental demonstration of a distributed and event-based state estimation algorithm. IFAC Proceedings Volumes, 44(1):8811-8818, 2011. 22
|
| 225 |
+
Sander G Van Dijk, Daniel Polani, and Christopher L Nehaniv. Hierarchical behaviours: getting the most bang for your bit. In European Conference on Artificial Life, pp. 342-349. Springer, 2009. 23
|
| 226 |
+
Volodymyr Vasyutynskyy and Klaus Kabitzsch. Event-based control: Overview and generic model. In 2010 IEEE International Workshop on Factory Communication Systems Proceedings, pp. 271-279. IEEE, 2010. 22
|
| 227 |
+
Jun Wang, Ying Yuan, Haichuan Che, Haozhi Qi, Yi Ma, Jitendra Malik, and Xiaolong Wang. Lessons from learning to spin" pens". arXiv preprint arXiv:2407.18902, 2024. 4
|
| 228 |
+
|
| 229 |
+
Jingxi Xu, Bruce Lee, Nikolai Matni, and Dinesh Jayaraman. How are learned perception-based controllers impacted by the limits of robust control? In Learning for Dynamics and Control, pp. 954-966. PMLR, 2021. 1
|
| 230 |
+
Yulin Zhang and Dylan A Shell. Abstractions for computing all robotic sensors that suffice to solve a planning problem. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pp. 8469-8475. IEEE, 2020. 22
|
| 231 |
+
Yuke Zhu, Josiah Wong, Ajay Mandlekar, Roberto Martin-Martín, Abhishek Joshi, Soroush Nasiriany, and Yifeng Zhu. robosuite: A modular simulation framework and benchmark for robot learning. arXiv preprint arXiv:2009.12293, 2020. 3
|
| 232 |
+
|
| 233 |
+
# TABLE OF CONTENTS
|
| 234 |
+
|
| 235 |
+
- Appendix A: Appendices A.1 and A.2 outline the hyperparameters of the TD-MPC2 and DiffusionPolicy agents analyzed. Appendix A.3 provides details of the evaluation protocol for obtaining task-regret profiles and VoSI profiles.
|
| 236 |
+
- Appendix B : Describes the experimental setup for the four-rooms experiments providing a description of the procedure used to obtain inaccurate models for the analysis. The pseudocode for the proposed greedy strategy $\eta_{\text{greedy}}$ is provided in Algorithm 1.
|
| 237 |
+
- Appendix C: Describes the alternate reward-free and interaction-free measures of VoSI i.e. the state-disagreement (VoSI-S) and plan disagreement (VoSI-P).
|
| 238 |
+
- Appendix D: Provides a comparison of the two policy architectures (DiffusionPolicy and TD-MPC2) on swingup and Push-T tasks.
|
| 239 |
+
- Appendix E : Provides more details on the evolution of VoSI profiles over a trajectory Figures 9 and 10 and includes more examples.
|
| 240 |
+
- Appendix F: Discusses some nuances about the relative performance degradation metric when comparing agents with different closed loop performance.
|
| 241 |
+
- Appendix G: Extends the related works presented in the main paper (i.e. Section 2).
|
| 242 |
+
- Appendix H: Offers an "event-triggered control" based approach as a point of comparison for the VoSI-based greedy efficient execution strategy presented at the end of Section 5.
|
| 243 |
+
- Appendix I: Results of the VoSI analysis of an agent operating with noisy sensing on the swingup task.
|
| 244 |
+
- Appendix J: Results of the VoSI analysis on a realistic quadruped climb-crate task examining how staleness in depth information affects the policy's success rate.
|
| 245 |
+
|
| 246 |
+
# A SETUP AND HYPERPARAMETERS
|
| 247 |
+
|
| 248 |
+
We additionally encourage the reader to visit the project website at https://sites.google.com/view/vosi-robotics/ to view more task-specific details and explore visualizations that highlight different slices of the data beyond the ones presented in the main paper. The code used to conduct the experiments will be made available on the website.
|
| 249 |
+
|
| 250 |
+
# A.1 TD-MPC2
|
| 251 |
+
|
| 252 |
+
We use a JAX implementation of the TD-MPC2 algorithm and retain the default hyperparameters (listed in Table 2) associated with training the TD-MPC2 - except for the experiments with varying model-sizes for which we alter the hidden dimensions of the neural architecture. This reproduction closes matches and exceeds the performance of the original PyTorch implementation. We obtain performant TD-MPC2 checkpoints for the dense-reward DM-control suite tasks considered in 200K steps and the Push-T task was trained up to 2M steps with an additional modification of clipping the output actions to not move than 50 pixels in the PyMunk interface of the Push-T task to generate smooth motion profiles as the performant RL trajectories were used as seed data for training the Diffusion Policy representations on these tasks. TD-MPC2 failed to produce meaningful behavior on the robosite tasks potentially due the sparse reward nature of the task. To execute the TD-MPC2 agent in mixed-open loop manner we disable warm-starting the model-based search and just rely on the latest state observation and use the policy prior to seed the action plan search.
|
| 253 |
+
|
| 254 |
+
# A.1.1 CHECKPOINT SELECTION FOR MODEL-STAGE AND MODEL-SIZE EVALUATION
|
| 255 |
+
|
| 256 |
+
To test the hypothesis of how model finiteness and expressivity influence the sensing needs of a TD-MPC2 agent. We design two studies on the Push-T and finger-spin tasks: (1) select checkpoints at different stages of training (Table 3) (2) synthesize expert controllers starting from different representational capacities (keeping all other hyperparameters the same) (Table 4).
|
| 257 |
+
|
| 258 |
+
Table 2: Default hyperparameters of TD-MPC2 agent
|
| 259 |
+
|
| 260 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>encoder.layers</td><td>[256, 256]</td></tr><tr><td>encoder.lr</td><td>1e-4</td></tr><tr><td>world_model.mlp-dim</td><td>512</td></tr><tr><td>world_modellatent-dim</td><td>512</td></tr><tr><td>world_model.value-dropout</td><td>0.01</td></tr><tr><td>world_model.num-value-nets</td><td>5</td></tr><tr><td>world_model.num-bins</td><td>101</td></tr><tr><td>world_model.symlog-min</td><td>-10</td></tr><tr><td>world_model.symlog-max</td><td>10</td></tr><tr><td>world_model.lr</td><td>3e-4</td></tr><tr><td>world_model.max-grad-norm</td><td>20</td></tr><tr><td>mpc.horizon</td><td>3</td></tr><tr><td>mppi-iterations</td><td>6</td></tr><tr><td>population-size</td><td>512</td></tr><tr><td>num-elites</td><td>64</td></tr><tr><td>min-plan-standard</td><td>0.05</td></tr><tr><td>max-plan-standard</td><td>2</td></tr><tr><td>temperature</td><td>0.5</td></tr><tr><td>optim.warmstart</td><td>false</td></tr><tr><td>optim.batch-size</td><td>256</td></tr><tr><td>optim(discount</td><td>0.99</td></tr><tr><td>optim.rho</td><td>0.5</td></tr><tr><td>optim-consistency-coef</td><td>20</td></tr><tr><td>optim.reward-coef</td><td>0.1</td></tr><tr><td>optim.continue-coef</td><td>1.0</td></tr><tr><td>optim.value-coef</td><td>0.1</td></tr><tr><td>optim.entropy-coef</td><td>1e-4</td></tr><tr><td>optim.tau</td><td>0.01</td></tr></table>
|
| 261 |
+
|
| 262 |
+
Table 3: TD-MPC2 checkpoints selected for characterizing task-regret profiles at different stages of learning
|
| 263 |
+
|
| 264 |
+
<table><tr><td>Task</td><td>Level</td><td>Steps</td><td>Return</td></tr><tr><td rowspan="3">finger-spin</td><td>beginner</td><td>14K</td><td>44.37</td></tr><tr><td>novice</td><td>100K</td><td>117.39</td></tr><tr><td>expert</td><td>200K</td><td>133.25</td></tr><tr><td rowspan="3">Push-T</td><td>beginner</td><td>200K</td><td>25.62</td></tr><tr><td>novice</td><td>1M</td><td>58.53</td></tr><tr><td>expert</td><td>2M</td><td>66.59</td></tr></table>
|
| 265 |
+
|
| 266 |
+
# A.2 DIFFUION-POLICY (DP)
|
| 267 |
+
|
| 268 |
+
We use the code adopted from the official repository (Chi et al., 2023) for training U-Net based DP agents and retain most of the hyperparameters and configurations from the original repository to train policies on the state-based tasks (Table 5) – the only key difference is the extended prediction horizon lengths (close to the episode length) used for training, this was done in order to synthesize mixed loop executions with increasingly lower sensing rates. The Robosuite tasks are obtained from MimicGen repository (Mandlekar et al., 2023) as it came with over 200 high quality demos for each task square-nut, coffee-pod, and threading – all requiring some degree of precise insertion. The success rates over 100 rollouts on these tasks are reported in Table 6. On the DM-Control suite and Push-T task we train Diffusion Policy agents on the dataset of 200 trajectories from
|
| 269 |
+
|
| 270 |
+
Table 4: TD-MPC2 checkpoints selected for characterizing task-regret profiles at different model capacities
|
| 271 |
+
|
| 272 |
+
<table><tr><td>Task (Steps Trained)</td><td>Level</td><td>enc.mlp-dim</td><td>wm.mlp-dim</td><td>wmlatent-dim</td><td>Return</td></tr><tr><td rowspan="3">finger-spin (200K)</td><td>small</td><td>64</td><td>64</td><td>32</td><td>124.33</td></tr><tr><td>medium</td><td>128</td><td>256</td><td>128</td><td>136.74</td></tr><tr><td>large</td><td>512</td><td>1024</td><td>1024</td><td>137.92</td></tr><tr><td rowspan="3">Push-T (2M)</td><td>small</td><td>64</td><td>64</td><td>32</td><td>33.833</td></tr><tr><td>medium</td><td>128</td><td>256</td><td>128</td><td>70.063</td></tr><tr><td>large</td><td>512</td><td>1024</td><td>1024</td><td>73.704</td></tr></table>
|
| 273 |
+
|
| 274 |
+
closed loop execution of the performant TD-MPC2 policy and were able to synthesize meaningfully performant policies on swingup and Push-T but failed on finger-spin and cup-catch tasks. We suspect that the non-smooth nature of the control signals of RL-controllers used to supervise the imitation learning agent as potential reason for this, however note we did not perform an extensive hyperparameter search to try to synthesize the best policies. The issue of non-smooth target control signals for imitation is ameliorated in swingup with an explicit control cost penalty when training expert TD-MPC2 agents and on Push-T task with the actions constrained to generate smooth motions beneficial for imitation.
|
| 275 |
+
|
| 276 |
+
Table 5: Default hyperparameters of Diffusion Policy for a task of episode length $T$
|
| 277 |
+
|
| 278 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>input_embedding_dim</td><td>256</td></tr><tr><td>step_embedding_dim</td><td>256</td></tr><tr><td>encoder_layers</td><td>(512, 512)</td></tr><tr><td>unet_down_dims</td><td>(256, 512, 1024)</td></tr><tr><td>kernel_size</td><td>5</td></tr><tr><td>n_groups</td><td>8</td></tr><tr><td>num_diffusion_steps</td><td>100</td></tr><tr><td>ema_power</td><td>0.75</td></tr><tr><td>dim</td><td>256</td></tr><tr><td>num_demo</td><td>200</td></tr><tr><td>train_epochs</td><td>3000</td></tr><tr><td>batch_size</td><td>256</td></tr><tr><td>lr</td><td>1e-4</td></tr><tr><td>weight Decay</td><td>1e-5</td></tr><tr><td>pred_horizon</td><td>min(300, T)</td></tr><tr><td>obs_horizon</td><td>1</td></tr><tr><td>act_horizon</td><td>4</td></tr></table>
|
| 279 |
+
|
| 280 |
+
Table 6: Success Rates for DP agents on Robosuite tasks
|
| 281 |
+
|
| 282 |
+
<table><tr><td>Task</td><td>Success Rate (%)</td></tr><tr><td>square-nut</td><td>79</td></tr><tr><td>coffee-pod</td><td>86</td></tr><tr><td>threading</td><td>80</td></tr></table>
|
| 283 |
+
|
| 284 |
+
# A.3 TASK-REGRET PROFILE AND VOSI PROFILE EVALUATION PROTOCOL
|
| 285 |
+
|
| 286 |
+
We evaluate fixed-rate mixed loop execution strategy for both the lookahead policies on all values of the fixed-rate execution horizons $h = \{1, \dots, T\}$ where $T$ represents the episode length of the task and report the average return obtained over 100 rollouts of the mixed loop execution.
|
| 287 |
+
|
| 288 |
+
Implementing VoSI Profiles. For both TD-MPC2 agent on DM-control and Push-T tasks, we start by collecting a buffer of states from 50 rollouts of closed loop executions of the policy. For each state $s$ in this buffer we seek to characterize $\mathrm{VoSI}(s,h)$ , we do this by resetting the simulator to that state and then run mixed loop strategies $\eta_{\mathrm{MixL}}(s,h)$ with the open loop length $h$ varying from 1 to 100 steps. For each $h$ , we generate 5 full trajectories (i.e., length of trajectory = episode length $T$ ) from $s$ . Now this permits a Monte Carlo estimate of the expectations over $\tau_{\mathrm{MixL}}(s,h)$ in the second term in Equation (1) – the variance of the values are not too high as we are starting from a performant underlying policy. For the expectation over $\tau_{\mathrm{CL}}$ we similarly sample 5 trajectories from closed loop execution of $\pi$ and estimate this quantity. Thereby yielding an estimate of $\mathrm{VoSI}(s,h)$ . This is a computationally expensive procedure especially for evaluating long-horizon policies as for each state we generate on the order of 500 trajectories, which starts becoming prohibitively expensive to run a DP agent for given the higher inference costs. We therefore, examine the closed loop trajectories from the lens of the plan-disagreement metric (Appendix C) to identify states where the policy reacts to sensory information (which happens only at regions of object interaction as observed in Figure 12) and perform the counterfactual examination only on states preceding such states alone – effectively filtering out states where there is extended free-space motion of the manipulator.
|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
Figure 12: Visualization of the planning disagreement metric (VoSI-P) aligned along timesteps of representative rollouts of the Diffusion Policy agent on robosite tasks. These identify characteristic object-interaction points near which expensive counterfactual return-based metrics are evaluated.
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
|
| 295 |
+

|
| 296 |
+
|
| 297 |
+
# B GRID WORLD
|
| 298 |
+
|
| 299 |
+
Setup As identified in Section 4.1 there are two scenarios that justify processing environment feedback: (1) stochastic dynamics (2) inaccurate model of the dynamics. We perform a set of controlled experiments on the four-rooms grid world and study the sensing needs of a model-based controller that has a deterministic optimal closed loop policy $\pi^{*}: S \to A$ identified for each environment with stochasticity $(p)$ by value-iteration and a dynamics world model $\hat{P}$ that is used to sample lookahead action sequences. To study the axis of model suboptimality we simulate a representation error $\epsilon$ in the dynamics model of the agent by finding transition probability matrix $\hat{P}$ s.t. $D_{\mathrm{KL}}(P(s'|s, a), \hat{P}(s'|s, a)) = \epsilon \forall s, a$ . We identify such $\hat{P}$ by simply setting $\hat{P}(s'|s, a) = c(s, a) \cdot U(s'|s) + (1 - c(s, a)) \cdot P(s'|s, a)$ , where $U(s'|s) = \frac{\mathbb{1}_{[s' \in N(s)]}}{|N(s)|}$ denotes a uniform prior over the reachable neighbors $N(s)$ (as an effect of some action) of state $s$ . The weighting term $c(s, a) \in [0, 1]$ is identified to satisfy the constraint on KL-divergence.
|
| 300 |
+
|
| 301 |
+
Task-Regret Profile and VoSI Profile Evaluation Protocol The task-regret profiles (Figures 4 and 11) are obtained by evaluating the performance of the execution strategies over 1000 rollouts up to a horizon of 200.
|
| 302 |
+
|
| 303 |
+
The VoSI profiles used by the greedy execution strategy (Algorithm 1) are monte-carlo estimates of the expected reward loss (Equation (1)) for each state $s$ in the grid world by simulating 1000 rollouts of $\tau_{\mathrm{MixL}}(s,h) \forall h \in \{0,\dots ,100\}$ . Observe that $\tau_{\mathrm{MixL}}(s,0)$ denotes the distribution of closed loop execution trajectories $\tau_{\mathrm{CL}}$ . Therefore once rollouts of $\tau_{\mathrm{MixL}}(s,h)$ are independently sampled the value-of-sensing information $\mathrm{VoSI}(s,h)$ in a $h$ time-window after observing $s$ can be estimated.
|
| 304 |
+
|
| 305 |
+
Algorithm 1 Greedy mixed loop execution Strategy $(\eta_{\mathrm{greedy}})$
|
| 306 |
+
Require:
|
| 307 |
+
$\pi$ : a policy that can produce lookahead actions
|
| 308 |
+
$B$ : a budget
|
| 309 |
+
VoSI(s,h): the value of sensory information profiles
|
| 310 |
+
T : the episode length
|
| 311 |
+
$\triangleright$ Strategy is to use the budget the equally distribute the cost of acquiring sensory information over the episode and commit to a greedy strategy
|
| 312 |
+
$t = 0$
|
| 313 |
+
while $t < T$ do
|
| 314 |
+
$\delta = \frac{B}{T - t}$ $h\gets \max h\mathrm{s.t}\operatorname {VoSI}(s_t,h)\leq h\cdot \delta$ $B\gets B - \operatorname {VoSI}(s_t,h)$ $t\gets t + h + 1$
|
| 315 |
+
Execute( $\pi_{0:h}(s_t)$ )
|
| 316 |
+
end while
|
| 317 |
+
|
| 318 |
+
# C DETAILS OF THE REWARD-FREE AND INTERACTION-FREE MEASURES OF VoSI
|
| 319 |
+
|
| 320 |
+
To expand the scope of VoSI measures to leverage trajectory discrepancy characteristics beyond just task rewards. We study a few simple alternate measures:
|
| 321 |
+
|
| 322 |
+
- State Disagreement VoSI-S(s,h) := $\mathbb{E}_{\tau_{\mathrm{MixL}}(s,h)}\left[\min_{\tau_{\mathrm{CL}}(s)}\frac{1}{T}\sum_{t=0}^{T}||s_t^{\mathrm{CL}} - s_t^{\mathrm{MixL}}||_2\right]$ measures a simple time-aligned state discrepancy of measure of distribution $\tau_{\mathrm{MixL}}$ from $\tau_{\mathrm{CL}}$ . One can more broadly use any optimal-transport based formulation to characterize these state distribution disagreements as used in Luo et al. (2023); Haldar et al. (2023) to obtain a reward signal from a distribution matching perspective.
|
| 323 |
+
|
| 324 |
+
- Plan Disagreement VoSI-P(s, h) := $\mathbb{E}_{\tau_{\mathrm{CL}}(s), \hat{a}_{0:h} \sim \pi_{0:h}(s)}\left[\frac{1}{h}\sum_{t=0}^{h}||a_t^{\mathrm{CL}} - \hat{a}_t||_2\right]$ a measure akin to the imitation-loss which suggests the deviation of action plans from closed loop actions sequences executed in the environment. Such a metric does not need access to the distribution of $\tau_{\mathrm{MixL}}$ trajectories and can therefore be applied on a dataset of $\tau_{\mathrm{CL}}$ trajectories.
|
| 325 |
+
|
| 326 |
+
# C.1 ON THE ERRONEOUS CORRELATION OF METRICS DUE TO TASK-COMPLETION
|
| 327 |
+
|
| 328 |
+
By visualizing state-aligned orderings of different alternative VoSI metrics in Figures 13 and 14, where each row across the subplots correspond to the same state $s$ with a few representative states visualized in the buckets. We observe that on states that denote task-completion or states near task completion, have a close to flat VoSI-R profile, but exhibit varying degrees of VoSI-P or VoSI-S due to stochasticity of the policy post task-completion which bears no consequence on the reward achieved but can make the estimates of other trajectory disagreement metrics relying on states (VoSI-S) and actions (VoSI-P) quite noisy and thereby does not provide much signal. We therefore discount such states when presenting the rank-order correlation statistics in Table 1 to suggest how effective alternative metrics can be in computing notions similar to VoSI-R.
|
| 329 |
+
|
| 330 |
+

|
| 331 |
+
Figure 13:Push-T
|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
Figure 14: cup-catch
|
| 335 |
+
|
| 336 |
+
# D COMPARING DIFFERENT POLICY REPRESENTATIONS
|
| 337 |
+
|
| 338 |
+
The Impact of Policy Architectures. From Figure 3 in Section 4 we observed for tasks swingup and Push-T for which we have both TD-MPC2 and DP policies, that the planning based TD-MPC2 agent exhibited lesser degradation in task performance when constrained to operate at much lower sensing rates in comparison to a reactive DP policy. To gain a finer grained understanding of the sensory dependence of these policy representations we employ our method of analysis and compute state-wise regret profiles of these different policy representations on common task states and illustrate characteristic differences in Figure 15. In swingup, we observe that DP exhibits much higher performance degradation in the swingup phase of the task when compared to TD-MPC2, but degrading lesser during the balance phase of the task. For Push-T, we observe that DP policy critically relies on sensing to retain some performance in comparison on TD-MPC2.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 15: Visualization of VoSI profiles of TD-MPC2 (planning-based) and DP (reactive-controller) along a few common task states.
|
| 342 |
+
|
| 343 |
+
# E DISCUSSION ON VOSI PROFILES OVER A TRAJECTORY
|
| 344 |
+
|
| 345 |
+
In Figure 9, we visualize overlayed VoSI profiles (with transparency alpha = 0.02) for states sampled uniformly from closed loop rollouts of a fixed episode length. In tasks like cup-catch and Push-T the task objective is achieved much before the episode ends i.e. the ball is in the cup or the T object is aligned with the goal. At this point, VoSI profiles are flat because actions are trivial and the policy does not perform further meaningful actions. This is why there is a high density of seemingly flat profiles for these tasks in Figure 9.
|
| 346 |
+
|
| 347 |
+
For most figures in the paper we have visualized the evolution of VoSI profiles over the open loop horizon $h$ . In Figure 10, we additionally convey how the VoSI profiles $\mathrm{VoSI}(s,h)$ evolve not only over open loop horizon $h$ but also over the states $s$ (starting from $s_0$ to $s_T$ of a closed loop rollout). This means we are mapping the scalar $\mathrm{VoSI}(s_{t_1},h)$ of two arguments (time index $t_1$ of last observed state $s_{t - 1}$ , and open loop horizon $h$ ). We use colors to indicate the VoSI values. In Figure 10, the x-axis represents the time-index $t_1$ of the last observed state $s_{t_1}$ and y-axis represents the offset open-loop horizon $t_2 = t_1 + h$ . Each vertical column of colors represent VoSI profiles for a particular state at varied horizons. The choice of adding the last-observed time offset in the y-axis i.e. using $t_1 + h$ rather than $h$ helps highlight the structure in the evolution of VoSI over time. Tracking along the horizontal row $t_2$ we can interpret how valuable re-sensing before $t_2$ is at prior moments in time.
|
| 348 |
+
|
| 349 |
+
We provide more illustrative visualizations of the evolution of VoSI profiles over the course of a rollout akin to Figure 10 in Figure 16 for the swingup and finger-spin tasks. We observe characteristic periodicity in VoSI profiles along the trajectory in the balance-phase of the swingup task and peak-spinning phase of finger-spin i.e. any state in that window has similar VoSI profile indicating that one could execute fixed-rate mixed loop executors in such windows to sense at the boundaries of where there is value to gain from sensing and repeat.
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
Figure 16: Evolution of VoSI profiles over a trajectory for swingup (left) and finger-spin (right)
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
|
| 356 |
+
# F IMPACT OF TRAINING STAGE AND MODEL CAPACITY ON SENSING NEEDS OF THE POLICY
|
| 357 |
+
|
| 358 |
+
Figure 5 shows a drop in performance of mixed-loop execution relative to closed-loop performance for each policy, but closed-loop performance for beginner and novice are often poor, meaning that there is "less to lose" when executing mixed-loop. For example, in the Push-T task, our "beginner" policy executed closed-loop gets a return of 25.62 compared to 66.59 for the expert. Thus, even if "beginner" deteriorates to a lower return with mixed-loop execution, this registers in the "relative regret" performance metric as a relatively small drop in task regret.
|
| 359 |
+
|
| 360 |
+
In Figure 17, we provide a version of the plot where the regret scales are the same by computing the task performance regret with respect to the performance of the "expert" policy checkpoint for training stage (and "large" checkpoint for the model capacity experiment). From Figure 17, it becomes more evident that the expert is capable of retaining higher levels of performance as sensing rate decreases.
|
| 361 |
+
|
| 362 |
+
Influence of Stage of Training
|
| 363 |
+

|
| 364 |
+
- beginner - novice - expert
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
|
| 368 |
+
Impact of Model Capacity
|
| 369 |
+
Figure 17: Task regret profiles on two tasks with respect to the 'expert' (above) and 'large' (below) policy checkpoints ensuring that scales of the regret profiles are commensurate.
|
| 370 |
+

|
| 371 |
+
small medium large
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
|
| 375 |
+
# G EXPANDED RELATED WORK
|
| 376 |
+
|
| 377 |
+
The questions studied in this work are a subset of the questions that Donald (1995) first posed to the robotics community, asking what information is needed for a robot to perform a task, how the robot might acquire such information, and more. Their initial steps towards answering these questions developed the notion of "information invariants", which describe loosely speaking, level sets of task performance in terms of sensed or stored information and other resources such as speed and communication bandwidth among multiple agents. These foundational questions still persist Koditschek (2021). One prominent line of inquiry is on sensor reductions or equivalent classes and sensor dominanceLaValle (2019), which describes a framework for computing partial orderings amongst sensing setups for robots in a task-agnostic manner. Related, Zhang & Shell (2020) provide a framework for searching jointly over sensor designs and plans for some task, and is demonstrated on simple tasks with a small number of discrete states and actions. Erdmann (1995) set up specialized minimalistic sensors for a policy that "sense not the states but the applicable actions", they do so by starting from abstract idealized sensor to identify all states where a given action is guaranteed to make some progress in a task (as tracked by a change in progress-measure or value function defined on the state space). The applicable action-based subsets form a cover of the state space. The author then proposes task-specific minimalistic "action-based" sensor that is designed to capture just enough information of the state to identify at least one action that is guaranteed to make progress in a task, essentially setting up a minimum cover problem. Note that in the process of the sensor design we have consequently also obtained an applicable action for each state - with the guarantee that the strategy accomplishes the task under the sensor designed. More recently, McFassel & Shell (2023) have expanded the applicability of these ideas by increasing flexibility in the way progress measures are defined. The foundational framework laid out by Erdmann (1995) serves as a powerful tool that provides insight into minimalistic sensor design, it is limited to systems that can be fully modeled and analyzed analytically under restricted policy classes. While the framework provides insights into what to sense at every timestep for a closed loop policy and does not characterize when acquiring this information is critical. Furthermore, it does not characterize the degradation in performance achievable under a certain sensor design.
|
| 378 |
+
|
| 379 |
+
In control theory, the questions of devising control systems that are parsimonious with processing the full state information are studied extensively by prior works that propose event-based sampling and event-triggered control (Åström & Bernhardsson, 1999; Aström, 2008; Vasyutynskyy & Kabitzsch, 2010; Heemels et al., 2012). Such systems are designed to change the prescribed control plan only when events (discrete variables that are a function of a partial state of the system) are triggered. The event-triggered control literature, much like the works discussed in Section 2, aim to generate controllers that operate with limited sensing. Event-triggered control typically (1) assumes that a low-cost sensor is constantly monitoring the state at each time $t$ and (2) defines a "trigger" event when a manually defined function of this sensory observation crosses a threshold. For example, in Trimpe & D'Andrea (2011) an event trigger is defined based on the deviation of the coarsely sensed state from a model's predictions. In contrast, in this work we have sought to characterize for an arbitrary lookahead policy a notion of its reliance on external feedback in-terms of its task performance. The insights from which can complement the event-triggered control literature by aiding with the design of events and triggers for efficient execution of the policies.
|
| 380 |
+
|
| 381 |
+
Outside of robotics, in machine learning and information theory, Tishby & Polani (2010), like us, present an information theoretical view of sequential decision making: they define the "information-to-go" property of a policy $\pi$ based on the KL divergence from a prior, of the distribution of futures generated by $\pi$ . They show that this quantity follows a Bellman-like recursion, which is useful to optimize "informationally constrained" policies that maximize task rewards while generating constrained information-to-go. These constraints are not directly on any information processing capabilities on the agent, but rather on "the information processed in the joint agent-environment system", i.e., the surprisingness of policy-induced trajectories relative to the prior. The priors considered are uninformative, and their information-to-go vanishes when the dynamics is fully known. Our VoSI is affected by stochasticity even in fully known dynamics, as well as the agent's limited information processing capabilities (see Section 4.1 for a discussion). Finally, they don't deal with when / how the information should be acquired, which is central to our approach. Their work's influence appears in recent works Eysenbach et al. (2021); Lu et al. (2023) that apply similar constrained optimization techniques to generate policies that must extract less of the sensed information, but without any constraints on when sensing is available. Closer to us in this family of
|
| 382 |
+
|
| 383 |
+
work is Van Dijk et al. (2009), who demonstrate through evolutionary optimization that temporally extended options-style architectures are preferred when information processing is constrained. Fox & Tishby (2015) extends Tishby & Polani (2010)'s framework to POMDPs: as their notion of information-to-go, they measure deviation from a prior that includes an ergodic action distribution that is loosely related to the open-loop policy executions we consider in this work. Lu et al. (2023) motivate the study of what information an agent should sense and retain for maximizing data efficiency during online reinforcement learning, where the data is ever-changing. They motivate an analysis of the cost-per-bit of information (measured in entropy) sensed to benefit obtained (task return), and conduct experiments on online learning in bandit settings to demonstrate implications of agent designs that factor in the cost of acquiring and retaining information for learning polices that minimize the regret accrued in trying to reach a stationary target policy.
|
| 384 |
+
|
| 385 |
+
Finally, decision making is also of interest in economics, and sure enough, our questions have precedents that are studied in this discipline Mackowiak et al. (2023), starting from the foundational work of Sims (2003). "Rational inattention" posits that (human) agents cannot process all available information but can choose which pieces of information to attend to, explaining many observed macroeconomic phenomena.
|
| 386 |
+
|
| 387 |
+
# H A POINT OF COMPARISON FOR THE REDUCED SENSING APPLICATION
|
| 388 |
+
|
| 389 |
+
Figure 11 shows a proof-of-concept for a potential application of VoSI to reduce sensing needs when executing a pre-trained policy. We use a simple greedy approach that can adapt to test-time-specified sensing costs. To offer a point of comparison for the VoSI-based greedy efficient execution strategy (described in Section 5) we consider an "event-triggered control" based approach described below:
|
| 390 |
+
|
| 391 |
+
Event-triggered approach We note that "event-triggered control" literature (see Appendix G) is relevant here as an approach that reduces the amount of expensive state sensing. However, note that it does not completely forgo sensing at any moment but instead chooses to sense at a coarser fidelity until "an event is triggered". For the four-rooms task, we define coarse sensors that identify the agents position in different sub-grids depicted in Figure 18 (left). We "trigger" an event to sense the true MDP state when (a) the coarse sensor recognizes a transition between sub-grids, or (b) no change is detected by the coarse sensor within a specified timeout (a hyperparameter) when it is not within the goal region (green sub-grid). As the timeout parameter is varied for this baseline, we obtain the regret profile by measuring the task performance vs average sensing rate (which only includes the number of times the high fidelity state observation is queried).
|
| 392 |
+
|
| 393 |
+

|
| 394 |
+
Figure 18: Task regret profiles achieved for four-rooms by different execution strategies. Note that the event-triggered approach here coarsely senses the state of the environment at every step i.e. the agent's presence in some sub-grid depicted on the left. The proposed greedy strategy or the fixed rate execution baseline does not have access to such additional information.
|
| 395 |
+
|
| 396 |
+
From Figure 18, we observe that the event-triggered approach achieves higher task performance (lower regret) compared to our proposed greedy strategy when constrained to operate at lower sensing rates. The extra knowledge, in the form of coarse sensing, proves to be a significant advantage for the event-triggered approach in the deterministic dynamics setting (Figure 18-middle), but when dynamics is stochastic, our naive VoSI-based greedy strategy matches this approach in performance, even without the sub-grid sensor. The coarsely sensed "room" based event triggers might not be very beneficial in environments with stochastic dynamics as the action plans necessary within a sub-grid might change widely as a result of noise in transition dynamics – this results in the event-triggered approach relying more on the heuristic timeout to obtain high-fidelity state observations.
|
| 397 |
+
|
| 398 |
+
# I CASE STUDY: NOISY SENSING
|
| 399 |
+
|
| 400 |
+
We would like to demonstrate the applicability of the proposed VoSI analysis in settings beyond the scenarios primarily studied in the paper i.e. deterministic environments with perfect state sensing. We provide a proof-of-concept application of VoSI as a probing tool to study an agent that operates under noisy sensing on the swingup task.
|
| 401 |
+
|
| 402 |
+
We train a small CNN-based visual state estimator that has up to $5\mathrm{cm}$ and 2 degrees errors in the predicted cart position and pole angle, which is quite significant in this task. We then obtain a TD-MPC2 policy that operates on these state estimates (see Appendix I.1 for more details) and conduct a similar VoSI analysis (Section 5). As such, the value of new sensory measurements increases: this is reflected in steeper VoSI profiles overall. However, trends remain similar: for example, we see stepped VoSI profiles during the swingup phase, and close to flat VoSI profiles even up to 70 steps of open-loop execution during the balancing phase when the pole is already close to vertical. See Appendix I.2 for more details.
|
| 403 |
+
|
| 404 |
+
This establishes both that our VoSI framework is applicable to many more general task setups than reported in the main paper, and that the findings reported in the main paper already offer useful intuitions for what results in more general/complex task setups might look like.
|
| 405 |
+
|
| 406 |
+
# I.1 TRAINING THE STATE ESTIMATOR AND POLICY
|
| 407 |
+
|
| 408 |
+
To create a dataset for the state estimator, we sample 20000 configurations with cart position (in meters) $\sim U(-2,2)$ , pole angle (degree) $\sim U(-180,180)$ . At each of these configurations we capture a (128, 128, 3) RGB image from a front-view camera positioned $6.5\mathrm{m}$ from the center of the rail. Figure 19 shows some sample front view images and also shows the coverage of the configuration space in the training data.
|
| 409 |
+
|
| 410 |
+
We train a CNN to predict the cart-position and pole-angle (cosine & sine of the angle) from images by minimizing an L2 loss over the dataset. The architecture of the CNN used is as follows:
|
| 411 |
+
|
| 412 |
+
```txt
|
| 413 |
+
[Conv(3x3, channels=32) $\rightarrow$ GroupNorm(groups=8) $\rightarrow$ ReLU $\rightarrow$ AvgPool(2x2) $\rightarrow$ Conv(3x3, channels=64) $\rightarrow$ GroupNorm(groups=8) $\rightarrow$ ReLU $\rightarrow$ AvgPool(2x2) $\rightarrow$ Conv(3x3, channels=128) $\rightarrow$ GroupNorm(groups=8) $\rightarrow$ ReLU $\rightarrow$ AvgPool(2x2) $\rightarrow$ Flatten $\rightarrow$ Linear(32768, 256) $\rightarrow$ ReLU $\rightarrow$ Linear(256, 3)].
|
| 414 |
+
```
|
| 415 |
+
|
| 416 |
+
The state estimates (predicted cart position and pole angle) obtained by the CNN have a more realistic error profiles that are illustrated in Figure 20 over a separate test dataset of 20000 samples obtained by an uniform sampling of the configuration space. The nature of the error varies differently in the configuration space and can be thought of as providing a coarser sensing of the true state of the system.
|
| 417 |
+
|
| 418 |
+
The lookahead TD-MPC2 policy now operates on the current and previous state estimates i.e. the observation at time $t$ is $o_{t} = (\hat{y}_{t},\hat{y}_{t - 1})$ . The agent predicts the force to apply on the cart to swing the pole upright and balance it – note that the instantaneous velocity information is not provided here.
|
| 419 |
+
|
| 420 |
+

|
| 421 |
+
Figure 19: Sample images of the training dataset (left) and a scatter plot illustrating the coverage of the configuration space in the training data (right).
|
| 422 |
+
|
| 423 |
+

|
| 424 |
+
|
| 425 |
+

|
| 426 |
+
|
| 427 |
+

|
| 428 |
+
Figure 20: The error characteristics of the CNN based state estimator. The histogram on the left illustrates the distribution of errors (predicted - ground truth value) over states that are sampled uniformly from the configuration space. The plot on the right indicates the errors over the tested configuration space.
|
| 429 |
+
|
| 430 |
+
# I.2 VOSI ANALYSIS
|
| 431 |
+
|
| 432 |
+
# TASK REGRET PROFILE ANALYSIS
|
| 433 |
+
|
| 434 |
+
Like the analysis presented in Section 4 we start the investigation by analyzing the task regret profiles attained by fixed-rate mixed loop executions with varying execution period $h$ and obtain an approximate understanding of the relationship between sensing budget (as reflected in the sensing rate $\frac{1}{h}$ ) and task performance.
|
| 435 |
+
|
| 436 |
+
The agent with noisy sensing achieves a closed loop task performance of 150.45. To contrast the profile with "perfect sensing", we obtain the task-regret profile for another TD-MPC2 agent that is provided the true cart positions and pole angles for timesteps $t$ and $t - 1$ . The agent under this "perfect sensing" setup achieves a closed loop performance of 164.46. However, do note that perfect sensing in this case does not accurately reflect the true Markov state of the system as the instantaneous velocities are not provided to the agent. The task regret profiles for both these sensing conditions are presented in Figure 21.
|
| 437 |
+
|
| 438 |
+
In Figure 21, we observe that with the fixed-rate mixed loop execution of the policy with noisy sensing any deviation from operating closed loop results in a performance drop. Whereas an agent provided with "perfect sensing" can tolerate a 10 fold reduction in the amount of sensing. However, bear in mind that fixed rate mixed loop execution is not necessarily the optimal sensing strategy and is merely a useful probe to arriving at an approximate understanding of the relationship between the sensing budget and task performance. We use VoSI profiles (introduced in Section 5) to provide a more fine-grained analysis of the agent at the state level by following the same protocol described in Appendix A.3 to gather data for the analysis.
|
| 439 |
+
|
| 440 |
+
# CHARACTERISTIC VOSI PROFILES
|
| 441 |
+
|
| 442 |
+
In Figure 22 we visualize an overlay of VoSI profiles for states uniformly sampled from closed loop executions of the policy with noisy sensing. And similar to the insights of swingup task in the main paper we observe "stepped" VoSI profiles that involve a sharp increase in regret at some values $h$
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
Figure 21: Task regret profiles for an agent with noisy sensing and perfect sensing on swingup task.
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 22: VoSI profiles overlayed for agent with noisy sensing (similar to Figure 9).
|
| 449 |
+
|
| 450 |
+
followed by steady increases or flat stretches, but these sharp increases occur at earlier open loop horizons $h$ compared to the perfect sensing scenario examined in the main paper (Figure 9-1).
|
| 451 |
+
|
| 452 |
+
The sharp increases in task regret primarily appear during the swingup phase of the task where not sensing during a short dynamic period of this phase can prevent the agent from correcting an undershoot which causes a sharp loss in rewards. For example, for states encountered in the 'swingup phase' the VoSI profiles (Figure 23-a, Figure 23-b) show a steep decrease in task performance when the agent forgoes sensing in a short window as extended execution of open loop actions based on noisy state estimate in this dynamic phase results in an undershoot of the pole (these are similar to insights we drawn from Figure 7-3a for an agent with perfect sensing). As the agent starts entering the 'balance phase' of the task (Figure 23-c → Figure 23-d → Figure 23-e) the agent starts to be able to tolerate extended horizons of open loop action execution without losing any task performance (similar to the insights obtained for agent with perfect sensing from Figure 7-3b, Figure 7-1d which show close to flat profiles during the 'balance phase' of the task).
|
| 453 |
+
|
| 454 |
+

|
| 455 |
+
Figure 23: Characteristic VoSI profiles observed on the swingup task for an agent with noisy sensing.
|
| 456 |
+
|
| 457 |
+
# J VOSI ANALYSIS OF A COMPLEX ROBOTIC TASK: QUADRUPED CRATE CLIMBING TASK WITH DEPTH CAMERA AND PROPRIOCEPTION
|
| 458 |
+
|
| 459 |
+
In this appendix, we look to demonstrate proof-of-concept VoSI application to still more complex and realistic robotic task: a Unitree Go1 quadruped performing a complex locomotion task, namely, climbing onto a crate. Aside from being more complex and realistic than the tasks studied thus far, this setting also facilitates the study of the value of specific sensors in a multi-sensory setup.
|
| 460 |
+
|
| 461 |
+
In particular, in many robotics applications an agent is typically equipped with a wide array of sensors that have different data acquisition and processing costs. For instance, our quadruped system comes equipped with joint encoders, force sensors on the feet, IMU and cameras to estimate the proprioceptive state and the exteroceptive terrain conditions. Of these sensory streams, constantly processing visual information from cameras poses significant challenges due to the limited on-board compute and power constraints of the system. In this section, we demonstrate how the proposed VoSI analysis can be used to characterize the value of visual sensing, assuming that other sensors are always available.
|
| 462 |
+
|
| 463 |
+
# CLIMB-CRATE TASK
|
| 464 |
+
|
| 465 |
+
In our task setup, a Unitree Go1 quadruped must climb onto a crate of varying heights using a head mounted depth camera (see Figure 24). For every episode, we spawn a crate with varying height $10\mathrm{cm}$ to $25\mathrm{cm}$ while keeping its length and width fixed at $90\mathrm{cm}\times 90\mathrm{cm}$ . The robot is spawned at a uniformly random distance (1m to 2m) away from the crate with slightly different approach angles $(\pm 10^{\circ})$ . The robot gets a forward velocity command that directs it to climb the crate, after it successfully climbs the crate the command is zeroed out.
|
| 466 |
+
|
| 467 |
+

|
| 468 |
+
Figure 24: Illustration of the climb-crate task and the depth estimates from a head-mounted camera.
|
| 469 |
+
|
| 470 |
+

|
| 471 |
+
|
| 472 |
+

|
| 473 |
+
|
| 474 |
+
# TRAINING
|
| 475 |
+
|
| 476 |
+
We leverage the widely used two-stage teacher-student training paradigm (Cheng et al., 2024; Kumar et al., 2021) to obtain a policy that can tolerate various degrees of staleness in the depth information while always receiving the latest proprioceptive information from the IMU and joint encoders.
|
| 477 |
+
|
| 478 |
+
During the RL training of the state-conditioned teacher policy we use dense rewards to encourage robust velocity-tracking walking gaits to emerge. Additionally, the teacher policy is trained on a wide range of terrain types with sensor noise and domain randomization. The teacher policy's behavior is then distilled to a student policy on the evaluated climb-crete task. During distillation, along with training a main closed loop policy network that operates on the latest sensory readings (depth and proprioceptive) to predict the teacher actions, we train an axillary network that operates on the history of proprioceptive readings and stale depth information to predict the same teacher actions. This allows the student to operate on stale depth information by choosing to query this auxiliary network. We adopt the architecture in Cheng et al. (2024) with the exception of dropping the recurrence in depth processing. The student policy operates on a 58x87 depth image with uniform random noise of $\pm 4$ cm in the depth estimates and random pixel dropout (dropout_p = 0.05), while reusing the proprioceptive noise levels and domain randomization parameters from Cheng et al. (2024). The trained student policy attains a closed loop success rate of $79.4\%$ over 500 simulation trials on the climb-crete task. While we perform our analyses in simulation, these policies are known to transfer zero-shot to the real robot, so there is reason to believe that our analyses could continue to hold for the transferred policies.
|
| 479 |
+
|
| 480 |
+
# VOSI ANALYSIS RESULTS
|
| 481 |
+
|
| 482 |
+
Our VoSI analysis is applied to the depth sensing alone, while assuming that other sensors are always freely available. We closely follow the procedure outlined in Appendix A.3 where we first obtain about 50 closed loop rollouts and then conduct the VoSI analysis on subsampled states along these rollouts where the depth information is foregone to various extents.
|
| 483 |
+
|
| 484 |
+
Similar to the VoSI analysis conducted in previous sections, we analyze the effect of withholding the depth information to various extents as the agent performs the task and illustrate the characteristic profiles observed in Figure 25. Recall that VoSI evaluations are measured relative to a reward function: for simplicity, we use the sparse reward to compute VoSI, where the agent obtains a return of 1 if it successfully climbs onto the crate and gets 0 otherwise.
|
| 485 |
+
|
| 486 |
+
In episodes where the crate heights are high ( $>20\mathrm{cm}$ ) we observe that policy critically relies on the depth information moments before it has to climb the crate (Figure 25-A), but as soon as it has positioned one of its feet on the crate the depth information does not add much value (Figure 25-B). Furthermore, in episodes where the crate height is lower $<15\mathrm{cm}$ the agent is able to successfully climb the crate without having access to the most recent depth information (Figure 25-C). This further highlights that the VoSI framework can provide useful insights to inform the deployment of such learned policies.
|
| 487 |
+
|
| 488 |
+

|
| 489 |
+
|
| 490 |
+

|
| 491 |
+
Figure 25: Characteristic VoSI profiles measuring extents to which the Go1 robot can operate without the latest depth information on the climb-crete task.
|
2025/The Value of Sensory Information to a Robot/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5732bb6ff8ef564ea9678c48b92251bf7b980763c87439821fe35eec13842895
|
| 3 |
+
size 1142588
|
2025/The Value of Sensory Information to a Robot/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/4718a298-31bb-4669-bbd7-e75ba44d850e_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ed9235caa522a1f38ca09d9e349f8bd431aac3487c5ee089547b36026d049d0
|
| 3 |
+
size 677730
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7a60b99a8dcbfe5d9a5a963312a480468a700a3c6a949d19574a976ea8978b2
|
| 3 |
+
size 520609
|
2025/The impact of allocation strategies in subset learning on the expressive power of neural networks/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Theory on Score-Mismatched Diffusion Models and Zero-Shot Conditional Samplers/887518bc-c461-436b-8636-e17d34e69852_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|