Chelsea707 commited on
Commit
02487f0
·
verified ·
1 Parent(s): 9ed2e90

Add Batch 37344d0d-d82d-46df-a28c-e954fd6b6972 data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +63 -0
  2. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_content_list.json +0 -0
  3. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_model.json +0 -0
  4. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_origin.pdf +3 -0
  5. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/full.md +770 -0
  6. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/images.zip +3 -0
  7. 2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/layout.json +0 -0
  8. 2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_content_list.json +0 -0
  9. 2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_model.json +0 -0
  10. 2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_origin.pdf +3 -0
  11. 2025/Policy Gradient with Tree Expansion/full.md +0 -0
  12. 2025/Policy Gradient with Tree Expansion/images.zip +3 -0
  13. 2025/Policy Gradient with Tree Expansion/layout.json +0 -0
  14. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_content_list.json +0 -0
  15. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_model.json +0 -0
  16. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_origin.pdf +3 -0
  17. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/full.md +495 -0
  18. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/images.zip +3 -0
  19. 2025/Policy Guided Tree Search for Enhanced LLM Reasoning/layout.json +0 -0
  20. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_content_list.json +0 -0
  21. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_model.json +0 -0
  22. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_origin.pdf +3 -0
  23. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/full.md +0 -0
  24. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/images.zip +3 -0
  25. 2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/layout.json +0 -0
  26. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_content_list.json +0 -0
  27. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_model.json +0 -0
  28. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_origin.pdf +3 -0
  29. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/full.md +635 -0
  30. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/images.zip +3 -0
  31. 2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/layout.json +0 -0
  32. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_content_list.json +0 -0
  33. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_model.json +0 -0
  34. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_origin.pdf +3 -0
  35. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/full.md +0 -0
  36. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/images.zip +3 -0
  37. 2025/Policy-Regret Minimization in Markov Games with Function Approximation/layout.json +0 -0
  38. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_content_list.json +0 -0
  39. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_model.json +0 -0
  40. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_origin.pdf +3 -0
  41. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/full.md +0 -0
  42. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/images.zip +3 -0
  43. 2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/layout.json +0 -0
  44. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_content_list.json +0 -0
  45. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_model.json +0 -0
  46. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_origin.pdf +3 -0
  47. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/full.md +805 -0
  48. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/images.zip +3 -0
  49. 2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/layout.json +0 -0
  50. 2025/PolyConf_ Unlocking Polymer Conformation Generation through Hierarchical Generative Models/f2a24b6e-9516-4f28-a001-51733fc3e873_content_list.json +0 -0
.gitattributes CHANGED
@@ -2281,3 +2281,66 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
2281
  2025/PoisonedEye_[[:space:]]Knowledge[[:space:]]Poisoning[[:space:]]Attack[[:space:]]on[[:space:]]Retrieval-Augmented[[:space:]]Generation[[:space:]]based[[:space:]]Large[[:space:]]Vision-Language[[:space:]]Models/ac3cb673-7cdf-48c7-a6cf-8c129ce4419b_origin.pdf filter=lfs diff=lfs merge=lfs -text
2282
  2025/PokéChamp_[[:space:]]an[[:space:]]Expert-level[[:space:]]Minimax[[:space:]]Language[[:space:]]Agent/4e625063-2fb6-4ea5-a50b-288e26c74ce1_origin.pdf filter=lfs diff=lfs merge=lfs -text
2283
  2025/Policy[[:space:]]Design[[:space:]]for[[:space:]]Two-sided[[:space:]]Platforms[[:space:]]with[[:space:]]Participation[[:space:]]Dynamics/5524dd0c-625b-4e2c-9c33-6d395274a99e_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2281
  2025/PoisonedEye_[[:space:]]Knowledge[[:space:]]Poisoning[[:space:]]Attack[[:space:]]on[[:space:]]Retrieval-Augmented[[:space:]]Generation[[:space:]]based[[:space:]]Large[[:space:]]Vision-Language[[:space:]]Models/ac3cb673-7cdf-48c7-a6cf-8c129ce4419b_origin.pdf filter=lfs diff=lfs merge=lfs -text
2282
  2025/PokéChamp_[[:space:]]an[[:space:]]Expert-level[[:space:]]Minimax[[:space:]]Language[[:space:]]Agent/4e625063-2fb6-4ea5-a50b-288e26c74ce1_origin.pdf filter=lfs diff=lfs merge=lfs -text
2283
  2025/Policy[[:space:]]Design[[:space:]]for[[:space:]]Two-sided[[:space:]]Platforms[[:space:]]with[[:space:]]Participation[[:space:]]Dynamics/5524dd0c-625b-4e2c-9c33-6d395274a99e_origin.pdf filter=lfs diff=lfs merge=lfs -text
2284
+ 2025/Policy[[:space:]]Filtration[[:space:]]for[[:space:]]RLHF[[:space:]]to[[:space:]]Mitigate[[:space:]]Noise[[:space:]]in[[:space:]]Reward[[:space:]]Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
2285
+ 2025/Policy[[:space:]]Gradient[[:space:]]with[[:space:]]Tree[[:space:]]Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_origin.pdf filter=lfs diff=lfs merge=lfs -text
2286
+ 2025/Policy[[:space:]]Guided[[:space:]]Tree[[:space:]]Search[[:space:]]for[[:space:]]Enhanced[[:space:]]LLM[[:space:]]Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_origin.pdf filter=lfs diff=lfs merge=lfs -text
2287
+ 2025/Policy[[:space:]]Optimization[[:space:]]for[[:space:]]CMDPs[[:space:]]with[[:space:]]Bandit[[:space:]]Feedback_[[:space:]]Learning[[:space:]]Stochastic[[:space:]]and[[:space:]]Adversarial[[:space:]]Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_origin.pdf filter=lfs diff=lfs merge=lfs -text
2288
+ 2025/Policy[[:space:]]Regularization[[:space:]]on[[:space:]]Globally[[:space:]]Accessible[[:space:]]States[[:space:]]in[[:space:]]Cross-Dynamics[[:space:]]Reinforcement[[:space:]]Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
2289
+ 2025/Policy-Regret[[:space:]]Minimization[[:space:]]in[[:space:]]Markov[[:space:]]Games[[:space:]]with[[:space:]]Function[[:space:]]Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_origin.pdf filter=lfs diff=lfs merge=lfs -text
2290
+ 2025/Policy-labeled[[:space:]]Preference[[:space:]]Learning_[[:space:]]Is[[:space:]]Preference[[:space:]]Enough[[:space:]]for[[:space:]]RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_origin.pdf filter=lfs diff=lfs merge=lfs -text
2291
+ 2025/Poly2Vec_[[:space:]]Polymorphic[[:space:]]Fourier-Based[[:space:]]Encoding[[:space:]]of[[:space:]]Geospatial[[:space:]]Objects[[:space:]]for[[:space:]]GeoAI[[:space:]]Applications/f303db19-6a4e-42d1-8344-c008d889027b_origin.pdf filter=lfs diff=lfs merge=lfs -text
2292
+ 2025/PolyConf_[[:space:]]Unlocking[[:space:]]Polymer[[:space:]]Conformation[[:space:]]Generation[[:space:]]through[[:space:]]Hierarchical[[:space:]]Generative[[:space:]]Models/f2a24b6e-9516-4f28-a001-51733fc3e873_origin.pdf filter=lfs diff=lfs merge=lfs -text
2293
+ 2025/Polynomial[[:space:]]Time[[:space:]]Learning[[:space:]]Augmented[[:space:]]Algorithms[[:space:]]for[[:space:]]NP-hard[[:space:]]Permutation[[:space:]]Problems/fada790d-eb2b-4247-ac18-fc38e3a63809_origin.pdf filter=lfs diff=lfs merge=lfs -text
2294
+ 2025/Polynomial-Delay[[:space:]]MAG[[:space:]]Listing[[:space:]]with[[:space:]]Novel[[:space:]]Locally[[:space:]]Complete[[:space:]]Orientation[[:space:]]Rules/f2ebd806-1fea-4c56-9240-8c1d38eff3b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
2295
+ 2025/Polynomial-Time[[:space:]]Approximability[[:space:]]of[[:space:]]Constrained[[:space:]]Reinforcement[[:space:]]Learning/dfd58537-e9e4-49a3-bd68-6e03a23c44bb_origin.pdf filter=lfs diff=lfs merge=lfs -text
2296
+ 2025/Portable[[:space:]]Reward[[:space:]]Tuning_[[:space:]]Towards[[:space:]]Reusable[[:space:]]Fine-Tuning[[:space:]]across[[:space:]]Different[[:space:]]Pretrained[[:space:]]Models/bd92b71c-cbfc-4b92-8a14-2ae1948592d0_origin.pdf filter=lfs diff=lfs merge=lfs -text
2297
+ 2025/Position_[[:space:]]A[[:space:]]Theory[[:space:]]of[[:space:]]Deep[[:space:]]Learning[[:space:]]Must[[:space:]]Include[[:space:]]Compositional[[:space:]]Sparsity/61095f27-ae63-41e2-8ca4-cfe3a609b468_origin.pdf filter=lfs diff=lfs merge=lfs -text
2298
+ 2025/Position_[[:space:]]AI[[:space:]]Agents[[:space:]]Need[[:space:]]Authenticated[[:space:]]Delegation/0faa75ad-a729-4c3b-94cb-0393b82d9bcf_origin.pdf filter=lfs diff=lfs merge=lfs -text
2299
+ 2025/Position_[[:space:]]AI[[:space:]]Competitions[[:space:]]Provide[[:space:]]the[[:space:]]Gold[[:space:]]Standard[[:space:]]for[[:space:]]Empirical[[:space:]]Rigor[[:space:]]in[[:space:]]GenAI[[:space:]]Evaluation/8540c006-8a5a-4e27-8f70-249085066843_origin.pdf filter=lfs diff=lfs merge=lfs -text
2300
+ 2025/Position_[[:space:]]AI[[:space:]]Evaluation[[:space:]]Should[[:space:]]Learn[[:space:]]from[[:space:]]How[[:space:]]We[[:space:]]Test[[:space:]]Humans/44bc5ea5-cbaf-4a3f-af16-4bbb7b1587c3_origin.pdf filter=lfs diff=lfs merge=lfs -text
2301
+ 2025/Position_[[:space:]]AI[[:space:]]Safety[[:space:]]Must[[:space:]]Embrace[[:space:]]an[[:space:]]Antifragile[[:space:]]Perspective/ed2941e0-71ab-4a3f-bec8-7365c9b64109_origin.pdf filter=lfs diff=lfs merge=lfs -text
2302
+ 2025/Position_[[:space:]]AI[[:space:]]Safety[[:space:]]should[[:space:]]prioritize[[:space:]]the[[:space:]]Future[[:space:]]of[[:space:]]Work/c6ffa436-0860-4127-90a0-e5f3a3729670_origin.pdf filter=lfs diff=lfs merge=lfs -text
2303
+ 2025/Position_[[:space:]]AI[[:space:]]Scaling_[[:space:]]From[[:space:]]Up[[:space:]]to[[:space:]]Down[[:space:]]and[[:space:]]Out/fb9f61da-6f89-42a4-99d9-6a74c8316687_origin.pdf filter=lfs diff=lfs merge=lfs -text
2304
+ 2025/Position_[[:space:]]AI[[:space:]]Should[[:space:]]Not[[:space:]]Be[[:space:]]An[[:space:]]Imitation[[:space:]]Game_[[:space:]]Centaur[[:space:]]Evaluations/0e792a08-abc8-41f0-aa1a-cd5575c6e033_origin.pdf filter=lfs diff=lfs merge=lfs -text
2305
+ 2025/Position_[[:space:]]AI’s[[:space:]]growing[[:space:]]due[[:space:]]process[[:space:]]problem/d9468c3c-fbff-49c5-b412-d4012d42ce44_origin.pdf filter=lfs diff=lfs merge=lfs -text
2306
+ 2025/Position_[[:space:]]Algebra[[:space:]]Unveils[[:space:]]Deep[[:space:]]Learning[[:space:]]-[[:space:]]An[[:space:]]Invitation[[:space:]]to[[:space:]]Neuroalgebraic[[:space:]]Geometry/b5773a8e-eb0d-4b6e-ad7d-5a02e5eed742_origin.pdf filter=lfs diff=lfs merge=lfs -text
2307
+ 2025/Position_[[:space:]]All[[:space:]]Current[[:space:]]Generative[[:space:]]Fidelity[[:space:]]and[[:space:]]Diversity[[:space:]]Metrics[[:space:]]are[[:space:]]Flawed/331ffdca-24ea-48cc-9394-1a0cfdf96ed9_origin.pdf filter=lfs diff=lfs merge=lfs -text
2308
+ 2025/Position_[[:space:]]An[[:space:]]Empirically[[:space:]]Grounded[[:space:]]Identifiability[[:space:]]Theory[[:space:]]Will[[:space:]]Accelerate[[:space:]]Self[[:space:]]Supervised[[:space:]]Learning[[:space:]]Research/cf9e4c00-abfb-45f3-a8cf-57a6eed81565_origin.pdf filter=lfs diff=lfs merge=lfs -text
2309
+ 2025/Position_[[:space:]]Beyond[[:space:]]Assistance[[:space:]]–[[:space:]]Reimagining[[:space:]]LLMs[[:space:]]as[[:space:]]Ethical[[:space:]]and[[:space:]]Adaptive[[:space:]]Co-Creators[[:space:]]in[[:space:]]Mental[[:space:]]Health[[:space:]]Care/9612bdb1-e90c-4d36-a2e2-f2ab9aec8f97_origin.pdf filter=lfs diff=lfs merge=lfs -text
2310
+ 2025/Position_[[:space:]]Build[[:space:]]Agent[[:space:]]Advocates,[[:space:]]Not[[:space:]]Platform[[:space:]]Agents/73ee9be5-fcfe-412c-b7af-4aa038aaac15_origin.pdf filter=lfs diff=lfs merge=lfs -text
2311
+ 2025/Position_[[:space:]]Causal[[:space:]]Machine[[:space:]]Learning[[:space:]]Requires[[:space:]]Rigorous[[:space:]]Synthetic[[:space:]]Experiments[[:space:]]for[[:space:]]Broader[[:space:]]Adoption/09fa4e78-7b70-41cf-b1e9-257747bb8737_origin.pdf filter=lfs diff=lfs merge=lfs -text
2312
+ 2025/Position_[[:space:]]Certified[[:space:]]Robustness[[:space:]]Does[[:space:]]Not[[:space:]](Yet)[[:space:]]Imply[[:space:]]Model[[:space:]]Security/b785bae0-d2a3-43fe-8dd2-d36e5f240a3f_origin.pdf filter=lfs diff=lfs merge=lfs -text
2313
+ 2025/Position_[[:space:]]Challenges[[:space:]]and[[:space:]]Future[[:space:]]Directions[[:space:]]of[[:space:]]Data-Centric[[:space:]]AI[[:space:]]Alignment/83bd2a27-60f0-4a10-9ae2-44ee3168fb2a_origin.pdf filter=lfs diff=lfs merge=lfs -text
2314
+ 2025/Position_[[:space:]]Constants[[:space:]]are[[:space:]]Critical[[:space:]]in[[:space:]]Regret[[:space:]]Bounds[[:space:]]for[[:space:]]Reinforcement[[:space:]]Learning/ed38b27e-6b10-4719-9a48-18abead299cc_origin.pdf filter=lfs diff=lfs merge=lfs -text
2315
+ 2025/Position_[[:space:]]Contextual[[:space:]]Integrity[[:space:]]is[[:space:]]Inadequately[[:space:]]Applied[[:space:]]to[[:space:]]Language[[:space:]]Models/d01fc31d-f997-4cf6-a49b-8789fa235a61_origin.pdf filter=lfs diff=lfs merge=lfs -text
2316
+ 2025/Position_[[:space:]]Current[[:space:]]Model[[:space:]]Licensing[[:space:]]Practices[[:space:]]are[[:space:]]Dragging[[:space:]]Us[[:space:]]into[[:space:]]a[[:space:]]Quagmire[[:space:]]of[[:space:]]Legal[[:space:]]Noncompliance/6f46be83-e332-4a4e-98ee-32fa28e33eee_origin.pdf filter=lfs diff=lfs merge=lfs -text
2317
+ 2025/Position_[[:space:]]Deep[[:space:]]Learning[[:space:]]is[[:space:]]Not[[:space:]]So[[:space:]]Mysterious[[:space:]]or[[:space:]]Different/e0af2c39-a0ec-41c8-9493-f7ddef3b1460_origin.pdf filter=lfs diff=lfs merge=lfs -text
2318
+ 2025/Position_[[:space:]]Democratic[[:space:]]AI[[:space:]]is[[:space:]]Possible.[[:space:]]The[[:space:]]Democracy[[:space:]]Levels[[:space:]]Framework[[:space:]]Shows[[:space:]]How[[:space:]]It[[:space:]]Might[[:space:]]Work./5ff1ae61-f68e-481e-bd85-ba0b9baf5b74_origin.pdf filter=lfs diff=lfs merge=lfs -text
2319
+ 2025/Position_[[:space:]]Editing[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Poses[[:space:]]Serious[[:space:]]Safety[[:space:]]Risks/158cca72-e4d5-4c68-a750-30425eed0e73_origin.pdf filter=lfs diff=lfs merge=lfs -text
2320
+ 2025/Position_[[:space:]]Enough[[:space:]]of[[:space:]]Scaling[[:space:]]LLMs![[:space:]]Lets[[:space:]]Focus[[:space:]]on[[:space:]]Downscaling/24de07fe-2fc2-46ef-8a03-370ea25af9fc_origin.pdf filter=lfs diff=lfs merge=lfs -text
2321
+ 2025/Position_[[:space:]]Evaluating[[:space:]]Generative[[:space:]]AI[[:space:]]Systems[[:space:]]Is[[:space:]]a[[:space:]]Social[[:space:]]Science[[:space:]]Measurement[[:space:]]Challenge/61c8b4b4-8d5e-4781-a3c3-ac57627b1db4_origin.pdf filter=lfs diff=lfs merge=lfs -text
2322
+ 2025/Position_[[:space:]]Explainable[[:space:]]AI[[:space:]]Cannot[[:space:]]Advance[[:space:]]Without[[:space:]]Better[[:space:]]User[[:space:]]Studies/c601e7e3-16f3-49ab-990f-27c0883076c4_origin.pdf filter=lfs diff=lfs merge=lfs -text
2323
+ 2025/Position_[[:space:]]Formal[[:space:]]Mathematical[[:space:]]Reasoning—A[[:space:]]New[[:space:]]Frontier[[:space:]]in[[:space:]]AI/997df0f0-def8-4662-b764-c2e427c5251d_origin.pdf filter=lfs diff=lfs merge=lfs -text
2324
+ 2025/Position_[[:space:]]Future[[:space:]]Research[[:space:]]and[[:space:]]Challenges[[:space:]]Remain[[:space:]]Towards[[:space:]]AI[[:space:]]for[[:space:]]Software[[:space:]]Engineering/e538fc65-699d-4eb4-a064-d9bc2c88429d_origin.pdf filter=lfs diff=lfs merge=lfs -text
2325
+ 2025/Position_[[:space:]]General[[:space:]]Intelligence[[:space:]]Requires[[:space:]]Reward-based[[:space:]]Pretraining/901839c2-3c02-4a60-8f75-8c816e8098e2_origin.pdf filter=lfs diff=lfs merge=lfs -text
2326
+ 2025/Position_[[:space:]]Generative[[:space:]]AI[[:space:]]Regulation[[:space:]]Can[[:space:]]Learn[[:space:]]from[[:space:]]Social[[:space:]]Media[[:space:]]Regulation/824909e5-84eb-4e70-8c01-90492372484c_origin.pdf filter=lfs diff=lfs merge=lfs -text
2327
+ 2025/Position_[[:space:]]Graph[[:space:]]Learning[[:space:]]Will[[:space:]]Lose[[:space:]]Relevance[[:space:]]Due[[:space:]]To[[:space:]]Poor[[:space:]]Benchmarks/9bc8a0f1-31d8-4c9b-8821-060f26791f6a_origin.pdf filter=lfs diff=lfs merge=lfs -text
2328
+ 2025/Position_[[:space:]]Graph[[:space:]]Matching[[:space:]]Systems[[:space:]]Deserve[[:space:]]Better[[:space:]]Benchmarks/61628fff-8e65-4f44-b52a-c4d74dc59db2_origin.pdf filter=lfs diff=lfs merge=lfs -text
2329
+ 2025/Position_[[:space:]]Human[[:space:]]Baselines[[:space:]]in[[:space:]]Model[[:space:]]Evaluations[[:space:]]Need[[:space:]]Rigor[[:space:]]and[[:space:]]Transparency[[:space:]](With[[:space:]]Recommendations[[:space:]]&[[:space:]]Reporting[[:space:]]Checklist)/bd409188-accf-4724-bb55-c4c453f69ecb_origin.pdf filter=lfs diff=lfs merge=lfs -text
2330
+ 2025/Position_[[:space:]]Humanity[[:space:]]Faces[[:space:]]Existential[[:space:]]Risk[[:space:]]from[[:space:]]Gradual[[:space:]]Disempowerment/10d4d339-c914-4db4-922e-5bd99da227a5_origin.pdf filter=lfs diff=lfs merge=lfs -text
2331
+ 2025/Position_[[:space:]]In-House[[:space:]]Evaluation[[:space:]]Is[[:space:]]Not[[:space:]]Enough.[[:space:]]Towards[[:space:]]Robust[[:space:]]Third-Party[[:space:]]Evaluation[[:space:]]and[[:space:]]Flaw[[:space:]]Disclosure[[:space:]]for[[:space:]]General-Purpose[[:space:]]AI/23d0c675-fb48-4986-9064-727f719e941e_origin.pdf filter=lfs diff=lfs merge=lfs -text
2332
+ 2025/Position_[[:space:]]It[[:space:]]Is[[:space:]]Time[[:space:]]We[[:space:]]Test[[:space:]]Neural[[:space:]]Computation[[:space:]]In[[:space:]]Vitro/7d798f62-f072-4d5b-a955-87b7bbfd82e4_origin.pdf filter=lfs diff=lfs merge=lfs -text
2333
+ 2025/Position_[[:space:]]Iterative[[:space:]]Online-Offline[[:space:]]Joint[[:space:]]Optimization[[:space:]]is[[:space:]]Needed[[:space:]]to[[:space:]]Manage[[:space:]]Complex[[:space:]]LLM[[:space:]]Copyright[[:space:]]Risks/9080203d-6b6b-43d4-b5a2-f894cbe2b14c_origin.pdf filter=lfs diff=lfs merge=lfs -text
2334
+ 2025/Position_[[:space:]]LLM[[:space:]]Social[[:space:]]Simulations[[:space:]]Are[[:space:]]a[[:space:]]Promising[[:space:]]Research[[:space:]]Method/aa9d4403-1bf1-47e4-811b-ba31c07213e6_origin.pdf filter=lfs diff=lfs merge=lfs -text
2335
+ 2025/Position_[[:space:]]LLMs[[:space:]]Need[[:space:]]a[[:space:]]Bayesian[[:space:]]Meta-Reasoning[[:space:]]Framework[[:space:]]for[[:space:]]More[[:space:]]Robust[[:space:]]and[[:space:]]Generalizable[[:space:]]Reasoning/6ad037da-8571-4bbe-a15d-b88584f66001_origin.pdf filter=lfs diff=lfs merge=lfs -text
2336
+ 2025/Position_[[:space:]]Language[[:space:]]model[[:space:]]developers[[:space:]]should[[:space:]]report[[:space:]]train-test[[:space:]]overlap/2b2e2e03-6348-462f-afa3-62b431597467_origin.pdf filter=lfs diff=lfs merge=lfs -text
2337
+ 2025/Position_[[:space:]]Lifetime[[:space:]]tuning[[:space:]]is[[:space:]]incompatible[[:space:]]with[[:space:]]continual[[:space:]]reinforcement[[:space:]]learning/ad85ab28-0150-4bdb-b23e-a2199d6b3232_origin.pdf filter=lfs diff=lfs merge=lfs -text
2338
+ 2025/Position_[[:space:]]Machine[[:space:]]Learning[[:space:]]Models[[:space:]]Have[[:space:]]a[[:space:]]Supply[[:space:]]Chain[[:space:]]Problem/56cc79fb-fe51-46f9-b6eb-d48149ae7460_origin.pdf filter=lfs diff=lfs merge=lfs -text
2339
+ 2025/Position_[[:space:]]Medical[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Benchmarks[[:space:]]Should[[:space:]]Prioritize[[:space:]]Construct[[:space:]]Validity/ec06d131-9432-4a42-99ad-2675157a370a_origin.pdf filter=lfs diff=lfs merge=lfs -text
2340
+ 2025/Position_[[:space:]]Not[[:space:]]All[[:space:]]Explanations[[:space:]]for[[:space:]]Deep[[:space:]]Learning[[:space:]]Phenomena[[:space:]]Are[[:space:]]Equally[[:space:]]Valuable/15c2f14c-70f1-4a1f-9016-655c2479b360_origin.pdf filter=lfs diff=lfs merge=lfs -text
2341
+ 2025/Position_[[:space:]]Political[[:space:]]Neutrality[[:space:]]in[[:space:]]AI[[:space:]]Is[[:space:]]Impossible[[:space:]]—[[:space:]]But[[:space:]]Here[[:space:]]Is[[:space:]]How[[:space:]]to[[:space:]]Approximate[[:space:]]It/abfeff22-a9e4-4ece-a567-de9d0a39f926_origin.pdf filter=lfs diff=lfs merge=lfs -text
2342
+ 2025/Position_[[:space:]]Principles[[:space:]]of[[:space:]]Animal[[:space:]]Cognition[[:space:]]to[[:space:]]Improve[[:space:]]LLM[[:space:]]Evaluations/a7b8d1fc-bd5a-45a1-aed8-0346ff16e9e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
2343
+ 2025/Position_[[:space:]]Probabilistic[[:space:]]Modelling[[:space:]]is[[:space:]]Sufficient[[:space:]]for[[:space:]]Causal[[:space:]]Inference/76407347-069c-469d-8f2a-1c4f3561d8b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
2344
+ 2025/Position_[[:space:]]Rethinking[[:space:]]Explainable[[:space:]]Machine[[:space:]]Learning[[:space:]]as[[:space:]]Applied[[:space:]]Statistics/e4b5e769-0ba5-4c01-bc5d-b6d610812b80_origin.pdf filter=lfs diff=lfs merge=lfs -text
2345
+ 2025/Position_[[:space:]]Rethinking[[:space:]]LLM[[:space:]]Bias[[:space:]]Probing[[:space:]]Using[[:space:]]Lessons[[:space:]]from[[:space:]]the[[:space:]]Social[[:space:]]Sciences/be0013ab-80bd-4a6a-b470-7d5809345d72_origin.pdf filter=lfs diff=lfs merge=lfs -text
2346
+ 2025/Position_[[:space:]]Retrieval-augmented[[:space:]]systems[[:space:]]can[[:space:]]be[[:space:]]dangerous[[:space:]]medical[[:space:]]communicators/9aa81f60-4032-4e06-935a-6e0a5892a2e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/db3c9a58-1fb5-4f35-911c-c9f8cd55e9b5_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0f19ded17bff958ba3709eaba58a66e7ff06ca8df66160ddd90ab1f36a8d058
3
+ size 1172922
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/full.md ADDED
@@ -0,0 +1,770 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Policy Filtration for RLHF to Mitigate Noise in Reward Models
2
+
3
+ Chuheng Zhang\*1 Wei Shen\*2 Li Zhao\* Xuyun Zhang\* Xiaolong Xu\*4 Wanchun Dou\* Jiang Bian
4
+
5
+ # Abstract
6
+
7
+ While direct policy optimization methods exist, pioneering LLMs are fine-tuned with reinforcement learning from human feedback (RLHF) to generate better responses under the supervision of a reward model learned from preference data. One major challenge of RLHF is the inaccuracy of the intermediate reward model, especially in the tasks that requires complex reasoning for the reward model to score a response. We find that the reliability of the reward model varies across responses assigned with different rewards. This motivates us to filter the samples whose rewards may be unreliable to improve the signal-to-noise ratio during policy learning, resulting in Policy Filtration for Proximal Policy Optimization (PF-PPO). To choose a proper policy filtering strategy, we use the coefficient of determination $(R^2)$ between the rewards and actual scores on filtered samples as the metrics to help us find promising strategies since it measures how well the rewards filtered by PF-PPO indicate real performance. We provide extensive experiments to validate the effectiveness of PF-PPO in code generation and math reasoning tasks. In code generation, PF-PPO achieves the state-of-the-art performance of 7-billion-parameter models on HumanEval $(+7.9\%)$ , MBPP $(+0.7\%)$ , and LeetCode Contest $(+10.0\%)$ which is a more challenging benchmark created by us. In math reasoning, PF-PPO yields performance increase using different reward models and benchmarks (Ape210K and CMATH). Code is available on https://github.com/swtheing/PF-PPO-RLHF.
8
+
9
+ ![](images/8763aae395b076f3d681d3bc0f3e7bdfe531f22bbc64fc048f084487e83070b0.jpg)
10
+ Figure 1. The reward model can be inaccurate, i.e., the actual score of the response does not align well with the reward given by the reward model. However, the reward model in specific regions (e.g., when it gives rewards higher than 0.8) is more reliable, i.e., the responses with similar rewards result in consistent performance. We use a fine-tuned policy to generate 10 responses for each of the 164 prompts in the HumanEval dataset and use a reward model trained with the common recipe to generate their rewards. We group the responses with similar rewards and calculate the average of their actual scores (i.e., the average correctness), indicating each group by one point. To evaluate the reliability of the reward model, we repeat the process ten times corresponding to the ten lines.
11
+
12
+ # 1. Introduction
13
+
14
+ Reinforcement Learning from Human Feedback (RLHF) is a key technique to align large language models (LLMs) with human values and preferences (Christiano et al., 2017; Ziegler et al., 2019; Ouyang et al., 2022). RLHF has been proven to be an essential process for LLMs to produce more helpful, harmless, and honest responses (Bai et al., 2022). Despite various non-RL algorithms such as DPO (Rafailov et al., 2024) are proposed, state-of-the-art applications such as ChatGPT/GPT-4 (OpenAI, 2023), Claude (Anthropic, 2023), and Gemini (Team et al., 2023) adopt the RL algorithm (e.g., PPO) for policy optimization. The key challenge of RLHF is the inaccuracy of the intermediate reward model. While there are researchers investigate how to learn reliable reward models (see e.g., Wang et al., 2024), we focus on how to learn better policy under the guidance of such inaccurate reward models.
15
+
16
+ We observe that, though the reward model gives inaccurate
17
+
18
+ rewards in general, it can be more reliable in specific regions (e.g., when it gives high rewards) than the others. The observation is based on the simple experiment: We use a policy model fine-tuned for code generation to generate a set of responses for prompts in the HumanEval dataset. Later, we score these responses using a reward model trained with the common recipe (see Ouyang et al., 2022, and also Section 2) and compare them with the actual scores. We find that, across different sets of samples, the reward model is more reliable when it gives high or low rewards than when it gives moderate rewards (cf. Figure 1). This property also holds on other datasets and tasks and see Appendix A for more experiment results and further discussion. Considering that RLHF updates the policy solely based on the reward signal, this observation motivates us to filter out the samples with possibly unreliable rewards aiming to improve RLHF by increasing the signal-to-noise ratio on training samples.
19
+
20
+ Based on this motivation, we propose a simple modification to the standard PPO-based RLHF algorithm (Ouyang et al., 2022), resulting in Policy Filtration for PPO (PF-PPO). As in standard PPO, we generate $N$ samples for each prompt and score these samples using the reward model. Then, we use a filtered subset of these samples in PF-PPO for subsequent policy training. We design filtering strategies to improve the reliability of the reward model on the filtered samples by maximizing the coefficient of determination $(R^2)$ between the rewards and actual scores on these filtered samples. We show that the rewards of these filtered samples are more accurate, thus providing better training signal and improving the performance of the policy. Our method is also connected with reject sampling that filters out responses with low rewards during inference to yield a better response. Reject sampling is a simple but surprisingly strong inference-time strategy, whereas we adopt similar filtration in an RL algorithm.
21
+
22
+ Empirically, we show that PF-PPO can improve the performance of LLMs on the tasks where the complex logic makes the reward model inaccurate in general. We conduct extensive ablation studies to validate the design of our algorithm. In code generation, we illustrate the effectiveness of our algorithm by fine-tuning LLMs that achieves new sota on HumanEval and MBPP benchmarks across 7-billion-parameter LLMs. We also create the LeetCode Contest benchmark that includes competition-level coding tasks for human experts and observe that PF-PPO results in even more significant improvement on this challenging benchmark. In math reasoning, we demonstrate that PF-PPO can improve the performance across different types of reward models.
23
+
24
+ # 2. Related Work
25
+
26
+ Limitation of reward model. The outcome of RLHF highly relies on the quality of the reward model. Unfortunately, the reward model can hardly provide accurate scores due to 1) the mis-specified reward modeling to represent human preferences (Lambert et al., 2023; Pitis, 2023); 2) the presence of incorrect and ambiguous preferences in the dataset (Ouyang et al., 2022; Bai et al., 2022), and 3) the poor generalization ability of the reward model (McKinney et al., 2023). The inaccuracy of reward model is attributed as one major cause of reward hacking and hallucination in LLMs (Kalai & Vempala, 2024). While there are previous papers try to improve the accuracy of the reward model itself (Wang et al., 2024; Coste et al., 2023; Zhang et al., 2024), the objective of our paper is to design a better RLHF algorithm in the face of inaccurate reward models. Moreover, Bai et al. (2022) also mentioned that using the output of the reward model directly in the RLHF process may not be a good choice. A possible solution is to penalize the outputs with low rewards more to improve the worst-case responses but they did not further implement this.
27
+
28
+ Reject sampling. Reject sampling (or best-of-N sampling) is a popular and effective inference-time strategy to enhance the response of an LLM by generating $N$ responses and select the best one according to a reward model (Nakano et al., 2021; Cobbe et al., 2021). This trick can yield good responses while keeping a tight KL constraint to the original policy. Inspired by its effectiveness in inference, researchers also try to involve this trick in policy optimization. For example, RAFT (Dong et al., 2023), BOND (Sessa et al., 2024) and vBoN (Amini et al., 2024) learn a policy that distills the best-of- $N$ policy using supervised fine-tuning losses. In a boarder sense, the rank information of the $N$ samples can also be leveraged. For example, RRHF (Yuan et al., 2023) and PRO (Song et al., 2024) train the policy using the combination of a ranking loss and a SFT loss (w.r.t. the best response) based on $N$ responses for each prompt. However, these algorithms do not adopt an elaborate RL algorithm, while state-of-the-art language models adopts RL algorithms in alignment, benefiting from the generalization power of the reward model especially in reasoning tasks (Ivison et al., 2024). Unlike these algorithms, we adopt the idea of reject sampling in the sampling phase of an RL algorithm instead of using supervised learning losses.
29
+
30
+ RLHF algorithms in the face of inaccurate reward models. One key challenge in RLHF is the inaccuracy of reward model, which can lead to reward over-optimization (Gao et al., 2023; Skalse et al., 2022; Chaudhari et al., 2024). Optimization with a policy constraint (e.g., a KL divergence between the target policy and the reference policy) is a remedy frequently used in not only RL-based algorithms (Ouyang et al., 2022; Wu et al., 2023; Zhu et al., 2023) but also di
31
+
32
+ rect policy optimization algorithms (Rafailov et al., 2024; Zhao et al., 2023; Liu et al., 2023). Going beyond policy constraint, Moskovitz et al. (2023) only maximize rewards up to a threshold to avoid excessive deviation from a pretrained policy. In this paper, we not only rely on the policy constraint to optimize in the face of inaccurate rewards but also try to avoid using samples with unreliable rewards.
33
+
34
+ # 3. Preliminary
35
+
36
+ Notations. We use $[a, b]$ to denote the set $\{a, a + 1, \dots, b\}$ and use $[b]$ as the shorthand for $[1, b]$ . We use $\oplus$ to denote the concatenation on tokens, and use $x_{a:b}$ as the shorthand for the concatenation $(x_a \oplus x_{a+1} \oplus \dots \oplus x_b)$ . We use $c_i$ and $y_i$ to indicate the $i$ -th token in the context $c$ (including task instruction, prompt, inputs, etc.) and the response $y$ respectively.
37
+
38
+ MDP formulation. We adopt a Markov decision process (MDP) formulation for RLHF. Specifically, language generation is formulated as an MDP $M = (\mathcal{S},\mathcal{A},P,R)$ with states $s\in S$ , actions $a\in \mathcal{A}$ , transition probabilities $P\in \Delta (\mathcal{S})^{S\times \mathcal{A}}$ , and the next-state-based reward function $R:S\to [0,1]$ . Given a context $c$ with $T_{c}$ tokens, on each step $t\in [T_c + 1,T]^1$ , the language model $\pi_{\theta}(a_t|s_t)$ selects a token $a_{t} = y_{t - T_{c}}$ based on the state $s_t\coloneqq (c_{1:T_c}\oplus y_{1:t - T_c - 1})$ . Then, the language model enters the next state $s_{t + 1}\coloneqq (c_{1:T_c}\oplus y_{1:t - T_c})$ until the language model completes the response $y_{1:T - T_c}$ . For simplicity, we will also use contextual-bandit-style notations, e.g., we denote the language generation process as $y\sim \pi_{\theta}(\cdot |c)$ .
39
+
40
+ RLHF. Reinforcement learning with human feedback (RLHF) is an important process to address objective mismatch between the next-token-prediction objective in pretraining and our expectation of LLMs to follow the instructions and assist humans to complete various tasks. We briefly review the pipeline of RLHF.
41
+
42
+ - Supervised fine-tuning. In the supervised fine-tuning (SFT) phase, a pre-trained LLM is fine-tuned with a high-quality supervised dataset collected for specific downstream tasks. Typically, the LLM is fine-tuned with a maximum likelihood loss, and we denote the output of this phase as $\pi^{\mathrm{SFT}}$ . While subsequent RLHF procedure is necessary for training high-quality LLMs, this phase alone can also yield an LLM that reasonably follows human instructions (see e.g., Longpre et al., 2023).
43
+ - Reward model learning. In the reward model learning phase, we learn a reward model $R_{\phi}(y|c) \in [-1,1]$ parameterized by $\phi$ that scores the response $y$ to the context $c$
44
+
45
+ based on collected preference data $\mathcal{D}_{\mathrm{HF}}\coloneqq \{(c,y^w,y^l)\}$ specifying that $y^{w}$ is a preferred response to $c$ than $y^{l}$ . The reward model is initialized by $\pi^{\mathrm{SFT}}$ with an additional output layer. A preference model links the reward model with the preference data, and Bradley-Terry model (Bradley & Terry, 1952) is a common choice:
46
+
47
+ $$
48
+ \mathbb {P} \left(y ^ {w} \succ y ^ {l} | c\right) = \sigma \left(R _ {\phi} \left(y ^ {w} | c\right) - R _ {\phi} \left(y ^ {l} | c\right)\right), \tag {1}
49
+ $$
50
+
51
+ where $\sigma$ is the sigmoid function. The learning objective of reward model is to maximize the log-probability on preference data:
52
+
53
+ $$
54
+ \max _ {\phi} \mathbb {E} _ {(c, y _ {w}, y _ {l}) \sim \mathcal {D} _ {\mathrm {H F}}} [ \log \mathbb {P} (y _ {w} \succ y _ {l} | c) ]. \tag {2}
55
+ $$
56
+
57
+ - RL fine-tuning. In this stage, we fine-tune the language model $\pi_{\theta}$ to maximize the rewards given by the reward model with a policy constraint. The optimization problem is formulated as
58
+
59
+ $$
60
+ \max _ {\theta} \mathbb {E} _ {c} \mathbb {E} _ {y \sim \pi_ {\theta} (\cdot | c)} [ r _ {\phi} (y | c) - \beta D _ {\mathrm {K L}} (\pi_ {\theta} (\cdot | c) | | \pi^ {\mathrm {S F T}} (\cdot | c)) ]. \tag {3}
61
+ $$
62
+
63
+ The second term prevents the learned policy deviating too much from the SFT model, and this is a popular technique to alleviate reward over-optimization (Jaques et al., 2019; Stiennon et al., 2020).
64
+
65
+ PPO. Proximal policy optimization (PPO) (Schulman et al., 2017) is an RL algorithm that uses a clipped version of the policy gradient for more conservative and stable learning. It becomes a standard algorithm for RL fine-tuning in RLHF that optimizes the modified (cumulative) reward
66
+
67
+ $$
68
+ \begin{array}{l} r _ {\phi} (y | c) - \sum_ {t = T _ {c} + 1} ^ {T} \beta \left(\log \pi_ {\theta} \left(y _ {t} \mid c \oplus y _ {1: t - 1}\right) \right. \tag {4} \\ \left. - \log \pi^ {\mathrm {S F T}} \left(y _ {t} \mid c \oplus y _ {1: t - 1}\right)\right) \\ \end{array}
69
+ $$
70
+
71
+ where the reward model gives sparse rewards and the policy constraint yields dense rewards. PPO is an on-policy algorithm where the policy gradient is estimated based on the samples collected by the current policy $\pi_{\theta}$ .
72
+
73
+ # Algorithm 1 Proximal policy optimization (PPO)
74
+
75
+ for iteration $= 1,2,\dots$ do
76
+
77
+ Fill the buffer $\mathcal{B}$ with samples collected by the current language model $\pi_{\theta}$
78
+
79
+ Update $\pi_{\theta}$ using PPO w.r.t. the cumulative reward defined in Equation (4) based on $\mathcal{B}$
80
+
81
+ end for
82
+
83
+ # 4. Methods
84
+
85
+ Our method is motivated by the observation that the reward model is more reliable for the responses assigned with high/low rewards (cf. Figure 1). Consequently, we conjecture
86
+
87
+ Algorithm 2 Policy Filtration Proximal policy Optimization (PF-PPO)
88
+
89
+ <table><tr><td>for iteration = 1, 2,··· do</td></tr><tr><td>Fill the buffer B with samples collected by the current language model μθ</td></tr><tr><td>Update πθ using PPO w.r.t. the cumulative reward defined in Equation (4) based on B</td></tr><tr><td>end for</td></tr></table>
90
+
91
+ that, if we wrap the policy with proper filtration during policy optimization of RLHF, the reward model can avoid yielding unreliable rewards and thus give better signal to guide policy learning.
92
+
93
+ Policy filtration. Given an unfiltered policy model $\pi_{\theta}(y|c)$ that generates responses $y$ to the context $c$ , we denote the corresponding filtered policy as $\mu_{\theta}(y|c)$ . We consider a family of policy filtration, from which we can sample responses to the context $c$ as follows: We first sample $N$ responses from $\pi_{\theta}(\cdot |c)$ and rank them by the reward model $R_{\phi}$ , obtaining $y_{1},\dots ,y_{N}$ with $R_{\phi}(y_1|c)\geq \dots \geq R_{\phi}(y_N|c)$ . Then, given a weight vector $\mathbf{w} = (w_{1},\dots ,w_{N})$ satisfying $\sum_{i\in [N]}w_i = 1$ , we sample a one-hot vector $\mathbf{z} = (z_{1},\dots ,z_{N})$ from the categorical distribution parameterized by $\mathbf{w}$ such that $\mathbb{P}[z_i = 1] = w_i$ . At last, the filtered policy $\mu_{\theta}(\cdot |c)$ yields the response selected by $\mathbf{z}$ following $y = \sum_{i\in [N]}z_{i}y_{i}$ .
94
+
95
+ We can define several filtered policies under this family. Specifically, we obtain the best-of- $N$ (BoN), best-random (BR), and best-worst (BW) filtered policy by setting the weight vector as follows:
96
+
97
+ $$
98
+ \mathbf {w} ^ {\mathrm {B o N}} = (1, 0, \dots , 0)
99
+ $$
100
+
101
+ $$
102
+ \mathbf {w} ^ {\mathrm {B R}} = \left(\frac {1}{2}, \frac {1}{2 (N - 1)}, \dots , \frac {1}{2 (N - 1)}\right) \tag {5}
103
+ $$
104
+
105
+ $$
106
+ \mathbf {w} ^ {\mathrm {B W}} = \left(\frac {1}{2}, 0, \dots , 0, \frac {1}{2}\right).
107
+ $$
108
+
109
+ Training objective. Since our target is to learn a good filtered policy $\mu_{\theta}$ , we consider the follow objective:
110
+
111
+ $$
112
+ \max _ {\theta} \mathbb {E} _ {c} \mathbb {E} _ {y \sim \mu_ {\theta} (\cdot | c)} \left[ r _ {\phi} (y | c) - \beta D _ {\mathrm {K L}} \left(\mu_ {\theta} (\cdot | x) \right| \mid \pi^ {\mathrm {S F T}} (\cdot | x)) \right]. \tag {6}
113
+ $$
114
+
115
+ In practice, use the samples collected by the unfiltered policy $\pi_{\theta}$ as if they were collected by $\mu_{\theta}$ in the original PPO algorithm. This leads to Policy Filtration Proximal Policy Optimization (PF-PPO) listed in Algorithm 2, which is an algorithm that only modifies the sampling process of PPO.
116
+
117
+ Weight choice. By defining different weight vectors $\mathbf{w}$ , we can obtain different policy filtering strategies for PF-PPO. Our objective is to choose a weight vector $\mathbf{w}$ such that the accuracy of the reward model on the responses generated
118
+
119
+ <table><tr><td>Policy</td><td>No filter</td><td>BoN</td><td>BR</td><td>BW</td></tr><tr><td>SFT</td><td>0.886</td><td>0.454</td><td>0.922</td><td>0.952</td></tr><tr><td>Middle RLHF</td><td>0.907</td><td>0.389</td><td>0.935</td><td>0.956</td></tr><tr><td>Final RLHF</td><td>0.876</td><td>0.431</td><td>0.916</td><td>0.946</td></tr></table>
120
+
121
+ Table 1. The coefficient of determination $(R^2)$ of the unfiltered policy $\pi_{\theta}$ and different filtered policies $\mu_{\theta}$ between the rewards given by the reward model and the actual scores. This metrics correlates well with the final performance (see Section 5) and helps us to determine the weight vector (or the policy filtering strategy) in our algorithm PF-PPO. We choose the SFT policy and the middle/final RLHF policy as the unfiltered policy $\pi_{\theta}$ respectively.
122
+
123
+ by the filtered policies can be maximized. To measure this accuracy, we choose a simple heuristic, the coefficient of determination (aka R-squared or $R^2$ ) (Draper, 1998) between the rewards and the actual scores of the responses generated by the policy. $R^2$ measures how well the actual scores can be predicted by the rewards with a linear model. Specifically, given a set of responses $\{(c_i,y_i)\}$ sampled from the filtered policy $y_{i}\sim \mu_{\theta}(\cdot |c_{i})$ , we can collect the corresponding reward $R_{i}\coloneqq R_{\phi}(y_{i}|c_{i})$ and the actual score $s_i$ . Then, we fit a linear model $f$ to predict the actual score based on the reward and denote the predicted score as $\hat{s}_i = f(R_i)$ . The R-squared is calculated as $1 - \frac{\sum_{i}(s_{i} - \hat{s}_{i})^{2}}{\sum_{i}(s_{i} - \bar{s})^{2}}$ where $\bar{s}$ is the average of actual scores. Since PF-PPO optimizes the policy based on the rewards on these responses, how well these rewards indicate the actual performance is closely related to the final performance of our algorithm. We find $R^2$ well correlates with the final performance and can imply the level of reward over-optimization of the subsequent RLHF algorithm, therefore serving as a useful metrics to determine the weight vector used in PF-PPO.
124
+
125
+ To select a weight vector, we first checkpoint three policies $\pi_{\theta}$ collected from different stages of a standard RLHF process and collect responses using filtered policies $\mu_{\theta}$ in combination with different policy filtering strategies. Then, we group the responses with similar rewards, record the average actual score and reward for each group, and calculate the $R^2$ by treating each group as a sample point. We exam how different policy filtering strategies can improve the reliability of the rewards on the responses generated by the corresponding filtered policies.
126
+
127
+ We present the results in Table 1. We observe that best-random (BR) and best-worst (BW) can improve the reliability of the given reward model on sampled responses compared with unfiltered policy. The BoN strategy does not improve the $R^2$ , which indicates that learning a BoN filtered policy may not result in good performance in RL, although learning for a best-of- $N$ policy using supervised learning presents good performance (Sessa et al., 2024).
128
+
129
+ # 5. Experiments
130
+
131
+ # 5.1. Benchmarks
132
+
133
+ We conduct experiments on two tasks where the quality of LLM responses can be precisely measured, code generation and math reasoning. Specifically, we evaluate the algorithms using the following benchmarks.
134
+
135
+ HumanEval benchmark and MBPP benchmark. HumanEval (Chen et al., 2021) and MBPP (Austin et al., 2021) are two popular benchmarks for evaluating code LLMs. HumanEval includes 164 Python problems, each of which is associated with multiple test cases used to assess the correctness of generated code in a zero-shot setting. Similarly, MBPP includes 378 problems.
136
+
137
+ To train models for these two benchmarks, we select data from 75k Magicoder-OSS-instruct (Wei et al., 2023b) and 55k evol-codealpaca-v1 (Luo et al., 2023) to construct the SFT dataset, the reward model dataset, and the PPO query dataset. For SFT, we use all the 130k training samples from Magicoder-OSS-instruct and evol-codealpaca-v1. For reward modeling, we curate 7k prompts from these 130k samples and generate five responses using the SFT model for each prompt. Following the methodology in Pal et al. (2024), we select two responses with the maximum edit distance to create response pairs for each prompt. We use these 7k prompts with generated response pairs as the reward model dataset. For policy optimization, we curate 3k prompts from the 130k samples as the PPO query dataset.
138
+
139
+ LeetCode contest benchmark. To evaluate code LLMs on more challenging problems, we construct the LeetCode Contest benchmark. This benchmark includes competition-level problems designed for human, and therefore is more challenging since it requires human-level problem understanding and code generation skills. In this benchmark, we collect 160 problems from LeetCode weekly contests from July 2022 to January 2024. For each problem, we include 100 test cases to ensure the generated code is assessed thoroughly.
140
+
141
+ To train models for this benchmark, we construct LeetCode training datasets comprising 1,000 problems collected from the LeetCode website. For SFT, we use self-generated correct answers to create the SFT dataset following the methodology in Setlur et al. (2024). For reward modeling, we generate five responses using the SFT model for each of the 400 curated prompts and selected two responses for each prompt following the similar procedure as above. For policy optimization, we used the full 1,000 prompts as our PPO query dataset to train the code LLM.
142
+
143
+ Ape210K and CMATH benchmarks. Ape210K (Zhao et al., 2020) and CMATH (Wei et al., 2023a) are two popular Chinese benchmarks for elementary-school-level math
144
+
145
+ reasoning tasks. Ape210K contains 210k diverse math problems and we use a separate split of 5k problems for evaluation, following the practice in Zhao et al. (2020). CMATH contains 1.7k math word problems sourcing from actual Chinese workbooks and exams. We check the correctness of the answers using the automatic evaluation scripts provided in Zhou et al. (2024). To train models for math reasoning, we use the training split of 200k problems from Ape210K.
146
+
147
+ # 5.2. Implementation Details
148
+
149
+ We use deepseek-6.7B (Guo et al., 2024) and Qwen1.5-7B (Team, 2024) as our base model for code generation and math reasoning respectively. In the SFT phase, we train on the SFT dataset for 5 epochs with the learning rate $1 \times 10^{-5}$ , resulting in the SFT policy. In the reward model training phase, we follow Ouyang et al. (2022) and train on our reward model dataset for 1 epoch with the learning rate $1 \times 10^{-5}$ . In the PPO phase, we adopt the training tricks from the blog (Shen et al., 2024). Specifically, we adopt reward normalization and advantage normalization for stable training. In addition, we set the learning rate for the policy network as $5 \times 10^{-7}$ and learning rate for the value network as $9 \times 10^{-6}$ . In the PPO algorithm, we collect responses for the context in the PPO query dataset and iterate through this dataset for 5 iterations (enough for convergence) and select the best checkpoints on evaluation set as the outcome policy. For each collected context-response pair, we use it to accumulate loss and gradient for 3 times on average. We use full parameter fine-tuning in all the phases. We provide the source code for all experiments in the supplementary.
150
+
151
+ # 5.3. Experiment Results on Code Generation
152
+
153
+ Baselines. For code generation, we compare different variants of PF-PPO with reinforcement learning algorithms, supervised fine-tuning methods, and direct policy optimization methods. We use greedy decoding during inference and pass@1 (Chen et al., 2021) as the performance metrics. For fair comparison between different baselines, we re-implement these baselines with the same code base and the same datasets. We also use the same reward model and the same SFT policy if applicable.
154
+
155
+ Supervised fine-tuning. Starting from deepseek-6.7B, we first fine-tune this policy on the SFT dataset. Other algorithms learn based on this SFT policy. RAFT (Dong et al., 2023) and BOND (Sessa et al., 2024) train the policy to fit the best-of- $N$ (BoN) responses or the BoN policy via different supervised learning losses. RAFT maximizes the log-probability of the BoN response, whereas BOND minimizes a combination of the forward and backward KL divergence w.r.t. the BoN policy. We set the coefficient to combine these two loss terms as $\beta_{\mathrm{BOND}} = 1.0$ . BOND is an iterative algorithm to fit the BoN policy based on the policy of the
156
+
157
+ <table><tr><td>Family</td><td>Method</td><td>HumanEval</td><td>MBPP</td><td>LeetCode</td></tr><tr><td rowspan="3">Supervised Fine-Tuning</td><td>SFT</td><td>74.2</td><td>70.8</td><td>15.2</td></tr><tr><td>RAFT (Dong et al., 2023)</td><td>76.9</td><td>71.3</td><td>17.8</td></tr><tr><td>BOND (Sessa et al., 2024)</td><td>80.8</td><td>75.2</td><td>30.0</td></tr><tr><td rowspan="4">Direct Policy Optimization</td><td>DPO (Rafailov et al., 2024)</td><td>78.4</td><td>73.7</td><td>23.0</td></tr><tr><td>IPO (Azar et al., 2024)</td><td>78.2</td><td>72.9</td><td>23.2</td></tr><tr><td>KTO (Ethayarajh et al., 2024)</td><td>77.9</td><td>72.5</td><td>22.4</td></tr><tr><td>Iterative-DPO (Pang et al., 2024)</td><td>78.1</td><td>74.8</td><td>23.8</td></tr><tr><td rowspan="5">Reinforcement Learning</td><td>PPO-S (Hu et al., 2024)</td><td>78.1</td><td>73.8</td><td>25.2</td></tr><tr><td>PPO-M (cf. Shao et al., 2024)</td><td>80.2</td><td>75.0</td><td>29.8</td></tr><tr><td>PF-PPO (BoN)</td><td>75.8</td><td>71.7</td><td>16.8</td></tr><tr><td>PF-PPO (BR)</td><td>82.9</td><td>75.9</td><td>33.0</td></tr><tr><td>PF-PPO (BW)</td><td>82.4</td><td>76.2</td><td>30.4</td></tr><tr><td>SOTA (7B models)</td><td>Magicoder (Wei et al., 2023b)</td><td>76.8</td><td>75.7</td><td></td></tr></table>
158
+
159
+ Table 2. The performance of different algorithms on Code Generation. We compare pass@1 of PF-PPO (our algorithm) against baseline methods. For each benchmark, we select the best score across 5 epochs for each method. The highest and the second highest scores on each benchmark are highlighted in bold and underline respectively. All experiments are based on the same code base for fair comparison, except for the scores reported by Magicoder which is the best 7B model so far.
160
+
161
+ last iteration, and we train the policy for 4 iterations.
162
+
163
+ Direct policy optimization. To implement direct policy optimization methods, we use our reward model dataset as the preference dataset required in these methods. We implement DPO (Rafailov et al., 2024), IPO (Azar et al., 2024), KTO (Ethayarajh et al., 2024), and iterative DPO (Pang et al., 2024). For iterative DPO, we train the DPO model for three iterations. For each iteration, we construct the preference dataset as follows: The prompts are sampled from the reward model dataset and responses are generated by the trained DPO model from the previous iteration (if exists) or the previous SFT phase.
164
+
165
+ Reinforcement Learning. For standard RLHF, we use the implementation from OpenRLHF (Hu et al., 2024), which incorporates several advanced PPO training techniques and has demonstrates strong performance on various benchmarks. We denote this baseline as PPO-S. For our method PF-PPO, we implement three variants (BoN, BR, and BW) as introduced in the previous section. Since PF-PPO collects multiple responses for a given prompt/context, we introduce another baseline called PPO-M (PPO with multiple responses) that uses all the $N$ responses for training without filtering. The effective difference between PPO-S and PPO-M is that the buffer $\mathcal{B}$ in PPO-M contains more samples with the same context $c$ but with different responses $y$ which may provide detailed token-level instruction by comparing the responses corresponding to the same context. Therefore,
166
+
167
+ comparing with PPO-M can help us distinguish the effect of collecting multiple responses and that of filtering collected responses. For fair comparison, we ensure that the computational costs of PF-PPO for each iteration is no larger than those of PPO-M and PPO-S, and we refer the readers to Appendix C for the detailed analysis on the computational efficiency of PPO-S, PPO-M, and PF-PPO.
168
+
169
+ Experiment results. We present the pass@1 results of different methods on the three benchmarks in Table 2. The experiment results show that PF-PPO (BR) and PF-PPO (BW) obtain the highest scores on these benchmarks, indicating the effectiveness of our method. Furthermore, we have the following observations:
170
+
171
+ - IPO and KTO (improved versions of DPO) do not outperform DPO when trained on properly selected datasets. This indicates that appropriate dataset construction can address the weaknesses of DPO found in previous papers, enabling DPO to achieve a performance comparable to its improved versions.
172
+ - PPO-based algorithms outperform SFT-based and DPO-based algorithms in general, demonstrating that PPO is superior to these algorithms on reasoning tasks. We speculate that the good performance of PPO may stem from the generalization ability of the reward model and the value network used in PPO, which can be used to transform trajectory-level reward modeling to token-wise advantages and thus provides more fine-grained guidance. Moreover, the gap between PPO-based algorithms and the others becomes larger on the more challenging LeetCode benchmark, which further highlights the advantage of RL
173
+
174
+ ![](images/56cf6da2fdcb79ea880e2d97680bd6adc19749c2bd86033a20d524bb97c521a2.jpg)
175
+ Figure 2. Left: The training and evaluation reward of PPO-S, PPO-M, and FP-PPO on HumanEval. The training reward and the evaluation reward are evaluated on the samples generated by the filtered policy $\mu_{\theta}$ and the unfiltered policy $\pi_{\theta}$ respectively. Right: The pass@1 of PPO-S, PPO-M, and PF-PPO on the HumanEval benchmark.
176
+
177
+ ![](images/a35998a28f3ff624e161abbf6a09709fd5b48c7e317acd5ee513325b5cfc935c.jpg)
178
+
179
+ on complex reasoning tasks
180
+
181
+ - BOND achieves the highest score among the baseline methods. It demonstrates that iterative best-of- $N$ (BoN) distillation is an effective alignment approach. We speculate that BOND also benefits from its ability to reduce learning on samples with unreliable rewards by selecting the best candidate from a set of $N$ samples.
182
+ - Motivated by the good performance of BOND, we implement PF-PPO (BoN) as a natural attempt to apply BoN to an RL-based algorithm. However, PF-PPO (BoN) results in poor performance. This indicates that compared with SFT methods that only need good samples, bad samples for the contrastive learning purposes are also important for RL-based methods. This explains the reason why PF-PPO (BR) and PF-PPO (BW) outperform PF-PPO (BoN).
183
+ - PF-PPO (BR) and PF-PPO (BW) outperform the others with a larger gap challenging LeetCode tasks. We find that the accuracy of the reward model decreases on this benchmark since it is more difficult for the reward model to distinguish whether one response is better than another, especially when both responses contain errors. This decreases the reliability of the reward model in the moderate reward region (cf. Figure 1). Consequently, PF-PPO (BR) and PF-PPO (BW) can improve the performance in these complex reasoning tasks by avoiding learning on unreliable rewards.
184
+
185
+ Training curves. To provide a comprehensive view of the three algorithms, we show the details of the training process.
186
+
187
+ We first present the training curves of PPO-S, PPO-M, and PF-PPO in Figure 2 (left). The training rewards are evaluated on the samples collected by the filtered policy $\mu_{\theta}$ and the evaluation rewards are calculated on the unfiltered policy
188
+
189
+ $\pi_{\theta}$ . We observe that both the training reward and evaluation reward of PPO-M and PF-PPO surpass those of PPO-S. This indicates that sampling multiple responses from a context enhances the performance of the RLHF method, consistent with the findings in Shao et al. (2024). Moreover, in terms of optimizing reward for the same given reward model, FP-PPO achieves a higher or equal reward compared with PPO-S and PPO-M, which indicates that the approximation made in the FP-PPO (i.e., optimizing the unfiltered policy $\pi_{\theta}$ as if it were the filtered policy $\mu_{\theta}$ ) does not induce negative effect on its capability of optimizing the reward.
190
+
191
+ We also show the pass@1 results of different algorithms in Figure 2 (right). We observe that, while PF-PPO achieves a similar reward to that of PPO-M, the pass@1 result of PF-PPO exceeds that of PPO-M significantly. This results from the fact that PF-PPO optimizes on the reliable region of the reward model and thus alleviate the reward over-optimization issue.
192
+
193
+ # 5.4. Alternative Policy Filtering Strategies
194
+
195
+ PF-PPO modifies the sampling procedure of standard PPO by sampling $N$ responses and randomly filtering responses based on their ranks. In this part, we consider other alternatives to filter by threshold or down-weight the responses with unreliable rewards in the sampling procedure.
196
+
197
+ - Filtering based on reward thresholds. Given a reward model, we can filter the responses based on their rewards using specified threshold. This results in three strategies, PPO-top that only keeps the top samples whose rewards exceeding a certain threshold, PPO-top-random that keeps also keeps random samples with $50\%$ probability, and PPO-top-bottom that keeps top samples and bottom samples whose rewards are below another spec
198
+
199
+ <table><tr><td>Policy filtering strategies</td><td>pass@1 on Human Eval</td><td>pass@1 on MBPP</td><td>R2based on SFT policy</td></tr><tr><td>PPO</td><td>78.1</td><td>73.8</td><td>0.782</td></tr><tr><td>PPO-M</td><td>80.8</td><td>75.0</td><td>0.886</td></tr><tr><td>PF-PPO (BoN)</td><td>75.8</td><td>71.7</td><td>0.454</td></tr><tr><td>PF-PPO (BR)</td><td>82.9</td><td>75.9</td><td>0.841</td></tr><tr><td>PF-PPO (BW)</td><td>82.4</td><td>76.2</td><td>0.952</td></tr><tr><td>PPO-top</td><td>80.5</td><td>71.2</td><td>0.621</td></tr><tr><td>PPO-top-rand</td><td>81.9</td><td>75.3</td><td>0.889</td></tr><tr><td>PPO-top-bott</td><td>81.7</td><td>75.4</td><td>0.927</td></tr><tr><td>PPO-pow-1</td><td>81.0</td><td>74.2</td><td>0.926</td></tr><tr><td>PPO-pow-2</td><td>81.3</td><td>75.4</td><td>0.939</td></tr><tr><td>PPO-pow-3</td><td>81.9</td><td>76.5</td><td>0.946</td></tr></table>
200
+
201
+ ified threshold. These strategies can be regarded as the threshold version of PF-PPO (BoN), PF-PPO (BR) and PF-PPO (BW) respectively. The thresholds are tuned coarsely to achieve good results on a separate validation set.
202
+
203
+ - Filtering based on reward reweighting. Compared with the above strategies that use thresholds, we consider a softer version that adjusts the sample weights based on their rewards, aiming at down-weight the samples with moderate and possibly unreliable rewards. Specifically, we increase the sample weight of the responses with rewards in the reliable region and decrease the sample weight otherwise. To achieve this goal, given a reward model $R_{\phi}$ that returns rewards in the range $[-1, 1]$ , we assign the weight for the sample $(c, y)$ proportional to $|R_{\phi}(y|c)|^k$ and collect samples with these weights from the buffer $B$ to train the policy network and the value network. We denote these strategies as PPO-pow- $k$ .
204
+
205
+ A question then arises: how to choose a policy filtering strategy from these strategies? To answer this question, we propose to calculate the $R^2$ between the rewards and the actual scores on the samples collected by different strategies, and then choose a strategy with good results on this metrics. We can use the SFT policy as the unfiltered policy and calculate $R^2$ as described in Section 4. Since the SFT policy is obtained prior to the PPO training phase, this metric can be used to predict the results of different filtering strategies before actually conduct costly PPO training.
206
+
207
+ We compare theses strategies on HumanEval and present the performance of different policy filtering strategies and their corresponding $R^2$ in Table 3. We make the following observations: First, the $R^2$ of different strategies positively correlate with their performance in general, indicating
208
+
209
+ Table 3. The comparison on the pass@1 results of different policy filtering strategies on HumanEval and their corresponding $R^2$ based on the SFT policy. The background are colored based on their values with blue and red indicating the minimum and the maximum respectively.
210
+
211
+ <table><tr><td></td><td>Ape210K</td><td>CMATH</td></tr><tr><td>PPO-S + ORM</td><td>84.1</td><td>92.3</td></tr><tr><td>PF-PPO + ORM</td><td>86.2</td><td>95.1</td></tr><tr><td>PPO-S + Oracle</td><td>82.1</td><td>90.8</td></tr><tr><td>PF-PPO + Oracle</td><td>83.8</td><td>91.2</td></tr><tr><td>PPO-S + CRM</td><td>83.9</td><td>93.1</td></tr><tr><td>PF-PPO + CRM</td><td>84.3</td><td>94.2</td></tr></table>
212
+
213
+ Table 4. Comparison between PF-PPO and PPO-S on two math benchmarks (Ape210K and CMATH) using three different reward functions (the original reward model, the oracle model, and the combined reward model). Better results for each reward model is highlighted in bold.
214
+
215
+ $R^2$ can serve as a tool to predict the performance of different policy filtering strategies. Second, different policy filtering strategies (except for BoN versions) improve the performance of the base PPO algorithms. This indicates that filtering samples with unreliable rewards can increase the signal-to-noise ratio of the reward model feedback and thus improve the performance. Third, PF-PPO strategies (which are rank-based) outperforms other strategies (which are threshold-based or reweighting-based). This may due to the fact that rank-based strategies are more robust to the reward distribution of the given reward model.
216
+
217
+ Discussion. The performance of different policy filtering strategies may vary across different tasks, different reward models, and different base models. Therefore, although we find that PF-PPO (BR) and PF-PPO (BW) are the best strategies in our setting, other policy filtering strategies may be a better choice in other settings. Therefore, a more practical procedure should be first calculate the $R^2$ using the given reward model and the corresponding SFT policy on the specific task and select candidate policy filtering strategies. Note that $R^2$ is not a perfect tool to select policy filtering strategies and we leave seeking for better predictive metrics as a future research direction.
218
+
219
+ # 5.5. Experiment Results on Math Reasoning
220
+
221
+ To evaluate the effectiveness of PF-PPO in other domains and different types of reward models, we applied PF-PPO to solve math problems. We consider three types of reward models: the original reward model (ORM) that is trained on preference datasets using a Bradley-Terry model (Bradley & Terry, 1952), an oracle model (Oracle) that extracts the final answer from the response and compares it with the ground truth, and a combined reward model (CRM) that integrates the above two models, similar to the approach used in Qwen-Math (Yang et al., 2024). We compare PF-PPO (BR) to PPO-S using these reward models.
222
+
223
+ We can observe that PF-PPO consistently outperforms the
224
+
225
+ <table><tr><td>Task</td><td>Evaluation Set Size</td><td>BO1 Accuracy (%)</td><td>BO5 Accuracy (%)</td></tr><tr><td>Logic Reasoning</td><td>1,203</td><td>48.9 (+2.3)</td><td>63.8 (+2.8)</td></tr><tr><td>Math</td><td>1,759</td><td>69.7 (+1.1)</td><td>79.9 (+2.3)</td></tr><tr><td>Code</td><td>3,933</td><td>55.8 (-0.2)</td><td>67.4 (+0.1)</td></tr><tr><td>STEM</td><td>4,466</td><td>54.7 (-0.1)</td><td>63.1 (+0.1)</td></tr><tr><td>Complex Tasks</td><td>2,990</td><td>9.5 (+1.0)</td><td>14.9 (+0.6)</td></tr><tr><td>Instruction Following</td><td>1,525</td><td>49.6 (+1.7)</td><td>59.8 (+1.8)</td></tr><tr><td>Knowledge</td><td>775</td><td>47.3 (+1.9)</td><td>58.3 (+1.8)</td></tr><tr><td>Language Understanding</td><td>680</td><td>63.8 (+1.6)</td><td>68.4 (+3.8)</td></tr></table>
226
+
227
+ Table 5. Improvement of PF-PPO compared with PPO-S on a wide range of tasks. We present the best-of-1 (BO1) and best-of-5 (BO5) accuracies for PF-PPO and the accuracy improvement of PF-PPO compared to PPO-S. The results with significant improvement are highlighted in bold.
228
+
229
+ PPO algorithm on these two benchmarks across different reward models. In addition, the experiment results indicate that even if we can have access to the ground truth, using the oracle as the reward function does not perform as well as using a reward model (either the original reward model or the combined model). This finding is consistent with experiment results in Qwen-Math (Yang et al., 2024) and Deepseek-Math (Shao et al., 2024).
230
+
231
+ # 5.6. Experiment Results on Wider Range of Tasks
232
+
233
+ To further validate the broader effectiveness of our method, we conducted experiments across diverse domains using Doubao-25k (policy and reward model backbone). Tasks included logic reasoning, math, code generation, STEM problems, complex tasks, instruction following, knowledge QA, and language understanding. Each task has distinct evaluation sets and verifiers to assess response correctness. We consider the multi-task scenario where one model is trained to complete various tasks. We present the results (accuracy improvement over vanilla PPO) in Table 5. We highlight statistically significant changes (exceeding $\pm 0.5\%$ , based on test case counts) in bold. These results demonstrate PF-PPO's consistent effectiveness across tasks.
234
+
235
+ # 6. Conclusion
236
+
237
+ In this paper, we propose a new reinforcement learning with human feedback (RLHF) method, Policy Filtration for Proximal Policy Optimization (PF-PPO), aimed at mitigating the adverse effects of reward noise. When training the reward model using the Bradley-Terry approach, the reward signal is generally more reliable in the high or low reward regions but less reliable in the moderate reward regions. Motivated by this observation, we adopt a rank-based method to selectively use sample from these reliable regions more in PPO to improve the quality of the signal provided by the reward model. We conduct comprehensive experiments to demonstrate that PF-PPO consistently outperforms existing
238
+
239
+ basielines. Additionally, we analyze PF-PPO, standard PPO, and PPO with multiple responses in details and show that filtering samples with unreliable rewards can improve the performance of the outcome policy.
240
+
241
+ # Acknowledgment
242
+
243
+ The work was partially supported by The State Key Laboratory of Novel Software Technology (KFKT2024A03).
244
+
245
+ # Impact Statement
246
+
247
+ This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
248
+
249
+ # References
250
+
251
+ Amini, A., Vieira, T., and Cotterell, R. Variational best-of-n alignment. arXiv preprint arXiv:2407.06057, 2024.
252
+ Anthropic, A. Introducing claude, 2023. URL https://www.anthropic.com/news/introducing-claude.
253
+ Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
254
+ Azar, M. G., Guo, Z. D., Piot, B., Munos, R., Rowland, M., Valko, M., and Calandriello, D. A general theoretical paradigm to understand learning from human preferences. In International Conference on Artificial Intelligence and Statistics, pp. 4447-4455. PMLR, 2024.
255
+ Bai, Y., Jones, A., Ndousse, K., Askell, A., Chen, A., Das-Sarma, N., Drain, D., Fort, S., Ganguli, D., Henighan, T., et al. Training a helpful and harmless assistant with rein
256
+
257
+ forced learning from human feedback. arXiv preprint arXiv:2204.05862, 2022.
258
+ Bradley, R. A. and Terry, M. E. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345, 1952.
259
+ Chaudhari, S., Aggarwal, P., Murahari, V., Rajpurohit, T., Kalyan, A., Narasimhan, K., Deshpande, A., and da Silva, B. C. Rlhf deciphered: A critical analysis of reinforcement learning from human feedback for llms. arXiv preprint arXiv:2404.08555, 2024.
260
+ Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. d. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
261
+ Christiano, P. F., Leike, J., Brown, T., Martic, M., Legg, S., and Amodei, D. Deep reinforcement learning from human preferences. Advances in neural information processing systems, 30, 2017.
262
+ Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
263
+ Coste, T., Anwar, U., Kirk, R., and Krueger, D. Reward model ensembles help mitigate overoptimization. arXiv preprint arXiv:2310.02743, 2023.
264
+ Dong, H., Xiong, W., Goyal, D., Zhang, Y., Chow, W., Pan, R., Diao, S., Zhang, J., Shum, K., and Zhang, T. Raft: Reward ranked finetuning for generative foundation model alignment. arXiv preprint arXiv:2304.06767, 2023.
265
+ Draper, N. Applied regression analysis. McGraw-Hill. Inc, 1998.
266
+ Ethayarajh, K., Xu, W., Muennighoff, N., Jurafsky, D., and Kiela, D. Kto: Model alignment as prospect theoretic optimization. arXiv preprint arXiv:2402.01306, 2024.
267
+ Gao, L., Schulman, J., and Hilton, J. Scaling laws for reward model overoptimization. In International Conference on Machine Learning, pp. 10835-10866. PMLR, 2023.
268
+ Guo, D., Zhu, Q., Yang, D., Xie, Z., Dong, K., Zhang, W., Chen, G., Bi, X., Wu, Y., Li, Y., et al. Deepseek-coder: When the large language model meets programming-the rise of code intelligence. arXiv preprint arXiv:2401.14196, 2024.
269
+ Hu, J., Wu, X., Wang, W., Zhang, D., Cao, Y., et al. Openrlhf: An easy-to-use, scalable and high-performance rlhf framework. arXiv preprint arXiv:2405.11143, 2024.
270
+
271
+ Ivison, H., Wang, Y., Liu, J., Wu, Z., Pyatkin, V., Lambert, N., Smith, N. A., Choi, Y., and Hajishirzi, H. Unpacking dpo and ppo: Disentangling best practices for learning from preference feedback. arXiv preprint arXiv:2406.09279, 2024.
272
+ Jaques, N., Ghandeharioun, A., Shen, J. H., Ferguson, C., Lapedriza, A., Jones, N., Gu, S., and Picard, R. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019.
273
+ Kalai, A. T. and Vempala, S. S. Calibrated language models must hallucinate. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, pp. 160-171, 2024.
274
+ Lambert, N., Krendl Gilbert, T., and Zick, T. The history and risks of reinforcement learning and human feedback. arXiv e-prints, pp. arXiv-2310, 2023.
275
+ Liu, T., Zhao, Y., Joshi, R., Khalman, M., Saleh, M., Liu, P. J., and Liu, J. Statistical rejection sampling improves preference optimization. arXiv preprint arXiv:2309.06657, 2023.
276
+ Longpre, S., Hou, L., Vu, T., Webson, A., Chung, H. W., Tay, Y., Zhou, D., Le, Q. V., Zoph, B., Wei, J., et al. The flan collection: Designing data and methods for effective instruction tuning. In International Conference on Machine Learning, pp. 22631-22648. PMLR, 2023.
277
+ Luo, Z., Xu, C., Zhao, P., Sun, Q., Geng, X., Hu, W., Tao, C., Ma, J., Lin, Q., and Jiang, D. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568, 2023.
278
+ McKinney, L., Duan, Y., Krueger, D., and Gleave, A. On the fragility of learned reward functions. arXiv preprint arXiv:2301.03652, 2023.
279
+ Moskovitz, T., Singh, A. K., Strouse, D., Sandholm, T., Salakhutdinov, R., Dragan, A. D., and McAleer, S. Confronting reward model overoptimization with constrained rlhf. arXiv preprint arXiv:2310.04373, 2023.
280
+ Nakano, R., Hilton, J., Balaji, S., Wu, J., Ouyang, L., Kim, C., Hesse, C., Jain, S., Kosaraju, V., Saunders, W., et al. Webgpt: Browser-assisted question-answering with human feedback. arXiv preprint arXiv:2112.09332, 2021.
281
+ OpenAI. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
282
+ Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744, 2022.
283
+
284
+ Pal, A., Karkhanis, D., Dooley, S., Roberts, M., Naidu, S., and White, C. Smaug: Fixing failure modes of preference optimisation with dpo-positive. arXiv preprint arXiv:2402.13228, 2024.
285
+ Pang, R. Y., Yuan, W., Cho, K., He, H., Sukhbaatar, S., and Weston, J. Iterative reasoning preference optimization. arXiv preprint arXiv:2404.19733, 2024.
286
+ Pitis, S. Failure modes of learning reward models for llms and other sequence models. In ICML 2023 Workshop The Many Facets of Preference-Based Learning, 2023.
287
+ Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024.
288
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
289
+ Sessa, P. G., Dadashi, R., Hussenot, L., Ferret, J., Vieillard, N., Ramé, A., Shariari, B., Perrin, S., Friesen, A., Cideron, G., et al. Bond: Aligning llms with best-of-n distillation. arXiv preprint arXiv:2407.14622, 2024.
290
+ Setlur, A., Garg, S., Geng, X., Garg, N., Smith, V., and Kumar, A. Rl on incorrect synthetic data scales the efficiency of lmmath reasoning by eight-fold. arXiv preprint arXiv:2406.14532, 2024.
291
+ Shao, Z., Wang, P., Zhu, Q., Xu, R., Song, J., Zhang, M., Li, Y., Wu, Y., and Guo, D. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.
292
+ Shen, W., Hu, J., Zhao, P., He, X., and Chen, L. Advanced tricks for training large language models with proximal policy optimization. https://difficult-link-dd7.notion. site/eb7b2d1891f44b3a84e7396d19d39e6f, 2024. Notion Blog.
293
+ Skalse, J., Howe, N., Krasheninnikov, D., and Krueger, D. Defining and characterizing reward gaming. Advances in Neural Information Processing Systems, 35:9460-9471, 2022.
294
+ Song, F., Yu, B., Li, M., Yu, H., Huang, F., Li, Y., and Wang, H. Preference ranking optimization for human alignment. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 18990-18998, 2024.
295
+ Stiennon, N., Ouyang, L., Wu, J., Ziegler, D., Lowe, R., Voss, C., Radford, A., Amodei, D., and Christiano,
296
+
297
+ P. F. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33: 3008-3021, 2020.
298
+ Team, G., Anil, R., Borgeaud, S., Wu, Y., Alayrac, J.-B., Yu, J., Soricut, R., Schalkwyk, J., Dai, A. M., Hauth, A., et al. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805, 2023.
299
+ Team, Q. Introducing qwen1.5, February 2024. URL https://qwenlm.github.io/blog/qwen1.5/.
300
+ Wang, B., Zheng, R., Chen, L., Liu, Y., Dou, S., Huang, C., Shen, W., Jin, S., Zhou, E., Shi, C., et al. Secrets of rlhf in large language models part ii: Reward modeling. arXiv preprint arXiv:2401.06080, 2024.
301
+ Wei, T., Luan, J., Liu, W., Dong, S., and Wang, B. Cmath: Can your language model pass chinese elementary school math test? arXiv preprint arXiv:2306.16636, 2023a.
302
+ Wei, Y., Wang, Z., Liu, J., Ding, Y., and Zhang, L. Magi-coder: Source code is all you need. arXiv preprint arXiv:2312.02120, 2023b.
303
+ Wu, T., Zhu, B., Zhang, R., Wen, Z., Ramchandran, K., and Jiao, J. Pairwise proximal policy optimization: Harnessing relative feedback for llm alignment. arXiv preprint arXiv:2310.00212, 2023.
304
+ Yang, A., Yang, B., Hui, B., Zheng, B., Yu, B., Zhou, C., Li, C., Li, C., Liu, D., Huang, F., et al. Qwen2 technical report. arXiv preprint arXiv:2407.10671, 2024.
305
+ Yuan, Z., Yuan, H., Tan, C., Wang, W., Huang, S., and Huang, F. Rrhf: Rank responses to align language models with human feedback without tears. arXiv preprint arXiv:2304.05302, 2023.
306
+ Zhang, S., Chen, Z., Chen, S., Shen, Y., Sun, Z., and Gan, C. Improving reinforcement learning from human feedback with efficient reward model ensemble. arXiv preprint arXiv:2401.16635, 2024.
307
+ Zhao, W., Shang, M., Liu, Y., Wang, L., and Liu, J. Ape210k: A large-scale and template-rich dataset of math word problems. arXiv preprint arXiv:2009.11506, 2020.
308
+ Zhao, Y., Joshi, R., Liu, T., Khalman, M., Saleh, M., and Liu, P. J. Slic-hf: Sequence likelihood calibration with human feedback. arXiv preprint arXiv:2305.10425, 2023.
309
+ Zhou, J., Jiang, C., Shen, W., Zhou, X., and He, X. Leveraging web-crawled data for high-quality fine-tuning. arXiv preprint arXiv:2408.08003, 2024.
310
+
311
+ Zhu, B., Sharma, H., Frujeri, F. V., Dong, S., Zhu, C., Jordan, M. I., and Jiao, J. Fine-tuning language models with advantage-induced policy alignment. arXiv preprint arXiv:2306.02231, 2023.
312
+ Zhu, Q., Guo, D., Shao, Z., Yang, D., Wang, P., Xu, R., Wu, Y., Li, Y., Gao, H., Ma, S., et al. Deepseek-coder v2: Breaking the barrier of closed-source models in code intelligence. arXiv preprint arXiv:2406.11931, 2024.
313
+ Ziegler, D. M., Stiennon, N., Wu, J., Brown, T. B., Radford, A., Amodei, D., Christiano, P., and Irving, G. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593, 2019.
314
+
315
+ # A. Reward Model
316
+
317
+ The design of our algorithm is motivated by the observation that the reward model is less reliable when it yields moderate rewards. To provide more evidence that this property is universal across a broader range of benchmarks, we also analyze the reward function on different benchmarks of code generation (MBPP and LeetCode) and math reasoning (Ape210K (Zhao et al., 2020) and CMATH (Wei et al., 2023a)). We repeat the process in Figure 1 on these benchmarks and plot the figures in Figure 3 and Figure 4. Note that we train different reward functions based on the datasets from these two benchmarks. We observe that the property holds on these four additional benchmarks across different tasks, indicating this property may extend to broader fields.
318
+
319
+ Intuitively, this property should be universal to a broader range of tasks, e.g., on Helpfulness and Harmlessness tasks (Bai et al., 2022). For code generation tasks, it is quite common that some samples (e.g., the response matches the known correct answer or the response contains an obvious error) are easier to evaluate than others (e.g., the response tries to solve the problem by a novel approach). Therefore, those samples that are hard to evaluate by human should also be hard instances for the reward model.
320
+
321
+ ![](images/87bb533bae3b9f8dd9eb76bc56395155b37b7cd796f896f879696c93ad41070d.jpg)
322
+ (a) The actual scores vs. the reward values for the reward model evaluated on MBPP
323
+
324
+ ![](images/e01df776c734bd8a7168b93ebca37875efbb25d34d710ad7313ade252b8db177.jpg)
325
+ (b) The actual scores vs. the reward values for the reward model evaluated on LeetCode
326
+ Figure 3. We provide additional evidence that the reward model is less reliable when it yields moderate rewards than when it yields high or low rewards. We conduct the same statistics as in Figure 1 but on different benchmarks. Specifically, the reward models for the MBPP and LeetCode benchmarks are trained separately using the corresponding datasets for these two benchmarks. The MBPP and LeetCode benchmarks contains 378 and 1570 prompts respectively and we collect 10 responses for each prompt using a fine-tuned policy. We group the responses with similar rewards and calculate the average of their actual scores (i.e., the average correctness), indicating each group by one point. To evaluate the reliability of the reward model, we repeat the process ten times resulting in ten lines.
327
+
328
+ ![](images/949acf253fceba493019940701d019a8dc3561938da8d99815597b05e9192d1a.jpg)
329
+ (a) The actual scores vs. the reward values for the reward model evaluated on Ape210k
330
+
331
+ ![](images/553b913d6310d7dcd5051b4af287113cc522d128f90ac976ac21da905a747f9c.jpg)
332
+ (b) The actual scores vs. the reward values for the reward model evaluated on CMATH
333
+ Figure 4. We provide additional evidence that the reward model is less reliable when it yields moderate rewards than when it yields high or low rewards. We conduct the same statistics as in Figure 1 but on different benchmarks. Specifically, the reward models for the Ape210k and CMATH benchmarks are trained separately using the corresponding datasets for these two benchmarks. We collect 10 responses for each prompt in the dataset using a fine-tuned policy. We group the responses with similar rewards and calculate the average of their actual scores (i.e., the average correctness), indicating each group by one point. To evaluate the reliability of the reward model, we repeat the process ten times resulting in ten lines.
334
+
335
+ # B. Qualitative results
336
+
337
+ In this section, we provide qualitative results on 1) how responses with high/middle/low rewards look like and why responses with middle rewards are unreliable; and 2) the qualitative difference between the code generated by the PF-PPO policy and the standard PPO (PPO-S) policy.
338
+
339
+ # B.1. Analysis on the the responses associated with different rewards
340
+
341
+ We present a prompt along with several responses, including a correct response but assigned with a low reward, an incorrect response but assigned with a high reward, an incorrect response with a low reward, and a correct response with a high reward. The prompt describes a coding problem that requires to convert fractions to decimals.
342
+
343
+ We have the following findings:
344
+
345
+ - For the correct response but assigned with a low reward, the generated code is less clear and harder to read. For example, the code may mix several steps into one line.
346
+ - For the incorrect response but assigned with a high reward, the response incorrectly mixes two correct approaches. This mistake can hardly be identified by the reward model (and even GPT-4).
347
+ - For the incorrect response assigned with a low reward, the response contains an obvious mistake which is easily detected by the reward model.
348
+
349
+ We also provide detailed analysis into the solutions to this problem. The given prompt is a coding task to convert fraction to decimal.
350
+
351
+ ```txt
352
+ Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. If multiple answers are possible, return any of them. It is guaranteed that the length of the answer string is less than 104 for all the given inputs. Please complete the following python code precisely: `python class Solution: def fractionToDecimal(self, numerator: int, denominator: int) -> str:
353
+ ```
354
+
355
+ This is a correct response with a high reward. This solution is thorough with clear variable names and properly structured steps. It is easier to read due to breaking down steps explicitly such as calculating the integer part and handling the remainder.
356
+
357
+ ```txt
358
+ 1
359
+ 2
360
+ 3
361
+ 4
362
+ 5
363
+ 6
364
+ 7
365
+ 8
366
+ 9
367
+ 10
368
+ 11
369
+ 4. \*\*Manage the remainder\*\*: As we perform integer division, the remainder will be used to form the fractional part. This remainder will be treated as the new numerator for the next step.
370
+ ```
371
+
372
+ 5. **Use a dictionary to manage repetition**: To detect recurring decimals, we need to keep track of all remainders we have seen and their respective positions in the decimal expansion. If a remainder repeats, it indicates a recurring decimal.
373
+ 6. **Build the result string**: Start with the integer part, then append a decimal point. Then, use a loop to compute each digit of the fractional part. Use the dictionary to detect and mark any recurring decimals.
374
+ 7. $\star \star$ Return the result: Finally, return the constructed string for the result.
375
+
376
+ Below is the complete Python code for the `fractionToDecimal` method:
377
+
378
+ ``python
379
+
380
+ class Solution: def fractionToDecimal(self, numerator: int, denominator: int) -> str: if numerator == 0: return "0"
381
+
382
+ ```txt
383
+ Determine the sign of the result result_sign $=$ "-" if (numerator $< 0$ ) ^ (denominator $< 0$ ) else "
384
+ ```
385
+
386
+ ```txt
387
+ Make both numerator and denominator positive numerator $=$ abs(numerator) denominator $=$ abs denominator
388
+ ```
389
+
390
+ ```txt
391
+ Calculate the integer part of the result
392
+ integer_part = numerator // denominator
393
+ remainder = numerator % denominator
394
+ ```
395
+
396
+ ```python
397
+ If there's no remainder, return the integer part if remainder $= = 0$ : return result_sign $^+$ str(integer_part)
398
+ ```
399
+
400
+ ```txt
401
+ Prepare to build the fractional part
402
+ result = []
403
+ result.append(""); # Start with the decimal point
404
+ remainder_map = {} # To keep track of remainders and their positions
405
+ ```
406
+
407
+ ```txt
408
+ Process each place value in the fractional part position $= 0$
409
+ ```
410
+
411
+ ```txt
412
+ while remainder not in remainder_map: remainder_map[remainder] = position remainder $\star = 10$ result_digit $=$ remainder//denominator result.append(str(result_digit)) remainder $\% =$ denominator if remainder $= = 0$ break position $+ = 1$
413
+ ```
414
+
415
+ ```python
416
+ If there's a repeat, insert parentheses
417
+ if remainder in remainder_map:
418
+ repeat_start = remainder_map[remainder]
419
+ result.insert(repeat_start + 1, "(")
420
+ result.append("");
421
+ ```
422
+
423
+ ```lua
424
+ return result_sign + str(integer_part) + ".join(result)
425
+ ```
426
+
427
+ This code correctly handles edge cases like zero denominator, negative numbers, repeating decimals, and ensures that the result is less than $10^{\hat{4}}$ characters long
428
+
429
+ This is a correct response but assigned with a low reward. Compared with the previous response with high reward, this response mixes multiple operations in one line, making it harder to understand (e.g., Line 34).
430
+
431
+ ```txt
432
+ 1 To solve the problem of converting a fraction to its decimal representation, we can use the following approach:
433
+ 2
434
+ 3 1. Handle the sign of the result.
435
+ 4 2. Calculate the integral part of the result, which is the part before the decimal point.
436
+ 5 3. Handle the case where the fractional part is repeating.
437
+ 6 4. Calculate the fractional part and handle cycles.
438
+ 7
439
+ 8 Here's the completed Python code:
440
+ 9 ..'python
441
+ 11 class Solution: def fractionToDecimal(self, numerator: int, denominator: int) -> str: # Handle sign of result sign $= \prime -\prime$ if numerator $\star$ denominator $< 0$ else \*\* numerator, denominator $=$ abs(numerator), abs( denominator) # Calculate integral part integral_part = numerator // denominator
442
+ 18
443
+ 19 # Calculate fractional part remainder $=$ numerator % denominator if remainder $= = 0$ return sign + str(integral_part)
444
+ 20 # Use a dictionary to track remainders and their positions
445
+ 26 # in the fractional part to detect cycles seen些什么 remainders $= \{\}$ result $= [ ]$ index $= 0$ while remainder not in seen些什么: seen些什么 remainders $[\text{nemrder} ] = \text{index}$ result.append(str(remainder $\ast 10 / /$ denominator)) remainder $=$ (remainder $\ast 10$ ) % denominator if remainder $= = 0$ break index $+ = 1$
446
+ 30
447
+ 31
448
+ 32
449
+ 33
450
+ 34
451
+ 35
452
+ 36
453
+ 37
454
+ 38
455
+ 39
456
+ 40
457
+ 41
458
+ 42
459
+ 43
460
+ 44
461
+ 45 return sign + str(integral_part) $+^{\prime}.^{\prime} + ^{\prime \prime}.$ .join(result)
462
+ 46
463
+ 47
464
+ 48 Explanation:
465
+ 50 - We first handle the signs of the numerator and denominator.
466
+ 51 - We then calculate the integral part of the result by integer division.
467
+ 52 - If the remainder is zero, the fraction is an integer and we return it as a string.
468
+ 53 - We use a dictionary 'seen些什么' to keep track of the positions where each remainder appears, allowing us to detect cycles.
469
+ 54 - If a cycle is detected, we insert parentheses at the start of the repeating part.
470
+ 55 - Finally, we assemble the result as a string and return it.
471
+ ```
472
+
473
+ This is an incorrect response but assigned with a high reward. In Line 32, the decimal point is added to the result list but is not later counted when getting wrapped by the parentheses, leading to the wrong format. This is a mixture of two
474
+
475
+ correct approaches, one that adds the decimal points to result but sets an offset for this (cf. Line 44 and Line 62 in the first response) and one that outputs the decimal point separately (cf. Line 45 in the second response).
476
+
477
+ To solve the problem of converting a fraction to a decimal string, we need to handle the following cases:
478
+
479
+ 1. **Integers**: If the numerator and denominator are both integers, the decimal representation is straightforward: divide the numerator by the denominator and convert the result to a string.
480
+ 2. **Decimal Representation**: If the division produces a remainder, it indicates a repeating decimal pattern. Use a dictionary to keep track of the remainders and their corresponding positions in the resultant decimal string. Whenever a remainder repeats, enclose the repeating part in parentheses.
481
+ 3. **Handling Negative Numbers**: Handle both positive and negative numbers appropriately.
482
+
483
+ Here is the complete code for the solution:
484
+
485
+ ``python
486
+
487
+ ```python
488
+ class Solution: def fractionToDecimal(self, numerator: int, denominator: int) -> str: # Handle sign of the result sign = '-' if numerator * denominator < 0 else '' numerator, denominator = abs(numerator), abs denominator) # Calculate integral part integral_part = numerator // denominator numerator %= denominator
489
+ ```
490
+
491
+ ```python
492
+ # Handle zero remainder
493
+ if numerator == 0:
494
+ return sign + str(integral_part)
495
+ ```
496
+
497
+ ```python
498
+ Prepare list to store the decimal digits result $= \left[\right]$ #Dictionary to keep track of remainders and their positions remainder_map $= \{\}$ # Initialize the decimal part result.append('.') position $= 0$
499
+ ```
500
+
501
+ ```python
502
+ Loop until the remainder repeats or becomes zero while numerator $>0$ # If the remainder has already appeared before, it's a repeating part if numerator in remainder_map: result.insert(remainder_map[numerator], '(') result.append('')) break
503
+ ```
504
+
505
+ ```txt
506
+ Record the position of the current remainder remainder_map[numerator] = position numerator $\star = 10$ result.append(str(numerator // denominator)) numerator $\% =$ denominator position $+ = 1$ return sign $^+$ str(integral_part) $^+$ .join(result)
507
+ ```
508
+
509
+ ```txt
510
+ 111
511
+ ```
512
+
513
+ Explanation:
514
+
515
+ - We use a dictionary 'remainder_map' to track the position of each remainder seen. This helps us identify the repeating part of the decimal if it exists.
516
+
517
+ 55 |- The loop continues until the remainder becomes zero or repeats itself.
518
+ - If the remainder repeats, we insert the opening '(' immediately before the repeated part, and close it with ')''.
519
+ 57 - The result is assembled from the integral part, the decimal point, and the decimal digits or parenthesized pattern.
520
+
521
+ This is an incorrect response with a low reward. In Line 59-61, the program contains an obvious error that it cannot handle the scenario where there exists a decimal part but does not contain any repeating part.
522
+
523
+ ```txt
524
+ 1
525
+ 2
526
+ 3
527
+ 4
528
+ 5
529
+ 6
530
+ 7
531
+ 8
532
+ 9
533
+ 10
534
+ 11
535
+ 12
536
+ 13
537
+ 14
538
+ 15
539
+ 16
540
+ 17
541
+ 18
542
+ 19
543
+ 20
544
+ 21
545
+ 22
546
+ 23
547
+ 24
548
+ 25
549
+ 26
550
+ 27
551
+ 28
552
+ 29
553
+ 30
554
+ 31
555
+ 32
556
+ 33
557
+ 34
558
+ 35
559
+ 36
560
+ 37
561
+ 38
562
+ 39
563
+ 40
564
+ 41
565
+ 42
566
+ 43
567
+ 44
568
+ 45
569
+ 46
570
+ 47
571
+ ```
572
+
573
+ ```markdown
574
+ numerator \(= 10\)
575
+ fractional_part.append(str(numerator // denominator))
576
+ numerator \(\% =\) denominator
577
+ position \(+ = 1\)
578
+ #Build the result
579
+ if not fractional_part: #No repeating part, return integral part return result_sign \(^+\) str(integral_part)
580
+ else: #Repeating part detected repeating_start \(=\) remainder_index[numerator] return result_sign \(^+\) str(integral_part) \(^+\) .' + '.join(fractional_part[: repeating_start]) \(^+\backslash\) \('(' + ''.join(fractional_part[repeating_start:]) + '')'\n\n
581
+ ```c
582
+ ```c
583
+ ## Explanation:
584
+ - **Integral Part**: We calculate the integral part as `numerator // denominator'.
585
+ - **Non-repeating Part**: We use a dictionary to track positions of remainders, and if the same remainder appears again, we know the fraction is repeating.
586
+ - **Repeating Part**: When a repeating part is detected, we insert parentheses around the repeating part.
587
+ - **Edge Cases**: We handle edge cases such as negative numbers, zero denominator, and ensuring the result is within the constraints of the problem. This implementation correctly handles both whole number and repeating decimal results, adhering to the problem statement's requirements.
588
+ ```
589
+
590
+ # B.2. Analysis on the responses generated by PF-PPO compared with standard PPO (PPO-S)
591
+
592
+ We compare the answers from PF-PPO and PPO-S respectively for the same prompts, and conclude that the answer from the PF-PPO policy is more inclined to follow a standard approach and the response is more concise (or shorter), making it easier to understand and implement.
593
+
594
+ Specifically, we present their responses for the prompt that request the agent to write a code to find all safe nodes in a directed graph. The two responses given by PF-PPO and PPO-S are both correct. However, the difference is that PF-PPO adopts the deep first search (DFS) method while PPO-S adopts the topological sorting approach. The logic is simpler for DFS and the implementation is easier, making it easier to understand. Both approaches have roughly equivalent time and space costs, but the DFS method is slightly more space efficient.
595
+
596
+ These findings suggest an advantage in terms of readability and implementation simplicity when using the PF-PPO policy (e.g., using recursion instead of using a queue to track BFS).
597
+
598
+ Prompt (find all safe nodes in a directed graph):
599
+
600
+ ```txt
601
+ There is a directed graph of n nodes with each node labeled from 0 to n - 1. The graph is represented by a 0-indexed 2D integer array graph where graph[i] is an integer array of nodes adjacent to node i, meaning there is an edge from node i to each node in graph[i]. A node is a terminal node if there are no outgoing edges. A node is a safe node if every possible path starting from that node leads to a terminal node (or another safe node). Return an array containing all the safe nodes of the graph. The answer should be sorted in ascending order. Please complete the following python code precisely: `python class Solution: def eventualSafeNodes(self, graph: List[List[int]]) -> List[int]: `
602
+ ```
603
+
604
+ The response from PF-PPO:
605
+ ```txt
606
+ 1
607
+ 2
608
+ 3
609
+ 4
610
+ 5
611
+ 6
612
+ 7
613
+ 8
614
+ 9
615
+ 10
616
+ 11
617
+ 12
618
+ 13
619
+ 14
620
+ 15
621
+ 16
622
+ 17
623
+ 18
624
+ 19
625
+ 20
626
+ 21
627
+ 22
628
+ 23
629
+ 24
630
+ 25
631
+ 26
632
+ 27
633
+ 28
634
+ 29
635
+ 30
636
+ 31
637
+ 32
638
+ 33
639
+ 34
640
+ 35
641
+ 36
642
+ 37
643
+ 38
644
+ 39
645
+ 40
646
+ 41
647
+ 42
648
+ 43
649
+ 44
650
+ 45
651
+ 46
652
+ 47
653
+ 48
654
+ 49
655
+ 50
656
+ 51
657
+ 52
658
+ 53
659
+ 54
660
+ ```
661
+
662
+ 1
663
+
664
+ Explanation:
665
+
666
+ - **Topological Sorting**: We are using DFS to check if a path exists from a node to a terminal node. If a cycle is detected, the node is not safe.
667
+ - **DFS Function**: The `dfs' function determines if a node is safe by checking all of its neighbors recursively. If any neighbor is unsafe or in a cycle, the node is unsafe.
668
+ - $\star \star$ Status Tracking\*\*: The status array is used to track if a node is safe or not, and helps avoid redundant computations.
669
+ - **Result Collection**: All nodes that return 'True' from the 'dfs' function are safe nodes, and are added to the result list.
670
+
671
+ This approach efficiently identifies safe nodes by using a topological sorting approach and a depth-first search approach to detect cycles.
672
+
673
+ The response from PPO-S:
674
+ ```txt
675
+ To solve this problem, we can use a \red{topological sort approach} combined with a depth-first search (DFS) approach to determine the terminal and safe nodes in the graph. The topological sort ensures that we process nodes in the order of their out-degree, which is suitable for directed acyclic graphs (DAGs), where no cycles can form.
676
+ ```
677
+
678
+ ```txt
679
+ The idea is to traverse the graph using DFS, keeping track of the current path during traversal to detect cycles. Nodes that do not lead to a cycle are considered terminal, and nodes that are part of a cycle or are part of a path that leads to a cycle are considered unsafe.
680
+ ```
681
+
682
+ ```txt
683
+ Here's the Python implementation of the solution:
684
+ ```
685
+
686
+ ```txt
687
+ ``python
688
+ ```
689
+
690
+ ```python
691
+ from typing import List
692
+ ```
693
+
694
+ ```python
695
+ from collections import defaultdict, deque
696
+ ```
697
+
698
+ ```txt
699
+ class Solution:
700
+ ```
701
+
702
+ ```python
703
+ def eventualSafeNodes(self, graph: List[List[int]]) -> List[int]: # Initialize a dictionary to store the out-degree of each node outdegree = defaultdict(int)
704
+ ```
705
+
706
+ ```txt
707
+ Initialize a dictionary to store the dependencies (incoming edges) of each node
708
+ ```
709
+
710
+ ```javascript
711
+ dependencies $=$ defaultdict(list)
712
+ ```
713
+
714
+ ```txt
715
+ n = len.graph)
716
+ ```
717
+
718
+ ```txt
719
+ Build the dependencies and out-degree dictionaries
720
+ ```
721
+
722
+ ```txt
723
+ for u in range(n):
724
+ ```
725
+
726
+ ```txt
727
+ outdegree[u] = len.graph[u])
728
+ ```
729
+
730
+ ```txt
731
+ for $v$ in graph[u]:
732
+ ```
733
+
734
+ ```kotlin
735
+ dependencies[v].append(u)
736
+ ```
737
+
738
+ ```txt
739
+ Initialize a queue for BFS and a set to keep track of safe nodes
740
+ queue = deque()
741
+ safe_nodes = set()
742
+ ```
743
+
744
+ ```python
745
+ Add all nodes with no outgoing edges (terminals) to the queue for u in range(n): if outdegree[u] == 0: queue.append(u)
746
+ ```
747
+
748
+ ```javascript
749
+ BFS to find safe nodes while queue: u $=$ queue.popleft()
750
+ ```
751
+
752
+ ```txt
753
+ 39 safe_nodes.add(u) # For each node v that depends on u, decrement its out-degree # If v's out-degree becomes zero, it becomes a terminal for v in dependencies[u]: outdegree[v] $= 1$ if outdegree[v] $= = 0$ queue.append(v) # Sort and return safe nodes return sorted(safe_nodes)
754
+ 50
755
+ 51 Explanation:
756
+ 52 1. \*\*Dependencies\*: We build a 'dependencies' dictionary, where each key is a node and the values are a list of nodes that depend on the key. This is used to track back edges.
757
+ 53 2. \*\*Out-degree\*: We also keep track of the out-degree of each node. This is used to determine which nodes are terminal (i.e., have no outgoing edges).
758
+ 54 3. \*\*Topological Sort (BFS)\*: We start by adding all nodes with no outgoing edges ( terminals) to the queue. We then process each node from this queue. For each node , we mark it as safe, reduce the out-degree of its dependencies, and if any of those dependencies become terminals (i.e., have no outgoing edges), they are added to the queue. This ensures we process all nodes that are part of cycles and prevent future revisits to nodes involved in such cycles.
759
+ 55 4. \*\*Result\*: The safe nodes are collected and sorted and returned as the final result.
760
+ 56
761
+ 57 This approach ensures that we correctly identify terminal nodes and use them to establish safe nodes, as well as handle cycles in the graph.
762
+ ```
763
+
764
+ # C. Discussion on the computational costs
765
+
766
+ PPO-S, PPO-M, and PF-PPO all collect different number of responses per query and train using different number of samples. For clarity, we list the computational complexity of these algorithms in Table 6. Note that, for all algorithms, we select the best checkpoint on the evaluation set and report the performance of this checkpoint. Combining the results in Table 6 and Figure 2, we can draw the following conclusions: First, the total computational complexity of PPO-S and PPO-M is almost the same, and the only difference is that PPO-M is more likely to learn from different responses with the same query in the same batch or adjacent batches, which improves the performance. Second, the computational complexity of PF-PPO is less than that of PPO-S and PPO-M, while PF-PPO outperforms them. This indicates the effectiveness of our method.
767
+
768
+ <table><tr><td></td><td>PPO-S</td><td>PPO-M</td><td>PF-PPO (BR / BW)</td></tr><tr><td>Queries sampled per iteration</td><td>5n</td><td>n</td><td>n</td></tr><tr><td>Responses sampled per query</td><td>1</td><td>5</td><td>5</td></tr><tr><td>#Query-response pairs per iteration</td><td>5n</td><td>5n</td><td>5n</td></tr><tr><td>Reward model forward pass per iteration</td><td>5n</td><td>5n</td><td>5n</td></tr><tr><td>Critic forward&amp;backward pass per iteration</td><td>5nm</td><td>5nm</td><td>2nm</td></tr><tr><td>Policy forward&amp;backward pass per iteration</td><td>5nm</td><td>5nm</td><td>2nm</td></tr><tr><td>HumanEval</td><td>100%</td><td>+2.69%</td><td>+6.15% / +5.51%</td></tr><tr><td>MBPP</td><td>100%</td><td>+1.63%</td><td>+2.85% / +3.25%</td></tr><tr><td>LeetCode</td><td>100%</td><td>+18.25%</td><td>+30.95% / +20.63%</td></tr></table>
769
+
770
+ Table 6. Comparison of computational complexity and the performance of PPO-S, PPO-M, and PF-PPO. We use $n$ to denote the number of queries in the PPO query dataset, and use $m$ to denote the number of PPO epochs (i.e., each query-response pair is used to accumulate loss and gradient for $m$ times on average). PPO-M and PF-PPO collect $N = 5$ responses per query, and PF-PPO select 2 out of the $N = 5$ responses (on average) for network update. We also show the performance improvement of PPO-M and PF-PPO based on PPO-S.
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eed081fd0088791b7226cbb4b4fcbe14467cec8cf70b9584805a5e1f32293c2e
3
+ size 555500
2025/Policy Filtration for RLHF to Mitigate Noise in Reward Models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Gradient with Tree Expansion/63d3fa83-2b28-4894-981e-41857ce7d1e4_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44c7e2bb81d2f7474823d0e9c0f2e6567a7f0fdb95bc4e399043241e46a92c49
3
+ size 3765599
2025/Policy Gradient with Tree Expansion/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Gradient with Tree Expansion/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:558c72690b4a071e5fb64ad87fc98049b4b94013324a9e56d1c4d9330c0e84f0
3
+ size 1615468
2025/Policy Gradient with Tree Expansion/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/135bfef3-e8c6-4860-8101-5223c0edcbd8_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f4c128b6b91fcb7e2743994cca3df71c829223e52864285874193e52860eb9d
3
+ size 2312935
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/full.md ADDED
@@ -0,0 +1,495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Policy Guided Tree Search for Enhanced LLM Reasoning
2
+
3
+ Yang Li
4
+
5
+ # Abstract
6
+
7
+ Despite their remarkable capabilities, large language models often struggle with tasks requiring complex reasoning and planning. While existing approaches like Chain-of-Thought prompting and tree search techniques show promise, they are limited by their reliance on predefined heuristics and computationally expensive exploration strategies. We propose Policy-Guided Tree Search (PGTS), a framework that combines reinforcement learning with structured tree exploration to efficiently navigate reasoning paths. Our key innovation is a learned policy that dynamically decides between expanding, branching, backtracking, or terminating exploration, eliminating the need for manual heuristics or exhaustive search. Experiments across mathematical reasoning, logical deduction, and planning benchmarks demonstrate that PGTS achieves superior reasoning performance while significantly reducing computational costs compared to existing methods. These results establish PGTS as a scalable and effective solution for tackling complex reasoning tasks with LLMs.
8
+
9
+ # 1. Introduction
10
+
11
+ Large language models (LLMs) have demonstrated remarkable capabilities across diverse tasks, driven by advances in model architecture, parameter scaling, and pretraining data (Achiam et al., 2023; Team et al., 2023; Jiang et al., 2023; Dubey et al., 2024). However, these models consistently struggle with tasks requiring complex reasoning and planning (Valmeekam et al., 2022; Kambhampati, 2024; Kambhampati et al., 2024). In mathematical problem-solving, for instance, while LLMs excel at direct arithmetic calculations, they frequently falter when faced with multi-step word problems that demand strategic decomposition and careful planning (Kao et al., 2024; Huang & Chang, 2022).
12
+
13
+ $^{1}$ Independent Researcher. Correspondence to: Yang Li <yli.ml.research@gmail.com>.
14
+
15
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
16
+
17
+ These limitations extend to logical reasoning and real-world planning scenarios, where success depends on systematically breaking down complex problems into interconnected, actionable steps (Kambhampati, 2024).
18
+
19
+ Recent approaches to enhance LLM reasoning fall into three main categories. First, advanced prompting techniques like Chain-of-Thought (CoT) (Wei et al., 2022) and Least-to-Most prompting (Zhou et al., 2022) encourage step-by-step reasoning by generating intermediate steps. Second, verification-based methods aim to improve reasoning quality through step validation (Cobbe et al., 2021; Lightman et al., 2023; Li et al., 2022; Wang et al., 2024b; Zhang et al., 2024) or iterative refinement (Qu et al., 2024), using either self-evaluation (Qu et al., 2024) or external correctors (Havrilla et al., 2024). Third, tree-based search methods reframe reasoning as a planning problem, using reward signals to guide the exploration of reasoning paths (Feng et al., 2023; Yao et al., 2024; Besta et al., 2024; Hao et al., 2023; Xie et al., 2024b; Khalifa et al., 2023; Wang et al., 2024a).
20
+
21
+ While these approaches show promise, they face several key limitations. Heuristic search methods rely heavily on predefined rules and reward definitions, requiring significant expert knowledge. Additionally, their trial-and-error exploration process can be computationally expensive due to the vast space of possible reasoning steps. The challenge becomes even more pronounced when using self-evaluation as a reward signal, making the process even more resource-intensive (Feng et al., 2023; Hao et al., 2023; Xie et al., 2024b). Moreover, the ability of LLMs to effectively critique their own outputs and refine their responses remains an area of active research. This limitation is particularly pronounced in tasks requiring intricate planning and reasoning (Stechly et al., 2024; Huang et al., 2023; Hong et al., 2023). Furthermore, even when the exploration process identifies improved reasoning chains, distinguishing successful reasoning paths from failed ones without external guidance continues to pose a significant challenge (Qi et al., 2024).
22
+
23
+ To address these challenges, we propose Policy-Guided Tree Search (PGTS), a framework that integrates reinforcement learning with structured tree exploration. The core of PGTS is a learned policy that dynamically guides the reasoning process through four key actions: expanding current nodes, branching to alternative paths, backtracking to previous
24
+
25
+ states, or terminating exploration. This structured approach enables efficient navigation of reasoning paths, focusing computational resources on the most promising paths while avoiding unnecessary exploration of less relevant areas.
26
+
27
+ PGTS offers several key advantages over existing methods. First, its learned policy adapts dynamically to different tasks without requiring predefined heuristics. Importantly, training the policy does not require ground-truth reasoning chain annotations, making it more flexible and scalable. Second, the framework's backtracking capability allows recovery from suboptimal paths, addressing a common limitation of traditional search methods, such as Depth-Frist Search (DFS) and Breadth-First Search (BFS) (Yao et al., 2024; Xie et al., 2024b). Third, the terminate action prevents unnecessary exploration by halting the process once sufficient reasoning evidence has been gathered, significantly reducing computational overhead and addressing the "overthinking" phenomenon often observed in o1-like reasoning chains (Chen et al., 2024c). Finally, the integration of reinforcement learning with tree search creates an effective balance between exploiting known high-reward paths and exploring new alternatives. Collectively, these features make the PGTS framework a robust, efficient, and versatile solution for tasks requiring complex reasoning and planning.
28
+
29
+ Extensive experiments across mathematical reasoning, logical deduction, and planning benchmarks demonstrate the effectiveness of PGTS. Using LLaMA3.1-8B, PGTS achieves a $41.00\%$ accuracy on MATH, significantly improving upon CoT's $34.40\%$ while using only one-third of the tokens required by MCTS. These results establish PGTS as a practical and scalable solution for enhancing LLM reasoning capabilities across diverse problem domains.
30
+
31
+ # 2. Method
32
+
33
+ # 2.1. Problem Formulation
34
+
35
+ Language model-based reasoning can be formalized as a sequence generation problem with intermediate steps. Large language models, parameterized by $\theta$ and denoted as $p_{\theta}$ , generate text autoregressively. Given an input prompt $x = [x_1,\dots ,x_n]$ consisting of tokens from a predefined vocabulary, the model produces a response $y = [y_{1},\ldots ,y_{m}]$ . Each token $y_{i}$ is produced sequentially, conditioned on the prompt $x$ and all previously generated tokens $y_{< i}$ . The probability of generating sequence $y$ can be expressed as:
36
+
37
+ $$
38
+ p _ {\theta} (y \mid x) = \prod_ {i = 1} ^ {m} p _ {\theta} \left(y _ {i} \mid x, y _ {< i}\right). \tag {1}
39
+ $$
40
+
41
+ For reasoning tasks, $y$ typically comprises both intermediate reasoning steps and the final answer.
42
+
43
+ This autoregressive procedure naturally maps to a Markov Decision Process (MDP), defined as $(S, A, T, R, \gamma)$ , where
44
+
45
+ the state $s \in S$ represents the current context, including the prompt $x$ and generated tokens so far; the action $a \in \mathcal{A}$ corresponds the next token to be generated; the transition $s' = T(s, a)$ is deterministically defined by appending action $a$ to state $s$ ; the reward $R(s, a)$ evaluates the quality of each state-action pair; $\gamma$ denotes the discount factor, weighting immediate rewards over future ones. The objective of reasoning is to find an optimal sequence of actions $a^* = [a_1, \ldots, a_H]$ that maximizes the cumulative discounted rewards, $r = \sum_{h=1}^{H} \gamma^h R(s_h, a_h)$ , where $H$ is the trajectory horizon. In practice, actions can represent tokens, phrases, or complete sentences to improve optimization efficiency (Feng et al., 2023; Zhao et al., 2024; Xie et al., 2024a; Yao et al., 2024; Wang et al., 2024a). We refer to this MDP formulation as LM-MDP.
46
+
47
+ # 2.2. Background: Tree Search for LLM Reasoning
48
+
49
+ Tree search methods offer a structured approach to explore and optimize reasoning paths in LLMs by systematically evaluating different sequences of reasoning steps. The reasoning process can be formalized as a tree $(\mathcal{V},\mathcal{E})$ , where each node $v\in \mathcal{V}$ corresponds to a state $s\in S$ , and each edge $(v_{i},v_{j})\in \mathcal{E}$ represents an action $a\in \mathcal{A}$ . The root node represents the initial prompt $x$ , while a path from the root to a leaf node denotes a complete reasoning chain $y$ . To evaluate the quality of each reasoning step, a process reward model (PRM) $R(s,a)$ is employed, implemented either as a pretrained reward model (Lightman et al., 2023; Uesato et al., 2022; Wang et al., 2024b) or an LLM-based evaluator (Yao et al., 2024; Gao et al., 2024; Hao et al., 2023).
50
+
51
+ Various tree search algorithms have been developed to navigate these reasoning trees effectively. Depth-First Search (DFS) (Yao et al., 2024) and Breadth-First Search (BFS) (Xie et al., 2024b) offer systematic exploration strategies, while A* Search (Wang et al., 2024a) and Monte Carlo Tree Search (MCTS) (Feng et al., 2023; Zhao et al., 2024; Xie et al., 2024a) incorporate heuristics and sampling to balance exploration with exploitation. While these methods have proven effective in black-box optimization (Hart et al., 1968; Zhai & Gao, 2022; Malherbe et al., 2022; Wang et al., 2024c; 2020) and reinforcement learning (Silver et al., 2017; Kartal et al., 2019; Grill et al., 2020) contexts, their application to LLM reasoning introduces distinct challenges: First, the potential sequences of tokens, phrases, or sentences at each step create an enormous action space, making exhaustive exploration computationally infeasible. Second, feedback signals $R(s,a)$ are often sparse, noisy, or difficult to compute, particularly in the absence of ground-truth annotations for reasoning chains, complicating the evaluation of reasoning paths. Third, querying the LLM at each reasoning step incurs significant resource demands, amplifying the computational overhead of traditional tree search methods.
52
+
53
+ These challenges highlight the need for more efficient and
54
+
55
+ ![](images/9774a02245d47a621bd095edf066aa2ded87a4a42660db923fd047105fcad8f0.jpg)
56
+ Figure 1. Expand, Branch and Backtrack actions in PGTS policy.
57
+
58
+ adaptive search strategies in LLM reasoning. To address these limitations, we propose the PGTS framework, which integrates a learned policy to dynamically guide the tree search process, balancing exploration and exploitation while reducing computational overhead.
59
+
60
+ # 2.3. Policy Guided Tree Search
61
+
62
+ # 2.3.1. OVERVIEW
63
+
64
+ Building on the tree search formulation for LLM reasoning, PGTS introduces a structured action space designed to navigate the reasoning tree effectively. Rather than relying on predefined search strategies, PGTS learns to dynamically select between four fundamental operations:
65
+
66
+ - Expand: Generate the next intermediate step in the reasoning chain by expanding the current node. This allows the policy to progress along promising reasoning paths.
67
+ - Branch: Explore alternative reasoning paths by branching to a sibling node from the current node. This enables the policy to consider alternative solutions when the current one is suboptimal.
68
+ - Backtrack: Revisit a previous node to explore alternative paths, enabling recovery from suboptimal reasoning trajectories. The backtrack operation involves multiple actions, as the policy specifies how many steps to backtrack.
69
+ - Terminate: Conclude the search process once sufficient evidence or a satisfactory reasoning chain is obtained, preventing unnecessary exploration.
70
+
71
+ These actions (denoted as $\mathbb{A}$ ) empower PGTS to adaptively explore and refine reasoning chains, striking a balance between exploring promising steps and exploiting valuable chains. This dynamic approach allows for efficient and targeted navigation of the reasoning tree, even in the presence of a vast reasoning steps. Please see Fig. 1 for an illustration.
72
+
73
+ In practice, we impose practical constraints to ensure computational feasibility. We limit the maximum depth of the reasoning tree, which naturally bounds the number of possible backtracking steps. To prevent unbounded exploration from branching actions, we also restrict the tree's breadth by capping the number of child nodes per parent. These constraints maintain a finite action space while preserving the
74
+
75
+ policy's ability to explore diverse reasoning paths. Please see Sec. 2.3.3 for detailed discussion about the implication of these depth and breadth limits.
76
+
77
+ The PGTS policy performs an exploratory walk on the underlying reasoning tree, which is initially unobserved and gradually revealed through exploration. This process can be modeled as a MDP operating within an environment represented by the complete reasoning tree. The state $\mathbb{S}$ corresponds to the portion of the tree revealed up to the current step, transitioning deterministically based on the chosen action $\mathsf{a} \in \mathbb{A}$ . Note that this formulation differs from the previously introduced LM-MDP, as it operates at the level of tree exploration rather than token generation. Please see Sec. 2.3.2 for the formal definition of this Tree Search MDP.
78
+
79
+ Since the state $\mathsf{s} \in \mathbb{S}$ is naturally tree-structured, we implement the PGTS policy $\pi_{\phi}(\cdot \mid \mathsf{s})$ as a graph neural network. Specifically, we utilize the Graph Transformer architecture, GPS, proposed in (Rampášek et al., 2022). The GPS architecture utilizes both local message passing and global attention to capture both the local structural relationships and global context within the tree. Please see Sec. 2.3.4 for details about the PGTS policy.
80
+
81
+ To guide the reasoning process effectively, the reward design for PGTS balances two objectives: promoting high-quality reasoning chains while encouraging efficient exploration. We define immediate rewards based on task-specific metrics that evaluate the relevance and correctness of generated reasoning steps, $R(s,a)$ , while introducing costs for exploration actions. This reward structure ensures the policy learns to navigate the reasoning tree efficiently, focusing computational resources on the most promising paths. Please see Sec. 2.3.2 for details about the reward design.
82
+
83
+ # 2.3.2. TREE SEARCH MDP
84
+
85
+ The tree search problem in PGTS can be formulated as a MDP, which we refer to as Tree Search MDP (TS-MDP), defined by the tuple $(\mathbb{S},\mathbb{A},\mathbb{T},\mathbb{R},\gamma)$ . The MDP interacts with the underlying reasoning tree as its environment, with each reasoning problem corresponding to a new environment. Similar to the typical MDP settings, the environment is not directly observable to the policy, while it gradually reveals a part of the tree as the policy explores the environment.
86
+
87
+ The state space $\mathbb{S}$ represents the set of possible states in the tree exploration process, where a state $s\in \mathbb{S}$ corresponds to the portion of the reasoning tree that has been revealed through previous interactions. The state includes the structure and content of all visited nodes, as well as the current position of the policy in the tree. Each node in the tree represents a partial reasoning path, which is equivalent to a state $s\in S$ in the LM-MDP. Node features are derived from the hidden states extracted from the target LLM, specifically the hidden state from the final layer corresponding to the
88
+
89
+ last generated token. Each edge in the tree captures the parent-child relationship established by the reasoning step $a \in \mathcal{A}$ . The edge features include the immediate reward $R(s, a)$ , reflecting the quality of the reasoning step $a$ . Together, the structure of nodes and edges forms a dynamic representation of the reasoning tree, allowing the PGTS policy to effectively navigate and optimize the exploration.
90
+
91
+ The action space $\mathbb{A}$ comprises the structured actions available to the PGTS policy: expand, branch, backtrack, and terminate. Each action transitions the policy to a new state by modifying the observed reasoning tree. For a reasoning tree with a maximum depth of $D$ , the backtrack operation includes $D - 1$ distinct actions, corresponding to backtracking between 1 and $D - 1$ steps. Notably, backtracking to the root node (corresponding to the prompt $x$ ) is invalid, as the root node lacks sibling nodes for exploration.
92
+
93
+ The transition function $\mathbb{T}$ determines how the state transitions from s to $s^{\prime}$ given an action $\mathsf{a} \in \mathbb{A}$ . The transitions in the TS-MDP are deterministic, as applying an action updates the tree structure in a predefined manner. The reasoning process starts from a single root node, representing the initial state, and terminates when the policy selects the terminate action or when the exploration budget, i.e., the maximum number of tree search steps, is exhausted. As the policy updates the state, it records the node features and edge features, and update the current node accordingly to reflect the latest position of the policy in the reasoning tree.
94
+
95
+ The reward function $\mathbb{R}(\mathsf{s},\mathsf{a})$ assigns a scalar reward for executing action $\mathsf{a}$ in state $\mathsf{s}$ . For each action type, the reward is defined as follows:
96
+
97
+ - Expand: Let $s_d \in S$ be the partial reasoning path at the current node and $a_d \in \mathcal{A}$ be the new reasoning step generated by the expand action, where $d$ denotes the depth of the current node. The reward is defined as
98
+
99
+ $$
100
+ \mathbb {R} (\mathbf {s}, \mathbf {a}) = R \left(s _ {d}, a _ {d}\right) - \mathbb {C} (\mathbf {a}), \tag {2}
101
+ $$
102
+
103
+ where $R(s_d, a_d)$ evaluates the quality of the new reasoning step, and $\mathbb{C}(\mathbf{a})$ denotes the cost of the expand action.
104
+
105
+ - Branch: When the policy selects the branch action to explore an alternative sibling node, let $s_d$ and $s_d'$ denote the partial reasoning paths corresponding to the current node and its sibling node respectively, with shared parent $s_{d-1}$ , the reward is defined as
106
+
107
+ $$
108
+ \mathbb {R} (\mathbf {s}, \mathbf {a}) = R \left(s _ {d - 1} ^ {\prime}, a _ {d - 1} ^ {\prime}\right) - R \left(s _ {d - 1}, a _ {d - 1}\right) - \mathbb {C} (\mathbf {a}). \tag {3}
109
+ $$
110
+
111
+ Here, $R(s_{d-1}', a_{d-1}') - R(s_{d-1}, a_{d-1})$ quantifies the potential improvement in reasoning by exploring the alternative path, while $\mathbb{C}(\mathbf{a})$ reflects the cost of branching.
112
+
113
+ - Backtrack: For the backtracking action, which reverts to a previously visited node, all intermediate rewards along the backtracked path are revoked. Suppose the backtrack
114
+
115
+ action reverts $K$ steps. Denote the partial reasoning paths for the current node and previous node as $s_d$ and $s_{d - K}$ respectively. The reward $\mathbb{R}(\mathbf{s},\mathbf{a})$ is defined as
116
+
117
+ $$
118
+ R (s _ {d - K - 1}, a _ {d - K - 1} ^ {\prime}) - \sum_ {k = 1} ^ {K} R (s _ {d - k}, a _ {d - k}) - \mathbb {C} (\mathsf {a}), (4)
119
+ $$
120
+
121
+ where $\sum_{k=1}^{K} R(s_{d-k}, a_{d-k})$ represents the accumulated reward along the backtracked path, $R(s_{d-K-1}, a_{d-K-1}')$ captures the reward from the new path, and $\mathbb{C}(\mathsf{a})$ indicates the cost of the backtracking action.
122
+
123
+ - Terminate: When the policy selects the terminate action to end the reasoning process, let $s_d$ denote the final reasoning path at the terminal node, the reward is
124
+
125
+ $$
126
+ \mathbb {R} (\mathbf {s}, \mathbf {a}) = R (s _ {d}) - \mathbb {C} (\mathbf {a}), \tag {5}
127
+ $$
128
+
129
+ where $R(s_d)$ measures the overall quality or correctness of the reasoning chain at the terminal node, and $\mathbb{C}(\mathbf{a})$ represents the cost of concluding the search. The reward $R(s_d)$ can be derived from the commonly used outcome reward model (ORM), and we can even compare the final answer to the ground truth, as the reward is only used during the training of the PGTS policy.
130
+
131
+ The cost function $\mathbb{C}(\mathbf{a})$ plays a pivotal role in guiding the PGTS policy by assigning penalties to actions based on their computational or logical expense. These costs act as a mechanism to balance efficiency and reasoning quality. Actions such as expand and branch typically incur lower costs, as they change the reasoning tree locally. In contrast, the backtrack actions involve higher cost, discouraging excessive reversions unless the potential improvements justify the expense. The terminate action, which concludes the reasoning process and avoids further resource usage, generally carries negligible or zero cost. In our implementation, $\mathbb{C}(\mathbf{a})$ is treated as a hyperparameter that can be tuned to align the system's behavior with task-specific requirements or computational constraints. By appropriately setting these costs, the system fosters a balance between computational efficiency and reasoning complexity. This cost structure works in tandem with the reward function, which prioritizes accurate, coherent, and relevant reasoning paths while penalizing unproductive exploration. Together, the rewards and costs enable the PGTS policy to navigate reasoning trees effectively, balancing exploration and exploitation, and adapting flexibly to diverse tasks and constraints.
132
+
133
+ # 2.3.3. CONSTRAINED ACTION SAMPLING
134
+
135
+ The reasoning tree enforces explicit depth and breadth limits to maintain computational feasibility, which naturally constrains the validity of actions in different states. For expand actions, validity is determined by the depth limit and answer state: the expand action becomes invalid when the
136
+
137
+ current node has reached the maximum depth limit or when a final answer has already been generated at the current node. Branch and backtrack actions face similar structural constraints. These actions are prohibited at the root node as it has no parent or siblings. They are also invalid when the parent node has reached its maximum allowed children, preventing unbounded tree growth. For backtrack specifically, a node at depth $d$ can only backtrack up to $d - 1$ steps, ensuring the action remains within the explored portion of the tree. The terminate action maintains the simplest constraint, becoming valid only when the current node has reached a final answer or the maximum depth limit has been reached.
138
+
139
+ These structural constraints ensure the reasoning process remains well-defined and computationally tractable while guiding the policy toward meaningful exploration paths. To implement these constraints efficiently, we represent them as a $D + 2$ dimensional binary vector, where $D$ indicates the depth limit of the reasoning tree. Each dimension corresponds to the validity of a specific action: the first dimension for expand, the second for branch, the next $D - 1$ dimensions for different backtrack depths, and the final dimension for terminate. This constraint vector serves dual purposes: it augments the policy's input state to inform action selection, and it masks invalid actions from the policy's output distribution, ensuring only valid actions can be sampled. Through this mechanism, the policy naturally learns to navigate within the feasible action space while maintaining the structural integrity of the reasoning tree.
140
+
141
+ # 2.3.4. POLICY DESIGN FOR PGTS
142
+
143
+ The effectiveness of PGTS heavily depends on its ability to process and navigate reasoning tree. In our TS-MDP formulation, the state is naturally represented as a tree where each node corresponds to a partial reasoning path. To effectively learn from this structured data, we need a policy architecture that can capture both local relationships between reasoning steps and global patterns across the entire tree.
144
+
145
+ We design our policy using a graph-based architecture that processes two types of features. Node features are derived from the hidden states of the target LLM, capturing the semantic content of each reasoning step. Edge features encode the intermediate rewards of reasoning transitions, quantifying the quality and relationships between consecutive steps. This rich feature representation enables the policy to assess both the local quality of individual steps and their contribution to the overall reasoning path.
146
+
147
+ To process these features effectively, we employ a Graph Transformer-based model using the GPS framework (Rampášek et al., 2022). This architecture combines local message passing operations from graph neural networks with global attention mechanisms from transformers. The local operations capture step-by-step reasoning relationships,
148
+
149
+ while global attention helps maintain coherence across the entire reasoning process. We further enhance the structural understanding by incorporating random-walking structure embeddings (Dwivedi et al., 2021), which encode each node's position and connectivity within the tree.
150
+
151
+ The policy network processes these inputs through a sequence of GPS layers, each layer aggregating both local and global information. The final representation of the current node is concatenated with the action constraints vector to ensure awareness of valid actions. This combined representation then passes through linear layers to produce logits for a categorical distribution over the $D + 2$ possible actions. Invalid actions are masked out during sampling, ensuring the policy's decisions respect the tree's structural constraints.
152
+
153
+ We implement the value network using the same architectural backbone, sharing the GPS layers with the policy network to maintain consistent representation learning. The value network differs only in its final layers, which produce a scalar estimate of the expected cumulative reward. This shared structure allows both networks to leverage the same learned representations of the reasoning tree while serving their distinct purposes in the decision-making process.
154
+
155
+ # 2.3.5. TRAINING
156
+
157
+ The training process for the PGTS policy aims to enhance reasoning effectiveness while minimizing unnecessary exploration. This is accomplished by optimizing the policy through reinforcement learning, with rewards designed to promote both accuracy and efficiency. The training iteratively refines the policy's ability to navigate reasoning trees and select actions that yield high-quality solutions.
158
+
159
+ We adopt Proximal Policy Optimization (PPO) (Schulman et al., 2017) as our training algorithm due to its stability and sample efficiency. Starting from randomly initialized weights, the policy interacts with reasoning tasks in episodes, learning to select actions that maximize cumulative rewards. When sampling actions during training, we apply the constraint mask to zero out logits of invalid actions, ensuring the decisions respect the tree's structural limits. The remaining logits are normalized to form a valid categorical distribution over permitted actions. This mechanism allows the policy to learn feasible exploration strategies while maintaining the integrity of the reasoning tree.
160
+
161
+ To encourage efficient exploration, we incorporate entropy regularization into the policy loss. This ensures that the policy maintains a balance between exploiting known high-reward paths and exploring less certain but potentially rewarding alternatives. Additionally, the cost components $\mathbb{C}(\mathbf{a})$ in the reward function are tuned to discourage excessive backtracking or branching, guiding the policy toward concise, meaningful reasoning paths. Please refer to Algorithm 1 for the complete training procedure.
162
+
163
+ # 3. Related Works
164
+
165
+ LLM Reasoning LLM reasoning has advanced through techniques such as CoT (Wei et al., 2022), ToT (Yao et al., 2024), and programmatic reasoning paradigms (Chen et al., 2022; Sel et al., 2023), fostering structured and iterative problem-solving. Recent innovations include heuristic search methods like MCTS (Feng et al., 2023; Hao et al., 2023) and $\mathbf{A}^*$ search (Wang et al., 2024a). Building on these developments, our PGTS framework integrates learned policies to improve search efficiency and reasoning performance. For a detailed review of related approaches and their connection to inference-time scaling, please refer to Sec. B.
166
+
167
+ Graph Transformers Graph Transformers (GTs) have emerged as powerful architectures for processing graph-structured data, building upon the success of Transformers in other domains. These models are particularly attractive due to their ability to address fundamental limitations of traditional Message Passing Neural Networks (MPNNs), such as over-smoothing and over-squashing issues (Alon & Yahav, 2020; Topping et al., 2021). Various GT architectures have been proposed, from the initial Fully-connected Graph Transformer with basic positional encodings (Dwivedi & Bresson, 2020), to more sophisticated designs like SAN with invariant eigenvector aggregation (Kreuzer et al., 2021), and Graphormer with distance-based encodings (Ying et al., 2021). GraphTrans (Wu et al., 2021) introduces the first hybrid architecture, which combines local message passing with global attention mechanisms. GPS (Rampášek et al., 2022) systematically investigates and integrates different components of GTs, offering a modular and scalable framework. In this work, we implement the PGTS policy using GPS layers given its ability to effectively combine local and global information while maintaining linear complexity.
168
+
169
+ # 4. Experiments
170
+
171
+ In this section, we showcase the flexibility and effectiveness of our PGTS framework across diverse problem domains, including mathematical reasoning, commonsense reasoning, logical reasoning, and real-world planning. For mathematical reasoning, we evaluate our framework on the GSM8K (Cobbe et al., 2021), MATH500 (Hendrycks et al., 2021; Lightman et al., 2023), and AQUA (Ling et al., 2017) datasets, using 4-shot settings for GSM8K and MATH500, and a 10-shot setting for AQUA. The in-context learning (ICL) examples are adapted from OpenCompass (Contributors, 2023) for GSM8K and MATH500, and from LLM-Reasoner (Hao et al., 2024) for AQUA. For commonsense reasoning, we evaluate StrategyQA (Geva et al., 2021) in a 5-shot setting, with ICL examples also adapted from OpenCompass. For logical reasoning, we evaluate the PrOntoQA (Saparov & He, 2022) dataset for logical deduction in a 5-shot setting and the GPQA (Rein et al., 2023) dataset for
172
+
173
+ graduate-level multiple-choice questions in a 0-shot setting. Finally, for the planning task, we evaluate our framework on the Blocksworld benchmark (Valmeekam et al., 2022).
174
+
175
+ Across all datasets, we define a single reasoning step as one sentence, maintaining consistency and simplicity. Unlike RAP (Hao et al., 2023), which incorporates a world model to simulate environment states after each action, our approach directly focuses on reasoning in the generated text without state modeling. For detailed dataset descriptions and reasoning setups, refer to Sec. C.
176
+
177
+ We compare PGTS against CoT and MCTS baselines. MCTS inherently explores multiple reasoning chains by traversing different paths during search, while we enhance CoT and our PGTS with self-consistency (SC) (Wang et al., 2022). Specifically, CoT aggregate outcomes from multiple chains using majority voting, whereas MCTS and PGTS utilize weighted voting based on the reward of each reasoning chain. Additionally, we report MCTS results for the highest-reward trajectory. Since one of our primary goals is to reduce reasoning costs, we exclude MCTS approaches that rely on self-evaluation as intermediate rewards (Xie et al., 2024a; Gao et al., 2024), as they are computationally expensive. Instead, we simply use the likelihood of each reasoning step as the intermediate reward, $R(s, a)$ . An oracle setting is included for MCTS, allowing it to access task rewards by comparing generated answers with ground truths during search. For both MCTS and PGTS approaches, the tree breadth is limited to 4 child node per parent. For detailed descriptions of the baselines, refer to Sec.D, and for ablations on the reasoning tree constraints, see Sec.4.1.
178
+
179
+ For PGTS, we train the policy using up to 1,000 examples from the training split of each dataset. This highlights the sample efficiency of our approach, as 1,000 examples suffice to learn an effective policy. For ablations on training settings, refer to Sec. 4.1. The policy architecture consists of two GPS layers followed by a single linear layer for action and value prediction. To simplify experiments, the action cost $\mathbb{C}(\mathbf{a})$ is fixed across datasets, with values of 0.1, 0.2, 0.5, and 0.0 for expand, branch, backtrack, and terminate actions, respectively. While dataset-specific tuning could further enhance performance, we leave this for future exploration. See Sec. E for training details of our PGTS policy.
180
+
181
+ Table 1 presents evaluation results for the LLaMA3.1-8B and LLaMA3.1-70B models, both configured to generate reasoning steps with a temperature of 0.6 and top-p of 0.9 Across all datasets, PGTS consistently outperforms CoT, demonstrating the effectiveness of its learned policy in guiding reasoning steps. The inclusion of SC further boosts PGTS performance. For instance, on the MATH dataset, PGTS improves accuracy from CoT's $34.40\%$ to $41.40\%$ in the 8B setting, illustrating its ability to explore high-quality reasoning chains. Similarly, on Blockworld, PGTS-SC
182
+
183
+ Table 1. Evaluation results of LLaMA3.1-8B and LLaMA3.1-70B on various datasets across multiple reasoning tasks: Mathematical reasoning (GSM8K, MATH, AQUA), Commonsense reasoning (StrategyQA), Logical reasoning (PrOntoQA, GPQA), and Planning tasks (Blocksworld with 4 and 8 steps). SC4 and SC8 denote self-consistency voting over 4 and 8 sampled chains, respectively. MCTS (Best) reports results for the reasoning chain with the highest reward, while MCTS (Agg) presents results aggregated over multiple reasoning chains using weighted voting on the final answer. MCTS (Oracle) compares final answer with groundtruth as an additional reward.
184
+
185
+ <table><tr><td rowspan="2"></td><td rowspan="2"></td><td colspan="3">Mathematical</td><td>Com. Sense</td><td colspan="2">Logical</td><td colspan="2">Planning</td></tr><tr><td>GSM8K</td><td>MATH</td><td>AQUA</td><td>StrategyQA</td><td>PrOntoQA</td><td>GPQA</td><td>BW (4)</td><td>BW (8)</td></tr><tr><td rowspan="9">LLaMA3.1-8B</td><td>CoT</td><td>83.47</td><td>34.40</td><td>51.57</td><td>74.20</td><td>69.40</td><td>14.65</td><td>22.37</td><td>2.10</td></tr><tr><td>CoT (SC4)</td><td>87.79</td><td>42.20</td><td>53.94</td><td>77.10</td><td>73.00</td><td>15.66</td><td>22.37</td><td>2.79</td></tr><tr><td>CoT (SC8)</td><td>89.84</td><td>48.20</td><td>55.12</td><td>77.20</td><td>74.60</td><td>15.15</td><td>26.32</td><td>2.79</td></tr><tr><td>MCTS (Best)</td><td>86.13</td><td>43.80</td><td>60.63</td><td>79.00</td><td>74.20</td><td>34.34</td><td>28.95</td><td>6.29</td></tr><tr><td>MCTS (Agg)</td><td>87.72</td><td>46.00</td><td>59.45</td><td>79.50</td><td>74.20</td><td>32.83</td><td>28.95</td><td>6.29</td></tr><tr><td>MCTS (Oracle)</td><td>88.78</td><td>51.40</td><td>64.96</td><td>84.40</td><td>74.80</td><td>34.85</td><td>34.21</td><td>6.29</td></tr><tr><td>PGTS</td><td>85.29</td><td>41.00</td><td>60.63</td><td>77.70</td><td>68.20</td><td>18.69</td><td>27.63</td><td>3.50</td></tr><tr><td>PGTS (SC4)</td><td>89.61</td><td>47.00</td><td>66.93</td><td>83.80</td><td>74.40</td><td>22.73</td><td>35.53</td><td>4.90</td></tr><tr><td>PGTS (SC8)</td><td>89.99</td><td>52.20</td><td>66.54</td><td>85.70</td><td>77.40</td><td>27.78</td><td>36.84</td><td>6.99</td></tr><tr><td rowspan="7">LLaMA3.1-70B</td><td>CoT</td><td>91.66</td><td>53.80</td><td>72.83</td><td>83.60</td><td>92.00</td><td>20.20</td><td>39.47</td><td>18.88</td></tr><tr><td>CoT (SC4)</td><td>92.49</td><td>58.60</td><td>72.44</td><td>85.10</td><td>93.60</td><td>19.78</td><td>50.00</td><td>20.28</td></tr><tr><td>MCTS (Best)</td><td>91.28</td><td>56.20</td><td>76.38</td><td>85.70</td><td>95.20</td><td>41.92</td><td>50.00</td><td>22.38</td></tr><tr><td>MCTS (Agg)</td><td>92.27</td><td>57.20</td><td>77.17</td><td>86.70</td><td>95.20</td><td>43.94</td><td>50.00</td><td>22.37</td></tr><tr><td>MCTS (Oracle)</td><td>93.10</td><td>66.00</td><td>82.68</td><td>90.70</td><td>96.00</td><td>47.47</td><td>61.80</td><td>24.47</td></tr><tr><td>PGTS</td><td>91.05</td><td>54.77</td><td>73.23</td><td>85.50</td><td>91.40</td><td>32.18</td><td>46.05</td><td>22.38</td></tr><tr><td>PGTS (SC4)</td><td>92.54</td><td>59.65</td><td>79.92</td><td>91.00</td><td>96.80</td><td>36.36</td><td>50.00</td><td>25.87</td></tr></table>
186
+
187
+ achieves an accuracy of $36.84\%$ , compared to CoT-SC's $26.32\%$ , showcasing its superior handling of multi-step reasoning tasks. While both CoT and PGTS benefit from SC, PGTS exhibits more pronounced improvements, underscoring its ability to generate diverse, high-quality chains suitable for aggregation. Please see Sec. G for examples of the generated reasoning chains.
188
+
189
+ When compared to MCTS, PGTS demonstrates competitive performance across most tasks. For example, PGTS without SC achieves comparable accuracy to MCTS on GSM8K, MATH, and StrategyQA and surpasses MCTS when augmented with SC. However, one exception is the GPQA task, where PGTS underperforms MCTS. This can be attributed to the inherent complexity of GPQA, which includes diverse topics and is curated to challenge even non-expert humans. Moreover, the limited training data available for PGTS, given the task complexity, makes it difficult to fully capture the intricacies of GPQA.
190
+
191
+ A key advantage of PGTS over MCTS is its computational efficiency. As shown in Figure 2, MCTS incurs significantly higher token costs due to its exhaustive search over reasoning chains. For instance, on MATH, MCTS requires 16.25 times more tokens than CoT, whereas PGTS achieves competitive performance with only a 5.28 times increase. Similarly, on GSM8K, MCTS uses 13.33 times the tokens of CoT, while PGTS requires just 1.29 times. These reductions in token usage make PGTS more practical for real-world applications where computational costs are critical. Although
192
+
193
+ SC requires generating additional tokens for aggregating outcomes over multiple reasoning chains, these operations are highly parallelizable, ensuring that PGTS with SC remains computationally feasible despite the additional generations. Notably, the overhead introduced by the PGTS policy is negligible compared to the cost of LLM generation, thanks to its lightweight architecture.
194
+
195
+ # 4.1. Ablations
196
+
197
+ Training Examples In the main results, we train the PGTS policy using up to 1,000 examples. Here, we demonstrate the convergence behavior of the training process. Figure 3 presents the training curve with evaluation results at intermediate checkpoints, showing that the policy converges quickly and plateaus at approximately 1,000 examples.
198
+
199
+ Tree Constraints In our main results, we limit the tree breadth to 4 child nodes per parent. Table 2 shows evaluation results on AQUA with varying tree breadths. Both MCTS and PGTS achieve better performance with broader trees, as expected, since a broader tree facilitates more diverse reasoning chains. However, broader trees also generate more tokens, so we use a breadth of 4 in our main results to balance accuracy and reasoning cost. For tree depth, we set an upper bound that ensures all examples can reach the terminal state (i.e., the final answer), with the terminate action allowing early stopping as needed.
200
+
201
+ Policy Network We implement our PGTS policy using GPS layers, which combine local message passing and
202
+
203
+ ![](images/40670db9ee62b65a6afd3b9419676490c3c276e40f95e94e643e9ff4ea269ee0.jpg)
204
+ Figure 2. Comparison of generated token counts for LLaMA3.1-8B, normalized relative to the CoT method.
205
+
206
+ ![](images/8bbb05b9833b383776f6652e647dc90eaf097b309cea1af9c28b1fa7ba414ae8.jpg)
207
+ (a) GSM8K
208
+
209
+ ![](images/4b21e0655c7477fb9fd34fd9ed814a6ad61ab7c3a6ca2bacbd1b20f1987f9898.jpg)
210
+ (b) AQUA
211
+ Figure 3. Trajectory reward along training, with evaluation results at intermediate checkpoints.
212
+
213
+ Table 2. AQUA results with different tree breadth.
214
+
215
+ <table><tr><td></td><td></td><td>2</td><td>4</td><td>8</td></tr><tr><td rowspan="2">Evaluation Results</td><td>PGTS</td><td>55.91</td><td>60.63</td><td>61.47</td></tr><tr><td>MCTS</td><td>57.08</td><td>59.45</td><td>62.60</td></tr><tr><td rowspan="2">Generated Tokens</td><td>PGTS</td><td>252.16</td><td>283.24</td><td>370.54</td></tr><tr><td>MCTS</td><td>399.13</td><td>1241.37</td><td>3282.41</td></tr></table>
216
+
217
+ global attention to extract node features effectively. The reasoning tree also incorporates the immediate reward $R(s, a)$ as edge features to inform decision-making. Table 3 presents ablation studies evaluating the importance of each component in the GPS-based policy and comparing it to alternative policy implementations. SAN replaces GPS layers with a different graph transformer architecture proposed in (Kreuzer et al., 2021). SLM replaces the graph-based policy with a small language model (distilbert-base-uncased), which processes the previous reasoning trajectory to predict the next action. LLM Agent prompts the same target LLM to predict the exploration action, aligning with an agentic approach where the LLM assumes the role of an autonomous agent collaborating with others to solve the problem. Details of these policy implementations are provided in Sec. F. The ablation results demonstrate that the full GPS policy achieves the best performance, highlighting the effectiveness of integrating local message passing, global attention, and edge features. Removing edge features or global attention results in significant performance drops, especially on AQUA, emphasizing their importance for reasoning. While SAN performs competitively, it falls short of GPS, suggesting that
218
+
219
+ Table 3. Ablation studies on policy implementation.
220
+
221
+ <table><tr><td></td><td>AQUA</td><td>GSM8K</td></tr><tr><td>GPS</td><td>60.63</td><td>85.29</td></tr><tr><td>GPS (w/o edge features)</td><td>50.79</td><td>81.96</td></tr><tr><td>GPS (w/o global attention)</td><td>54.72</td><td>84.15</td></tr><tr><td>GPS (w/o local MPNN)</td><td>58.76</td><td>84.78</td></tr><tr><td>SAN</td><td>60.24</td><td>82.56</td></tr><tr><td>SLM</td><td>53.94</td><td>82.87</td></tr><tr><td>LLM Agent</td><td>55.51</td><td>83.32</td></tr></table>
222
+
223
+ advanced graph modeling techniques could further enhance results. SLM and LLM Agent perform worse, underscoring the strengths of graph-based approaches over language-only methods. We hypothesize that techniques such as improved prompt engineering or memory-augmented agents (Chen et al., 2024b) could boost agent-based performance, which we leave for future work.
224
+
225
+ # 5. Conclusion
226
+
227
+ In this work, we introduced Policy-Guided Tree Search (PGTS), a novel framework for reasoning with large language models that combines the efficiency of policy-guided exploration with the structured advantages of tree search. PGTS dynamically allocates inference resources, prioritizing promising reasoning paths for targeted exploration, leading to significant improvements in inference efficiency and the ability to tackle complex reasoning tasks. Moreover, PGTS addresses the "overthinking" problem commonly observed in many o1-like models (Chen et al., 2024c), where excessive reasoning steps are generated for simple problems.
228
+
229
+ A key paradigm shift in PGTS is treating the LLM as an environment rather than a policy, enabling external decision-making components to guide reasoning processes more effectively. While the current implementation uses simple log-likelihood-based rewards as intermediate feedback, future work could incorporate more sophisticated reward mechanisms, such as LLM self-evaluation or task-specific metrics, to provide richer guidance during the search and further enhance reasoning performance. PGTS represents a significant step toward more efficient and structured inference-time reasoning with LLMs.
230
+
231
+ # Impact Statement
232
+
233
+ This work aims to advance the field of reasoning with large language models (LLMs) by introducing the Policy-Guided Tree Search (PGTS) framework. By improving inference efficiency and addressing challenges such as overthinking in reasoning processes, PGTS contributes to the broader objective of enhancing LLM usability in complex reasoning tasks.
234
+
235
+ The proposed framework has the potential to positively impact areas where efficient reasoning and decision-making are critical, including education, scientific discovery, and AI-driven assistance. However, it is essential to acknowledge certain ethical considerations and limitations. PGTS does not explicitly address the faithfulness of generated reasoning chains, meaning the reasoning paths may not align with human-understandable logic or the true underlying reasoning process. This limitation could inadvertently lead to misleading outputs in high-stakes applications.
236
+
237
+ Future work exploring richer reward signals, such as self-evaluation or task-specific metrics, could mitigate these concerns and ensure greater alignment with human expectations. While PGTS optimizes reasoning efficiency, care must also be taken to ensure it is applied responsibly, particularly in applications requiring transparency and trust in AI reasoning processes.
238
+
239
+ In summary, this work represents a meaningful step toward improving LLM reasoning capabilities, with both ethical implications and societal benefits that warrant further exploration and thoughtful application.
240
+
241
+ # References
242
+
243
+ Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
244
+ Alon, U. and Yahav, E. On the bottleneck of graph neural networks and its practical implications. arXiv preprint arXiv:2006.05205, 2020.
245
+ Besta, M., Blach, N., Kubicek, A., Gerstenberger, R., Podstawski, M., Gianinazzi, L., Gajda, J., Lehmann, T., Niewiadomski, H., Nczyk, P., et al. Graph of thoughts: Solving elaborate problems with large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 17682-17690, 2024.
246
+ Brown, B., Juravsky, J., Ehrlich, R., Clark, R., Le, Q. V., Ré, C., and Mirhoseini, A. Large language monkeys: Scaling inference compute with repeated sampling. arXiv preprint arXiv:2407.21787, 2024.
247
+
248
+ Chen, L., Davis, J. Q., Hanin, B., Bailis, P., Stoica, I., Zaharia, M., and Zou, J. Are more llm calls all you need? towards scaling laws of compound inference systems. arXiv preprint arXiv:2403.02419, 2024a.
249
+ Chen, M., Li, Y., Yang, Y., Yu, S., Lin, B., and He, X. Automatic manual: Generating instruction manuals by llm agents via interactive environmental learning. arXiv preprint arXiv:2405.16247, 2024b.
250
+ Chen, W., Ma, X., Wang, X., and Cohen, W. W. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588, 2022.
251
+ Chen, X., Xu, J., Liang, T., He, Z., Pang, J., Yu, D., Song, L., Liu, Q., Zhou, M., Zhang, Z., et al. Do not think that much for $2 + 3 = ?$ on the overthinking of o1-like llms. arXiv preprint arXiv:2412.21187, 2024c.
252
+ Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
253
+ Contributors, O. Opencompass: A universal evaluation platform for foundation models. https://github.com/open-compass/opencompass, 2023.
254
+ Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
255
+ Dwivedi, V. P. and Bresson, X. A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699, 2020.
256
+ Dwivedi, V. P., Luu, A. T., Laurent, T., Bengio, Y., and Bresson, X. Graph neural networks with learnable structural and positional representations. arXiv preprint arXiv:2110.07875, 2021.
257
+ Feng, X., Wan, Z., Wen, M., McAleer, S. M., Wen, Y., Zhang, W., and Wang, J. Alphazero-like tree-search can guide large language model decoding and training. arXiv preprint arXiv:2309.17179, 2023.
258
+ Gao, Z., Niu, B., He, X., Xu, H., Liu, H., Liu, A., Hu, X., and Wen, L. Interpretable contrastive monte carlo tree search reasoning. arXiv preprint arXiv:2410.01707, 2024.
259
+ Geva, M., Khashabi, D., Segal, E., Khot, T., Roth, D., and Berant, J. Did aristotle use a laptop? a question answering benchmark with implicit reasoning strategies. *Transactions of the Association for Computational Linguistics*, 9: 346-361, 2021.
260
+
261
+ Grill, J.-B., Altché, F., Tang, Y., Hubert, T., Valko, M., Antonoglou, I., and Munos, R. Monte-carlo tree search as regularized policy optimization. In International Conference on Machine Learning, pp. 3769-3778. PMLR, 2020.
262
+ Hao, S., Gu, Y., Ma, H., Hong, J. J., Wang, Z., Wang, D. Z., and Hu, Z. Reasoning with language model is planning with world model. arXiv preprint arXiv:2305.14992, 2023.
263
+ Hao, S., Gu, Y., Luo, H., Liu, T., Shao, X., Wang, X., Xie, S., Ma, H., Samavedhi, A., Gao, Q., et al. Llm reasoners: New evaluation, library, and analysis of step-by-step reasoning with large language models. arXiv preprint arXiv:2404.05221, 2024.
264
+ Hart, P. E., Nilsson, N. J., and Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE transactions on Systems Science and Cybernetics, 4(2):100-107, 1968.
265
+ Havrilla, A., Raparthy, S., Nalmpantis, C., Dwivedi-Yu, J., Zhuravinskyi, M., Hambro, E., and Raileanu, R. Glore: When, where, and how to improve llm reasoning via global and local refinements. arXiv preprint arXiv:2402.10963, 2024.
266
+ Hendrycks, D., Burns, C., Kadavath, S., Arora, A., Basart, S., Tang, E., Song, D., and Steinhardt, J. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
267
+ Hong, R., Zhang, H., Pang, X., Yu, D., and Zhang, C. A closer look at the self-verification abilities of large language models in logical reasoning. arXiv preprint arXiv:2311.07954, 2023.
268
+ Huang, J. and Chang, K. C.-C. Towards reasoning in large language models: A survey. arXiv preprint arXiv:2212.10403, 2022.
269
+ Huang, J., Chen, X., Mishra, S., Zheng, H. S., Yu, A. W., Song, X., and Zhou, D. Large language models cannot self-correct reasoning yet. arXiv preprint arXiv:2310.01798, 2023.
270
+ Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., Casas, D. d. l., Bressand, F., Lengyel, G., Lample, G., Saulnier, L., et al. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023.
271
+ Kambhampati, S. Can large language models reason and plan? Annals of the New York Academy of Sciences, 1534 (1):15-18, 2024.
272
+ Kambhampati, S., Valmeekam, K., Guan, L., Verma, M., Stechly, K., Bhambri, S., Saldyt, L., and Murthy, A. Llms
273
+
274
+ can't plan, but can help planning in llm-modulo frameworks. arXiv preprint arXiv:2402.01817, 2024.
275
+ Kao, K.-C., Wang, R., and Hsieh, C.-J. Solving for x and beyond: Can large language models solve complex math problems with more-than-two unknowns? arXiv preprint arXiv:2407.05134, 2024.
276
+ Kartal, B., Hernandez-Leal, P., and Taylor, M. E. Action guidance with mcts for deep reinforcement learning. In Proceedings of the AAAI conference on artificial intelligence and interactive digital entertainment, volume 15, pp. 153-159, 2019.
277
+ Khalifa, M., Logeswaran, L., Lee, M., Lee, H., and Wang, L. Grace: Discriminator-guided chain-of-thought reasoning. arXiv preprint arXiv:2305.14934, 2023.
278
+ Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., and Iwasawa, Y. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35: 22199-22213, 2022.
279
+ Kreuzer, D., Beaini, D., Hamilton, W., Létourneau, V., and Tossou, P. Rethinking graph transformers with spectral attention. Advances in Neural Information Processing Systems, 34:21618-21629, 2021.
280
+ Li, C., Liang, J., Zeng, A., Chen, X., Hausman, K., Sadigh, D., Levine, S., Fei-Fei, L., Xia, F., and Ichter, B. Chain of code: Reasoning with a language model-augmented code emulator. arXiv preprint arXiv:2312.04474, 2023.
281
+ Li, Y., Lin, Z., Zhang, S., Fu, Q., Chen, B., Lou, J.-G., and Chen, W. Making large language models better reasoners with step-aware verifier. arXiv preprint arXiv:2206.02336, 2022.
282
+ Lightman, H., Kosaraju, V., Burda, Y., Edwards, H., Baker, B., Lee, T., Leike, J., Schulman, J., Sutskever, I., and Cobbe, K. Let's verify step by step. arXiv preprint arXiv:2305.20050, 2023.
283
+ Ling, W., Yogatama, D., Dyer, C., and Blunsom, P. Program induction by rationale generation: Learning to solve and explain algebraic word problems. arXiv preprint arXiv:1705.04146, 2017.
284
+ Malherbe, C., Grosnit, A., Tutunov, R., Bou Ammar, H., and Wang, J. Optimistic tree searches for combinatorial black-box optimization. Advances in Neural Information Processing Systems, 35:33080-33092, 2022.
285
+ Ning, X., Lin, Z., Zhou, Z., Wang, Z., Yang, H., and Wang, Y. Skeleton-of-thought: Prompting llms for efficient parallel generation. In The Twelfth International Conference on Learning Representations, 2024.
286
+
287
+ Qi, Z., Ma, M., Xu, J., Zhang, L. L., Yang, F., and Yang, M. Mutual reasoning makes smaller llms stronger problem-solvers. arXiv preprint arXiv:2408.06195, 2024.
288
+ Qu, Y., Zhang, T., Garg, N., and Kumar, A. Recursive introspection: Teaching language model agents how to self-improve. arXiv preprint arXiv:2407.18219, 2024.
289
+ Rampášek, L., Galkin, M., Dwivedi, V. P., Luu, A. T., Wolf, G., and Beaini, D. Recipe for a general, powerful, scalable graph transformer. Advances in Neural Information Processing Systems, 35:14501-14515, 2022.
290
+ Rein, D., Hou, B. L., Stickland, A. C., Petty, J., Pang, R. Y., Dirani, J., Michael, J., and Bowman, S. R. Gpqa: A graduate-level google-proof q&a benchmark. arXiv preprint arXiv:2311.12022, 2023.
291
+ Saparov, A. and He, H. Language models are greedy reasoners: A systematic formal analysis of chain-of-thought. arXiv preprint arXiv:2210.01240, 2022.
292
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
293
+ Sel, B., Al-Tawaha, A., Khattar, V., Jia, R., and Jin, M. Algorithm of thoughts: Enhancing exploration of ideas in large language models. arXiv preprint arXiv:2308.10379, 2023.
294
+ Silver, D., Hubert, T., Schrittwieser, J., Antonoglou, I., Lai, M., Guez, A., Lanctot, M., Sifre, L., Kumaran, D., Graepel, T., et al. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. arXiv preprint arXiv:1712.01815, 2017.
295
+ Singh, A., Co-Reyes, J. D., Agarwal, R., Anand, A., Patil, P., Garcia, X., Liu, P. J., Harrison, J., Lee, J., Xu, K., et al. Beyond human data: Scaling self-training for problem-solving with language models. arXiv preprint arXiv:2312.06585, 2023.
296
+ Snell, C., Lee, J., Xu, K., and Kumar, A. Scaling llm test-time compute optimally can be more effective than scaling model parameters. arXiv preprint arXiv:2408.03314, 2024.
297
+ Stechly, K., Valmeekam, K., and Kambhampati, S. On the self-verification limitations of large language models on reasoning and planning tasks. arXiv preprint arXiv:2402.08115, 2024.
298
+ Team, G., Anil, R., Borgeaud, S., Alayrac, J.-B., Yu, J., Soricut, R., Schalkwyk, J., Dai, A. M., Hauth, A., Millican, K., et al. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805, 2023.
299
+
300
+ Topping, J., Di Giovanni, F., Chamberlain, B. P., Dong, X., and Bronstein, M. M. Understanding over-squashing and bottlenecks on graphs via curvature. arXiv preprint arXiv:2111.14522, 2021.
301
+ Uesato, J., Kushman, N., Kumar, R., Song, F., Siegel, N., Wang, L., Creswell, A., Irving, G., and Higgins, I. Solving math word problems with process-and outcome-based feedback. arXiv preprint arXiv:2211.14275, 2022.
302
+ Valmeekam, K., Olmo, A., Sreedharan, S., and Kambhampati, S. Large language models still can't plan (a benchmark for llms on planning and reasoning about change). In NeurIPS 2022 Foundation Models for Decision Making Workshop, 2022.
303
+ Wang, C., Deng, Y., Lyu, Z., Zeng, L., He, J., Yan, S., and An, B. Q*: Improving multi-step reasoning for llms with deliberative planning. arXiv preprint arXiv:2406.14283, 2024a.
304
+ Wang, L., Fonseca, R., and Tian, Y. Learning search space partition for black-box optimization using monte carlo tree search. Advances in Neural Information Processing Systems, 33:19511-19522, 2020.
305
+ Wang, P., Li, L., Shao, Z., Xu, R., Dai, D., Li, Y., Chen, D., Wu, Y., and Sui, Z. Math-shepherd: Verify and reinforce llms step-by-step without human annotations. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 9426-9439, 2024b.
306
+ Wang, S., Xue, K., Song, L., Huang, X., and Qian, C. Monte carlo tree search based space transfer for black-box optimization. arXiv preprint arXiv:2412.07186, 2024c.
307
+ Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022.
308
+ Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022.
309
+ Wu, Y., Sun, Z., Li, S., Welleck, S., and Yang, Y. An empirical analysis of compute-optimal inference for problem-solving with language models. 2024.
310
+ Wu, Z., Jain, P., Wright, M., Mirhoseini, A., Gonzalez, J. E., and Stoica, I. Representing long-range context for graph neural networks with global attention. Advances in Neural Information Processing Systems, 34:13266-13279, 2021.
311
+
312
+ Xie, Y., Goyal, A., Zheng, W., Kan, M.-Y., Lillicrap, T. P., Kawaguchi, K., and Shieh, M. Monte carlo tree search boosts reasoning via iterative preference learning. arXiv preprint arXiv:2405.00451, 2024a.
313
+ Xie, Y., Kawaguchi, K., Zhao, Y., Zhao, J. X., Kan, M.-Y., He, J., and Xie, M. Self-evaluation guided beam search for reasoning. Advances in Neural Information Processing Systems, 36, 2024b.
314
+ Yang, L., Yu, Z., Zhang, T., Cao, S., Xu, M., Zhang, W., Gonzalez, J. E., and Cui, B. Buffer of thoughts: Thought-augmented reasoning with large language models. arXiv preprint arXiv:2406.04271, 2024.
315
+ Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T., Cao, Y., and Narasimhan, K. Tree of thoughts: Deliberate problem solving with large language models. Advances in Neural Information Processing Systems, 36, 2024.
316
+ Ying, C., Cai, T., Luo, S., Zheng, S., Ke, G., He, D., Shen, Y., and Liu, T.-Y. Do transformers really perform badly for graph representation? Advances in neural information processing systems, 34:28877-28888, 2021.
317
+ Yuan, Z., Yuan, H., Li, C., Dong, G., Lu, K., Tan, C., Zhou, C., and Zhou, J. Scaling relationship on learning mathematical reasoning with large language models. arXiv preprint arXiv:2308.01825, 2023.
318
+ Zelikman, E., Wu, Y., Mu, J., and Goodman, N. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476-15488, 2022.
319
+ Zelikman, E., Harik, G., Shao, Y., Jayasiri, V., Haber, N., and Goodman, N. D. Quiet-star: Language models can teach themselves to think before speaking. arXiv preprint arXiv:2403.09629, 2024.
320
+ Zhai, Y. and Gao, S. Monte carlo tree descent for black-box optimization. Advances in Neural Information Processing Systems, 35:12581-12593, 2022.
321
+ Zhang, L., Hosseini, A., Bansal, H., Kazemi, M., Kumar, A., and Agarwal, R. Generative verifiers: Reward modeling as next-token prediction, 2024. URL https://arxiv.org/abs/2408.15240, 2024.
322
+ Zhang, Z., Zhang, A., Li, M., and Smola, A. Automatic chain of thought prompting in large language models. arXiv preprint arXiv:2210.03493, 2022.
323
+ Zhao, R., Li, X., Joty, S., Qin, C., and Bing, L. Verify-and-edit: A knowledge-enhanced chain-of-thought framework. arXiv preprint arXiv:2305.03268, 2023.
324
+ Zhao, Y., Yin, H., Zeng, B., Wang, H., Shi, T., Lyu, C., Wang, L., Luo, W., and Zhang, K. Marco-o1: Towards
325
+
326
+ open reasoning models for open-ended solutions. arXiv preprint arXiv:2411.14405, 2024.
327
+ Zhou, D., Schärli, N., Hou, L., Wei, J., Scales, N., Wang, X., Schuurmans, D., Cui, C., Bousquet, O., Le, Q., et al. Least-to-most prompting enables complex reasoning in large language models. arXiv preprint arXiv:2205.10625, 2022.
328
+
329
+ # A. Training Algorithm
330
+
331
+ Algorithm 1 Policy Training in TS-MDP
332
+ Require: Reasoning tasks $\mathcal{T}$ depth limit $D$ breadth limit $B$ reward function $R(s,a)$ cost function $\mathbb{C}(\mathsf{a})$
333
+ Ensure: Trained policy $\pi (\mathsf{a}|\mathsf{s})$ and value function $V(\mathbf{s})$
334
+ 1: Initialize: Parameters of policy $\pi_{\phi}$ and value function $V_{\psi}$
335
+ 2: while not converged do
336
+ 3: Sample a task from $\mathcal{T}$ , and initialize the root node $\mathfrak{s}_0$
337
+ 4: for $t = 0,1,\ldots ,T_{\mathrm{max}}$ do
338
+ 5: Extract valid actions and construct the constraints vector c
339
+ 6: Compute policy logits $\pi \gets \pi_{\theta}(\mathsf{s}_t,\mathsf{c})$
340
+ 7: Sample action $\mathsf{a}_t\sim$ Categorical( $\pi$
341
+ 8: Execute action $\mathsf{a}_{t}$ and observe next state $\mathsf{s}_{t + 1}$ ,reward $r_t$ ,and constraints $\mathbf{c}_{t + 1}$
342
+ 9: Store transition $(s_t,a_t,r_t,s_{t + 1},c_{t + 1})$ in replay buffer $\mathcal{B}$
343
+ 10: if $\mathsf{a}_t$ is Terminate then
344
+ 11: Break
345
+ 12: end if
346
+ 13: end for
347
+ 14: Compute Returns and Advantages:
348
+ 15: for each sampled trajectory in $\mathcal{B}$ do
349
+ 16: Compute discounted returns: $G_{t} = \sum_{j = 0}^{\infty}\gamma^{j}r_{t + j}$
350
+ 17: Compute advantages: $A_{t} = G_{t} - V_{\psi}(\mathsf{s}_{t})$
351
+ 18: end for
352
+ 19: Policy Update:
353
+ 20: Compute policy loss $\mathcal{L}_{\pi} = -\mathbb{E}\big[\log \pi_{\phi}(\mathsf{a}_{t}|\mathsf{s}_{t},\mathsf{c}_{t})\cdot A_{t}\big] - \omega \cdot H(\pi_{\phi}(\mathsf{a}_{t}|\mathsf{s}_{t},\mathsf{c}_{t}))$
354
+ 21: Update policy parameters: $\phi \leftarrow \phi -\eta_{\pi}\nabla_{\phi}\mathcal{L}_{\pi}$
355
+ 22: Value Function Update:
356
+ 23: Compute value loss $\mathcal{L}_V = \mathbb{E}\big[(V_\psi (\mathsf{s}_t) - G_t)^2\big]$
357
+ 24: Update value parameters: $\psi \leftarrow \psi -\eta_V\nabla_\psi \mathcal{L}_V$
358
+ 25: end while
359
+
360
+ # B. Related Works
361
+
362
+ LLM Reasoning In the context of LLM reasoning, Chain-of-Thought (CoT) reasoning (Wei et al., 2022) serves as a foundational technique that decomposes problems into intermediate steps, facilitating step-by-step reasoning that mimics human problem-solving strategies. Since its introduction, numerous enhancements to CoT have been proposed, including Zero-Shot-CoT (Kojima et al., 2022), Self-Consistency with CoT (Wang et al., 2022), AutoCoT (Zhang et al., 2022), and VerifyCoT (Zhao et al., 2023), among others. Least-to-Most Prompting (Zhou et al., 2022) represents another influential paradigm that iteratively constructs solutions by dividing complex problems into simpler tasks. Building on this problem decomposition paradigm, Program-of-Thought (Chen et al., 2022), Chain-of-Code (Li et al., 2023), Buffer-of-Thought (Yang et al., 2024), and algorithm-of-Thought (Sel et al., 2023) incorporate programmatic reasoning steps to further enhance problem-solving. Tree-of-Thought (Yao et al., 2024) extends CoT by organizing reasoning processes into a tree structure, where each node represents a partial solution and edges signify transitions. However, ToT faces challenges with large search spaces for deep trees, leading to computational inefficiencies. To address this, Graph-of-Thought (Besta et al., 2024) generalizes ToT by modeling reasoning as a graph, allowing dynamic path selection, backtracking, and aggregation of information across multiple paths. Meanwhile, Skeleton-of-Thought (Ning et al., 2024) reduces latency by generating a skeleton outline of answers before completing the details in parallel. Recent research has also explored heuristic search techniques, such as Monte Carlo Tree Search (MCTS) (Feng et al., 2023; Hao et al., 2023) and A* Search (Wang et al., 2024a), to identify optimal reasoning chains. Building on these advancements, our proposed PGTS approach enhances heuristic search by integrating a learned policy to guide the search process, enabling more efficient exploration.
363
+
364
+ Beyond directly eliciting reasoning capabilities from LLMs, external components have been developed to verify reasoning steps (Cobbe et al., 2021; Lightman et al., 2023; Li et al., 2022; Wang et al., 2024b; Zhang et al., 2024) or refine generated reasoning through iterative revision (Qu et al., 2024; Havrilla et al., 2024). Additionally, iterative bootstrapping techniques
365
+
366
+ (Zelikman et al., 2022; 2024; Singh et al., 2023; Yuan et al., 2023) have been explored to progressively enhance LLM reasoning performance. These approaches are complementary to our method and can be integrated to achieve further improvements.
367
+
368
+ Inference Time Scaling Optimizing inference-time compute has emerged as a critical area of research for improving the performance of LLMs. Unlike the traditional focus on scaling model parameters during training, inference-time scaling explores strategies to leverage additional compute during inference to enhance model outputs. One foundational approach in inference-time scaling is best-of-N sampling, where multiple completions are generated for a given prompt, and the best response is selected using a secondary mechanism, such as a reward model (Lightman et al., 2023). Recent studies have sought to formalize the relationship between inference compute and performance, proposing scaling laws for inference-time optimization (Snell et al., 2024; Wu et al., 2024; Chen et al., 2024a; Brown et al., 2024). These works show that carefully allocating inference resources, such as by balancing the number of samples with selection quality, can yield significant gains in model performance. Our proposed PGTS approach offers an efficient alternative to traditional inference-time scaling methods. Rather than passively sampling multiple outputs, the policy actively and dynamically decides when and where to allocate additional inference resources. This targeted approach enables more strategic exploration, focusing compute on the most promising reasoning paths.
369
+
370
+ # C. Evaluation Datasets
371
+
372
+ GSM8K GSM8K (Cobbe et al., 2021) is a benchmark dataset designed to assess mathematical reasoning skills in language models. It comprises approximately 8,500 high-quality grade school math problems that require multi-step reasoning to arrive at the correct solution. We adhere to the original train-test split and evaluate models in a 4-shot setting, using in-context examples and a prompt template adapted from OpenCompass (Contributors, 2023), which provide representative coverage of various problem types.
373
+
374
+ During generation, each reasoning step is defined as a single sentence. To manage computational complexity, we set the tree breadth limit to 4, meaning each parent node can have up to 4 child nodes, and the depth limit to 16, which suffices to reach terminal nodes for most questions in this dataset. Additionally, the PGTS policy is configured to allow a maximum of 64 reasoning steps, balancing efficiency with the ability to explore complex reasoning chains.
375
+
376
+ MATH500 MATH500 (Hendrycks et al., 2021; Lightman et al., 2023) is a subset of the MATH dataset, designed to evaluate advanced mathematical problem-solving capabilities. It encompasses questions from high school and undergraduate-level topics, including calculus, geometry, linear algebra, and number theory. We use the original training split to train our PGTS policy and evaluate the framework in a 4-shot setting with in-context examples sourced from OpenCompass.
377
+
378
+ Each reasoning step is defined as a single sentence or a single line. To control computational complexity, we set the tree breadth limit to 4, the depth limit to 64, and the maximum reasoning steps for PGTS to 256, ensuring sufficient capacity for exploring complex mathematical reasoning chains.
379
+
380
+ AQUA AQUA (Ling et al., 2017) is a dataset comprising algebraic word problems and reasoning-based multiple-choice questions. Its diverse question formats and logical reasoning challenges make it an effective benchmark for assessing models' general problem-solving abilities. We adhere to the original train-test split and evaluate our framework using a 10-shot setting, with in-context examples sourced from LLM-Reasoner (Hao et al., 2024), enabling the model to address problems involving numerical reasoning and reasoning by elimination.
381
+
382
+ Each reasoning step is defined as a single sentence. To manage computational complexity, we set the tree breadth limit to 4, the depth limit to 16, and the maximum reasoning steps for PGTS to 64, ensuring adequate exploration capacity for solving the dataset's challenges.
383
+
384
+ StrategyQA StrategyQA (Geva et al., 2021) is a commonsense reasoning dataset designed to evaluate models' ability to answer binary (yes/no) questions by applying implicit multi-step reasoning strategies. The dataset features diverse and challenging questions where the intermediate reasoning steps are not explicitly provided. We randomly sample 1,000 examples for testing, with the remaining examples used to train the PGTS policy. Evaluation is conducted in a 5-shot setting, leveraging examples from OpenCompass to emphasize the model's capacity to infer and synthesize information across multiple reasoning steps.
385
+
386
+ Each reasoning step is defined as a single sentence. To balance computational efficiency and exploration, we set the tree breadth limit to 4, the depth limit to 16, and the maximum reasoning steps for PGTS to 64, ensuring sufficient capacity to handle the dataset's complexity.
387
+
388
+ PrOntoQA PrOntoQA (Saparov & He, 2022) is a benchmark designed to evaluate logical reasoning and deductive inference. It consists of structured questions that require precise logical deductions based on predefined rules and premises. We adopt the same dataset splits as used in RAP (Hao et al., 2023) and evaluate the model in a 5-shot setting to assess its ability to perform deductive reasoning while adhering to strict logical constraints. This dataset serves as a valuable tool for testing structured reasoning in a controlled environment.
389
+
390
+ Each reasoning step is defined as a single sentence. To balance computational efficiency and thorough exploration, we set the tree breadth limit to 4, the depth limit to 16, and the maximum reasoning steps for PGTS to 64, ensuring sufficient capacity to tackle the dataset's logical challenges.
391
+
392
+ Blocksworld Blocksworld (Valmeekam et al., 2022) is a benchmark for evaluating real-world planning tasks, requiring models to reason over sequences of actions to achieve specific goals in a simulated block environment. The dataset assesses the ability to plan and execute multi-step strategies efficiently. We evaluate two versions that require 4 and 8 reasoning steps, using the same dataset splits and prompt template as RAP (Hao et al., 2023). Specifically, split-v1 is used for training and split-v2 for testing, with a 4-shot setup. In the easy setup, the in-context examples include the same number of reasoning steps as the test problems.
393
+
394
+ Unlike RAP, which employs a world model to predict the state after each action, we directly generate entire action trajectories without modeling intermediate states. Each reasoning step corresponds to one action described in a single sentence. We set the breadth limit to 4 and the depth limit to match the required number of reasoning steps for each version. The maximum reasoning steps for PGTS are capped at 32.
395
+
396
+ # D. Baseline Methods
397
+
398
+ Chain-of-Thought CoT is a reasoning strategy that decomposes complex tasks into a sequence of intermediate steps, allowing models to reason step-by-step towards a final answer. To enhance the robustness of CoT, we incorporate self-consistency (SC) (Wang et al., 2022), where multiple reasoning chains are generated for the same input, and the outcomes are aggregated via majority voting. This voting scheme helps mitigate errors by leveraging diverse reasoning paths.
399
+
400
+ Monte Carlo Tree Search MCTS has been employed to improve LLM reasoning (Xie et al., 2024a; Gao et al., 2024), and our implementation closely follows RAP (Hao et al., 2023), with key modifications. Specifically, we omit the use of a world model for predicting state changes and rely solely on the likelihood of each generated reasoning step as the intermediate reward, instead of LLM-based self-evaluation. Additionally, we introduce an oracle setting for MCTS, granting access to task rewards by comparing generated answers with ground truths during the search, providing an upper-bound performance benchmark.
401
+
402
+ MCTS inherently explores multiple reasoning chains by expanding nodes during the search process. We evaluate two result aggregation strategies: selecting the final answer from the chain with the highest trajectory reward and performing weighted voting over final answers based on their respective rewards. To ensure computational efficiency, we limit the tree's breadth to 4, consistent with our PGTS approach.
403
+
404
+ # E. PGTS Approach
405
+
406
+ The PGTS policy employs a Graph Neural Network (GNN) architecture to dynamically model the reasoning tree as the search progresses. Specifically, we utilize GPS layers (Rampášek et al., 2022), which integrate local message passing with global attention mechanisms. This design effectively captures both fine-grained structural relationships and broader contextual information within the reasoning process. The policy network consists of two GPS layers for feature aggregation, followed by a linear layer applied to the current node's features to predict both actions and values. The action prediction is modeled as a categorical distribution parameterized by the policy network, while the value prediction outputs a continuous scalar.
407
+
408
+ The input to the policy network is the reasoning tree constructed up to the current step. Each node in the tree represents a
409
+
410
+ partial reasoning step, with its features initialized using the embedding of the corresponding reasoning text. Edge features encode the immediate reward $R(s,a)$ , which captures the contribution of each reasoning step to the overall trajectory.
411
+
412
+ Training the policy leverages Proximal Policy Optimization (PPO) (Schulman et al., 2017), a reinforcement learning algorithm designed to balance exploration and exploitation while maintaining stable updates. The training objective maximizes the expected cumulative reward across reasoning paths, with constraints to ensure updates remain within a stable region. Key PPO hyperparameters include:
413
+
414
+ - PPO Clip Range: 0.2
415
+ Discount Factor $(\gamma)$ : 0.99
416
+ - GAE Lambda $(\lambda)$ : 0.95
417
+
418
+ During training, we use the current policy to simulate the reasoning trajectories and collect the partial reasoning trees. These trajectories are collected and used to optimize the policy based on PPO objectives, iteratively improving the efficiency and accuracy of reasoning over time.
419
+
420
+ # F. Alternative Policy Implementations
421
+
422
+ SLM The Small Language Model (SLM) implementation substitutes the graph-based policy with a language-model-driven approach. We employ distilbert-base-uncased, a lightweight transformer model, to process the reasoning trajectory. The input to the model is the serialized reasoning chain corresponding to the current node. This serialized trajectory is passed through the model, which generates both the predicted next action and the value estimation using a linear output layer. During training, the backbone language model remains frozen, and only the output layer parameters are optimized. The optimization follows the same PPO objectives as used in PGTS.
423
+
424
+ LLM Agent The LLM Agent represents an agentic approach where the same target LLM used for reasoning is also leveraged to predict the next exploration action. At each step, the reasoning trajectory is provided as a prompt to the LLM, along with instructions to suggest the next action. Please see Fig. 4 for the prompt template to select the exploration action. This approach aligns conceptually with a collaborative multi-agent framework where the LLM functions as both a generator to communicate with user and a planner to reason about the optimal action. However, the LLM Agent lacks explicit structural modeling of the reasoning process and relies heavily on prompt engineering to guide its predictions. While this approach demonstrates reasonable performance, it is limited by the inherent inefficiencies of treating the LLM as both the reasoning environment and the policy, leading to increased computational costs and suboptimal exploration in complex scenarios.
425
+
426
+ # G. Examples
427
+
428
+ Figure 5, 6, 7, and 8 illustrate examples of the PGTS reasoning process applied to problems from GSM8K, MATH, PrOntoQA, and StrategyQA, respectively. The left side displays the reasoning tree, while the right side outlines the detailed reasoning steps.
429
+
430
+ You are an AI assistant designed to navigate through a reasoning graph to solve problems. At each node in the graph, you can take one of these actions:
431
+
432
+ 1. Expand: Dive deeper from current node to explore its subnodes
433
+ 2. Branch: Explore alternative parallel paths by investigating sibling nodes
434
+ 3. Backtrack: Return to a previous node to explore different possibilities
435
+ 4. Terminate: End the reasoning process when you've reached a satisfactory answer
436
+
437
+ # Important notes:
438
+
439
+ - Sibling nodes are generated dynamically when you choose to explore them
440
+ - Your goal is to find the most logical path to the correct answer
441
+ - Consider each step carefully before choosing an action
442
+ - Please choose only from the available actions list given below
443
+ - Choose 'Branch' when current node seem incorrect or inefficient towards a solution
444
+ - Choose 'Backtrack' to revise a previous node that may lead to incorrect or inefficient solution
445
+ - When 'Backtrack' to a previous node in the current path, specify its node id in the format 'Node Id: NODE_ID'
446
+ - Choose 'Terminate' only when you're confident in the complete solution
447
+
448
+ # QUESTION:
449
+
450
+ Here is the problem to be solved: {question}
451
+
452
+ # CURRENT REASONING PATH:
453
+
454
+ Node IDs and reasoning steps: {reasoning_path}
455
+
456
+ # AVAILABLE ACTIONS:
457
+
458
+ Due to graph constraints in depth and breadth, not all actions are available to choose at each step. The following actions are currently available:
459
+
460
+ {available_actions}
461
+
462
+ # Instructions:
463
+
464
+ 1. Analyze where you are in solving the problem
465
+ 2. Review which actions are available to you
466
+ 3. Decide your next action based on:
467
+
468
+ - Is the current path promising?
469
+ - Are there better approaches to try?
470
+ - Have you reached a complete solution?
471
+
472
+ 4. You can only choose one action from the available actions above
473
+ 5. Format your final action choice as: <answer>YOUR_CHOSEN_ACTION</answer> and optionally provide your thinking process. 'YOUR_CHOSEN_ACTION' should be one of the available actions.
474
+
475
+ Figure 4. Prompt template to select the optimal exploration action for LLM Agent based policy.
476
+
477
+ ![](images/c6ebd8a046c5003b8c7b648baa61469804269aec84cf848e348e00bc95a5c072.jpg)
478
+
479
+ ![](images/1eaf567fcbe9c10021f1173a5171149d521ac6db32a3525b2b248bd661d01f40.jpg)
480
+ Figure 5. An example of the PGTS reasoning process applied to a problem from the GSM8K dataset. At node 4, the policy decide to branch to explore an alternative reasoning path.
481
+
482
+ ![](images/d8742c4fc5a5a605617730d7869a0c3a36d72029b881e8ce33a84c3b0f211238.jpg)
483
+
484
+ ![](images/49d5cd54c6d47f7d8974889ace9038a7fd240f6e550369fc71aa48122c513229.jpg)
485
+ Figure 6. An example of the PGTS reasoning process applied to a problem from the MATH dataset. At node 3, the policy backtracks 1 step to explore an alternative reasoning path.
486
+
487
+ ![](images/01def2eba46deb5c202c52d3114ce44703dec10c5cd1e858ab6accadffc004ce.jpg)
488
+
489
+ ![](images/796e8d9252b3e1b48fabd7ab0ddb398be9e98ac78ea915cd3c6796db6b60d1eb.jpg)
490
+ Figure 7. An example of the PGTS reasoning process applied to a problem from the PrOntoQA dataset. At node 5, the policy backtracks 2 steps to explore an alternative reasoning path.
491
+
492
+ ![](images/78549ac63c048cd63cb8c3cf15bdb4690dc9e7153ef47e8d3747af91e2e5d66d.jpg)
493
+
494
+ ![](images/211852aad2c123277de185df70afd6068612b400b4e76f7839750c67dca74e05.jpg)
495
+ Figure 8. An example of the PGTS reasoning process applied to a problem from the StrategyQA dataset. Although node 4 has reached an answer, the policy chooses to explore alternative reasoning paths to refine and rectify the answer.
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84f95723dfcaa0a7b40cc6814cd9e8e3715fcc6d46400ecdea2ed2ba8cb181d9
3
+ size 594686
2025/Policy Guided Tree Search for Enhanced LLM Reasoning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/d0067b16-06b8-4233-b7f3-f5da2dea8815_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:915217704b4156fac5263df8c8049cd7b1a04a63582e17fc415af9b0b2187c30
3
+ size 548474
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28a06f8d1a33138199c8e9c91dee74a771563cf271a70633b8de088464c8eabb
3
+ size 2296375
2025/Policy Optimization for CMDPs with Bandit Feedback_ Learning Stochastic and Adversarial Constraints/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/2210b30f-948a-46c6-952a-928eb09fb6ae_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98b05b0ed8dbc49dc4debfa3435ae04cfe140af23334158611c4cca052abe7d0
3
+ size 3250445
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/full.md ADDED
@@ -0,0 +1,635 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning
2
+
3
+ Zhenghai Xue $^{1}$ Lang Feng $^{1}$ Jiacheng Xu $^{1,2}$ Kang Kang $^{2}$ Xiang Wen $^{2}$ Bo An $^{1,2}$ Shuicheng YAN $^{2,3}$
4
+
5
+ # Abstract
6
+
7
+ To learn from data collected in diverse dynamics, Imitation from Observation (IfO) methods leverage expert state trajectories based on the premise that recovering expert state distributions in other dynamics facilitates policy learning in the current one. However, Imitation Learning inherently imposes a performance upper bound of learned policies. Additionally, as the environment dynamics change, certain expert states may become inaccessible, rendering their distributions less valuable for imitation. To address this, we propose a novel framework that integrates reward maximization with IfO, employing $\mathcal{F}$ -distance regularized policy optimization. This framework enforces constraints on globally accessible states—those with nonzero visitation frequency across all considered dynamics—mitigating the challenge posed by inaccessible states. By instantiating $\mathcal{F}$ -distance in different ways, we derive two theoretical analysis and develop a practical algorithm called Accessible State Oriented Policy Regularization (ASOR). ASOR serves as a general add-on module that can be incorporated into various RL approaches, including offline RL and off-policy RL. Extensive experiments across multiple benchmarks demonstrate ASOR's effectiveness in enhancing state-of-the-art cross-domain policy transfer algorithms, significantly improving their performance.
8
+
9
+ # 1. Introduction
10
+
11
+ Imitation Learning (IL) and Reinforcement Learning (RL) (Sutton & Barto, 1998) facilitates large-scale policy optimization using datasets that are either static (Wu et al.,
12
+
13
+ $^{1}$ Nanyang Technological University, Singapore $^{2}$ Skywork AI $^{3}$ National University of Singapore. Correspondence to: Bo An <boan@ntu.edu.sg>.
14
+
15
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
16
+
17
+ 2019; Fujimoto et al., 2019) or continuously updated during training (Lillicrap et al., 2016; Haarnoja et al., 2018). When applied to non-stationary environments with evolving dynamics, obtaining effective policies necessitates extensive training datasets with sufficient dynamics coverage (Liu et al., 2022; Li et al., 2023). This challenge arises because optimal policies and state-action distributions are inherently dynamics-specific and do not generalize well. As a result, trajectory data collected under one dynamics cannot be directly utilized for policy learning in another.
18
+
19
+ To address inefficient data exploitation, IfO algorithms (Wu et al., 2019; Torabi et al., 2018b; Jiang et al., 2020) propose a dynamics-agnostic approach that enables learning from data with varying dynamics. It imitates stationary state distributions of expert policies and relies on the idea that expert state distributions are similar across different dynamics (Gangwani & Peng, 2020; Desai et al., 2020; Radosavovic et al., 2021). Building on this idea, Xue et al. (2023a) further shows that the learning policy can achieve strong cross-dynamics performance if it recovers the expert state distribution in at least one of the dynamics. Instead, we highlight a key limitation of this idea: the similarity of state distributions does not always hold, particularly in tasks where state accessibility varies with environmental dynamics. In such cases, certain expert states become inaccessible as the environment changes. For example, an autonomous vehicle may safely navigate intersections at high speed under low traffic densities, but will face a high risk of collisions in dense traffic. Consequently, states representing "safe driving at high speed" become inaccessible in certain dynamics, leading to distinct stationary state distributions. In such scenarios, expert trajectories with dynamics shift can be misleading.
20
+
21
+ To deal with the issue of distinct state accessibility, expert states that are not visited in some dynamics should be excluded during training. We define globally accessible states which maintains the same accessibility across different dynamics. By restricting imitation to these states, the policy can still leverage expert state trajectories from various dynamics while avoiding misleading information from inaccessible states. Meanwhile, IL cannot be naturally integrated with datasets containing reward signals and requires
22
+
23
+ demonstrations to be optimal. To overcome this limitation, we propose a policy regularization method that incorporates imitation as constraint while optimizing the reward maximization objective in RL. Specifically, the constraint ensures that the $\mathcal{F}$ -distance (Arora et al., 2017) between the accessible state distributions of the current and expert policies remains upper-bounded. This approach offers two key advantages: By instantiating the $\mathcal{F}$ -distance with JS divergence and network distance, we establish lower-bound performance guarantees for policy regularization under dynamics shift; By instantiating the $\mathcal{F}$ -distance with a GAN-like distance measure, we transform policy regularization into a practical reward augmentation algorithm which can be a general add-on module to existing cross-dynamics RL algorithms (Chen et al., 2021; Luo et al., 2022).
24
+
25
+ In empirical evaluations, we access the proposed algorithm across various environments, including Minigrid (Chevalier-Boisvert et al., 2023), the simulated robotics environment MuJoCo (Todorov et al., 2012), the simulated autonomous-driving environment MetaDrive (Li et al., 2023), and a large-scale fall guys-like game environment. The proposed algorithm exhibits superior performance when integrated with multiple state-of-the-art algorithms. Our contributions can be summarized as follows: 1) We identify a common limitation of existing IfO methods under dynamics shift and propose state distribution imitation restricted to globally accessible states; 2) We design an $\mathcal{F}$ -distance regularized policy optimization framework that combines expert imitation with reward maximization; 3) By instantiating the $\mathcal{F}$ -distance in different ways, we conduct theoretical analyses and introduce a practical algorithm, both validating the effectiveness of policy regularization on globally accessible states.
26
+
27
+ # 2. Background
28
+
29
+ # 2.1. Preliminaries
30
+
31
+ To model a set of decision-making tasks with different environment dynamics, we consider the Hidden Parameter Markov Decision Process (HiP-MDP) (Doshi-Velez & Konidaris, 2016) defined by a tuple $(S, \mathcal{A}, \Theta, T, r, \gamma, \rho_0)$ , where $S$ is the state space and $\mathcal{A}$ is the bounded action space with actions $a \in [-1, 1]$ . $\Theta$ is the space of hidden parameters. $T_{\theta}(s'|s, a)$ is the transition function conditioned on $(s, a)$ , as well as a hidden parameter $\theta$ sampled from $\Theta$ . $r(s, a, s')$ is the environment reward function. By taking all $s, a, s'$ into account, the reward function inherently includes the transition information and does not change in different dynamics. We also assume $r(s, a, s')$ w.r.t. the action $a$ is $\lambda$ -Lipschitz. Discussions on these Lipschitz properties can be found in Appendix A.3. $s'$ is termed as accessible from
32
+
33
+ $s$ under dynamics $T^1$ if $\sum_{a\in \mathcal{A}}T(s'|s,a) > 0.\gamma \in (0,1)$ is the discount factor and $\rho_0(s)$ is the initial state distribution.
34
+
35
+ Policy optimization under dynamics shift aims at finding the optimal policy that maximizes the expected return under all possible $\theta \in \Theta$ : $\pi^{*} = \arg \max_{\pi}\eta (\pi) = \mathbb{E}_{\theta}\mathbb{E}_{\pi ,T_{\theta}}[\sum_{t = 0}^{\infty}\gamma^{t}r(s_{t},a_{t},s_{t + 1})]$ , where the expectation is under $s_0\sim \rho_0$ , $a_{t}\sim \pi (\cdot |s_{t})$ , and $s_{t + 1}\sim T_{\theta}(\cdot |s_t,a_t)$ . The Q-value $Q_T^\pi (s,a)$ denotes the expected return after taking action $a$ at state $s$ : $Q_T^\pi (s,a) = E_{\pi ,T}[\sum_{t = 0}^{\infty}\gamma^{t}r(s_{t},a_{t},s_{t + 1})|s_{0} = s,a_{0} = a]$ . The value function is defined as $V_{T}^{\pi}(s) = \mathbb{E}_{a\sim \pi (\cdot |s)}Q_{T}^{\pi}(s,a)$ . The optimal policy $\pi^{*}$ under $T$ is defined as $\pi_T^* = \arg \max_{\pi}\mathbb{E}_{s\sim \rho_0}V_T^\pi (s)$ . We also intensely use the stationary state distribution (also referred to as the state occupation function) $d_T^\pi (s) = (1 - \gamma)\sum_{t = 0}^{\infty}\gamma^t p(s_t = s\mid \pi ,T)$ . The stationary state distribution under the optimal policy is denoted as $d_T^* (s)$ , which is the shorthand for $d_T^*\left(s\right)$ . $d_T^* (s)$ will be briefly termed as optimal state distribution in the rest of this paper.
36
+
37
+ # 2.2. Related Work
38
+
39
+ Cross-domain Policy Transfer Cross-domain policy transfer (Niu et al., 2024) focuses on training policies in source domains and testing them in the target domain. In this paper, we focus on a related problem of efficient training in multiple source domains. The resulting algorithm can be combined with any of the following cross-domain policy transfer algorithms to improve the test-time performance. In online RL, VariBAD (Zintgraf et al., 2020) trains a context encoder with variational inference and trajectory likelihood maximization. CaDM (Lee et al., 2020) and ESCP (Luo et al., 2022) construct auxiliary tasks including next state prediction and contrastive learning to train the encoders. Instead of relying on context encoders, DARC (Eysenbach et al., 2021) makes domain adaptation by assigning higher rewards on samples that are more likely to happen in the target environment. Encoder-based (Chen et al., 2021) and reward-based (Liu et al., 2022) policy transfer algorithms are also effective in offline policy adaptation and have been extended to offline-to-online tasks (Niu et al., 2022; 2023). VGDF (Xu et al., 2023) use ensembled value estimations to perform prioritized Q-value updates, which can be applied in both online and offline settings. SRPO (Xue et al., 2023a) focus on a similar setting of efficient data usage with this paper, but is based on a strong assumption of universal identical state accessibility. We demonstrate that such an assumption will not hold in many tasks and a more delicate characterization of state accessibility will lead to better theoretical and empirical results.
40
+
41
+ Imitation Learning from Observations Imitation Learning from Observation (IfO) approaches obviate the need of imitating expert actions and is suitable for tasks where action demonstrations may be unavailable. BCO (Wu et al., 2019) and GAIfO (Torabi et al., 2018b) are two natural modifications of traditional Imitation Learning (IL) methods (Ho & Ermon, 2016) with the idea of IfO. IfO has also been found promising when the demonstrations are collected from several environments with different dynamics. Usually an inverse dynamics model is first trained with samples from the target environment by supervised learning (Wu et al., 2019; Radosavovic et al., 2021), variational inference (Liu et al., 2020), or distribution matching (Desai et al., 2020). It is then used to recover the adapted actions in samples from the source environment. The recovered samples can be used to update policies with action discrepancy loss (Gangwani & Peng, 2020; Radosavovic et al., 2021; Liu et al., 2020). To our best knowledge, only HIDIL (Jiang et al., 2020) considered state distribution mismatch across different dynamics, where policies are allowed to take extra steps to reach the next state specified in the expert demonstration. We consider in this paper a more general setting where states in expert demonstrations may even be inaccessible.
42
+
43
+ # 3. Accessible States Oriented Policy Learning
44
+
45
+ In this section, we first provide a motivating example in Sec. 3.1, where expert state trajectories can mislead the learning policy in cross-dynamics training due to different state accessibility. Based on the globally accessible states defined in Sec. 3.2, we then propose a general approach of $\mathcal{F}$ -distance regularized policy optimization. In Sec. 3.3 and Sec. 3.4, we propose two instantiations of the $\mathcal{F}$ -distance and respectively provide infinite-sample and finite-sample performance analyses for the policy regularization method. In Sec. 3.5, we propose a GAN-like instantiation of the $\mathcal{F}$ -distance, giving rise to the practical algorithm.
46
+
47
+ # 3.1. Motivating Example
48
+
49
+ Previous IfO approaches imitate expert policies through state distribution matching (Torabi et al., 2018a; Desai et al., 2020; Jiang et al., 2020) for cross-dynamics policy training. Fig. 1 demonstrates a lava world task with dynamics shift where expert state distributions are no longer reliable. Considering a three-dimensional state space including agent row, agent column, and a 0-1 variable indicating whether there is an accessible lava block within one step reach of the agent. The agent starts from the blue grid and targets at the green grid with positive reward. It also receives a small negative reward on each step. The red grid stands for the dangerous lava area which ends the trajectory on agent entering. One lava block is fixed at Row 1, while the other may appear at Row 2, 3, 4, and 5. Fig. 1 demonstrates two examples where
50
+
51
+ ![](images/78c15c8d54bee5549db0a5afe93d6075bb0431f538abb2b7e3bc94efade7927b.jpg)
52
+ Figure 1. Lava world example with dynamics shift.
53
+
54
+ the movable lava block is at Row 2 and Row 4. Taking state (1,3,0) as an example, the same action of "moving down" gives rise to different next state distributions due to distinct lava positions, leading to environment dynamics shift.
55
+
56
+ The state trajectories of the optimal policies on two example lava environments are plotted with black lines. The optimal state distributions are different under distinct environment dynamics. For example, state (3,3,0) has non-zero probability under $d^{*}(s)$ in Fig. 1 (above), but cannot be visited by the optimal policy in Fig. 1 (bottom). Existing state-only policy transfer algorithms will therefore not be suitable for such seemingly simple task, as demonstrated by the empirical results in Appendix C.2. The main cause of this distribution difference is the break of accessibility. State (4,2) is accessible from (3,2) in Fig. 1 (lower), but is inaccessible in Fig. 1 (upper). The inaccessible states will certainly have zero visitation probability and make the optimal state distribution different. Such break of accessibility can also happen in various real-world tasks, as discussed in Appendix B.
57
+
58
+ # 3.2. $\mathcal{F}$ -distance Regularized Policy Optimization with Accessible State Distribution
59
+
60
+ Motivated by examples in Sec. 3.1, we propose to ignore inaccessible states and focus on states that are accessible under all possible dynamics. We term the latter as globally accessible states with the following formal definition.
61
+
62
+ Definition 3.1 (Globally Accessible States). In an HiP-MDP $(S, \mathcal{A}, \Theta, T, r, \gamma, \rho_0)$ , a state $s \in S$ is called an globally accessible state if for all $\theta \in \Theta$ , there exist a policy $\pi$ , such that $d_{T_\theta}^\pi(s) > 0$ . $S^+ \subseteq S$ is denoted as the set of globally accessible states. The accessible state distribution of policy $\pi$ under dynamics $T$ is defined as $d_T^{\pi, +}(s) = (1 - \gamma) \sum_{t=0}^{\infty} \gamma^t p(s_t = s, s_t \in S^+ | \pi, T) / Z(\pi)$ , where $Z(\pi) = \sum_{t=0}^{\infty} \gamma^t p(s_t \in S^+ | \pi, T)$ is the normalizing term.
63
+
64
+ In the lava world example in Fig. 1, the intersection of
65
+
66
+ optimal state trajectories and globally accessible states is marked with yellow stars. These states are more likely to be visited by the expert policies across both dynamics, effectively filtering out misleading states that are optimal in one dynamics and suboptimal in others. Consequently, expert state distributions can be safely imitated on globally accessible states under dynamics shifts.
67
+
68
+ Meanwhile, IL relies on access to expert trajectories, limiting its applicability in broader scenarios. In a more general RL setting, where the dataset consists of trajectories with mixed policy performance and reward labels, policy optimization to maximize environment reward is often more preferable. To simultaneously leverage the expert state distribution, we propose to regularize the training policy to generate a stationary state distribution that closely aligns with the expert accessible state distribution $d_{T}^{*,+}(s)$ . The regularization is exerted with an upper-bound constraint on the $\mathcal{F}$ -distance.
69
+
70
+ Definition 3.2 ( $\mathcal{F}$ -distance, Definition 2 in (Arora et al., 2017)). Let $\mathcal{F}$ be a class of functions from $\mathbb{R}^d$ to $[0,1]$ such that if $f\in \mathcal{F},1 - f\in \mathcal{F}$ . Let $\phi$ be a concave measuring function. Then the $\mathcal{F}$ -divergence with respect to $\phi$ between two distributions $\mu$ and $\nu$ is defined as
71
+
72
+ $$
73
+ d _ {\mathcal {F}, \phi} (\mu , \nu) = \sup _ {\omega \in \mathcal {F}} \mathbb {E} _ {x \sim \mu} [ \phi (\omega (x)) ] + \mathbb {E} _ {x \sim \nu} [ \phi (1 - \omega (x)) ] - C (\phi),
74
+ $$
75
+
76
+ where $C(\phi)$ is irrelevant to $\mathcal{F},\mu$ , and $\nu$
77
+
78
+ The resulting regularized policy optimization problem is formulated as follows:
79
+
80
+ $$
81
+ \max _ {\pi} \mathbb {E} _ {\theta , \tau_ {\pi}} \sum_ {t = 0} ^ {\infty} \gamma^ {t} r \left(s _ {t}, a _ {t}, s _ {t + 1}\right) \tag {1}
82
+ $$
83
+
84
+ $$
85
+ \mathrm {s . t .} \max _ {T} d _ {\mathcal {F}, \phi} \left(d _ {T} ^ {\pi} (\cdot), d _ {T _ {0}} ^ {*, +} (\cdot)\right) < \varepsilon ,
86
+ $$
87
+
88
+ where $T_0$ is an arbitrary environment dynamics. In the following, we will demonstrate the effectiveness of this policy regularization framework both theoretically and empirically.
89
+
90
+ # 3.3. Infinite Sample Analysis with JS Divergence Instantiation
91
+
92
+ In Sec. 3.3 and Sec. 3.4, we conduct theoretical analysis on how the policy regularization method in Eq. (1) influences policy performance under dynamics shift. We start with the definition of $M - R_{s}$ accessible MDPs, which formally characterizes the required accessibility property of MDPs so that expert state distributions can be imitated in a dynamics-agnostic approach.
93
+
94
+ Definition 3.3. Consider MDPs $\mathcal{M}_1 = (\mathcal{S},\mathcal{A},T_1,r,\gamma ,\rho_0)$ and $\mathcal{M}_2 = (S,A,T_2,r,\gamma ,\rho_0)$ . If for all transitions $(s,a,s^{\prime})$ with $T_{1}(s^{\prime}|a,s) > 0$ , there exists states $s_0,s_1,\dots ,s_N$ and actions $a_0,a_1,\dots ,a_{N - 1}$ such that
95
+
96
+ $N\leqslant M,s_0 = s,s_N = s',\prod_{n = 1}^{N}T_2(s_n|s_{n - 1},a_{n - 1}) > 0,$ and
97
+
98
+ $$
99
+ \left| \sum_ {n = 1} ^ {N - 1} \gamma^ {n - 1} r \left(s _ {n}, a _ {n}, s _ {n + 1}\right) + \left(1 - \gamma^ {N - 1}\right) V _ {T _ {1}} ^ {*} (s _ {0}) \right| \leqslant R _ {s},
100
+ $$
101
+
102
+ $\mathcal{M}_2$ is referred to as $M - R_{s}$ accessible from $\mathcal{M}_1$
103
+
104
+ In this definition, $M$ is the number of extra steps required in $\mathcal{M}_2$ to reach the state $s'$ from $s$ , compared with in $\mathcal{M}_1$ . $R_s$ constrains the reward discrepancy in these extra steps. One special case is when $\mathcal{M}_2$ and $\mathcal{M}_1$ are 1-0 accessible from each other, all states between $(s, s')$ will have the same state accessibility. It is identical to the property of "homomorphous MDPs" (Xue et al., 2023a), based on which a theorem about identical optimal state distribution can be proved. Most of the previous approaches in IfO is built upon such assumption of 1-0-accessible MDPs, which is an oversimplification in many tasks. For example, the Minigrid environment in Sec. 3.1 contains 3-0.03 accessible MDPs. Instead, our derivations are based on the milder assumption on $M - R_s$ accessible MDPs that fits for a broader range of practical scenarios.
105
+
106
+ We first consider the case where policy regularization is performed with infinite samples, so that the constraint on $\mathcal{F}$ -distance is followed during both training and validation. We utilize JS divergence with the following instantiation of the $\mathcal{F}$ -distance.
107
+
108
+ Proposition 3.4. When $\phi(t) = \log(t)$ and $\mathcal{F} = \{\text{all functions from } \mathbb{R}^d \text{ to } [0,1]\}$ , $d_{\mathcal{F},\phi}$ is the JS divergence.
109
+
110
+ We show that the learning policy $\hat{\pi}$ will have a performance lower-bound given a bounded JS-divergence with the optimal accessible state distribution.
111
+
112
+ Theorem 3.5. Consider the HiP-MDP $(\mathcal{S},\mathcal{A},\Theta ,T,r,\gamma ,\rho_0)$ with its MDPs $M - R_{s}$ accessible from each other. For all policy $\hat{\pi}$ , if there exists one certain dynamics $T_{0}$ such that $\max_{\theta \in \Theta}D_{\mathrm{JS}}(d_{T_{\theta}}^{\hat{\pi}}(\cdot)\| d_{T_{0}}^{*, + }(\cdot))\leqslant \varepsilon$ we have
113
+
114
+ $$
115
+ \eta (\hat {\pi}) \geqslant \max _ {\theta} \eta \left(\pi_ {T _ {\theta}} ^ {*}\right) - \frac {2 R _ {s} + 6 \lambda + 2 R _ {\operatorname* {m a x}} \varepsilon}{1 - \gamma}. \tag {2}
116
+ $$
117
+
118
+ Previous approaches (Xu et al., 2023; Janner et al., 2019; Xue et al., 2023b) also provide policy performance lower bounds, but these bounds have quadratic dependencies on the effective planning horizon $\frac{1}{1 - \gamma}$ . By accessible state-based policy regularization, we obtain a tighter discrepancy bound with linear dependency on the effective horizon.
119
+
120
+ # 3.4. Finite Sample Analysis with Network Distance Instantiation
121
+
122
+ In this subsection, we derive a performance lower-bound of $\hat{\pi}$ if it is regularized with finite samples from the optimal accessible state distribution. Due to the limited generalization
123
+
124
+ ability of JS distance (Xu et al., 2020), we characterize the regularization error in Eq. (1) with the network distance.
125
+
126
+ Proposition 3.6 (Neural network distance (Arora et al., 2017)). When $\phi(t) = t$ and $\mathcal{F}$ is the set of neural networks, $\mathcal{F}$ -distance is the network distance: $d_{\mathcal{F}}(\mu, \nu) = \sup_{F \in \mathcal{F}} \{\mathbb{E}_{s \sim \mu}[F(s)] - \mathbb{E}_{s \sim \nu}[F(s)]\}$ .
127
+
128
+ Given $m$ samples and the network distance bounded by $\varepsilon_{\mathcal{F}}$ , we analyze the generalization ability of the policy regularization in Eq. (1) with the following theorem.
129
+
130
+ Theorem 3.7. Consider the HiP-MDP $(S, \mathcal{A}, \Theta, T, r, \gamma, \rho_0)$ with its MDPs $M - R_s$ accessible from each other. Given $\{s^{(i)}\}_{i=1}^m$ sampled from $d_{T_0}^{+,*}$ , for policy $\hat{\pi}$ regularized by $\hat{d}_{T_0}^{+,*}$ with the constraint $\max_{\theta \in \Theta} d_{\mathcal{F}}(\hat{d}_{T_\theta}^\hat{\pi}, \hat{d}_{T_0}^{+,*}) < \varepsilon_{\mathcal{F}}$ , we have
131
+
132
+ $$
133
+ \eta (\hat {\pi}) \geqslant \max _ {\theta} \eta \left(\pi_ {T _ {\theta}} ^ {*}\right) - \frac {2 R _ {s} + 8 \lambda}{1 - \gamma} - \mathcal {O} \left(\frac {1 / \sqrt {m} + \varepsilon_ {\mathcal {F}}}{1 - \gamma}\right) \tag {3}
134
+ $$
135
+
136
+ with probability at least $1 - \delta$ , where $\hat{d}_T^{\hat{\pi}}$ and $\hat{d}_{T_0}^{+,*}$ are the empirical version of distributions $d_{T}^{\hat{\pi}}$ and $d_{T_0}^{+,*}$ on $\{s^{(i)}\}_{i = 1}^{m}$ .
137
+
138
+ Thm. 3.7 shows that with finite samples, the policy regularization still leads to a tight performance lower-bound with linear horizon dependency. The lower-bound is stronger than the sample complexity analysis of Behavior Cloning with quadratic horizon dependency (Xu et al., 2020) and has the same horizon dependency with GAIL (Ho & Ermon, 2016).
139
+
140
+ # 3.5. Practical Algorithm with GAN-like Objective Function
141
+
142
+ In this subsection, we design practical algorithms to solve the policy regularization problem in Eq. (1). The first challenge is to estimate the value of a certain instantiation of the $\mathcal{F}$ -distance. With the following proposition, we manage to do so with a GAN-like optimization process.
143
+
144
+ Proposition 3.8. When $\mathcal{F}$ is a set of neural networks and $\phi(t) = \log t$ , the $\mathcal{F}$ -distance $d_{\mathcal{F},\phi}(\mu, \nu)$ is equivalent to the discriminator's objective function in a GAN (Goodfellow et al., 2014), where $\mu$ is the real data distribution $\hat{\mathcal{D}}_{real}$ and $\nu$ is the generated data distribution $\hat{\mathcal{D}}_G$ .
145
+
146
+ According to the proposition, $d_{\mathcal{F},\phi}\left(d_T^\pi (\cdot),d_{T_0}^{*, + }(\cdot)\right)$ in Eq. (1) can be obtained by training a GAN discriminator to classify two datasets, one sampled from $d_{T}^{\pi}(\cdot)$ and the other sampled from $d_{T_0}^{*, + }(\cdot)$ . While $d_{T}^{\pi}(\cdot)$ can be related to data newly collected in the replay buffer (Liu et al., 2021; Sinha et al., 2022), sampling from $d_{T_0}^{*, + }(\cdot)$ is still challenging. We introduce the binary observation state $\mathcal{O}_t$ with $\mathcal{O}_t = 1$ denoting $s_t$ is the optimal state at timestep $t$ (Levine, 2018).
147
+
148
+ Algorithm 1 The workflow of ASOR on top of ESCP (Luo et al., 2022).
149
+
150
+ 1: Input: Training MDPs $\{\mathcal{M}_0,\dots ,\mathcal{M}_{n - 1}\}$ ; Context encoder $\phi$ ; Policy network $\pi$ ; Value network $V$ ; Discriminator Network $\omega$ ; Rollout horizon $H$ ; State partition ratio $\rho_{1},\rho_{2}$ ; Regularization coefficient $\lambda$ ; Replay Buffer $\mathcal{R}$ .
151
+ 2: for step $= 0,1,2,\ldots$ do
152
+ 3: Sample MDP $\mathcal{M}_i$ from $\{\mathcal{M}_0,\mathcal{M}_1,\dots ,\mathcal{M}_{n - 1}\}$
153
+ 4: for $t = 1,2,\ldots ,H$ do
154
+ 5: Sample $z_{t}$ from $\phi(z \mid s_{t}, a_{t-1}, z_{t-1})$ and then sample $a_{t}$ from $\pi(a \mid s_{t}, z_{t})$ , as in ESCP.
155
+ 6: Rollout and get transition data $(s_{t + 1},r_t,d_{t + 1},s_t,a_t,z_t)$ from $\mathcal{M}_i$ ; Add the data to the replay buffer $\mathcal{R}$ .
156
+ 7: Sample a batch $D_{\mathrm{batch}}$ ; Add $\rho_1\rho_2|D_{\mathrm{batch}}|$ states with top $\rho_1$ portion of high values and $\rho_2$ portion of high proxy visitation counts to $D_P$ ; Add other states to $D_Q$ .
157
+ 8: Train $\omega$ as a GAN discriminator, regarding $D_P$ as the real dataset and $D_Q$ as the generated dataset.
158
+ 9: For one-step transition in $D_{\mathrm{batch}}$ , update $r_t$ with $r_t + \lambda \log \omega(s_t)$ .
159
+ 10: Use the updated $D_{\mathrm{batch}}$ to update $\phi, \pi,$ and $V$ .
160
+
161
+ $d_{T_0}^{*,+}(s_t)$ can therefore be written as $d_{T_0}^{\pi, + }(s|\mathcal{O}_{0:\infty})$ , which is the distribution of the states generated by a certain $\pi$ , given these states are optimal. With the Bayes' rule, we have
162
+
163
+ $$
164
+ \begin{array}{l} \frac {d _ {T _ {0}} ^ {*, +} (s)}{d _ {T} ^ {\pi} (s)} = \frac {d _ {T _ {0}} ^ {\pi , +} (s | \mathcal {O} _ {0 : \infty})}{d _ {T} ^ {\pi} (s)} \\ = \frac {p \left(\mathcal {O} _ {0 : \infty} | s , \pi , T _ {0}\right) d _ {T _ {0}} ^ {\pi , +} (s)}{p \left(\mathcal {O} _ {0 : \infty} | \pi , T _ {0}\right)} \cdot \frac {1}{d _ {T} ^ {\pi} (s)} \\ = \frac {p \left(\mathcal {O} _ {0 : \infty} | s , \pi , T _ {0}\right) d _ {T} ^ {\pi} (s)}{p \left(\mathcal {O} _ {0 : \infty} | \pi , T _ {0}\right)} \cdot \frac {1}{d _ {T} ^ {\pi} (s)} \cdot \frac {d _ {T _ {0}} ^ {\pi , +} (s)}{d _ {T} ^ {\pi} (s)} \\ = \frac {d _ {T _ {0}} ^ {*} (s)}{d _ {T} ^ {\pi} (s)} \cdot \frac {d _ {T _ {0}} ^ {\pi , +} (s)}{d _ {T} ^ {\pi} (s)}, \tag {4} \\ \end{array}
165
+ $$
166
+
167
+ where the last equation is also obtained with the Bayes' rule. According to Xue et al. (2023a), state $s$ will be more likely to be sampled from $d_{T_0}^*(\cdot)$ than from $d_T^\pi(\cdot)$ if it has a higher state value $V(s)$ than average. Meanwhile, $d_{T_0}^{\pi, +}(s)$ will be higher if $s$ falls in the set of globally accessible states $S^+$ and is most likely to be visited by various policies under dynamics shift. Therefore, any of the pseudo-count approaches of visitation frequency can be used to measure whether $s$ is more likely to be sampled from $d_{T_0}^{\pi, +}(s)$ . In simulated environments with small observation spaces (Sec. 4.1 and 4.2), disagreement in next state predictions of ensembled environment models has shown to be a good proxy of visitation frequency (Yu et al., 2020). In large-scale real-world
168
+
169
+ tasks (Sec. 4.3), next state predictions can be unreliable, so we adopt Random Network Distillation (RND) (Burda et al., 2019) and use the error of predicting a random mapping as the proxy visitation measure.
170
+
171
+ With the trained discriminator $\omega^{*}(x)$ in the $\mathcal{F}$ -distance, Eq. (1) can be transformed into an unconstrained optimization problem with the following Lagrangian to maximize:
172
+
173
+ $$
174
+ \mathbb {E} _ {\theta , \pi , T _ {\theta}} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} \left(r \left(s _ {t}, a _ {t}, s _ {t + 1}\right) + \lambda \log \omega^ {*} \left(s _ {t}\right)\right) \right] + \frac {\lambda \varepsilon}{1 - \gamma}, \tag {5}
175
+ $$
176
+
177
+ where $\lambda > 0$ is the Lagrangian Multiplier. The only difference between Eq. (5) and the standard RL objective is that $\log \omega^{*}(s_{t})$ is augmented to the environment reward $r(s_{t}, a_{t}, s_{t+1})$ . Therefore, the proposed approach can work as an add-on module to a wide range of RL algorithms with reward augmentation.
178
+
179
+ Summarizing previous derivations, we obtain a practical reward augmentation algorithm termed as ASOR (Accessible State Oriented Regularization) for policy optimization under dynamics shift. We select the ESP (Luo et al., 2022) algorithm, which is one of the SOTA algorithms in online cross-dynamics policy training, as the example base algorithm. The detailed procedure of $\mathrm{ESCP + ASOR}$ is shown in Alg. 1. After the environment rollout and obtaining the replay buffer (line 6), we sample a batch of data from the buffer, obtain a portion of $\rho_{1}\rho_{2}$ states with higher values and proxy visitation counts, and add them to the dataset $\mathcal{D}_P$ . Other states are added to $\mathcal{D}_Q$ . Then a discriminator network $\omega$ is trained (line 8) to estimate the logarithm of the optimal discriminator output $\lambda \log \omega^{*}(s)$ , which is added to the reward $r_t$ (line 9). The effects of hyperparameters $\rho_{1},\rho_{2}$ , and $\lambda$ are investigated in Sec. 4.1. The procedure of the offline algorithm MAPLE (Lee et al., 2020)+ASOR is similar to $\mathrm{ESCP + ASOR}$ , where the datasets are built with data from the offline dataset rather than the replay buffer.
180
+
181
+ # 4. Experiments
182
+
183
+ In this section, we conduct experiments to investigate the following questions: (1) Can ASOR efficiently learn from data with dynamics shift and outperform current state-of-the-art algorithms? (2) Is ASOR general enough when applied to different styles of training environments, various sources of environment dynamics shift, and when combined with distinct algorithm setup? (3) How does each component of ASOR (e.g., the reward augmentation and the pseudocount of state visitations) and its hyperparameters perform in practice? To answer questions (1)(2), we construct cross-dynamics training environments based on tasks including Minigrid (Chevalier-Boisvert et al., 2023) $^4$ , D4RL (Fu et al.,
184
+
185
+ 2020), MuJoCo (Todorov et al., 2012), and a Fall Guys-like Battle Royal Game. Dynamics shift in these environments comes from changes in navigation maps, evolvements of environment parameters, and different layouts of obstacles. To train RL policies in these environments, ASOR is implemented on top of algorithms including PPO (Schulman et al., 2017), MAPLE (Chen et al., 2021), and ESCP (Luo et al., 2022), which are all state-of-the-art approaches in the corresponding field. To answer question (3), we visualize how the learned discriminator and the pseudo state count behave in different environments. Moreover, ablation studies are conducted to examine the role of the discriminator and the influence of hyperparameters. Detailed descriptions of baseline algorithms are in Appendix C.1.
186
+
187
+ # 4.1. Results in Offline RL Benchmarks
188
+
189
+ For offline RL benchmarks, we collect the static dataset from environments with three different environment dynamics in the format of D4RL (Fu et al., 2020). Specifically, data from the original MuJoCo environments, environments with 3 times larger body mass, and environments with 10 times higher medium density are included. For baseline algorithms, we include IfO algorithms BCO (Torabi et al., 2018a) and SOIL (Radosavovic et al., 2021), standard offline RL algorithms CQL (Kumar et al., 2020) and MOPO (Yu et al., 2020), offline cross-domain policy transfer algorithms MAPLE (Chen et al., 2021), MAPLE+DARA (Liu et al., 2022), and MAPLE+SRPO (Xue et al., 2023a).
190
+
191
+ The comparative results are exhibited in Tab. 1. IfO approaches have the worst performance because they ignore the reward information (BCO) or cannot safely exploit the offline dataset (SOIL). Without the ability of cross-domain policy learning, CQL and MOPO cannot learn from data with dynamics shift and show inferior performances. Cross-domain policy transfer algorithms MAPLE, MAPLE+DARA, and MAPLE+SRPO show reasonable performance enhancement, while our MAPLE+ASOR algorithm leads to the highest performance. This highlights the effectiveness of policy regularization on accessible states. We discuss the conceptual advantages of ASOR compared with DARA and SRPO in Appendix A.4.
192
+
193
+ The results of ablation studies are shown in Tab. 2. They show that a larger value of reward augmentation coefficient $\lambda$ can give rise to performance increase. Meanwhile, using fixed values of $\lambda$ , $\rho_{1}$ and $\rho_{2}$ will not lead to a large drop of performance scores, so ASOR is robust to hyperparameter changes. ASOR's will have degraded performance if training datasets $D_{P}$ and $D_{Q}$ are improperly constructed, e.g., with random data partition, or without considering state values and visitation counts, i.e., with fixed $\rho_{1} = 0$ or fixed $\rho_{2} = 0$ .
194
+
195
+ Table 1. Results of offline experiments on MuJoCo tasks. Numbers before $\pm$ are scores normalized according to D4RL (Fu et al., 2020) and averaged across trials with four different seeds. Numbers after $\pm$ are normalized standard deviations. ME, M, MR and R correspond to the medium-expert, expert, medium-replay and random dataset, respectively.
196
+
197
+ <table><tr><td></td><td>BCO</td><td>SOIL</td><td>CQL</td><td>MOPO</td><td>MAPLE</td><td>MAPLE +DARA</td><td>MAPLE +SRPO</td><td>MAPLE +ASOR</td></tr><tr><td>Walker2d-ME</td><td>0.25±0.04</td><td>0.14±0.08</td><td>0.63±0.13</td><td>0.06±0.05</td><td>0.14±0.08</td><td>0.31±0.02</td><td>0.22±0.07</td><td>0.29±0.12</td></tr><tr><td>Walker2d-M</td><td>0.17±0.07</td><td>0.16±0.01</td><td>0.75±0.02</td><td>0.15±0.22</td><td>0.41±0.19</td><td>0.46±0.10</td><td>0.32±0.17</td><td>0.49±0.04</td></tr><tr><td>Walker2d-MR</td><td>0.01±0.00</td><td>0.04±0.01</td><td>0.06±0.00</td><td>-0.00±0.00</td><td>0.13±0.01</td><td>0.12±0.00</td><td>0.13±0.01</td><td>0.14±0.01</td></tr><tr><td>Walker2d-R</td><td>0.00±0.00</td><td>0.00±0.00</td><td>0.00±0.00</td><td>-0.00±0.00</td><td>0.22±0.00</td><td>0.16±0.01</td><td>0.22±0.00</td><td>0.22±0.00</td></tr><tr><td>Hopper-ME</td><td>0.08±0.02</td><td>0.01±0.00</td><td>0.20±0.07</td><td>0.01±0.00</td><td>0.45±0.07</td><td>0.49±0.01</td><td>0.43±0.06</td><td>0.51±0.06</td></tr><tr><td>Hopper-M</td><td>0.00±0.00</td><td>0.08±0.00</td><td>0.29±0.06</td><td>0.01±0.00</td><td>0.38±0.09</td><td>0.26±0.02</td><td>0.48±0.04</td><td>0.71±0.14</td></tr><tr><td>Hopper-MR</td><td>0.00±0.00</td><td>0.00±0.00</td><td>0.08±0.00</td><td>0.01±0.01</td><td>0.55±0.17</td><td>0.75±0.10</td><td>0.73±0.16</td><td>0.76±0.08</td></tr><tr><td>Hopper-R</td><td>0.00±0.00</td><td>0.00±0.00</td><td>0.10±0.00</td><td>0.01±0.00</td><td>0.12±0.00</td><td>0.12±0.00</td><td>0.25±0.08</td><td>0.32±0.00</td></tr><tr><td>HalfCheetah-ME</td><td>0.43±0.00</td><td>0.00±0.00</td><td>0.03±0.04</td><td>-0.03±0.00</td><td>0.53±0.07</td><td>0.39±0.00</td><td>0.58±0.04</td><td>0.61±0.02</td></tr><tr><td>HalfCheetah-M</td><td>0.14±0.02</td><td>0.39±0.00</td><td>0.42±0.01</td><td>0.36±0.27</td><td>0.61±0.01</td><td>0.66±0.03</td><td>0.62±0.00</td><td>0.62±0.01</td></tr><tr><td>HalfCheetah-MR</td><td>0.16±0.01</td><td>0.25±0.00</td><td>0.46±0.00</td><td>-0.03±0.00</td><td>0.52±0.01</td><td>0.53±0.02</td><td>0.54±0.00</td><td>0.56±0.01</td></tr><tr><td>HalfCheetah-R</td><td>0.14±0.01</td><td>0.35±0.01</td><td>-0.01±0.01</td><td>-0.03±0.00</td><td>0.20±0.02</td><td>0.19±0.01</td><td>0.22±0.00</td><td>0.21±0.00</td></tr><tr><td>Average</td><td>0.11</td><td>0.11</td><td>0.25</td><td>0.04</td><td>0.36</td><td>0.37</td><td>0.40</td><td>0.45</td></tr></table>
198
+
199
+ Table 2. Results of ablation studies in Offline MuJoCo tasks. The scores are averaged on each environment with different expert levels.
200
+
201
+ <table><tr><td></td><td>Fixed λ = 0.1</td><td>Fixed λ = 0.3</td><td>Random partition</td><td>Fixed ρ1 = 0</td><td>Fixed ρ2 = 0</td><td>Fixed ρ1,ρ2 = 0.5</td><td>Fixed ρ1,ρ2 = 0.3</td><td>MAPLE +ASOR</td></tr><tr><td>Walker2d</td><td>0.22</td><td>0.25</td><td>0.26</td><td>0.22</td><td>0.29</td><td>0.30</td><td>0.26</td><td>0.28</td></tr><tr><td>Hopper</td><td>0.31</td><td>0.54</td><td>0.30</td><td>0.47</td><td>0.38</td><td>0.46</td><td>0.54</td><td>0.58</td></tr><tr><td>HalfCheetah</td><td>0.48</td><td>0.49</td><td>0.47</td><td>0.49</td><td>0.50</td><td>0.49</td><td>0.50</td><td>0.50</td></tr><tr><td>Average</td><td>0.34</td><td>0.43</td><td>0.34</td><td>0.40</td><td>0.39</td><td>0.42</td><td>0.43</td><td>0.45</td></tr></table>
202
+
203
+ # 4.2. Results in Online Continuous Control Tasks
204
+
205
+ In online continuous control tasks, we explore other dimensions of dynamics shift, namely environment non-stationary and the continuous change of environment parameters. Such tasks are far more complicated than offline tasks with 3 different dynamics, but are within the capability of current approaches thanks to the existence of online interactive training environments. We consider the HalfCheetah, Walker2d, and Ant environments in the MuJoCo simulator (Todorov et al., 2012) and the autonomous driving environment in the MetaDrive simulator (Li et al., 2023). Sources of dynamics change include wind, joint damping, and traffic densities. For baselines we include the IfO algorithm GARAT (Desai et al., 2020), standard online RL algorithm SAC (Haarnoja et al., 2018), online cross-domain policy transfer algorithm OSI (Yu et al., 2017), ESCP (Luo et al., 2022), CaDM (Lee et al., 2020), and SRPO (Xue et al., 2023a).
206
+
207
+ Comparative results in online continuous control tasks are shown in Fig. 2, where our ESCP+ASOR algorithm has the best performance in all environments. Specifically, it only makes marginal improvements in the HalfCheetah environment, in contrast to large enhancement in other environments. This is because the agent will not "fall over" in the HalfCheetah environment, and the state accessibility will not change a lot under dynamics shift, undermining
208
+
209
+ the effect of the accessible state-based policy regularization. We also compare in Fig. 3 (left) the augmented reward with the environment reward on different states in Walker-2d. On states where the agent is about to fall over, the augmented reward drops significantly while the environment reward does not change much, demonstrating the effectiveness of the reward augmentation.
210
+
211
+ # 4.3. Results in A Large-Scale Fall Guys-Like Battle Royal Game Environment
212
+
213
+ In the large-scale fall guys-like game environment, we focus on highly dynamic and competitive race scenarios, characterized by a myriad of ever-changing obstacles, shifting floor layouts, and functional items. The elements within the game exhibit both functional and attribute changes, resulting in dynamics shift and evolving state accessibility. As shown in Fig. 4, the effects of trampolines (e.g., height and orientation) vary across different maps and the agent's interaction with the trampoline will therefore result in different environment transitions depending on the specific configuration. The resulting dynamics shift has high stochasticity and cannot be effectively modelled by context encoder-based algorithms (Luo et al., 2022; Lee et al., 2020). We train the agent on 10 distinct maps, each presenting unique challenges and configurations. The training step is set to 6M. Metrics except policy entropy were averaged over the final
214
+
215
+ ![](images/e4ad0ba5245c2c9a6ce86aa2a3c0b9694613b67cb57413d0cf8ffa35232b843a.jpg)
216
+ Figure 2. Results of online experiments on MuJoCo and MetaDrive tasks. "NS" refers to tasks with non-stationary environment dynamics.
217
+
218
+ ![](images/1d6ecc364b48495da70de32cf95ea8a0ffbdf84f505a8f6ed8a89ef812b3639e.jpg)
219
+
220
+ ![](images/78ed6f0434e1782e0d9293eae8d271355560cf01ea4bdfd96788c000706b82c3.jpg)
221
+
222
+ ![](images/8e3477080510e56f5274faa3a4ffceedba6f9852f438f655452a571b8707af7a.jpg)
223
+
224
+ ![](images/a0489dd7cf9b4ab8d8539e7f47ab393cc8724a54b549ae206e89afc763f480d5.jpg)
225
+
226
+ ![](images/bc87765913a85b9bc3d6c27f5f88eed4cda44571d8a055f30e0fc9890ebb5a44.jpg)
227
+ Figure 3. Left: Comparisons of the logarithm of the discriminator output, i.e., the augmented reward, and the environment reward on different states in the Walker-2d environment. The augmented reward can better reflect the state optimality. Right: Curves for average extra loss and augmented reward in the fall-guys like game environment.
228
+
229
+ ![](images/0f1157fa62bcfd2be805caabe3331630d30799656ed5f82ceedc0fc96d7b904e.jpg)
230
+
231
+ ![](images/4d07df8d507cc7e7dbd30bd0b95ebf08953363279272a23a37655c9754a54e9a.jpg)
232
+
233
+ ![](images/848bc7d76f9fb8145e64847b9be1b50bebd280c8784d66f72c5a851454c7ad44.jpg)
234
+
235
+ ![](images/a80f2806aada0345830c864d92bbf421fec5806b41183f3bfce84754d2a6df8a.jpg)
236
+
237
+ ![](images/2e3480f0b7e39495d0a566c045376b749275dcd90fa0dd1c3634b8bd4308ca35.jpg)
238
+ (a) Vertical and low
239
+ Figure 4. Demonstrations of dynamics shift caused by different trampoline effect. Colors and textures are only for visual enhancement and are not part of the agent's observations.
240
+
241
+ ![](images/2e35daf621e51f8b749e1150b9646ca0a73bb31ea90097d6e48736e8730f0b2b.jpg)
242
+ (b) Vertical and high
243
+
244
+ ![](images/33da433347c5462e95dd216231b2c5073e54ad8eb7ce5f4db0256d85f14557e6.jpg)
245
+ (b) Upper left and high
246
+
247
+ 1M steps and the policy entropy is averaged in the initial 1M steps. More experiment details are listed in Appendix C.3, including additional map demonstrations, MDP setups, and the network structure.
248
+
249
+ As demonstrated in Tab. 3, PPO+ASOR achieves the highest scores in all five performance-related metrics. To be specific, the high total reward, unweighed goal reward, and success rate demonstrate the overall effectiveness of ASOR when applied to complex large-scale tasks. Low trapped rate, small distance from cliff, and high policy entropy demonstrate the strong exploration ability of ASOR since it is better at getting rid of low-reward regions and has higher policy stochasticity. The low unnecessary jump rate demonstrates the effectiveness of policy regularization only on accessible states. Jumping states may appear in the optimal trajectories
250
+
251
+ in maps with diverse altitudes, but are unnecessary and hinder the fast goal reaching in other maps. Fig. 3 (right) shows the curve of the augmented reward and the extra loss, including the discriminator training loss and the RND training loss. The loss curve drops smoothly and the average augmented reward remains stable, which means that the discriminator network is easy to train and has stable performance.
252
+
253
+ # 5. Conclusion
254
+
255
+ In this paper, we focus on efficient policy optimization with data collected under dynamics shift. We demonstrate that despite widely utilized in IfO algorithms, the idea of similar expert state distribution across different dynamics can be unreliable when some states are no longer accessible as the environment dynamics changes. We propose a policy regularization method that only imitates expert state distributions on globally accessible states. By formally characterizing the difference of state accessibility under dynamics shift, we show that the accessible state-based regularization approach provides strong lower-bound performance guarantees for efficient policy optimization. We also propose a practical algorithm called ASOR that can serve as an add-on reward augmentation module to existing RL approaches. Extensive experiments across various online and offline RL benchmarks indicate ASOR can be effectively integrated with several state-of-the-art cross-domain policy transfer algorithms, substantially enhancing their performance.
256
+
257
+ Table 3. Experiment results in the fall guys-like game environment. Metrics with the up arrow (↑) are expected to have larger values and vice versa. Metrics with (~) have no specific tendencies.
258
+
259
+ <table><tr><td></td><td>Total Reward (↑)</td><td>Goal Reward (↑)</td><td>Success Rate (↑)</td><td>Trapped Rate (↓)</td><td>Unnecessary Jump Rate (↓)</td><td>Distance from Cliff (~)</td><td>Policy Entropy (~)</td></tr><tr><td>PPO</td><td>0.329±0.308</td><td>1.154±0.085</td><td>0.361±0.009</td><td>0.012±0.009</td><td>0.064±0.003</td><td>0.152±0.025</td><td>5.725±0.185</td></tr><tr><td>PPO+SRPO</td><td>0.337±0.257</td><td>1.513±0.076</td><td>0.376±0.006</td><td>0.038±0.015</td><td>0.040±0.003</td><td>0.148±0.018</td><td>5.859±0.098</td></tr><tr><td>PPO+ASOR</td><td>0.554±0.336</td><td>1.781±0.053</td><td>0.387±0.005</td><td>0.005±0.005</td><td>0.029±0.003</td><td>0.143±0.021</td><td>6.358±0.122</td></tr></table>
260
+
261
+ Limitations This paper focuses on the setting of HiP-MDP with evolving environment dynamics and a static reward function. The resulting ASOR algorithm will not be applicable to tasks with multiple reward functions. Meanwhile, the theoretical results will be weaker on some adversarial HiP-MDPs with large $R_{s}$ . Details will be discussed in Appendix A.3.
262
+
263
+ # Impact Statement
264
+
265
+ The ASOR approach enables better adaptation of RL models in dynamic environments, making RL applications more resilient across diverse real-world conditions. The concept of avoiding misleading inaccessible states may improve the safety of autonomous agents, ensuring that they do not make catastrophic decisions when transitioning between environments. Therefore, ASOR's method can enhance cross-domain policy transfer, making RL algorithms more efficient for applications such as robotics, industrial automation, healthcare, and finance.
266
+
267
+ # Acknowledgement
268
+
269
+ This research is supported by the National Research Foundation, Singapore under its Industry Alignment Fund – Prepositioning (IAF-PP) Funding Initiative. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore. This research is also supported by the Joint NTU-WeBank Research Centre on Fintech, Nanyang Technological University, Singapore.
270
+
271
+ # References
272
+
273
+ Arora, S., Ge, R., Liang, Y., Ma, T., and Zhang, Y. Generalization and equilibrium in generative adversarial nets (GANs). In ICML, 2017.
274
+ Burda, Y., Edwards, H., Storkey, A. J., and Klimov, O. Exploration by random network distillation. In ICLR, 2019.
275
+ Chen, X., Yu, Y., Li, Q., Luo, F., Qin, Z. T., Shang, W., and Ye, J. Offline model-based adaptable policy learning. In NeurIPS, 2021.
276
+
277
+ Chevalier-Boisvert, M., Dai, B., Towers, M., de Lazcano, R., Willems, L., Lahlou, S., Pal, S., Castro, P. S., and Terry, J. Minigrid & miniworld: Modular & customizable reinforcement learning environments for goal-oriented tasks. CoRR, abs/2306.13831, 2023.
278
+ Desai, S., Durugkar, I., Karnan, H., Warnell, G., Hanna, J., and Stone, P. An imitation from observation approach to transfer learning with dynamics mismatch. In NeurIPS, 2020.
279
+ Doshi-Velez, F. and Konidaris, G. D. Hidden parameter markov decision processes: A semiparametric regression approach for discovering latent task parametrizations. In *IJCAI*, 2016.
280
+ Eysenbach, B., Chaudhari, S., Asawa, S., Levine, S., and Salakhutdinov, R. Off-dynamics reinforcement learning: Training for transfer with domain classifiers. In ICLR, 2021.
281
+ Fu, J., Kumar, A., Nachum, O., Tucker, G., and Levine, S. D4RL: datasets for deep data-driven reinforcement learning. CoRR, abs/2004.07219, 2020.
282
+ Fujimoto, S., Meger, D., and Precup, D. Off-policy deep reinforcement learning without exploration. In ICML, 2019.
283
+ Gangwani, T. and Peng, J. State-only imitation with transition dynamics mismatch. In ICLR, 2020.
284
+ Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A. C., and Bengio, Y. Generative adversarial networks. CoRR, abs/1406.2661, 2014.
285
+ Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In ICML, 2018.
286
+ Ho, J. and Ermon, S. Generative adversarial imitation learning. In NIPS, 2016.
287
+ Janner, M., Fu, J., Zhang, M., and Levine, S. When to trust your model: Model-based policy optimization. In NeurIPS, 2019.
288
+
289
+ Jiang, S., Pang, J., and Yu, Y. Offline imitation learning with a misspecified simulator. In NeurIPS, 2020.
290
+ Kumar, A., Zhou, A., Tucker, G., and Levine, S. Conservative Q-learning for offline reinforcement learning. In NeurIPS, 2020.
291
+ Lee, K., Seo, Y., Lee, S., Lee, H., and Shin, J. Context-aware dynamics model for generalization in model-based reinforcement learning. In ICML, 2020.
292
+ Levine, S. Reinforcement learning and control as probabilistic inference: Tutorial and review. CoRR, abs/1805.00909, 2018.
293
+ Li, Q., Peng, Z., Feng, L., Zhang, Q., Xue, Z., and Zhou, B. Metadrive: Composing diverse driving scenarios for generalizable reinforcement learning. IEEE Trans. Pattern Anal. Mach. Intell., 2023.
294
+ Liang, E., Liaw, R., Nishihara, R., Moritz, P., Fox, R., Goldberg, K., Gonzalez, J., Jordan, M., and Stoica, I. RLlib: Abstractions for distributed reinforcement learning. In ICML, 2018.
295
+ Lillicrap, T. P., Hunt, J. J., Pritzel, A., Heess, N., Erez, T., Tassa, Y., Silver, D., and Wierstra, D. Continuous control with deep reinforcement learning. In ICLR, 2016.
296
+ Liu, F., Ling, Z., Mu, T., and Su, H. State alignment-based imitation learning. In ICLR, 2020.
297
+ Liu, J., Zhang, H., and Wang, D. DARA: Dynamics-aware reward augmentation in offline reinforcement learning. In ICLR, 2022.
298
+ Liu, X., Xue, Z., Pang, J., Jiang, S., Xu, F., and Yu, Y. Regret minimization experience replay in off-policy reinforcement learning. In NeurIPS, 2021.
299
+ Luo, F., Jiang, S., Yu, Y., Zhang, Z., and Zhang, Y. Adapt to environment sudden changes by learning a context sensitive policy. In AAAI, 2022.
300
+ Nachum, O., Chow, Y., Dai, B., and Li, L. DualDICE: Behavior-agnostic estimation of discounted stationary distribution corrections. In NeurIPS, 2019.
301
+ Niu, H., Sharma, S., Qiu, Y., Li, M., Zhou, G., Hu, J., and Zhan, X. When to trust your simulator: Dynamics-aware hybrid offline-and-online reinforcement learning. CoRR, abs/2206.13464, 2022.
302
+ Niu, H., Ji, T., Liu, B., Zhao, H., Zhu, X., Zheng, J., Huang, P., Zhou, G., Hu, J., and Zhan, X. $\mathrm{H2O + }$ : an improved framework for hybrid offline-and-online RL with dynamics gaps. CoRR, abs/2309.12716, 2023.
303
+
304
+ Niu, H., Hu, J., Zhou, G., and Zhan, X. A comprehensive survey of cross-domain policy transfer for embodied agents. CoRR, abs/2402.04580, 2024.
305
+ Radosavovic, I., Wang, X., Pinto, L., and Malik, J. State-only imitation learning for dexterous manipulation. In IROS, 2021.
306
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. CoRR, abs/1707.06347, 2017.
307
+ Sinha, S., Song, J., Garg, A., and Ermon, S. Experience replay with likelihood-free importance weights. In L4DC, 2022.
308
+ Sutton, R. S. and Barto, A. G. Reinforcement learning: An introduction. IEEE Trans. Neural Networks, 1998.
309
+ Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics engine for model-based control. In IROS, 2012.
310
+ Torabi, F., Warnell, G., and Stone, P. Behavioral cloning from observation. In *IJCAI*, 2018a.
311
+ Torabi, F., Warnell, G., and Stone, P. Generative adversarial imitation from observation. CoRR, abs/1807.06158, 2018b.
312
+ Wu, Y., Tucker, G., and Nachum, O. Behavior regularized offline reinforcement learning. CoRR, abs/1911.11361, 2019.
313
+ Xu, K., Bai, C., Ma, X., Wang, D., Zhao, B., Wang, Z., Li, X., and Li, W. Cross-domain policy adaptation via value-guided data filtering. In NeurIPS, 2023.
314
+ Xu, T., Li, Z., and Yu, Y. Error bounds of imitating policies and environments. In NeurIPS, 2020.
315
+ Xue, Z., Cai, Q., Liu, S., Zheng, D., Jiang, P., Gai, K., and An, B. State regularized policy optimization on data with dynamics shift. In NeurIPS, 2023a.
316
+ Xue, Z., Peng, Z., Li, Q., Liu, Z., and Zhou, B. Guarded policy optimization with imperfect online demonstrations. In ICLR, 2023b.
317
+ Yu, T., Thomas, G., Yu, L., Ermon, S., Zou, J. Y., Levine, S., Finn, C., and Ma, T. MOPO: Model-based offline policy optimization. In NeurIPS, 2020.
318
+ Yu, W., Tan, J., Liu, C. K., and Turk, G. Preparing for the unknown: Learning a universal policy with online system identification. In RSS, 2017.
319
+ Zintgraf, L. M., Shiarlis, K., Igl, M., Schulze, S., Gal, Y., Hofmann, K., and Whiteson, S. VariBAD: A very good method for bayes-adaptive deep RL via meta-learning. In ICLR, 2020.
320
+
321
+ # A. Additional Derivations and Proofs
322
+
323
+ # A.1. Derivations of the Lagrangian
324
+
325
+ For expression convenience, we denote $d_T^\pi (\cdot)$ with $\mu (\cdot)$ and $d_{T_0}^{*, + }(\cdot)$ with $\nu (\cdot)$ . We also omit the maximization over $T$ in Eq. (1) as it can be obtained by following all policy constrains in different dynamics. We start from the optimization problem
326
+
327
+ $$
328
+ \max _ {\pi} \mathbb {E} _ {s _ {t}, a _ {t}, s _ {t + 1} \sim \tau_ {\pi}} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} r \left(s _ {t}, a _ {t}, s _ {t + 1}\right) \right] \quad \text {s . t .} d _ {\mathcal {F}, \phi} (\mu (\cdot), \nu (\cdot)) < \varepsilon . \tag {6}
329
+ $$
330
+
331
+ The $\mathcal{F}$ -distance term can be transformed as:
332
+
333
+ $$
334
+ \begin{array}{l} d _ {\mathcal {F}, \phi} (\mu (\cdot), \nu (\cdot)) = \mathbb {E} _ {s \sim \mu} [ \log \omega^ {*} (s) ] + \mathbb {E} _ {s \sim \nu} [ \log (1 - \omega^ {*} (s)) ] \\ = \int \mu (s) \log \omega^ {*} (s) d s + \int \nu (s) \log (1 - \omega^ {*} (s)) d s \\ = \int (1 - \gamma) \sum_ {t = 0} ^ {\infty} \gamma^ {t} p \left(s _ {t} = s \mid \pi , T\right) \log \omega^ {*} (s) d s \tag {7} \\ + \int (1 - \gamma) \sum_ {t = 0} ^ {\infty} \gamma^ {t} p \left(s _ {t} = s, s _ {t} \in S ^ {+} \mid \pi^ {*}, T _ {0}\right) \log \left(1 - \omega^ {*} (s)\right) d s \\ = (1 - \gamma) \sum_ {t = 0} ^ {\infty} \gamma^ {t} \left[ \mathbb {E} _ {s _ {t} \sim \tau_ {\pi}} \log \omega^ {*} (s _ {t}) + \mathbb {E} _ {s _ {t} \sim \tau^ {*}, +} \log (1 - \omega^ {*} (s _ {t})) \right] \\ \end{array}
335
+ $$
336
+
337
+ where $\omega^{*}$ is the trained discriminator. So the optimization problem can be written as the following standard form
338
+
339
+ $$
340
+ \min _ {\pi} \mathbb {E} _ {s _ {t}, a _ {t}, s _ {t + 1} \sim \tau_ {\pi}} \sum_ {t = 0} ^ {\infty} - \gamma^ {t} r \left(s _ {t}, a _ {t}, s _ {t + 1}\right) \tag {8}
341
+ $$
342
+
343
+ $$
344
+ \mathrm {s . t .} - (1 - \gamma) \sum_ {t = 0} ^ {\infty} \gamma^ {t} \left[ \mathbb {E} _ {s _ {t} \sim \tau_ {\pi}} \log \omega^ {*} (s _ {t}) + \mathbb {E} _ {s _ {t} \sim \tau^ {*}, +} \log (1 - \omega^ {*} (s _ {t})) \right] - \frac {\varepsilon}{1 - \gamma} < 0.
345
+ $$
346
+
347
+ Neglecting items irrelevant to $\pi$ , we get the Lagrangian $L$ as
348
+
349
+ $$
350
+ L = - \mathbb {E} _ {s _ {t}, a _ {t}, s _ {t + 1} \sim \tau_ {\pi}} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} \left(r (s _ {t}, a _ {t}, s _ {t + 1}) + \lambda \log \omega^ {*} (s _ {t})\right) \right] - \frac {\lambda \varepsilon}{1 - \gamma}. \tag {9}
351
+ $$
352
+
353
+ # A.2. Proofs of Theorems
354
+
355
+ Lemma A.1 (Value Discrepancy). Considering MDPs $\mathcal{M}_1 = (\mathcal{S},\mathcal{A},T_1,r,\gamma ,\rho_0)$ and $\mathcal{M}_2 = (\mathcal{S},\mathcal{A},T_2,r,\gamma ,\rho_0)$ which are $M - R_{s}$ accessible from each other, for all $s\in S$ we have
356
+
357
+ $$
358
+ \left| V _ {T _ {1}} ^ {*} (s) - V _ {T _ {2}} ^ {*} (s) \right| \leqslant \frac {R _ {s} + 2 \lambda}{1 - \gamma}, \tag {10}
359
+ $$
360
+
361
+ where $\lambda$ is the action coefficient in the reward function. Detailed definition are in Sec. 2.1.
362
+
363
+ Proof. Without the loss of generality, we consider the state $s$ with $V_{T_1}^*(s) \geqslant V_{T_2}^*(s)$ . Under the optimal policy $\pi_1^*(s)$ , the next state of $s$ in $\mathcal{M}_1$ will be $s' = T(s, a^*)$ . As $\mathcal{M}_2$ is $M - R_s$ accessible from $\mathcal{M}_1$ , there exists $N \leqslant M$ such that in $\mathcal{M}_2$ , $s'$ can be reached from $s$ with action sequence $a_1, a_2, \dots, a_N$ . We then borrow the idea of iteratively computing $|V_{T_1}^*(s) - V_{T_2}^*(s)|$ from Xue et al. (Xue et al., 2023a). According to the optimistic Bellman equation
364
+
365
+ $$
366
+ V _ {T} ^ {*} (s) = \max _ {a} r \left(s, a, s ^ {\prime}\right) + \gamma V _ {T} ^ {*} (T (s, a)), \tag {11}
367
+ $$
368
+
369
+ we have
370
+
371
+ $$
372
+ \begin{array}{l} \left| V _ {T _ {1}} ^ {*} (s) - V _ {T _ {2}} ^ {*} (s) \right| \\ = V _ {T _ {1}} ^ {*} (s) - V _ {T _ {2}} ^ {*} (s) \\ \leqslant r \left(s, a ^ {*}, s ^ {\prime}\right) + \gamma V _ {T _ {1}} ^ {*} \left(s ^ {\prime}\right) - \sum_ {i = 0} ^ {N - 1} \gamma^ {i} r \left(s _ {i}, a _ {i}, s _ {i + 1}\right) - \gamma^ {N} V _ {T _ {2}} ^ {*} \left(s ^ {\prime}\right) \\ \left(s _ {0} \doteq s, s _ {N} \doteq s ^ {\prime} \text {f o r b r e v i t y}\right) \\ = r \left(s, a ^ {*}, s ^ {\prime}\right) - \gamma^ {N - 1} r \left(s _ {N - 1}, a _ {N - 1}, s ^ {\prime}\right) + \gamma \left(1 - \gamma^ {N - 1}\right) V _ {T _ {2}} ^ {*} \left(s ^ {\prime}\right) \\ + \sum_ {n = 0} ^ {N - 2} \gamma^ {n} r \left(s _ {n}, a _ {n}, s _ {n + 1}\right) + \gamma \left[ V _ {T _ {1}} ^ {*} \left(s ^ {\prime}\right) - V _ {T _ {2}} ^ {*} \left(s ^ {\prime}\right) \right] \tag {12} \\ \leqslant (1 - \gamma^ {N - 1}) (r (s, a ^ {*}, s ^ {\prime}) + \gamma V _ {T _ {2}} ^ {*} (s ^ {\prime})) + 2 \lambda + \sum_ {n = 0} ^ {N - 2} \gamma^ {n} r (s _ {n}, a _ {n}, s _ {n + 1}) + \gamma [ V _ {T _ {1}} ^ {*} (s ^ {\prime}) - V _ {T _ {2}} ^ {*} (s ^ {\prime}) ] \\ \leqslant (1 - \gamma^ {N - 1}) (r (s, a ^ {*}, s ^ {\prime}) + \gamma V _ {T _ {1}} ^ {*} (s ^ {\prime})) + 2 \lambda + \sum_ {n = 0} ^ {N - 2} \gamma^ {n} r (s _ {n}, a _ {n}, s _ {n + 1}) + \gamma [ V _ {T _ {1}} ^ {*} (s ^ {\prime}) - V _ {T _ {2}} ^ {*} (s ^ {\prime}) ] \\ \leqslant R _ {s} + 2 \lambda + \gamma \left[ V _ {T _ {1}} ^ {*} (s ^ {\prime}) - V _ {T _ {2}} ^ {*} (s ^ {\prime}) \right]. \\ \end{array}
373
+ $$
374
+
375
+ Iteratively computing $\left| V_{T_1}^*(s) - V_{T_2}^*(s) \right|$ , we have
376
+
377
+ $$
378
+ \left| V _ {T _ {1}} ^ {*} \left(s ^ {\prime}\right) - V _ {T _ {2}} ^ {*} \left(s ^ {\prime}\right) \right| \leqslant \frac {R _ {s} + 2 \lambda}{1 - \gamma}. \tag {13}
379
+ $$
380
+
381
+ Theorem A.2 (Thm. 3.5 in the main paper). Consider the MDP $\mathcal{M}_1 = (\mathcal{S},\mathcal{A},T_1,r,\gamma ,\rho_0)$ which is $M - R_{s}$ accessible from the MDP $\mathcal{M}_2 = (\mathcal{S},\mathcal{A},T_2,r,\gamma ,\rho_0)$ . For all policy $\hat{\pi}$ , if there exists one certain dynamics $T_{0}$ such that $\max_T D_{\mathrm{JS}}(d_T^{\hat{\pi}}(\cdot)\| d_{T_0}^{*, + }(\cdot))\leqslant \varepsilon$ , we have
382
+
383
+ $$
384
+ \eta (\hat {\pi}) \geqslant \max _ {T} \eta \left(\pi_ {T} ^ {*}\right) - \frac {2 R _ {s} + 6 \lambda + 2 R _ {\operatorname* {m a x}} \varepsilon}{1 - \gamma}. \tag {14}
385
+ $$
386
+
387
+ Proof. $|\eta_{T_1}(\pi_{T_1}^*) - \eta_{T_2}(\pi_{T_2}^*)|$ can be bounded with Thm. A.1:
388
+
389
+ $$
390
+ \left| \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) - \eta_ {T _ {2}} \left(\pi_ {T _ {2}} ^ {*}\right) \right| = \left| \mathbb {E} _ {s \in \rho_ {0}} V _ {T _ {1}} ^ {*} (s) - \mathbb {E} _ {s \in \rho_ {0}} V _ {T _ {2}} ^ {*} (s) \right| \leqslant \frac {R _ {s} + 2 \lambda}{1 - \gamma}. \tag {15}
391
+ $$
392
+
393
+ With a slight abuse of notation, we define the transition distribution $d_T^\pi (s,a,s') = d_T^\pi (s)\pi (a|s)T(s'|s,a)$ and the accessible-state transition distribution $d_{T_2}^{\pi , + }(s,a,s') = d_T^{\pi , + }(s)\hat{\pi} (a|s)T(s'|s,a)$ . Consider $\tilde{\pi}$ such that $d_{T}^{\tilde{\pi}}(s) = d_{T_0}^{*, + }(s)$ for all $s\in S$ . The accumulated return of policy $\tilde{\pi}$ under transition $T_{1}$ can be written as $\eta_{T_1}(\hat{\pi}) = (1 - \gamma)^{-1}\mathbb{E}_{s,a,s'\sim d_{T_1}^{\tilde{\pi}}} [r(s,a,s')]$ . We also consider the accumulated return of the optimal policy under transition $T_{2}$ including only accessible states: $\eta_{T_2}^+ (\pi_{T_2}^{*, + }) = (1 - \gamma)^{-1}\mathbb{E}_{s,a,s'\sim d_{T_2}^{*, + }}[r(s,a,s')]$ , where $\pi_{T_2}^{*, + }$ is the optimal policy making transitions among accessible states. Consider the Lipschitz property of the reward function:
394
+
395
+ $$
396
+ \left| r \left(s, a _ {1}, s ^ {\prime}\right) - r \left(s, a _ {2}, s ^ {\prime}\right) \right| \leqslant \lambda \| a _ {1} - a _ {2} \| _ {1}. \tag {16}
397
+ $$
398
+
399
+ Taking expectation w.r.t. $d_{T_1}^{\bar{\pi}}(\cdot)$ on both sides, we get
400
+
401
+ $$
402
+ \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} \left| r \left(s, a _ {1}, s ^ {\prime}\right) - r \left(s, a _ {2}, s ^ {\prime}\right) \right| \leqslant \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} \lambda \| a _ {1} - a _ {2} \| _ {1}. \tag {17}
403
+ $$
404
+
405
+ Letting $\mu(A_1, A_2|s)$ be any joint distribution with marginals $\hat{\pi}$ and $\pi_{T_2}^{*,+}$ conditioned on $s \in S^+$ . Taking expectation w.r.t. $\mu$
406
+
407
+ on both sides, we get
408
+
409
+ $$
410
+ \begin{array}{l} \left| \mathbb {E} _ {d _ {T _ {1}} ^ {\hat {\pi}}} r (s, a, s ^ {\prime}) - \mathbb {E} _ {d _ {T _ {2}} ^ {* , +}} r (s, a, s ^ {\prime}) \right| \leqslant \mathbb {E} _ {s \sim d _ {T ^ {\prime}} ^ {*}} \mathbb {E} _ {a _ {1}, a _ {2} \sim \mu} | r (s, a _ {1}, s ^ {\prime}) - r (s, a _ {2}, s ^ {\prime}) | \\ \leqslant \lambda \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} E _ {\mu} \| a _ {1} - a _ {2} \| _ {1} \tag {18} \\ \leqslant \max _ {s} \lambda E _ {\mu} \| a _ {1} - a _ {2} \| _ {1} \\ \leqslant 2 \lambda \\ \end{array}
411
+ $$
412
+
413
+ According to the definitions of $\eta_{T_1}(\tilde{\pi})$ and $\eta_{T_2}^+(\pi_{T_2}^{+,*})$ , the L.H.S. of Eq. (18) is exactly the difference of the two accumulated returns. Therefore, we get
414
+
415
+ $$
416
+ \left| \eta_ {T _ {1}} (\tilde {\pi}) - \eta_ {T _ {2}} ^ {+} \left(\pi_ {T _ {2}} ^ {* , +}\right) \right| \leqslant \frac {2 \lambda}{1 - \gamma}. \tag {19}
417
+ $$
418
+
419
+ Then we will compute the discrepancy between $\eta_{T_2}^+$ and $\eta_{T_2}$ . $\eta_{T_2}$ can be computed with
420
+
421
+ $$
422
+ \begin{array}{l} \eta_ {T _ {2}} (\pi_ {T _ {2}} ^ {*}) = \mathbb {E} _ {s \sim \rho_ {0}} V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} (s) \\ = \mathbb {E} _ {\tau} \sum_ {n = 0} ^ {N - 1} \gamma^ {n} r \left(s _ {n}, a _ {n}, s _ {n + 1}\right) + \gamma^ {N} V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} \left(s _ {N}\right), \tag {20} \\ \end{array}
423
+ $$
424
+
425
+ where $s_N$ is the accessible state accessible from $s_0$ with $\pi_{T_2}^{*,+}$ . According to the definition of $M - R_s$ accessible MDPs,
426
+
427
+ $$
428
+ \begin{array}{l} \eta_ {T _ {2}} \left(\pi_ {T _ {2}} ^ {*}\right) = \mathbb {E} _ {\tau} \sum_ {n = 0} ^ {N - 1} \gamma^ {n} r _ {n} + \gamma^ {N} V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} \left(s _ {N}\right) - R _ {s} + R _ {s} \\ \leqslant \mathbb {E} _ {\tau} \sum_ {n = 0} ^ {N - 1} \gamma^ {n} r _ {n} - \sum_ {n = 0} ^ {N - 2} \gamma^ {n} r _ {n} - \left(\gamma^ {N - 1} - 1\right) r \left(s _ {0}, \pi_ {T _ {2}} ^ {+, *} \left(s _ {0}\right), s _ {N}\right) \tag {21} \\ + \gamma^ {N} V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} (s _ {N}) - (\gamma^ {N} - \gamma) V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {+, *} (s _ {N})} + R _ {s} \\ \leqslant \mathbb {E} _ {\tau} r (s _ {0}, \pi_ {T _ {2}} ^ {+, *} (s _ {0}), s _ {N}) + \gamma V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {+, *}} (s _ {N}) + \gamma^ {N} (V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} (s _ {N}) - V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {+, *}} (s _ {N})) + R _ {s} + 2 \lambda \\ = \eta_ {T _ {2}} ^ {+} (\pi_ {T _ {2}} ^ {+, *}) + \gamma^ {N} \big (V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {*}} (s _ {N}) - V _ {T _ {2}} ^ {\pi_ {T _ {2}} ^ {+, *}} (s _ {N}) \big) + R _ {s} + 2 \lambda , \\ \end{array}
429
+ $$
430
+
431
+ where $r_n$ is the short for $r(s_n, a_n, s_{n+1})$ . Iteratively scaling the value discrepancy between $\pi_{T_2}^*$ and $\pi_{T_2}^{+,*}$ , we get
432
+
433
+ $$
434
+ \left| \eta_ {T _ {2}} \left(\pi_ {T _ {2}} ^ {*}\right) - \eta_ {T _ {2}} ^ {+} \left(\pi_ {T _ {2}} ^ {+, *}\right) \right| \leqslant \frac {R _ {s} + 2 \lambda}{1 - \gamma^ {M}} \leqslant \frac {R _ {s} + 2 \lambda}{1 - \gamma}. \tag {22}
435
+ $$
436
+
437
+ According to results in imitation learning (Lem. 6 in (Xu et al., 2020)), we have
438
+
439
+ $$
440
+ \left| \eta_ {T _ {1}} (\tilde {\pi}) - \eta_ {T _ {1}} (\hat {\pi}) \right| \leqslant \frac {2 R _ {\max } \varepsilon}{1 - \gamma} \tag {23}
441
+ $$
442
+
443
+ Combining Eq. (15)(19)(21)(23), we have
444
+
445
+ $$
446
+ \begin{array}{l} \left| \eta_ {T _ {1}} (\tilde {\pi}) - \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) \right| \leqslant \left| \eta_ {T _ {1}} (\hat {\pi}) - \eta_ {T _ {1}} (\tilde {\pi}) \right| + \left| \eta_ {T _ {1}} (\tilde {\pi}) - \eta_ {T _ {2}} ^ {+} \left(\pi_ {T _ {2}} ^ {+, *}\right) \right| \\ + \left| \eta_ {T _ {2}} ^ {+} \left(\pi_ {T _ {2}} ^ {+, *}\right) - \eta_ {T _ {2}} \left(\pi_ {T _ {2}} ^ {*}\right) \right| + \left| \eta_ {T _ {2}} \left(\pi_ {T _ {2}} ^ {*}\right) - \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) \right| \tag {24} \\ \leqslant \frac {2 R _ {s} + 6 \lambda + 2 R _ {\max} \varepsilon}{1 - \gamma}. \\ \end{array}
447
+ $$
448
+
449
+ Taking expectation with respect to all $T$ in the HiP-MDP concludes the proof.
450
+
451
+ Lemma A.3 (Lemma 2 in Xu et. al (Xu et al., 2020)). Consider a network class set $\mathcal{P}$ with $\Delta$ -bounded value functions, i.e., $|P(s)| \leq \Delta$ , for all $s \in S, P \in \mathcal{P}$ . Given an expert policy $\pi_{\mathrm{E}}$ and an imitated policy $\pi_{\mathrm{I}}$ with $d_{\mathcal{P}}\left(\hat{d}^{\pi_{\mathrm{E}}}, \hat{d}^{\pi_{\mathrm{I}}}\right) - \inf_{\pi \in \Pi} d_{\mathcal{P}}\left(\hat{d}^{\pi_{\mathrm{E}}}, \hat{d}^{\pi}\right) \leq \varepsilon_{\mathcal{P}}$ , then $\forall \delta \in (0,1)$ , with probability at least $1 - \delta$ , we have
452
+
453
+ $$
454
+ d _ {\mathcal {P}} \left(d ^ {\pi_ {\mathrm {E}}}, d ^ {\pi_ {\mathrm {I}}}\right) \leq \inf _ {\pi \in \Pi} d _ {\mathcal {P}} \left(\hat {d} ^ {\pi_ {\mathrm {E}}}, \hat {d} ^ {\pi}\right) + 2 \hat {\mathcal {R}} _ {d ^ {\pi_ {\mathrm {E}}}} ^ {(m)} (\mathcal {P}) + 2 \hat {\mathcal {R}} _ {d ^ {\pi_ {\mathrm {I}}}} ^ {(m)} (\mathcal {P}) + 1 2 \Delta \sqrt {\frac {\log (2 / \delta)}{m}} + \varepsilon_ {\mathcal {P}}. \tag {25}
455
+ $$
456
+
457
+ Proof. See Appendix B.3 of (Xu et al., 2020).
458
+
459
+ Theorem A.4. Consider the MDP $\mathcal{M}_1 = (\mathcal{S},\mathcal{A},T_1,r,\gamma ,\rho_0)$ which is $M - R_{s}$ accessible from the MDP $\mathcal{M}_2 = (\mathcal{S},\mathcal{A},T_2,r,\gamma ,\rho_0)$ and the network set $\mathcal{P}$ bounded by $\Delta$ , i.e., $|P(s)|\leqslant \Delta$ . Given $\{s^{(i)}\}_{i = 1}^{m}$ sampled from $d_{T_2}^{+,*}$ , if $\pi_{T_2}^{+,*}\in \mathcal{P}$ and the reward function $r_{\hat{\pi},T_1}(s) = \mathbb{E}_{a\sim \hat{\pi},s'\sim T_1}r(s,a,s')$ lies in the linear span of $\mathcal{P}$ , for policy $\hat{\pi}$ regularized by $\hat{d}_{T_2}^{+,*}$ according to Eq. (1) with $d_{\mathcal{P}}(\hat{d}_{T_1}^{\hat{\pi}},\hat{d}_{T_2}^{+,*}) < \varepsilon_{\mathcal{P}}$ , we have
460
+
461
+ $$
462
+ \eta_ {T _ {1}} (\hat {\pi}) \geqslant \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) - \frac {2 R _ {s} + 8 \lambda}{1 - \gamma} - \frac {2 \| r \| _ {\mathcal {P}}}{1 - \gamma} \left(\hat {\mathcal {R}} _ {d _ {T _ {2}} ^ {+, *}} ^ {(m)} (\mathcal {P}) + \hat {\mathcal {R}} _ {d _ {T _ {1}} ^ {\pm}} ^ {(m)} (\mathcal {P}) + 6 \Delta \sqrt {\frac {\log (2 / \delta)}{m}} + \frac {\varepsilon}{2}\right) \tag {26}
463
+ $$
464
+
465
+ with probability at least $1 - \delta$ .
466
+
467
+ Proof. As $\mathcal{M}_1$ is $M - R_s$ accessible accessible from $\mathcal{M}_2$ , there exists policy $\tilde{\pi}$ such that $d_{T_1}^{\tilde{\pi}}(s) = d_{T_2}^{*, + }(s)$ for all $s\in S^{+}$ . With Thm. A.2, we have
468
+
469
+ $$
470
+ \eta_ {T _ {1}} (\tilde {\pi}) \geqslant \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) - \frac {2 R _ {s} + 6 \lambda}{1 - \gamma} \tag {27}
471
+ $$
472
+
473
+ Then we compute the performance discrepancy $\eta_{T_1}(\hat{\pi}) - \eta_{T_1}(\tilde{\pi})$ given that $d_{\mathcal{P}}(\hat{d}_{T_1}^{\hat{\pi}},\hat{d}_{T_1}^{\tilde{\pi}}) < \varepsilon_{\mathcal{P}}$ . The following derivations borrow the main idea from Xu et al. (Xu et al., 2020) and turn the state-action occupancy measure $\rho$ into the state-only occupancy measure $d$ . We start with the network distance of the ground truth state occupancy measures. According to Lem. A.3, we have
474
+
475
+ $$
476
+ d _ {\mathcal {P}} \left(d _ {T _ {1}} ^ {\hat {\pi}}, d _ {T _ {1}} ^ {\tilde {\pi}}\right) \leqslant 2 \hat {\mathcal {R}} _ {d _ {T _ {2}} ^ {+, *}} ^ {(m)} (\mathcal {P}) + 2 \hat {\mathcal {R}} _ {d _ {T _ {1}} ^ {\hat {\pi}}} ^ {(m)} (\mathcal {P}) + 1 2 \Delta \sqrt {\frac {\log (2 / \delta)}{m}} + \varepsilon_ {\mathcal {P}} \tag {28}
477
+ $$
478
+
479
+ with probability at least $1 - \delta$ . Meanwhile,
480
+
481
+ $$
482
+ \begin{array}{l} \left| \eta_ {T _ {1}} (\hat {\pi}) - \eta_ {T _ {1}} (\tilde {\pi}) \right| \\ \leqslant \frac {1}{1 - \gamma} \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\tilde {\pi}, T _ {1}} (s) \right] \right| \\ \leqslant \frac {1}{1 - \gamma} \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] \right| + \frac {1}{1 - \gamma} \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\tilde {\pi}, T _ {1}} (s) \right] \right| \tag {29} \\ \leqslant \frac {1}{1 - \gamma} \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\hat {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\hat {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] \right| + \frac {2 \lambda}{1 - \gamma}. \\ \end{array}
483
+ $$
484
+
485
+ As we assume that the reward function $r_{\hat{\pi},T_1}(s)$ lies in the linear span of $\mathcal{P}$ , there exists $n \in \mathbb{N}$ , $\{c_i \in \mathbb{R}\}_{i=1}^n$ and $\{P_i \in \mathcal{P}\}_{i=1}^n$ , such that $r = c_0 + \sum_{i=1}^n c_i P_i$ . So we obtain that
486
+
487
+ $$
488
+ \begin{array}{l} \left| \eta_ {T _ {1}} (\hat {\pi}) - \eta_ {T _ {1}} (\tilde {\pi}) \right| \leqslant \frac {1}{1 - \gamma} \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\hat {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\tilde {\pi}}} \left[ r _ {\hat {\pi}, T _ {1}} (s) \right] \right| + \frac {2 \lambda}{1 - \gamma} \\ \leqslant \frac {1}{1 - \gamma} \left| \sum_ {i = 1} ^ {n} c _ {i} \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} [ P _ {i} (s, a) ] - \sum_ {i = 1} ^ {n} c _ {i} \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} [ P _ {i} (s, a) ] \right| + \frac {2 \lambda}{1 - \gamma} \\ \leqslant \frac {1}{1 - \gamma} \sum_ {i = 1} ^ {n} | c _ {i} | \left| \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} [ P _ {i} (s, a) ] - \mathbb {E} _ {s \sim d _ {T _ {1}} ^ {\bar {\pi}}} [ P _ {i} (s, a) ] \right| + \frac {2 \lambda}{1 - \gamma} \tag {30} \\ \leqslant \frac {1}{1 - \gamma} \left(\sum_ {i = 1} ^ {n} | c _ {i} |\right) d _ {\mathcal {P}} \left(d _ {T _ {1}} ^ {\hat {\pi}}, d _ {T _ {1}} ^ {\tilde {\pi}}\right) + \frac {2 \lambda}{1 - \gamma} \\ \leqslant \frac {1}{1 - \gamma} \| r \| _ {\mathcal {P}} d _ {\mathcal {P}} \left(d _ {T _ {1}} ^ {\hat {\pi}}, d _ {T _ {1}} ^ {\tilde {\pi}}\right) + \frac {2 \lambda}{1 - \gamma}. \\ \end{array}
489
+ $$
490
+
491
+ Combining Eq. (28) and Eq. (30), we have
492
+
493
+ $$
494
+ \eta_ {T _ {1}} (\tilde {\pi}) \geqslant \eta_ {T _ {1}} (\tilde {\pi}) - \frac {2 \| r \| _ {\mathcal {P}}}{1 - \gamma} \left(\hat {\mathcal {R}} _ {d _ {T _ {2}} ^ {+, *}} ^ {(m)} (\mathcal {P}) + \hat {\mathcal {R}} _ {d _ {T _ {1}} ^ {\tilde {\pi}}} ^ {(m)} (\mathcal {P}) + 6 \Delta \sqrt {\frac {\log (2 / \delta)}{m}} + \frac {\varepsilon}{2}\right) + \frac {2 \lambda}{1 - \gamma} \tag {31}
495
+ $$
496
+
497
+ Table 4. Comparison between the Lipschitz coefficient $\lambda$ and the maximum reward ${R}_{\max }$ in practical environments.
498
+
499
+ <table><tr><td>Environment</td><td>Action-related Reward</td><td>λ</td><td>Rmax</td></tr><tr><td>CartPole-v0</td><td>0</td><td>0</td><td>1.00</td></tr><tr><td>InvertedPendulum-v2</td><td>0</td><td>0</td><td>1.00</td></tr><tr><td>Lava World</td><td>0</td><td>0</td><td>1.00</td></tr><tr><td>MetaDrive</td><td>0</td><td>0</td><td>≥ 1</td></tr><tr><td>Fall-guys Like Game</td><td>0</td><td>0</td><td>≥ 1</td></tr><tr><td>Swimmer-v2</td><td>-0.0001||a||2</td><td>0.0001</td><td>0.36</td></tr><tr><td>HalfCheetah-v2</td><td>-0.1||a||2</td><td>0.1</td><td>4.80</td></tr><tr><td>Hopper-v2</td><td>-0.001||a||2</td><td>0.001</td><td>3.80</td></tr><tr><td>Walker2d-v2</td><td>-0.001||a||2</td><td>0.001</td><td>≥ 4</td></tr><tr><td>Ant-v2</td><td>-0.5||a||2</td><td>0.5</td><td>6.00</td></tr><tr><td>Humanoid-v2</td><td>-0.1||a||2</td><td>0.1</td><td>≥ 8</td></tr></table>
500
+
501
+ with probability at least $1 - \delta$ . Combining Eq. (31) and Eq. (27), we have
502
+
503
+ $$
504
+ \eta_ {T _ {1}} (\hat {\pi}) \geqslant \eta_ {T _ {1}} \left(\pi_ {T _ {1}} ^ {*}\right) - \frac {2 R _ {s} + 8 \lambda}{1 - \gamma} - \frac {2 \| r \| _ {\mathcal {P}}}{1 - \gamma} \left(\hat {\mathcal {R}} _ {d _ {T _ {2}} ^ {+, *}} ^ {(m)} (\mathcal {P}) + \hat {\mathcal {R}} _ {d _ {T _ {1}} ^ {\hat {\pi}}} ^ {(m)} (\mathcal {P}) + 6 \Delta \sqrt {\frac {\log (2 / \delta)}{m}} + \frac {\varepsilon}{2}\right) \tag {32}
505
+ $$
506
+
507
+ with probability at least $1 - \delta$ . Taking expectation with respect to all $T$ in the HiP-MDP concludes the proof.
508
+
509
+ # A.3. Discussions on the Theorems
510
+
511
+ Lipschitz Assumption The Lipschitz assumption in Sec. 2.1 requires that if $s$ and $s'$ keep unchanged, the deviation of the reward $r$ will not be larger than $\lambda$ times the deviation of the action $a$ :
512
+
513
+ $$
514
+ \left| r \left(s, a _ {1}, s ^ {\prime}\right) - r \left(s, a _ {2}, s ^ {\prime}\right) \right| \leqslant \lambda \| a _ {1} - a _ {2} \| _ {1}. \tag {33}
515
+ $$
516
+
517
+ Therefore, the Lipschitz coefficient $\lambda$ is only depends action-related terms in the reward function. In Tab. 4, we list the action-related terms of the reward functions for various RL evaluation environments, along with the corresponding values of $\lambda$ derived from these terms. As indicated in the table, the action-related terms in reward functions exhibit reasonably small coefficients in all environments compared with the maximum environment reward $R_{\mathrm{max}}$ . Therefore, the Lipschitz coefficient $\lambda$ will not dominate the error term in Thm. 3.5 and Thm. 3.7.
518
+
519
+ Failure Cases Apart from the Lipschitz assumptions that can easily be realized, Thm. 3.5 and Thm. 3.7 depend on the formulation of $M - R_{s}$ accessible MDPs. Potential failure cases will therefore include tasks with high $R_{s}$ , so that the performance lower bounds become weak. This will happen if states with lowest rewards exist in the optimal trajectory of some, and not all dynamics. In the example of lava world in Fig. 1, if a reward of -100 is assigned to grid (3,4), $R_{s}$ will be as large as 100, leading to a weak performance lower bound when the bottom lava block is at Row 2 with a best episode return of 1. Nevertheless, issues with theoretical analyses will not negatively influence the practical performance of ASOR.
520
+
521
+ # A.4. Comparisons with Previous Approaches
522
+
523
+ Intuitively, the practical algorithm procedure of ASOR share some insights with some offline RL algorithms including AWAC (Nachum et al., 2019), CQL (Kumar et al., 2020) and MOPO (Yu et al., 2020). For example, ASOR prefers states with high values similar to AWAC and states with high visitation counts similar to CQL and MOPO. The advances of ASOR include: 1) By restricting the considered states to accessible states, ASOR can be applied in offline datasets collected under dynamics shift, where the aforementioned offline RL algorithms can only learn from the dataset with static dynamics. Thm. 3.5 and Thm. 3.7 demonstrate the effectiveness of such procedure. 2) ASOR modifies the original policy optimization process by reward augmentation. This enables the easy combination of ASOR with other cross-domain algorithms to enhance their performance.
524
+
525
+ ASOR also share the approach of classifier-based reward augmentation with DARA (Liu et al., 2022) and SRPO (Xue et al., 2023a). The classifier input in DARA is $(s, a, s')$ from the source and target environments. Compared with ASOR, the
526
+
527
+ ![](images/6905b9b60857eab21f187f9df44e18965a8b77ea6a7359dc32d2ca1b165ce5ab.jpg)
528
+ Figure 5. MetaDrive environments with different traffic densities.
529
+
530
+ classifier in DARA exhibits higher complexity and is harder to train. It also requires the access to the information of target environments. Therefore, DARA has poor performance as demonstrated in Sec. 4.1 and cannot be applied to tasks with no prior knowledge on the target environments. The algorithm and theories of SRPO are based on the assumption of the same state accessibility, which is an over-simplification of some environments, as demonstrated in Sec. 3.1 and Sec. B. Comparative results in Sec. 4 demonstrate the inferior performance of SRPO compared with ASOR, in correspondence with the flaw in the assumption. Also, the theoretical analysis in the SRPO paper is built on the assumption called "homomorphous MDPs" which is stronger than the $M - R_{s}$ accessible MDPs used in this paper and is a special case of the latter.
531
+
532
+ # B. Examples of Distinct State Distributions
533
+
534
+ We claim in the main paper that previous assumption of similar state distributions under distribution shift will not hold in many scenarios. Apart from the motivating example of lava world in Sec. 3.1, we demonstrate more examples in the MetaDrive (Li et al., 2023) and the fall-guys like game environment. Examples of MetaDrive environments with different traffic densities are shown in Fig. 5. The dynamics shift lies in that the ego vehicle will have different probabilities to detect other vehicles nearby. In environments with low traffic densities, there is enough space for some vehicles with optimal policies to drive in high speeds. But in environments packed with surrounding vehicles, fast driving will surely lead to collisions. So the vehicles can only drive in low speeds. As the vehicle speed is included in the agent's state space, difference in traffic densities will lead to distinct optimal state distributions.
535
+
536
+ Visualizations of the fall-guys like game environment used in Sec. 4.3 are shown in Fig. 7, where map components including the conveyor belt speed, the balloon reaction, the floor reaction, and the hammer distance will work together, giving rise to dynamics shift. Taking the variation of hammer distance (Fig. 7 (d)) as an example, in the left environment the optimal trajectory will contain states where the hammer is near the agent. But in the right environment, there are trajectories that keep the hammer far away to avoid being hit out of the playground. Blindly imitating optimal states collected in the left environment will lead to suboptimal performance in the right environment.
537
+
538
+ # C. Experiment Details
539
+
540
+ # C.1. Baseline Algorithms
541
+
542
+ In experiments with four different tasks, we compare ASOR with the following baseline algorithms:
543
+
544
+ - PPO (Schulman et al., 2017): The widely used, off-the-shelf online RL algorithm with on-policy policy update.
545
+ - SAC (Haarnoja et al., 2018): The widely used off-policy RL algorithm with entropy maximization for better exploration.
546
+ - BCO (Torabi et al., 2018a): Learn a agent-specific inverse dynamics model to infer the experts' missing action information.
547
+ - GAIfO (Torabi et al., 2018b): A state-only version of the GAIL algorithm.
548
+ - GARAT (Desai et al., 2020): Use the action transformer trained with GAIL-like imitation learning to recover the experts' next states in the original environment.
549
+
550
+ ![](images/7c599d0fe465292f7cbc31c3a1bbd7b424450d177c8adb9ad9bf002ab6141bb4.jpg)
551
+ (a) Training Steps PPO PPO+SRPO SOIL
552
+
553
+ ![](images/e90a4ffc043629de039a313f3a1632d278e645307b14e3f86ec94c3d2efe63c1.jpg)
554
+ (b) Lava Row PPO+ASOR (Ours)
555
+ Figure 6. Results in the Minigrid environment. (a) Performance comparison between PPO+ASOR and baseline algorithms. (b) The average reward on the environment with different position of the second lava row. PPO and PPO+SRPO has very low rewards when the bottom lava is on row 5; (c) The state uncertainty estimated by ASOR on different rows of the lava environment.
556
+
557
+ ![](images/7ed3bcecb1cb70b4088f3eee9ff93dde3d3c755c8d2341a316f344abeca4d820.jpg)
558
+ (c)Row Column 2 Column 6
559
+
560
+ - SOIL (Gangwani & Peng, 2020): An algorithm combining state-only imitation learning with policy gradients. The overall gradient consists of a policy gradient term and an auxiliary imitation term.
561
+ - CQL (Kumar et al., 2020): The widely used offline RL algorithm with conservative Q-learning.
562
+ - MOPO (Yu et al., 2020): A model-based offline RL algorithm subtracting disagreements in next-state prediction from environment rewards.
563
+ - MAPLE (Chen et al., 2021): The offline RL algorithm based on MOPO with an additional context encoder module for cross-dynamics policy adaptation.
564
+ - OSI (Yu et al., 2017): An algorithm using context encoders for online system identification.
565
+ - CaDM (Lee et al., 2020): The online RL algorithm with context encoders for cross-dynamics policy adaptation.
566
+ DARA (Liu et al., 2022): Make reward augmentations with importance weights between source and target dynamics.
567
+ - SRPO (Xue et al., 2023a): Make reward augmentations with the assumption of similar optimal state distributions under dynamics shift.
568
+
569
+ # C.2. Results in Minigrid Environment
570
+
571
+ For experiments in the Minigrid environment (Chevalier-Boisvert et al., 2023), the row number of the bottom lava is randomly sampled from $\{2,3,4,5\}$ , leading to dynamics shift. By including lava indicator as part of the state input, the policy is fully aware of environment dynamics changes and the need of context encoders (Luo et al., 2022; Lee et al., 2020) is excluded. The categorical action space includes moving towards four directions. The reward function for each environment step is -0.02 and reaching the green goal grid will lead to an additional reward of 1. The episode terminates when the red lava or the green goal grid is reached. For baseline algorithms we select online RL algorithms PPO (Schulman et al., 2017) and PPO+SRPO (Xue et al., 2023a), as well as IfO algorithms SOIL (Gangwani & Peng, 2020) and GAIfO (Torabi et al., 2018b).
572
+
573
+ We demonstrate the experiment results in Fig. 6 (a). Our ASOR algorithm can increase the performance of PPO by a large margin, while SRPO can only make little improvement. This is because the optimal state distribution in different lava world environments will not be the same. SRPO will still blindly consider all relevant states for policy regularization, leading to suboptimal policies. Fig. 6 (b) demonstrates the average reward with each possible position of the bottom lava block. PPO and $\mathrm{PPO + SRPO}$ have low performance when the bottom lava block is at Row 5. They mistakenly regard grids at (5,4) and (5,5) as optimal, but ASOR will recognize these grids as non-accessible states. We also demonstrate in Fig. 6 (c) the disagreement in next state predictions used to compute pseudo count. States far from the starting point have higher prediction disagreements and lower pseudo counts.
574
+
575
+ ![](images/fa70614cb033365f64e54b487e7cf61c3ed10f6d915f99b1da362f3ffce1bf26.jpg)
576
+ (a) Conveyor Belt Speed
577
+
578
+ ![](images/969c8e2fe0229a6d8bb29f15b0db6790a09a95101baa1dd0fc5a26639fb9ab31.jpg)
579
+
580
+ ![](images/9c0ebd698f796c1115c2ff8f6a60f785c2e2a984a00c09a48df423d21afd914d.jpg)
581
+ (b) Balloon Reaction
582
+
583
+ ![](images/c2aa6220a237942c0174cc770b09e972ccd11f086ab1a7b1f23d565a20a4fb21.jpg)
584
+
585
+ ![](images/9013bda7c3e8d2af51f077000992a8cd87303109aac2877a7766e107fdf3e12d.jpg)
586
+ (c) Floor Reaction
587
+
588
+ ![](images/314078c92ca2edc3e67dcfcc9352b0a8052dd0a93cff3b7b4ea12edd6c4ad072.jpg)
589
+ Figure 7. More demonstrations of dynamics shifts in fall guys-like game. Colors and textures are only for visual enhancement and are not part of the agent's observations.
590
+
591
+ ![](images/1c1c9db92d49ffb5765cf1681409c84e3e8975f335afb710149634676608c1b7.jpg)
592
+ (d) Hammer Distance
593
+
594
+ ![](images/d807dc71fee836f9556c9d8a250fe78d4de71112f042a122d74a2cf5bda60a8c.jpg)
595
+
596
+ # C.3. Additional Setup of the Fall-guys Like Game Environment
597
+
598
+ Additional Environment Demonstrations Next, we present additional examples of dynamic shifts within the fall-guys like game environment to demonstrate the diverse and variable nature of in-game elements. As shown in Fig. 7, the game environment features a range of dynamic shifts which contribute to the complexity and unpredictability of the gameplay. Specifically, we observe the following scenarios: Fig. 7 (a): The speed of conveyor belts changes across different game settings, leading to varied transitions in the agent's position and momentum when it steps onto these belts. Fig. 7 (b): Balloons exhibit different reactions upon interaction with the agent. This variation can significantly affect the agent's subsequent trajectory. Fig. 7 (c): The behavior of floors under the agent's influence varies significantly. Some floors may collapse, disappear, or shift unexpectedly, introducing further complexity to the environment. Fig. 7 (d): The distance and direction in which the agent is ejected when struck by hammers can vary widely. This variability depends on the unpredictable environmental dynamic shifts, for example, the force and angle of the hammer's swing.
599
+
600
+ MDP Setup Below, we provide definitions of state space, action space, and rewards in the fall-guys like game environment.
601
+
602
+ # State space $S$ :
603
+
604
+ - Terrain Map (dim=(16 × 16 × 2) with granularities of [1.0, 2.0]): The relative terrain waypoints in the agent's surrounding area. Various granularities capture different details and perceptual ranges effectively.
605
+ - Item Map (dim=(16 × 16 × 1) with granularities of [1.0, 2.0]): Map of nearby items or objects. Multiple maps focus on different item types, with granularities for varying spatial scales.
606
+ - Target Map (dim=(16 × 16 × 1) with granularities of [1.0, 4.0, 16.0]): Map of archive points locations. Various granularities capture different details and perceptual ranges at different spatial scales.
607
+ - Goal Map (dim=(16 × 16 × 1) with granularities of [1.0, 4.0, 16.0]): Map of intermediate goal locations. Various granularities capture different details and perceptual ranges at various spatial scales.
608
+ - Agent Info (dim=32): Details about agent's own state, including position, rotation, velocity, animation state, and forward direction.
609
+
610
+ - Destination Info (dim=9): Details about the destination, including position, rotation, and size of the destination, providing crucial details for navigation and goal achievement.
611
+
612
+ # Action space $\mathcal{A}$ :
613
+
614
+ - MoveX (dim=3): Move along the X-axis. The three discrete options typically represent movement in the positive X direction, negative X direction, or no movement.
615
+ - MoveY (dim=3): Move along the Y-axis, with three discrete options for movement in the positive Y direction, negative Y direction, or no movement.
616
+ - Jump (dim=2): Represents jump behavior. Options are to initiate a jump or not.
617
+ - Sprint (dim=2): Represents sprint behavior. Options are to start sprinting or not.
618
+ - Attack (dim=2): Executes an attack. The two discrete options are to initiate an attack or not.
619
+ - UseProp (dim=2): Utilizes a prop. The two discrete options indicate whether the prop is used or not.
620
+ - UsePropDir (dim=8): Determines the direction for prop usage. The eight discrete options offer various directional choices for prop utilization.
621
+ - Idle (dim=2): Represents idle behavior. Options are to remain idle or not.
622
+
623
+ # Reward $r$ :
624
+
625
+ - Arrive Target (value=1.0): Rewards the agent for successfully reaching the archive point, with a positive reward of 1.0 upon achievement.
626
+ - Arrive Goal (value=0.3): Rewards the agent for reaching intermediate goal locations within the environment, with a positive reward of 0.3.
627
+ - Arrive Destination (value=1.0): Rewards the agent for reaching the final destination or endpoint within the environment, motivating task completion.
628
+ - Goal Distance (decay rate=0.05): Offers distance-based rewards, varying based on proximity to specific goal locations. Rewards diminish as the agent moves away from the goal, with distinct values for different distance ranges.
629
+ - Fall or Wall (value $= -1.0$ ): Penalizes the agent for continuously hitting the wall or falling off a cliff with a penalty of -1.0.
630
+ - Stay (value $= -0.01$ ): Penalizes the agent for remaining stationary for extended periods, encouraging continuous exploration and movement.
631
+ - Time (value $= -0.02$ ): Penalizes each time step, encouraging efficient decision-making and timely task completion.
632
+
633
+ Network Architecture The network architecture is structured as follows: The Terrain Map, Item Map, Target Map, and Goal Map are each fed into a convolutional neural network (CNN) with ReLU non-linearity, followed by a fully connected network (FCN). This process yields four separate 32-dimensional vector representations for each respective map. The Destination Info and Agent Info are independently input into attention layers, generating 32-dimensional vectors for each. Subsequently, all 32-dimensional vectors (from the CNNs and attention layers) are concatenated into a single feature vector. The concatenated feature vector undergoes processing by a multi-head FCN to yield various output actions. Additionally, the concatenated feature vector is processed by another FCN to produce a value as the value function estimator.
634
+
635
+ Training Setup We utilized the Ray RLlib framework (Liang et al., 2018), configuring 100 training workers and 20 evaluation workers. The batch size was set to 1024, with an initial learning rate of $1 \times 10^{-3}$ , which linearly decayed to $3 \times 10^{-4}$ over 250 steps. An entropy regularization coefficient of 0.003 was employed to ensure adequate exploration during training. The training was conducted using NVIDIA Tesla V100 GPUs and takes around 20 hours to train 6M steps.
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:129fe903d6dfd66dbb12d1bdbbcaeb42cec948bc8e08ddb6f1539a1745314dd0
3
+ size 1079597
2025/Policy Regularization on Globally Accessible States in Cross-Dynamics Reinforcement Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-Regret Minimization in Markov Games with Function Approximation/4e6cc43b-480f-422b-be58-4ce4da3841b8_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d7917328d65c5d86fe89507a2d811c963c224abb7d9aabb9b5dd9465b87fe24
3
+ size 528401
2025/Policy-Regret Minimization in Markov Games with Function Approximation/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-Regret Minimization in Markov Games with Function Approximation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbcad2a41aad9d1872d62959a663883a62f438d6ab4c942fbb9dc467bf2c1d3e
3
+ size 1219953
2025/Policy-Regret Minimization in Markov Games with Function Approximation/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/009e1b92-d8c2-4663-8ece-a051576ac695_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1141ea79743c23d516b727c0c2782049e8592d73dccac1637dd1686e2bfbe2a
3
+ size 11005007
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0023d28ecf959f52cd6cf2fb748ad7fafbd2ca43fddbeaa665328d7dad321484
3
+ size 2746330
2025/Policy-labeled Preference Learning_ Is Preference Enough for RLHF_/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/f303db19-6a4e-42d1-8344-c008d889027b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09c2a756a95495c8b51c8eb1b2ca78800ee0cf55ed5595b6eb4aba0bd5ba2011
3
+ size 2415137
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/full.md ADDED
@@ -0,0 +1,805 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Poly2Vec: Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications
2
+
3
+ Maria Despoina Siampou $^{*1}$ Jialiang Li $^{*2}$ John Krumm $^{1}$ Cyrus Shahabi $^{1}$ Hua Lu
4
+
5
+ # Abstract
6
+
7
+ Encoding geospatial objects is fundamental for geospatial artificial intelligence (GeoAI) applications, which leverage machine learning (ML) models to analyze spatial information. Common approaches transform each object into known formats, like image and text, for compatibility with ML models. However, this process often discards crucial spatial information, such as the object's position relative to the entire space, reducing downstream task effectiveness. Alternative encoding methods that preserve some spatial properties are often devised for specific data objects (e.g., point encoders), making them unsuitable for tasks that involve different data types (i.e., points, polygons, and polygons). To this end, we propose POLY2VEC, a polymorphic Fourier-based encoding approach that unifies the representation of geospatial objects, while preserving the essential spatial properties. POLY2VEC incorporates a learned fusion module that adaptively integrates the magnitude and phase of the Fourier transform for different tasks and geometries. We evaluate POLY2VEC on five diverse tasks, organized into two categories. The first empirically demonstrates that POLY2VEC consistently outperforms object-specific baselines in preserving three key spatial relationships: topology, direction, and distance. The second shows that integrating POLY2VEC into a state-of-the-art GeoAI workflow improves the performance in two popular tasks: population prediction and land use inference.
8
+
9
+ *Equal contribution. Jialiang Li's work was conducted while the author was a visiting student at USC's InfoLab. Department of Computer Science, University of Southern California, Los Angeles, USA Department of People and Technology, Roskilde University, Denmark Department of Computer Science, Aalborg University (Copenhagen campus), Denmark. Correspondence to: Maria Despoina Siampou <siampou@usc.edu>.
10
+
11
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
12
+
13
+ # 1. Introduction
14
+
15
+ The increasing availability of geospatial data from sources such as satellites, ground-based sensors, and crowdsourced platforms like OpenStreetMap (OSM)<sup>1</sup> (Lee & Kang, 2015; Jokar Arsanjani et al., 2015; Basiri et al., 2019), combined with the recent advancements in machine learning (ML) (Vaswani, 2017; Bommasani et al., 2021), has fueled significant progress in geospatial artificial intelligence (GeoAI) (Smith, 1984; Couclelis, 1986; Janowicz et al., 2020; Gao et al., 2023). GeoAI leverages ML models to analyze geospatial objects, such as points of interest (POIs), building footprints, and vehicle trajectories, thereby extracting valuable insights that enable a variety of decision-making applications, including transportation network optimization (Li et al., 2018b; Mirowski et al., 2018), urban planning (Zhang et al., 2021; Wu et al., 2022), energy management (Sun et al., 2020), and improved emergency response strategies (Kyrkou et al., 2022), to name a few.
16
+
17
+ A fundamental step in GeoAI pipelines is the transformation of geospatial data into latent representations that can be easily processed by ML models, a step formally known as encoding. A common approach to encoding converts coordinate-based geospatial data into formats compatible with established feature extraction models. Although effective for specific tasks, this conversion often discards crucial spatial information, significantly limiting the generalizability of these models. For example, building footprints are frequently rasterized into images and processed with vision-based models for urban prediction tasks (Li et al., 2023; Balsebre et al., 2024). While this approach captures object shapes, it neglects important spatial relationships, such as the relative positioning and alignment of objects within the area. Similarly, POIs that are represented as text, by using attributes like category as input to language-based models, capture semantic relationships but omit precise spatial locations (Huang et al., 2022). As a result, these approaches are application-specific and struggle to generalize across tasks that require a deeper understanding of spatial relationships.
18
+
19
+ To address the aforementioned limitations, spatially explicit encoding techniques have been proposed. These methods
20
+
21
+ ![](images/4e2782fca75966d61f4628b442d2d76b2971578f527bf58bf1f6c0460dbaa6b6.jpg)
22
+ Figure 1: Visualization of the Fourier transform magnitude and phase of (a) road segment, (b) building, and (c) POI.
23
+
24
+ preserve crucial spatial properties, while remaining compatible with downstream ML models. For instance, THEORY (Mai et al., 2020) encodes the absolute positions of POIs using sinusoidal functions with varying frequencies. Xu et al. (2018) directly encodes the coordinates of trajectories using multi-layer perceptrons and feeds it to a GRU, capturing their sequential nature. For polygons, NUFT-SPEC (Mai et al., 2023) maps geometries into the spectral domain, effectively preserving key polygon properties such as topology awareness. However, the design of these methods inherently limits their applicability, as they only capture the properties of the specific geospatial object they are devised for. This restricts their generalizability in tasks involving mixed geospatial object types, such as land use classification, where integrating points (e.g., POIs) and polygons (e.g., buildings) requires simultaneously preserving their spatial properties as well as relationships between them.
25
+
26
+ In this work, we introduce POLY2VEC $^2$ , a polymorphic encoding framework that unifies the representation of 2D geospatial objects, including points, polylines, and polygons. At its core, POLY2VEC leverages the Fourier transform to encode essential spatial properties, transforming the input geometries $^3$ into the frequency domain. Given that this transformation results in complex-valued features, the magnitude and phase components are extracted. As shown in Figure 1, these components complement each other: the magnitude reflects spatial extent, being uniform for points with no shape and varying for polygons and polylines, while the phase highlights directionality, such as the alignment of a polyline. To combine these components into a single representation, POLY2VEC incorporates a learned fusion module that adaptively balances their contributions based on the task and geometry type, producing a real-valued geometry embedding that ensures compatibility with ML models.
27
+
28
+ We formally define four key properties, shape preservation, direction preservation, distance preservation, and task flexibility, as essential criteria for evaluating the effectiveness of geometry encoding. These properties ensure the produced embeddings accurately capture the essential geometry characteristics while remaining versatile across different tasks. To demonstrate that POLY2VEC preserves these properties, we conduct a two-part evaluation. First, we evaluate POLY2VEC on spatial reasoning tasks, showing that it outperforms the state-of-the-art specialized baselines by up to $17\%$ for topological classification, $26\%$ for directional classification, and $75\%$ for distance estimation. Second, we show that integrating POLY2VEC into a state-of-the-art GeoAI workflow reduces prediction error by $14\%$ and $5\%$ in population prediction and land use inference.
29
+
30
+ In summary, our contributions are:
31
+
32
+ - We introduce POLY2VEC, the first encoding framework that unifies the representation of various 2D geometries.
33
+ - We propose a 2D continuous Fourier transform-based encoding approach to capture crucial spatial properties, including shape, distance, and direction.
34
+ - We design a learned fusion strategy to adaptively combine Fourier magnitude and phase for diverse objects and tasks.
35
+ - Our experiments show that POLY2VEC preserves crucial geometry encoding properties, demonstrating its versatility in handling diverse geospatial objects, and task-flexibility when integrated into state-of-the-art GeoAI pipelines.
36
+
37
+ # 2. Preliminaries
38
+
39
+ # 2.1. Problem Formulation
40
+
41
+ Definition 1 (Geospatial Object). A geospatial object $g \in \mathbb{R}^2$ is represented by an array $P \in \mathbb{R}^{N \times 2}$ , where each row is a point $(x, y)$ , and $N$ is the total number of points. The type of geometry (e.g., point, polyline, or polygon) is determined by the organization and relationships among these points.
42
+
43
+ Polymorphic Encoding of Geospatial Objects. Given a dataset of geospatial objects $G = \{g\} \in \mathbb{R}^{N\times 2}$ , the goal is to define an encoding function $e_{\theta}(g):\mathbb{R}^{N\times 2}\to \mathbb{R}^d$ , parameterized by $\theta$ , that maps each geometry $g$ to a $d$ -dimensional vector $\mathbf{v}$ , termed as geometry embedding. The embedding dimension $d$ remains constant across different geometry types, making $e_{\theta}$ polymorphic. The encoding is intended to capture the following key properties.
44
+
45
+ Property 1 (Shape Preservation). For any geometry $g \in G$ , its embedding $\mathbf{v}$ , should capture its structural characteristics: shape and boundary for polygons, length for polylines, and the lack of spatial extent for points.
46
+
47
+ Property 2 (Direction Preservation). For any geometries $g_i, g_j \in G$ , $e_\theta$ should ensure their embeddings $\mathbf{v}_i, \mathbf{v}_j$ reflect their relative orientation.
48
+
49
+ Property 3 (Distance Preservation). For any geometries
50
+
51
+ ![](images/30ee5311c6f174784927a7a7927ffbc5fee5123b677375cf05cc9b4ab0478f9a.jpg)
52
+ Figure 2: Overview of POLY2VEC.
53
+
54
+ $g_{i}, g_{j} \in G$ , the similarity of their embeddings $\mathbf{v}_{i}, \mathbf{v}_{j}$ should monotonically decrease as their spatial distance $\|g_{i} - g_{j}\|$ increases, and vice versa.
55
+
56
+ Property 4 (Task Flexibility). The encoder $e_{\theta}$ should facilitate multiple tasks without requiring modifications.
57
+
58
+ Properties 1-3 ensure that $\mathbf{v}$ captures all essential spatial information, while Property 4 guarantees flexibility for use across GeoAI models. Section 4 empirically demonstrates that our proposed $e_{\theta}$ satisfies these properties.
59
+
60
+ # 2.2. 2D Continuous Fourier Transform Properties
61
+
62
+ A key component of our encoding approach is the computation of the 2D continuous Fourier transform (CFT) ${}^{4}$ . For a given 2D function $f(x,y)$ , its Fourier transform is denoted as $\mathcal{F}\{f(x,y)\} = F(u,v)^5$ and is formally defined as:
63
+
64
+ $$
65
+ F (u, v) = \int_ {- \infty} ^ {\infty} \int_ {- \infty} ^ {\infty} f (x, y) e ^ {- j 2 \pi (u x + v y)} d x d y \tag {1}
66
+ $$
67
+
68
+ where $j = \sqrt{-1}$ and $u, v$ are the frequency samples.
69
+
70
+ We now summarize Fourier transform properties relevant to our approach following (Gaskill, 1978).
71
+
72
+ Linearity. The Fourier transform of a sum of functions denoted as $f_{i}(x,y)$ , is the sum of their corresponding Fourier transforms $F_{i}(u,v)$ :
73
+
74
+ $$
75
+ \mathscr {F} \left\{\sum_ {i = 1} ^ {n} a _ {i} f _ {i} (x, y) \right\} = \sum_ {i = 1} ^ {n} a _ {i} F _ {i} (u, v), \quad a _ {i} \in \mathbb {C} \tag {2}
76
+ $$
77
+
78
+ Affine Transformation. For an affine-transformed function $f(\mathbf{A}\mathbf{x} + \boldsymbol{\tau})$ , where $\mathbf{x} = [x,y]^{\top}$ , its Fourier transform is:
79
+
80
+ $$
81
+ \mathcal {F} \left\{f (\mathbf {A x} + \boldsymbol {\tau}) \right\} = \frac {1}{| \det (\mathbf {A}) |} e ^ {- j 2 \pi \boldsymbol {\tau} ^ {\top} \mathbf {A} ^ {- \top} \mathbf {u}} F \left(\mathbf {A} ^ {- \top} \mathbf {u}\right) \tag {3}
82
+ $$
83
+
84
+ where $\mathbf{u} = [u,v]^{\top}$ , $\mathbf{A} \in \mathbb{R}^{2 \times 2}$ is the affine matrix, and $\pmb{\tau} \in \mathbb{R}^2$ is the translation vector.
85
+
86
+ Hermitian Symmetry. For real-valued functions $f(x,y)$ , $F(u,v)$ satisfies $F(u,v) = F^{*}(-u, - v)$ , where $F^{*}(u,v)$ denotes the complex conjugate.
87
+
88
+ Magnitude and Phase. The Fourier Transform $F(u,v)$ is a complex-valued function composed of a real part, $\operatorname{Re}(F(u,v))$ , and an imaginary part, $\operatorname{Im}(F(u,v))$ . The magnitude $z(u,v)$ and phase $\phi(u,v)$ are defined as:
89
+
90
+ $$
91
+ z (u, v) = \sqrt {\operatorname {R e} (F (u , v)) ^ {2} + \operatorname {I m} (F (u , v)) ^ {2}} \tag {4}
92
+ $$
93
+
94
+ $$
95
+ \phi (u, v) = \operatorname {a t a n 2} (\operatorname {I m} (F (u, v)), \operatorname {R e} (F (u, v))) \tag {5}
96
+ $$
97
+
98
+ # 3. Methodology
99
+
100
+ Figure 2 illustrates our proposed POLY2VEC, which uniformly encodes arbitrary geospatial objects for GeoAI applications. We first describe how the Fourier transform is derived for each geometry type, and then outline the learned fusion module for deriving the final geometry embeddings.
101
+
102
+ # 3.1. 2D Continious Fourier Transform of Geometries
103
+
104
+ # 3.1.1. FOURIER TRANSFORM OF A POINT
105
+
106
+ A point $p = (x_p, y_p) \in \mathbb{R}^2$ is modeled as a 2D Dirac delta function, which represents the point as a distribution concentrated entirely at $(x_p, y_p)$ , and can be expressed as:
107
+
108
+ $$
109
+ f _ {p} (x, y) = \delta \left(x - x _ {p}, y - y _ {p}\right) \tag {6}
110
+ $$
111
+
112
+ To that extent, the Fourier transform of $f_{p}(x,y)$ is given by:
113
+
114
+ $$
115
+ F _ {p} (u, v) = e ^ {- j 2 \pi \left(x _ {p} u + y _ {p} v\right)} \tag {7}
116
+ $$
117
+
118
+ where $(u,v)$ are the frequency components.
119
+
120
+ The Fourier transform magnitude for any point is constant, $z_{p}(u,v) = 1$ , while the phase $\phi_p(u,v)$ encodes its location.
121
+
122
+ As shown in Figure 2, deriving the Fourier transform for polylines and polygons involves additional steps. Polylines are divided into line segments, and polygons are triangulated into non-overlapping triangles. The Fourier transform is
123
+
124
+ computed for each component by affine transforming them to their canonical geometry, and the linearity property of Eq. (2) is used to compute the Fourier transform of the original geometry<sup>6</sup>. Details for polylines and polygons are specified below, with derivation details in Appendix A.2.
125
+
126
+ # 3.1.2. FOURIER TRANSFORM OF A POLYLINE
127
+
128
+ We begin by deriving the Fourier transform of a canonical line segment and then generalize to any arbitrary line segments. Consider the canonical line segment $l_{c}$ , which extends from $\mathbf{a} = (-\frac{1}{2},0)$ to $\mathbf{b} = (\frac{1}{2},0)$ in $\mathbb{R}^2$ , as shown in Figure 2b. Then, $l_{c}$ can be represented as:
129
+
130
+ $$
131
+ f _ {l _ {c}} (x, y) = \operatorname {r e c t} (x) \delta (y) \tag {8}
132
+ $$
133
+
134
+ where $\delta(y)$ represents a Dirac delta function ridge along the $x$ -axis, and $\operatorname{rect}(x)$ restricts the ridge to the interval $|x| \leq \frac{1}{2}$ .
135
+
136
+ The Fourier transform of $f_{l_c}(x,y)$ is given by:
137
+
138
+ $$
139
+ F _ {l _ {c}} (u, v) = \operatorname {s i n c} (u) \tag {9}
140
+ $$
141
+
142
+ Now consider an arbitrary line segment $l$ with endpoints $\mathbf{q} = (x_q, y_q)$ and $\mathbf{r} = (x_r, y_r)$ . To compute the Fourier transform of $l$ , we map it to the canonical line segment $l_c$ , using the affine transformation property. To compute this, we first introduce an auxiliary point $\mathbf{c} = \left(\frac{1}{2}, 1\right)$ to the structure of $l_c$ so that it is not colinear with $\mathbf{ab}$ . This point maps to another auxiliary point $\mathbf{s}$ introduced in the structure of the arbitrary line segment $l$ . The auxiliary point $\mathbf{s}$ is defined as $\mathbf{s} = \mathbf{r} + \mathbf{n}$ , where $\mathbf{n} = (y_q - y_r, x_r - x_q)^\top$ , representing a $90^\circ$ clockwise rotation of the vector $\mathbf{r} - \mathbf{q}$ . Note that the line segments $\mathbf{qr}$ and $\mathbf{rs}$ have the same length.
143
+
144
+ Given the points $\mathbf{q},\mathbf{r},\mathbf{s}$ and $\mathbf{a},\mathbf{b},\mathbf{c}$ we then construct the affine transformation matrix $\mathbf{A} = [\mathbf{a}\mathbf{b}\mathbf{c}][\mathbf{q}\mathbf{r}\mathbf{s}]^{-1}$ . By applying Eq. (3), the Fourier transform of an arbitrary line segment $l$ , with endpoints $\mathbf{q},\mathbf{r}$ , is expressed as:
145
+
146
+ $$
147
+ \begin{array}{l} F _ {l} (u, v) = \frac {1}{| \det (A) |} e ^ {- j 2 \pi \boldsymbol {\tau} ^ {\top} \mathbf {A} ^ {- \top} \mathbf {u}} F _ {l _ {c}} (\mathbf {A} ^ {- \top} \mathbf {u}) \\ = \left\| \mathbf {q} - \mathbf {r} \right\| ^ {2} e ^ {- j 2 \pi \left(\frac {\mathbf {q} + \mathbf {r}}{2}\right) \mathbf {u}} \operatorname {s i n c} \left(\mathbf {u} ^ {\top} (\mathbf {r} - \mathbf {q})\right) \tag {10} \\ \end{array}
148
+ $$
149
+
150
+ At $(u,v) = (0,0)$ , the Fourier transform is $F_{l}(0,0) = \| \mathbf{q} - \mathbf{r}\|^{2}$ , the squared length of the line segment.
151
+
152
+ Finally, following Eq. (2), the Fourier transform of an arbitrary polyline $pl$ is computed as:
153
+
154
+ $$
155
+ F _ {p l} (u, v) = \sum_ {i = 1} ^ {T _ {l}} F _ {l _ {i}} (u, v) \tag {11}
156
+ $$
157
+
158
+ where $F_{l_i}(u,v)$ is the Fourier transform of the $i$ -th line segment and $T_l$ is the total number of line segments.
159
+
160
+ # 3.1.3. FOURIER TRANSFORM OF A POLYGON
161
+
162
+ To compute the Fourier transform of a polygon we decompose it into a set of non-overlapping triangles using standard triangulation techniques. We thus begin with the Fourier transform of a canonical isosceles right triangle and then generalize to its computation for arbitrary triangles.
163
+
164
+ Consider the canonical isosceles right triangle $\Delta_{c}$ with vertices $\mathbf{a} = (0,0)$ , $\mathbf{b} = (1,0)$ , and $\mathbf{c} = (1,1)$ , represented as:
165
+
166
+ $$
167
+ f _ {\Delta_ {c}} (x, y) = \left\{ \begin{array}{l l} 1, & \text {i f} 0 \leq x \leq 1 \text {a n d} 0 \leq y \leq x, \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {12}
168
+ $$
169
+
170
+ The Fourier transform of $f_{\Delta_z}(x,y)$ is then given by:
171
+
172
+ $$
173
+ \begin{array}{l} F _ {\Delta_ {c}} (u, v) = \int_ {0} ^ {1} \int_ {0} ^ {x} e ^ {- j 2 \pi (u x + v y)} d y d x \\ = \frac {1}{4 \pi^ {2} u v (u + v)} \left[ \left((u + v) \cos (2 \pi u) \right. \right. \\ - u \cos (2 \pi (u + v)) - v) - j ((u + v) \sin (2 \pi u) \\ \left. - u \sin (2 \pi (u + v))\right) \tag {13} \\ \end{array}
174
+ $$
175
+
176
+ Next, we compute the Fourier Transform of an arbitrary triangle $\Delta$ , with vertices $\mathbf{q} = (x_q, y_q)$ , $\mathbf{r} = (x_r, y_r)$ , and $\mathbf{s} = (x_s, y_s)$ , by mapping it to the canonical triangle using the affine transformation property (Figure 2b). The affine transformation matrix is defined as $\mathbf{A} = [\mathbf{a} \mathbf{b} \mathbf{c}][\mathbf{q} \mathbf{r} \mathbf{s}]^{-1}$ .
177
+
178
+ By substituting the vertices of $\Delta$ into $\mathbf{A}$ and applying Eq. (3), the Fourier Transform of the triangle $F_{\Delta}(u,v)$ can be calculated. In this computation, the determinant of $\mathbf{A}$ , $|\operatorname*{det}(\mathbf{A})| = \frac{1}{2\alpha}$ , where $\alpha$ is the area of the triangle $\Delta$ .
179
+
180
+ Finally, the Fourier transform of an arbitrary polygon $pg$ , given the linearity property of Eq. (2), can be computed as:
181
+
182
+ $$
183
+ F _ {p g} (u, v) = \sum_ {i = 1} ^ {T _ {p g}} F _ {\Delta_ {i}} (u, v) \tag {14}
184
+ $$
185
+
186
+ where $F_{\Delta_i}(u,v)$ is the Fourier transform of the $i$ -th triangle, and $T_{pg}$ is the total number of extracted triangles.
187
+
188
+ Building on the Fourier transform computation described earlier, we can now extract the frequency representation of a given geometry $g$ , expressed as a spatial function $f_{g}(x,y)$ over $\mathbb{R}^2$ as, $\mathbf{F}_g = [\mathbf{F}_1,\mathbf{F}_2,\dots ,\mathbf{F}_W]^\top \in \mathbb{C}^W$ , where $W$ is the number of frequency components, and $\mathbf{F}_i = F(u_i,v_i)$ represents the value of the Fourier transform evaluated at the specific frequency coordinates $(u_i,v_i)$ .
189
+
190
+ To sample the frequency components, we employ a geometric series sampling strategy (Mai et al., 2023), which balances low and high-frequency components to capture both global and local details. We also experimented with learned frequency sampling but found that the two strategies produced nearly identical results. Detailed comparisons are presented in Appendix A.3.2.
191
+
192
+ # 3.2. Learned Fusion of Fourier Transform Features
193
+
194
+ Given that $\mathbf{F}_g$ consists of complex values, we decompose it in two real-valued vectors of the magnitude $\mathbf{z}$ and the phase $\phi$ , computed as in Eqs. (4) and (5), respectively. This transformation ensures the representation is compatible with downstream ML models, which typically operate on real-valued inputs. Furthermore, the magnitude $\mathbf{z}$ captures the intensity of contributions at different frequencies, reflecting the geometry's size and overall shape, while the phase $\phi$ encodes positional and orientational information of the geometry's features (Zahn & Roskies, 1972).
195
+
196
+ While the final geometry embedding can be created by simply concatenating $\mathbf{z}$ and $\phi$ , their relative importance should vary with the geometry type and the downstream task. For instance, the magnitude of points is always 1, whereas it encodes the shape and size of polygons. Therefore, when encoding points, the phase should contribute more than the magnitude in the representation. To this end, POLY2VEC adaptively learns the importance of magnitude and phase through two separate transformations $\mathbf{z}^{*} = \mathbf{h}_{z}(\mathbf{z})$ and $\phi^{*} = \mathbf{h}_{\phi}(\phi)$ , where $\mathbf{h}_{z}\colon \mathbb{R}^{W}\to \mathbb{R}^{W}$ and $\mathbf{h}_{\phi}\colon \mathbb{R}^{W}\to \mathbb{R}^{W}$ are separate MLPs for $\mathbf{z}$ and $\phi$ respectively.
197
+
198
+ Finally, the transformed vectors $\mathbf{z}^{*}\in \mathbb{R}^{W}$ and $\phi^{*}\in$ $\mathbb{R}^W$ are concatenated and passed through a final MLP $\mathbf{h}:\mathbb{R}^{W}\to \mathbb{R}^{d}$ to produce the final geometry embedding $\mathbf{v} = \mathbf{h}([\mathbf{z}^{*};\boldsymbol{\phi}^{*}])\in \mathbb{R}^{d}$ , which can be inputted to any machine learning model $M$ , such that $M(\mathbf{v})\rightarrow \mathbf{y}$ , where $\mathbf{y}$ represents task-specific outputs. We will empirically verify that $\mathbf{v}$ preserves the key properties in Section 4.
199
+
200
+ # 4. Experiments
201
+
202
+ In this section, we conduct experiments to evaluate the effectiveness of POLY2VEC across four key research questions: [RQ1] Does POLY2VEC effectively preserve the critical geometric properties of shape, direction, and distance?
203
+
204
+ [RQ2] How does POLY2VEC perform in comparison to baseline encoding methods tailored for specific object types?
205
+
206
+ [RQ3] Can integrating POLY2VEC into existing workflows lead to improvements in their performance?
207
+
208
+ [RQ4] Does learned fusion boost POLY2VEC performance?
209
+
210
+ # 4.1. Spatial Reasoning Tasks
211
+
212
+ This section addresses RQ1 and RQ2, empirically evaluating POLY2VEC's ability to preserve the properties of Section 2.1, against specialized baselines. We frame these evaluations as spatial reasoning tasks, which are fundamental to broader applications like geospatial question answering (GeoQA), and require accurate spatial understanding (Punjani et al., 2018; Papamichalopoulos et al., 2024).
213
+
214
+ Datasets. We evaluate our approach on two OpenStreetMap (OSM) datasets from Singapore and New York. Each dataset includes three types of geospatial objects: POIs (represented as points), main roads (as polylines), and buildings (as polygons). All input geometry coordinates are normalized to the range $[-1, 1] \times [-1, 1]$ . Additional dataset statistics and preprocessing details are provided in Appendix A.4.
215
+
216
+ Baselines. We include three categories of baselines: point encoders: (i) DIRECT, directly utilizing coordinates (Chu et al., 2019), (ii) TILE, a discretization method (Berg et al., 2014), (iii) WRAP, a coordinate wrapping mechanism (Mac Aodha et al., 2019), (iv) GRID, inspired by position encoding (Mai et al., 2020), and (v) THEORY, a multiscale encoder (Mai et al., 2020). All point encoders are extended to other geometries handling them as sequences of points, following Rao et al. (2020); Xu et al. (2018). polyline encoder: (i) T2VEC a classic trajectory encoder (Li et al., 2018a). polygon encoders: (i) RESNET1D (Mai et al., 2023) and (ii) NUFTSPEC (Mai et al., 2023). More details on baselines can be found in Appendix A.5.
217
+
218
+ # 4.1.1. TOPOLOGICAL RELATIONSHIP CLASSIFICATION
219
+
220
+ This task classifies topological relationships defined by the DE-9IM model (Clementini et al., 1993) for geospatial object pairs. We present the supported relationships in Table 3.
221
+
222
+ Settings. The geometry embeddings of each pair are concatenated, passed through a 2-layer MLP with $N_C$ output units, , corresponding to the number of relationships. We adopt cross-entropy loss for optimization. Performance is measured by accuracy, precision, recall, and F1-score. Accuracy results are presented in Table 1, while the remaining metrics are presented in Appendix A.10.
223
+
224
+ Results. From Table 1, we observe that POLY2VEC consistently outperforms all baselines across all experiments. Unlike specialized encoders that excel only for specific pairs, POLY2VEC's performance is consistent across all geometries, highlighting its versatility and generalization capabilities. The second-best performing models vary by geometry type, with T2VEC for polylines and NUFTSPEC for polygons. This shows that simply extending point encoders to handle all geospatial objects is not adequate, as it fails to preserve characteristics like the object's shape and position, leading to decreased performance. Finally, all mod
225
+
226
+ Table 1: Model accuracy on topological relationship classification. Best and second best are highlighted.
227
+
228
+ <table><tr><td rowspan="2">Methods</td><td colspan="5">Singapore</td><td colspan="5">New York</td></tr><tr><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td></tr><tr><td>RESNET1D</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.4570.017</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.4520.033</td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.6020.009</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5850.008</td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>0.7280.023</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8070.121</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8230.013</td><td>0.8430.005</td><td>0.7330.007</td><td>0.3680.010</td><td>0.3570.018</td><td>0.8460.011</td><td>0.9090.018</td><td>0.7450.008</td><td>0.4950.009</td><td>0.4460.023</td></tr><tr><td>TILE</td><td>0.7900.021</td><td>0.7000.010</td><td>0.5050.005</td><td>0.4590.013</td><td>0.4110.009</td><td>0.6590.013</td><td>0.7830.007</td><td>0.5020.009</td><td>0.4940.038</td><td>0.4050.005</td></tr><tr><td>WRAP</td><td>0.8860.003</td><td>0.8800.008</td><td>0.7160.011</td><td>0.4760.010</td><td>0.3490.004</td><td>0.8860.006</td><td>0.8800.017</td><td>0.7330.009</td><td>0.5500.011</td><td>0.3810.007</td></tr><tr><td>GRID</td><td>0.8460.004</td><td>0.8440.004</td><td>0.6970.031</td><td>0.4580.004</td><td>0.3350.012</td><td>0.8220.039</td><td>0.8910.004</td><td>0.7390.009</td><td>0.5160.008</td><td>0.3810.031</td></tr><tr><td>THEORY</td><td>0.8920.003</td><td>0.9000.005</td><td>0.7190.008</td><td>0.4500.010</td><td>0.4610.041</td><td>0.8970.008</td><td>0.9090.008</td><td>0.7340.008</td><td>0.5910.006</td><td>0.4550.041</td></tr><tr><td>POLY2VEC</td><td>0.9550.007</td><td>0.9490.002</td><td>0.8120.010</td><td>0.5090.008</td><td>0.7020.006</td><td>0.9530.003</td><td>0.9800.002</td><td>0.8300.004</td><td>0.6410.062</td><td>0.6840.008</td></tr></table>
229
+
230
+ Table 2: Model accuracy on directional relationship classification. Best and second best are highlighted.
231
+
232
+ <table><tr><td rowspan="2">Methods</td><td colspan="6">Singapore</td><td colspan="6">New York</td></tr><tr><td>point-point</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td><td>point-point</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td></tr><tr><td>RESNET1D</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8190.010</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7470.010</td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8070.008</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.6980.017</td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>-</td><td>0.2680.075</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.2490.032</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8800.006</td><td>0.8410.007</td><td>0.8440.006</td><td>0.8200.002</td><td>0.8300.005</td><td>0.7520.017</td><td>0.8770.004</td><td>0.7660.005</td><td>0.8360.008</td><td>0.6530.007</td><td>0.7840.004</td><td>0.6940.004</td></tr><tr><td>TILE</td><td>0.2530.001</td><td>0.2680.002</td><td>0.2730.008</td><td>0.3260.010</td><td>0.4540.001</td><td>0.3940.003</td><td>0.2450.009</td><td>0.2580.005</td><td>0.3160.005</td><td>0.2170.001</td><td>0.4660.001</td><td>0.3490.012</td></tr><tr><td>WRAP</td><td>0.8610.018</td><td>0.8040.009</td><td>0.8030.004</td><td>0.7810.002</td><td>0.8310.002</td><td>0.7780.001</td><td>0.8090.004</td><td>0.6690.001</td><td>0.7490.018</td><td>0.5960.019</td><td>0.7720.002</td><td>0.6020.006</td></tr><tr><td>GRID</td><td>0.8820.007</td><td>0.7280.007</td><td>0.7710.003</td><td>0.6990.001</td><td>0.6410.016</td><td>0.5340.138</td><td>0.8680.002</td><td>0.5900.003</td><td>0.6460.049</td><td>0.4380.004</td><td>0.7520.001</td><td>0.4850.079</td></tr><tr><td>THEORY</td><td>0.9120.014</td><td>0.8670.009</td><td>0.8580.004</td><td>0.8340.012</td><td>0.8600.006</td><td>0.7350.044</td><td>0.8920.017</td><td>0.7600.007</td><td>0.8260.008</td><td>0.6840.009</td><td>0.7750.005</td><td>0.5550.012</td></tr><tr><td>POLY2VEC</td><td>0.9320.006</td><td>0.9350.032</td><td>0.9250.002</td><td>0.9060.010</td><td>0.9070.007</td><td>0.8330.006</td><td>0.9090.012</td><td>0.8910.004</td><td>0.8830.013</td><td>0.8630.007</td><td>0.8760.009</td><td>0.7850.003</td></tr></table>
233
+
234
+ Table 3: Topological relationships of geometry pairs.
235
+
236
+ <table><tr><td>Geometry Pair</td><td>Topological Relationships (a relationship b)</td></tr><tr><td>point-polyline</td><td>disjoint, intersects</td></tr><tr><td>point-polygon</td><td>disjoint, contains</td></tr><tr><td>polyline-polyline</td><td>disjoint, intersects</td></tr><tr><td>polyline-polygon</td><td>disjoint, touches, intersects, within</td></tr><tr><td>polygon-polygon</td><td>disjoint, touches, intersects, contains, within, equals</td></tr></table>
237
+
238
+ els perform better when detecting relationship is a binary classification (e.g., point-polyline in Table 3), compared to multi-classification (e.g., polygon-polygon in Table 3). This is expected, as the latter requires capturing fine-grained spatial nuances, posing greater difficulty. In summary, these results emphasize the importance of preserving shape (Property 1), and distance (Property 3) in geometry embeddings. POLY2VEC's ability to do so, along with its unified framework, enables it to consistently outperform baselines.
239
+
240
+ # 4.1.2. DIRECTIONAL RELATIONSHIP CLASSIFICATION
241
+
242
+ This task classifies the directional relationships defined by the 16-compass direction model of two geospatial objects.
243
+
244
+ Settings. We follow the same setting as in Section 4.1.1, with $N_{c} = 16$ , and report the same metrics. Accuracy results are in Table 2, with the rest in Appendix A.11.
245
+
246
+ Results. From Table 2, we observe that POLY2VEC consistently outperforms all baselines across all experiments. This demonstrates its ability to effectively preserve the direction (Property 2) among diverse geometry types. While polygon encoders outperform the extended point encoders also in this task, T2VEC underperforms. This is due to T2VEC's strategy of assigning coordinates to grid cells during encoding, which is effective for trajectory-related tasks, but introduces discretization artifacts that affect angular relationships. A similar limitation is observed in the performance of TILE, which also relies on discretizing points into grid cells. In contrast, POLY2VEC encodes geometries holistically, preserving their relative orientation and avoiding these pitfalls.
247
+
248
+ # 4.1.3. DISTANCE ESTIMATION
249
+
250
+ This task evaluates whether geometry embeddings preserve pairwise distances (Property 3).
251
+
252
+ Settings. The original distance is estimated by the Euclidean distance of the geometry embeddings. The mean squared
253
+
254
+ ![](images/9a06e8b4bbad735530e4fcb418e06f52407f6d325707f2b80c065f2878d1ab8e.jpg)
255
+ Figure 3: Distance scatter plots of point-polygon pairs on Singapore dataset for different encoders.
256
+
257
+ ![](images/a950eb70ddb96aacd5210b7c4c8c80bf967f10406485169fe29066b4247e9add.jpg)
258
+
259
+ ![](images/1d9cfcb8a7de6cd7106c8680e60104e3160e9ccdb454cab4bcc148cb9045af98.jpg)
260
+
261
+ ![](images/eac310a6e49abb730d594b469a4c2dcec96cac5e63f533e5584ac880db715e2d.jpg)
262
+
263
+ ![](images/ebd49d4a055456afe9d2069fceeb4e5f448b9466df40089826b633271cdfefa0.jpg)
264
+
265
+ ![](images/806eda5662fe0497c93f62fa7cef5028b61f67ba006f169f3f15e55c4cc73a80.jpg)
266
+
267
+ error (MSE) is adopted as loss function. We compare the differences between the predicted and original distances in Figure 3 and report the mean absolute error (MAE) in Appendix A.12.
268
+
269
+ Results. Figure 3 depicts that the predicted distances generated by POLY2VEC are closely aligned with the original distances, whereas the predicted distances from other point encoders appear more scattered. This highlights POLY2VEC's superior ability to preserve spatial distance relationships across various geometry types. Methods like DIRECT are overly simplistic, while approaches such as TILE, GRID, and WRAP introduce location distortions through discretization or periodic transformations, affecting the distance preservation. By leveraging the Fourier transform, POLY2VEC effectively captures both the positions and relative spatial relationships of the geometry pairs, enabling it to implicitly encode distance as a core property into its embeddings.
270
+
271
+ # 4.2. Integration In an End-to-End GeoAI Pipeline
272
+
273
+ The section addresses RQ3, demonstrating the benefits of integrating POLY2VEC into an existing GeoAI workflow.
274
+
275
+ Dataset. We utilize the same dataset as in Section 4.1. The regions for both cities are extracted using the administrative boundaries of Singapore Subzones and NYC Census Tracts.
276
+
277
+ Baseline. We adopt REGIONDCL (Li et al., 2023), an unsupervised urban region representation learning framework that uses buildings and POIs from OSM for land use inference (predicting urban functional distributions) and population prediction (estimating region population). REGIONDCL encodes building footprints by converting their coordinates into images and extracting features using ResNet18 while using categorical features for POIs. To address the loss of location information, REGIONDCL employs a distance-biased transformer, which introduces a bias in the self-attention mechanism to prioritize closer objects. We provide more details in Appendix A.9.
278
+
279
+ Settings. We evaluate three variants: (1) REGIONDCL, the original framework, (2) REGIONDCL w/o distance-bias removes the distance-biased term, and (3) REGIONDCL w/ Poly2Vec removes the distance-biased term and replaces the encoding part of the pipeline with POLY2VEC. The training and evaluation strategies remain unchanged across
280
+
281
+ the variants following the original work. For land use inference, we report L1-distance, KL-divergence, and cosine similarity metrics. For population prediction, we report MAE, root mean squared error (RMSE), and coefficient of determination $(R^2)$ .
282
+
283
+ Results. The results for both tasks are presented in Table 4. Removing the distance-bias term from REGIONDCL leads to a noticeable drop in performance, emphasizing the importance of encoding the spatial location and alignment of objects for accurate land use and population predictions. When POLY2VEC is added, the performance improves significantly. This shows that POLY2VEC can adequately capture the shape and orientation of objects, similar to the initial image-based features, while also benefiting from the inclusion of object's location. Overall, POLY2VEC encodes spatial information directly into its embeddings, removing the need for additional mechanisms like the distance-bias term. This improves performance while simplifying the pipeline, showcasing the task flexibility of POLY2VEC and its potential for effective integration into GeoAI workflows.
284
+
285
+ # 4.3. Ablation Study
286
+
287
+ This section addresses RQ4, highlighting the benefits of the proposed learned fusion module.
288
+
289
+ Settings. We include three variants: (1) w/mag uses only the Fourier transform magnitude, (2) w/phase uses only the phase, and (3) w/concat combines both via concatenation.
290
+
291
+ ![](images/3fb68814af1c32cf1dfdd4d5a86c14a381c7dca7dcbac4648b16e1ff1c3b0438.jpg)
292
+ Figure 4: Ablation study for the point-polygon dataset.
293
+
294
+ Results. As shown in Figure 4, among the variants, w/ mag performs the worst across all tasks, particularly in directional relationship classification, as the Fourier transform magnitude primarily captures shape, which is insufficient on its own to address these tasks. In contrast, w/ phase, which
295
+
296
+ Table 4: Comparison of methods for Land Use Classification and Population Prediction. Best values are highlighted.
297
+
298
+ <table><tr><td colspan="7">Land Use Classification</td></tr><tr><td rowspan="2">Methods</td><td colspan="3">Singapore</td><td colspan="3">New York</td></tr><tr><td>L1 ↓</td><td>KL ↓</td><td>Cosine ↑</td><td>L1 ↓</td><td>KL ↓</td><td>Cosine ↑</td></tr><tr><td>RegionDCL</td><td>0.498 ± 0.038</td><td>0.294 ± 0.047</td><td>0.879 ± 0.021</td><td>0.418 ± 0.012</td><td>0.229 ± 0.013</td><td>0.912 ± 0.006</td></tr><tr><td>RegionDCL w/o distance-bias</td><td>0.558 ± 0.043</td><td>0.369 ± 0.067</td><td>0.844 ± 0.023</td><td>0.439 ± 0.012</td><td>0.244 ± 0.012</td><td>0.904 ± 0.005</td></tr><tr><td>RegionDCL w/ Poly2Vec</td><td>0.484 ± 0.021</td><td>0.278 ± 0.025</td><td>0.881 ± 0.012</td><td>0.397 ± 0.010</td><td>0.212 ± 0.011</td><td>0.923 ± 0.007</td></tr><tr><td colspan="7">Population Prediction</td></tr><tr><td rowspan="2">Methods</td><td colspan="3">Singapore</td><td colspan="3">New York</td></tr><tr><td>MAE ↓</td><td>RMSE ↓</td><td>R² ↑</td><td>MAE ↓</td><td>RMSE ↓</td><td>R² ↑</td></tr><tr><td>RegionDCL</td><td>5807.54 ± 522.74</td><td>7942.74 ± 779.44</td><td>0.427 ± 0.108</td><td>5020.20 ± 216.63</td><td>6960.51 ± 282.35</td><td>0.575 ± 0.039</td></tr><tr><td>RegionDCL w/o distance-bias</td><td>6018.94 ± 641.71</td><td>8214.58 ± 931.11</td><td>0.385 ± 0.087</td><td>5293.04 ± 277.31</td><td>7348.86 ± 374.62</td><td>0.532 ± 0.030</td></tr><tr><td>RegionDCL w/ Poly2Vec</td><td>4957.58 ± 506.02</td><td>6874.47 ± 851.73</td><td>0.561 ± 0.117</td><td>4602.75 ± 179.66</td><td>6393.38 ± 279.70</td><td>0.621 ± 0.037</td></tr></table>
299
+
300
+ encodes location information, performs better since relative location, here, is more crucial. Combining both through w/ concat shows improvements, highlighting the importance of integrating both shape and location information. In contrast, POLY2VEC outperforms all variants by employing a learned fusion strategy that adaptively balances the contribution of magnitude and phase based on the task and geometry type. Particularly, this strategy benefits POLY2VEC more in tasks such as point-related distance estimation, where points lack spatial extent, and thus magnitude should contribute significantly less than the phase containing location information. More ablation studies are presented in Appendix A.13.
301
+
302
+ # 5. Related Work
303
+
304
+ Existing geometry encoding approaches often focus on one shape type, with point encoders receiving the most attention. Direct point encoding methods simply feed raw coordinates into neural networks but fail to capture details of location distributions (Xu et al., 2018; Chu et al., 2019). Discretization methods assign points to predefined grid cells, as seen in approaches leveraging location context for image classification (Tang et al., 2015; Berg et al., 2014), but struggle with fixed resolution and imprecise representations. Sinusoidal methods encode normalized coordinates using sinusoidal functions, such as WRAP, which captures cyclic patterns (Mac Aodha et al., 2019). Extensions like multiscale encoder (Zhong et al., 2020) introduce multiple sinusoidal scales. THEORY improves this by computing the dot product of coordinates with unit vectors separated by $120^{\circ}$ (Mai et al., 2020). There are also point encoders that jointly model location and neighborhood features (Qi et al., 2017; Yin et al., 2019; Zhou & Tuzel, 2018).
305
+
306
+ Unlike points, there are no dedicated approaches for encoding polylines in their generic form. The closest relevant work is trajectory encoding, where trajectories are often rep
307
+
308
+ resented as ordered sequences of points. Most approaches rely on discretization. For instance, Li et al. (2018a) uses grid-based encoding, training an RNN on degraded data to infer missing information and embedding grid cells to capture relative spatial positions. Other approaches directly use coordinates, leveraging sequential models (i.e. RNNs) to process the encodings (Feng et al., 2018; Xue et al., 2021; Rao et al., 2020; Xu et al., 2018), but require strict sequential ordering and may overlook geometric relationships.
309
+
310
+ Polygon encoding has gained significant attention. Veer et al. (2018) employ elliptic Fourier descriptors to approximate polygon outlines and utilize bidirectional LSTM and 1D CNNs to encode vertex sequences. Mai et al. (2023) used a 1D ResNet architecture with circular padding for loop origin invariance. Other approaches use the non-uniform Fourier transform (NUFT) to map polygons to the spectral domain, converting them back into images via inverse Fourier transforms (IDFT), though this suffers from the limitations of grid-based approaches (Jiang et al., 2019a;b). Mai et al. (2023) refine this approach by omitting the IDFT. POLYGONGNN (Yu et al., 2024) encodes multipolygons, modeling their shape details and inter-polygonal relationships through heterogeneous visibility graphs.
311
+
312
+ While effective for specific geometry types, existing approaches are devised for specific geospatial objects. Encoding heterogeneous coordinate-based data remains a challenge, as current methods, in such cases, either use separate encoders for different object types, thereby adding complexity, or convert geometries into known formats (i.e., image, text), leading to a loss of spatial precision. This limitation is particularly critical for GeoAI models that aim to incorporate coordinate-based geospatial data as an additional modality (Zhang et al., 2024; Mai et al., 2024). POLY2VEC addresses this gap by uniformly encoding points, polylines, and polygons within the same framework, offering a level
313
+
314
+ of versatility not demonstrated by prior methods.
315
+
316
+ # 6. Conclusion and Future Work
317
+
318
+ We proposed POLY2VEC, a unified encoding framework for geospatial objects that preserves essential spatial properties, including topology, directionality, and distance. By outperforming object-specific baselines and improving downstream tasks like population prediction and land use inference, POLY2VEC demonstrates its versatility and effectiveness in GeoAI pipelines. Future work will explore extending POLY2VEC to higher-dimensional geometries, including 3D shapes, and its integration into Geo-Foundation models as a unified representation for coordinate data modalities.
319
+
320
+ # Impact Statement
321
+
322
+ This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. Our improved representation of 2D geometry for deep models could lead to more accurate, versatile GeoAI applications, leading to better understanding the Earth and improvements for the environment, transportation efficiency, and access equity.
323
+
324
+ # Acknowledgments
325
+
326
+ This research has been funded in part by the NIH award R01LM014026 and NSF award DMS-2428039. Any opinions, findings, and conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the sponsors such as the NIH and NSF. J. Li and H. Lu's work was supported by Independent Research Fund Denmark (No. 1032-00481B). Part of H. Lu's work was done when the author was employed at Roskilde University.
327
+
328
+ # References
329
+
330
+ Adams, B., McKenzie, G., and Gahegan, M. Frankenplace: interactive thematic mapping for ad hoc exploratory search. In Proceedings of the 24th international conference on world wide web, pp. 12-22, 2015.
331
+ Balsebre, P., Huang, W., Cong, G., and Li, Y. City foundation models for learning general purpose representations from openstreetmap. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pp. 87-97, 2024.
332
+ Basiri, A., Haklay, M., Foody, G., and Mooney, P. Crowdsourced geospatial data quality: Challenges and future directions, 2019.
333
+
334
+ Berg, T., Liu, J., Woo Lee, S., Alexander, M. L., Jacobs, D. W., and Belhumeur, P. N. Birdsnap: Large-scale fine-grained visual categorization of birds. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2011-2018, 2014.
335
+ Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., Bernstein, M. S., Bohg, J., Bosse-lut, A., Brunskill, E., et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.
336
+ Chu, G., Potetz, B., Wang, W., Howard, A., Song, Y., Brucher, F., Leung, T., and Adam, H. Geo-aware networks for fine-grained recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pp. 0-0, 2019.
337
+ Clementini, E., Di Felice, P., and Van Oosterom, P. A small set of formal topological relationships suitable for end-user interaction. In International symposium on spatial databases, pp. 277-295. Springer, 1993.
338
+ Couclelis, H. Artificial intelligence in geography: Conjectures on the shape of things to come. The professional geographer, 38(1):1-11, 1986.
339
+ Feng, J., Li, Y., Zhang, C., Sun, F., Meng, F., Guo, A., and Jin, D. Deepmove: Predicting human mobility with attentional recurrent networks. In Proceedings of the 2018 world wide web conference, pp. 1459-1468, 2018.
340
+ Gao, S., Hu, Y., and Li, W. Handbook of geospatial artificial intelligence, 2023.
341
+ Gaskill, J. D. Linear systems, Fourier transforms, and optics. John Wiley & Sons, 1978.
342
+ Huang, J., Wang, H., Sun, Y., Shi, Y., Huang, Z., Zhuo, A., and Feng, S. Ernie-geol: A geography-and-language pre-trained model and its applications in baidu maps. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 3029-3039, 2022.
343
+ Janowicz, K., Gao, S., McKenzie, G., Hu, Y., and Bhaduri, B. Geoai: spatially explicit artificial intelligence techniques for geographic knowledge discovery and beyond, 2020.
344
+ Jiang, C., Lansigan, D., Marcus, P., Nießner, M., et al. Ddsl: Deep differentiable simplex layer for learning geometric signals. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8769-8778, 2019a.
345
+ Jiang, C. M., Wang, D., Huang, J., Marcus, P., and Niessner, M. Convolutional neural networks on non-uniform geometrical signals using euclidean spectral transformation.
346
+
347
+ In International Conference on Learning Representations, 2019b. URL https://openreview.net/forum? id=B1G5ViAqFm.
348
+ Jokar Arsanjani, J.,Zipf,A.,Mooney,P.,and Helbich,M. An introduction to openstreetmap in geographic information science: Experiences, research, and applications. OpenStreetMap in GIScience:Experiences,research,and applications,pp.1-15,2015.
349
+ Kyrkou, C., Kolios, P., Theocharides, T., and Polycarpou, M. Machine learning for emergency management: A survey and future outlook. Proceedings of the IEEE, 111 (1):19-41, 2022.
350
+ Lee, J.-G. and Kang, M. Geospatial big data: challenges and opportunities. *Big Data Research*, 2(2):74-81, 2015.
351
+ Li, X., Zhao, K., Cong, G., Jensen, C. S., and Wei, W. Deep representation learning for trajectory similarity computation. In 2018 IEEE 34th international conference on data engineering (ICDE), pp. 617-628. IEEE, 2018a.
352
+ Li, Y., Yu, R., Shahabi, C., and Liu, Y. Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In International Conference on Learning Representations, 2018b.
353
+ Li, Y., Huang, W., Cong, G., Wang, H., and Wang, Z. Urban region representation learning with openstreetmap building footprints. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1363-1373, 2023.
354
+ Mac Aodha, O., Cole, E., and Perona, P. Presence-only geographical priors for fine-grained image classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9596-9606, 2019.
355
+ Mai, G., Janowicz, K., Yan, B., Zhu, R., Cai, L., and Lao, N. Multi-scale representation learning for spatial feature distributions using grid cells. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=rJ1jdh4KDH.
356
+ Mai, G., Jiang, C., Sun, W., Zhu, R., Xuan, Y., Cai, L., Janowicz, K., Ermon, S., and Lao, N. Towards general-purpose representation learning of polygonal geometries. *GeoInformatica*, 27(2):289-340, 2023.
357
+ Mai, G., Huang, W., Sun, J., Song, S., Mishra, D., Liu, N., Gao, S., Liu, T., Cong, G., Hu, Y., et al. On the opportunities and challenges of foundation models for geoai (vision paper). ACM Transactions on Spatial Algorithms and Systems, 10(2):1-46, 2024.
358
+ Mirowski, P., Grimes, M., Malinowski, M., Hermann, K. M., Anderson, K., Teplyashin, D., Simonyan, K.,
359
+
360
+ kavukcuoglu, k., Zisserman, A., and Hadsell, R. Learning to navigate in cities without a map. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/e034fb6b66aacc1d48f445ddfb08da98-Paper.pdf.
361
+ Papamichalopoulos, M., Papadakis, G., Mandilaras, G., Siampou, M., Mamoulis, N., and Koubarakis, M. Three-dimensional geospatial interlinking with Jedai-spatial. Journal of Web Semantics, 81:100817, 2024.
362
+ Punjani, D., Singh, K., Both, A., Koubarakis, M., Angelidis, I., Bereta, K., Beris, T., Bilidas, D., Ioannidis, T., Karalis, N., et al. Template-based question answering over linked geospatial data. In Proceedings of the 12th workshop on geographic information retrieval, pp. 1-10, 2018.
363
+ Qi, C. R., Su, H., Mo, K., and Guibas, L. J. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 652-660, 2017.
364
+ Rao, J., Gao, S., Kang, Y., and Huang, Q. Lstm-trajgan: A deep learning approach to trajectory privacy protection. In 11th International Conference on Geographic Information Science (GIScience 2021)-Part I (2020), pp. 12-1. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020.
365
+ Smith, T. R. Artificial intelligence and its applicability to geographical problem solving. The Professional Geographer, 36(2):147-158, 1984.
366
+ Sun, J., Zheng, Y., Hao, J., Meng, Z., and Liu, Y. Continuous multiagent control using collective behavior entropy for large-scale home energy management. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 922-929, 2020.
367
+ Tang, K., Paluri, M., Fei-Fei, L., Fergus, R., and Bourdev, L. Improving image classification with location context. In Proceedings of the IEEE international conference on computer vision, pp. 1008-1016, 2015.
368
+ Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017.
369
+ Veer, R. v., Bloem, P., and Folmer, E. Deep learning for classification tasks on geospatial vector polygons. arXiv preprint arXiv:1806.03857, 2018.
370
+ Wu, S., Yan, X., Fan, X., Pan, S., Zhu, S., Zheng, C., Cheng, M., and Wang, C. Multi-graph fusion networks for urban region embedding. In Raedt, L. D. (ed.), Proceedings of the Thirty-First International Joint
371
+
372
+ Conference on Artificial Intelligence, IJCAI 2022, Vienna, Austria, 23-29 July 2022, pp. 2312-2318. ijcai.org, 2022. doi: 10.24963/IJCAI.2022/321. URL https://doi.org/10.24963/ijcai.2022/321.
373
+ Xu, Y., Piao, Z., and Gao, S. Encoding crowd interaction with deep neural network for pedestrian trajectory prediction. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5275-5284, 2018.
374
+ Xue, H., Salim, F., Ren, Y., and Oliver, N. Mobcast: Leveraging auxiliary trajectory forecasting for human mobility prediction. Advances in Neural Information Processing Systems, 34:30380-30391, 2021.
375
+ Yin, Y., Liu, Z., Zhang, Y., Wang, S., Shah, R. R., and Zimmermann, R. Gps2vec: Towards generating worldwidegps embeddings. In Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 416-419, 2019.
376
+ Yu, D., Hu, Y., Li, Y., and Zhao, L. Polygonnn: Representation learning for polygonal geometries with heterogeneous visibility graph. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 4012-4022, 2024.
377
+ Zahn, C. T. and Roskies, R. Z. Fourier descriptors for plane closed curves. IEEE Transactions on computers, 100(3): 269-281, 1972.
378
+ Zhang, M., Li, T., Li, Y., and Hui, P. Multi-view joint graph representation learning for urban region embedding. In Proceedings of the twenty-ninth international conference on international joint conferences on artificial intelligence, pp. 4431-4437, 2021.
379
+ Zhang, W., Han, J., Xu, Z., Ni, H., Liu, H., and Xiong, H. Urban foundation models: A survey. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 6633-6643, 2024.
380
+ Zhong, E. D., Bepler, T., Davis, J. H., and Berger, B. Reconstructing continuous distributions of 3d protein structure from cryo-em images. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=SJxUjlBtwB.
381
+ Zhou, Y. and Tuzel, O. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4490-4499, 2018.
382
+
383
+ # A. Appendix
384
+
385
+ # A.1. Geospatial Objects Definitions
386
+
387
+ Definition 2 (Point). A point is a zero-dimensional geometric entity in $\mathbb{R}^2$ , defined by a single coordinate $(x, y)$ , where $x, y \in \mathbb{R}$ . A point represents a specific location in the plane but has no extent, size, nor dimension.
388
+
389
+ Definition 3 (Line Segment). A line segment is a one-dimensional geometric object in $\mathbb{R}^2$ , defined as a straight line segment between two distinct endpoints $p_1 = (x_1, y_1)$ and $p_2 = (x_2, y_2)$ .
390
+
391
+ Definition 4 (Polyline). A polyline is a one-dimensional object in $\mathbb{R}^2$ , represented by an array $P \in \mathbb{R}^{N \times 2}$ , where each row is a point $p_i = (x_i, y_i)$ . It consists of connected line segments formed by consecutive points $p_i$ and $p_{i+1}$ for $1 \leq i < N$ , with $p_1 \neq p_N$ .
392
+
393
+ Definition 5 (Polygon). A polygon is a two-dimensional geometric object in $\mathbb{R}^2$ , represented as a closed sequence of points forming its boundary. It is defined by an array $P \in \mathbb{R}^{N \times 2}$ , where each row corresponds to a point $(x_i, y_i) \in \mathbb{R}^2$ and $(x_1, y_1) = (x_N, y_N)$ .
394
+
395
+ # A.2. Analytical Calculations of Fourier Transform
396
+
397
+ # A.2.1. FOURIER TRANSFORM OF A POINT
398
+
399
+ By representing a point $p = (x_p, y_p) \in \mathbb{R}^2$ as a 2D Dirac delta function $f_p(x, y) = \delta(x - x_p, y - y_p)$ the Fourier transform of $f_p(x, y)$ can be derived as follows:
400
+
401
+ $$
402
+ \begin{array}{l} F _ {p} (u, v) = \mathcal {F} \{f _ {p} (x, y) \} \\ = \int_ {- \infty} ^ {\infty} \int_ {- \infty} ^ {\infty} f _ {p} (x, y) e ^ {- j 2 \pi (u x + v y)} d x d y \\ = \int_ {- \infty} ^ {\infty} \int_ {- \infty} ^ {\infty} \delta (x - x _ {p}, y - y _ {p}) e ^ {- j 2 \pi (u x + v y)} d x d y \\ = e ^ {- j 2 \pi (x _ {p} u + y _ {p} v)} \\ \end{array}
403
+ $$
404
+
405
+ where $(u,v)$ are the frequency components.
406
+
407
+ # A.2.2. FOURIER TRANSFORM OF A POLYLINE
408
+
409
+ Canonical line segment. We express the canonical line segment $l_{c}$ extending from $\mathbf{a} = (-\frac{1}{2},0)$ to $\mathbf{b} = (\frac{1}{2},0)$ , as $f_{l_c}(x,y) = \operatorname {rect}(x)\delta (y)$ . where $\operatorname {rect}(x)$ restricts the ridge to $|x|\leq \frac{1}{2}$ , and $\delta (y)$ represents a Dirac delta function along the $x$ -axis. The Fourier transform of $f_{l_c}(x,y)$ is:
410
+
411
+ $$
412
+ \begin{array}{l} F _ {l _ {c}} (u, v) = \mathcal {F} \left\{f _ {l _ {c}} (x, y) \right\} \\ = \int_ {- \infty} ^ {\infty} \int_ {- \infty} ^ {\infty} f l _ {c} (x, y) e ^ {- j 2 \pi (u x + v y)} d x d y \\ = \int_ {- \infty} ^ {\infty} \int_ {- \infty} ^ {\infty} \operatorname {r e c t} (x) \delta (y) e ^ {- j 2 \pi (u x + v y)} d x d y \\ \end{array}
413
+ $$
414
+
415
+ Using the sifting property of the Dirac delta function, the integral over $y$ evaluates to the value of the integrand at $y = 0$ :
416
+
417
+ $$
418
+ \begin{array}{l} F _ {l _ {c}} (u, v) = \int_ {- \infty} ^ {\infty} \operatorname {r e c t} (x) e ^ {- j 2 \pi u x} e ^ {- j 2 \pi v (0)} d x \\ = \int_ {- \infty} ^ {\infty} \operatorname {r e c t} (x) e ^ {- j 2 \pi u x} d x \\ = \operatorname {s i n c} (u) \\ \end{array}
419
+ $$
420
+
421
+ where $(u,v)$ are the frequency components and $v = 0$
422
+
423
+ Arbitrary line segment. We consider an arbitrary line segment $l$ with endpoints $\mathbf{q} = (x_q, y_q)$ and $\mathbf{r} = (x_r, y_r)$ , to compute the $F_l(u, v)$ , we map it to the canonical line segment $l_c$ using affine transformation. For this purpose, we introduce an
424
+
425
+ auxiliary point $\mathbf{c} = \left(\frac{1}{2}, 1\right)$ at the structure of $l_{c}$ so that it is not colinear with $\mathbf{ab}$ . This point maps to another auxiliary point $\mathbf{s}$ introduced at the arbitrary line segment $l$ . The auxiliary point $\mathbf{s}$ is defined as $\mathbf{s} = \mathbf{r} + \mathbf{n}$ , where $\mathbf{n} = (y_{q} - y_{r}, x_{r} - x_{q})^{\top}$ , representing a $90^{\circ}$ clockwise rotation of the vector $\mathbf{r} - \mathbf{q}$ . Note that the vectors $\mathbf{qr}$ and $\mathbf{rs}$ are the same length.
426
+
427
+ Given all the above, the affine transformation matrix $\mathbf{A}$ is defined as:
428
+
429
+ $$
430
+ \mathbf {A} = \left[ \begin{array}{l l l} a _ {1} & b _ {1} & c _ {1} \\ a _ {2} & b _ {2} & c _ {2} \\ 0 & 0 & 1 \end{array} \right]
431
+ $$
432
+
433
+ Then the values of $\mathbf{A}$ are computed as follows:
434
+
435
+ $$
436
+ \begin{array}{l} \mathbf {A} [ \mathbf {q r s} ] = [ \mathbf {a b c} ] \\ \mathbf {A} = [ \mathbf {a b c} ] [ \mathbf {q r s} ] ^ {- 1} \\ = \left[ \begin{array}{c c c} - \frac {1}{2} & \frac {1}{2} & \frac {1}{2} \\ 0 & 0 & 1 \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{c c c} x _ {q} & x _ {r} & x _ {r} + y _ {q} - y _ {r} \\ y _ {q} & y _ {r} & y _ {r} + x _ {r} - x _ {q} \\ 1 & 1 & 1 \end{array} \right] ^ {- 1} \\ = D \left[ \begin{array}{c c c} - x _ {q} + x _ {r} & - y _ {q} + y _ {r} & \frac {(x _ {q} ^ {2} + y _ {q} ^ {2} - x _ {r} ^ {2} - y _ {r} ^ {2})}{2} \\ y _ {q} - y _ {r} & - x _ {q} + x _ {r} & - y _ {q} x _ {r} + x _ {q} y _ {r} \\ 0 & 0 & \frac {1}{D} \end{array} \right] \\ \end{array}
437
+ $$
438
+
439
+ where
440
+
441
+ $$
442
+ | D | = \det (\mathbf {A}) = \frac {1}{(x _ {q} - x _ {r}) ^ {2} + (y _ {q} - y _ {r}) ^ {2}}
443
+ $$
444
+
445
+ is the determinant of $\mathbf{A}$
446
+
447
+ Following the affine Fourier transform property from Eq. (3), the Fourier transform of an arbitrary line segment $l$ with endpoints $(x_q, y_q)$ and $(x_r, y_r)$ is:
448
+
449
+ $$
450
+ \begin{array}{l} F _ {l} (u, v) = \mathcal {F} \left\{f _ {l _ {c}} (x, y) \right\} \\ = \frac {1}{| \det (\mathbf {A}) |} e ^ {- j 2 \pi \mathbf {c} ^ {\top} \mathbf {A} ^ {- \top} \mathbf {u}} F (\mathbf {A} ^ {- \top} \mathbf {u}) \\ \end{array}
451
+ $$
452
+
453
+ which can be rewritten as:
454
+
455
+ $$
456
+ \begin{array}{l} F _ {l} (u, v) = \\ = \frac {1}{| D |} e ^ {- j 2 \pi \left(x _ {0} u + y _ {0} v\right)} F \left(\frac {b _ {2} u - a _ {2} v}{| D |}, - \frac {b _ {1} u + a _ {1} v}{| D |}\right) \tag {15} \\ \end{array}
457
+ $$
458
+
459
+ where $x_0 = \frac{1}{|D|} (b_1c_2 - b_2c_1)$ and $y_{0} = \frac{1}{|D|} (a_{2}c_{1} - a_{1}c_{2})$
460
+
461
+ By substituting the specific values into Eq. (15), $F_{l}(u,v)$ can be simplified to:
462
+
463
+ $$
464
+ F _ {l} (u, v) = \frac {1}{(x _ {q} - x _ {r}) ^ {2} + (y _ {q} - y _ {r}) ^ {2}} \Big [ e ^ {- j 2 \pi \left(\frac {x _ {q} + x _ {r}}{2} u + \frac {y _ {q} + y _ {r}}{2} v\right)} \mathrm {s i n c} \big ((x _ {r} - x _ {q}) u + (y _ {r} - y _ {q}) v \big) \Big ]
465
+ $$
466
+
467
+ # A.2.3. FOURIER TRANSFORM OF A POLYGON
468
+
469
+ Isosceles canonical right triangle. The canonical isosceles right triangle $\Delta_{c}$ with vertices $\mathbf{a} = (0,0)$ , $\mathbf{b} = (1,0)$ , and $\mathbf{c} = (1,1)$ , is represented by the function $f_{\Delta_c}(x,y)$ which equals 1 inside the triangle and 0 otherwise.
470
+
471
+ The Fourier transform of $f_{\Delta_c}(x,y)$ is computed as:
472
+
473
+ $$
474
+ \begin{array}{l} F _ {\Delta_ {c}} (u, v) = \mathscr {F} \left\{f _ {\Delta_ {c}} (x, y) \right\} \\ = \int \int f _ {\Delta_ {c}} (x, y) e ^ {- j 2 \pi (u x + v y)} d y d x \\ = \int_ {0} ^ {1} \int_ {0} ^ {x} e ^ {- j 2 \pi (u x + v y)} d y d x \\ = \int_ {0} ^ {1} \frac {1}{- j 2 \pi v} \left(e ^ {- j 2 \pi (u + v) x} - e ^ {- j 2 \pi u x}\right) d x \\ = \frac {1}{- j 2 \pi v} \left[ \int_ {0} ^ {1} e ^ {- j 2 \pi (u + v) x} d x - \int_ {0} ^ {1} e ^ {- j 2 \pi u x} d x \right] \\ = \frac {1}{4 \pi^ {2} v (u + v)} \left[ (u + v) e ^ {- j 2 \pi u} - u e ^ {- j 2 \pi (u + v)} - v \right] \tag {16} \\ \end{array}
475
+ $$
476
+
477
+ Using Euler's formula $(e^{j\theta} = \cos \theta + j\sin \theta)$ , we can expand Eq. (16) to:
478
+
479
+ $$
480
+ F _ {\mathcal {A} _ {c}} (u, v) = \frac {1}{4 \pi^ {2} u v (u + v)} \Big [ \big ((u + v) \cos (2 \pi u) - u \cos (2 \pi (u + v)) - v \big) - j \big ((u + v) \sin (2 \pi u) - u \sin (2 \pi (u + v)) \big) \Big ]
481
+ $$
482
+
483
+ This equation is undefined for some values of $(u, v)$ . We present the Fourier transform for each special case:
484
+
485
+ $$
486
+ \begin{array}{l} \bullet F _ {\Delta_ {c}} (0, 0) = \frac {1}{2} \\ \bullet F _ {\Delta_ {c}} (0, v) = - \frac {1}{4 \pi^ {2} v ^ {2}} \left(j 2 \pi v + \cos (2 \pi v) - j \sin (2 \pi v) - 1\right) \\ \bullet F _ {\Delta_ {c}} (u, 0) = \frac {1}{4 \pi^ {2} u ^ {2}} \left[ \left(\cos (2 \pi u) + 2 \pi u \sin (2 \pi u) - 1\right) - j \left(\sin (2 \pi u) - 2 \pi u \cos (2 \pi u)\right) \right] \\ \bullet F _ {\Delta_ {c}} (- v, v) = - \frac {1}{4 \pi^ {2} v ^ {2}} \left(- j 2 \pi v + \cos (2 \pi v) + j \sin (2 \pi v) - 1\right) \\ \end{array}
487
+ $$
488
+
489
+ Arbitrary triangle. We calculate the Fourier transform of an arbitrary triangle $\Delta$ , with vertices $\mathbf{q}$ , $\mathbf{r}$ , $\mathbf{s}$ by using the affine transformation property. To that extent the affine transformation matrix $\mathbf{A}$ is defined as:
490
+
491
+ $$
492
+ \mathbf {A} = \left[ \begin{array}{c c c} a _ {1} & b _ {1} & c _ {1} \\ a _ {2} & b _ {2} & c _ {2} \\ 0 & 0 & 1 \end{array} \right]
493
+ $$
494
+
495
+ Then the values of $\mathbf{A}$ are computed as follows:
496
+
497
+ $$
498
+ \begin{array}{l} \mathbf {A} [ \mathbf {q r s} ] = [ \mathbf {a b c} ] \\ \mathbf {A} = [ \mathbf {a b c} ] [ \mathbf {q r s} ] ^ {- 1} \\ = \left[ \begin{array}{c c c} 0 & 1 & 1 \\ 0 & 0 & 1 \\ 1 & 1 & 1 \end{array} \right] \left[ \begin{array}{c c c} x _ {q} & x _ {r} & x _ {r} + y _ {q} - y _ {r} \\ y _ {q} & y _ {r} & y _ {r} + x _ {r} - x _ {q} \\ 1 & 1 & 1 \end{array} \right] ^ {- 1} = D \quad \left[ \begin{array}{c c c} y _ {s} - y _ {r} & x _ {r} - x _ {s} & y _ {q} (x _ {s} - x _ {r}) + x _ {q} (y _ {r} - y _ {s}) \\ y _ {q} - y _ {r} & x _ {r} - x _ {q} & x _ {q} y _ {r} - y _ {q} x _ {r} \\ 0 & 0 & D \end{array} \right] \\ \end{array}
499
+ $$
500
+
501
+ where
502
+
503
+ $$
504
+ | D | = \frac {1}{x _ {q} \left(y _ {r} - y _ {s}\right) + x _ {r} \left(y _ {s} - y _ {q}\right) + x _ {s} \left(y _ {q} - y _ {r}\right)}
505
+ $$
506
+
507
+ is the determinant of $\mathbf{A}$
508
+
509
+ If the area of $\Delta$ is $\alpha$ , then $D = \frac{1}{2\alpha}$ .
510
+
511
+ Finally the Fourier transform $F_{\Delta}(u,v)$ can be calculated by substituting the affine transform parameters into Eq. (3).
512
+
513
+ For the case of $(0,0)$ we get that: $F_{\Delta}(0,0) = \frac{1}{D} F_{\Delta_c}(0,0) = \frac{1}{2D} = \alpha$ which is the area of $\Delta$ .
514
+
515
+ # A.3. Frequency Sampling Strategy
516
+
517
+ # A.3.1. DETAILS ON THE GEOMETRIC FREQUENCY SAMPLING
518
+
519
+ We sample frequencies as a geometric series to balance the contribution of low and high-frequency frequency components. Formally,
520
+
521
+ $$
522
+ f _ {i} = f _ {\mathrm {m i n}} \cdot \rho_ {i}, \quad i = 0, 1, \ldots , W - 1
523
+ $$
524
+
525
+ where $f_{i}$ is the $i$ -th frequency, $f_{\min}$ , $f_{\max}$ correspond to the minimum and maximum frequencies and $W$ is the number of sampled frequencies in each dimension. $\rho_{i}$ is the step ratio and is defined as $\rho_{i} = \left(\frac{f_{\max}}{f_{\min}}\right)^{\frac{1}{(W - 1)}}$ .
526
+
527
+ Using this sequence, we construct a 2D meshgrid of frequencies, denoted as (U,V), centered around zero. Due to the Hermitian symmetry property of the Fourier transform, we only compute frequencies for half of the plane.
528
+
529
+ While uniform sampling is an alternative, previous studies suggest geometric sampling is better suited for tasks like ours, as it naturally balances the significance of low- and high-frequency components (Mai et al., 2023).
530
+
531
+ # A.3.2. ADDITIONAL STRATEGIES
532
+
533
+ ![](images/5a05d567491e2e87623024d2fa2b3e2e8513fc41f7725fd85e41fca8f123a83c.jpg)
534
+ Figure 5: The effect of frequency sampling strategy on point-polygon pairs.
535
+
536
+ To investigate whether learning the frequency values would improve performance, we conducted an experiment where the frequencies were treated as learnable parameters and optimized alongside the model. Our results are reported in Figure 5. We observe that learning the frequencies does not yield significant improvements over fixing the frequencies in any of the tasks. This suggests that the geometric sampling approach is sufficiently effective for balancing low- and high-frequency contributions, and learning the frequencies does not provide additional benefits for the tasks considered.
537
+
538
+ # A.4. Dataset Details
539
+
540
+ We utilized publicly available OpenStreetMap (OSM) datasets for Singapore and New York, obtained from Geofabrik in .osm.pbf format. Geospatial objects, including POIs, roads, and buildings, were extracted using OSM-specific tags (amenity, shop, tourism, leisure for POIs, motorway, trunk, primary, secondary for roads, and building for buildings). Region partitions were derived from Singapore Subzones<sup>10</sup> and NYC Census Tracts<sup>11</sup>. Dataset statistics are presented in Table 5.
541
+
542
+ <table><tr><td>City</td><td># POIs</td><td># roads</td><td># buildings</td><td># regions</td></tr><tr><td>Singapore</td><td>4,347</td><td>45,634</td><td>109,877</td><td>304</td></tr><tr><td>New York</td><td>14,943</td><td>139,512</td><td>1,153,088</td><td>2,324</td></tr></table>
543
+
544
+ Table 5: Statistics of the Singapore and New York datasets.
545
+
546
+ Labels for the land use classification task were sourced from the Singapore Master Plan $2019^{12}$ and NYC MapPLUTO $^{13}$ . Following previous approaches (Li et al., 2023), we merge the fine-grained land use classes into five major categories, including Residential, Industrial, Commercial, Open Space, and Others. Population estimation labels were obtained from WorldPop $^{14}$ for both cities.
547
+
548
+ For the remaining tasks, the labels are generated manually. Specifically, for the topological classification task, the number of relationships depends on the types of objects being compared. Point/polyline, point/polygon, and polyline/polyline pairs can belong to one of two classes: disjoint or not disjoint. Polyline/polygon pairs, however, have four distinct relationship classes, while polygon/polygon pairs include six classes, following the DE9IM model. To eliminate redundancy, we remove equivalent relationships such as within and contains, keeping only one representative relationship from each pair of equivalents. To create a balanced dataset across all relationship classes, we generate geometry pairs by slightly adjusting the positions of the original geospatial objects and randomly selecting 5,000 pairs for each class within a group.
549
+
550
+ For the directional relationship classification task, we classify the spatial relationships between two geometries into one of 16 compass directions based on their angular relationship. These 16 classes are derived from the cardinal and intercardinal directions: north, northeast, east, southeast, south, southwest, west, northwest, and their boundary counterparts (e.g., north-northeast, east-northeast). Labels are computed based on the relative orientation of the geometries' centroids. Similar to the topological classification task, we randomly select 5,000 pairs for each directional class to ensure a balanced dataset.
551
+
552
+ For the distance estimation task, labels are computed using the actual spatial distance between the centroids of the two geometries. The spatial distance is calculated using Euclidean distance for planar geometries, for topological and directional relationship classification. We randomly select 10,000 geometry pairs for this task.
553
+
554
+ # A.5. Baselines
555
+
556
+ We now describe the baseline methods used to evaluate POLY2VEC.
557
+
558
+ # 1. Point encoders
559
+
560
+ - DIRECT: Feeds directly the geometry's input coordinates to the downstream model, without any encoding mechanism.
561
+ - TILE: Partitions the study area into a uniform grid with cells of size $c$ . Each grid cell is assigned an embedding, which serves as the encoding for the points assigned to that cell (Berg et al., 2014; Adams et al., 2015; Tang et al., 2015).
562
+ - WRAP: Uses a wrapping mechanism $[\sin(\pi p); \cos(\pi p)]$ to encode a point $p$ (Mac Aodha et al., 2019).
563
+ - GRID: Follows the Transformer's position encoding model (Vaswani, 2017), representing spatial positions through multi-scale sine and cosine transformations. At each scale $s$ , the encoding is given by $PE_{s}^{(g)}(p) = \left[\cos \left(\frac{p}{\lambda_{\min} \cdot g^{\frac{s}{S - 1}}}\right), \sin \left(\frac{p}{\lambda_{\min} \cdot g^{\frac{s}{S - 1}}}\right)\right]$ , where $g = \frac{\lambda_{\max}}{\lambda_{\min}}$ controls the frequency range. The final encoding concatenates these multi-scale representations, capturing spatial structures across different resolutions (Mai et al., 2020).
564
+ - THEORY: Encodes spatial positions using dot products with unit vectors separated by $120^{\circ}$ . At each scale $s$ , the encoding is given by $PE_{s,j}^{(t)}(p) = \left[\cos \left(\frac{\langle p,a_j\rangle}{\lambda_{\min}\cdot g^{\frac{s}{S - 1}}}\right),\sin \left(\frac{\langle p,a_j\rangle}{\lambda_{\min}\cdot g^{\frac{s}{S - 1}}}\right)\right]\quad \forall j\in \{1,2,3\}$ , where $a_1 = [1,0]^T$ , $a_2 = [-\frac{1}{2},\frac{\sqrt{3}}{2}]^T$ and $a_3 = [-\frac{1}{2}, - \frac{\sqrt{3}}{2}]^T$ are unit vectors spaced at $120^{\circ}$ . The final encoding concatenates these multi-scale representations across all vectors (Mai et al., 2020).
565
+
566
+ # 2. Polyline encoders
567
+
568
+ - T2VEC: First uniformly partitions the whole space into grid cells, and map each trajectory point into the grid cell. Through this tokenization, each trajectory is converted to a sequence of grid cell IDs. Then adopts a GRU encoder to encode the sequence and an end-to-end training paradigm that amis to reconstruct the original trajectories from the distorted/downsampled ones (Li et al., 2018a).
569
+
570
+ # 3. Polygon encoders
571
+
572
+ <sup>12</sup>https://data.gov.sg/dataset/master-plan-2019-land-use-layer
573
+ <sup>13</sup>https://www.nyc.gov/site/planning/data-maps/open-data/dwn-pluto-mappluto.page
574
+ $^{14}$ https://hub.worldpop.org/geodata/listing?id=77
575
+
576
+ - RESNET1D: Adapts the 1D variant of the Residual Network (ResNet) architecture, incorporating circular padding to effectively encode the exterior vertices of polygons (Mai et al., 2023).
577
+ - NUFTSPEC: Transforms polygons into the spectral domain using the Non-Uniform Fourier Transformation (NUFT) and $j$ -simplex meshes and then learns polygon embeddings from these spectral features using MLPs (Mai et al., 2023).
578
+
579
+ # A.6. Hyperparameter Configuration
580
+
581
+ The coordinates of the input geometries are normalized to lie within the range $[-1, 1] \times [-1, 1]$ , based on the bounding box of the corresponding area of interest. We set the minimum frequency $f_{\mathrm{min}} = 0.1$ , the maximum frequency $f_{\mathrm{max}} = 1.0$ and $W = 10$ , resulting in 210 frequencies. We set the final size of the geometry embedding $\mathbf{v}$ to $d = 32$ . All the MLPs consist of two layers with ReLU activation functions.
582
+
583
+ # A.6.1. HYPERPARAMETERS OF SPATIAL REASONING TASKS.
584
+
585
+ For training on the spatial reasoning tasks, we utilize the AdamW optimizer and set the learning rate $lr = 10^{-4}$ and weight decay $w_d = 10^{-8}$ . The batch size is set to 128, and the downstream models were trained for 20 epochs. The training, validation, and testing ratios for the datasets corresponding to these tasks is 60:20:20. All experiments were run 5 times and we report average performances and standard deviation.
586
+
587
+ # A.6.2. HYPERPARAMETERS OF GEOAI TASKS.
588
+
589
+ We follow the same hyperparameters as presented by Li et al. (2023), to keep our comparison consistent.
590
+
591
+ # A.6.3. HYPERPARAMETERS OF OTHER BASELINES.
592
+
593
+ The implementation of baselines follows the corresponding papers, along which each method's specific hyperparameters. The rest of hyperparameters related to downstream tasks are kept consistent with our approach.
594
+
595
+ # A.7. Experimental Environment
596
+
597
+ Our experiments are performed on a cluster node equipped with an 18-core Intel i9-9980XE CPU, 125 GB of memory, and two 11 GB NVIDIA GeForce RTX 2080 Ti GPUs. Furthermore, all neural network models are implemented based on PyTorch version 2.3.0 with CUDA 11.8 using Python version 3.9.19.
598
+
599
+ # A.8. Training Details of Evaluation Tasks
600
+
601
+ We use cross entropy loss to train the downstream model on the topological and directional relationship classification tasks. The loss is defined as:
602
+
603
+ $$
604
+ \mathcal {L} _ {\mathrm {C E} (\theta)} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {c = 1} ^ {C} y _ {i, c} \log (\hat {y} _ {i, c}),
605
+ $$
606
+
607
+ where $N$ is the number of samples, $C$ is the number of classes ( $C = 2$ for binary classification), $y_{i,c} \in \{0,1\}$ is the one-hot encoded ground-truth label for class $c$ , and $\hat{y}_{i,c} \in [0,1]$ is the predicted probability for class $c$ .
608
+
609
+ For the distance preservation task, the model is evaluated using the mean squared error (MSE) loss, defined as:
610
+
611
+ $$
612
+ \mathcal {L} _ {\mathrm {M S E} (\theta)} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left(y _ {i} - \hat {y} _ {i}\right) ^ {2},
613
+ $$
614
+
615
+ where $y_{i}$ is the ground-truth distance for the $i$ -th sample, and $\hat{y}_i$ is the predicted distance.
616
+
617
+ We note that for the population prediction and land use classification tasks, POLY2VEC is used as input to the pretrained urban region representation model REGIONDCL (Li et al., 2023), and thus we follow the same training and evaluation procedure as was originally presented by the authors.
618
+
619
+ # A.9. Further Details on Poly2Vec Integration into an End-to-End GeoAI Pipeline
620
+
621
+ In this section, we describe in more detail how Poly2Vec is integrated into RegionDCL.
622
+
623
+ We utilize RegionDCL as an end-to-end GeoAI pipeline to demonstrate the utility of Poly2Vec. Poly2Vec is used as the input encoding in RegionDCL, replacing its original input representation. RegionDCL originally rasterizes OSM building footprints, converting coordinate data into image inputs so it can leverage convolutional encoders like ResNet-18. This rasterization leads to the loss of important spatial information, such as the absolute location of each building. To mitigate this, RegionDCL introduces a distance-biased transformer encoder, where the bias term consists of pairwise distances between buildings and POIs to reintroduce spatial context.
624
+
625
+ In our experiments, we (1) replaced the inputs with Poly2Vec encodings, and (2) replaced the distance-biased transformer encoder with a standard transformer encoder, because our new inputs from (1) capture the necessary spatial information. The fact that Poly2Vec improves performance even without the distance bias demonstrates its ability to inherently retain spatial and positional information.
626
+
627
+ # A.10. Supplementary Results on Topological Relationships Classification
628
+
629
+ Table 6: Overall model Performance on topological relationship classification. Best and second best are highlighted.
630
+
631
+ <table><tr><td rowspan="2">Metric</td><td rowspan="2">Methods</td><td colspan="5">Singapore</td><td colspan="5">New York</td></tr><tr><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td></tr><tr><td rowspan="9">Precision</td><td>RESNET1D</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.3980.018</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.4210.051</td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5880.041</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5620.032</td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>0.7680.021</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7450.012</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8590.007</td><td>0.8310.017</td><td>0.6370.032</td><td>0.4150.037</td><td>0.3280.04</td><td>0.8350.032</td><td>0.9330.007</td><td>0.6610.032</td><td>0.4980.003</td><td>0.4390.024</td></tr><tr><td>TILE</td><td>0.7350.039</td><td>0.7050.056</td><td>0.5050.007</td><td>0.4900.006</td><td>0.4390.005</td><td>0.6640.018</td><td>0.7890.005</td><td>0.5020.009</td><td>0.4940.074</td><td>0.4180.005</td></tr><tr><td>WRAP</td><td>0.8740.011</td><td>0.8650.015</td><td>0.6450.009</td><td>0.4530.028</td><td>0.4050.010</td><td>0.8790.015</td><td>0.9150.006</td><td>0.6550.013</td><td>0.5860.005</td><td>0.4050.010</td></tr><tr><td>GRID</td><td>0.7990.037</td><td>0.8410.010</td><td>0.6260.027</td><td>0.4050.066</td><td>0.2880.013</td><td>0.7680.034</td><td>0.9040.015</td><td>0.6580.014</td><td>0.5130.012</td><td>0.3550.017</td></tr><tr><td>THEORY</td><td>0.9030.037</td><td>0.8740.004</td><td>0.6510.009</td><td>0.4320.018</td><td>0.4780.023</td><td>0.8860.044</td><td>0.8930.017</td><td>0.7180.007</td><td>0.6020.008</td><td>0.4310.009</td></tr><tr><td>POLY2VEC</td><td>0.9130.007</td><td>0.9240.017</td><td>0.7790.001</td><td>0.5060.013</td><td>0.6940.007</td><td>0.9210.016</td><td>0.9790.021</td><td>0.7450.002</td><td>0.6310.017</td><td>0.6980.006</td></tr><tr><td rowspan="9">Recall</td><td>RESNET1D</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.4550.011</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.4520.035</td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5720.032</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5920.029</td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>0.7320.024</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7180.032</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.7920.012</td><td>0.8380.027</td><td>0.9970.019</td><td>0.4140.031</td><td>0.4500.014</td><td>0.8380.035</td><td>0.8880.004</td><td>0.9870.22</td><td>0.4970.003</td><td>0.4310.003</td></tr><tr><td>TILE</td><td>0.8940.035</td><td>0.6950.074</td><td>1.0001</td><td>0.4630.008</td><td>0.4130.004</td><td>0.6590.009</td><td>0.7690.011</td><td>1.0001</td><td>0.4990.039</td><td>0.4050.004</td></tr><tr><td>WRAP</td><td>0.9030.005</td><td>0.9010.033</td><td>0.9920.007</td><td>0.4770.012</td><td>0.3800.006</td><td>0.8940.030</td><td>0.8420.031</td><td>0.9860.005</td><td>0.5510.008</td><td>0.3800.006</td></tr><tr><td>GRID</td><td>0.9210.035</td><td>0.8480.014</td><td>0.9800.016</td><td>0.4650.007</td><td>0.3390.013</td><td>0.9330.045</td><td>0.8810.004</td><td>0.9950.002</td><td>0.5140.012</td><td>0.3820.035</td></tr><tr><td>THEORY</td><td>0.9860.028</td><td>0.9330.007</td><td>0.9720.012</td><td>0.4510.012</td><td>0.4670.015</td><td>0.9230.044</td><td>0.9120.017</td><td>0.7820.007</td><td>0.6150.008</td><td>0.4120.009</td></tr><tr><td>POLY2VEC</td><td>1.0000</td><td>0.9740.023</td><td>1.0000</td><td>0.4980.007</td><td>0.6970.003</td><td>1.0000</td><td>0.9890.032</td><td>1.0000</td><td>0.6380.009</td><td>0.6970.007</td></tr><tr><td rowspan="9">F1</td><td>RESNET1D</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.3990.017</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.3990.041</td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5740.013</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.5810.021</td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>0.7320.002</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7410.007</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8240.006</td><td>0.8340.031</td><td>0.7770.022</td><td>0.4020.027</td><td>0.3140.014</td><td>0.8360.004</td><td>0.9100.003</td><td>0.7920.027</td><td>0.4630.003</td><td>0.4030.013</td></tr><tr><td>TILE</td><td>0.8050.013</td><td>0.6940.017</td><td>0.6710.004</td><td>0.4120.009</td><td>0.3840.005</td><td>0.6610.008</td><td>0.7790.004</td><td>0.6680.008</td><td>0.4530.061</td><td>0.3690.003</td></tr><tr><td>WRAP</td><td>0.8880.005</td><td>0.8820.009</td><td>0.7810.008</td><td>0.4500.020</td><td>0.3390.006</td><td>0.8860.009</td><td>0.8760.019</td><td>0.7870.010</td><td>0.5170.005</td><td>0.3390.006</td></tr><tr><td>GRID</td><td>0.8550.007</td><td>0.8440.002</td><td>0.7640.015</td><td>0.4110.026</td><td>0.2670.018</td><td>0.8420.032</td><td>0.8920.006</td><td>0.7920.009</td><td>0.4630.046</td><td>0.3220.038</td></tr><tr><td>THEORY</td><td>0.9380.014</td><td>0.9030.004</td><td>0.7880.007</td><td>0.4380.012</td><td>0.4250.006</td><td>0.8830.044</td><td>0.8910.017</td><td>0.7260.007</td><td>0.5490.059</td><td>0.4190.009</td></tr><tr><td>POLY2VEC</td><td>0.9550.011</td><td>0.9480.008</td><td>0.8310.002</td><td>0.4830.013</td><td>0.6820.003</td><td>0.9590.008</td><td>0.9840.012</td><td>0.8540.002</td><td>0.5880.012</td><td>0.6790.005</td></tr></table>
632
+
633
+ # A.11. Supplementary Results on Directional Relationship Classification
634
+
635
+ Table 7: Overall model Performance on directional relationship classification. Best and second best are highlighted.
636
+
637
+ <table><tr><td rowspan="2">Metric</td><td rowspan="2">Methods</td><td colspan="6">Singapore</td><td colspan="6">New York</td></tr><tr><td>point-point</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td><td>point-point</td><td>point-polyline</td><td>point-polygon</td><td>polyline-polyline</td><td>polyline-polygon</td><td>polygon-polygon</td></tr><tr><td rowspan="9">Precision</td><td>NUFTRESNET</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8280.009</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7830.010</td><td></td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8320.021</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7150.014</td><td></td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>-</td><td>0.2270.021</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.2320.012</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8820.006</td><td>0.8460.006</td><td>0.8470.005</td><td>0.8250.002</td><td>0.8130.005</td><td>0.7650.014</td><td>0.8800.003</td><td>0.7670.004</td><td>0.8430.002</td><td>0.6870.003</td><td>0.7940.003</td><td>0.7740.001</td></tr><tr><td>TILE</td><td>0.2590.001</td><td>0.2600.026</td><td>0.2860.038</td><td>0.3700.005</td><td>0.4660.001</td><td>0.4150.010</td><td>0.2930.001</td><td>0.2790.013</td><td>0.3220.005</td><td>0.2800.005</td><td>0.4960.002</td><td>0.3760.026</td></tr><tr><td>WRAP</td><td>0.8630.003</td><td>0.8100.007</td><td>0.8060.004</td><td>0.7900.002</td><td>0.8350.002</td><td>0.7890.001</td><td>0.8090.004</td><td>0.6840.002</td><td>0.7590.016</td><td>0.6100.021</td><td>0.7810.001</td><td>0.6670.007</td></tr><tr><td>GRID</td><td>0.8840.007</td><td>0.7330.007</td><td>0.7750.002</td><td>0.7080.001</td><td>0.6530.015</td><td>0.5450.144</td><td>0.8720.002</td><td>0.6050.001</td><td>0.6700.040</td><td>0.4410.003</td><td>0.7660.003</td><td>0.5140.074</td></tr><tr><td>THEORY</td><td>0.9080.017</td><td>0.8720.012</td><td>0.8630.004</td><td>0.8150.012</td><td>0.8380.006</td><td>0.7290.044</td><td>0.8810.017</td><td>0.7740.007</td><td>0.8090.008</td><td>0.6920.009</td><td>0.7890.005</td><td>0.5380.012</td></tr><tr><td>POLY2VEC</td><td>0.9280.016</td><td>0.9420.012</td><td>0.9180.004</td><td>0.9110.013</td><td>0.8980.021</td><td>0.8300.007</td><td>0.9210.006</td><td>0.8890.016</td><td>0.8750.004</td><td>0.8890.013</td><td>0.8530.007</td><td>0.7920.009</td></tr><tr><td rowspan="9">Recall</td><td>NUFTRESNET</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8190.010</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7470.010</td><td></td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7920.003</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.6850.004</td><td></td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>-</td><td>0.2160.023</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.2530.032</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8790.006</td><td>0.8410.006</td><td>0.8450.006</td><td>0.8200.002</td><td>0.8300.005</td><td>0.7520.017</td><td>0.8770.004</td><td>0.7660.005</td><td>0.8360.002</td><td>0.6530.007</td><td>0.7840.003</td><td>0.6940.003</td></tr><tr><td>TILE</td><td>0.2530.001</td><td>0.2690.002</td><td>0.2730.008</td><td>0.3240.001</td><td>0.4540.001</td><td>0.3950.003</td><td>0.2480.001</td><td>0.2570.004</td><td>0.3160.005</td><td>0.2170.001</td><td>0.4660.001</td><td>0.3480.012</td></tr><tr><td>WRAP</td><td>0.8610.003</td><td>0.8040.009</td><td>0.8030.004</td><td>0.7820.003</td><td>0.8310.002</td><td>0.7790.001</td><td>0.8100.004</td><td>0.6690.001</td><td>0.7590.016</td><td>0.5980.018</td><td>0.7720.002</td><td>0.6020.006</td></tr><tr><td>GRID</td><td>0.8820.002</td><td>0.7290.007</td><td>0.7720.002</td><td>0.6990.001</td><td>0.6410.016</td><td>0.5330.139</td><td>0.8680.002</td><td>0.5900.002</td><td>0.6470.050</td><td>0.4370.002</td><td>0.7520.003</td><td>0.4830.078</td></tr><tr><td>THEORY</td><td>0.8830.024</td><td>0.8670.009</td><td>0.8550.004</td><td>0.8630.012</td><td>0.5020.012</td><td>0.8970.014</td><td>0.7830.021</td><td>0.7910.007</td><td>0.8230.008</td><td>0.7090.009</td><td>0.8030.005</td><td>0.5670.012</td></tr><tr><td>POLY2VEC</td><td>0.9460.017</td><td>0.9470.021</td><td>0.9330.011</td><td>0.9030.008</td><td>0.8380.022</td><td>0.8260.007</td><td>0.9230.017</td><td>0.8940.012</td><td>0.8860.024</td><td>0.8780.013</td><td>0.8750.011</td><td>0.7930.012</td></tr><tr><td rowspan="9">F1</td><td>NUFTRESNET</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8210.010</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.7560.010</td><td></td></tr><tr><td>NUFTSPEC</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.8020.028</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.6670.023</td><td></td></tr><tr><td>T2VEC</td><td>-</td><td>-</td><td>-</td><td>0.2190.007</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>0.2520.018</td><td>-</td><td>-</td></tr><tr><td>DIRECT</td><td>0.8800.006</td><td>0.8410.006</td><td>0.8450.006</td><td>0.8210.002</td><td>0.8400.005</td><td>0.7540.016</td><td>0.8760.004</td><td>0.7690.005</td><td>0.8380.002</td><td>0.6560.009</td><td>0.7840.004</td><td>0.7120.002</td></tr><tr><td>TILE</td><td>0.2150.001</td><td>0.2260.005</td><td>0.2470.015</td><td>0.3090.003</td><td>0.4470.001</td><td>0.3880.004</td><td>0.2360.001</td><td>0.2120.011</td><td>0.2880.012</td><td>0.1930.002</td><td>0.4390.002</td><td>0.3390.018</td></tr><tr><td>WRAP</td><td>0.8610.003</td><td>0.8040.009</td><td>0.8030.004</td><td>0.7820.002</td><td>0.8310.002</td><td>0.7800.001</td><td>0.8090.004</td><td>0.6680.002</td><td>0.7520.017</td><td>0.5900.021</td><td>0.7690.002</td><td>0.6130.005</td></tr><tr><td>GRID</td><td>0.8820.007</td><td>0.7280.007</td><td>0.7720.002</td><td>0.6980.001</td><td>0.6400.017</td><td>0.5300.150</td><td>0.8680.002</td><td>0.5880.002</td><td>0.6490.049</td><td>0.4090.003</td><td>0.7490.003</td><td>0.4600.077</td></tr><tr><td>THEORY</td><td>0.9030.015</td><td>0.8520.009</td><td>0.8550.004</td><td>0.8420.012</td><td>0.8450.006</td><td>0.7410.044</td><td>0.8840.017</td><td>0.7520.007</td><td>0.8120.008</td><td>0.6680.009</td><td>0.7560.025</td><td>0.5370.22</td></tr><tr><td>POLY2VEC</td><td>0.9280.015</td><td>0.9270.032</td><td>0.9180.029</td><td>0.9010.017</td><td>0.8990.016</td><td>0.8270.022</td><td>0.8920.012</td><td>0.8830.014</td><td>0.9030.013</td><td>0.8770.004</td><td>0.8320.003</td><td>0.7690.019</td></tr></table>
638
+
639
+ # A.12. Supplementary Results on Distance Estimation
640
+
641
+ Table 8: Overall model performance on distance estimation. Best and second best are highlighted.
642
+
643
+ <table><tr><td>Dataset</td><td>Model</td><td>point-point</td><td>point-polyline</td><td>point-polygon</td></tr><tr><td rowspan="6">Singapore</td><td>DIRECT</td><td>0.088±0.041</td><td>0.093±0.013</td><td>0.084±0.021</td></tr><tr><td>TILE</td><td>0.252 ±0.002</td><td>0.177±0.007</td><td>0.157±0.001</td></tr><tr><td>WRAP</td><td>0.085±0.009</td><td>0.106±0.012</td><td>0.102±0.007</td></tr><tr><td>GRID</td><td>0.087±0.006</td><td>0.107±0.003</td><td>0.108±0.002</td></tr><tr><td>THEORY</td><td>0.065±0.019</td><td>0.083±0.027</td><td>0.079±0.028</td></tr><tr><td>POLY2VEC</td><td>0.016±0.001</td><td>0.043±0.011</td><td>0.029±0.009</td></tr><tr><td rowspan="6">New York</td><td>DIRECT</td><td>0.075±0.017</td><td>0.126±0.041</td><td>0.115±0.033</td></tr><tr><td>TILE</td><td>0.271±0.005</td><td>0.170±0.004</td><td>0.189±0.004</td></tr><tr><td>WRAP</td><td>0.106±0.003</td><td>0.148±0.001</td><td>0.146±0.009</td></tr><tr><td>GRID</td><td>0.073±0.001</td><td>0.124±0.004</td><td>0.118±0.011</td></tr><tr><td>THEORY</td><td>0.068±0.008</td><td>0.089±0.074</td><td>0.102±0.061</td></tr><tr><td>POLY2VEC</td><td>0.030±0.007</td><td>0.049±0.004</td><td>0.042±0.021</td></tr></table>
644
+
645
+ ![](images/95bee3fe825bdf359eff3f56e49d26fb2299619724541871f21456ab5ad678ee.jpg)
646
+ (a) Direct
647
+
648
+ ![](images/2664c7789ebed96b6d8b3cb6982e40d55e4c1fd2a0fddf24e423dd499b604faa.jpg)
649
+ (b) Tile
650
+
651
+ ![](images/5d445f8daa02e6092786f7d9a324d96ab795fb6b57af433d890b807a10f4c011.jpg)
652
+ Original distances
653
+
654
+ ![](images/1c7533379457631a05ef74a3ba6cddb0011735ec2a802dec9c1a96fe7fd87171.jpg)
655
+ (c) Wrap
656
+
657
+ ![](images/531dbc6702a565fc760f9a695fdb07d0a3e3100e2ab17ea3d81aba4bbdd9ccbe.jpg)
658
+ (e) Theory
659
+ Figure 6: Distance scatters of point-polygon pairs on NewYork dataset for different encoders.
660
+
661
+ ![](images/179b8a77408553396a230eff1c0d8271857cdf7948340c89b6b3f591a9da39c8.jpg)
662
+ Original distances
663
+ (f) Poly2Vec
664
+
665
+ ![](images/a211b2ebdc7f81ccaaac21a5b0922bf782b5e8020757f07d0923dfcab7cf26d3.jpg)
666
+ (a) Direct
667
+
668
+ ![](images/536a31d7e0448e73035ece8d1a28e946dbb2f656f067e7e72fa04eb978dcb5ed.jpg)
669
+ (b) Tile
670
+
671
+ ![](images/8d3baef3b45fe4bc9cda561dbe58cf183b8bbe6edf52e4433b6812212e336ebf.jpg)
672
+ (c) Wrap
673
+
674
+ ![](images/82615e0518f1aeaa4b7e0a551e95a78f724f4e1f029871ffcebb963c7a10b73b.jpg)
675
+ (d) Grid
676
+
677
+ ![](images/60bb00ab3a86dda3f0841adb2b18e86223e6160a4014ca66ccf7b55cb55ac71b.jpg)
678
+ (e) Theory
679
+
680
+ ![](images/e73fd5e797fa041b477a836bcb65696a5916a575df3e9c643edbb14606352400.jpg)
681
+ (f) Poly2Vec
682
+
683
+ ![](images/4df2841809a7aa9c8077844411cc6972ec585f696f9c301635fcbb55758039c4.jpg)
684
+ Figure 7: Distance scatters of point-polyline pairs on Singapore dataset for different encoders.
685
+ (a) Direct
686
+
687
+ ![](images/131f732a026744b272e73e80ef17c5c50726af7861500f2d7153cafd6536f4c8.jpg)
688
+ (b) Tile
689
+
690
+ ![](images/d5bc07057e9045f3dc5945fa175ea0792d60cec4a33e8cf09afb347e59202dd6.jpg)
691
+ (c) Wrap
692
+
693
+ ![](images/016cc3302414809b098cb44f91b1efb9530e5a5ad6e187fdf1dbf36b7976f7d8.jpg)
694
+ (d) Grid
695
+
696
+ ![](images/e284860d35f296614b231ac020d6c31d0a3ddcfefffc775a2dd3ef27dba0c883.jpg)
697
+ (e) Theory
698
+
699
+ ![](images/efbe24b38d042b1771b05bb98709fdc693b1a0a943faa22490a16a498162e314.jpg)
700
+ (f) Poly2Vec
701
+
702
+ ![](images/1336be736294997dc4c7a1f526b3cae745c1b315b49c286f2040f4c8c6758e77.jpg)
703
+ Figure 8: Distance scatters of point-polyline pairs on NewYork dataset for different encoders.
704
+ (a) Direct
705
+
706
+ ![](images/24c1416d40ae91eea1613c44b637d8885dada189a47309dd42ffba864b4a0776.jpg)
707
+ (b) Tile
708
+
709
+ ![](images/3323f277dbc48e7c2f0db7bd847b48861d75dd5ae3ca38f6dbab848cb9d8a61b.jpg)
710
+ (c) Wrap
711
+
712
+ ![](images/aa40056f6c48bb7bf22d584d6d166b9df058974f0c6ec75a76ec218dc001ad1c.jpg)
713
+ (d) Grid
714
+
715
+ ![](images/e135ac1f8864e8616976983c400a1848b6d86b266db135e60f08a9ccc3ba174b.jpg)
716
+ (e) Theory
717
+
718
+ ![](images/b51eb9f9d3ee9cc495ec0709b9d6e8405e9c4f45f9adba2302642e2a6399db68.jpg)
719
+ (f) Poly2Vec
720
+
721
+ ![](images/71333bbd36f2b40b38a1af8d3d9e121b458450e98351149a87b7004f9e69d6e3.jpg)
722
+ Figure 9: Distance scatters of point-point pairs on Singapore dataset for different encoders.
723
+ (a) Direct
724
+ Figure 10: Distance scatters of point-point pairs on NewYork dataset for different encoders.
725
+
726
+ ![](images/aa4f1819c680d96296839988b728604bd14f251c2a13511053aa0f8b39a73782.jpg)
727
+ (b) Tile
728
+
729
+ ![](images/fb2f3b0a59e5225b1a846617567de8d1402f2b7674207f16a798e8a6e335f8a7.jpg)
730
+ (c) Wrap
731
+
732
+ ![](images/fdc806dee7feff4bb1d3fd08eef27c1c679b8593f82b3fd19605c56eb3faf119.jpg)
733
+ (d) Grid
734
+
735
+ ![](images/4de332123ccda76cd2357c244f19324eab03abd60f48ee23af3eccbb24690514.jpg)
736
+ (e) Theory
737
+
738
+ ![](images/c7e88a5fd73a65f7244de7cb27217ede21f426a92e870623eb14e0be62348366.jpg)
739
+ (f) Poly2Vec
740
+
741
+ # A.13. Supplementary Ablation Experiments
742
+
743
+ # A.13.1.EFFECT OF LEARNED FUSION MODULE
744
+
745
+ We've shown the effect of learned fusion on point-polygon tasks in Section 4.3. We demonstrate its effect on the rest of spatial reasoning tasks in Figures 12a, 12b, 11a, and 11b. We again observe similar trends as reported in the main evaluation.
746
+
747
+ ![](images/3d23fac4c3fa60ccfa1ccefa5bd3b066f7dc8964802d21ace4b7087708ef5377.jpg)
748
+
749
+ ![](images/5b9dd6a925c21abd0babd4ce93f696db863dcfa02e4c5f1e4ee7b81a32879c87.jpg)
750
+ (a) Topological relationship classification
751
+ (a) Polyline-polygon pairs
752
+ Figure 11: Effect of learned fusion on polyline-polygon and polygon-polygon pairs
753
+
754
+ ![](images/576450bd83f14e99edcb58cc1ff07a949ba3d9d09a8d0d4e7bf41ab96d25d14a.jpg)
755
+ (b) Directional relationship classification
756
+
757
+ ![](images/46e92cb4731698d98c3534a0c6d9387c76baa0a857e8a2fcb429208c97cde058.jpg)
758
+
759
+ ![](images/b3bbea3821cd9c82f11eb610dedcf545d9903ba0da46f9abd40e5c31597d2089.jpg)
760
+ (a) Topological relationship classification
761
+ (b) Polygon-polygon pairs
762
+
763
+ ![](images/2b770d07a5a590a89ce45b43ed1d3237a12069c78ab0d34ae4e0a598072e7018.jpg)
764
+ (b) Directional relationship classification
765
+
766
+ ![](images/e3851b424a09644ddcd15544be80bc8c0c43c9c3dbf71d0f5de614a72a4005b3.jpg)
767
+ (a) Point-point pairs
768
+
769
+ ![](images/ebb5d31cf6a21387b8982dbf40a946690489abc3bd893e16d43ba372ab8d2108.jpg)
770
+ (b) Point-polyline pairs
771
+ Figure 12: Effect of learned fusion on point-polygon and point-polyline pairs
772
+
773
+ # A.13.2.EFFECT OF EMBEDDING SIZE $d$
774
+
775
+ ![](images/af90bff60657c52150c9c318ee1ff8d75f604340b17c069317ddae0378652d30.jpg)
776
+ Figure 13: Effect of embedding size on topological relationship classification
777
+
778
+ ![](images/1589204e06e84a90fd8f41812b2cb721c0a9c227b465a4e076b85d4547559422.jpg)
779
+
780
+ ![](images/7fa84638171e57ba1afb343beda03f0768a461bf94e549fa28bd0b7135506e6d.jpg)
781
+ Figure 14: Effect of embedding size on directional relationship classification
782
+
783
+ ![](images/6cc5feb427d957be3d3e0072069f3468387462d18e18f0692eb2acddaffcd697.jpg)
784
+
785
+ ![](images/8a722e17ece58cc47de1ccb1a7b9cf8cb0926e4da3eb86ce2b006a9e936d3ff7.jpg)
786
+ Figure 15: Effect of embedding size in distance estimation
787
+
788
+ ![](images/66decc32f012045b431967f71f368f55371c953e9307a2eba2f6c97785109b02.jpg)
789
+
790
+ # A.13.3.EFFECT OF NUMBER OF FREQUENCY COMPONENTS $W$
791
+
792
+ ![](images/590b79288e1529100179bad8f5f9496d18f03f4dc96adff21bed29a8ba7c7bb0.jpg)
793
+ Figure 16: Effect of # of freq. components on topological relationship classification
794
+
795
+ ![](images/77ee4213f25df48a19d0a9f9be125c1ee388519b2bb363686d23b02877df937f.jpg)
796
+
797
+ ![](images/868725f63c1aa3de745d374b28914461492ac471dc19c8c4573520094e19dc8c.jpg)
798
+ Figure 17: Effect of # of freq. components on directional relationship classification
799
+
800
+ ![](images/075c3581443274f45ba56b9b9af2d48b73d8f94e467f6508da51c353fafb7c2e.jpg)
801
+
802
+ ![](images/e38ba80572c9095709f9a88db5fe497d46ca61554a68360e5ecb661e547eca97.jpg)
803
+ Figure 18: Effect of # of freq. components in distance estimation
804
+
805
+ ![](images/def2536c600fb10b76a966e113b9e96f03648cd2799885dd7ab9348dcbbea15d.jpg)
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86a22fcb5e1b9a0762108dc8f2d62b62c4bda31e741dab15544d058b2069990e
3
+ size 2218956
2025/Poly2Vec_ Polymorphic Fourier-Based Encoding of Geospatial Objects for GeoAI Applications/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/PolyConf_ Unlocking Polymer Conformation Generation through Hierarchical Generative Models/f2a24b6e-9516-4f28-a001-51733fc3e873_content_list.json ADDED
The diff for this file is too large to render. See raw diff