Chelsea707 commited on
Commit
52d0f75
·
verified ·
1 Parent(s): 9dc8b9a

Add Batch 096cf766-f422-4619-aaa4-343d221feed4 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 +64 -0
  2. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_content_list.json +0 -0
  3. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_model.json +0 -0
  4. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_origin.pdf +3 -0
  5. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/full.md +680 -0
  6. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/images.zip +3 -0
  7. 2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/layout.json +0 -0
  8. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_content_list.json +0 -0
  9. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_model.json +0 -0
  10. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_origin.pdf +3 -0
  11. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/full.md +493 -0
  12. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/images.zip +3 -0
  13. 2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/layout.json +0 -0
  14. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_content_list.json +0 -0
  15. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_model.json +0 -0
  16. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_origin.pdf +3 -0
  17. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/full.md +389 -0
  18. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/images.zip +3 -0
  19. 2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/layout.json +0 -0
  20. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_content_list.json +0 -0
  21. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_model.json +0 -0
  22. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_origin.pdf +3 -0
  23. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/full.md +518 -0
  24. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/images.zip +3 -0
  25. 2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/layout.json +0 -0
  26. 2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_content_list.json +1782 -0
  27. 2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_model.json +0 -0
  28. 2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_origin.pdf +3 -0
  29. 2024/Recursive Generalization Transformer for Image Super-Resolution/full.md +322 -0
  30. 2024/Recursive Generalization Transformer for Image Super-Resolution/images.zip +3 -0
  31. 2024/Recursive Generalization Transformer for Image Super-Resolution/layout.json +0 -0
  32. 2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_content_list.json +0 -0
  33. 2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_model.json +0 -0
  34. 2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_origin.pdf +3 -0
  35. 2024/Reinforcement Symbolic Regression Machine/full.md +512 -0
  36. 2024/Reinforcement Symbolic Regression Machine/images.zip +3 -0
  37. 2024/Reinforcement Symbolic Regression Machine/layout.json +0 -0
  38. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_content_list.json +0 -0
  39. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_model.json +0 -0
  40. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_origin.pdf +3 -0
  41. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/full.md +0 -0
  42. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/images.zip +3 -0
  43. 2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/layout.json +0 -0
  44. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_content_list.json +0 -0
  45. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_model.json +0 -0
  46. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_origin.pdf +3 -0
  47. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/full.md +558 -0
  48. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/images.zip +3 -0
  49. 2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/layout.json +0 -0
  50. 2024/Removing Biases from Molecular Representations via Information Maximization/f1893893-ca2b-4f44-86df-255efa54dd43_content_list.json +0 -0
.gitattributes CHANGED
@@ -5157,3 +5157,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
5157
  2024/ReTaSA_[[:space:]]A[[:space:]]Nonparametric[[:space:]]Functional[[:space:]]Estimation[[:space:]]Approach[[:space:]]for[[:space:]]Addressing[[:space:]]Continuous[[:space:]]Target[[:space:]]Shift/c16d1355-970e-40dc-914d-dd59f9e61842_origin.pdf filter=lfs diff=lfs merge=lfs -text
5158
  2024/Real-Fake_[[:space:]]Effective[[:space:]]Training[[:space:]]Data[[:space:]]Synthesis[[:space:]]Through[[:space:]]Distribution[[:space:]]Matching/52452b58-25b9-4dfd-b54b-40e450e0c0c4_origin.pdf filter=lfs diff=lfs merge=lfs -text
5159
  2024/Real-time[[:space:]]Photorealistic[[:space:]]Dynamic[[:space:]]Scene[[:space:]]Representation[[:space:]]and[[:space:]]Rendering[[:space:]]with[[:space:]]4D[[:space:]]Gaussian[[:space:]]Splatting/310ae6fe-c50e-47ea-aa24-7968db752a28_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5157
  2024/ReTaSA_[[:space:]]A[[:space:]]Nonparametric[[:space:]]Functional[[:space:]]Estimation[[:space:]]Approach[[:space:]]for[[:space:]]Addressing[[:space:]]Continuous[[:space:]]Target[[:space:]]Shift/c16d1355-970e-40dc-914d-dd59f9e61842_origin.pdf filter=lfs diff=lfs merge=lfs -text
5158
  2024/Real-Fake_[[:space:]]Effective[[:space:]]Training[[:space:]]Data[[:space:]]Synthesis[[:space:]]Through[[:space:]]Distribution[[:space:]]Matching/52452b58-25b9-4dfd-b54b-40e450e0c0c4_origin.pdf filter=lfs diff=lfs merge=lfs -text
5159
  2024/Real-time[[:space:]]Photorealistic[[:space:]]Dynamic[[:space:]]Scene[[:space:]]Representation[[:space:]]and[[:space:]]Rendering[[:space:]]with[[:space:]]4D[[:space:]]Gaussian[[:space:]]Splatting/310ae6fe-c50e-47ea-aa24-7968db752a28_origin.pdf filter=lfs diff=lfs merge=lfs -text
5160
+ 2024/Reasoning[[:space:]]on[[:space:]]Graphs_[[:space:]]Faithful[[:space:]]and[[:space:]]Interpretable[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5161
+ 2024/Reasoning[[:space:]]with[[:space:]]Latent[[:space:]]Diffusion[[:space:]]in[[:space:]]Offline[[:space:]]Reinforcement[[:space:]]Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_origin.pdf filter=lfs diff=lfs merge=lfs -text
5162
+ 2024/Reclaiming[[:space:]]the[[:space:]]Source[[:space:]]of[[:space:]]Programmatic[[:space:]]Policies_[[:space:]]Programmatic[[:space:]]versus[[:space:]]Latent[[:space:]]Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_origin.pdf filter=lfs diff=lfs merge=lfs -text
5163
+ 2024/Reconciling[[:space:]]Spatial[[:space:]]and[[:space:]]Temporal[[:space:]]Abstractions[[:space:]]for[[:space:]]Goal[[:space:]]Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_origin.pdf filter=lfs diff=lfs merge=lfs -text
5164
+ 2024/Recursive[[:space:]]Generalization[[:space:]]Transformer[[:space:]]for[[:space:]]Image[[:space:]]Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_origin.pdf filter=lfs diff=lfs merge=lfs -text
5165
+ 2024/Reinforcement[[:space:]]Symbolic[[:space:]]Regression[[:space:]]Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_origin.pdf filter=lfs diff=lfs merge=lfs -text
5166
+ 2024/Relaxing[[:space:]]the[[:space:]]Additivity[[:space:]]Constraints[[:space:]]in[[:space:]]Decentralized[[:space:]]No-Regret[[:space:]]High-Dimensional[[:space:]]Bayesian[[:space:]]Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5167
+ 2024/Remote[[:space:]]Sensing[[:space:]]Vision-Language[[:space:]]Foundation[[:space:]]Models[[:space:]]without[[:space:]]Annotations[[:space:]]via[[:space:]]Ground[[:space:]]Remote[[:space:]]Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
5168
+ 2024/Removing[[:space:]]Biases[[:space:]]from[[:space:]]Molecular[[:space:]]Representations[[:space:]]via[[:space:]]Information[[:space:]]Maximization/f1893893-ca2b-4f44-86df-255efa54dd43_origin.pdf filter=lfs diff=lfs merge=lfs -text
5169
+ 2024/Repeated[[:space:]]Random[[:space:]]Sampling[[:space:]]for[[:space:]]Minimizing[[:space:]]the[[:space:]]Time-to-Accuracy[[:space:]]of[[:space:]]Learning/0183f63b-06be-4c48-8558-b390666b1c5e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5170
+ 2024/Repelling[[:space:]]Random[[:space:]]Walks/e75dc00e-1df4-4050-81a1-7450a8f2ac51_origin.pdf filter=lfs diff=lfs merge=lfs -text
5171
+ 2024/Rephrase,[[:space:]]Augment,[[:space:]]Reason_[[:space:]]Visual[[:space:]]Grounding[[:space:]]of[[:space:]]Questions[[:space:]]for[[:space:]]Vision-Language[[:space:]]Models/89415cc4-a512-4af5-946e-dc30413d6f8c_origin.pdf filter=lfs diff=lfs merge=lfs -text
5172
+ 2024/Replay[[:space:]]across[[:space:]]Experiments_[[:space:]]A[[:space:]]Natural[[:space:]]Extension[[:space:]]of[[:space:]]Off-Policy[[:space:]]RL/9ebef4b8-dc5d-461e-bde8-fad7074b356c_origin.pdf filter=lfs diff=lfs merge=lfs -text
5173
+ 2024/RepoBench_[[:space:]]Benchmarking[[:space:]]Repository-Level[[:space:]]Code[[:space:]]Auto-Completion[[:space:]]Systems/3d06e311-a776-4ca9-a748-1adff95619e6_origin.pdf filter=lfs diff=lfs merge=lfs -text
5174
+ 2024/Representation[[:space:]]Deficiency[[:space:]]in[[:space:]]Masked[[:space:]]Language[[:space:]]Modeling/c65b7ada-8638-4d5f-82cf-24ff914584f5_origin.pdf filter=lfs diff=lfs merge=lfs -text
5175
+ 2024/Respect[[:space:]]the[[:space:]]model_[[:space:]]Fine-grained[[:space:]]and[[:space:]]Robust[[:space:]]Explanation[[:space:]]with[[:space:]]Sharing[[:space:]]Ratio[[:space:]]Decomposition/6209e926-e195-4ec2-93c2-8540e80074aa_origin.pdf filter=lfs diff=lfs merge=lfs -text
5176
+ 2024/Rethinking[[:space:]]Adversarial[[:space:]]Policies_[[:space:]]A[[:space:]]Generalized[[:space:]]Attack[[:space:]]Formulation[[:space:]]and[[:space:]]Provable[[:space:]]Defense[[:space:]]in[[:space:]]RL/361f255e-50b1-4c40-b138-0e9acee986dd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5177
+ 2024/Rethinking[[:space:]]Backdoor[[:space:]]Attacks[[:space:]]on[[:space:]]Dataset[[:space:]]Distillation_[[:space:]]A[[:space:]]Kernel[[:space:]]Method[[:space:]]Perspective/d7cf55a4-3349-4545-a257-75076c710b90_origin.pdf filter=lfs diff=lfs merge=lfs -text
5178
+ 2024/Rethinking[[:space:]]Branching[[:space:]]on[[:space:]]Exact[[:space:]]Combinatorial[[:space:]]Optimization[[:space:]]Solver_[[:space:]]The[[:space:]]First[[:space:]]Deep[[:space:]]Symbolic[[:space:]]Discovery[[:space:]]Framework/e85803fd-186c-495e-8340-da524e178043_origin.pdf filter=lfs diff=lfs merge=lfs -text
5179
+ 2024/Rethinking[[:space:]]CNN’s[[:space:]]Generalization[[:space:]]to[[:space:]]Backdoor[[:space:]]Attack[[:space:]]from[[:space:]]Frequency[[:space:]]Domain/7177cdc0-8933-4e85-adf7-a009a62ddfde_origin.pdf filter=lfs diff=lfs merge=lfs -text
5180
+ 2024/Rethinking[[:space:]]Channel[[:space:]]Dependence[[:space:]]for[[:space:]]Multivariate[[:space:]]Time[[:space:]]Series[[:space:]]Forecasting_[[:space:]]Learning[[:space:]]from[[:space:]]Leading[[:space:]]Indicators/7266ffef-f30d-478b-8d5b-52c8f806acdd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5181
+ 2024/Rethinking[[:space:]]Channel[[:space:]]Dimensions[[:space:]]to[[:space:]]Isolate[[:space:]]Outliers[[:space:]]for[[:space:]]Low-bit[[:space:]]Weight[[:space:]]Quantization[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/ef004cc3-c34c-4d20-aae8-abb48da92ac9_origin.pdf filter=lfs diff=lfs merge=lfs -text
5182
+ 2024/Rethinking[[:space:]]Complex[[:space:]]Queries[[:space:]]on[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]with[[:space:]]Neural[[:space:]]Link[[:space:]]Predictors/f8a970f6-56a9-4981-9d2a-2edf3939d0e2_origin.pdf filter=lfs diff=lfs merge=lfs -text
5183
+ 2024/Rethinking[[:space:]]Information-theoretic[[:space:]]Generalization_[[:space:]]Loss[[:space:]]Entropy[[:space:]]Induced[[:space:]]PAC[[:space:]]Bounds/21d0d6b3-54fe-466d-9b94-12e754611f06_origin.pdf filter=lfs diff=lfs merge=lfs -text
5184
+ 2024/Rethinking[[:space:]]Label[[:space:]]Poisoning[[:space:]]for[[:space:]]GNNs_[[:space:]]Pitfalls[[:space:]]and[[:space:]]Attacks/d57413da-7caa-41af-ae0a-651349bda592_origin.pdf filter=lfs diff=lfs merge=lfs -text
5185
+ 2024/Rethinking[[:space:]]Model[[:space:]]Ensemble[[:space:]]in[[:space:]]Transfer-based[[:space:]]Adversarial[[:space:]]Attacks/1f794a8c-ae2a-4236-ac8f-ffcc636877b8_origin.pdf filter=lfs diff=lfs merge=lfs -text
5186
+ 2024/Rethinking[[:space:]]and[[:space:]]Extending[[:space:]]the[[:space:]]Probabilistic[[:space:]]Inference[[:space:]]Capacity[[:space:]]of[[:space:]]GNNs/3d69f90f-4326-4b95-be66-43566d201db6_origin.pdf filter=lfs diff=lfs merge=lfs -text
5187
+ 2024/Rethinking[[:space:]]the[[:space:]]Benefits[[:space:]]of[[:space:]]Steerable[[:space:]]Features[[:space:]]in[[:space:]]3D[[:space:]]Equivariant[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/59113253-73ec-46da-bf65-dea4ba71401d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5188
+ 2024/Rethinking[[:space:]]the[[:space:]]Power[[:space:]]of[[:space:]]Graph[[:space:]]Canonization[[:space:]]in[[:space:]]Graph[[:space:]]Representation[[:space:]]Learning[[:space:]]with[[:space:]]Stability/5bbfc934-9c41-4fa5-a675-640eec09a195_origin.pdf filter=lfs diff=lfs merge=lfs -text
5189
+ 2024/Rethinking[[:space:]]the[[:space:]]Uniformity[[:space:]]Metric[[:space:]]in[[:space:]]Self-Supervised[[:space:]]Learning/edb32be1-2e82-41ec-8a2d-e2c016e7287c_origin.pdf filter=lfs diff=lfs merge=lfs -text
5190
+ 2024/Rethinking[[:space:]]the[[:space:]]symmetry-preserving[[:space:]]circuits[[:space:]]for[[:space:]]constrained[[:space:]]variational[[:space:]]quantum[[:space:]]algorithms/c9f63a9c-f0f1-4c3e-8fda-fa7c811dfc45_origin.pdf filter=lfs diff=lfs merge=lfs -text
5191
+ 2024/Retrieval[[:space:]]is[[:space:]]Accurate[[:space:]]Generation/99d0d226-6a58-4c30-99f3-00e97ade656f_origin.pdf filter=lfs diff=lfs merge=lfs -text
5192
+ 2024/Retrieval[[:space:]]meets[[:space:]]Long[[:space:]]Context[[:space:]]Large[[:space:]]Language[[:space:]]Models/c4684955-d1ad-45e2-b8ea-1f6370d075b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
5193
+ 2024/Retrieval-Enhanced[[:space:]]Contrastive[[:space:]]Vision-Text[[:space:]]Models/fbf2441a-67f1-4da9-b065-83d6d5c2b825_origin.pdf filter=lfs diff=lfs merge=lfs -text
5194
+ 2024/Retrieval-Guided[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]for[[:space:]]Boolean[[:space:]]Circuit[[:space:]]Minimization/a6e6dff9-d4f7-4267-866b-1c4f7ef59b86_origin.pdf filter=lfs diff=lfs merge=lfs -text
5195
+ 2024/Retro-fallback_[[:space:]]retrosynthetic[[:space:]]planning[[:space:]]in[[:space:]]an[[:space:]]uncertain[[:space:]]world/6a9157a5-6031-415a-baa1-1bf8b2fb1738_origin.pdf filter=lfs diff=lfs merge=lfs -text
5196
+ 2024/Reverse[[:space:]]Diffusion[[:space:]]Monte[[:space:]]Carlo/7ad5473f-c154-48d9-8678-c07f7e0121b3_origin.pdf filter=lfs diff=lfs merge=lfs -text
5197
+ 2024/Reverse[[:space:]]Forward[[:space:]]Curriculum[[:space:]]Learning[[:space:]]for[[:space:]]Extreme[[:space:]]Sample[[:space:]]and[[:space:]]Demo[[:space:]]Efficiency/a4ccd7fa-d5ed-4273-8553-20055b3a9ce2_origin.pdf filter=lfs diff=lfs merge=lfs -text
5198
+ 2024/Revisit[[:space:]]and[[:space:]]Outstrip[[:space:]]Entity[[:space:]]Alignment_[[:space:]]A[[:space:]]Perspective[[:space:]]of[[:space:]]Generative[[:space:]]Models/2bc8a42b-ab36-4ce9-9423-77e4ae49e2c0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5199
+ 2024/Revisiting[[:space:]]Data[[:space:]]Augmentation[[:space:]]in[[:space:]]Deep[[:space:]]Reinforcement[[:space:]]Learning/1f4016e2-4f62-4294-a549-ce201d325c31_origin.pdf filter=lfs diff=lfs merge=lfs -text
5200
+ 2024/Revisiting[[:space:]]Deep[[:space:]]Audio-Text[[:space:]]Retrieval[[:space:]]Through[[:space:]]the[[:space:]]Lens[[:space:]]of[[:space:]]Transportation/70451d0f-dd65-4e22-912e-0246dd787f33_origin.pdf filter=lfs diff=lfs merge=lfs -text
5201
+ 2024/Revisiting[[:space:]]Link[[:space:]]Prediction_[[:space:]]a[[:space:]]data[[:space:]]perspective/87ec1c21-b000-4b11-becf-75182a0630b8_origin.pdf filter=lfs diff=lfs merge=lfs -text
5202
+ 2024/Revisiting[[:space:]]Plasticity[[:space:]]in[[:space:]]Visual[[:space:]]Reinforcement[[:space:]]Learning_[[:space:]]Data,[[:space:]]Modules[[:space:]]and[[:space:]]Training[[:space:]]Stages/eee0275a-6b2f-4f54-9f64-eec01f61555e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5203
+ 2024/Revisiting[[:space:]]the[[:space:]]Last-Iterate[[:space:]]Convergence[[:space:]]of[[:space:]]Stochastic[[:space:]]Gradient[[:space:]]Methods/bea1d1fc-7724-4976-ad39-56f4c5ba0827_origin.pdf filter=lfs diff=lfs merge=lfs -text
5204
+ 2024/Reward[[:space:]]Design[[:space:]]for[[:space:]]Justifiable[[:space:]]Sequential[[:space:]]Decision-Making/70650dec-ac64-4e03-b3d0-f0ff5b39a692_origin.pdf filter=lfs diff=lfs merge=lfs -text
5205
+ 2024/Reward[[:space:]]Model[[:space:]]Ensembles[[:space:]]Help[[:space:]]Mitigate[[:space:]]Overoptimization/789bb85a-629c-4162-b414-a55e422f5088_origin.pdf filter=lfs diff=lfs merge=lfs -text
5206
+ 2024/Reward-Free[[:space:]]Curricula[[:space:]]for[[:space:]]Training[[:space:]]Robust[[:space:]]World[[:space:]]Models/76da8889-c34e-460d-8570-47c1a264affe_origin.pdf filter=lfs diff=lfs merge=lfs -text
5207
+ 2024/Rigid[[:space:]]Protein-Protein[[:space:]]Docking[[:space:]]via[[:space:]]Equivariant[[:space:]]Elliptic-Paraboloid[[:space:]]Interface[[:space:]]Prediction/ecd900b8-5468-4d00-8b0b-1b75d6750b15_origin.pdf filter=lfs diff=lfs merge=lfs -text
5208
+ 2024/Ring-A-Bell![[:space:]]How[[:space:]]Reliable[[:space:]]are[[:space:]]Concept[[:space:]]Removal[[:space:]]Methods[[:space:]]For[[:space:]]Diffusion[[:space:]]Models_/82c61803-fa7c-45a8-a58c-4804a6587dd3_origin.pdf filter=lfs diff=lfs merge=lfs -text
5209
+ 2024/RingAttention[[:space:]]with[[:space:]]Blockwise[[:space:]]Transformers[[:space:]]for[[:space:]]Near-Infinite[[:space:]]Context/9f2a155d-1084-49aa-9c0c-3e1f1f267e2a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5210
+ 2024/Risk[[:space:]]Bounds[[:space:]]of[[:space:]]Accelerated[[:space:]]SGD[[:space:]]for[[:space:]]Overparameterized[[:space:]]Linear[[:space:]]Regression/8ac5d420-a4d6-4a1a-b7a6-a1db7009354a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5211
+ 2024/Robot[[:space:]]Fleet[[:space:]]Learning[[:space:]]via[[:space:]]Policy[[:space:]]Merging/c58dba33-9411-419f-b631-762a7e4d466f_origin.pdf filter=lfs diff=lfs merge=lfs -text
5212
+ 2024/Robust[[:space:]]Angular[[:space:]]Synchronization[[:space:]]via[[:space:]]Directed[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/a69170c6-5cd4-494a-880b-0c55e8cdce91_origin.pdf filter=lfs diff=lfs merge=lfs -text
5213
+ 2024/Robust[[:space:]]Classification[[:space:]]via[[:space:]]Regression[[:space:]]for[[:space:]]Learning[[:space:]]with[[:space:]]Noisy[[:space:]]Labels/e8fa2911-a37f-435f-b0e0-181560bab05a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5214
+ 2024/Robust[[:space:]]Model[[:space:]]Based[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]Using[[:space:]]$_mathcal{L}_1$[[:space:]]Adaptive[[:space:]]Control/de70456b-8bd0-4dae-9401-a7a44b673682_origin.pdf filter=lfs diff=lfs merge=lfs -text
5215
+ 2024/Robust[[:space:]]Model-Based[[:space:]]Optimization[[:space:]]for[[:space:]]Challenging[[:space:]]Fitness[[:space:]]Landscapes/e8178ad5-45a6-4816-a9d3-fb830893c898_origin.pdf filter=lfs diff=lfs merge=lfs -text
5216
+ 2024/Robust[[:space:]]NAS[[:space:]]under[[:space:]]adversarial[[:space:]]training_[[:space:]]benchmark,[[:space:]]theory,[[:space:]]and[[:space:]]beyond/bf25e2ba-dd63-46b4-8e8f-e5e79e8eaeef_origin.pdf filter=lfs diff=lfs merge=lfs -text
5217
+ 2024/Robust[[:space:]]Similarity[[:space:]]Learning[[:space:]]with[[:space:]]Difference[[:space:]]Alignment[[:space:]]Regularization/d670e241-9bbb-46c2-94ae-6debdff7dbf1_origin.pdf filter=lfs diff=lfs merge=lfs -text
5218
+ 2024/Robust[[:space:]]Training[[:space:]]of[[:space:]]Federated[[:space:]]Models[[:space:]]with[[:space:]]Extremely[[:space:]]Label[[:space:]]Deficiency/2fb08438-dd03-4ade-9046-a17e1e22e00b_origin.pdf filter=lfs diff=lfs merge=lfs -text
5219
+ 2024/RobustTSF_[[:space:]]Towards[[:space:]]Theory[[:space:]]and[[:space:]]Design[[:space:]]of[[:space:]]Robust[[:space:]]Time[[:space:]]Series[[:space:]]Forecasting[[:space:]]with[[:space:]]Anomalies/ba78e10f-edd1-4d24-b46c-085d9153d9ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
5220
+ 2024/Robustifying[[:space:]]and[[:space:]]Boosting[[:space:]]Training-Free[[:space:]]Neural[[:space:]]Architecture[[:space:]]Search/161b5f12-6354-4936-9799-216b260afa40_origin.pdf filter=lfs diff=lfs merge=lfs -text
5221
+ 2024/Robustness[[:space:]]of[[:space:]]AI-Image[[:space:]]Detectors_[[:space:]]Fundamental[[:space:]]Limits[[:space:]]and[[:space:]]Practical[[:space:]]Attacks/2557f37e-e96e-4a44-8ae6-24e9ce502a17_origin.pdf filter=lfs diff=lfs merge=lfs -text
5222
+ 2024/S$2$AC_[[:space:]]Energy-Based[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Stein[[:space:]]Soft[[:space:]]Actor[[:space:]]Critic/cad66925-4aba-49fe-b982-1bbf316767b3_origin.pdf filter=lfs diff=lfs merge=lfs -text
5223
+ 2024/SAFLEX_[[:space:]]Self-Adaptive[[:space:]]Augmentation[[:space:]]via[[:space:]]Feature[[:space:]]Label[[:space:]]Extrapolation/b05c7200-dd4a-4af1-bc50-a7417be6d0b9_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/13f8f85e-bf81-4ace-b7c4-ae8b1db21dcd_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fedb9f8829d8e685ccc66dfd2a67dd9d5acddc95850d3614e8b08acc91dd1ab
3
+ size 772919
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/full.md ADDED
@@ -0,0 +1,680 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REASONING ON GRAPHS: FAITHFUL AND INTERPRETABLE LARGE LANGUAGE MODEL REASONING
2
+
3
+ Linhao Luo, Yuan-Fang Li, Gholamreza Haffari
4
+
5
+ Monash University
6
+
7
+ Australia
8
+
9
+ {linhao.luo,yuanfang.li,Gholamreza.Haffari}@monash.edu
10
+
11
+ Shirui Pan*
12
+
13
+ Griffith University
14
+
15
+ Australia
16
+
17
+ s.pan@griffith.edu.au
18
+
19
+ # ABSTRACT
20
+
21
+ Large language models (LLMs) have demonstrated impressive reasoning abilities in complex tasks. However, they lack up-to-date knowledge and experience hallucinations during reasoning, which can lead to incorrect reasoning processes and diminish their performance and trustworthiness. Knowledge graphs (KGs), which capture vast amounts of facts in a structured format, offer a reliable source of knowledge for reasoning. Nevertheless, existing KG-based LLM reasoning methods only treat KGs as factual knowledge bases and overlook the importance of their structural information for reasoning. In this paper, we propose a novel method called reasoning on graphs (Rog) that synergizes LLMs with KGs to enable faithful and interpretable reasoning. Specifically, we present a planning-retrieval-reasoning framework, where Rog first generates relation paths grounded by KGs as faithful plans. These plans are then used to retrieve valid reasoning paths from the KGs for LLMs to conduct faithful reasoning. Furthermore, Rog not only distills knowledge from KGs to improve the reasoning ability of LLMs through training but also allows seamless integration with any arbitrary LLMs during inference. Extensive experiments on two benchmark KGQA datasets demonstrate that Rog achieves state-of-the-art performance on KG reasoning tasks and generates faithful and interpretable reasoning results<sup>1</sup>.
22
+
23
+ # 1 INTRODUCTION
24
+
25
+ Large language models (LLMs) have shown great performance in many NLP tasks (Brown et al., 2020; Bang et al., 2023). What's especially striking is their ability to handle complex tasks through reasoning (Wei et al., 2022; Huang & Chang, 2023). To further unleash LLMs' reasoning ability, the plan-and-solve paradigm (Wang et al., 2023c) has been proposed, in which LLMs are prompted to generate a plan and execute each reasoning step. In this way, LLMs decompose complex reasoning tasks into a series of sub-tasks and solve them step by step (Khot et al., 2022).
26
+
27
+ Despite their success, LLMs are still limited by the lack of knowledge and prone to hallucinations during reasoning, which can lead to errors in reasoning processes (Hong et al., 2023; Wang et al., 2023b). For example, as shown in Figure 1, LLMs do not have the latest knowledge and hallucinate an incorrect reasoning step: "has a daughter". These issues largely diminish the performance and trustworthiness of LLMs in high-stakes scenarios, such as legal judgment and medical diagnosis.
28
+
29
+ To tackle the issues, knowledge graphs (KGs) have been incorporated to improve the reasoning ability of LLMs (Pan et al., 2024; Luo et al., 2023a). KGs capture abundant factual knowledge in a structured format, which provides a faithful knowledge source for reasoning. As a typical reasoning
30
+
31
+ ![](images/3d9d2dc3799a6d8e736d2e8ac22fa57945ae686bd6372e9fc86ea84ba2469d1d.jpg)
32
+ Figure 1: The issues of lack of knowledge and hallucination in LLMs reasoning and how they can be addressed by triples and relation paths from KGs.
33
+
34
+ task, knowledge graph question answering (KGQA) aims to obtain answers based on knowledge from KGs (Sun et al., 2019). Previous works that jointly use KGs and LLMs for KGQA reasoning can be broadly divided into two categories: 1) semantic parsing methods (Lan & Jiang, 2020; Ye et al., 2022), which use LLMs to convert questions into logical queries that are executed on KGs to obtain answers; and 2) retrieval-augmented methods (Li et al., 2023; Jiang et al., 2023), which retrieve triples from KGs as knowledge context and uses LLMs to obtain the final answers.
35
+
36
+ Although semantic parsing methods can generate more accurate and interpretable results by leveraging reasoning on KGs, the generated logical queries can often be non-executable and yield no answers, due to syntax and semantic limitations (Yu et al., 2022a). Retrieval-augmented methods are more flexible and exploit the ability of LLMs for reasoning. However, they only treat KGs as factual knowledge bases and overlook the importance of their structural information for reasoning (Jiang et al., 2022). For instance, as shown in Figure 1, a relation path, which is a sequence of relations, "child_of→has_son" can be used to obtain answers to the question "Who is the brother of Justin Bieber?" Therefore, it is essential to enable LLMs to directly reason on KGs to achieve faithful and interpretable reasoning.
37
+
38
+ In this paper, we propose a novel method called reasoning on graphs (Rog) that synergizes LLMs with KGs to conduct faithful and interpretable reasoning. To alleviate the issues of hallucinations and lack of knowledge, we present a planning-retrieval-reasoning framework, where Rog first generates relation paths grounded by KGs as faithful plans via the planning module. These plans are then used to retrieve valid reasoning paths from KGs to conduct faithful reasoning by the retrieval-reasoning module. In this way, we not only retrieve the latest knowledge from KGs but also consider the guidance of KG structure for reasoning and explanations. Moreover, the planning module of Rog can be plug-and-play with different LLMs during inference to improve their performance. Based on this framework, Rog is optimized by two tasks: 1) planning optimization, where we distill knowledge from KGs into LLMs to generate faithful relation paths as plans; and 2) retrieval-reasoning optimization, where we enable LLMs to conduct faithful reasoning based on retrieved paths and generate interpretable results. We conduct extensive experiments on two benchmark KGQA datasets, and the results demonstrate that Rog achieves state-of-the-art performance on KG reasoning tasks and generates faithful and interpretable reasoning results.
39
+
40
+ # 2 RELATED WORK
41
+
42
+ LLM Reasoning Prompt. Many studies have been proposed to harness the reasoning ability of LLMs to handle complex tasks through prompting (Wei et al., 2022; Wang et al., 2022; Yao et al., 2023; Besta et al., 2023). Plan-and-solve (Wang et al., 2023c) prompts LLMs to generate a plan and conduct reasoning based on it. DecomP (He et al., 2021) prompts LLMs to decompose the reasoning task into a series of sub-tasks and solve them step by step. However, the problem of hallucinations and lack of knowledge affect the faithfulness of LLMs' reasoning. ReACT (Yao et al., 2022) treats LLMs as agents, which interact with the environment to get the latest knowledge for reasoning. To explore faithful reasoning, FAME (Hong et al., 2023) introduces the Monte-Carlo planning to generate faithful reasoning steps. RR (He et al., 2022) and KD-CoT Wang et al. (2023b) further retrieve relevant knowledge from KGs to produce faithful reasoning plans for LLMs.
43
+
44
+ Knowledge Graph Question Answering (KGQA). Conventional embedding-based methods represent the entities and relations in embedding space and design special model architectures (e.g., Key-Value memory networks, sequential models, and graph neural networks) to reason answers
45
+
46
+ ![](images/334231f1b147323335005b92f1db4687fdede50a2b785620a7405a2306923aea.jpg)
47
+ Figure 2: The overall framework of reasoning on graphs (R○G). 1) given a question, we first prompt LLMs to generate several relation paths that are grounded by KGs as plans. 2) Then, we retrieve reasoning paths from KGs using the plans. 3) Finally, we conduct faithful reasoning based on the retrieved reasoning paths and generate answers with interpretable explanations. The orange and red rectangles denote the entities mentioned in the question and answer, respectively.
48
+
49
+ (Miller et al., 2016; He et al., 2021; Yasunaga et al., 2021). To integrate LLMs for KGQA, retrieval-augmented methods aim to retrieve the relative facts from the KGs to improve the reasoning performance (Li et al., 2023; Karpukhin et al., 2020). Recently, UniKGQA (Jiang et al., 2022) which unifies the graph retrieval and reasoning process into a single model with LLMs, achieves STOA performance. Semantic parsing methods convert the question into a structural query (e.g., SPARQL) by LLMs, which can be executed by a query engine to reason the answers on KGs (Sun et al., 2020; Lan & Jiang, 2020). However, these methods heavily rely on the quality of generated queries. If the query is not executable, no answers will be generated. DECAF (Yu et al., 2022a) combines semantic parsing and LLMs reasoning to jointly generate answers, which also reach salient performance on KGQA tasks.
50
+
51
+ # 3 PRELIMINARY
52
+
53
+ Knowledge Graphs (KGs) contain abundant factual knowledge in the form of a set of triples: $\mathcal{G} = \{(e,r,e')|e,e'\in \mathcal{E},r\in \mathcal{R}\}$ , where $\mathcal{E}$ and $\mathcal{R}$ denote the set of entities and relations, respectively.
54
+
55
+ Relation Paths are a sequence of relations: $z = \{r_1, r_2, \ldots, r_l\}$ , where $r_i \in \mathcal{R}$ denotes the $i$ -th relation in the path and $l$ denotes the length of the path.
56
+
57
+ Reasoning Paths are the instances of a relation path $z$ in KGs: $w_{z} = e_{0} \xrightarrow{r_{1}} e_{1} \xrightarrow{r_{2}} \dots \xrightarrow{r_{l}} e_{l}$ , where $e_{i} \in \mathcal{E}$ denotes the $i$ -th entity and $r_{i}$ denotes the $i$ -th relation in the relation path $z$ .
58
+
59
+ Example 1. Given a relation path: $z = \text{marry\_to} \rightarrow \text{father\_of}$ , a reasoning path instance could be: $w_{z} = \text{Alice} \xrightarrow{\text{marry\_to}} \text{Bob} \xrightarrow{\text{father\_of}} \text{Charlie}$ , which denotes "Alice" is married to "Bob" and "Bob" is the father of "Charlie".
60
+
61
+ Knowledge Graph Question Answering (KGQA) is a typical reasoning task based on KGs. Given a natural language question $q$ and a KG $\mathcal{G}$ , the task aims to design a function $f$ to predict answers $a \in \mathcal{A}_q$ based on knowledge from $\mathcal{G}$ , i.e., $a = f(q, \mathcal{G})$ . Following previous works (Sun et al., 2019; Jiang et al., 2022), we assume the entities $e_q \in \mathcal{T}_q$ mentioned in $q$ and answers $a \in \mathcal{A}_q$ are labeled and linked to the corresponding entities in $\mathcal{G}$ , i.e., $\mathcal{T}_q, \mathcal{A}_q \subseteq \mathcal{E}$ .
62
+
63
+ # 4 APPROACH
64
+
65
+ In this section, we introduce our method: reasoning on graphs (Rog), which contains two components: 1) a planning module that generates relation paths grounded by KGs as faithful plans; 2)
66
+
67
+ a retrieval-reasoning module that first retrieves valid reasoning paths from KGs according to the plans, then conducts faithful reasoning based on retrieved reasoning paths and generates answers with interpretable explanations. The overall framework of RoG is illustrated in Figure 2.
68
+
69
+ # 4.1 REASONING ON GRAPHS: PLANNING-RETRIEVAL-REASONING
70
+
71
+ Recently, many techniques have been explored to improve the reasoning ability of LLMs by planning, which first prompts LLMs to generate a reasoning plan and then conduct reasoning based on it (Wang et al., 2023c). However, LLMs are known for having hallucination issues, which are prone to generating incorrect plans and leading to wrong answers (Ji et al., 2023). To address this issue, we present a novel planning-retrieval-reasoning framework, which makes the reasoning plans grounded by KGs and then retrieves faithful reasoning paths for LLM reasoning.
72
+
73
+ Relation paths, which capture semantic relations between entities, have been utilized in many reasoning tasks on KGs (Wang et al., 2021; Xu et al., 2022). Moreover, compared to the dynamically updated entities, the relations in KGs are more stable (Wang et al., 2023a). By using relation paths, we can always retrieve the latest knowledge from KGs for reasoning. Therefore, relation paths can serve as faithful plans for reasoning the answer to KGQA task.
74
+
75
+ Example 2. Given a question "Who is the child of Alice", we can generate a relation path as the plan: $z = \text{marry-to} \rightarrow \text{father-of}$ . This relation path expresses the plan: 1) find the person that "Alice" is married to; 2) find the child of that person. We can execute the plan (relation path) by retrieving a reasoning path from KGs as: $w_{z} = \text{Alice} \xrightarrow{\text{marry-to}} \text{Bob} \xrightarrow{\text{father-of}} \text{Charlie}$ . Finally, we can answer the question based on the reasoning path, which is "Charlie".
76
+
77
+ By treating relation paths as plans, we can make sure the plans are grounded by KGs, which enables LLMs to conduct faithful and interpretable reasoning on graphs. In a nutshell, we formulate our RoG as an optimization problem that aims to maximize the probability of reasoning the answer from a knowledge graph $\mathcal{G}$ w.r.t the question $q$ by generating relation paths $z$ as the plan:
78
+
79
+ $$
80
+ P _ {\theta} (a | q, \mathcal {G}) = \sum_ {z \in \mathcal {Z}} P _ {\theta} (a | q, z, \mathcal {G}) P _ {\theta} (z | q), \tag {1}
81
+ $$
82
+
83
+ where $\theta$ denotes the parameters of LLMs, $z$ denotes the relation paths (plans) generated by LLMs, and $\mathcal{Z}$ denotes the set of possible relation paths. The latter term $P_{\theta}(z|q)$ is the probability of generating a faithful relation path $z$ grounded by KG, given the question $q$ , which is realized by the planning module. The former term $P_{\theta}(a|q,z,\mathcal{G})$ is the probability of reasoning an answer $a$ given the question $q$ , relation path $z$ , and KG $\mathcal{G}$ , which is computed by the retrieval-reasoning module.
84
+
85
+ # 4.2 OPTIMIZATION FRAMEWORK
86
+
87
+ Despite the advantage of generating relation paths as plans, the LLMs have zero knowledge of the relations contained in KGs. Therefore, LLMs cannot directly generate relation paths grounded by KGs as faithful plans. Moreover, LLMs might not understand the reasoning paths correctly and conduct reasoning based on them. To address these issues, we design two instruction tuning tasks: 1) planning optimization, which distills the knowledge from KGs into LLMs to generate faithful relation paths as plans; 2) retrieval-reasoning optimization, which enables LLMs to reason based on the retrieved reasoning paths.
88
+
89
+ The objective function in equation 1 can be optimized by maximizing the evidence lower bound (ELBO) (Jordan et al., 1999), which is formulated as
90
+
91
+ $$
92
+ \log P (a | q, \mathcal {G}) \geq \mathbb {E} _ {z \sim Q (z)} [ \log P _ {\theta} (a | q, z, \mathcal {G}) ] - D _ {\mathrm {K L}} (Q (z) \| P _ {\theta} (z | q)), \tag {2}
93
+ $$
94
+
95
+ where $Q(z)$ denotes the posterior distribution of faithful relation paths grounded by KGs. The latter term minimizes the KL divergence between the posterior and the prior, which encourages LLMs to generate faithful relation paths (planning optimization). The former term maximizes the expectation that retrieval-reasoning module generates correct answers based on the relation paths and KGs (retrieval-reasoning optimization).
96
+
97
+ Planning optimization. In planning optimization, we aim to distill the knowledge from KGs into LLMs to generate faithful relation paths as plans. This can be achieved by minimizing the KL divergence with the posterior distribution of faithful relation paths $Q(z)$ , which can be approximated by the valid relation paths in KGs.
98
+
99
+ Given a question $q$ and answer $a$ , we could find the path instances $w_{z}(e_{q}, e_{a}) = e_{q} \xrightarrow{r_{1}} e_{1} \xrightarrow{r_{2}} \ldots \xrightarrow{r_{l}} e_{a}$ connecting $e_{q}$ and $e_{a}$ in KGs. The corresponding relation path $z = \{r_{1}, r_{2}, \ldots, r_{l}\}$ can be considered valid and serve as a faithful plan for answering the question $q$ . The posterior distribution $Q(z)$ can be formally approximated as
100
+
101
+ $$
102
+ Q (z) \simeq Q (z | a, q, \mathcal {G}) = \left\{ \begin{array}{l} \frac {1}{| \mathcal {Z} |}, \exists w _ {z} \left(e _ {q}, e _ {a}\right) \in \mathcal {G}, \\ 0, \text {e l s e}, \end{array} \right. \tag {3}
103
+ $$
104
+
105
+ where we assume a uniform distribution over all valid relation paths $\mathcal{Z}$ , and $\exists w_{z}(e_{q}, e_{a}) \in \mathcal{G}$ denote the existence of a path instance connecting the question $e_{q}$ and answer $e_{a}$ entities in $\mathcal{G}$ . Therefore, the KL divergence can be calculated as
106
+
107
+ $$
108
+ \mathcal {L} _ {\text {p l a n}} = D _ {\mathrm {K L}} (Q (z) \| P _ {\theta} (z | q)) = D _ {\mathrm {K L}} (Q (z | a, q, \mathcal {G}) \| P _ {\theta} (z | q)) \simeq - \frac {1}{| \mathcal {Z} ^ {*} |} \sum_ {z \in \mathcal {Z} ^ {*}} \log P _ {\theta} (z | q), \tag {4}
109
+ $$
110
+
111
+ where we use the shortest paths $\mathcal{Z}^* \subseteq \mathcal{Z}$ between $e_q$ and $e_a$ in KGs as supervision signals (Zhang et al., 2022). The detailed derivation of can be found in Appendix A.1. By optimizing the equation 4, we maximize the probability of LLMs generating faithful relation paths through distilling the knowledge from KGs.
112
+
113
+ Retrieval-reasoning optimization. In retrieval-reasoning optimization, we aim to enable LLMs to conduct reasoning based on the retrieved reasoning paths. For the retrieval-reasoning module, we follow the FiD framework (Izacard & Grave, 2021; Singh et al., 2021), which allows reasoning on multiple retrieved reasoning paths<sup>2</sup>, formulated as
114
+
115
+ $$
116
+ P _ {\theta} (a | q, \mathcal {Z}, \mathcal {G}) = \prod_ {z \in \mathcal {Z}} P _ {\theta} (a | q, z, \mathcal {G}). \tag {5}
117
+ $$
118
+
119
+ By approximating the expectation with $\mathbf{K}$ sampled plans $\mathcal{Z}_K^* \subseteq Z^*$ , the objective function of reasoning optimization can be written as
120
+
121
+ $$
122
+ \mathcal {L} _ {\text {r e a s o n}} = \mathbb {E} _ {z \sim Q (z | a, q, \mathcal {G})} [ \log P _ {\theta} (a | q, z, \mathcal {G}) ] = \sum_ {z \in \mathcal {Z} _ {K} ^ {*}} \log P _ {\theta} (a | q, z, \mathcal {G}) = \log P _ {\theta} (a | q, \mathcal {Z} _ {K} ^ {*}, \mathcal {G}). \tag {6}
123
+ $$
124
+
125
+ This maximizes the probability of LLMs generating correct answers based on the retrieved reasoning paths.
126
+
127
+ The final objective function of RoG is the combination of the planning optimization and retrieval-reasoning optimization, which can be formulated as
128
+
129
+ $$
130
+ \mathcal {L} = \log \underbrace {P _ {\theta} (a | q , \mathcal {Z} _ {K} ^ {*} , \mathcal {G})} _ {\text {R e t r i e v a l - r e a s o n i n g}} + \underbrace {\frac {1}{| \mathcal {Z} ^ {*} |} \sum_ {z \in \mathcal {Z} ^ {*}} \log P _ {\theta} (z | q)} _ {\text {P l a n n i n g}}. \tag {7}
131
+ $$
132
+
133
+ From equation 7, we can see that we adopt the same LLM for both planning and reasoning, which are jointly trained on two instruction-tuning tasks, i.e., (planning and retrieval-reasoning). We will discuss the implementation details of these two tasks in the following subsections.
134
+
135
+ # 4.3 PLANNING MODULE
136
+
137
+ The planning module aims to generate faithful relation paths as plans for answering the question. To utilize the instruction-following ability of LLMs (Wei et al., 2021), we design a simple instruction template that prompts LLMs to generate relation paths:
138
+
139
+ Please generate a valid relation path that can be helpful for answering the following question: <Question>
140
+
141
+ where $<\text{Question}>$ indicates the question $q$ . The question together with the instruction template is fed into LLMs to generate the relation paths, which are structurally formatted as a sentence:
142
+
143
+ $$
144
+ z = < \text {P A T H} > r _ {1} < \text {S E P} > r _ {2} < \text {S E P} > \dots < \text {S E P} > r _ {l} < / \text {P A T H} >
145
+ $$
146
+
147
+ where $<\text{PATH}>$ , $<\text{SEP}>$ , $</\text{PATH}>$ are special tokens indicating the start, separator, and end of the relation path, respectively<sup>3</sup>.
148
+
149
+ Therefore, the optimization of $\mathcal{L}_{\mathrm{plan}}$ can be achieved as
150
+
151
+ $$
152
+ \arg \max _ {\theta} \frac {1}{| \mathcal {Z} ^ {*} |} \sum_ {z \in \mathcal {Z} ^ {*}} \log P _ {\theta} (z | q) = \frac {1}{| \mathcal {Z} ^ {*} |} \sum_ {z \in \mathcal {Z} ^ {*}} \log \prod_ {i = 1} ^ {| z |} P _ {\theta} \left(r _ {i} \mid r _ {< i}, q\right), \tag {8}
153
+ $$
154
+
155
+ where $P_{\theta}(z|q)$ denotes the prior distribution of generating faithful relation path $z$ , and $P_{\theta}(r_i|r_{<i},q)$ denotes the probability of each token in $z$ generated by LLMs.
156
+
157
+ # 4.4 RETRIEVAL-REASONING MODULE
158
+
159
+ Retrieval. Given a question $q$ and a relation path as plan $z$ , the retrieval module aims to retrieve the reasoning paths $w_{z}$ from KG $\mathcal{G}$ . The retrieval process can be conducted by finding paths in $\mathcal{G}$ that start from the question entities $e_{q}$ and follow the relation paths $z$ , formulated as
160
+
161
+ $$
162
+ \mathcal {W} _ {z} = \left\{w _ {z} \left(e _ {q}, e _ {*}\right) \mid w _ {z} \left(e _ {q}, e _ {*}\right) = e _ {q} \xrightarrow {r _ {1}} e _ {1} \xrightarrow {r _ {2}} \dots \xrightarrow {r _ {l}} e _ {a *}, w _ {z} \left(e _ {q}, e _ {*}\right) \in \mathcal {G} \right\}. \tag {9}
163
+ $$
164
+
165
+ We adopt a constrained breadth-first search to retrieve the reasoning paths $w_{z}$ from KGs. In experiments, all retrieved paths are used for reasoning. The detailed retrieval algorithm can be found in Appendix A.3.
166
+
167
+ Despite we can utilize the retrieved reasoning paths and directly get the answers with majority voting. The retrieved reasoning paths could be noisy and irrelevant to the questions, which leads to incorrect answers (He et al., 2021; Zhang et al., 2022). Therefore, we propose a reasoning module to explore the ability of LLMs to identify the important reasoning paths and answer the questions based on them.
168
+
169
+ Reasoning. The reasoning module takes the question $q$ and a set of reasoning paths $\mathcal{W}_z$ to generate answers $a$ . Similarly, we design a reasoning instruction prompt to guide LLMs to conduct reasoning based on the retrieved reasoning paths $\mathcal{W}_z$ . The $\mathcal{W}_z$ are also formatted as a series of structural sentences. The detailed prompt can be found in Appendix A.10.
170
+
171
+ The optimization of $\mathcal{L}_{\mathrm{reason}}$ can be written as
172
+
173
+ $$
174
+ \underset {\theta} {\arg \max } \log P _ {\theta} (a | q, \mathcal {Z} _ {K} ^ {*}, \mathcal {G}) = \log \sum_ {z \in \mathcal {Z} _ {K} ^ {*}} \sum_ {w _ {z} \in \mathcal {W} _ {z}} \prod_ {i = 1} ^ {| a |} P _ {\theta} \left(t _ {i} \mid t _ {< i}, q, w _ {z}\right), \tag {10}
175
+ $$
176
+
177
+ where $P_{\theta}(a|q,\mathcal{Z}_K,\mathcal{G})$ denotes probability of reasoning the correct answer $a$ based on $K$ relation paths $\mathcal{Z}_K$ , and $t_*$ denote the tokens of answers $a$ .
178
+
179
+ # 5 EXPERIMENT
180
+
181
+ In our experiments, we aim to answer the following research questions: RQ1: Can RoG achieve state-of-the-art performance on the KGQA tasks? RQ2: Can the planning module of RoG be integrated with other LLMs to improve their performance? RQ3: Can RoG conduct faithful reasoning and generate interpretable reasoning results?
182
+
183
+ # 5.1 EXPERIMENT SETTINGS
184
+
185
+ Datasets. We evaluate the reasoning ability of RoG on two benchmark KGQA datasets: WebQuestionSP (WebQSP) (Yih et al., 2016) and Complex WebQuestions (CWQ) (Talmor & Berant, 2018), which contain up to 4-hop questions. Freebase (Bollacker et al., 2008) is the background knowledge graph for both datasets, which contains around 88 million entities, 20 thousand relations, and 126 million triples. The details of the datasets are described in Appendix A.4.
186
+
187
+ Table 1: Performance comparison with different baselines on the two KGQA datasets.
188
+
189
+ <table><tr><td rowspan="2">Type</td><td rowspan="2">Methods</td><td colspan="2">WebQSP</td><td colspan="2">CWQ</td></tr><tr><td>Hits@1</td><td>F1</td><td>Hits@1</td><td>F1</td></tr><tr><td rowspan="5">Embedding</td><td>KV-Mem (Miller et al., 2016)</td><td>46.7</td><td>34.5</td><td>18.4</td><td>15.7</td></tr><tr><td>EmbedKGQA (Saxena et al., 2020)</td><td>66.6</td><td>-</td><td>45.9</td><td>-</td></tr><tr><td>NSM (He et al., 2021)</td><td>68.7</td><td>62.8</td><td>47.6</td><td>42.4</td></tr><tr><td>TransferNet (Shi et al., 2021)</td><td>71.4</td><td>-</td><td>48.6</td><td>-</td></tr><tr><td>KGT5 Saxena et al. (2022)</td><td>56.1</td><td>-</td><td>36.5</td><td>-</td></tr><tr><td rowspan="4">Retrieval</td><td>GraftNet (Sun et al., 2018)</td><td>66.4</td><td>60.4</td><td>36.8</td><td>32.7</td></tr><tr><td>PullNet (Sun et al., 2019)</td><td>68.1</td><td>-</td><td>45.9</td><td>-</td></tr><tr><td>SR+NSM (Zhang et al., 2022)</td><td>68.9</td><td>64.1</td><td>50.2</td><td>47.1</td></tr><tr><td>SR+NSM+E2E (Zhang et al., 2022)</td><td>69.5</td><td>64.1</td><td>49.3</td><td>46.3</td></tr><tr><td rowspan="4">Semantic Parsing</td><td>SPARQL (Sun et al., 2020)</td><td>-</td><td>-</td><td>31.6</td><td>-</td></tr><tr><td>QGG (Lan &amp; Jiang, 2020)</td><td>73.0</td><td>73.8</td><td>36.9</td><td>37.4</td></tr><tr><td>ArcaneQA (Gu &amp; Su, 2022)</td><td>-</td><td>75.3</td><td>-</td><td>-</td></tr><tr><td>RnG-KBQA (Ye et al., 2022)</td><td>-</td><td>76.2</td><td>-</td><td>-</td></tr><tr><td rowspan="5">LLMs</td><td>Flan-T5-x1 (Chung et al., 2022)</td><td>31.0</td><td>-</td><td>14.7</td><td>-</td></tr><tr><td>Alpaca-7B (Taori et al., 2023)</td><td>51.8</td><td>-</td><td>27.4</td><td>-</td></tr><tr><td>LLaMA2-Chat-7B (Touvron et al., 2023)</td><td>64.4</td><td>-</td><td>34.6</td><td>-</td></tr><tr><td>ChatGPT</td><td>66.8</td><td>-</td><td>39.9</td><td>-</td></tr><tr><td>ChatGPT+CoT</td><td>75.6</td><td>-</td><td>48.9</td><td>-</td></tr><tr><td rowspan="4">LLMs+KGs</td><td>KD-CoT (Wang et al., 2023b)</td><td>68.6</td><td>52.5</td><td>55.7</td><td>-</td></tr><tr><td>UniKGQA (Jiang et al., 2022)</td><td>77.2</td><td>72.2</td><td>51.2</td><td>49.1</td></tr><tr><td>DECAF (DPR+FiD-3B) (Yu et al., 2022a)</td><td>82.1</td><td>78.8</td><td>-</td><td>-</td></tr><tr><td>RoG</td><td>85.7</td><td>70.8</td><td>62.6</td><td>56.2</td></tr></table>
190
+
191
+ Baselines. We compare RoG with 21 baselines grouping into 5 categories: 1) Embedding-based methods, 2) Retrieval-augmented methods, 3) Semantic parsing methods, 4) LLMs, and 5) LLMs+KGs methods. The details of each baseline are described in Appendix A.5.
192
+
193
+ Evaluation Metrics. Following previous works, we use Hits@1 and F1 as the evaluation metrics. Hits@1 measures the proportion of questions whose top-1 predicted answer is correct. Since a question may correspond to multiple answers, F1 considers the coverage of all answers, which balances the precision and recall of the predicted answers.
194
+
195
+ Implementations. For RoG, we use LLaMA2-Chat-7B (Touvron et al., 2023) as the LLM backbone, which is instruction finetuned on the training split of WebQSP and CWQ as well as Freebase for 3 epochs. We generate the top-3 relation paths using beam-search for each question. Since UniKGQA (Jiang et al., 2022) and DECAF (Yu et al., 2022a) are state-of-the-art methods, we directly refer their results and those of the other baselines reported in their papers for comparisons. For LLMs, we use zero-shot prompting to conduct KGQA. The detailed settings are described in Appendix A.6.
196
+
197
+ # 5.2 RQ1: KGQA PERFORMANCE COMPARISON
198
+
199
+ Main Results. In this section, we compare RoG with other baselines on KGQA tasks. The results are shown in Table 1. Our method achieves the best performance on both datasets across most metrics. Specifically, compared to the SOTA method DECAF (Yu et al., 2022a) on WebQSP, our method improves Hits@1 by $4.4\%$ . On the CWQ dataset, which is more challenging due to multihop questions, our method improves both Hits@1 and F1 by $22.3\%$ and $14.4\%$ against the SOTA model UniKGQA (Jiang et al., 2022). These results demonstrate the superior reasoning ability of our method in KGQA.
200
+
201
+ Among other methods, retrieval-augmented approaches outperform conventional embedding-based methods by retrieving relevant subgraphs from KGs, which reduces reasoning complexity. Furthermore, SR+NSM and SR+NSM+E2E adopt relation paths-based retrieval which achieves better performance, highlighting the importance of relation paths. Semantic parsing methods perform better than retrieval methods on WebQSP but worse on CWQ due to the complexity of generating logical queries for complex questions in CWQ. Although LLMs-based methods achieve comparable performance, they are limited by hallucinations and lack of knowledge as shown in Section 5.4. The LLMs+KGs methods achieve the second-best performance, which demonstrates the effectiveness of unifying KGs and LLMs for reasoning.
202
+
203
+ Ablation Study. We conduct an ablation study to analyze the effectiveness of the planning module and reasoning module in our method (R○G). We compare four variants: 1) w/o planning, where we remove the planning module and perform reasoning without retrieved reasoning paths; 2) w/o reasoning, where we remove the reasoning module and use all answers from retrieved reasoning
204
+
205
+ ![](images/e2c53104bec6fb3bcd0275397243e442f5c101e0eb2d883234f23a357a9d1e3e.jpg)
206
+
207
+ ![](images/f74e48de711ad2870da3dfb52f4c9a2bc041dc2405d9151ca1605f3fe5ccb9d5.jpg)
208
+ Figure 3: Faithfulness of top- $K$ generated relation paths. Green bars denote the average number of retrieved reasoning paths, solid lines denote the answer coverage of the retrieved paths, and dashed line denote the answer coverage of the reasoning module based on the retrieved reasoning paths.
209
+
210
+ ![](images/004140ad884e34c6ef4a180ba26faabe1e20164ef866b309cb6d03afbc7d7bb1.jpg)
211
+
212
+ paths as results; 3) $w/$ random plans, where we randomly retrieve reasoning paths from KGs and feed them into the reasoning module; 4) $w/$ vote reasoning, where we adopt the majority voting to select top-5 answers from retrieved reasoning paths. The results are shown in Table 2.
213
+
214
+ From the results, it is evident that without a planning module, our method degenerates to conventional LLMs that solely rely on questions as input, suffering from the lack of knowledge issue. Although removing the reasoning module leads to high recall due to an increased number of
215
+
216
+ Table 2: Ablation studies of RoG.
217
+
218
+ <table><tr><td rowspan="2">Method</td><td colspan="3">WebQSP</td><td colspan="3">CWQ</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>RoG</td><td>74.77</td><td>75.84</td><td>70.81</td><td>57.69</td><td>58.19</td><td>56.17</td></tr><tr><td>RoG w/o planning</td><td>57.26</td><td>50.16</td><td>49.69</td><td>35.35</td><td>34.77</td><td>33.76</td></tr><tr><td>RoG w/o reasoning</td><td>46.90</td><td>79.85</td><td>49.56</td><td>18.88</td><td>67.89</td><td>22.26</td></tr><tr><td>RoG w/ random plans</td><td>38.66</td><td>38.31</td><td>35.24</td><td>38.99</td><td>39.29</td><td>37.64</td></tr><tr><td>RoG w/ vote reasoning</td><td>54.80</td><td>60.44</td><td>47.96</td><td>22.92</td><td>47.98</td><td>26.52</td></tr></table>
219
+
220
+ answers, precision drops significantly because of noise in retrieved paths. This demonstrates the effectiveness of the reasoning module in identifying important reasoning paths and filtering out noise. Furthermore, using random plans achieves worse performance than removing the planning module, highlighting the importance of a planning module who generates faithful reasoning plans. Using a simple majority vote reasoning can improve the results which also demonstrate the necessity of reasoning module.
221
+
222
+ # 5.3 RQ2: PLUG-AND-PLAY ROG PLANNING MODULE
223
+
224
+ In this section, we evaluate the effectiveness of integrating the planning module of RoG with different LLMs during inference to improve their performance. Specifically, we first adopt the planning module of RoG to generate relation paths and feed the retrieved reasoning paths as context into different LLMs for reasoning. The results are presented in Table 3. To account for the fact that it is difficult to extract the number of answers from LLM's output. We only report the Hits@1 and Recall metrics.
225
+
226
+ Table 3: Effects of integrating the planning module of RoG with different LLMs for reasoning.
227
+
228
+ <table><tr><td rowspan="2">Methods</td><td colspan="2">WebQSP</td><td colspan="2">CWQ</td></tr><tr><td>Hits@1</td><td>Recall</td><td>Hits@1</td><td>Recall</td></tr><tr><td>ChatGPT</td><td>66.77</td><td>49.27</td><td>39.90</td><td>35.07</td></tr><tr><td>ChatGPT + RoG Planning</td><td>81.51</td><td>71.60</td><td>52.68</td><td>48.51</td></tr><tr><td>Alpaca-7B</td><td>51.78</td><td>33.65</td><td>27.44</td><td>23.62</td></tr><tr><td>Alpaca-7B + RoG Planning</td><td>56.16</td><td>74.20</td><td>44.04</td><td>38.46</td></tr><tr><td>LLaMA2-Chat-7B</td><td>64.37</td><td>44.61</td><td>34.60</td><td>29.91</td></tr><tr><td>LLaMA2-Chat-7B + RoG Planning</td><td>74.20</td><td>56.16</td><td>56.41</td><td>51.99</td></tr><tr><td>Flan-T5-x1</td><td>30.95</td><td>17.08</td><td>14.69</td><td>12.25</td></tr><tr><td>Flan-T5-x1 + RoG Planning</td><td>67.87</td><td>44.93</td><td>37.81</td><td>32.57</td></tr></table>
229
+
230
+ From the results, we can notice that the performance of all LLMs is substantially improved by integrating the planning module of $\mathsf{R}\circ \mathsf{G}$ . Specifically, the Hits@1 of ChatGPT, Alpaca, LLaMA2, and Flan-T5 are improved by $8.5\%$ , $15.3\%$ , and $119.3\%$ , respectively. This demonstrates that the planning module of $\mathsf{R}\circ \mathsf{G}$ can be seamlessly integrated with other LLMs to improve their performance without retraining.
231
+
232
+ # 5.4 RQ3: FAITHFUL REASONING AND INTERPRETABLE RESULTS
233
+
234
+ Quantitative Results. To evaluate the faithfulness of the relation paths, we illustrate the quantitative results in Figure 3. In experiments, we sweep the number of top- $K$ relation paths generated by RoG. From results, we can see that the number of retrieved reasoning paths increases with $K$ , which also leads to more answers to be covered (recall). This demonstrates the faithfulness of the
235
+
236
+ Table 4: Example of lack of knowledge for ChatGPT-CoT and interpretable predictions of RoG.
237
+
238
+ <table><tr><td>Question</td><td>What type of government is used in the country with Northern District?</td></tr><tr><td>Answer</td><td>Parliamentary system</td></tr><tr><td>ChatGPT + CoT</td><td>To determine what type of government is used in a country with a Northern District, we need more specific information. The term &quot;Northern District&quot; does not specify the name of any particular country or provide enough context to identify its government type. Could you please provide additional details or clarify the specific country you are referring to?</td></tr><tr><td>Reasoning Paths</td><td>Northern District → locationadministrative_division.first_level_division.of → Israel → government.form_of_government.countries → Parliamentary system</td></tr><tr><td>RoG</td><td>The type of government used in the country with the Northern District is a Parliamentary system.Explanations:1. Northern District → locationadministrative_division.first_level_division.of → Israel:The Northern District is a part of Israel.2. Israel → government.form_of_government.countries → Parliamentary system: Israel has a Parliamentary system of government.So, by following the reasoning paths provided, we can conclude that the country with the Northern District, which is Israel, uses a Parliamentary system of government.</td></tr></table>
239
+
240
+ Table 5: Example of the hallucination of ChatGPT-CoT and faithful reasoning of RoG.
241
+
242
+ <table><tr><td>Question</td><td>Where is the home stadium of the team who won the 1946 World Series championship?</td></tr><tr><td>Answer</td><td>Busch Stadium</td></tr><tr><td>ChatGPT + CoT</td><td>Step 1: Identify the team that won the 1946 World Series championship. The team that won the 1946 World Series championship was the St. Louis Cardinals.
243
+ Step 2: Determine the home stadium of the St. Louis Cardinals during that time. The St. Louis Cardinals&#x27; home stadium during the 1946 season was Sportsman&#x27;s Park.
244
+ Therefore, the possible answer to the question &quot;Where is the home stadium of the team who won the 1946 World Series championship?&quot; is: - Sportsman&#x27;s Park.</td></tr><tr><td>Reasoning Paths</td><td>1946 World Series → sports.sports_team.championships → St. Louis Cardinals → sports.sports_team.arena_stadium → Busch Stadium
245
+ 1946 World Series → sports.sports_team.championships → St. Louis Cardinals → sports.sports_team.arena_stadium → Roger Dean Stadium</td></tr><tr><td>RoG</td><td>Based on the reasoning paths provided, the home stadium of the team who won the 1946 World Series championship is Busch Stadium. This conclusion is based on the following path:
246
+ 1. 1946 World Series → sports.sports_team.championships → St. Louis Cardinals → sports.sports_team.arena_stadium → Busch Stadium
247
+ The reasoning path leads us to the St. Louis Cardinals as the team that won the 1946 World Series, and Busch Stadium is the stadium associated with the St. Louis Cardinals.
248
+ Therefore, Busch Stadium is the home stadium of the team that won the 1946 World Series championship.</td></tr></table>
249
+
250
+ relation paths by retrieving the answers. However, more retrieved reasoning paths also lead to more noise and retrieval time (shown in Appendix A.7.4), which decreases the precision and makes little contribution to the final results (reasoning-f1). Therefore, we set $K = 3$ in experiments.
251
+
252
+ Case studies. We also illustrate two case studies in Table 4 and Table 5. In Table 4, we can find that ChatGPT+CoT suffers from the lack of knowledge issue and cannot answer the question. On the contrary, RoG can generate faithful relation paths and retrieve valid reasoning paths from KGs for reasoning. Besides, RoG can provide interpretable explanations based on the reasoning paths. In Table 5, we can see that ChatGPT+CoT suffers from hallucinations and generates incorrect answers. In contrast, although the retrieved reasoning paths contain noises, the reasoning module can identify the correct reasoning paths and conduct faithful reasoning. These results demonstrate the effectiveness of RoG in conducting faithful reasoning and generating interpretable results. More cases can be found in Appendices A.8 and A.9.
253
+
254
+ # 6 CONCLUSION
255
+
256
+ In this paper, we propose a novel method called reasoning on graphs (Rog) that synergizes LLMs with KGs to conduct faithful and interpretable reasoning. To alleviate the issues of hallucinations and lack of knowledge, we present a planning-retrieval-reasoning framework, which allows LLMs to access the latest knowledge while reasoning based on faithful plans on graphs. Rog not only enhances the reasoning capability of LLMs by distilling knowledge from KGs through training but also enables seamless integration with any LLMs during inference. Extensive experiments on two benchmark KGQA datasets demonstrate the superiority of Rog in reasoning ability and interpretability.
257
+
258
+ # ACKNOWLEDGMENTS
259
+
260
+ This material is based on research partially sponsored by the DARPA Assured Neuro Symbolic Learning and Reasoning (ANSR) program under award number FA8750-23-2-1016 and the DARPA Knowledge Management at Scale and Speed (KMASS) program under award number HR00112220047. This research is partly supported by the ARC Future Fellowship FT190100039 to G.H. S. Pan was supported in part by the Australian Research Council (ARC) under grants FT210100097 and DP240101547, and the CSIRO - National Science Foundation (US) AI Research Collaboration Program.
261
+
262
+ # ETHICS STATEMENT
263
+
264
+ Our work is solely dedicated to tackling scientific problems and does not involve any human subjects, animals, or environmentally sensitive materials. Consequently, we do not anticipate any potential ethical risks or conflicts of interest in our study. Our research strives to adhere to the highest standards of scientific integrity and ethical conduct throughout the entire process, guaranteeing the validity and reliability of our findings.
265
+
266
+ # REPRODUCIBILITY STATEMENT
267
+
268
+ Our model has been meticulously formalized within the main body of the text to ensure clarity and facilitate comprehensive understanding. Additionally, we provide detailed discussions of implementation in Appendices A.4 to A.6, encompassing dataset information, baselines, experimental settings, and model configurations. The code and pre-trained model weights have been publicized.
269
+
270
+ # REFERENCES
271
+
272
+ Yejin Bang, Samuel Cahyawijaya, Nayeon Lee, Wenliang Dai, Dan Su, Bryan Wilie, Holy Lovenia, Ziwei Ji, Tiezheng Yu, Willy Chung, et al. A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity. arXiv preprint arXiv:2302.04023, 2023.
273
+ Maciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger, Lukas Gianinazzi, Joanna Gajda, Tomasz Lehmann, Michal Podstawski, Hubert Niewiadomski, Piotr Nczyk, et al. Graph of thoughts: Solving elaborate problems with large language models. arXiv preprint arXiv:2308.09687, 2023.
274
+ Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. Freebase: a collaboratively created graph database for structuring human knowledge. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data, pp. 1247-1250, 2008.
275
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901, 2020.
276
+ Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. arXiv preprint arXiv:2210.11416, 2022.
277
+ Antonia Creswell and Murray Shanahan. Faithful reasoning using large language models. arXiv preprint arXiv:2208.14271, 2022.
278
+ Yu Gu and Yu Su. Arcaneqa: Dynamic program induction and contextualized encoding for knowledge base question answering. In Proceedings of the 29th International Conference on Computational Linguistics, pp. 1718-1731, 2022.
279
+ Gaole He, Yunshi Lan, Jing Jiang, Wayne Xin Zhao, and Ji-Rong Wen. Improving multi-hop knowledge base question answering by learning intermediate supervision signals. In Proceedings of the 14th ACM international conference on web search and data mining, pp. 553-561, 2021.
280
+
281
+ Hangfeng He, Hongming Zhang, and Dan Roth. Rethinking with retrieval: Faithful large language model inference. arXiv preprint arXiv:2301.00303, 2022.
282
+ Ruixin Hong, Hongming Zhang, Hong Zhao, Dong Yu, and Changshui Zhang. Faithful question answering with monte-carlo planning. ACL2023, 2023.
283
+ Jie Huang and Kevin Chen-Chuan Chang. Towards reasoning in large language models: A survey. ACL 2023, 2023.
284
+ Gautier Izacard and Édouard Grave. Leveraging passage retrieval with generative models for open domain question answering. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pp. 874-880, 2021.
285
+ Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, and Pascale Fung. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):1-38, 2023.
286
+ Jinhao Jiang, Kun Zhou, Xin Zhao, and Ji-Rong Wen. Unikgga: Unified retrieval and reasoning for solving multi-hop question answering over knowledge graph. In The Eleventh International Conference on Learning Representations, 2022.
287
+ Jinhao Jiang, Kun Zhou, Wayne Xin Zhao, Yaliang Li, and Ji-Rong Wen. Reasoninglm: Enabling structural subgraph reasoning in pre-trained language models for question answering over knowledge graph. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 3721-3735, 2023.
288
+ Jinhao Jiang, Kun Zhou, Wayne Xin Zhao, Yang Song, Chen Zhu, Hengshu Zhu, and Ji-Rong Wen. Kg-agent: An efficient autonomous agent framework for complex reasoning over knowledge graph. arXiv preprint arXiv:2402.11163, 2024.
289
+ Ming Jin, Shiyu Wang, Lintao Ma, Zhixuan Chu, James Y Zhang, Xiaoming Shi, Pin-Yu Chen, Yuxuan Liang, Yuan-Fang Li, Shirui Pan, and Qingsong Wen. Time-lm: Time series forecasting by reprogramming large language models. In International Conference on Learning Representations, 2024a.
290
+ Ming Jin, Yifan Zhang, Wei Chen, Kexin Zhang, Yuxuan Liang, Bin Yang, Jindong Wang, Shirui Pan, and Qingsong Wen. Position paper: What can large language models tell us about time series analysis. arXiv preprint arXiv:2402.02713, 2024b.
291
+ Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine learning, 37:183-233, 1999.
292
+ Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6769-6781, 2020.
293
+ Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, and Ashish Sabharwal. Decomposed prompting: A modular approach for solving complex tasks. In *The Eleventh International Conference on Learning Representations*, 2022.
294
+ Yunshi Lan and Jing Jiang. Query graph generation for answering multi-hop complex questions from knowledge bases. Association for Computational Linguistics, 2020.
295
+ Shiyang Li, Yifan Gao, Haoming Jiang, Qingyu Yin, Zheng Li, Xifeng Yan, Chao Zhang, and Bing Yin. Graph reasoning for question answering with triplet retrieval. In Findings of the Association for Computational Linguistics: ACL 2023, 2023.
296
+ Ke Liang, Lingyuan Meng, Meng Liu, Yue Liu, Wenxuan Tu, Siwei Wang, Sihang Zhou, Xinwang Liu, and Fuchun Sun. Reasoning over different types of knowledge graphs: Static, temporal and multi-modal. arXiv preprint arXiv:2212.05767, 2022.
297
+
298
+ Ke Liang, Yue Liu, Sihang Zhou, Wenxuan Tu, Yi Wen, Xihong Yang, Xiangjun Dong, and Xinwang Liu. Knowledge graph contrastive learning based on relation-symmetrical structure. IEEE Transactions on Knowledge and Data Engineering, pp. 1-12, 2023. doi: 10.1109/TKDE.2023.3282989.
299
+ Yixin Liu, Kaize Ding, Qinghua Lu, Fuyi Li, Leo Yu Zhang, and Shirui Pan. Towards self-interpretable graph-level anomaly detection. Advances in Neural Information Processing Systems, 36, 2023a.
300
+ Yixin Liu, Kaize Ding, Jianling Wang, Vincent Lee, Huan Liu, and Shirui Pan. Learning strong graph neural networks with weak information. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2023b.
301
+ Linhao Luo, Jiaxin Ju, Bo Xiong, Yuan-Fang Li, Gholamreza Haffari, and Shirui Pan. Chatrule: Mining logical rules with large language models for knowledge graph reasoning. arXiv preprint arXiv:2309.01538, 2023a.
302
+ Linhao Luo, Yuan-Fang Li, Gholamreza Haffari, and Shirui Pan. Normalizing flow-based neural process for few-shot knowledge graph completion. In The 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, 2023b.
303
+ Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 1400-1409, 2016.
304
+ Shirui Pan, Yizhen Zheng, and Yixin Liu. Integrating graphs with large language models: Methods and prospects. arXiv preprint arXiv:2310.05499, 2023.
305
+ Shirui Pan, Linhao Luo, Yufei Wang, Chen Chen, Jiapu Wang, and Xindong Wu. Unifying large language models and knowledge graphs: A roadmap. IEEE Transactions on Knowledge and Data Engineering (TKDE), 2024.
306
+ Apoory Saxena, Aditay Tripathi, and Partha Talukdar. Improving multi-hop question answering over knowledge graphs using knowledge base embeddings. In Proceedings of the 58th annual meeting of the association for computational linguistics, pp. 4498-4507, 2020.
307
+ Apoory Saxena, Adrian Kochsiek, and Rainer Gemulla. Sequence-to-sequence knowledge graph completion and question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2814-2828, 2022.
308
+ Jiaxin Shi, Shulin Cao, Lei Hou, Juanzi Li, and Hanwang Zhang. Transfernet: An effective and transparent framework for multi-hop question answering over relation graph. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 4149-4158, 2021.
309
+ Devendra Singh, Siva Reddy, Will Hamilton, Chris Dyer, and Dani Yogatama. End-to-end training of multi-document reader and retriever for open-domain question answering. Advances in Neural Information Processing Systems, 34:25968-25981, 2021.
310
+ Haitian Sun, Bhuwan Dhingra, Manzil Zaheer, Kathryn Mazaitis, Ruslan Salakhutdinov, and William Cohen. Open domain question answering using early fusion of knowledge bases and text. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 4231-4242, 2018.
311
+ Haitian Sun, Tania Bedrax-Weiss, and William Cohen. Pullnet: Open domain question answering with iterative retrieval on knowledge bases and text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 2380–2390, 2019.
312
+ Jiashuo Sun, Chengjin Xu, Lumingyuan Tang, Saizhuo Wang, Chen Lin, Yeyun Gong, Lionel Ni, Heung-Yeung Shum, and Jian Guo. Think-on-graph: Deep and responsible reasoning of large language model on knowledge graph. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=nnVO1PvbTv.
313
+
314
+ Yawei Sun, Lingling Zhang, Gong Cheng, and Yuzhong Qu. Sparqa: skeleton-based semantic parsing for complex questions over knowledge bases. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 8952-8959, 2020.
315
+ Oyvind Tafjord, Bhavana Dalvi, and Peter Clark. Entailer: Answering questions with faithful and truthful chains of reasoning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pp. 2078-2093, 2022.
316
+ Alon Talmor and Jonathan Berant. The web as a knowledge-base for answering complex questions. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 641-651, 2018.
317
+ Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B Hashimoto. Stanford alpaca: an instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca, 2023.
318
+ Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
319
+ Hongwei Wang, Hongyu Ren, and Jure Leskovec. Relational message passing for knowledge graph completion. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 1697-1707, 2021.
320
+ Jiapu Wang, Boyue Wang, Meikang Qiu, Shirui Pan, Bo Xiong, Heng Liu, Linhao Luo, Tengfei Liu, Yongli Hu, Baocai Yin, et al. A survey on temporal knowledge graph completion: Taxonomy, progress, and prospects. arXiv preprint arXiv:2308.02457, 2023a.
321
+ Keheng Wang, Feiyu Duan, Sirui Wang, Peiguang Li, Yunsen Xian, Chuantao Yin, Wenge Rong, and Zhang Xiong. Knowledge-driven cot: Exploring faithful reasoning in llms for knowledge-intensive question answering. arXiv preprint arXiv:2308.13259, 2023b.
322
+ Lei Wang, Wanyu Xu, Yihuai Lan, Zhiqiang Hu, Yunshi Lan, Roy Ka-Wei Lee, and Ee-Peng Lim. Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models. arXiv preprint arXiv:2305.04091, 2023c.
323
+ Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In The Eleventh International Conference on Learning Representations, 2022.
324
+ Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2021.
325
+ Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824-24837, 2022.
326
+ Xiaohan Xu, Peng Zhang, Yongquan He, Chengpeng Chao, and Chaoyang Yan. Subgraph neighboring relations infomax for inductive link prediction on knowledge graphs. In Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, 2022.
327
+ Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models. In *The Eleventh International Conference on Learning Representations*, 2022.
328
+ Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L Griffiths, Yuan Cao, and Karthik Narasimhan. Tree of thoughts: Deliberate problem solving with large language models. arXiv preprint arXiv:2305.10601, 2023.
329
+
330
+ Michihiro Yasunaga, Hongyu Ren, Antoine Bosselut, Percy Liang, and Jure Leskovec. Qa-gnn: Reasoning with language models and knowledge graphs for question answering. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 535-546, 2021.
331
+ Xi Ye, Semih Yavuz, Kazuma Hashimoto, Yingbo Zhou, and Caiming Xiong. Ring-kbqa: Generation augmented iterative ranking for knowledge base question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 6032-6043, 2022.
332
+ Wen-tau Yih, Matthew Richardson, Christopher Meek, Ming-Wei Chang, and Jina Suh. The value of semantic parse labeling for knowledge base question answering. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 201-206, 2016.
333
+ Donghan Yu, Sheng Zhang, Patrick Ng, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Yiqun Hu, William Yang Wang, Zhiguo Wang, and Bing Xiang. Decaf: Joint decoding of answers and logical forms for question answering over knowledge bases. In The Eleventh International Conference on Learning Representations, 2022a.
334
+ Donghan Yu, Chenguang Zhu, Yuwei Fang, Wenhao Yu, Shuohang Wang, Yichong Xu, Xiang Ren, Yiming Yang, and Michael Zeng. Kg-fid: Infusing knowledge graph in fusion-in-decoder for open-domain question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 4961-4974, 2022b.
335
+ Jing Zhang, Xiaokang Zhang, Jifan Yu, Jian Tang, Jie Tang, Cuiping Li, and Hong Chen. Subgraph retrieval enhanced model for multi-hop knowledge base question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5773-5784, 2022.
336
+ Xikun Zhang, Antoine Bosselut, Michihiro Yasunaga, Hongyu Ren, Percy Liang, Christopher D. Manning, and Jure Leskovec. Greaselm: Graph reasoning enhanced language models. In International conference on learning representations, 2021.
337
+ Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander Smola, and Le Song. Variational reasoning for question answering with knowledge graph. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
338
+ Zicheng Zhao, Linhao Luo, Shirui Pan, Quoc Viet Hung Nguyen, and Chen Gong. Towards few-shot inductive link prediction on knowledge graphs: A relational anonymous walk-guided neural process approach. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 515-532, 2023.
339
+ Xin Zheng, Miao Zhang, Chunyang Chen, Chaojie Li, Chuan Zhou, and Shirui Pan. Multi-relational graph neural architecture search with fine-grained message passing. In 2022 IEEE International Conference on Data Mining (ICDM), pp. 783-792. IEEE, 2022a.
340
+ Xin Zheng, Yixin Liu, Zhifeng Bao, Meng Fang, Xia Hu, Alan Wee-Chung Liew, and Shirui Pan. Towards data-centric graph machine learning: Review and outlook. arXiv preprint arXiv:2309.10979, 2023a.
341
+ Xin Zheng, Miao Zhang, Chunyang Chen, Soheila Molaei, Chuan Zhou, and Shirui Pan. Gnnevaluator: Evaluating gnn performance on unseen graphs without labels. In Advances in Neural Information Processing Systems (NeurIPS), 2023b.
342
+ Xin Zheng, Miao Zhang, Chunyang Chen, Quoc Viet Hung Nguyen, Xingquan Zhu, and Shirui Pan. Structure-free graph condensation: From large-scale graphs to condensed graph-free data. In Advances in Neural Information Processing Systems (NeurIPS), 2023c.
343
+ Yizhen Zheng, Shirui Pan, Vincent Lee, Yu Zheng, and Philip S Yu. Rethinking and scaling up graph contrastive learning: An extremely efficient approach with group discrimination. Advances in Neural Information Processing Systems, 35:10809-10820, 2022b.
344
+
345
+ Yizhen Zheng, Huan Yee Koh, Jiaxin Ju, Anh TN Nguyen, Lauren T May, Geoffrey I Webb, and Shirui Pan. Large language models for scientific synthesis, inference and explanation. arXiv preprint arXiv:2310.07984, 2023d.
346
+
347
+ Yizhen Zheng, He Zhang, Vincent Lee, Yu Zheng, Xiao Wang, and Shirui Pan. Finding the missing-half: Graph complementary learning for homophily-prone and heterophily-prone graphs. International Conference on Machine Learning, 2023e.
348
+
349
+ # A APPENDIX
350
+
351
+ # A.1 DETAILED DERIVATION OF THE PLANNING MODULE
352
+
353
+ In this section, we provide a detailed derivation of the planning module. By approximating the $Q(z)$ with $Q(z|a,q,\mathcal{G})$ , the KL divergence can be calculated as
354
+
355
+ $$
356
+ \begin{array}{l} \mathcal {L} _ {\text {p l a n}} = D _ {\mathrm {K L}} (Q (z) \| P _ {\theta} (z | q)) = D _ {\mathrm {K L}} (Q (z | a, q, \mathcal {G}) \| P _ {\theta} (z | q)), \\ = \mathbb {E} _ {z \sim Q (z | a, q, \mathcal {G})} [ \log Q (z | a, q, \mathcal {G}) - \log P _ {\theta} (z | q) ], \tag {11} \\ = - \mathbb {E} _ {z \sim Q (z | a, q, \mathcal {G})} \log P _ {\theta} (z | q) + \text {C O N S T}, \\ \end{array}
357
+ $$
358
+
359
+ where the expectations cannot be computed exactly because of the large number of valid relation paths $\mathcal{Z}$ , so we approximate it by using the shortest paths $z\in \mathcal{Z}^{*}\subset \mathcal{Z}$ between $e_q$ and $e_{a}$ in KGs (Zhang et al., 2022). This can be formulated as
360
+
361
+ $$
362
+ \mathcal {L} _ {\text {p l a n}} = - \sum_ {z \in \mathcal {Z} ^ {*}} Q (z | a, q, \mathcal {G}) \log P _ {\theta} (z | q) + \text {C O N S T}. \tag {12}
363
+ $$
364
+
365
+ Based on equation 3, by assuming a uniform distribution over the set of shortest paths $\mathcal{Z}^*$ , we can rewrite the equation 12 as
366
+
367
+ $$
368
+ \mathcal {L} _ {\text {p l a n}} = - \frac {1}{| \mathcal {Z} ^ {*} |} \sum_ {z \in \mathcal {Z} ^ {*}} \log P _ {\theta} (z | q) + \text {C O N S T}, \tag {13}
369
+ $$
370
+
371
+ where the CONST is omitted in the final optimization since it makes no contributions to the loss.
372
+
373
+ # A.2 DETAILED RELATED WORK
374
+
375
+ # A.2.1 LLM REASONING PROMPT
376
+
377
+ Many studies have been proposed to harness the reasoning ability of LLMs to handle complex tasks through prompting (Wei et al., 2022; Wang et al., 2022; Yao et al., 2023; Besta et al., 2023; Pan et al., 2023; Zheng et al., 2023d; Jin et al., 2024a;b). Chain-of-Thought (Wei et al., 2022) enables LLMs to generate a reasoning chain that could be helpful to reasoning. Tree of thoughts (Yao et al., 2023) expands the reasoning chain to a tree structure to explore more reasoning paths. Graph of thoughts (Besta et al., 2023) further models the reasoning chain as a graph with an aggregation operation to synergize the reasoning paths. Plan-and-solve (Wang et al., 2023c) prompts LLMs to generate a plan and execute based on it. DecomP (He et al., 2021) prompts LLMs to decompose the reasoning task into a series of sub-tasks and solve them step by step. However, the problem of hallucinations and lack of knowledge affect the faithfulness of the reasoning. ReACT (Yao et al., 2022) treats LLMs as agents, which interact with the environment to get the latest knowledge for reasoning. To explore faithful reasoning, Entailer (Tafjord et al., 2022) introduces a verifier to validate the reasoning steps generated by LLMs. Creswell & Shanahan (2022) present a framework including two LLMs that are used for selecting and generating reasoning steps, respectively. FAME (Hong et al., 2023) introduces the Monte-Carlo planning to generate faithful reasoning steps. RR (He et al., 2022) and KD-CoT Wang et al. (2023b) aim to retrieve relevant knowledge from KGs to produce faithful reasoning plans for LLMs. Think-on-Graph (Sun et al., 2024) and KG-Agent (Jiang et al., 2024) treat LLMs as agents to interact with KGs via prompting to get the latest knowledge for reasoning.
378
+
379
+ # A.2.2 KNOWLEDGE GRAPH QUESTION ANSWERING
380
+
381
+ Knowledge graphs contain abundant factual knowledge in a structured format, which has attracted great attention from researchers (Zheng et al., 2022a; 2023a; Pan et al., 2023; Liang et al., 2023). Knowledge graph reasoning aims to derive new insights based on the existing graph structure and facts (Liang et al., 2022; Wang et al., 2023a; Luo et al., 2023b; Zhao et al., 2023). Graph neural networks that effectively capture the structure information have also been widely used in KG reasoning Zheng et al. (2022b; 2023e;b;c); Liu et al. (2023b;a). As a typical reasoning task, knowledge graph question answering (KGQA) aims to obtain answers based on knowledge from KGs, which can be generally divided into three categories: 1) embedding-based methods, 2) retrieval-augmented methods, and 3) semantic parsing methods.
382
+
383
+ **Embedding-based methods** model the entities and relations in embedding space and design special model architectures to reason answers. KV-Mem (Miller et al., 2016) adopts a Key-Value memory network to store triples for reasoning. **EmbedKGQA** (Saxena et al., 2020) and NSM (He et al., 2021) utilize the sequential model to mimic the multi-hop reasoning process. QA-GNN (Yasunaga et al., 2021) and Greaselm (Zhang et al., 2021) further adopt the graph neural network to capture the graph structure for reasoning. However, these methods need to design different model architectures, which are not flexible and generalizable.
384
+
385
+ Retrieval-augmented methods aims to retrieve the relative facts from the KGs to improve the reasoning performance. Early works adopt the page rank or random walk algorithm to retrieve subgraphs from KGs for reasoning (Sun et al., 2018; 2019). However, they ignore the semantic information in questions and lead to noisy retrieval results. Zhang et al. (2022) proposes a relation paths-based subgraph retrieval, resulting a better retrieval and QA performance. Other lines of studies retrieving triples from KGs via BM25 (Li et al., 2023) or DPR (Karpukhin et al., 2020; Yu et al., 2022b) to improve the performance of LLMs. They discard the structure information in KGs which leads to suboptimal results. Recently, UniKGQA (Jiang et al., 2022) unifies the graph retrieval and reasoning process into a single model with LLMs, which achieves state-of-the-art performance on KGQA tasks.
386
+
387
+ Semantic parsing methods parse the question into a structural query (e.g., SPARQL) which can be executed by a query engine to get answers (Sun et al., 2020; Lan & Jiang, 2020). ArcaneQA (Gu & Su, 2022) dynamically generates the query based on results from previous steps. RnG-KBQA (Ye et al., 2022) first enumerate all possible queries and then rank them to get the final output. These methods heavily rely on the quality of generated queries. If the query is not executable, no answers will be generated. DECAF (Yu et al., 2022a) combines semantic parsing and LLMs reasoning to jointly generate answers, which also reach salient performance on KGQA tasks.
388
+
389
+ # A.3 RETRIEVAL ALGORITHM
390
+
391
+ Given a question $q$ and a relation path as plan $z$ , we adopt a constrained breadth-first search to retrieve the reasoning paths. The pseudocode code is presented in Algorithm 1.
392
+
393
+ We first initialize a queue of current reasoning paths $\mathcal{Q}$ with the entities in the question $\mathcal{T}_q$ (line 3-5). Then, we iteratively expand each reasoning path in $\mathcal{Q}$ by adding the triples that are connected to the entities in the queue following the relation in relation path (line 11-19). The reasoning path is expanded until the length is equal to the length of the relation path. The expanded reasoning path is added to the set $\mathcal{W}_z$ as the final results (line 8-10).
394
+
395
+ # A.4 DATASETS
396
+
397
+ We adopt two benchmark KGQA datasets: WebQuestionSP (WebQSP)<sup>4</sup> (Yih et al., 2016) and Complex WebQuestions (CWQ)<sup>5</sup> (Talmor & Berant, 2018) in this work. We follow previous works (Sun et al., 2018; Jiang et al., 2022) to use the same train and test splits for fair comparison. The statistic of the datasets are given in Table 6. The statistics of the answer numbers and reasoning hops are presented in Table 7 and Table 8, respectively.
398
+
399
+ ```txt
400
+ Algorithm 1: Retrieve reasoning paths based on relation paths
401
+ Input: Question $q$ , relation path $z = \{r_1, r_2, \ldots, r_l\}$ , KG $\mathcal{G}$ . Output: Reasoning paths $\mathcal{W}_z$ .
402
+ $\mathcal{W}_z \gets \emptyset$ ;
403
+ $\mathcal{Q} \gets$ Queue();
404
+ foreach $e_q \in \mathcal{T}_q$ do
405
+ | $\mathcal{Q}$ .append((e_q, []; // Initialize queue with question entities.
406
+ end
407
+ while $\mathcal{Q} \neq \emptyset$ do
408
+ $(s, w_z) \gets \mathcal{Q}.pop()$ ;
409
+ if len(w_z) = len(z) then
410
+ | $\mathcal{W}_z$ .append(w_z);
411
+ end
412
+ if len(w_z) < len(z) then
413
+ r ← z[len(w_z) + 1]; // Get relation for next step.
414
+ foreach (s, r', t) ∈ $\mathcal{G}$ do
415
+ if r' = r then
416
+ w'_z.append((s, r, t)); // Expand the reasoning path.
417
+ Q.append((t, w'_z));
418
+ end
419
+ end
420
+ return $\mathcal{W}_z$ ;
421
+ ```
422
+
423
+ Table 6: Statistics of datasets.
424
+
425
+ <table><tr><td>Datasets</td><td>#Train</td><td>#Test</td><td>Max #hop</td></tr><tr><td>WebQSP</td><td>2,826</td><td>1,628</td><td>2</td></tr><tr><td>CWQ</td><td>27,639</td><td>3,531</td><td>4</td></tr></table>
426
+
427
+ Table 7: Statistics of the number of answers for questions in WebQSP and CWQ.
428
+
429
+ <table><tr><td>Dataset</td><td>#Ans = 1</td><td>2 ≥ #Ans ≤ 4</td><td>5 ≥ #Ans ≤ 9</td><td>#Ans ≥ 10</td></tr><tr><td>WebQSP</td><td>51.2%</td><td>27.4%</td><td>8.3%</td><td>12.1%</td></tr><tr><td>CWQ</td><td>70.6%</td><td>19.4%</td><td>6%</td><td>4%</td></tr></table>
430
+
431
+ Table 8: Statistics of the question hops in WebQSP and CWQ.
432
+
433
+ <table><tr><td>Dataset</td><td>1 hop</td><td>2 hop</td><td>≥ 3 hop</td></tr><tr><td>WebQSP</td><td>65.49 %</td><td>34.51%</td><td>0.00%</td></tr><tr><td>CWQ</td><td>40.91 %</td><td>38.34%</td><td>20.75%</td></tr></table>
434
+
435
+ Table 9: Statistics of MetaQA-3hop datasets.
436
+
437
+ <table><tr><td>Datasets</td><td>#Train</td><td>#Test</td><td>#hop</td></tr><tr><td>MetaQA-3hop</td><td>1,000</td><td>1,4274</td><td>3</td></tr></table>
438
+
439
+ Table 10: Statistics of constructed knowledge graphs.
440
+
441
+ <table><tr><td>KG</td><td>#Entities</td><td>#Relations</td><td>#Triples</td></tr><tr><td>Freebase</td><td>2,566,291</td><td>7,058</td><td>8,309,195</td></tr><tr><td>Wiki-Movie</td><td>43,234</td><td>9</td><td>133,582</td></tr></table>
442
+
443
+ Table 11: The statistics of the instances in the instruction-tuning datasets.
444
+
445
+ <table><tr><td>Planing Data</td><td>Retrieval-reasoning Data</td><td>Interpretability Data</td></tr><tr><td>216,006</td><td>30,465</td><td>2,000</td></tr></table>
446
+
447
+ To evaluate the transferability of RoG to other KGs. We further select the MetaQA-3hop dataset (Zhang et al., 2018) which is based on Wiki-Movies KGs<sup>6</sup>. We select 1000 samples from the training split. The statistic of the dataset is presented in Table 9.
448
+
449
+ Both WebQSP and CWQ can be reasoned based on Freebase KGs<sup>7</sup> (Bollacker et al., 2008). To reduce the size of KGs, following previous works (He et al., 2021; Jiang et al., 2022), we construct a subgraph of Freebase by extracting all triples that contain within the max reasoning hops of question entities in WebQSP and CWQ. Similarly, we construct a subgraph of Wiki-Movies KGs for MetaQA-3hop. The statistics of constructed KGs are presented in Table 10.
450
+
451
+ We construct the instruction-tuning dataset using the training split of WebQSP and CWQ datasets. For planning optimization, we generate data by extracting the shortest paths that connect the questions and answers, which serve as supervisory signals. In the retrieval-reasoning optimization phase, we feed both extracted shortest paths together with the questions to predict the answers. To enhance interpretability, we randomly select 1000 samples from each dataset along with their reasoning paths and answers. These are then input into ChatGPT to produce interpretive responses, which help empower our method in generating results with good explainability. The statistics of final training datasets are shown in Table 11.
452
+
453
+ # A.5 BASELINES
454
+
455
+ We compare R oG with 21 baselines grouping into 5 categories: 1) Embedding-based methods, 2) Retrieval-augmented methods, 3) Semantic parsing methods, 4) LLMs, and 5) LLMs+KGs methods. The details of each baseline are described as follows.
456
+
457
+ # Embedding-based methods.
458
+
459
+ - KV-Mem (Miller et al., 2016) adopts a Key-Value memory network to store triples and perform multi-hop reasoning by iterative operating on the memory.
460
+ - EmbedKGQA (Saxena et al., 2020) models the reasoning on KGs as a sequential link prediction problem by using the embedding of entities and questions.
461
+ - NSM (He et al., 2021) utilizes the sequential model to mimic the multi-hop reasoning process.
462
+ - TransferNet (Shi et al., 2021) adopts a graph neural network to capture the relevance between entities and questions for reasoning.
463
+ - KGT5 (Saxena et al., 2022) finetunes a sequence-to-sequence framework on KGs and generates answers based on the input question.
464
+
465
+ # Retrieval-augmented methods.
466
+
467
+ - GraftNet (Sun et al., 2018) retrieves relevant subgraphs from KGs with entity linking.
468
+ - PullNet (Sun et al., 2019) trains a retrieval model composed of a LSTM and a graph neural network to retrieve a question-specific subgraph.
469
+
470
+ - SR+NSM (Zhang et al., 2022) proposes a relation-path retrieval to retrieve subgraphs for multi-hop reasoning.
471
+ - SR+NSM+E2E (Zhang et al., 2022) further adopts an end-to-end training strategy to jointly train the retrieval and reasoning modules of SR+NSM.
472
+
473
+ # Semantic parsing methods.
474
+
475
+ - SPARQL (Sun et al., 2020) presents a novel skeleton grammar to represent the high-level structure of a complex question with language modes.
476
+ - QGG (Lan & Jiang, 2020) generates a query graph for a question by simultaneously adding constraints and extending relation paths.
477
+ - ArcaneQA (Gu & Su, 2022) dynamically generates the query based on results from previous steps.
478
+ - RnG-KBQA (Ye et al., 2022) first enumerates all possible queries and then ranks them to get the final output.
479
+
480
+ # Large language models (LLMs).
481
+
482
+ - Flan-T5 (Chung et al., 2022) is an enhanced version of T5 models that is instruction finetuned on mixture of tasks.
483
+ - Alpaca (Taori et al., 2023) is based on LLaMA and finetuned on an instruction-following dataset.
484
+ - LLaMA2-Chat (Touvron et al., 2023) is a large language model that is optimized for dialogue purposes.
485
+ - ChatGPT $^{8}$ is a powerful closed-source LLM that could follow instructions to conduct complex tasks $^{9}$ .
486
+ - ChatGPT+CoT (Wei et al., 2022) uses the Chain-of-thought prompt to improve the reason ability of ChatGPT.
487
+
488
+ # LLMs+KGs methods.
489
+
490
+ - KD-CoT Wang et al. (2023b) retrieves relevant knowledge from KGs to generate faithful reasoning plans for LLMs.
491
+ - UniKGQA (Jiang et al., 2022) unifies the graph retrieval and reasoning process into a single model with LLMs, which achieves state-of-the-art performance on KGQA tasks.
492
+ - DECAF (Yu et al., 2022a) combines semantic parsing and LLMs reasoning to jointly generate answers, which also reach salient performance on KGQA tasks.
493
+
494
+ # A.6 IMPLEMENTATION SETTINGS
495
+
496
+ For RoG, we use LLaMA2-Chat-7B (Touvron et al., 2023) as the LLM backbone, which is instruction finetuned on the training split of WebQSP and CWQ as well as Freebase for 3 epochs. The batch size is set to 4 and the learning rate is set to 2e-5. We use the cosine learning rate scheduler policy with the warmup ratio set to 0.03. The training is conducted on 2 A100-80G GPUs for 38 hours. During inference, we first adopt the LLM to generate top- $K$ relation paths with the highest probability as the plans. Then, we adopt the Algorithm 1 to retrieve reasoning paths, which are fed into the LLM to reason the final answers.
497
+
498
+ For LLM beelines, we use zero-shot prompting to conduct KGQA, which directly asks LLMs to answer the question. For other baselines, we directly copy their results reported in UniKGQA (Jiang et al., 2022) and DECAF (Yu et al., 2022a) for comparisons.
499
+
500
+ For combining the planning module of RoG with different LLMs, we use the planning module to generate plans (relation paths), which are executed on KGs to retrieve the reasoning paths. The retrieved paths are fed into different LLMs during inference by utilizing the reasoning prompts template shown in Appendix A.10.
501
+
502
+ Table 12: Performance of R oG on MetaQA-3hop.
503
+
504
+ <table><tr><td rowspan="2">Strategies</td><td colspan="2">MetaQA-3hop</td></tr><tr><td>Hits@1</td><td>F1</td></tr><tr><td>RoG (train from scratch)</td><td>84.81</td><td>41.32</td></tr><tr><td>RoG (transfer from Freebase)</td><td>88.98</td><td>50.68</td></tr></table>
505
+
506
+ Table 13: Training time comparison.
507
+
508
+ <table><tr><td>Method</td><td>Training on Freebase</td><td>Transferring to Wiki-Movies</td></tr><tr><td>RoG</td><td>38 hours</td><td>2 hours</td></tr></table>
509
+
510
+ # A.7 ADDITIONAL EXPERIMENT RESULTS
511
+
512
+ # A.7.1 TRANSFERABILITY TO OTHER KGS
513
+
514
+ We evaluate the transferability of RoG to other KGs. We select the MetaQA-3-hop dataset (Zhang et al., 2018) which is based on Wiki-Movies KGs. We select 1000 samples from the training split and utilize two training strategies to finetune RoG: 1) training from scratch, where we directly train RoG from LLaMA2-Chat with 1000 samples; 2) transfer from Freebase, where we conduct a further finetuning based on RoG trained for Freebase. The results are shown in Table 12. From results, we can see that transfer from Freebase achieves better performance than training from scratch, which demonstrates the transferability of RoG to other KGs.
515
+
516
+ We also compare the training time on Freebase and transferring to Wiki-Movies KGs. From results shown in Table 13, we can see that the training time on Freebase is 38 hours, while the transferring time is only 2 hours. This demonstrates the efficiency of transferring RoG to other KGs.
517
+
518
+ # A.7.2 PERFORMANCE WITH DIFFERENT TRAINING DATA
519
+
520
+ In our experiment, we finetune RoG jointly on the training set of both WebQSP and CWQ datasets to maximize the ability of RoG for reasoning on Freebase. To fairly compare with other methods (e.g., UniKGQA (Jiang et al., 2022)) that are only trained on single dataset, we provide additional results of the performance of RoG trained on single dataset. From the results shown in Tables 14 and 15, we can see that RoG trained on single dataset still outperforms the STOA baselines (UniKGQA). Besides, we can also find that jointly training RoG on multiple datasets can further improve the performance. In the future, we will try to generate more QA datasets from Freebase to further improved the reasoning ability of RoG.
521
+
522
+ # A.7.3 PERFORMANCE COMPARISON WITH DIFFERENT FINETUNED LLMS
523
+
524
+ In Table 1, we report the zero-shot performance of different LLMs. However, RoG is finetuned on the training split of the QA dataset. To make a fair comparison, we further report the performance of the LLMs finetuned on the training split of the QA dataset in Table 16. From the results, we can see that RoG still outperforms the finetuned LLMs.
525
+
526
+ Table 14: Performance on WebQSP with different training data.
527
+
528
+ <table><tr><td>Method</td><td>Training Data</td><td>Hits@1</td><td>F1</td></tr><tr><td>UniKGQA</td><td>WebQSP</td><td>77.2</td><td>72,2</td></tr><tr><td>RoG</td><td>WebQSP</td><td>81.5</td><td>61.8</td></tr><tr><td>RoG</td><td>WebQSP+CWQ</td><td>85.7</td><td>70.8</td></tr></table>
529
+
530
+ Table 15: Performance on CWQ with different training data.
531
+
532
+ <table><tr><td>Method</td><td>Training Data</td><td>Hits@1</td><td>F1</td></tr><tr><td>UniKGQA</td><td>CWQ</td><td>51.2</td><td>49.1</td></tr><tr><td>RoG</td><td>CWQ</td><td>59.1</td><td>52.9</td></tr><tr><td>RoG</td><td>WebQSP+CWQ</td><td>62.6</td><td>56.2</td></tr></table>
533
+
534
+ Table 16: Performance comparison with different finetuned LLMs (Hits@1).
535
+
536
+ <table><tr><td>Method</td><td>WebQSP</td><td>CWQ</td></tr><tr><td>Alpaca-7B (Zero Shot)</td><td>51.78</td><td>27.44</td></tr><tr><td>LLaMA2-Chat-7B (Zero Shot)</td><td>64.37</td><td>34.60</td></tr><tr><td>Alpaca-7B (Finetuned)</td><td>74.57</td><td>55.98</td></tr><tr><td>LLaMA2-Chat-7B (Finetuned)</td><td>73.89</td><td>53.49</td></tr><tr><td>RoG</td><td>85.75</td><td>62.65</td></tr></table>
537
+
538
+ # A.7.4 RETRIEVAL COSTS
539
+
540
+ We present the retrieval time and number of retrieved reasoning paths in Figure 4. From results, we can see that the retrieval time increases with the number of top- $K$ relation paths. Therefore, we should select a proper $K$ to balance the retrieval time and the number of retrieved reasoning paths. In experiments, we set $K = 3$ .
541
+
542
+ # A.7.5 PERFORMANCE ON DIFFERENT HOPS
543
+
544
+ We present the performance of RoG and its variants on different hops of questions in Table 17. From results, we can see that RoG achieves better performance than its variants on different hops of questions, especially questions with more than 3 hops. This demonstrates the importance of relation paths for improving the reasoning performance of LLMs on complex questions.
545
+
546
+ # A.7.6 PERFORMANCE ON DIFFERENT ANSWER NUMBERS
547
+
548
+ We also present the performance of RoG and its variants on questions with different numbers of answers in Table 18. From results, we can see that RoG achieves better performance than its variants on questions with different numbers of answers. Specifically, with the number of answer increasing, the performance of RoG w/o planning decreases significantly due to the lack of knowledge from
549
+
550
+ ![](images/c192bd8a06d0fae39120295f7e3bea60f8e3aeb093d527b9562a8b5f5395bccb.jpg)
551
+
552
+ ![](images/b2b4af886861013ffd876627ad1b46b0f4ed391ac52cf6b36abc6f21e8c5ceee.jpg)
553
+ Top-K relation paths
554
+
555
+ ![](images/a48b0e7c66a2d1eb119a25689aafc134e446a57dea92464fdaf60345904207e7.jpg)
556
+ Top-K relation paths
557
+ Figure 4: Average retrieval time and average number of retrieved reasoning paths w.r.t. the number of top- $K$ relation paths.
558
+
559
+ Table 17: F1 scores of RoG and its variants for different hops of questions.
560
+
561
+ <table><tr><td rowspan="2">Methods</td><td colspan="3">WebQSP</td><td colspan="3">CWQ</td></tr><tr><td>1 hop</td><td>2 hop</td><td>≥3 hop</td><td>1 hop</td><td>2 hop</td><td>≥3 hop</td></tr><tr><td>RoG</td><td>77.03</td><td>64.86</td><td>-</td><td>62.88</td><td>58.46</td><td>37.82</td></tr><tr><td>RoG w/o reasoning</td><td>57.06</td><td>25.49</td><td>-</td><td>17.06</td><td>34.25</td><td>17.07</td></tr><tr><td>RoG w/o planning</td><td>50.33</td><td>51.66</td><td>-</td><td>31.04</td><td>33.93</td><td>23.29</td></tr></table>
562
+
563
+ Table 18: F1 scores of RoG and its variants for questions with varying numbers of answers.
564
+
565
+ <table><tr><td rowspan="2">Methods</td><td colspan="4">WebQSP</td><td colspan="4">CWQ</td></tr><tr><td>#Ans = 1</td><td>2 ≥ #Ans ≤ 4</td><td>5 ≥ #Ans ≤ 9</td><td>#Ans ≥ 10</td><td>#Ans = 1</td><td>2 ≥ #Ans ≤ 4</td><td>5 ≥ #Ans ≤ 9</td><td>#Ans ≥ 10</td></tr><tr><td>RoG</td><td>67.89</td><td>79.39</td><td>75.04</td><td>58.33</td><td>56.90</td><td>53.73</td><td>58.36</td><td>43.62</td></tr><tr><td>RoG w/o reasoning</td><td>33.49</td><td>52.80</td><td>58.05</td><td>66.01</td><td>16.61</td><td>27.06</td><td>40.10</td><td>34.45</td></tr><tr><td>RoG w/o planning</td><td>55.03</td><td>51.08</td><td>44.81</td><td>27.00</td><td>34.08</td><td>34.16</td><td>31.67</td><td>25.21</td></tr></table>
566
+
567
+ KGs. Although, RoG w/o reasoning can retrieve more answers to improve the performance. It still is inferior to RoG due to the lack of reasoning ability to remove the noise.
568
+
569
+ # A.8 CASE STUDIES: RELATION PATHS
570
+
571
+ We illustrate several examples of relation paths generated by $\mathsf{R}\circ \mathsf{G}$ in Table 19.
572
+
573
+ # A.9 CASE STUDIES: INTERPRETABLE RESULTS
574
+
575
+ We illustrate several examples of interpretable reasoning results generated by RoG in Table 20.
576
+
577
+ # A.10 PROMPTS
578
+
579
+ Planning module aims to generate faithful relation paths as plans for answering the question. The instruction template is presented as follows:
580
+
581
+ # Planning Prompt Template
582
+
583
+ Please generate a valid relation path that can be helpful for answering the following question: <Question>
584
+
585
+ where $<\text{Question}>$ indicates the question.
586
+
587
+ The reasoning module takes the question $q$ and a set of reasoning paths $\mathcal{W}_z$ to generate answers $a$ . The instruction template is presented as follows:
588
+
589
+ # Reasoning Prompt Template
590
+
591
+ Based on the reasoning paths, please answer the given question. Please keep the answer as simple as possible and return all the possible answers as a list.
592
+
593
+ Reasoning Paths: <Reasoning Paths>
594
+
595
+ Question: <Question>
596
+
597
+ where $\langle \text{Reasoning Paths} \rangle$ denotes the retrieved reasoning paths $\mathcal{W}_z$ which are formatted as a series of structural sentences:
598
+
599
+ $$
600
+ e _ {0} \rightarrow r _ {1} \rightarrow e _ {1} \rightarrow \dots \rightarrow r _ {l} \rightarrow e _ {l}
601
+ $$
602
+
603
+ .
604
+
605
+ $$
606
+ e _ {0} \rightarrow r _ {1} \rightarrow e _ {1} \rightarrow \dots \rightarrow r _ {l} \rightarrow e _ {l}.
607
+ $$
608
+
609
+ To exploit the explanation ability of RoG, we design a new instruction template for the reasoning module to generate interpretable results. The instruction template is presented as follows:
610
+
611
+ # Explanation Prompt Template
612
+
613
+ Based on the reasoning paths, please answer the given question and explain why.
614
+
615
+ ```xml
616
+ Here are some examples: <Examples>
617
+ ```
618
+
619
+ ```txt
620
+ Reasoning Paths: <Reasoning Paths>
621
+ ```
622
+
623
+ ```twig
624
+ Question: <Question>
625
+ ```
626
+
627
+ where the Examples denotes a few-shot human-annotated examples to demonstrate the explanation process.
628
+
629
+ Table 19: Examples of the generated relation paths.
630
+
631
+ <table><tr><td>Question</td><td>Top-3 Relation Paths</td></tr><tr><td>what does jamaican people speak?</td><td>z1: location.countrylanguages_spoken
632
+ z2: language.humanLanguages.countries_spoken.in
633
+ z3: location countryofficial language</td></tr><tr><td>where is jamarcus russell from?</td><td>z1: location.location.people_born_here
634
+ z2: people.person.place_of_birth
635
+ z3: sports.sports_league_draft_pick_player → sports.sports_league_draft_pick_location</td></tr><tr><td>where did edgar allan poe died?</td><td>z1: people.deceased_person_place_of_death
636
+ z2: people.cause_of_death的人物
637
+ z3: people.person.place_of_death</td></tr><tr><td>what highschool did harper lee go to?</td><td>z1: people.person.education → education.educational_institution.students_graduates
638
+ z2: education.education/student → education.educational_institution.students_graduates
639
+ z3: people.person.education → education.education.institutio</td></tr><tr><td>what are the songs that justin bieber wrote?</td><td>z1: musicRecordingArtist
640
+ z2: musiccompositioncomposer
641
+ z3: musiccomposer.compositions</td></tr><tr><td>what are the religions practiced in indonesia?</td><td>z1: people.person.nationality → people.person.religion
642
+ z2: location/statistical_region.religions → location.religion-percentage.religion
643
+ z3: location countryLanguages_spoken → religion.religionLanguages</td></tr><tr><td>Lou Seal is the mascot for the team that last won the World Series when?</td><td>z1: sports.mascot.team → sports.sports_championship_event_champion
644
+ z2: sports.mascot-team → sports.sports TEAM_championships
645
+ z3: sports.sports_championship_event_championship</td></tr><tr><td>What type of government is used in the coun-try with Northern District?</td><td>z1: location/administrative_division.first_level_division_of → government.form_of_government.countries
646
+ z2: location/administrative_division.first_level_division_of → location.country.form_of_government
647
+ z3: administrative_division.first_level_division_of → government.form_of_government.countries</td></tr><tr><td>The people from the country that contains Nord-Ouest Department speak what lan-guages today?</td><td>z1: location/administrative_division.first_level_division_of → language.human-language.countries_spoken_in
648
+ z2: location/administrative_division.first_level_division_of → location.country.languages_spoken
649
+ z3: base.aareas_schemaadministrative_area_administrative_parent → location.country.languages_spoken</td></tr><tr><td>What stadium does the team with mascot named Hank play at?</td><td>z1: sports.mascot TEAM → sports.sports_facility_teams
650
+ z2: sports.sports_team_mascot → sports.sports_facility_teams
651
+ z3: sports.mascot TEAM → sports.sports TEAM_arena_stadium</td></tr><tr><td>Which popular sports team in Spain, that won the 2014 Eurocup Finals championship?</td><td>z1: sports.sports_team_championships → sports.sports TEAM_location_teams
652
+ z2: sports.sports_team_location → sports.sports TEAM_location_teams
653
+ z3: sports.sports_team_location_teams</td></tr><tr><td>What educational institution with the mascot named Washington University Bear did Ten-
654
+ nessee Williams go to?</td><td>z1: education.educational_institution.mascot
655
+ z2: people.person.nationality → location.location.containedby
656
+ z3: education.education/student → education.education.institution</td></tr><tr><td>Who is the current head coach of the NFL squad owned by the Rooney family?</td><td>z1: sports.professional_sports_team Owner_s → american_football_footballcoach_currentTeam_head_coached
657
+ z2: sports.professional_sports_team Owner_s → american_football_footballTeam.currentHead Coaching
658
+ z3: american_football_football Coach currentTeam.head_coached</td></tr><tr><td>What is the home field of the sports team whose mascot is named Fredbird?</td><td>z1: sports.mascot TEAM → sports.sports_facility_teams
659
+ z2: sports.sports_team_mascot → sports.sports_facility_teams
660
+ z3: sports.mascot TEAM → sports.sports TEAM arena_stadium</td></tr></table>
661
+
662
+ Table 20: Examples of faithful and interpretable reasoning of RoG.
663
+
664
+ <table><tr><td>Question</td><td>Lou Seal is the mascot for the team that last won the World Series when?</td></tr><tr><td>Answer</td><td>2014</td></tr><tr><td>Reasoning Paths</td><td>Lou Seal → sports.mascot.team → San Francisco Giants → sports.sports_championship_event.champion → 2014 World Series</td></tr><tr><td>RoG</td><td>Based on the provided reasoning paths, we can determine when the team for which Lou Seal is the mascot last won the World Series:
665
+ 1. Lou Seal is associated with the San Francisco Giants.
666
+ 2. The San Francisco Giants are associated with winning the 2014 World Series.
667
+ Therefore, the San Francisco Giants, the team for which Lou Seal is the mascot, last won the World Series in 2014.</td></tr><tr><td>Question</td><td>what is mytimezone in louisiana?</td></tr><tr><td>Answer</td><td>Central Time Zone</td></tr><tr><td>Reasoning Paths</td><td>Louisiana → location.location.partiallycontainedby → Tangipahoa River → geography.river.origin → Osyka → location.location.time Zones → Central Time Zone
668
+ Louisiana → location.location.containedby → Alexandria → location.location.containedby → United States of America → location.location时间和 Zones → Central Time Zone</td></tr><tr><td>RoG</td><td>Based on the reasoning paths provided, it can be determined that Louisiana is in the Central Time Zone.
669
+ Here&#x27;s the explanation:
670
+ 1. The first reasoning path tells us that Louisiana is partially contained by the Tangipahoa River, which is a geographical feature. However, it doesn&#x27;t directly mention the time zone.
671
+ 2. The second reasoning path establishes that Louisiana is contained by Alexandria, which is in turn contained by the United States of America. The United States of America is in the Central Time Zone.
672
+ Therefore, based on these reasoning paths, the time zone in Louisiana is the Central Time Zone.</td></tr><tr><td>Question</td><td>Which child of Walt Disney died from lung cancer?</td></tr><tr><td>Answer</td><td>Sharon Mae Disney</td></tr><tr><td>Reasoning Paths</td><td>Lung cancer → people.deceased_person.cause_of_death → Sharon Mae Disney
673
+ Lung cancer → people.deceased_person.cause_of_death → Walt Disney
674
+ Walt Disney → people.deceased_person.cause_of_death → Lung cancer
675
+ Walt Disney → people.person(children → Diane Disney Miller
676
+ Walt Disney → people.cause_of_death.people → Circulatory collapse
677
+ Walt Disney → people.person.parent → Flora Call Disney
678
+ Walt Disney → people.person.parent → Elias Disney
679
+ Walt Disney → people.person.parent → Sharon Mae Disney</td></tr><tr><td>RoG</td><td>Based on the reasoning paths provided, it appears that Sharon Mae Disney is the child of Walt Disney who died from lung cancer.
680
+ The reasoning path &quot;Walt Disney → people.deceased_person.cause_of_death → Lung cancer&quot; directly connects Walt Disney to lung cancer as a cause of death, and since Sharon Mae Disney is also linked to lung cancer as a cause of death through the path &quot;Lung cancer → people.deceased_person.cause_of_death → Sharon Mae Disney,&quot; it can be concluded that Sharon Mae Disney is the child of Walt Disney who died from lung cancer.</td></tr></table>
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d99fbc21e284e28dfd1b4c93b423b0a01c1a2a52b4a48e9c729db086fa9d2672
3
+ size 1298493
2024/Reasoning on Graphs_ Faithful and Interpretable Large Language Model Reasoning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/3b03cf8d-8583-4d90-84be-c6d4e7d3269b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41beb28c59bdd9be661474f31a5c55d776606da33e673ea031c167d41ad571b3
3
+ size 2941900
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/full.md ADDED
@@ -0,0 +1,493 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REASONING WITH LATENT DIFFUSION IN OFFLINE REINFORCEMENT LEARNING
2
+
3
+ Siddarth Venkatraman $^{1,*}$ Shivesh Khaitan $^{2,*}$ Ravi Tej Akella $^{2,*}$ John Dolan $^{2}$ Jeff Schneider $^{2}$ Glen Berseth $^{1}$
4
+
5
+ <sup>1</sup>Mila, Université de Montréal <sup>2</sup>Carnegie Mellon University *Equal Contribution siddarth.venkatraman@mila.quebec
6
+
7
+ # ABSTRACT
8
+
9
+ Offline reinforcement learning (RL) holds promise as a means to learn high-reward policies from a static dataset, without the need for further environment interactions. However, a key challenge in offline RL lies in effectively stitching portions of suboptimal trajectories from the static dataset while avoiding extrapolation errors arising due to a lack of support in the dataset. Existing approaches use conservative methods that are tricky to tune and struggle with multi-modal data (as we show) or rely on noisy Monte Carlo return-to-go samples for reward conditioning. In this work, we propose a novel approach that leverages the expressiveness of latent diffusion to model in-support trajectory sequences as compressed latent skills. This facilitates learning a Q-function while avoiding extrapolation error via batch-constraining. The latent space is also expressive and gracefully copes with multi-modal data. We show that the learned temporally-abstract latent space encodes richer task-specific information for offline RL tasks as compared to raw state-action. This improves credit assignment and facilitates faster reward propagation during Q-learning. Our method demonstrates state-of-the-art performance across the D4RL suite, particularly excelling in long-horizon, sparse-reward tasks.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Offline reinforcement learning (RL) offers a promising approach to learning policies from static datasets. These datasets are often comprised of undirected demonstrations and suboptimal sequences collected using different behavior policies. Several methods (Fujimoto et al. (2019); Kostrikov et al.; Kumar et al. (2020)) have been proposed for offline RL, all of which aim to strike a balance between constraining the learned policy to the support of the behavior policy and improving upon it. At the core of many of these approaches is an attempt to mitigate the extrapolation error which arises while querying the learned Q-function on out-of-support samples for policy improvement. For example, in order to extract the best policy from the data, Q-learning uses an argmax over actions to obtain the temporal-difference target. However, querying the Q-function on out-of-support state-action can lead to errors via exploiting an imperfect Q-function (Fujimoto et al. (2019)).
14
+
15
+ Framing offline RL as a generative modeling problem has gained significant traction (Chen et al. (2021); Janner et al. (2021)); however, the performance is dependent on the power of the generative models used. These methods either avoid learning a Q-function or rely on other offline Q-learning methods. Recently diffusion models (Sohl-Dickstein et al. (2015); Song & Ermon (2019)), have emerged as state-of-the-art generative models for conditional image-generation (Ramesh et al. (2022); Sahara et al. (2022a)). Rather than avoiding Q-learning, we model the behavioral policy with diffusion and use this to avoid extrapolation error through batch-constraining. Previous diffusion-based sequence modelling methods in offline RL diffused over the raw state-action space. However, the low-level trajectory space tends to be poorly suited for reasoning. Some prior works (Pertsch et al. (2021); Ajay et al. (2020)) have proposed to instead reason in more well-conditioned spaces composed of higher-level behavioral primitives. Such temporal abstraction has been shown to result in faster and more reliable credit assignment (Machado et al. (2023); Mann & Mannor (2014)), particularly in long-horizon sparse-reward tasks. We harness the expressivity of powerful diffusion generative models to reason with temporal abstraction and improve credit assignment.
16
+
17
+ Inspired by the recent successes of Latent Diffusion Models (LDMs) (Rombach et al. (2022); Jun & Nichol (2023)), we propose learning similar latent trajectory representations for offline RL tasks by encoding rich high-level behaviors and learning a policy decoder to roll out low-level action sequences conditioned on these behaviors. The idea is to diffuse over semantically rich latent representations while relying on powerful decoders for high-frequency details. Prior works which explored diffusion for offline RL (Janner et al. (2022), Ajay et al.) directly diffused over the raw state-action space, and their architectural considerations for effective diffusion models limited the networks to be simple U-Nets (Ronneberger et al. (2015)). The separation of the diffusion model from the low-level policy allows us to model the low-level policy using a powerful autoregressive decoder. We perform state-conditioned latent diffusion on the learnt latent space and then learn a Q-function over states and corresponding latents. During Q-learning, we batch-constrain the candidate latents for the target Q-function using our expressive diffusion prior, thus mitigating extrapolation error. Our final policy samples latent skills from the LDM, scores the latents using the Q-function and executes the best behavior with the policy decoder. We refer to our method as Latent Diffusion-Constrained Q-learning (LDCQ).
18
+
19
+ There proposed latent diffusion skill learning method offers several advantages:
20
+
21
+ Flexible decoders for high-fidelity actions. The latent diffusion framework allows us to use powerful decoders for our low-level policy $\pi_{\theta}$ . Previous diffusion works for offline RL (Janner et al. (2022), Ajay et al.) directly diffused over the raw state-action space, and architectural considerations for effective diffusion models limited the networks to be simple U-Nets (Ronneberger et al. (2015)). The separation of the diffusion model from the low-level policy allows us to model $\pi_{\theta}$ using an expressive autoregressive decoder. (Model architecture discussed in Appendix A.2). We also note that LDMs can be easily used to model trajectories with discrete action spaces, since the decoder and diffusion models are separated.
22
+
23
+ Temporal Abstraction with information dense latent space. Prior works (Pertsch et al. (2021); Ajay et al. (2020)) have learned latent space representations of skills using VAEs. Their use of weaker Gaussian priors forces them to use higher values of the KL penalty multiplier $\beta$ to ensure the latents are well regularized. However, doing so restricts the information capacity of the latent, which limits the variation in behaviors captured by the latents. As we show in section 5.1, increasing the horizon $H$ reveals a clear separation of useful behavioral modes when the latents are weakly constrained. Our method allows modeling the dense latent space with diffusion.
24
+
25
+ Faster training and inference. Inference with LDMs is significantly faster than having to reconstruct the entire trajectory every forward pass with a raw trajectory diffusion model. The training process is also more memory efficient since the networks can be much smaller.
26
+
27
+ Our method excels at long-horizon credit assignment through temporal abstraction, which allows it to outperform prior offline RL algorithms in the challenging sparse reward antmaze and frankakitchen tasks. Further, the expressiveness of diffusion models also facilitates greatly improved batch-constrained Q-learning outperforming prior work in the Adroit suite and the image-based Carla lane driving task. Through these strong results, we show that Batch-Constrained Q-learning is a much stronger method than prior work has indicated, when paired with more expressive generative models and temporal abstraction. We also demonstrate how LDCQ can be extended to goal-conditioned reinforcement learning.
28
+
29
+ # 2 RELATED WORK
30
+
31
+ Offline RL. Offline RL poses the challenge of distributional shift while stitching suboptimal trajectories together. Conservative Q-Learning (CQL) (Kumar et al. (2020)) tries to constrain the policy to the behavioral support by learning a pessimistic Q-function that lower-bounds the optimal value function. Implicit Q-Learning (IQL) (Vieillard et al. (2022)) tries to avoid extrapolation error by performing a trade-off between SARSA and DQN using expectile regression. Inspired by notable achievements of generative models in various domains including text-generation (Vaswani et al. (2017)), speech synthesis (Kong et al.) and image-generation (Ramesh et al. (2022); Saharia et al. (2022a)), Chen et al. (2021) proposed to use a generative model for offline RL and bypass the need for Q-learning or bootstrapping altogether with return-conditioning (Srivastava et al. (2019); Kumar et al. (2019)). Our method instead formulates a solution with batch-constraining which uses
32
+
33
+ generative models to model the data distribution and use it to generate candidate actions to learn a Q-function without extrapolation-error. This relies on the assumption that sampling from the generative model does not sample out-of-support samples, which has been difficult to achieve with previously used generative models in offline RL. This is a form of Batch-Constrained Q-Learning (BCQ) (Fujimoto et al. (2019)). Further, to effectively address the problem of stitching, Pertsch et al. (2021) and Ajay et al. (2020) proposed learning policies in latent-trajectory spaces. However, they have to rely on a highly constrained latent space which is not rich enough for the downstream policy. Our proposed method to use latent diffusion, which can model complex distributions, allows for the needed flexibility in the latent space for effective Q-learning and the final policy.
34
+
35
+ Diffusion Probabilistic Models. Diffusion models (Sohl-Dickstein et al. (2015); Song & Ermon (2019)) have emerged as state-of-the-art generative models for conditional image-generation (Ramesh et al. (2022); Sahara et al. (2022a)), super-resolution (Saharia et al. (2022b)) and inpainting (Lugmayr et al. (2022)). Recent offline RL works (Janner et al. (2022), Ajay et al.) have proposed using diffusion to model trajectories and showcased its effectiveness in stitching together behaviors to improve upon suboptimal demonstrations. However, Janner et al. (2022) make the assumption that the value function is learnt using other offline methods and their classifier-guided diffusion requires querying the value function on noisy samples, which can lead to extrapolation-error. Similarly, Ajay et al. can suffer from distributional shift, as it relies on return-conditioning, and maximum returns from arbitrary states can be unknown without access to a value function. We propose a method for learning Q-functions in latent trajectory space with latent diffusion while avoiding extrapolation-error and facilitating long horizon trajectory stitching and credit assignment.
36
+
37
+ # 3 PRELIMINARIES
38
+
39
+ # 3.1 DIFFUSION PROBABILISTIC MODELS
40
+
41
+ Diffusion models (Sohl-Dickstein et al. (2015); Song & Ermon (2019)) are a class of latent variable generative model which learn to generate samples from a probability distribution $p(\mathbf{x})$ by mapping Gaussian noise to the target distribution through an iterative process. They are of the form $p_{\psi}(\mathbf{x}_0) := \int p_{\psi}(\mathbf{x}_{0:T}) d\mathbf{x}_{1:T}$ where $\mathbf{x}_0, \ldots, \mathbf{x}_T$ are latent variables and the model defines the approximate posterior $q(\mathbf{x}_{1:T} \mid \mathbf{x}_0)$ through a fixed Markov chain which adds Gaussian noise to the data according to a variance schedule $\beta_1, \ldots, \beta_T$ . This process is called the forward diffusion process:
42
+
43
+ $$
44
+ q \left(\mathbf {x} _ {1: T} \mid \mathbf {x} _ {0}\right) := \prod_ {t = 1} ^ {T} q \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t - 1}\right), \quad q \left(\mathbf {x} _ {t} \mid \mathbf {x} _ {t - 1}\right) := \mathcal {N} \left(\mathbf {x} _ {t}; \sqrt {1 - \beta_ {t}} \mathbf {x} _ {t - 1}, \beta_ {t} \mathbf {I}\right) \tag {1}
45
+ $$
46
+
47
+ The forward distribution can be computed for an arbitrary timestep $t$ in closed form. Let $\alpha_{t} = 1 - \beta_{t}$ and $\bar{\alpha}_{t} = \prod_{i=1}^{t} \alpha_{i}$ . Then $q(\mathbf{x}_{t} \mid \mathbf{x}_{0}) = \mathcal{N}(\mathbf{x}_{t}; \sqrt{\bar{\alpha}_{t}} \mathbf{x}_{0}, (1 - \bar{\alpha}_{t})\mathbf{I})$ .
48
+
49
+ Diffusion models learn to sample from the target distribution $p(\mathbf{x})$ by starting from Gaussian noise $p(\mathbf{x}_T) \sim \mathcal{N}(\mathbf{0},\mathbf{I})$ and iteratively denoising the noise to generate in-distribution samples. This is defined as the reverse diffusion process $p_{\psi}(\mathbf{x}_{t - 1}\mid \mathbf{x}_t)$ :
50
+
51
+ $$
52
+ p _ {\psi} \left(\mathbf {x} _ {0: T}\right) := p \left(\mathbf {x} _ {T}\right) \prod_ {t = 1} ^ {T} p _ {\psi} \left(\mathbf {x} _ {t - 1} \mid \mathbf {x} _ {t}\right), \quad p _ {\psi} \left(\mathbf {x} _ {t - 1} \mid \mathbf {x} _ {t}\right) := \mathcal {N} \left(\mathbf {x} _ {t - 1}; \mu_ {\psi} \left(\mathbf {x} _ {t}, t\right), \boldsymbol {\Sigma} _ {\psi} \left(\mathbf {x} _ {t}, t\right)\right) \tag {2}
53
+ $$
54
+
55
+ The reverse process is trained by minimizing a surrogate loss-function (Ho et al. (2020)):
56
+
57
+ $$
58
+ \mathcal {L} (\psi) = \mathbb {E} _ {t \sim [ 1, T ], \mathbf {x} _ {0} \sim q (\mathbf {x} _ {0}), \epsilon \sim \mathcal {N} (\mathbf {0}, \mathbf {I})} | | \epsilon - \epsilon_ {\psi} (\mathbf {x} _ {t}, t) | | ^ {2} \tag {3}
59
+ $$
60
+
61
+ Diffusion can be performed in a compressed latent space $\mathbf{z}$ (Rombach et al. (2022)) instead of the final high-dimensional output space of $\mathbf{x}$ . This separates the reverse diffusion model $p_{\psi}(\mathbf{z}_{t-1} \mid \mathbf{z}_t)$ from the decoder $p_{\theta}(\mathbf{x} \mid \mathbf{z})$ . The training is done in two stages, where the decoder is jointly trained with an encoder, similar to a $\beta$ -Variational Autoencoder (Kingma & Welling; Higgins et al. (2016)) with a low $\beta$ . The prior is then trained to fit the optimized latents of this model. We explain this two-stage training in more detail in section 4.1.
62
+
63
+ # 3.2 OFFLINE REINFORCEMENT LEARNING
64
+
65
+ The reinforcement learning (RL) problem can be formulated as a Markov decision process (MDP). This MDP is a tuple $\langle \rho_0, S, A, r, P, \gamma \rangle$ , where $\rho_0$ is the initial state distribution, $S$ is a set of states, $A$ is a set of actions, $r: S \times A \to \mathbb{R}$ is the reward function, $P: S \times A \times S \to [0,1]$ is the transition function that defines the probability of moving from one state to another after taking an action, and $\gamma \in [0,1)$ is the discount factor that determines the importance of future rewards. The goal in RL is to learn a policy, i.e., a mapping from states to actions, that maximizes the expected cumulative discounted reward. In the offline RL setting (Levine et al., 2020), the agent has access to a static dataset $\mathcal{D} = \{\mathbf{s}_t^i, \mathbf{a}_t^i, \mathbf{s}_{t+1}^i, r_t^i\}$ of transitions generated by a unknown behavior policy $\pi_{\beta}(\mathbf{a} \mid \mathbf{s})$ and the goal is to learn a new policy using only this dataset without interacting with the environment. Unlike behavioral cloning, offline RL methods seek to improve upon the behavior policy used to collect the offline dataset. The distribution mismatch between the behavior policy and the training policy can result in problems such as querying the target Q-function with actions not supported in the offline dataset leading to the extrapolation error problem.
66
+
67
+ # 4 LATENT DIFFUSION REINFORCEMENT LEARNING
68
+
69
+ In this section, we elaborate on our latent diffusion-based method for offline RL.
70
+
71
+ # 4.1 TWO-STAGE LDM TRAINING
72
+
73
+ Latent Representation and Low-Level Policy. The first stage in training the latent diffusion model is comprised of learning a latent trajectory representation. Given a dataset $\mathcal{D}$ of $H$ -length trajectories $\pmb{\tau}_{H}$ represented as sequences of states and actions, $\mathbf{s}_0, \mathbf{a}_0, \mathbf{s}_1, \mathbf{a}_1, \dots, \mathbf{s}_{H-1}, \mathbf{a}_{H-1}$ , we want to learn a low-level policy $\pi_{\theta}(\mathbf{a}|\mathbf{s}, \mathbf{z})$ such that $\mathbf{z}$ represents high-level behaviors in the trajectory. This is done using a $\beta$ -Variational Autoencoder (VAE) (Kingma & Welling; Higgins et al. (2016)). Specifically, we maximize the evidence lower bound (ELBO):
74
+
75
+ $$
76
+ \mathcal {L} (\theta , \phi , \omega) = \mathbb {E} _ {\boldsymbol {\tau} _ {H} \sim D} \left[ \mathbb {E} _ {q _ {\phi} (\mathbf {z} \mid \boldsymbol {\tau} _ {H})} \left[ \sum_ {t = 0} ^ {H - 1} \log \pi_ {\theta} \left(\mathbf {a} _ {t} \mid \mathbf {s} _ {t}, \mathbf {z}\right) \right] - \beta D _ {K L} \left(q _ {\phi} (\mathbf {z} \mid \boldsymbol {\tau} _ {H}) \mid | p _ {\omega} (\mathbf {z} \mid \mathbf {s} _ {0})\right) \right] \tag {4}
77
+ $$
78
+
79
+ where $q_{\phi}$ represents our approximate posterior over $\mathbf{z}$ given $\tau_{H}$ , and $p_{\omega}$ represents our conditional Gaussian prior over $\mathbf{z}$ , given $\mathbf{s}_0$ . Note that unlike BCQ (Fujimoto et al. (2019)), which uses the VAE as the generative model, we only use the $\beta$ -VAE to learn a latent space to diffuse over. As such, the conditional Gaussian prior $p_{\omega}$ is simply a loose regularization of this latent space, and only weakly constrains the posterior. This is facilitated by the ability of latent diffusion models to later sample from such complex latent distributions. Prior works (Pertsch et al. (2021); Ajay et al. (2020)) have learned latent space representations of skills using VAEs. Their use of weaker Gaussian priors forces them to use higher values of the KL penalty multiplier $\beta$ to ensure the latents are well regularized. However, doing so restricts the information capacity of the latent, which limits the variation in behaviors captured by the latents. As we show in Section 5.1, increasing the horizon $H$ reveals a clear separation of useful behavioral modes when the latents are weakly constrained.
80
+
81
+ The use of latent diffusion gives us flexibility to make the decoder more powerful. The low-level policy $\pi_{\theta}$ is represented as an autoregressive model which can capture the fine details across the action dimensions, and is similar to the decoders used by Ghasemipour et al. (2021) and Ajay et al. (2020). While the environments we test in this work use continuous action spaces, the use of latent diffusion allows the method to easily translate to discrete action spaces too, since the decoder can simply be altered to output a categorical distribution while the diffusion process remains unchanged.
82
+
83
+ Latent Diffusion Prior. For training the diffusion model, we collect a dataset of state-latent pairs $(\mathbf{s}_0,\mathbf{z})$ such that $\pmb{\tau}_{H}\sim \mathcal{D}$ is a $H$ -length trajectory snippet, $\mathbf{z}\sim q_{\phi}(\mathbf{z}\mid \pmb{\tau}_{H})$ where $q_{\phi}$ is the VAE encoder trained earlier, and $\mathbf{s}_0$ is the first state in $\pmb{\tau}_{H}$ . We want to model the prior $p(\mathbf{z}\mid \mathbf{s}_0)$ , which is the distribution of the learnt latent space $\mathbf{z}$ conditioned on a state $\mathbf{s}_0$ . This effectively represents the different behaviors possible from the state $\mathbf{s}_0$ as supported by the behavioral policy that collected the dataset. To this end, we learn a conditional latent diffusion model $p_{\psi}(\mathbf{z}\mid \mathbf{s}_0)$ by learning the time-dependent denoising function $\mu_{\psi}(\mathbf{z}_t,\mathbf{s}_0,t)$ , which takes as input the current diffusion latent estimate $\mathbf{z}_t$ and the diffusion timestep $t$ to predict the original latent $\mathbf{z}_0$ . Like Ramesh et al. (2022)
84
+
85
+ and Jun & Nichol (2023), we found predicting the original latent $\mathbf{z}_0$ works better than predicting the noise $\epsilon$ . We reweigh the objective based on the noise level according to Min-SNR- $\gamma$ strategy (Hang et al. (2023)). This re-balances the objective, which is dominated by the loss terms corresponding to diffusion time steps closer to $T$ . Concretely, we modify the objective in Eq. 3 to minimize:
86
+
87
+ $$
88
+ \mathcal {L} (\psi) = \mathbb {E} _ {t \sim [ 1, T ], \boldsymbol {\tau} _ {H} \sim \mathcal {D}, \mathbf {z} _ {0} \sim q _ {\phi} (\mathbf {z} | \boldsymbol {\tau} _ {H}), \mathbf {z} _ {t} \sim q (\mathbf {z} _ {t} | \mathbf {z} _ {0})} \left[ \min \left\{\operatorname {S N R} (t), \gamma \right\} \left(\left\| \mathbf {z} _ {0} - \mu_ {\psi} (\mathbf {z} _ {t}, \mathbf {s} _ {0}, t) \right\| ^ {2}\right) \right] \tag {5}
89
+ $$
90
+
91
+ Note that $q_{\phi}(\mathbf{z} \mid \pmb{\tau}_{H})$ is different from $q(\mathbf{z}_t \mid \mathbf{z}_0)$ , the former being the approximate posterior of the trained VAE, while the latter is the forward Gaussian diffusion noising process. We use DDPM (Ho et al. (2020)) to sample from the diffusion prior in this work due to its simple implementation. As proposed in Ho & Salimans, we use classifier-free guidance for diffusion. This modifies the original training setup to learn both a conditional $\mu_{\psi}(\mathbf{z}_t, \mathbf{s}_0, t)$ and an unconditional model. The unconditional version, is represented as $\mu_{\psi}(\mathbf{z}_t, \emptyset, t)$ where a dummy token $\emptyset$ takes the place of $\mathbf{s}_0$ . The following update is then used to generate samples: $\mu_{\psi}(\mathbf{z}_t, \emptyset, t) + w(\mu_{\psi}(\mathbf{z}_t, \mathbf{s}_0, t) - \mu_{\psi}(\mathbf{z}_t, \emptyset, t))$ , where $w$ is a tunable hyper-parameter. Increasing $w$ results in reduced sample diversity, in favor of samples with high conditional density. We summarize the two stage LDM training in Appendix 2.
92
+
93
+ ![](images/0b63bdc72469d107eb6d02185c271b7fb66913ca46245eb7c70d28bc783b6aea.jpg)
94
+ a) Latent Space Representation Training
95
+
96
+ ![](images/4c3d50abff71de3b897063f54246c5cfc9a161d5125a37bcbb8c36631c7030d2.jpg)
97
+
98
+ ![](images/f32cabb35b763b625a123c674b6dd39332aa8f10f30854b3ccb455c9f87317e4.jpg)
99
+ b) Latent Diffusion Model Training
100
+
101
+ ![](images/4a2288ab18acdc2cfdbefee1a12e1df159328fc33879935ab8f8cc8aaef6ead7.jpg)
102
+ c) Policy Execution
103
+ Figure 1: Latent Diffusion Reinforcement Learning Overview a) We first learn the latent space and low-level policy decoder by training a $\beta$ -VAE over $H$ -length sequences from the demonstrator dataset. b) We train a latent diffusion prior conditioned on $\mathbf{s}_0$ to predict latents generated by the VAE encoder. c) After learning a Q function using LDCQ (Algorithm 1), we score latents sampled by the prior with this Q function and execute the low-level policy $\pi_{\theta}$ conditioned on the argmax latent.
104
+
105
+ # 4.2 LATENT DIFFUSION-CONSTRAINED Q-LEARNING (LDCQ)
106
+
107
+ In batch-constrained Q-learning (BCQ), the target Q-function is constrained to only be maximized using actions that were taken by the demonstrator from the given state (Fujimoto et al. (2019)).
108
+
109
+ $$
110
+ \pi (\mathbf {s}) = \operatorname {a r g m a x} Q (\mathbf {s}, \mathbf {a}) \tag {6}
111
+ $$
112
+
113
+ $$
114
+ \begin{array}{c} \mathbf {a} \\ s. t. (\mathbf {s}, \mathbf {a}) \in \mathcal {D} \end{array}
115
+ $$
116
+
117
+ In a deterministic MDP setting, BCQ is theoretically guaranteed to converge to the optimal batch-constrained policy. In any non-trivial setting, constraining the policy to actions having support from a given state in the dataset is not feasible, especially if the states are continuous. Instead, a behavior model $\pi_{\psi}(\mathbf{a} \mid \mathbf{s})$ must be learned on the demonstrator data and samples from this model are used as candidates for the argmax:
118
+
119
+ $$
120
+ \pi (\mathbf {s}) = \underset {\mathbf {a} _ {i} \sim \pi_ {\psi} (\mathbf {a} | \mathbf {s})} {\operatorname {a r g m a x}} Q (\mathbf {s}, \mathbf {a} _ {i}) \tag {7}
121
+ $$
122
+
123
+ However, in many offline RL datasets, the behavior policy is highly multimodal either due to the demonstrations being undirected or because the behavior policy is actually a mixture of unimodal
124
+
125
+ policies, making it difficult for previously used generative models like VAEs to sample from the distribution accurately. The multimodality of this policy is further exacerbated with increases in temporal abstraction in the latent space, as we show in section 5.1. We propose using latent diffusion to model this distribution, as diffusion is well suited for modelling such multi-modal distributions. We propose to learn a Q-function in the latent action space with latents sampled from the diffusion model. Specifically, we learn a Q-function $Q(\mathbf{s},\mathbf{z})$ , which represents the action-value of a latent action sequence $\mathbf{z}$ given state $\mathbf{s}$ . At test time, we generate candidate latents from the diffusion prior $p_{\psi}(\mathbf{z}|\mathbf{s})$ and select the one which maximizes the learnt Q-function. We then use this latent with the low-level policy $\pi_{\theta}(\mathbf{a}_i|\mathbf{s}_i,\mathbf{z})$ to generate the action sequence for $H$ timesteps.
126
+
127
+ Training. We collect a replay buffer $\mathcal{B}$ for the dataset $\mathcal{D}$ of $H$ -length trajectories and store transition tuples $(\mathbf{s}_t, \mathbf{z}, r_{t:t+H}, \mathbf{s}_{t+H})$ from $\tau_H \sim \mathcal{D}$ , where $\mathbf{s}_t$ is the first state in $\tau_H$ , $\mathbf{z} \sim q_\phi(\mathbf{z} \mid \tau_H)$ is the latent sampled from the VAE approximate posterior, $r_{t:t+H}$ represents the $\gamma$ -discounted sum of rewards accumulated over the $H$ time-steps in $\tau_H$ , and $\mathbf{s}_{t+H}$ represents the state at the end of $H$ -length trajectory snippet. The Q-function is learned with temporal-difference updates (Sutton & Barto (2018)), where we sample a batch of latents for the target argmax using the diffusion prior $p_\psi(\mathbf{z} \mid \mathbf{s}_{t+H})$ . This should only sample latents which are under the support of the behavioral policy, and hence with the right temporal abstraction, allows for stitching skills to learn an optimal policy grounded on the data support. The resulting Q update can be summarized as:
128
+
129
+ $$
130
+ Q \left(\mathbf {s} _ {t}, \mathbf {z}\right) \leftarrow \left(r _ {t: t + H} + \gamma^ {H} Q \left(\mathbf {s} _ {t + H}, \underset {\mathbf {z} _ {i} \sim p _ {\psi} (\mathbf {z} \mid \mathbf {s} _ {t + H})} {\operatorname {a r g m a x}} \left(Q \left(\mathbf {s} _ {t + H}, \mathbf {z} _ {i}\right)\right)\right)\right) \tag {8}
131
+ $$
132
+
133
+ We use Clipped Double Q-learning as proposed in (Fujimoto et al. (2018)) to further reduce overestimation bias during training. We also use Prioritized Experience Replay (Schaul et al. (2015)) to accelerate the training in sparse-reward tasks like AntMaze and FrankaKitchen. We summarize our proposed LDCQ method in Algorithm 1.
134
+
135
+ Algorithm 1 Latent Diffusion-Constrained Q-Learning (LDCQ)
136
+
137
+ 1: Input: prioritized-replay-buffer $\mathcal{B}$ , horizon $H$ , target network update-rate $\rho$ , mini-batch size $N$ , number of sampled latents $n$ , maximum iterations $M$ , discount-factor $\gamma$ , latent diffusion denoising function $\mu_{\psi}$ , variance schedule $\alpha_{1}, \ldots, \alpha_{T}, \bar{\alpha}_{1}, \ldots, \bar{\alpha}_{T}, \beta_{1}, \ldots, \beta_{T}$ .
138
+ 2: Initialize Q-networks $Q_{\Theta_1}$ and $Q_{\Theta_2}$ with random parameters $Q_{\Theta_1}, Q_{\Theta_2}$ and target Q-networks $Q_{\Theta_1^{target}}$ and $Q_{\Theta_2^{target}}$ with $\Theta_1^{target} \gets \Theta_1, \Theta_2^{target} \gets \Theta_2$
139
+ 3: for iter $= 1$ to $\tilde{M}$ do
140
+ 4: Sample a minibatch of $N$ transitions $\{(\mathbf{s}_t,\mathbf{z},r_{t:t + H},\mathbf{s}_{t + H})\}$ from $\mathcal{B}$
141
+ 5: Sample $n$ latents for each transition: $\mathbf{z}_T\sim \mathcal{N}(\mathbf{0},\mathbf{I})$
142
+ 6: for $t = T$ to 1 do DDPM Sampling
143
+ 7: $\hat{\mathbf{z}} = \mu_{\psi}(\mathbf{z}_t,\emptyset ,t) + w(\mu_{\psi}(\mathbf{z}_t,\mathbf{s}_{t + H},t) - \mu_{\psi}(\mathbf{z}_t,\emptyset ,t))$
144
+ 8: $\mathbf{z}_{t - 1}\sim \mathcal{N}(\frac{\sqrt{\alpha_t}(1 - \bar{\alpha}_{t - 1})}{1 - \bar{\alpha}_t}\mathbf{z}_t + \frac{\sqrt{\bar{\alpha}_{t - 1}}\beta_t}{1 - \bar{\alpha}_t}\hat{\mathbf{z}},\mathbb{I}(t > 1)\beta_t\mathbf{I})$
145
+ 9: end for
146
+ 10: Compute the target values $y = r_{t:t + H} + \gamma^{H}\{\max_{\mathbf{z}_{0}}\{\min_{j = 1,2}Q_{\Theta_{j}^{target}}(\mathbf{s}_{t + H},\mathbf{z}_{0})\} \}$
147
+ 11: Update $Q$ -networks by minimizing the loss: $\frac{1}{N} ||y - Q_{\Theta}(\mathbf{s}_t,\mathbf{z})||_2^2$
148
+ 12: Update target $Q$ -networks: $\Theta^{target} \gets \rho \Theta + (1 - \rho) \Theta^{target}$
149
+ 13: end for
150
+
151
+ Policy Execution. The final policy for LDCQ comprises generating candidate latents $\mathbf{z}$ for a particular state $\mathbf{s}$ using the latent diffusion prior $\mathbf{z} \sim p_{\psi}(\mathbf{z} \mid \mathbf{s})$ . These latents are then scored using the learnt Q-function and the best latent $\mathbf{z}_{max}$ is decoded using the VAE autoregressive decoder $\mathbf{a} \sim \pi_{\theta}(\mathbf{a} \mid \mathbf{s}, \mathbf{z}_{max})$ to obtain H-length action sequences which are executed sequentially. Note that the latent diffusion model is used both during training the Q-function and during the final evaluation phase, ensuring that the sampled latents do not go out-of-support. The policy execution algorithm is detailed in the Appendix 3.
152
+
153
+ # 4.3 LATENT DIFFUSION GOAL CONDITIONING (LDGC)
154
+
155
+ Diffuser (Janner et al. (2022)) proposed framing certain navigation problems as a sequence inpainting task, where the last state of the diffused trajectory is set to be the goal during sampling. We
156
+
157
+ can similarly condition our diffusion prior on the goal to sample from feasible latents that lead to the goal. This prior is of the form $p_{\psi}(\mathbf{z} \mid \mathbf{s}_0, \mathbf{s}_g)$ , where $\mathbf{s}_g$ is the target goal state. Since with latent diffusion, the training of the low-level policy alongside the VAE is done separately from the diffusion prior training, we can reuse the same VAE posterior to train different diffusion models, such as this goal-conditioned variant. At test time, we perform classifier-free guidance to further push the sampling towards high-density goal-conditioned latents. For tasks which are suited to goal conditioning, this can be simpler to implement and achieves better performance than Q-learning. Also, unlike Diffuser, our method does not need to have the goal within the planning horizon of the trajectory. This allows our method to be used for arbitrarily long-horizon tasks.
158
+
159
+ # 5 EXPERIMENTAL EVALUATION AND ANALYSIS
160
+
161
+ In our experiments, we focus on 1) studying the helpfulness temporal abstraction has in distinguishing latent skills (Section 5.1) 2) evaluating the ability of diffusion models to sample from the latent space (section 5.2 and 5.3) and 3) evaluating the performance of our method in the D4RL offline RL benchmarks (section 5.4).
162
+
163
+ # 5.1 TEMPORAL ABSTRACTION INDUCES MULTI-MODALITY IN LATENT SPACE
164
+
165
+ In this section, we study how the horizon length $H$ affects the latent space and provide empirical justification for learning long-horizon latent space representations. For our experiment, we consider the kitchen-mixed- $\nu 0$ task from the D4RL benchmark suite (Fu et al. (2020)). The goal in this task is to control a 9-DoF robotic arm to manipulate multiple objects (microwave, kettle, burner and a switch) sequentially, in a single episode to reach a desired configuration, with only sparse 0-1 completion reward for every object that attains the target configuration. As Fu et al. (2020) states, there is a high degree of multi-modality in this task arising from the demonstration trajectories because different trajectories in the dataset complete the tasks in a random order. Thus, before starting to solve any task, the policy implicitly needs to choose which task to solve and then generate the actions to solve the task. Given a state, the dataset can consist of multiple behavior modes, and averaging over these modes leads to suboptimal action sequences. Hence, being able to differentiate between these tasks is desirable.
166
+
167
+ We hypothesize that as we increase our sequence horizon $H$ , we should see better separation between the modes. In Figure 2, we plot a 2D (PCA) projection of the VAE encoder latents of the starting state-action sequences in the kitchen-mixed dataset. With a lower horizon, these modes are difficult to isolate and the latents appear to be drawn from a Normal distribution (Figure 2). However, as we increase temporal abstraction from $H = 1$ to $H = 20$ , we can see three distinct modes emerge, which when cross-referenced with the dataset correspond to the three common tasks executed from the starting state by the behavioral policy (microwave, kettle, and burner). These modes better capture the underlying variation in an action sequence, and having picked one we can run our low-level policy to execute it. As demonstrated in our experiments, such temporal abstraction facilitates easier Q-stitching, with better asymptotic performance. However, in order to train these abstract Q functions, it is necessary to sample from the complex multi-modal distribution and the VAE conditional Gaussian prior is no longer adequate for this purpose, as shown in section 5.2.
168
+
169
+ # 5.2 LDMS ADDRESS MULTI-MODALITY IN LATENT SPACE
170
+
171
+ In this section, we provide empirical evidence that latent diffusion models are superior in modelling multi-modal distributions as compared to VAEs. For our experiment, we again consider the kitchen-mixed-v0 task. The goal of the generative model here is to learn the prior distribution $p(\mathbf{z} \mid \mathbf{s})$ and sample from it such that we can get candidate latents corresponding to state s belonging to the support of the dataset. However, as demonstrated earlier, the multi-modality in the latent spaces increases with the horizon. We visualize the latents from the initial states of all trajectories in the dataset in Figure 3a using PCA with $H = 20$ . The three clusters in the figure correspond to the latents of three different tasks namely microwave, kettle and burner. Similarly, we also visualize the latents predicted by the diffusion model (Figure 3b) and the VAE conditional prior (Figure 3c) for the same initial states by projecting them onto the principal components of the ground truth latents. We can see that the diffusion prior is able to sample effectively all modes from the ground truth
172
+
173
+ ![](images/86e937a10c23098ece0a45467be98df28becb410ca9cfe975a5b033b6086569b.jpg)
174
+ Figure 2: Projection of latents across horizon. Latent projections of trajectory snippets with different horizon lengths $H$ . From the initial state there are 3 tasks (Kettle, Microwave, Burner) which are randomly selected at the start of each episode. These 3 primary modes emerge as we increase $H$ , with the distribution turning multi-modal.
175
+
176
+ latent distribution, while the VAE prior spreads its mass over the three modes, and thus samples out of distribution in between the three modes. Using latents sampled from the VAE prior to learn the Q-function can thus lead to sampling from out of the support, resulting in extrapolation error.
177
+
178
+ ![](images/2aeeab67cec1cd16df561d80c37c95edde2565e6ed10c6b5c306fc1249a12f61.jpg)
179
+ (a) Ground truth
180
+
181
+ ![](images/e44b6aeb140d86018fa313422b7e2046bb1a7e169e152cd4ff0bab4b08c121ff.jpg)
182
+ (b) Diffusion prior
183
+ Figure 3: Visualization of latents projected using PCA for kitchen-mixed with $H = 20$ . The diffusion prior models the ground truth much more accurately while the VAE prior generates out-of-distribution samples.
184
+
185
+ ![](images/c3536e15231a3d9001170d6b886436344dc64a770dc810f60e6042d23c9514b1.jpg)
186
+ (c) VAE prior
187
+
188
+ # 5.3 PERFORMANCE IMPROVEMENT WITH TEMPORAL ABSTRACTION
189
+
190
+ We empirically demonstrate the importance of temporal abstraction and the performance improvement with diffusion on modelling temporally abstract latent spaces. We compare our method with a variant of BCQ which uses temporal abstraction $(H > 1)$ , which we refer to as BCQ-H. We use the same VAE architecture here as LDCQ, and fit the conditional Gaussian prior with a network having comparable parameters to our diffusion model.
191
+
192
+ We find that generally, increasing the horizon $H$ results in better performance, both in BCQ-H and LDCQ, and both of them eventually saturate and degrade, possibly due to the limited decoder capacity. With $H = 1$ , the latent distribution is roughly Normal as discussed earlier and our diffusion prior is essentially equivalent to the Gaussian prior in BCQ, so we see similar performance. As we increase $H$ , however, the diffusion prior is able to efficiently sample from the more complex latent distribution that emerges, which allows the resulting policies to benefit from temporal abstraction. BCQ-H, while also seeing a performance boost with increased temporal abstraction, lags behind LDCQ. We plot D4RL score-vs- $H$ for BCQ-H and LDCQ evaluated on the kitchen-mixed-v0 task in Figure 4. The benefit of temporal abstraction is ablated for different tasks in Appendix J.
193
+
194
+ ![](images/15fdffccdca8acad3664bc5a736bb679b4e25859ab2322cdfb5a6ee6f7d2721e.jpg)
195
+ Figure 4: D4RL score of LDCQ and BCQ-H on kitchen-mixed-v0 with varying sequence horizon $H$
196
+
197
+ # 5.4 OFFLINE RL BENCHMARKS
198
+
199
+ In this section, we investigate the effectiveness of our Latent Diffusion Reinforcement Learning methods on the D4RL offline RL benchmark suite (Fu et al. (2020)). We compare with Behavior Cloning and several state-of-the-art offline RL methods. Diffuser (Janner et al. (2022)) and Decision Diffuser (Ajay et al.) are prior raw trajectory diffusion methods. We found that our method does not require much hyperparameter tuning and only had to vary the sequence horizon $H$ across tasks. In maze2d and AntMaze tasks we use $H = 30$ , in kitchen tasks we use $H = 20$ and in locomotion and adroit tasks we use $H = 10$ . We train our diffusion prior with $T = 200$ diffusion steps. The other hyperparameters which are constant across tasks are provided in the supplemental material. In Table 1, we compare performance across tasks in the D4RL suite. We would like to highlight tasks in Maze2d, AntMaze and FrankaKitchen environments which are known to be the most difficult in D4RL, with most algorithms performing poorly. Maze2d and AntMaze consist of undirected demonstrations controlling the agent to navigate to random locations in a maze. AntMaze is quite difficult because the agent must learn the high-level trajectory stitching task alongside low-level control of the ant robot with 8-DoF. In the maze navigation tasks, we also evaluate the performance of our goal-conditioned (LDGC) variant. For Diffuser runs we use the goal-conditioned inpainting version proposed by the authors since the classifier-guided version yielded poor results.
200
+
201
+ Table 1: Performance comparison on D4RL tasks. LDGC evaluated in goal-directed maze tasks.
202
+
203
+ <table><tr><td>Dataset</td><td>BC</td><td>BCQ</td><td>CQL</td><td>IQL</td><td>DT</td><td>Diffuser</td><td>DD</td><td>LDCQ (Ours)</td><td>LDGC (Ours)</td></tr><tr><td>maze2d-umaze-v1</td><td>3.8</td><td>12.8</td><td>5.7</td><td>47.4</td><td>27.3</td><td>113.5</td><td>-</td><td>134.2 ± 4.0</td><td>141.0 ± 2.7</td></tr><tr><td>maze2d-medium-v1</td><td>30.3</td><td>8.3</td><td>5.0</td><td>34.9</td><td>32.1</td><td>121.5</td><td>-</td><td>125.3 ± 2.5</td><td>139.9 ± 4.2</td></tr><tr><td>maze2d-large-v1</td><td>5.0</td><td>6.2</td><td>12.5</td><td>58.6</td><td>18.1</td><td>123.0</td><td>-</td><td>150.1 ± 2.9</td><td>206.8 ± 3.1</td></tr><tr><td>antmaze-umaze-diverse-v2</td><td>45.6</td><td>55.0</td><td>84.0</td><td>62.2</td><td>54.0</td><td>-</td><td>-</td><td>81.4 ± 3.5</td><td>85.6 ± 2.4</td></tr><tr><td>antmaze-medium-diverse-v2</td><td>0.0</td><td>0.0</td><td>53.7</td><td>70.0</td><td>0.0</td><td>45.5</td><td>24.6</td><td>68.9 ± 0.7</td><td>75.6 ± 0.9</td></tr><tr><td>antmaze-large-diverse-v2</td><td>0.0</td><td>2.2</td><td>14.9</td><td>47.5</td><td>0.0</td><td>22.0</td><td>7.5</td><td>57.7 ± 1.8</td><td>73.6 ± 1.3</td></tr><tr><td>kitchen-complete-v0</td><td>65.0</td><td>52.0</td><td>43.8</td><td>62.5</td><td>-</td><td>-</td><td>-</td><td>62.5 ± 2.1</td><td>-</td></tr><tr><td>kitchen-partial-v0</td><td>38.0</td><td>31.7</td><td>50.1</td><td>46.3</td><td>42.0</td><td>-</td><td>57.0</td><td>67.8 ± 0.8</td><td>-</td></tr><tr><td>kitchen-mixed-v0</td><td>51.5</td><td>34.5</td><td>52.4</td><td>51.0</td><td>50.7</td><td>-</td><td>65.0</td><td>62.3 ± 0.5</td><td>-</td></tr><tr><td>halfcheetah-medium-expert-v2</td><td>55.2</td><td>64.7</td><td>91.6</td><td>86.7</td><td>86.8</td><td>88.9</td><td>90.6</td><td>90.2 ± 0.9</td><td>-</td></tr><tr><td>walker2d-medium-expert-v2</td><td>107.5</td><td>57.5</td><td>108.8</td><td>109.6</td><td>108.1</td><td>106.9</td><td>108.8</td><td>109.3 ± 0.4</td><td>-</td></tr><tr><td>hopper-medium-expert-v2</td><td>52.5</td><td>110.9</td><td>105.4</td><td>91.5</td><td>107.6</td><td>103.3</td><td>111.8</td><td>111.3 ± 0.2</td><td>-</td></tr><tr><td>halfcheetah-medium-v2</td><td>42.6</td><td>40.7</td><td>44.0</td><td>47.4</td><td>42.6</td><td>42.8</td><td>49.1</td><td>42.8 ± 0.7</td><td>-</td></tr><tr><td>walker2d-medium-v2</td><td>75.3</td><td>53.1</td><td>72.5</td><td>78.3</td><td>74.0</td><td>79.6</td><td>82.5</td><td>69.4 ± 3.5</td><td>-</td></tr><tr><td>hopper-medium-v2</td><td>52.9</td><td>54.5</td><td>58.5</td><td>66.3</td><td>67.6</td><td>74.3</td><td>79.3</td><td>66.2 ± 1.7</td><td>-</td></tr><tr><td>halfcheetah-medium-replay-v2</td><td>36.6</td><td>38.2</td><td>45.5</td><td>44.2</td><td>36.6</td><td>37.7</td><td>39.3</td><td>41.8 ± 0.4</td><td>-</td></tr><tr><td>walker2d-medium-replay-v2</td><td>26.0</td><td>15.0</td><td>77.2</td><td>73.9</td><td>66.6</td><td>70.6</td><td>75.0</td><td>68.5 ± 4.3</td><td>-</td></tr><tr><td>hopper-medium-replay-v2</td><td>18.1</td><td>33.1</td><td>95.0</td><td>94.7</td><td>82.7</td><td>93.6</td><td>100.0</td><td>86.2 ± 2.5</td><td>-</td></tr><tr><td>pen-human</td><td>34.4</td><td>68.9</td><td>37.5</td><td>71.5</td><td>-</td><td>-</td><td>-</td><td>74.1 ± 2.7</td><td>-</td></tr><tr><td>hammer-human</td><td>1.2</td><td>0.3</td><td>4.4</td><td>1.4</td><td>-</td><td>-</td><td>-</td><td>1.5 ± 0.8</td><td>-</td></tr><tr><td>door-human</td><td>0.5</td><td>0.0</td><td>9.9</td><td>4.3</td><td>-</td><td>-</td><td>-</td><td>11.8 ± 1.9</td><td>-</td></tr><tr><td>relocate-human</td><td>0.0</td><td>-0.1</td><td>0.2</td><td>0.1</td><td>-</td><td>-</td><td>-</td><td>0.3± 0.1</td><td>-</td></tr><tr><td>pen-cloned</td><td>37.0</td><td>44.0</td><td>39.2</td><td>37.3</td><td>-</td><td>-</td><td>-</td><td>47.7 ± 1.9</td><td>-</td></tr><tr><td>hammer-cloned</td><td>0.6</td><td>0.4</td><td>2.1</td><td>2.1</td><td>-</td><td>-</td><td>-</td><td>2.8 ± 1.2</td><td>-</td></tr><tr><td>door-cloned</td><td>0.0</td><td>0.0</td><td>0.4</td><td>1.6</td><td>-</td><td>-</td><td>-</td><td>1.1± 0.4</td><td>-</td></tr><tr><td>relocate-cloned</td><td>-0.3</td><td>-0.3</td><td>-0.1</td><td>-0.2</td><td>-</td><td>-</td><td>-</td><td>-0.2± 0.1</td><td>-</td></tr><tr><td>pen-expert</td><td>85.1</td><td>114.9</td><td>107.0</td><td>-</td><td>-</td><td>-</td><td>-</td><td>121.2 ± 3.6</td><td>-</td></tr><tr><td>hammer-expert</td><td>125.6</td><td>107.2</td><td>86.7</td><td>-</td><td>-</td><td>-</td><td>-</td><td>45.8 ± 10.5</td><td>-</td></tr><tr><td>door-expert</td><td>34.9</td><td>99.0</td><td>101.5</td><td>-</td><td>-</td><td>-</td><td>-</td><td>105.1 ± 0.3</td><td>-</td></tr><tr><td>relocate-expert</td><td>101.3</td><td>41.6</td><td>95.0</td><td>-</td><td>-</td><td>-</td><td>-</td><td>104.7 ± 1.4</td><td>-</td></tr><tr><td>carla-lane-v0</td><td>17.2</td><td>-0.1</td><td>20.9</td><td>18.6</td><td>-</td><td>-</td><td>-</td><td>24.7 ± 3.2</td><td>-</td></tr></table>
204
+
205
+ Both LDCQ and LDGC achieve state-of-the-art results in all sparse reward D4RL tasks. The goal-conditioned variant outperforms all others in maze2d and AntMaze. This variant is extremely simple to implement through supervised learning of the diffusion prior with no Q-learning or online planning and is ideal for goal-reaching tasks. We also provide an evaluation of our method on the D4RL locomotion suite and the Adroit robotics suite. While these tasks are not specifically focused on trajectory-stitching, our method is competitive in the locomotion tasks and stronger than baselines in Adroit. To extend our method to Carla's image input spaces, we compress the image using a $\beta$ -VAE encoder such that our method operates on a compressed state space (more in Appendix G).
206
+
207
+ # 6 CONCLUSION
208
+
209
+ In this work, we showed that offline RL datasets comprised of suboptimal demonstrations have expressive multi-modal latent spaces which can be captured with temporal abstraction and is well suited for learning high-reward policies. With a powerful conditional generative model to capture the richness of this latent space, we demonstrated that the simple batch-constrained Q-learning framework can be directly used to obtain strong performance. Our biggest improvements come from long-horizon sparse reward tasks, which most prior offline RL methods struggled with, even previous raw trajectory diffusion methods. Our approach also required no task-specific tuning, except for the sequence horizon $H$ . We believe that latent diffusion has enormous potential in offline RL and our work has barely scratched the surface of possibilities.
210
+
211
+ # 7 REPRODUCIBILITY
212
+
213
+ We provide link to our code in section A.1. We provide details of our model architectures in section A.2 and hyperparameters in A.3. Our experiments were conducted on the open D4RL benchmark datasets.
214
+
215
+ # REFERENCES
216
+
217
+ Anurag Ajay, Yilun Du, Abhi Gupta, Joshua B Tenenbaum, Tommi S Jaakkola, and Pulkit Agrawal. Is conditional generative modeling all you need for decision-making? In NeurIPS 2022 Foundation Models for Decision Making Workshop.
218
+ Anurag Ajay, Aviral Kumar, Pulkit Agrawal, Sergey Levine, and Ofir Nachum. Opal: Offline primitive discovery for accelerating offline reinforcement learning. In International Conference on Learning Representations, 2020.
219
+ Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, P. Abbeel, A. Srinivas, and Igor Mordatch. Decision transformer: Reinforcement learning via sequence modeling. In Neural Information Processing Systems, 2021.
220
+ Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning. arXiv preprint arXiv:2004.07219, 2020.
221
+ Scott Fujimoto, Herke Hoof, and David Meger. Addressing function approximation error in actor-critic methods. In International conference on machine learning, pp. 1587-1596. PMLR, 2018.
222
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In International conference on machine learning, pp. 2052-2062. PMLR, 2019.
223
+ Seyed Kamyar Seyed Ghasemipour, Dale Schuurmans, and Shixiang Shane Gu. Emaq: Expectedmax q-learning operator for simple yet effective offline and online rl. In International Conference on Machine Learning, pp. 3682-3691. PMLR, 2021.
224
+ Tiankai Hang, Shuyang Gu, Chen Li, Jianmin Bao, Dong Chen, Han Hu, Xin Geng, and Baining Guo. Efficient diffusion training via min-snr weighting strategy. arXiv preprint arXiv:2303.09556, 2023.
225
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
226
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher P. Burgess, Xavier Glorot, Matthew M. Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations, 2016.
227
+ Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. In NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications.
228
+
229
+ Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840-6851, 2020.
230
+ Michael Janner, Qiyang Li, and Sergey Levine. Offline reinforcement learning as one big sequence modeling problem. Advances in neural information processing systems, 34:1273-1286, 2021.
231
+ Michael Janner, Yilun Du, Joshua Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. In International Conference on Machine Learning, pp. 9902-9915. PMLR, 2022.
232
+ Heewoo Jun and Alex Nichol. Shap-e: Generating conditional 3d implicit functions. arXiv preprint arXiv:2305.02463, 2023.
233
+ Diederik P Kingma and Max Welling. Auto-encoding variational $\{\mathrm{Bayes}\}$ . In Int. Conf. on Learning Representations.
234
+ Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. Diffwave: A versatile diffusion model for audio synthesis. In International Conference on Learning Representations.
235
+ Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q-learning. In International Conference on Learning Representations.
236
+ Aviral Kumar, Xue Bin Peng, and Sergey Levine. Reward-conditioned policies. arXiv preprint arXiv:1912.13465, 2019.
237
+ Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. Advances in Neural Information Processing Systems, 33:1179-1191, 2020.
238
+ Sergey Levine, Aviral Kumar, G. Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. ArXiv, abs/2005.01643, 2020.
239
+ Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, and Luc Van Gool. Repaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11461-11471, 2022.
240
+ Marlos C Machado, André Barreto, Doina Precup, and Michael Bowling. Temporal abstraction in reinforcement learning with the successor representation. Journal of Machine Learning Research, 24(80):1-69, 2023.
241
+ Timothy Mann and Shie Mannor. Scaling up approximate value iteration with options: Better policies with fewer iterations. In International conference on machine learning, pp. 127-135. PMLR, 2014.
242
+ Tim Pearce, Tabish Rashid, Anssi Kanervisto, Dave Bignell, Mingfei Sun, Raluca Georgescu, Sergio Valcarcel Macua, Shan Zheng Tan, Ida Momennejad, Katja Hofmann, and Sam Devlin. Imitating human behaviour with diffusion models, 2023.
243
+ Karl Pertsch, Youngwoon Lee, and Joseph Lim. Accelerating reinforcement learning with learned skill priors. In Jens Kober, Fabio Ramos, and Claire Tomlin (eds.), Proceedings of the 2020 Conference on Robot Learning, volume 155 of Proceedings of Machine Learning Research, pp. 188-204. PMLR, 16-18 Nov 2021. URL https://proceedings.mlr.press/v155/pertsch21a.html.
244
+ Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022.
245
+ Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022.
246
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. volume 9351, pp. 234-241, 10 2015. ISBN 978-3-319-24573-7. doi: 10.1007/978-3-319-24574-4_28.
247
+
248
+ Chitwan Sahara, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479-36494, 2022a.
249
+ Chitwan Sahara, Jonathan Ho, William Chan, Tim Salimans, David J Fleet, and Mohammad Norouzi. Image super-resolution via iterative refinement. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022b.
250
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
251
+ Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In Francis Bach and David Blei (eds.), Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 2256-2265, Lille, France, 07-09 Jul 2015. PMLR. URL https://proceedings.mlr.press/v37/sohl-dickstein15.html.
252
+ Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems, 32, 2019.
253
+ Rupesh Kumar Srivastava, Pranav Shyam, Filipe Mutz, Wojciech Jaskowski, and Jürgen Schmidhuber. Training agents using upside-down reinforcement learning. arXiv preprint arXiv:1912.02877, 2019.
254
+ Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
255
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
256
+ Nino Vieillard, Marcin Andrychowicz, Anton Raichuk, Olivier Pietquin, and Matthieu Geist. Implicitly regularized rl with implicit q-values. In Gustau Camps-Valls, Francisco J. R. Ruiz, and Isabel Valera (eds.), Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, volume 151 of Proceedings of Machine Learning Research, pp. 1380-1402. PMLR, 28-30 Mar 2022. URL https://proceedings.mlr.press/v151/vieillard22a.html.
257
+ Yiqin Yang, Hao Hu, Wenzhe Li, Siyuan Li, Jun Yang, Qianchuan Zhao, and Chongjie Zhang. Flow to control: Offline reinforcement learning with lossless primitive discovery. In Proceedings of the Thirty-Seventh AAAI Conference on Artificial Intelligence and Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence and Thirteenth Symposium on Educational Advances in Artificial Intelligence, AAAI'23/IAAI'23/EAAI'23. AAAI Press, 2023. ISBN 978-1-57735-880-0. doi: 10.1609/aaai.v37i9.26286. URL https://doi.org/10.1609/aaai.v37i9.26286.
258
+ Wenxuan Zhou, Sujay Bajracharya, and David Held. Plas: Latent action space for offline reinforcement learning. In Conference on Robot Learning, 2020.
259
+
260
+ # A TRAINING DETAILS
261
+
262
+ # A.1 SOURCE CODE
263
+
264
+ The source code is available at: https://github.com/ldcq/ldcq.
265
+
266
+ # A.2 NETWORK ARCHITECTURE
267
+
268
+ # A.2.1 VARIATIONAL AUTOENCODER
269
+
270
+ Encoder. For learning the latent trajectory representation, our VAE uses an architecture similar to Ajay et al. (2020). The encoder consists of two stacked bidirectional GRU layers, followed by mean and standard deviation heads which are each a 2 layer MLP with RELU activation for the hidden layers. The mean output head is a linear layer. The standard deviation output head is followed by a SoftPlus activation function to ensure it is always positive. The hidden layer dimension is fixed to 256.
271
+
272
+ Decoder. For the low-level policy decoder, we use an auto-regressive policy network similar to that described in EMAQ (Ghasemipour et al. (2021)), in which each element of the action vector has its own MLP network, taking as input the current state, latent representation, and all previously-sampled action elements. The complete action vector is sampled element-by-element, with the most recently sampled element becoming an input to the network for the next element. These MLP networks consists of 2 layers followed by 2 layers of mean and standard deviation heads similar to the encoder network. The mean output head is a linear layer and the standard deviation output head is followed by a SoftPlus activation. Again, ReLU activation is used after all hidden layer and the hidden dimension is fixed to 256.
273
+
274
+ # A.2.2 DIFFUSION PRIOR
275
+
276
+ The diffusion prior is a deep ResNet (He et al. (2016)) architecture consisting of 8 residual blocks. It takes as input a vector representing a latent trajectory $\mathbf{z}$ and outputs a denoised version of the latent. The hidden blocks are of dimensions: [128, 32, 16, 8, 16, 32, 128]. Similar to a U-Net (Ronneberger et al. (2015)), the initial blocks are connected by residual connections to the later blocks having the same hidden dimension. The diffusion timestep $t$ is encoded with a 256-dimensional sinusoidal embedding and then further encoded with a 2-layer MLP. The conditioning state $\mathbf{s}$ is also encoded by a 2 layer MLP. In each residual block, the state and time encodings are concatenated with the current layer activation for conditioning. When training the unconditional diffusion model for classifier-free guidance, the state input is given as a vector of zeros to represent a null vector.
277
+
278
+ # A.2.3 Q-NETWORKS
279
+
280
+ The Q-networks take as input the state $\mathbf{s}$ , latent $\mathbf{z}$ and consist of a 5 layer MLP with 256 hidden units in the first 3 layers, 32 hidden units in the third layer, and finally a linear output layer. We use GELU activation function between hidden layers. LayerNorm is applied before each activation.
281
+
282
+ # A.3 HYPERPARAMETERS
283
+
284
+ The hyperparameters which are constant across tasks for the different stages of our proposed method are given in Tables 2, 3 and 4.
285
+
286
+ # A.4 HARDWARE
287
+
288
+ The models were trained on NVIDIA RTX A6000. Since different tasks have different dataset sizes, the model training times changes across tasks. Depending on the task, training the $\beta$ -VAE took between 3-7 hours, the diffusion prior took between 4-12 hours and the Q-Learning took between 3-5 hours.
289
+
290
+ Table 2: $\beta$ -VAE hyperparameters
291
+
292
+ <table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Learning rate</td><td>5e-5</td></tr><tr><td>Batch size</td><td>128</td></tr><tr><td>Epochs</td><td>100</td></tr><tr><td>Latent dimension (z)</td><td>16</td></tr><tr><td>β</td><td>0.05</td></tr><tr><td>Hidden layer dimension</td><td>256</td></tr></table>
293
+
294
+ Table 3: Diffusion training hyperparameters
295
+
296
+ <table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Learning rate</td><td>1e-4</td></tr><tr><td>Batch size</td><td>32</td></tr><tr><td>Epochs</td><td>300</td></tr><tr><td>Diffusion steps (T)</td><td>500</td></tr><tr><td>Drop probability (For unconditional prior)</td><td>0.1</td></tr><tr><td>Variance schedule</td><td>linear</td></tr><tr><td>Sampling algorithm</td><td>DDPM</td></tr><tr><td>γ (For Min-SNR-γ weighing)</td><td>5</td></tr></table>
297
+
298
+ Table 4: Q-Learning hyperparameters
299
+
300
+ <table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Learning rate</td><td>5e-4</td></tr><tr><td>Batch size</td><td>128</td></tr><tr><td>Discount factor (γ)</td><td>0.995</td></tr><tr><td>Target net update rate (ρ)</td><td>0.995</td></tr><tr><td>PER buffer α</td><td>0.7</td></tr><tr><td>PER buffer β</td><td>Linearly increased from 0.3 to 1, Grows by 0.03 every 3000 steps</td></tr><tr><td>Diffusion samples for batch argmax</td><td>500</td></tr></table>
301
+
302
+ # B LOW LEVEL POLICY AND SKILL PRIOR TRAINING
303
+
304
+ We describe the training of the $\beta$ -VAE for learning the skill representations and the low level policy, and then training the diffusion skill prior in Algorithm 2
305
+
306
+ Algorithm 2 LL Policy and Skill Prior Training
307
+ 1: Input: horizon $H$ , KL regularization coefficient $\beta$ , number of steps $M$ , diffusion timesteps $T$ , $\gamma$ for Min-SNR- $\gamma$ , sequence encoder $q_{\phi}$ , conditional Gaussian prior $p_{\omega}$ , policy decoder $\pi_{\theta}$ , latent diffusion prior $\mu_{\psi}$ , offline dataset $\mathcal{D}$ , variance schedule $\alpha_{1}, \ldots, \alpha_{T}, \bar{\alpha}_{1}, \ldots, \bar{\alpha}_{T}, \beta_{1}, \ldots, \beta_{T}$ .
308
+ 2: for iter = 1 to $M$ do ▷ Training $\beta$ -VAE
309
+ 3: Sample a $n$ size minibatch of $H$ length subtrajectories $\{\mathbf{s}_{t:t + H}^{(1:n)}, \mathbf{a}_{t:t + H}^{(1:n)}\}$ from $\mathcal{D}$
310
+ 4: Sample $\mathbf{z}^i \sim q_{\phi}(\mathbf{z}|\mathbf{s}_{t:t + H}^{(i)})$
311
+ 5: $\mathcal{L}(\phi, \theta, \omega) = \sum_{i=1}^{n} \sum_{j=t}^{t + H} -\log \pi_{\theta}(\mathbf{a}_j^{(i)}|\mathbf{s}_j^{(i)}, \mathbf{z}^{(i)}) + \beta \mathcal{D}_{KL}(q_{\phi}(\mathbf{z}|\mathbf{s}_{t:t + H}^{(i)})||p_{\omega}(\mathbf{z}|\mathbf{s}_t^{(i)}))$
312
+ 6: Take gradient step to minimize $\mathcal{L}$
313
+ 7: end for
314
+ 8: for iter = 1 to $M$ do ▷ Training diffusion skill prior
315
+ 9: Sample a $n$ size minibatch of $H$ length subtrajectories $\{\mathbf{s}_{t:t + H}^{(1:n)}, \mathbf{a}_{t:t + H}^{(1:n)}\}$ from $\mathcal{D}$
316
+ 10: Sample $\mathbf{z}^{(i)} \sim q_{\phi}(\mathbf{z}|\mathbf{s}_{t:t + H}^{(i)})$
317
+ 11: Sample diffusion time $\tau^{(i)} \sim \mathcal{U}[1, T]$
318
+ 12: Noise latents $\mathbf{z}_{\tau}^{(i)} \sim \mathcal{N}(\sqrt{\bar{\alpha}_{\tau}}\mathbf{z}^{(i)}, (1 - \bar{\alpha}_{\tau})\mathbf{I})$
319
+ 13: $\mathcal{L}(\psi) = \sum_{i=1}^{n}\min\{\mathrm{SNR}(\tau^{(i)}), \gamma\}(|\mathbf{z}^{(i)} - \mu_{\psi}(\mathbf{z}_{\tau}^{(i)}, \mathbf{s}_{t}, \tau)|^2)$
320
+ 14: Take gradient step to minimize $\mathcal{L}$
321
+ 15: end for
322
+
323
+ # C POLICY EXECUTION
324
+
325
+ After training the diffusion prior and Q-learning, we execute the policy as described in Algorithm 3.
326
+
327
+ Algorithm 3 Policy Execution
328
+ 1: Input: horizon $H$ , number of latents to sample $n$ , Q-function $Q_{\Theta}$ , policy decoder $\pi_{\theta}$ , latent diffusion denoising function $\mu_{\psi}$ , variance schedule $\alpha_{1}, \ldots, \alpha_{T}$ , $\bar{\alpha}_{1}, \ldots, \bar{\alpha}_{T}$ , $\beta_{1}, \ldots, \beta_{T}$ .
329
+ 2: done = False
330
+ 3: while not done do
331
+ 4: Observe environment state $\mathbf{s}_0$
332
+ 5: Sample $n$ latents: $\mathbf{z}_T \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$
333
+ 6: for $t = T$ to 1 do
334
+ 7: $\hat{\mathbf{z}} = \mu_{\psi}(\mathbf{z}_t, \emptyset, t) + w(\mu_{\psi}(\mathbf{z}_t, \mathbf{s}_0, t) - \mu_{\psi}(\mathbf{z}_t, \emptyset, t))$
335
+ 8: $\mathbf{z}_{t-1} \sim \mathcal{N}(\frac{\sqrt{\alpha_t(1-\bar{\alpha}_{t-1})}}{1-\bar{\alpha}_t} \mathbf{z}_t + \frac{\sqrt{\alpha_{t-1}} \beta_t}{1-\bar{\alpha}_t} \hat{\mathbf{z}}, \mathbb{I}(t > 1) \beta_t \mathbf{I})$
336
+ 9: end for
337
+ 10: Find best skill by scoring them with Q-function: $i = \operatorname{argmax}_{i} Q_{\Theta}(\mathbf{s}_0, \mathbf{z}_0^i)$
338
+ 11: $h = 0$
339
+ 12: while $h < H$ and not done do
340
+ 13: Observe environment state $\mathbf{s}_h$
341
+ 14: Get action $\mathbf{a}_h \in \pi_{\theta}(\mathbf{a} | \mathbf{s}_h, \mathbf{z}_0^i)$
342
+ 15: Execute action $\mathbf{a}_h$
343
+ 16: Update done
344
+ 17: $h = h + 1$
345
+ 18: end while
346
+ 19: end while
347
+
348
+ # D COMPARISON WITH OTHER LATENT SKILL LEARNING METHODS
349
+
350
+ In this section, we compare our method against existing algorithms which do latent skill learning with generative models in the D4RL tasks. Specifically, we compare against the VAE based algorithms OPAL (Ajay et al. (2020)) and PLAS (Zhou et al. (2020)), and the Normalizing Flow based algorithm Flow to Control (Yang et al. (2023)). We were not able to replicate the OPAL results with the code provided to us by the authors. We list the best scores we were able to obtain with it. We did not find code to implement Flow to Control, and so use the results listed in their paper. The results are shown in table 5.
351
+
352
+ Table 5: Performance comparison on D4RL tasks. Algorithms are evaluated only on the tasks listed in their respective papers.
353
+
354
+ <table><tr><td>Dataset</td><td>OPAL</td><td>PLAS</td><td>Flow2Control</td><td>LDCQ (Ours)</td><td>LDGC (Ours)</td></tr><tr><td>maze2d-large-v1</td><td>-</td><td>122.7</td><td>-</td><td>150.1 ± 2.9</td><td>206.8 ± 3.1</td></tr><tr><td>antmaze-medium-diverse-v2</td><td>57.5</td><td>0.0</td><td>83.7</td><td>68.9 ± 0.7</td><td>75.6 ± 0.9</td></tr><tr><td>antmaze-large-diverse-v2</td><td>52.0</td><td>0.0</td><td>52.8</td><td>57.7 ± 1.8</td><td>73.6 ± 1.3</td></tr><tr><td>kitchen-partial-v0</td><td>55.5</td><td>43.9</td><td>74.9</td><td>67.8 ± 0.8</td><td>-</td></tr><tr><td>kitchen-mixed-v0</td><td>50.2</td><td>40.8</td><td>69.2</td><td>62.3 ± 0.5</td><td>-</td></tr><tr><td>halfcheetah-medium-expert-v2</td><td>-</td><td>99.3</td><td>-</td><td>90.2 ± 0.9</td><td>-</td></tr><tr><td>walker2d-medium-expert-v2</td><td>-</td><td>97.2</td><td>-</td><td>109.3 ± 0.4</td><td>-</td></tr><tr><td>hopper-medium-expert-v2</td><td>-</td><td>111.0</td><td>-</td><td>111.3 ± 0.2</td><td>-</td></tr><tr><td>halfcheetah-medium-v2</td><td>-</td><td>42.2</td><td>-</td><td>42.8 ± 0.7</td><td>-</td></tr><tr><td>walker2d-medium-v2</td><td>-</td><td>66.9</td><td>-</td><td>69.4 ± 3.5</td><td>-</td></tr><tr><td>hopper-medium-v2</td><td>-</td><td>36.9</td><td>-</td><td>66.2 ± 1.7</td><td>-</td></tr><tr><td>halfcheetah-medium-replay-v2</td><td>-</td><td>45.7</td><td>-</td><td>41.8 ± 0.4</td><td>-</td></tr><tr><td>walker2d-medium-replay-v2</td><td>-</td><td>14.3</td><td>-</td><td>68.5 ± 4.3</td><td>-</td></tr><tr><td>hopper-medium-replay-v2</td><td>-</td><td>51.9</td><td>-</td><td>86.2 ± 2.5</td><td>-</td></tr><tr><td>pen-human</td><td>-</td><td>67.3</td><td>63.1</td><td>74.1 ± 2.7</td><td>-</td></tr><tr><td>hammer-human</td><td>-</td><td>4.6</td><td>3.3</td><td>1.5 ± 0.8</td><td>-</td></tr><tr><td>door-human</td><td>-</td><td>4.4</td><td>15.1</td><td>11.8 ± 1.9</td><td>-</td></tr><tr><td>relocate-human</td><td>-</td><td>0.3</td><td>-</td><td>0.3 ± 0.1</td><td>-</td></tr><tr><td>pen-cloned</td><td>-</td><td>49.0</td><td>65.8</td><td>47.7 ± 1.9</td><td>-</td></tr><tr><td>hammer-cloned</td><td>-</td><td>1.0</td><td>2.1</td><td>2.8 ± 1.2</td><td>-</td></tr><tr><td>door-cloned</td><td>-</td><td>3.3</td><td>8.1</td><td>1.1 ± 0.4</td><td>-</td></tr><tr><td>relocate-cloned</td><td>-</td><td>-0.2</td><td>-</td><td>-0.2 ± 0.1</td><td>-</td></tr></table>
355
+
356
+ # E LATENT DIFFUSION-CONSTRAINED PLANNING (LDCP)
357
+
358
+ In this section, we explore another method to derive a policy for offline RL with latent diffusion other than our proposed methods Latent Diffusion-Constrained Q-Learning (LDCQ) and Latent Diffusion Goal Conditioning (LDGC). This is a model-based method which learns a temporally abstract world model of the environment from offline data. Specifically, we learn a temporally abstract world model $p_{\eta}(\mathbf{s}_{t + H} \mid \mathbf{s}_t, \mathbf{z})$ that predicts the state outcome of executing a particular latent behavior after $H$ steps. That is, given the current state $\mathbf{s}_t$ and a latent behavior $\mathbf{z}$ the model predicts the distribution of the state $\mathbf{s}_{t + H}$ . This is trained in a supervised manner by sampling transition tuples $(\mathbf{s}_t, \mathbf{z}, \mathbf{s}_{t + H})$ from $\tau_H \sim \mathcal{D}$ and minimizing the objective:
359
+
360
+ $$
361
+ \mathcal {L} (\eta) = \mathbb {E} _ {\boldsymbol {\tau} _ {H} \sim \mathcal {D}} \| p _ {\eta} \left(\mathbf {s} _ {t + H} \mid \mathbf {s} _ {t}, \mathbf {z}\right) - \mathbf {s} _ {t + H} \| ^ {2} \tag {9}
362
+ $$
363
+
364
+ where $\eta$ are the parameters of the temporally abstract world model $p_{\eta}$ .
365
+
366
+ In goal-reaching environments, we leverage this model to do planning using the diffusion prior. We sample $n$ latents $\mathbf{z}^i$ ( $1 \leq i \leq n$ ) using the diffusion prior for the current state $\mathbf{s}_t$ , and use the learnt dynamics model to compute predicted future state $\mathbf{s}_{t + H}^i$ for each latent $\mathbf{z}^i$ . These final states are then scored using a cost-function $\mathcal{I}$ and the latent corresponding to the best final state is chosen for
367
+
368
+ execution. Note that sampling latents from the diffusion prior ensures that the world model is not queried on out-of-support data. We refer to this method as Latent Diffusion-Constrained Planning (LDCP). The planning procedure is summarized in Algorithm 4.
369
+
370
+ Algorithm 4 Latent Diffusion-Constrained Planning (LDCP)
371
+ 1: Input: horizon $H$ , number of latents to sample $n$ , cost-function $\mathcal{J}$ , policy decoder $\pi_{\theta}$ , temporally abstract world model $p_{\eta}$ , latent diffusion denoising function $\mu_{\psi}$ , variance schedule $\alpha_{1}, \ldots, \alpha_{T}, \bar{\alpha}_{1}, \ldots, \bar{\alpha}_{T}, \beta_{1}, \ldots, \beta_{T}$ .
372
+ 2: done = False
373
+ 3: while not done do
374
+ 4: Observe environment state $\mathbf{s}_0$
375
+ 5: Sample $n$ latents: $\mathbf{z}_T \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$
376
+ 6: for $t = T$ to 1 do
377
+ 7: $\hat{\mathbf{z}} = \mu_{\psi}(\mathbf{z}_t, \emptyset, t) + w(\mu_{\psi}(\mathbf{z}_t, \mathbf{s}_0, t) - \mu_{\psi}(\mathbf{z}_t, \emptyset, t))$
378
+ 8: $\mathbf{z}_{t-1} \sim \mathcal{N}(\frac{\sqrt{\alpha_t(1-\bar{\alpha}_{t-1})}}{1-\bar{\alpha}_t} \mathbf{z}_t + \frac{\sqrt{\bar{\alpha}_{t-1} \beta_t}}{1-\bar{\alpha}_t} \hat{\mathbf{z}}, \mathbb{I}(t > 1) \beta_t \mathbf{I})$
379
+ 9: end for
380
+ 10: Compute future states for each latent $\mathbf{z}_0^i$ : $\mathbf{s}_H^i = p_{\eta}(\mathbf{s}_H^i | \mathbf{s}_0, \mathbf{z}_0^i)$
381
+ 11: Find best skill based on the cost-function: $i = \text{argmin } \mathcal{J}(\mathbf{s}_H^i)$
382
+ 12: $h = 0$
383
+ 13: while $h < H$ and not done do
384
+ 14: Observe environment state $\mathbf{s}_h$
385
+ 15: Get action $\mathbf{a}_h \in \pi_{\theta}(\mathbf{a} | \mathbf{s}_h, \mathbf{z}_0^i)$
386
+ 16: Execute action $\mathbf{a}_h$
387
+ 17: Update done
388
+ 18: $h = h + 1$
389
+ 19: end while
390
+ 20: end while
391
+
392
+ The cost-function which we use for the goal-reaching environments is the Euclidean distance to the goal. We can also extend this planning to horizons greater than $H$ by further sampling latents for each future state $\mathbf{s}_{t + H}^i (1\leq i\leq n)$ . This means, after sampling $n$ latents for $\mathbf{s}_t$ with the diffusion prior, we further sample $n$ more latents for each of the future states $\mathbf{s}_{t + H}^i$ . This increases the 'planning depth' $d$ . The final states at the last level of planning are then scored using the cost-function and the latent at the first level which led to that final state is chosen for execution. This procedure complexity grows exponentially and thus the planning depth has to be restricted. For a planning depth of $d$ , there are $n^d$ model calls. We found a planning-depth of $d = 2$ to be sufficient for all navigation environments achieving state-of-the-art results. Thus, with a latent sequence horizon of $H = 30$ , our total planning horizon is 60. The results are tabulated in Table 6.
393
+
394
+ Table 6: Performance comparison on D4RL navigation tasks with LDCP.
395
+
396
+ <table><tr><td>Dataset</td><td>BC</td><td>BCQ</td><td>CQL</td><td>IQL</td><td>DT</td><td>Diffuser</td><td>DD</td><td>LDCQ (Ours)</td><td>LDGC (Ours)</td><td>LDCP (Ours)</td></tr><tr><td>maze2d-large-v1</td><td>5.0</td><td>6.2</td><td>12.5</td><td>58.6</td><td>18.1</td><td>123.0</td><td>-</td><td>150.1 ± 2.9</td><td>206.8 ± 3.1</td><td>184.3 ± 3.8</td></tr><tr><td>antmaze-medium-diverse-v2</td><td>0.0</td><td>0.0</td><td>53.7</td><td>70.0</td><td>0.0</td><td>45.5</td><td>24.6</td><td>68.9 ± 0.7</td><td>75.6 ± 0.9</td><td>77.0 ± 1.1</td></tr><tr><td>antmaze-large-diverse-v2</td><td>0.0</td><td>2.2</td><td>14.9</td><td>47.5</td><td>0.0</td><td>22.0</td><td>7.5</td><td>57.7 ± 1.8</td><td>73.6 ± 1.3</td><td>59.7 ± 1.3</td></tr></table>
397
+
398
+ # E.1 VISUALIZING MODEL PREDICTIONS
399
+
400
+ Learning a world model also allows us to visualize the effect of executing any given latent behavior. This means, even when the model is not used for planning, like in LDCQ, it can be used to compute the final state that will be reached for every latent behavior from a particular state. This information can be used to understand if the model is learning reasonable behavior modes.
401
+
402
+ We plot the $xy$ -coordinates of our abstract world model $p_{\eta}(\mathbf{s}_{t + H}\mid \mathbf{s}_t,\mathbf{z})$ predictions at a $T$ -intersection of AntMaze large environment for latents sampled from our diffusion prior $\mathbf{z}\sim p_{\psi}(\mathbf{z}\mid \mathbf{s}_t)$ in Figure 5 to demonstrate this. The plot shows that the diffusion prior sampled latents which go in all the three directions at the T-intersection.
403
+
404
+ ![](images/93760a0373a4f36582e7109b99aa5bbbc808d9060f4708f1028bce98a8caf8cc.jpg)
405
+ Figure 5: Visualizing model predictions: Visualization of future states with latents sampled from the diffusion prior at a T-intersection in antmaze-large-diverse-v2 D4RL task. We can see multimodal future state predictions corresponding to 3 possible directions at the T-intersection.
406
+
407
+ # F D4RL TASKS
408
+
409
+ ![](images/044cef98cddc9597f750906b11aea87e2db0ad2e19ebbe195e41ce7627a90491.jpg)
410
+ (a) Ant-Maze
411
+
412
+ ![](images/fb0ac3dc0afbd28aba3b83b4795844e90c210d667c12555c39385bade6deb566.jpg)
413
+ (b) Franka-Kitchen
414
+
415
+ ![](images/57475625df10c325be30b0bd200f3e7b9814a98001afce231d38556683156e3b.jpg)
416
+ (c) Adroit
417
+ Figure 6: D4RL environments
418
+
419
+ The tasks of AntMaze and Franka Kitchen require long horizon credit assignment and stitching trajectories in the behavior dataset. We highlight consistently strong performance in these tasks as the primary empirical result of our method, since most other baselines perform poorly here, even other diffusion based methods. The Adroit suite also consists of narrow, but precision oriented manipulation tasks with sparse rewards. We also show very strong performance here. This task does not require trajectory stitching, but needs filtering of low reward demonstrations while sticking close to the behavior support.
420
+
421
+ The locomotion datasets are collected from SAC agents of varying performance. Our method has average performance on the locomotion suite while being much stronger in the other tasks. We suspect the high periodicity of the walking gaits in the locomotion suite does not benefit much from reasoning with temporal abstraction. We also do not use a perturbation function during Q-learning like Fujimoto et al. (2019), which makes it difficult for us to improve over the poor controllers in medium and medium-replay locomotion datasets. Introducing a perturbation function requires careful tuning to avoid extrapolation error, and the converged Q-learning wouldn't necessarily correspond to a high value policy, which is why other offline RL methods, which try to balance this tradeoff, evaluate online during training and consider the best scores. We however only evaluate a policy once after training is fully complete.
422
+
423
+ # G CARLA AUTONOMOUS DRIVING TASK
424
+
425
+ To extend our method for tasks with high-dimensional image input spaces, we propose to compress the image space such that our method operates on this compressed state space. We create a low-dimensional compressed representation using an autoencoder $\mathcal{E}$ before using the LDCQ framework. Note that this encoder operates on a single image and not on a temporal sequence of images (Figure 7). The downstream framework of LDCQ however operates on the temporal compressed image sequences.
426
+
427
+ ![](images/997c7188ee9f864816bee20c2e4cb624d58a1a75c67fbff8fb8d4a5f841ef61d.jpg)
428
+ Figure 7: Autoencoder training for image-based task
429
+
430
+ We evaluate the performance of our method on the CARLA autonomous driving D4RL task. The task consists of an agent which has control to the throttle (gas pedal), the steering, and the break pedal for the car. It receives $48 \times 48$ RGB images from the driver's perspective as observations. We use a $\beta$ -VAE architecture to create a 32-dimensional compressed state for this task. The horizon for LDCQ is set to $H = 30$ .
431
+
432
+ # H RANDOM WALK 1D
433
+
434
+ In this experiment, we construct a simple toy problem to show how sampling effectively from the multimodal behavioral distribution helps the diffusion prior outperform a Gaussian VAE prior during Q-learning. We construct a simple toy MDP with a one-dimensional state space $S \in [-10.0, 10.0]$ . The agent starts at the origin (0,0) and receives a reward of 10 if it reaches either the far left (-10.0) or far right (10.0) state, and -1 reward every other step. The environment times out after 500 steps. The action is the distance moved in that timestep with a max distance of length 1, $\mathcal{A} \in [-1.0, 1.0]$ . The dataset consists of episodes where the agent randomly selects actions from the uniform distribution $a \sim \mathcal{U}([-1.0, -0.8] \cup [0.8, 1])$ . This means the agent has a step size between 0.8 to 1.0 units either left or right every timestep. We train a VAE to try to fit this action distribution, and use BCQ to learn a policy. We also train a diffusion based policy with LDCQ, using $H = 1$ and compare the results.
435
+
436
+ ![](images/503b3c0b79afc01bb6ed26fd8b129b8b24c3a2b0e1254bb1c50214e629ff8d45.jpg)
437
+ Figure 8: 1D Random walk
438
+
439
+ We find that the VAE frequently samples actions never present in the dataset. This is because the Gaussian mean to the above action distribution is 0.0, but no actual actions are present between $(-0.8, 0.8)$ where a large proportion of probability mass is assigned by the Gaussian model. Meanwhile, the diffusion prior is able to fit the 2 modes quite well. After 10000 steps of Q-learning, the diffusion constrained policy learns to navigate to either end perfectly and achieves an average reward of -2.2 while the VAE constrained policy is still almost random, frequently taking actions with small step size and an average reward of -66.
440
+
441
+ # I INCREASING DIFFUSION STEPS IMPROVES PERFORMANCE
442
+
443
+ We study the impact of the number of diffusion steps on the performance for LDCQ. We found that for the locomotion tasks, increase in diffusion timesteps $T$ during evaluation generally corresponds to increase in task performance. We plot these results in Figure 9.
444
+
445
+ ![](images/567a65cb2c2ac28d02af6f5fd15a9aa6fc6944f66bde8e17d680f04c8bfbe667.jpg)
446
+ Half Cheetah Medium Expert
447
+
448
+ ![](images/7458a41041ad2e3519daaf18c7eb7921f628f50acde0447618bdcd2da8c00104.jpg)
449
+ Hopper Medium Expert
450
+
451
+ ![](images/cfbe6a4bbc9c74c1c7cd76239bb244cb25ebc6d63994f361181d720cf1c3db6f.jpg)
452
+ Walker2d Medium Expert
453
+ Figure 9: D4RL score for LDCQ with varying diffusion steps $T$ in locomotion tasks.
454
+
455
+ For the long horizon tasks, we found that increasing diffusion steps resulted in an initial trend upward in performance. Beyond this, the performance does not improve with additional diffusion steps (Figure 10).
456
+
457
+ ![](images/a37b8b221485878457347ae108ed10f2b9bc9e15b65dfc03e6f6dc4a206128a4.jpg)
458
+ Antmaze Large
459
+ Figure 10: D4RL score for LDCQ with varying diffusion steps $T$
460
+
461
+ We also used additional diffusion steps at time $t = 0$ similar to Diffusion-X (Pearce et al. (2023)). This means that after the DDPM sampling of diffusion from time $T$ to 1, we run $X$ additional diffusion steps to further denoise the sample, assuming time-step $t = 1$ . Pearce et al. (2023) reasoned that this pushes the samples further towards higher-likelihood regions. We used 10 additional steps across experiments and found this to slightly improve performance.
462
+
463
+ # J PERFORMANCE IMPROVEMENT WITH TEMPORAL ABSTRACTION
464
+
465
+ We provided empirical evidence for improvement in performance as we increase temporal abstraction or horizon $H$ for the kitchen-mixed- $\nu 0$ environment. We see similar trends for the other long-horizon tasks as well (Figure 11). The performance in general improves with increasing temporal abstraction but beyond a certain point, it drops possibly because of the limited capacity of the policy decoder.
466
+
467
+ For the locomotion tasks, we did not observe any noticeable difference with increase in temporal abstraction, so we ended up using a moderate sequence length $H = 10$ . This could be due to the high frequency periodicity of these tasks that does not require much look-ahead.
468
+
469
+ ![](images/b52807f53c1c81bec4061c8d556d88a7fed03a97a2cfba97b93cccb61b87ce8a.jpg)
470
+
471
+ ![](images/475394a207aa45d94af2444d9ad8cde1d7e5e06e15d8f1d13d065d9d368f3e97.jpg)
472
+
473
+ ![](images/0505ff2eb79c33b4dca51408abadfd916529bd5395dd00f309c14228a884d8f9.jpg)
474
+ Figure 11: D4RL score for LDCQ with varying sequence horizons $H$ .
475
+
476
+ ![](images/0851b15ebdfdd7e7726bf3529023c24cb1dfb100799aa27aedefd539f5a69221.jpg)
477
+
478
+ # K Q LEARNING TD ERRORS
479
+
480
+ We found Q learning with these skill latents to be very stable. This, alongside strong empirical performance in these tasks indicates that the skill latents learnt with the $\beta$ -VAE contain useful information, and that the Q function is able to extract this information easily. We show the training graphs for antmaze-large, kitchen-partial, halfcheetah-medium, and Adroit door-human below. Each X-axis tick corresponds 3000 updates from minibatches sampled from the PER buffer. The Y-axis is the average TD error for those 3000 minibatches.
481
+
482
+ ![](images/0d02153f43c0247978d99dd82c477bfab2ea34eaae074f4e23124041f5e0e729.jpg)
483
+
484
+ ![](images/7add9b56170d40e41d36a78c5ad439007604845dd0c4f7f2221c931866afdcdb.jpg)
485
+ (a) antmaze-large
486
+
487
+ ![](images/ae69886f765aad31be1b892688085dc7b9c8a327ddb5ceccde3ae40a6dd193ab.jpg)
488
+ (b) kitchen-partial
489
+
490
+ ![](images/9b3b8b82712f38be9088bd6a3df94dbdb1d85886653c06222dc4096908744067.jpg)
491
+ (c) halfcheetah-medium
492
+ (d) door-human
493
+ Figure 12: Q learning curves for different tasks. X axis is number of epochs of size 3000 from PER buffer, Y axis is average TD error over last 3000 minibatches.
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9bb49df1d5827237a6a642d5872bd8fb1763770779a875c32a84cdbc2193974
3
+ size 735540
2024/Reasoning with Latent Diffusion in Offline Reinforcement Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/8545a97a-2ed4-4606-a778-ab7a8c847eca_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d2e0965b26fffcbecadea24794ea87483ce0cdbea29d326d831baabce6d5d51
3
+ size 1896472
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/full.md ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RECLAIMING THE SOURCE OF PROGRAMMATIC POLICIES: PROGRAMMATIC VERSUS LATENT SPACES
2
+
3
+ Tales H. Carvalho, Kenneth Tihia, Levi H. S. Lelis
4
+
5
+ Amii, Department of Computing Science, University of Alberta
6
+
7
+ {taleshen,tjhia,levi.eleris}@ualberta.ca
8
+
9
+ # ABSTRACT
10
+
11
+ Recent works have introduced LEAPS and HPRL, systems that learn latent spaces of domain-specific languages, which are used to define programmatic policies for partially observable Markov decision processes (POMDPs). These systems induce a latent space while optimizing losses such as the behavior loss, which aim to achieve locality in program behavior, meaning that vectors close in the latent space should correspond to similarly behaving programs. In this paper, we show that the programmatic space, induced by the domain-specific language and requiring no training, presents values for the behavior loss similar to those observed in latent spaces presented in previous work. Moreover, algorithms searching in the programmatic space significantly outperform those in LEAPS and HPRL. To explain our results, we measured the "friendliness" of the two spaces to local search algorithms. We discovered that algorithms are more likely to stop at local maxima when searching in the latent space than when searching in the programmatic space. This implies that the optimization topology of the programmatic space, induced by the reward function in conjunction with the neighborhood function, is more conducive to search than that of the latent space. This result provides an explanation for the superior performance in the programmatic space.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Programmatic representations of policies for solving reinforcement learning problems can offer important advantages over alternatives, such as neural representations. Previous work showed that due to the inductive bias of the language in which such policies are written, they tend to generalize better to unseen scenarios (Inala et al., 2020; Trivedi et al., 2021). The programmatic nature of policies also allows modularization and reuse of parts of programs (Ellis et al., 2023; Aleixo & Lelis, 2023), which can speed up learning. Previous work also showed that programmatic policies can be more amenable to verification (Bastani et al., 2018) and interpretability (Verma et al., 2018; 2019).
16
+
17
+ The main challenge with programmatic representations is that, in the synthesis process, one needs to search in very large and often discontinuous policy spaces. While some domain-specific languages (DSLs) are differentiable and gradient descent methods can be used (Qiu & Zhu, 2022; Orfanos & Lelis, 2023), more expressive languages that allow the synthesis of policies with internal states (Inala et al., 2020; Trivedi et al., 2021; Liu et al., 2023) are often full of discontinuities, and thus one must use combinatorial search algorithms to find suitable programs. In an attempt to ease the process of searching for policies, recent work introduced Learning Embeddings for Latent Program Synthesis (LEAPS) (Trivedi et al., 2021), a system that learns a latent space of a DSL with locality in program behavior. That is, if two vectors are near each other in the latent space, then they should decode to programs with similar behavior. Once the latent space is learned, LEAPS uses a local search algorithm to find a latent vector that is decoded into a program encoding a policy for a target task. Liu et al. (2023) extended LEAPS to propose a hierarchical framework, HPRL, to allow the synthesis of programs outside the distribution of programs used to learn the latent space.
18
+
19
+ In this paper, we evaluate local search algorithms operating in the programmatic space induced by the DSL, and compare them with LEAPS and HPRL. Searching in the original programmatic space involves defining an initial candidate solution (i.e., a program) and a neighborhood function that returns the neighbor programs of a candidate solution. We generate neighbors by following
20
+
21
+ a process similar to the one used in genetic programming algorithms (Koza, 1992), which was previously used in the context of programmatic policies in multi-agent settings (Medeiros et al., 2022; Aleixo & Lelis, 2023; Moraes et al., 2023). We generate a number of neighbors by modifying parts of the program that represents the candidate. We hypothesized that searching for good policies in the latent space is not easier than in the original programmatic space, as seen in the problems and latent spaces considered in previous work (Trivedi et al., 2021; Liu et al., 2023). Our rationale is that the latent spaces used in previous work are also high-dimensional and non-differentiable, given that the evaluation of latent vectors depends on the execution of the decoded program.
22
+
23
+ We tested our hypothesis using the same set of problems used to evaluate LEAPS and HPRL. We discovered that a hill-climbing algorithm in the programmatic space, HC, outperformed both LEAPS and HPRL. HC consistently matched or exceeded the performance of the two latent-based methods. To interpret our findings, we examined the value of the behavior loss, used to learn the latent space, within the latent and programmatic spaces, and found that they are similar in each. Although loss values do not account for performance differences between the spaces, they suggest that optimizing solely for the behavior loss does not necessarily produce spaces conducive to search.
24
+
25
+ We then evaluated the "friendliness" of the two spaces for local search, which is formalized as the probability of a hill-climbing search, which is randomly initialized in the space, converging to a solution with at least a given target reward value. This probability is a measure of the topology of the search space for a given distribution of initial candidates, since it measures the likelihood that the search will be stuck in local maxima. We observed that the programmatic space is never worse and is often much superior to the latent space for a wide range of target reward values. These results not only support our hypothesis that searching in the programmatic space is easier than searching in the latent space, but also suggest that the programmatic space can be more conducive to search.
26
+
27
+ We conjecture that the effectiveness of latent spaces in synthesizing programmatic policies depends on two properties: how much the latent space compresses the original space and how conducive to search the space is. Intuitively, by compressing the space, the search becomes easier as one has fewer programs to evaluate; by being more conducive to search, the search signal could directly guide the search toward high-return programs. Our empirical results suggest that current systems for learning latent spaces lack either or both of these properties, since the search in the original programmatic space is more effective than the search in latent spaces. The contribution of this paper is to highlight the importance of using a baseline that searches directly in the programmatic space in this line of research. Our baseline allows us to better evaluate and understand the progress in systems that search in latent spaces. The codebase used in this work is available online.<sup>1</sup>
28
+
29
+ # 1.1 RELATED WORKS
30
+
31
+ Most of the early work on programmatic policies considered stateless programs, such as decision trees. For example, Verma et al. (2018) and Verma et al. (2019) learn tree-like programs with no internal states. Bastani et al. (2018) use imitation learning to induce decision trees encoding policies. Qiu & Zhu (2022) learn programmatic policies by using a language of differentiable programs, which are identical to oblique decision trees. Learning programmatic policies with internal states, such as programs with while-loops, can be more challenging. This is because the search spaces are often discontinuous and thus not amenable to gradient descent optimization. Inala et al. (2020) presented an algorithm for learning policies in the form of finite-state machines, which can represent loops. Similarly, Trivedi et al. (2021) and Liu et al. (2023) also consider programmatic policies with internal states, which are given by the lines in which the program stops and resumes its execution while interacting with the environment. There is also work on programmatic policies in the multi-agent context, where the search spaces are also discontinuous and the policies are learned with combinatorial search algorithms (Medeiros et al., 2022; Aleixo & Lelis, 2023; Moraes et al., 2023).
32
+
33
+ Program synthesis problems also pose problems similar to the ones we discuss (Waldinger & Lee, 1969; Solar-Lezama et al., 2006), where one must search in the programmatic spaces for a program that satisfies the user's intent. These problems can be solved with brute-force search (Udupa et al., 2013; Albarghouthi et al., 2013) or with algorithms guided by a function that is often learned (Odena et al., 2021; Barke et al., 2020; Shi et al., 2022; Ellis et al., 2023; Wong et al., 2021; Ameen & Lelis, 2023). A common method to learning such guiding functions is to use a self-supervised approach
34
+
35
+ where the learning system exploits the structure of the language to generate training data. Similarly to these works, LEAPS can be seen as an attempt to learn a function to help with the search in the programmatic space in the context of reinforcement learning.
36
+
37
+ # 2 PROBLEM FORMULATION
38
+
39
+ We consider episodic partially observable Markov decision processes (POMDPs) with deterministic dynamics, deterministic observations, and undiscounted reward functions. This setting can be described by $(S, \mathcal{A}, \mathcal{O}, p, q, r, S_0)$ . In this formulation, $\mathcal{S}$ is the set of states, $\mathcal{A}$ is the set of actions and $\mathcal{O}$ is the set of observations. The function $p: S \times \mathcal{A} \to S$ determines the state transition dynamic of the environment, $q: S \to \mathcal{O}$ the observation given a state and $r: S \times \mathcal{A} \to \mathbb{R}$ the reward given a state and action. Finally, $S_0$ defines the distribution for the initial state of an episode.
40
+
41
+ We consider that agents can interact in the environment following policies with internal states. The functions $p$ , $q$ , and $r$ are hidden from the agent, in the sense that the agent can only observe their output. Policies with internal states are defined by the function $\pi: \mathcal{O} \times \mathcal{H} \to \mathcal{A} \times \mathcal{H}$ , where $\mathcal{H}$ represents the internal state of the policy, initialized as a constant $h_0$ . Given an initial state $s_0 \sim S_0$ and following the deterministic state transition $s_{t+1} = p(s_t, a_t)$ and the policy $(a_t, h_{t+1}) = \pi(q(s_t), h_t)$ to determine the next states, we can define the trajectory as a function of the policy and initial state $\tau(\pi, s_0) = (a_0, a_1, \ldots, a_T)$ for an episode with $T$ time steps.
42
+
43
+ The goal of an agent acting in a POMDP is to maximize the cumulative reward over an episode. As the rewards during the episode depend uniquely on the initial state $s_0$ and the policy $\pi$ , we can define the return of an episode as $g(s_0, \pi) = \sum_{t=0}^{T} r(s_t, a_t)$ . Our objective is to find an optimal policy $\pi^*$ given a policy class $\Pi$ .
44
+
45
+ $$
46
+ \pi^ {*} = \arg \max _ {\pi \in \Pi} \mathbb {E} _ {s _ {0} \sim S _ {0}} [ g (s _ {0}, \pi) ] \tag {1}
47
+ $$
48
+
49
+ # 2.1 PROGRAMMATIC POLICIES
50
+
51
+ A programmatic policy class $\Pi_{\mathrm{DSL}}$ defines the set of policies that can be represented by a program $\rho$ within a DSL. Figure 1 shows a context-free grammar that defines the DSL for KAREL THE ROBOT, the problem domain we use in our experiments. A context-free grammar is represented by the tuple $(\Sigma, V, R, I)$ . Here, $\Sigma$ and $V$ are sets of terminal and non-terminal symbols of the grammar. $R$ defines the set of production rules that can be used to transform a non-terminal symbol into a sequence of terminal and non-terminal ones. Finally, $I$ is the initial symbol of $\mathcal{G}$ . In Figure 1, the non-terminal symbols are $\rho, s, b, n, h$ and $a$ , where $\rho$ is the initial symbol; terminal symbols include WHILE, REPEAT, IF, etc. An example of a production rule is $a := \text{move}$ , where the non-terminal $a$ is replaced by the action move. This grammar accepts strings defining functions with loops, if-statements, and Boolean functions, such as frontIsClear, over the observation space $\mathcal{O}$ . The DSL also includes instructions defining actions in the action space $\mathcal{A}$ , such as move and turnLeft. The policy class $\Pi_{\mathrm{DSL}}$ is defined as the set of all programs that the grammar accepts. The problem is to search in the space of programmatic policies $\Pi_{\mathrm{DSL}}$ for a policy that solves Equation 1.
52
+
53
+ Programs are represented as abstract syntax trees (ASTs). In an AST, each internal node represents a non-terminal symbol and each leaf node a terminal symbol of the grammar. Moreover, each node and its children represent a production rule. For example, for the AST shown in Figure 2, the root and its children represent the production rule $\rho \coloneqq \mathrm{DEF}$ run m( s m). The non-terminal $s$ is transformed with the production rule $s\coloneqq \mathrm{IF}c(bc)i(si)$ . The Boolean expression of the if statement is given by $b\coloneqq h$ and $h\coloneqq$ markersPresent. Finally, the body of the if statement is given by $s\coloneqq s;s$ , which branches into $s\coloneqq$ pickMarker and $s\coloneqq$ move.
54
+
55
+ A programmatic policy $\rho \in \Pi_{\mathrm{DSL}}$ is a policy with internal state, where $h_t$ can be interpreted as the pointer in the program $\rho$ after the action taken at time step $t - 1$ . The internal state $h_t$ and the current observation $q(s_t)$ are sufficient to uniquely determine the action $a_t$ the programmatic policy returns, thus the trajectory a policy generates given an initial state is also deterministic.
56
+
57
+ ```txt
58
+ Program $\rho :=$ DEF run m( s m)
59
+ Statement $s\coloneqq$ WHILE c(bc)w(sw) IFc(bc)i(si) IFELSEc(bc)i(si) ELSEe(se) | REPEAT R=n r(sr) | s;s|a
60
+ Condition $b\coloneqq h$ not(h)
61
+ Number $n\coloneqq 0..19$
62
+ Perception $h\coloneqq$ frontIsClearleftIsClearrightIsClear markersPresent noMarkersPresent
63
+ Action $a\coloneqq$ move | turnLeft | turnRight | putMarker | pickMarker
64
+ ```
65
+
66
+ ![](images/a8b5491a24594a5d1df3c5703a39b9e174d89fdb04dd9a6292bdcc78c7690c58.jpg)
67
+ Figure 1: DSL for KAREL THE ROBOT as a context-free grammar.
68
+ Figure 2: An example of a program defined in KAREL DSL (left) and its AST representation (right). In the AST, MP stands for markersPresent, PM for pickMarker, and M for move.
69
+
70
+ # 3 SEARCH SPACES FOR PROGRAMMATIC POLICIES
71
+
72
+ We formalize searching for a programmatic policy as a local search problem. This involves specifying a feasible set $\mathcal{R} \subseteq \Pi_{\mathrm{DSL}}$ and a corresponding neighborhood function $N_K: \mathcal{R} \to \mathcal{R}^K$ which, given a feasible solution $\rho \in \mathcal{R}$ , defines its $K$ -neighborhood. In this work, we evaluate two search spaces: PROGRAMMATIC SPACE, which uses the DSL directly, and LATENT SPACE, which uses a learned embedding of the DSL.
73
+
74
+ # 3.1 PROGRAMMATIC SPACE
75
+
76
+ In this formulation, $\mathcal{R}^{\mathrm{prog}}$ is a subset of the programs the DSL accepts. We define the subset $\mathcal{R}^{\mathrm{prog}}$ by imposing constraints on the size of the programs. In particular, we limit the number of times the production rule $s := s$ ; $s$ (statement chaining) can be used, and we also limit the height of the abstract syntax tree (AST) of every program. These constraints are the ones used to determine the distribution of programs used to train the latent space of LEAPS, which we describe in Appendix A.
77
+
78
+ The $K$ -neighborhood of a program $\rho \in \mathcal{R}^{\mathrm{prog}}$ , $N_K^{\mathrm{prog}}(\rho)$ , consists of $K$ samples of a mutation applied in $\rho$ . A mutation is defined by uniformly sampling a node $n$ in the AST of $\rho$ and removing one of $n$ 's children that represents a non-terminal symbol; the child that is removed is also chosen uniformly at random. In this newly created "hole", we generate a new sub-tree by sequentially sampling a suitable production rule following the probability distribution used to generate the programs to train the latent space of LEAPS (Appendix B). We continue to sample production rules from the grammar until the newly created sub-tree does not have any leaf node representing a non-terminal symbol and the resulting neighbor program is in $\mathcal{R}^{\mathrm{prog}}$ . We ignore programs that are not in $\mathcal{R}^{\mathrm{prog}}$ through a sample rejection scheme. That is, if the neighbor of $\rho$ is not in $\mathcal{R}^{\mathrm{prog}}$ , we sample a new neighbor until we obtain one that is in $\mathcal{R}^{\mathrm{prog}}$ .
79
+
80
+ # 3.2 LATENT SPACE
81
+
82
+ LEAPS (Trivedi et al., 2021) and HPRL (Liu et al., 2023) introduce a method for defining a continuous search space for programmatic policies. This is defined by a variational auto-encoder (VAE),
83
+
84
+ with encoder $Q:\Pi_{\mathrm{DSL}}\to \mathbb{R}^d$ and decoder $P:\mathbb{R}^d\rightarrow \Pi_{\mathrm{DSL}}$ , trained to reconstruct the text representation of a program $\rho \in \Pi_{\mathrm{DSL}}$ . In addition to minimizing a reconstruction loss, LEAPS additionally minimizes two losses related to program behavior, ensuring that programs that yield similar trajectories over a set of initial states are embedded close together in the LATENT SPACE.
85
+
86
+ As the LATENT SPACE is constructed in a supervised manner, it is trained on a set of programs sampled from a predetermined distribution. For the VAE reconstruction loss, LEAPS uses the same constraints as described for the PROGRAMMATIC SPACE and the same probabilistic DSL rules to generate a training set of programs. For training the VAE behavior losses, LEAPS generates trajectories by running each program from the training set on a set of initial states from the environment.
87
+
88
+ Given a trained LATENT SPACE, its feasible set $\mathcal{R}^{\mathrm{lat}}\subseteq \Pi_{\mathrm{DSL}}$ is the set of all programs that $P$ can generate. Meanwhile, given a program $\rho = P(z)\in \mathcal{R}^{\mathrm{lat}},z\in \mathbb{R}^{d}$ , each program in its $K$ -neighborhood $N_{K}^{\mathrm{lat},\sigma}(\rho)$ is given by decoding $z + \epsilon$ , where $\epsilon \sim \mathcal{N}(0,\sigma I_d)$ and $I_{d}$ represents the $d\times d$ identity matrix. The standard deviation of the noise $\sigma$ and the dimension $d$ are hyperparameters of the LATENT SPACE.
89
+
90
+ # 4 LOCAL SEARCH ALGORITHMS
91
+
92
+ Once the LATENT SPACE is learned, LEAPS relies on the Cross-Entropy Method (CEM) (Rubinstein, 1999) to search for a vector that will decode into a program that approximates a solution to Equation 1. In addition to CEM, we also consider Cross-Entropy Beam Search (CEBS), a method inspired by CEM that retains information about the best candidate solutions from a population. We also consider Hill Climbing (HC), as it is an algorithm that does not offer any mechanism for escaping local minima, and thus can be used to measure properties related to the space topology. In all search algorithms, we break ties arbitrarily.
93
+
94
+ Hill Climbing (HC) HC starts by sampling a candidate solution, using the probabilistic context-free grammar from Appendix B when searching in the PROGRAMMATIC SPACE, or a vector from distribution $\mathcal{N}(0, I_d)$ when searching in the LATENT SPACE. HC evaluates the $K$ -neighborhood set of this initial candidate. If the neighborhood contains another candidate that yields a greater episodic return on the evaluated task than the initial candidate, then this process is repeated from that neighbor. Otherwise, the algorithm returns the best-seen candidate and its episodic return.
95
+
96
+ Cross-Entropy Method (CEM) CEM generates the $K$ neighbors of an initial candidate, whose latent is sampled from $\mathcal{N}(0, I_d)$ , and evaluates all of them in terms of episodic return. CEM then calculates the mean of the latent vectors of the candidate solutions that return the best $E$ episodic returns, where $E$ is a hyperparameter defining the elite size. This process is then repeated from the resulting mean vector. CEM returns the best-found solution once a computational budget is reached.
97
+
98
+ Cross-Entropy Beam Search (CEBS) CEBS maintains a set of promising candidates, called a beam. Starting from an initial candidate, CEBS generates the $K$ neighbors and selects the best $E$ candidates with respect to their episodic return as the beam of the search. Then CEBS forms the next beam by selecting the top $E$ candidates from the pool given by all $K$ neighbors of the candidates in the beam. This process continues until the mean of the episodic returns seen in the beam does not increase from one iteration to the next. Appendix C presents the pseudocode of HC and CEBS.
99
+
100
+ # 5 EXPERIMENTS
101
+
102
+ In this section, we describe our methodology for comparing the PROGRAMMATIC SPACE and the LATENT SPACE with respect to how conducive they are to local search algorithms. We have two sets of experiments. In the first set, we compare CEM searching in the LATENT SPACE, as presented in LEAPS' original paper, CEBS also searching in the LATENT SPACE, HPRL, which implements a hierarchical method over the LATENT SPACE, and HC searching in the PROGRAMMATIC SPACE. In the second set, we compare the spaces in a controlled experiment, where we fix the search algorithm to HC for both spaces. We also explain KAREL THE ROBOT, the domain used in our experiments.
103
+
104
+ # 5.1 KAREL THE ROBOT DOMAIN
105
+
106
+ KAREL THE ROBOT was first introduced as a programming learning environment (Pattis, 1994) and, due to its simplified structure, it has recently been adopted as a test-bed for program synthesis and reinforcement learning (Bunel et al., 2018; Chen et al., 2018; Shin et al., 2018; Trivedi et al., 2021). KAREL is a grid environment with local Boolean perceptions and discrete navigation actions.
107
+
108
+ To define the programmatic policy class for KAREL, we adopt the DSL of Bunel et al. (2018) (Figure 1). This DSL represents a subset of the original KAREL language. Namely, it does not allow the creation of subroutines or variable assignments. The language allows the agent to observe the presence of walls in the immediate neighborhood of the robot, with the perceptions {front|left|right}IsClear, and the presence of markers in the current robot location with markersPresent and noMarkersPresent. The agent can then move the robot with the actions move and turn{Left|Right}, and interact with the markers with {put|pick}Marker.
109
+
110
+ We consider the KAREL and KAREL-HARD problem sets to define tasks. The KAREL set contains the tasks STAIRCLIMBER, MAZE, FOURCORNERS, TOPOFF, HARVESTER and CLEANHOUSE, all introduced by Trivedi et al. (2021). The KAREL-HARD problem set includes the tasks DOORKEY, ONESTROKE, SEEDER and SNAKE, designed by Liu et al. (2023) as more challenging problems. Trivedi et al. (2021) showed that these domains are challenging for reinforcement learning algorithms using neural representations, so LEAPS and HPRL represent the current state of the art in these problems. A detailed description of each task in both sets is available in Appendix D.
111
+
112
+ # 5.2 FIRST SET: REWARD-BASED EVALUATION
113
+
114
+ Our first evaluation reproduces the experiments of Trivedi et al. (2021) and Liu et al. (2023), where we add the results of HC searching in the PROGRAMMATIC SPACE. We use $K = 250$ as the neighborhood parameter for the HC. For CEBS, we set the dimension of the latent vector $d = 256$ , the neighborhood size $K = 64$ , the elite size $E = 16$ , and the noise $\sigma = 0.25$ . The hyperparameters for CEM and HPRL are exactly as described in their papers.
115
+
116
+ For each method, we estimate the expected return of a policy by averaging the returns collected over trajectories starting from a set of initial states. In this experiment, we consider a set of 16 initial states for each problem. We limit the execution of each method to a budget of $10^{6}$ program evaluations. If an algorithm fails to converge but its execution is still within the budget, we re-sample an initial program and restart the search. We report results over 32 independent runs (seeds) of each method.
117
+
118
+ Table 1 summarizes our results in the KAREL and KAREL-HARD problem sets, comparing them to the results reported in the papers of LEAPS and HPRL. To better outline the performance of each algorithm, we plot the reached episodic return as a function of the number of episodes in Figure $3^{2}$ and analyze the differences in running time in Appendix E. We further evaluate every method on a harder version of the environments, which were not used in previous work, in Appendix G, and study the impact of the different initialization methods in Appendix H.
119
+
120
+ We see that HC, based on PROGRAMMATIC SPACE, achieves the highest episodic return on every task compared to all methods based on LATENT SPACE. Furthermore, the plots show that, although HC and CEBS achieve the same mean episodic return at the end of the search process for SEEDER, HC generally does so with a smaller number of samples.
121
+
122
+ We highlight the results observed on DoorKey. This is a two-stage task that requires the agent to pick up a marker in a room, yielding a 0.5 reward, which opens a second room that contains a goal square, which yields an extra 0.5 reward upon reaching it. LEAPS, HPRL and CEBS are only able to find programmatic policies that achieve 0.5 episodic return in this task, suggesting that their search procedures reach a local maximum that does not lead to a general solution. Meanwhile, HC achieves a mean episodic return that is higher than 0.5, suggesting that, in some cases, it is able to escape such local maxima and find policies that reach the final goal. We conjecture that this is a property of the search space itself, since HC does not employ a mechanism to escape local maxima.
123
+
124
+ <table><tr><td rowspan="2">Task</td><td colspan="3">LATENT</td><td>PROGRAMMATIC</td></tr><tr><td>LEAPS</td><td>HPRL</td><td>CEBS</td><td>HC</td></tr><tr><td>STAIRCLIMBER</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>MAZE</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>TOPOFF</td><td>0.81 ± 0.07</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>FOURCORNERS</td><td>0.45 ± 0.25</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>HARVESTER</td><td>0.70 ± 0.02</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>CLEANHOUSE</td><td>0.32 ± 0.01</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>DOORKEY</td><td>0.50 ± 0.00</td><td>0.50 ± 0.00</td><td>0.50 ± 0.00</td><td>0.84 ± 0.02</td></tr><tr><td>ONESTROKE</td><td>0.65 ± 0.14</td><td>0.80 ± 0.02</td><td>0.90 ± 0.00</td><td>0.95 ± 0.00</td></tr><tr><td>SEEDER</td><td>0.51 ± 0.03</td><td>0.58 ± 0.06</td><td>1.00 ± 0.00</td><td>1.00 ± 0.00</td></tr><tr><td>SNAKE</td><td>0.23 ± 0.06</td><td>0.33 ± 0.07</td><td>0.26 ± 0.01</td><td>0.65 ± 0.03</td></tr></table>
125
+
126
+ Table 1: Mean and standard error of final episodic returns of our proposed methods in KAREL and KAREL-HARD problem sets within a budget of $10^{6}$ program evaluations, compared to the reported results from baselines. LEAPS, HPRL, and CEBS search in LATENT SPACES, while HC searches in PROGRAMMATIC SPACES. HC and CEBS results are estimated over 32 seeds.
127
+
128
+ ![](images/39a3c2e6116c65ee2a901b4d0500b8b79f8f496da41f21b9d37460be183b2756.jpg)
129
+ Figure 3: Episodic return performance of all methods in KAREL and KAREL-HARD problem sets. Reported mean and $95\%$ confidence interval over 32 seeds. The x-axis is represented in log scale.
130
+
131
+ # 5.3 SECOND SET: TOPOLOGY-BASED EVALUATION
132
+
133
+ To understand the discrepancy between HC and the algorithms searching in the LATENT SPACES, we analyze the PROGRAMMATIC and LATENT SPACE while controlling for the search algorithm.
134
+
135
+ # 5.3.1 LOCAL BEHAVIOR SIMILARITY ANALYSIS
136
+
137
+ We first analyze the behavior loss used to train the LATENT SPACE in the two search spaces. We define a metric that measures the loss in the neighborhood of randomly sampled programs in a search space. The similarity between two programmatic policies $\rho$ and $\rho'$ , with trajectories from an initial state $s_0$ given by $\tau(\rho, s_0) = (a_0, \ldots, a_T)$ and $\tau(\rho', s_0) = (a'_0, \ldots, a'_T')$ , as
138
+
139
+ $$
140
+ \rho \text {s i m i l a r i t y} (\rho , \rho^ {\prime}, s _ {0}) = \frac {\max \left\{0 \leq t \leq l \mid a _ {0 : t} = a ^ {\prime} _ {0 : t} \right\}}{L}, \tag {2}
141
+ $$
142
+
143
+ where $l = \min \{T, T'\}$ and $L = \max \{T, T'\}$ , and $x_{0:t} = (x_0, \ldots, x_t)$ . The $\rho$ -similarity returns the normalized length of the longest common prefix of the action sequences $\rho$ and $\rho'$ produced from $s_0$ .
144
+
145
+ ![](images/11a0c1d51d2fe940ed0212bf89da8123f475b356526639d508405c2b36f3ffc2.jpg)
146
+ Figure 4: Behavior-similarity and identity-rate metrics on PROGRAMMATIC SPACE and LATENT SPACE ( $\sigma = \{0.1, 0.25, 0.5\}$ ). Reported mean and $95\%$ confidence interval of the estimation of each metric over a set of 32 initial states of the environment and 1,000 seeds for the initial programs.
147
+
148
+ ![](images/1ff3d5ff46d477baa02b00dfe7f35e00b763bfec708417450ac467e9b4e867cb.jpg)
149
+
150
+ ![](images/bb541d8d31174e3ec4a1cffa22190ca9c87d2722ebc68451bf944541dcbd96be.jpg)
151
+
152
+ The behavior-similarity of a search space defined by the neighborhood function $N_K$ with initial program distribution $P_0$ and initial state distribution $S_0$ is described as
153
+
154
+ $$
155
+ \text {b e h a v i o r - s i m i l a r i t y} \left(N _ {1}, n _ {\text {m u t a t i o n s}}\right) = \mathbb {E} _ {\rho_ {0} \sim P _ {0}, s _ {0} \sim S _ {0}} \left[ \rho \text {s i m i l a r i t y} \left(\rho_ {0}, \rho_ {n _ {\text {m u t a t i o n s}}}, s _ {0}\right) \right], \tag {3}
156
+ $$
157
+
158
+ where $\rho_{n_{\mathrm{mutations}}}$ is the outcome of the neighborhood function $N_{1}(N_{K}$ with $K = 1$ ) iteratively applied $n_{\mathrm{mutations}}$ times on $\rho_0$ , thus producing a path in the underlying search space.
159
+
160
+ We observe that measuring behavior-similarity alone can be misleading due to the possibility of observing a neighbor that provides no change to the original program. We propose the metric identity-rate to complement the analysis, which measures the probability of observing a program in its own candidate neighborhood. The identity-rate is defined as follows, where $\mathbb{1}\{\cdot\}$ is the indicator function.
161
+
162
+ $$
163
+ \text {i d e n t i t y - r a t e} \left(N _ {1}, n _ {\text {m u t a t i o n s}}\right) = \mathbb {E} _ {\rho_ {0} \sim P _ {0}, s _ {0} \sim S _ {0}} \left[ \mathbb {1} \left\{\rho_ {0} = \rho_ {n _ {\text {m u t a t i o n s}}} \right\} \right]. \tag {4}
164
+ $$
165
+
166
+ To estimate the metrics given by Equations 3 and 4, we sample a set of 32 initial states from a distribution $S_0$ and a set of 1,000 initial programs from $P_0$ . $S_0$ is composed of random KAREL maps unrelated to any task in the problem sets, and we set $P_0$ differently for each search space. For PROGRAMMATIC SPACE, $P_0$ is given by the probabilistic DSL rules from Appendix B, and for LATENT SPACE, $P_0$ is given by $\mathcal{N}(0, I_d)$ . We run the metrics estimations as a function of $n_{\mathrm{mutations}} \in [1,10]$ and three specifications of LATENT SPACE, setting $\sigma = \{0.1, 0.25, 0.5\}$ hyperparameters commonly used by LEAPS and HPRL. The results are presented in Figure 4.
167
+
168
+ Although the behavior-similarity metric is one of the objectives of the LATENT SPACE, the PROGRAMMATIC SPACE achieves comparable behavior-similarity values. Although the setting $\sigma = 0.1$ on LATENT SPACE achieves high behavior-similarity, in practice it is not necessarily more conducive to search, possibly due to its higher identity rate. However, the observed result still does not explain the performance discrepancy that we observe when searching for policies that solve tasks.
169
+
170
+ # 5.3.2 CONVERGENCE ANALYSIS
171
+
172
+ Next, we look at the topology of each search space with respect to the return function of the tasks we want to solve. Specifically, we want to measure how conducive a given space is to search. To do so, we use a search algorithm that cannot escape local minima, HC, and measure how likely the search is to converge to a solution of a given quality in the search space of interest.
173
+
174
+ We define the convergence rate of a search space given by the neighborhood function $N_K$ , with initial program distribution $P_0$ and initial state distribution $S_0$ of a given POMDP. The initial program distribution for the PROGRAMMATIC SPACE is given by the LEAPS probabilistic context-free grammar (Appendix B); for the LATENT SPACE, it is given by the programs one decodes after sampling a latent vector from $\mathcal{N}(0, I_d)$ . The convergence rate is measured in terms of $g_{\mathrm{target}} \in [0,1]$ as follows.
175
+
176
+ $$
177
+ \text {c o n v e r g e n c e - r a t e} \left(N _ {K}, g _ {\text {t a r g e t}}\right) = \mathbb {E} _ {\rho_ {0} \sim P _ {0}, s _ {0} \sim S _ {0}} \left[ \mathbb {1} \left\{g _ {\text {s e a r c h}} \left(\rho_ {0}, s _ {0}\right) \geq g _ {\text {t a r g e t}} \right\} \right], \tag {5}
178
+ $$
179
+
180
+ where $g_{\mathrm{search}}(\rho_0, s_0)$ is the return of the best-performing program encountered in the search starting with candidate $\rho_0$ and with the return computed by rolling the policies out from $s_0$ .
181
+
182
+ ![](images/5b74ae75e875c49d6eeda82bcd34b9d0693651f76f99c8031dd6c1c26e091265.jpg)
183
+ Figure 5: Convergence rate of the hill-climbing algorithm in the PROGRAMMATIC SPACE and in the LATENT SPACE with neighborhood size $K = 250$ . Reported mean and $95\%$ confidence interval of estimation over a set of 10,000 initial candidates. The plots for DOORKEY and SNAKE show a zoomed-in region highlighting runs of the search that achieve reward values larger than 0.5.
184
+
185
+ As the return of the program depends on the task we are solving, we report estimates of Equation 5 for each task. The estimation involves sampling a set of 32 states given by the task's initial state distribution, and sampling 10,000 programs to serve as initial candidates for search. In this experiment, $\sigma$ follows the values used in the original LEAPS experiments for each task: $\sigma = 0.5$ for FOUR-CORNERS and HARVESTER, $\sigma = 0.1$ for MAZE, and $\sigma = 0.25$ for all other tasks. The estimation of convergence-rate of PROGRAMMATIC SPACE and LATENT SPACE, both set to a neighborhood size $K = 250$ , for every task in our problem sets is shown in Figure 5 as a function of $g_{\mathrm{target}} \in [0,1]$ using HC as the search algorithm. In the figure, we show a zoomed-in plot for the tasks DOORKEY and SNAKE to better visualize cases with low convergence rate. Table 1 and Figure 3 show that the search in the programmatic space achieves reward values larger than 0.5 for DOORKEY and SNAKE; the zoomed-in regions in Figure 5 show that these are rare events, but possible to be observed with a reasonable search budget. We show in Appendix K that policies with a return greater than 0.5 exist in the LATENT SPACE for DOORKEY; it is the search that failed to find them. The plots show that, even in tasks where HC only matched or performed marginally better than latent methods, the PROGRAMMATIC SPACE is more likely to yield policies with greater episodic return. This suggests that this search space is more conducive to search algorithms than the LATENT SPACE.
186
+
187
+ # 6 CONCLUSION
188
+
189
+ In this paper, we showed that, despite recent efforts in learning latent spaces to replace programmatic spaces, the latter can still be more conducive to search. Empirical results in KAREL THE ROBOT showed that a simple hill-climbing algorithm searching in the programmatic space can significantly outperform the current state-of-the-art algorithms that search in latent spaces. We measured both the learned latent space and the programmatic space in terms of the loss function used to train the former. We discovered that both have similar loss values, even though the programmatic space does not require training. We also compared the topology of the two spaces through the probability of a hill-climbing search being stuck at local maxima in the two spaces, and found that the programmatic space is more conducive to search. Our results suggest that the use of the original programmatic space is an important baseline that was missing in previous work. Our results also suggest that learning latent spaces for easing the process of synthesizing programmatic policies for solving reinforcement learning problems is still an open and challenging research question.
190
+
191
+ # ACKNOWLEDGEMENTS
192
+
193
+ This research was supported by Canada's NSERC and the CIFAR AI Chairs program, and enabled in part by support provided by the Digital Research Alliance of Canada. We thank the reviewers for their helpful discussions and suggestions, and the Area Chair who handled our paper, for following the discussions closely and taking the time to understand the contributions of our work. Finally, we also thank Matthew Guzdial and Adam White for their comments on an early version of this work.
194
+
195
+ # REFERENCES
196
+
197
+ AWS Albarghouthi, Sumit Gulwani, and Zachary Kincaid. Recursive program synthesis. In International Conference Computer Aided Verification, pp. 934-950, 2013.
198
+ David S. Aleixo and Levi H. S. Lelis. Show me the way! Bilevel search for synthesizing programmatic strategies. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 4991-4998. AAAI Press, 2023.
199
+ Saqib Ameen and Levi H. S. Lelis. Program synthesis with best-first bottom-up search. Journal of Artificial Intelligence Research, 77:1275-1310, 08 2023.
200
+ Shraddha Barke, Hila Peleg, and Nadia Polikarpova. Just-in-time learning for bottom-up enumerative synthesis. Proceedings of the ACM on Programming Languages, 4:1-29, 2020.
201
+ Osbert Bastani, Yewen Pu, and Armando Solar-Lezama. Verifiable reinforcement learning via policy extraction. In Proceedings of the International Conference on Neural Information Processing Systems, pp. 2499-2509, 2018.
202
+ Rudy Bunel, Matthew Hausknecht, Jacob Devlin, Rishabh Singh, and Pushmeet Kohli. Leveraging grammar and reinforcement learning for neural program synthesis. In International Conference on Learning Representations, 2018.
203
+ Xinyun Chen, Chang Liu, and Dawn Song. Execution-guided neural program synthesis. In International Conference on Learning Representations, 2018.
204
+ Kevin Ellis, Lionel Wong, Maxwell Nye, Mathias Sabl-Meyer, Luc Cary, Lore Pozo, Luke Hewitt, Armando Solar-Lezama, and Joshua Tenenbaum. Dreamcoder: growing generalizable, interpretable knowledge with wake-sleep bayesian program learning. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 381, 2023.
205
+ Jeevana Priya Inala, Osbert Bastani, Zenna Tavares, and Armando Solar-Lezama. Synthesizing programmatic policies that inductively generalize. In International Conference on Learning Representations, 2020.
206
+ J. R. Koza. Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge, MA, 1992.
207
+ Guan-Ting Liu, En-Pei Hu, Pu-Jen Cheng, Hung-Yi Lee, and Shao-Hua Sun. Hierarchical programmatic reinforcement learning via learning to compose programs. arXiv preprint arXiv:2301.12950, 2023.
208
+ Leandro C. Medeiros, David S. Aleixo, and Levi H. S. Lelis. What can we learn even from the weakest? Learning sketches for programmatic strategies. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 7761-7769. AAAI Press, 2022.
209
+ Rubens O. Moraes, David S. Aleixo, Lucas N. Ferreira, and Levi H. S. Lelis. Choosing well your opponents: How to guide the synthesis of programmatic strategies. In Proceedings of the International Joint Conference on Artificial Intelligence, pp. 4847-4854, 2023.
210
+ Augustus Odena, Kensen Shi, David Bieber, Rishabh Singh, Charles Sutton, and Hanjun Dai. BUS-TLE: Bottom-up program synthesis through learning-guided exploration. In International Conference on Learning Representations, 2021.
211
+
212
+ Spyros Orfanos and Levi H. S. Lelis. Synthesizing programmatic policies with actor-critic algorithms and relu networks, 2023.
213
+ Richard E Pattis. *Karel the robot: a gentle introduction to the art of programming*. John Wiley & Sons, 1994.
214
+ Wenjie Qiu and He Zhu. Programmatic reinforcement learning without oracles. In International Conference on Learning Representations, 2022.
215
+ Reuven Y. Rubinstein. The Cross-Entropy Method: A Unified Approach to Combinatorial Optimization, Monte-Carlo Simulation, and Machine Learning. Springer Science & Business Media, 1999.
216
+ Kensen Shi, Hanjun Dai, Kevin Ellis, and Charles Sutton. Crossbeam: Learning to search in bottom-up program synthesis. In International Conference on Learning Representations, 2022.
217
+ Eui Chul Shin, Illia Polosukhin, and Dawn Song. Improving neural program synthesis with inferred execution traces. Advances in Neural Information Processing Systems, 31, 2018.
218
+ Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. Combinatorial sketching for finite programs. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 404-415. Association for Computing Machinery, 2006.
219
+ Dweep Trivedi, Jesse Zhang, Shao-Hua Sun, and Joseph J Lim. Learning to synthesize programs as interpretable and generalizable policies. Advances in neural information processing systems, 34: 25146-25163, 2021.
220
+ Abhishek Udupa, Arun Raghavan, Jyotirmoy V. Deshmukh, Sela Mador-Haim, Milo M.K. Martin, and Rajeev Alur. Transit: Specifying protocols with concolic snippets. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 287-296. ACM, 2013.
221
+ Abhinav Verma, Vijayaraghavan Murali, Rishabh Singh, Pushmeet Kohli, and Swarat Chaudhuri. Programmatically interpretable reinforcement learning. In International Conference on Machine Learning, pp. 5045-5054. PMLR, 2018.
222
+ Abhinav Verma, Hoang Le, Yisong Yue, and Swarat Chaudhuri. Imitation-projected programmatic reinforcement learning. Advances in Neural Information Processing Systems, 32, 2019.
223
+ Richard J. Waldinger and Richard C. T. Lee. Prow: A step toward automatic program writing. In Proceedings of the 1st International Joint Conference on Artificial Intelligence, pp. 241-252, San Francisco, CA, USA, 1969. Morgan Kaufmann Publishers Inc.
224
+ Catherine Wong, Kevin M Ellis, Joshua Tenenbaum, and Jacob Andreas. Leveraging language to learn program abstractions and search heuristics. In International Conference on Machine Learning, pp. 11193-11204. PMLR, 2021.
225
+
226
+ ```latex
227
+ $\begin{array}{rl} & {\mathrm{Pr}(s:=WHILE) = 0.15;\mathrm{Pr}(s:=IF) = 0.08;\mathrm{Pr}(s:=IFALSE) = 0.04;}\\ & {\mathrm{Pr}(s:=REPEAT) = 0.03;\mathrm{Pr}(s:=s;s) = 0.5;\mathrm{Pr}(s:=a) = 0.2;}\\ & {\mathrm{Pr}(b:=h) = 0.9;\mathrm{Pr}(b:=not(h)) = 0.1;}\\ & {\mathrm{Pr}(n:=0)=\mathrm{Pr}(n:=1)=\cdots=\mathrm{Pr}(n:=19)=1/20;}\\ & {\mathrm{Pr}(h:=\mathrm{front}\mathrm{IsClear})=0.5;\mathrm{Pr}(h:=\mathrm{left}\mathrm{IsClear})=0.15;}\\ & {\mathrm{Pr}(h:=\mathrm{right}\mathrm{IsClear})=0.15;\mathrm{Pr}(h:=\mathrm{markersPresent})=0.1;}\\ & {\mathrm{Pr}(h:=\mathrm{noMarkersPresent})=0.1;}\\ & {\mathrm{Pr}(a:=\mathrm{move})=0.5;\mathrm{Pr}(a:=\mathrm{turnLeft})=0.15;\mathrm{Pr}(a:=\mathrm{turnRight})=0.15;}\\ & {\mathrm{Pr}(a:=\mathrm{pickMarker})=0.1;\mathrm{Pr}(a:=\mathrm{putMarker})=0.1.} \end{array}$
228
+ ```
229
+
230
+ Figure 6: Adopted probabilities for the KAREL THE ROBOT DSL as a probabilistic context-free grammar.
231
+
232
+ # A SETTINGS FOR GENERATING PROGRAMS
233
+
234
+ In this work, we use the same constraints for generating programs as the LEAPS project (Trivedi et al., 2021), as described below.
235
+
236
+ Maximum AST height: 4;
237
+ Maximum statement chaining $(s\coloneqq s$ ; $s$ rule): 6;
238
+ Maximum program length (in number of symbols in the program text representation): 45.
239
+
240
+ # B PROBABILITIES FOR DSL PRODUCTION RULES
241
+
242
+ We adopt a fixed probability for each DSL production rule, described in Figure 6 as a probabilistic context-free grammar. The adopted probabilities are based on the LEAPS project specifications (Trivedi et al., 2021).
243
+
244
+ # C ALGORITHM DETAILS OF SEARCH ALGORITHMS
245
+
246
+ We present pseudo-code implementations of HC and CEBS as described in Section 4 in Algorithms 1 and 2, respectively.
247
+
248
+ Require: $N$ , the neighborhood function; $K$ , the neighborhood size; $P_0$ , the initial program distribution; $g$ : the task return function; $S_0$ , the set of task initial states.
249
+
250
+ Ensure: $\bar{\rho}$ , best-seen program with respect to highest episodic return estimate; $\bar{g}$ , estimated episodic return of best-seen program.
251
+
252
+ Algorithm 1 Hill Climbing for Programmatic Policies
253
+ ```latex
254
+ 1: $\bar{\rho} \sim P_0$
255
+ 2: $\bar{g} \gets \frac{1}{|S_0|} \sum_{s_0 \in S_0} g(\pi_{\bar{\rho}}, s_0)$
256
+ 3: repeat
257
+ 4: in_local_maximum $\leftarrow$ true
258
+ 5: for each $\rho$ in $N_K(\bar{\rho})$ do
259
+ 6: $g \gets \frac{1}{|S_0|} \sum_{s_0 \in S_0} g(\pi_{\rho}, s_0)$
260
+ 7: if $g > \bar{g}$ then
261
+ 8: $\bar{\rho} \gets \rho$
262
+ 9: $\bar{g} \gets g$
263
+ 10: in_local_maximum $\leftarrow$ false
264
+ 1: until in_local_maximum = true
265
+ ```
266
+
267
+ Algorithm 2 Cross-Entropy Beam Search for Programmatic Policies in LATENT SPACES
268
+ Require: $N^{\mathrm{lat}}$ , the neighborhood function; $K$ , the neighborhood size; $E$ , the size of the beam; $\sigma$ - the noise parameter for the LATENT SPACE; $P_0$ , the initial program distribution; $g$ : the task return function; $S_{0}$ , the set of task initial states.
269
+ Ensure: $\bar{\rho}$ best-seen program with respect to highest episodic return estimate; $\bar{g}$ estimated episodic return of best-seen program.
270
+ 1: $\bar{\rho}\sim P_0$
271
+ 2: $\bar{g}\gets \frac{1}{|S_0|}\sum_{s_0\in S_0}g(\pi_{\bar{\rho}},s_0)$
272
+ 3: best_mean_alite_return $\leftarrow -\infty$
273
+ 4: candidates $\leftarrow N_K^{\mathrm{lat},\sigma}(\bar{\rho})$
274
+ 5: repeat
275
+ 6: in_local_maximun $\leftarrow$ true
276
+ 7: g $\leftarrow []$
277
+ 8: for each $\rho$ in candidates do
278
+ 9: g.append( $\frac{1}{|S_0|}\sum_{s_0\in S_0}g(\pi_\rho ,s_0))$
279
+ 10: if $\mathbf{g}[-1] > \bar{g}$ then $\triangleright$ Index -1 represents the last element in the list.
280
+ 11: $\bar{\rho}\gets \rho$
281
+ 12: $\bar{g}\gets \mathbf{g}[-1]$
282
+ 13: elite Indices $\leftarrow$ argtop- $E(\mathbf{g})$
283
+ 14: if $\frac{1}{E}\sum_{i\in \text{elite\_indices}}\mathbf{g}[i]>$ best_mean_alite_return then
284
+ 15: best_mean_alite_return $\leftarrow \frac{1}{E}\sum_{i\in \text{elite\_indices}}\mathbf{g}[i]$
285
+ 16: in_local_maximun $\leftarrow$ false
286
+ 17: candidates $\leftarrow \bigcup_{i\in \text{elite\_indices}}N_{K / E}^{\mathrm{lat},\sigma}(\rho [i])$ $\triangleright$ Aggregates as a $K$ -neighborhood of the elite.
287
+ 18: until in_local_maximun = true
288
+
289
+ # D KAREL PROBLEM SETS
290
+
291
+ In this Section, we specify the initial state and return function of every task in KAREL and KAREL-HARD problem sets. Further details of each task are present in LEAPS (Trivedi et al., 2021) and HPRL (Liu et al., 2023), works that introduced KAREL and KAREL-HARD, respectively. All tasks time out an episode after 10,000 actions.
292
+
293
+ # D.1 KAREL
294
+
295
+ STAIRCLIMBER This environment is given by a $12 \times 12$ grid with stairs formed by walls. The agent starts on a random position on the stairs and its goal is to reach a marker that is also randomly initialized on the stairs. If the agent reaches the marker, the agent receives 1 as an episodic return and 0 otherwise. If the agent moves to an invalid position, i.e. outside the contour of the stairs, the episode terminates with a $-1$ return.
296
+
297
+ MAZE A random maze is initialized on an $8 \times 8$ grid, and a random marker is placed on an empty square as a goal. The agent starts on a random empty square of the grid and its goal is to reach the marker goal, which yields a 1 episodic return. Otherwise, the agent receives 0 as a return.
298
+
299
+ TopOff Markers are placed randomly on the bottom row of an empty $12 \times 12$ grid. The goal of the agent, initialized on the bottom left of the map, is to place one extra marker on top of every marker on the map. The return of the episode is given by the number of markers that have been topped off divided by the total number of markers.
300
+
301
+ FOURCORNERS Starting on a random cell on the bottom row of an empty $12 \times 12$ grid, the goal of the agent is to place one marker in each corner of the map. Return is given by the number of corners with one marker divided by four.
302
+
303
+ HARVESTER The agent starts on a random cell on the bottom row of an $8 \times 8$ grid, that starts with a marker on each cell. The goal of the agent is to pick up every marker on the map. Return is given by the number of picked-up markers divided by the total number of markers.
304
+
305
+ <table><tr><td rowspan="2">Elapsed time (seconds)</td><td>PROGRAMMATIC SPACE</td><td>LATENT SPACE</td></tr><tr><td>0.0021 ± 0.0002</td><td>0.0293 ± 0.0004</td></tr></table>
306
+
307
+ Table 2: Time for generating one neighbor from a given candidate, measured over 1,000 initial random candidates. Reported mean and $95\%$ confidence interval.
308
+
309
+ CLEANHOUSE In this task, the agent starts on a fixed cell of a complex $14 \times 22$ grid environment made of many connected rooms, with ten markers randomly placed adjacent to the walls. The goal of the agent is to pick up every marker on the map and the return is given by the number of picked-up markers divided by the total number of markers.
310
+
311
+ # D.2 KAREL-HARD
312
+
313
+ DOORKEY The agent starts on a random position on the left side of an $8 \times 8$ grid that is vertically split into two chambers. The agent goal is to pick up a marker on the left chamber, which opens a door connecting both chambers and allows the agent to reach a goal marker. Picking up the first marker yields a 0.5 reward, and reaching the goal yields an additional 0.5.
314
+
315
+ ONESTROKE Starting on a random position of an empty $8 \times 8$ grid, the goal of the agent is to visit every grid cell without repeating. Visited cells become a wall that terminates the episode upon touching. The episodic return is given by the number of visited cells divided by the total number of cells in the initial state.
316
+
317
+ SEEDER The environment starts as an empty $8 \times 8$ grid, with the agent placed randomly in any square. The agent's goal is to place one marker in every empty cell of the map. The return is given by the number of cells with one marker divided by the total number of empty cells at the start of the episode.
318
+
319
+ SNAKE In this task, the agent and one marker are randomly placed on an empty $8 \times 8$ grid. The agent acts like the head of a snake, whose body grows each time a marker is collected. The goal of the agent is to touch the marker on the map without colliding with the snake's body, which terminates the episode. Each time the marker is collected, it is placed in a new random location, until 20 markers are collected. The episodic return is given by the number of collected markers divided by 20.
320
+
321
+ # E RUNNING TIME COMPARISON OF PROGRAMMATIC AND LATENT SPACES
322
+
323
+ In this section, we compare the neighborhood generation process of each search space in terms of running time. We do this by measuring the time the PROGRAMMATIC SPACE and the LATENT SPACE take to generate one neighbor from a given candidate program, sampled from the initial distribution, and present the results in Table 2. We see that sampling from the programmatic space is more than 10 times faster than sampling from the latent space. This means that the gap between the search in PROGRAMMATIC SPACE and LATENT SPACE would be larger if the results reported in the paper were in terms of running time instead of episodes.
324
+
325
+ # F EXAMPLES OF OBTAINED SOLUTIONS
326
+
327
+ In this section, we show representative examples of programmatic policies from HC and CEBS across some relevant tasks. We selected programs that yield the highest return for each algorithm. Results are presented in Tables 3 and 4 for HC and CEBS, respectively.
328
+
329
+ # G EVALUATION ON CRASHABLE KAREL
330
+
331
+ To further evaluate the search algorithms, we propose a modification of the KAREL environment. In this version, which we name CRASHABLE, invalid actions terminate episodes. This change implies
332
+
333
+ <table><tr><td>Task</td><td>Solution</td><td>Return</td></tr><tr><td>HARVESTER</td><td>DEF run m( WHILE c( leftIsClear c) w( WHILE c( leftIsClear c) w( REPEAT R=14 r( move pickMarker r) turnRight w) WHILE c( rightIsClear c) w( pickMarker turnRight move turnLeft w) WHILE c( frontIsClear c) w( move w) w) m)</td><td>1.0</td></tr><tr><td>CLEANHOUSE</td><td>DEF run m( WHILE c( leftIsClear c) w( move turnRight move move w) WHILE c( frontIsClear c) w( turnRight w) WHILE c( noMarkersPresent c) w( move REPEAT R=7 r( turnLeft move pickMarker r) w) move turnLeft m)</td><td>1.0</td></tr><tr><td>DOORKEY</td><td>DEF run m( WHILE c( frontIsClear c) w( move w) turnLeft move WHILE c( noMarkersPresent c) w( turnRight move move w) IF c( leftIsClear c) i( pickMarker move move WHILE c( noMarkersPresent c) w( move turnRight move w) putMarker i) m)</td><td>1.0</td></tr><tr><td>ONESTROKE</td><td>DEF run m( IF c( frontIsClear c) i( turnRight i) WHILE c( noMarkersPresent c) w( WHILE c( frontIsClear c) w( turnRight move w) turnLeft IFALSE c( frontIsClear c) i( move turnRight pickMarker move move move i) ELSE e( turnRight move e) w) m)</td><td>0.953</td></tr><tr><td>SEEDER</td><td>DEF run m( turnLeft WHILE c( noMarkersPresent c) w( putMarker REPEAT R=10 r( move r) REPEAT R=5 r( WHILE c( markersPresent c) w( turnLeft move turnRight w) pickMarker r) w) WHILE c( frontIsClear c) w( turnLeft w) m)</td><td>1.0</td></tr><tr><td>SNAKE</td><td>DEF run m( turnLeft WHILE c( frontIsClear c) w( move w) WHILE c( rightIsClear c) w( WHILE c( rightIsClear c) w( move turnLeft move IF c( frontIsClear c) i( move move i) turnLeft w) putMarker WHILE c( rightIsClear c) w( putMarker w) turnRight w) m)</td><td>1.0</td></tr></table>
334
+
335
+ Table 3: Representative high-return solutions from HC searches in the PROGRAMMATIC SPACE.
336
+
337
+ <table><tr><td>Task</td><td>Solution</td><td>Return</td></tr><tr><td>HARVESTER</td><td>DEF run m( WHILE c( leftIsClear c) w( move pickMarker move turnLeft pickMarker move pickMarker move turnLeft move pickMarker move turnLeft move pickMarker move w) m)</td><td>1.0</td></tr><tr><td>CLEANHOUSE</td><td>DEF run m( WHILE c( noMarkersPresent c) w( move pickMarker turnLeft w) WHILE c( leftIsClear c) w( move move w) WHILE c( frontIsClear c) w( move move w) m)</td><td>1.0</td></tr><tr><td>DOORKEY</td><td>DEF run m( WHILE c( rightIsClear c) w( turnLeft pickMarker w) WHILE c( noMarkersPresent c) w( turnRight move w) pickMarker WHILE c( noMarkersPresent c) w( turnRight move w) putMarker m)</td><td>0.6875</td></tr><tr><td>ONESTROKE</td><td>DEF run m( WHILE c( noMarkersPresent c) w( turnLeft move turnLeft WHILE c( frontIsClear c) w( turnLeft move w) pickMarker move move move w) WHILE c( noMarkersPresent c) w( turnLeft move w) pickMarker move move move move m)</td><td>0.9288</td></tr><tr><td>SEEDER</td><td>DEF run m( WHILE c( noMarkersPresent c) w( putMarker move move WHILE c( markersPresent c) w( turnRight move w) w) m)</td><td>1.0</td></tr><tr><td>SNAKE</td><td>DEF run m( WHILE c( noMarkersPresent c) w( REPEAT R=13 r( IFALSE c( frontIsClear c) i( turnRight move pickMarker i) ELSE e( move pickMarker REPEAT R=13 r( turnRight move r) REPEAT R=13 r( pickMarker r) move e) pickMarker r) w) m)</td><td>0.4375</td></tr></table>
338
+
339
+ Table 4: Representative high-return solutions from CEBS search in LATENT SPACE.
340
+
341
+ ![](images/213f90838b155644516534cbc2fbb1e65eadd1817a920567c6debbdbdfd38c8e.jpg)
342
+ Figure 7: Episodic return performance of all methods in KAREL and KAREL-HARD problem sets, using the CRASHABLE version of the environment, that does not allow invalid actions. Reported mean and $95\%$ confidence interval over 16 executions. The x-axis is represented in a log scale for better visualization.
343
+
344
+ that the same tasks from KAREL and KAREL-HARD become more difficult to solve, as the valid trajectories are stricter. Figure 7 outlines the episodic return performance of CEM, CEBS, and HC on the CRASHABLE version of every task of the problem sets.
345
+
346
+ The results show a greater discrepancy between the programmatic and latent methods. We conjecture that this is because the LATENT SPACE was trained with trajectories obtained from the original environment setting and it is unable to generalize to the CRASHABLE environment. Since the PROGRAMMATIC SPACE does not require any training, it generalizes better to the CRASHABLE setting.
347
+
348
+ # H EVALUATING THE IMPACT OF INITIALIZATION METHODS
349
+
350
+ To measure the impact of the initialization methods of the search algorithms, we evaluate an alternative version of all search algorithms using the initialization rule of the opposed search space. For CEM and CEBS, this version of the algorithms initializes the search with policies sampled from the defined probabilistic context-free grammar. And for HC in PROGRAMMATIC SPACE, search is initialized by decoding a latent sampled from $\mathcal{N}(0, I_d)$ in the LATENT SPACE. Figure 8 compares the performance of HC in PROGRAMMATIC SPACE with the alternative initialization scheme, while Figures 9 and 10 compare the performance of CEM and CEBS, respectively, with the alternative initialization scheme.
351
+
352
+ Results show that the performance of the alternative version of the algorithms was very similar to the original algorithm in most cases, and marginally inferior in others. This suggests that both initialization methods are similar and one does not provide a significant advantage over the other.
353
+
354
+ # I CONVERGENCE RATE FOR DIFFERENT NEIGHBORHOOD SIZES
355
+
356
+ We expand the convergence rate analysis by adopting neighborhood functions $N_K$ with different neighborhood sizes $K$ in Equation (5). The convergence-rate analysis on a space given by a lower $K$ is related to how robust the search space is to conduct a search process, given that it relies on a small number of samples. On the other hand, the result of convergence-rate on higher $K$ gives us information about how capable the search space is, as it can expand a search state further to find the better candidate. Figure 11 compares the convergence-rate estimation of both PROGRAMMATIC and LATENT SPACE adopting $K = \{10,250,1000\}$ , and suggests that the PROGRAMMATIC SPACE is
357
+
358
+ ![](images/95396a87fc8dc020ecf707757e35da28c3045e179da44345b355ad209d296b1d.jpg)
359
+ Figure 8: Episodic return performance of HC in PROGRAMMATIC SPACE with original and latent initialization in KAREL and KAREL-HARD problem sets. Reported mean and $95\%$ confidence interval over 32 seeds. The x-axis is represented in a log scale for better visualization.
360
+
361
+ ![](images/73a5248fc0b6aaf392fc4506250505d9d522d5a9e84218129b8578c077fc9c0c.jpg)
362
+ Figure 9: Episodic return performance of CEM in LATENT SPACE with original and programmatic initialization in KAREL and KAREL-HARD problem sets. Reported mean and $95\%$ confidence interval over 32 seeds. The x-axis is represented in a log scale for better visualization.
363
+
364
+ ![](images/7f2eea2b583520dfef562581e83bca60c9ae16cd7cac6c704705c751893a79a9.jpg)
365
+ Figure 10: Episodic return performance of CEBS in LATENT SPACE with original and programmatic initialization in KAREL and KAREL-HARD problem sets. Reported mean and $95\%$ confidence interval over 32 seeds. The x-axis is represented in a log scale for better visualization.
366
+
367
+ both more robust, evidenced by the higher convergence-rate with $K = 10$ , and more capable, shown by the superior convergence-rate with $K = 1,000$ .
368
+
369
+ # J CONVERGENCE RATE OF CEM AND CEBS
370
+
371
+ We further analyze the convergence rate of the LATENT SPACE by using CEM and CEBS as the search algorithm in Equation 5. Figure 12 compares the convergence rate obtained with HC (original setting), CEM, and CEBS, with $K = 64$ (neighborhood size). Although CEM and HC have a similar convergence rate across all tasks, we see that CEBS outperforms both in HARVESTER, DOORKEY, ONESTROKE and SEEDER. These results highlight the ability of CEBS to escape local optima. Despite the superior performance of CEBS, HC searching in the PROGRAMMATIC SPACE performs better than CEBS searching in the LATENT SPACE (see Figure 3).
372
+
373
+ # K VALIDATING THE EXISTENCE OF HIGH-PERFORMING POLICIES IN LATENT SPACE
374
+
375
+ To complement the performance and topology analysis of the LATENT SPACE, we designed an additional experiment to validate the existence of high-performing policies in the space. Specifically, we are interested in confirming if policies with an episodic return larger than 0.5 in the DOORKEY task exist in the LATENT SPACE.
376
+
377
+ We start by selecting a high-performing policy found by searching in the PROGRAMMATIC SPACE. This policy is then encoded as a latent vector to be represented in the LATENT SPACE. Note that the encoded policy does not necessarily decode to the same original policy. To account for that, we use the encoded policy as the initial candidate for an HC search on the LATENT SPACE with neighborhood size $K = 1,000$ . Table 5 shows a particular choice of initial candidate that led to the discovery of a policy in the LATENT SPACE that yields an episodic return of 0.71875 in DOORKEY.
378
+
379
+ This experiment confirms that high-performing policies exist in the LATENT SPACE. However, the convergence rate analysis shows that searching with HC in the space did not result in such policies, after considering 10,000 different search initializations.
380
+
381
+ ![](images/df86047013093c07390871a3805dc12c95953d439fef9d6aea28cb1b1b63ea39.jpg)
382
+ Figure 11: Convergence rate of PROGRAMMATIC SPACE and LATENT SPACE with neighborhood sizes $K = 10$ (a), $K = 250$ (b) and $K = 1,000$ (c), guided by hill-climbing. Reported mean and $95\%$ confidence interval of estimation over a set of 250 search initializations.
383
+
384
+ ![](images/503a8e3d9b07e90c5890c3d6345d3697e19c212ef9d031826654c51f5025512c.jpg)
385
+ Figure 12: Convergence rate of LATENT SPACE with neighborhood size $K = 64$ , guided by HC, CEM, and CEBS. Reported mean and $95\%$ confidence interval over 1,000 seeds.
386
+
387
+ <table><tr><td></td><td>Policy</td><td>DOORKEY return</td></tr><tr><td>Original initial candidate</td><td>DEF run m( WHILE c( noMarkersPresent c) w( turnLeft pickMarker move move w) pickMarker move WHILE c( noMarkersPresent c) w( REPEAT R=17 r( move r) move turnLeft move w) putMarker m)</td><td>0.9375</td></tr><tr><td>Decoded initial candidate</td><td>DEF run m( WHILE c( noMarkersPresent c) w( turnLeft pickMarker move w) move move REPEAT R=3 r( move r) putMarker turnLeft m)</td><td>-0.5</td></tr><tr><td>Search result</td><td>DEF run m( WHILE c( noMarkersPresent c) w( turnLeft move move w) pickMarker move WHILE c( noMarkersPresent c) w( turnLeft move w) WHILE c( rightIsClear c) w( putMarker w) m)</td><td>0.71875</td></tr></table>
388
+
389
+ Table 5: Initial candidate and resulting program from searching for a high-performing policy in LATENT SPACE for the DOORKEY task. The original initial candidate is defined in the PROGRAMMATIC SPACE, while the decoded initial candidate and the search result are defined in the LATENT SPACE.
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d07d73639c3e5bb86241ca745dac76ae2901be2179816a6ad66f8a77babc646
3
+ size 1155368
2024/Reclaiming the Source of Programmatic Policies_ Programmatic versus Latent Spaces/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/715a31e6-a5b8-4fea-97ea-dbcedf101490_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1675a37991daa75210f378cb1d849aa20c23b6b6fa21e52dac1cdcdf6331be00
3
+ size 1914686
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/full.md ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RECONCILING SPATIAL AND TEMPORAL ABSTRACTIONS FOR GOAL REPRESENTATION
2
+
3
+ Mehdi Zadem<sup>1</sup>, Sergio Mover<sup>1,2</sup>, Sao Mai Nguyen<sup>3,4</sup>
4
+
5
+ $^{1}$ LIX, École Polytechnique,Institut Polytechnique de Paris, France
6
+ $^{2}$ CNRS, $^{3}$ Flowers Team, U2IS, ENSTA Paris, IP Paris
7
+ $^{4}$ IMT Atlantique, Lab-STICC, UMR CNRS 6285
8
+ {zadem, sergio.mover}@lix.polytechnique.fr nguyensmai@gmail.com
9
+
10
+ # ABSTRACT
11
+
12
+ Goal representation affects the performance of Hierarchical Reinforcement Learning (HRL) algorithms by decomposing the complex learning problem into easier subtasks. Recent studies show that representations that preserve temporally abstract environment dynamics are successful in solving difficult problems and provide theoretical guarantees for optimality. These methods however cannot scale to tasks where environment dynamics increase in complexity i.e. the temporally abstract transition relations depend on larger number of variables. On the other hand, other efforts have tried to use spatial abstraction to mitigate the previous issues. Their limitations include scalability to high dimensional environments and dependency on prior knowledge.
13
+
14
+ In this paper, we propose a novel three-layer HRL algorithm that introduces, at different levels of the hierarchy, both a spatial and a temporal goal abstraction. We provide a theoretical study of the regret bounds of the learned policies. We evaluate the approach on complex continuous control tasks, demonstrating the effectiveness of spatial and temporal abstractions learned by this approach.<sup>1</sup>
15
+
16
+ # 1 INTRODUCTION
17
+
18
+ Goal-conditioned Hierarchical Reinforcement Learning (HRL) (Dayan & Hinton, 1992) tackles task complexity by introducing a temporal abstraction over learned behaviours, effectively decomposing a large and difficult task into several simpler subtasks. Recent works (Vezhnevets et al., 2017; Kulkarni et al., 2016; Nachum et al., 2019; Zhang et al., 2023; Li et al., 2021) have shown that learning an abstract goal representations is key to proposing semantically meaningful subgoals and to solving more complex tasks. In particular, representations that capture environment dynamics over an abstract temporal scale have been shown to provide interesting properties with regards to bounding the suboptimality of learned policies under abstract goal spaces (Nachum et al., 2019; Abel et al., 2020), as well as efficiently handling continuous control problems.
19
+
20
+ However, temporal abstractions that capture aspects of the environment dynamics (Ghosh et al., 2019; Savinov et al., 2019; Eysenbach et al., 2019; Zhang et al., 2023; Li et al., 2021) still cannot scale to environments where the pairwise state reachability relation is complex. For instance, Zhang et al. (2023) compute a k-reachability relation for a subset of the environment's states defined with an oracle (e.g., the oracle selects only the $x, y$ dimensions). While sampling reachable goals is useful to drive efficiency, the learned $k$ -adjacency relation is difficult to learn for higher dimensions. This situation typically happens when temporally abstract relations take into account more variables in the state space. The main limitation of these approaches is the lack of a spatial abstraction to generalise such relations over states.
21
+
22
+ Alternatively, other works (Kulkarni et al., 2016; Illanes et al., 2020; Garnelo & Shanahan, 2019; Zadem et al., 2023) have studied various forms of spatial abstractions for goal spaces. These ab
23
+
24
+ istractions effectively group states with similar roles in sets to construct a discrete goal space. The advantage of such representation is a smaller size exploration space that expresses large and long-horizon tasks. In contrast to the algorithms that require varying levels of prior knowledge (Kulkarni et al., 2016; Lyu et al., 2019; Illanes et al., 2020), GARA (Zadem et al., 2023) gradually learns such spatial abstractions by considering reachability relations between sets of states. We refer to this abstraction as reachability-aware abstraction. While such representation is efficient for low-dimensional tasks, scalability remains an issue due to the lack of a temporal abstraction mechanism. What is challenging about scaling GARA's approach to more complex environments is exactly what makes the set-based representation effective: the low-level agent must learn how to reach a set of states that, especially in the initial phases of the algorithm when the abstraction is coarser, may be "far" away. We tackle this problem introducing a new agent in the hierarchy that introduces a temporal abstraction. Such an agent learns to select intermediate subgoals that: can be reached from a state $s$ executing the low-level agent; and helps constructing a trajectory from $s$ to a goal abstract state.
25
+
26
+ In this paper, we propose a three-layer HRL algorithm that achieves both a temporal and spatial abstraction for capturing the environment dynamics. We motivate the use of temporal abstraction as the key factor that can scale the abstraction proposed in Zadem et al. (2023), and the reachability-aware spatial abstraction as a way to efficiently represent goals in complex tasks. We complement the approach by adding theoretical guarantees on the bounds of suboptimality of policies learned under this abstraction. Our approach is empirically evaluated on a set of challenging continuous control tasks. Our work presents the following contributions:
27
+
28
+ (1) A novel Feudal HRL algorithm, STAR, to learn online subgoal representations and policies. STAR consists of 3 agents: the high-level agent selects regions in the abstract reachability-aware goal space, the middle-level agent selects concrete subgoals that help reaching abstract goals, and the low-level agent learns to take actions in the environment (Section 3).
29
+ (2) Provide a theoretical motivation for using reachability-aware goal representations, showing a suboptimality bound on the learned policy and that our algorithm progressively improves the reachability-aware abstraction. (Section 4)
30
+ (3) Empirically show that STAR successfully combines both temporal and spatial abstraction for more efficient learning, and that the reachability-aware abstraction scales to tasks with more complex dynamics. (Section 5).
31
+
32
+ # 2 RELATED WORK
33
+
34
+ Building on ideas for introducing hierarchy in Reinforcement Learning (Sutton et al., 1999; Barto & Mahadevan, 2003; Dayan & Hinton, 1992), recent advances have managed to considerably elevate HRL algorithms to tackle complex continuous control environments. Nachum et al. (2018) introduces a two-level hierarchy that sample goals from a pre-defined oracle on the state space. This approach provides a good basis for HRL algorithms as it is generic and addresses non-stationary learning but may still be suboptimal as the goal sampling is unconstrained in the oracle.
35
+
36
+ To remedy this, Ghosh et al. (2019); Savinov et al. (2019); Eysenbach et al. (2019); Zhang et al. (2023); Li et al. (2021) learn different goal representations that try to capture the environment dynamics. This idea has been validated under different theoretical formulations (Nachum et al., 2019; Abel et al., 2020; Li et al., 2021). In particular, Li et al. (2021) learns a latent representation based on slow-dynamics in the state space. The idea is that meaningful temporally abstract relations (over $k$ steps) are expressed by state features that slowly change over time. However, these features may not be always sufficient to capture all the critical information about dynamics. Both Savinov et al. (2019) and Zhang et al. (2023) use $k$ -step reachability relations as a characterisation for environment dynamics. Their idea is to learn if goals (mappings of states in an embedding / oracle) reach a potential goal in $k$ steps. These relations are later used to drive the sampling of goals that can be reached, resulting in more efficient learning. However, such learned pairwise relations are binary and lack the information of which goals can be reached by applying a specific policy. Additionally, without any spatial abstraction, it can be difficult to learn these relations for a complex transition relation (e.g. a relation that require monitoring more than few variables).
37
+
38
+ ![](images/ee45a683e9002bbc7bc08249c82fb98bf4dde1e524100c06c415c8401d6a5d52.jpg)
39
+ Figure 1: Architecture of STAR. The algorithm's inputs are the initial state $s_0$ , the task goal $g^*$ , and an initial abstraction $\mathcal{N}_0$ . STAR runs in a feedback loop a Feudal HRL algorithm (dashed red block) and an abstraction refinement (blue box). The solid red blocks show the HRL agents (Commander, Tutor, Controller). The agents run at different timescales ( $k > l > 1$ ), shown with the solid, dashed, and dotted lines carrying the feedback from the environment to the agents. The Refinement uses as inputs the past episodes ( $\mathcal{D}$ ) and a list of abstract goals ( $\mathcal{E}$ ) visited during the last episode, and outputs an abstraction.
40
+
41
+ To introduce spatial abstraction, Zadem et al. (2023) introduce GARA, a spatial abstraction for the goal space that captures richer information from $k$ step reachability relations. This algorithm learns online a discretisation of the state space that serves as an abstract goal space. This abstraction generalizes reachability relations over sets of states, greatly reducing the difficulty of the learning problem. This approach however was only validated on a 4-dimensional environment and suffers from scalability issues as the abstraction is learned concurrently with the hierarchical policies. As GARA starts learning from a coarse abstraction (composed of a small number of large sets), the goal set is often distant from the current state, thus it can be difficult to learn meaningful policies that manage to reach a desired goal set. Under such circumstances, the approach is blocked targeting a hard to reach goal and cannot improve as it lacks any mechanism to propose easier, more granular subgoals. To alleviate this discrepancy, we introduce a new agent in the hierarchy of GARA that applies a temporal abstraction (Sutton et al., 1999). Our intuition is to synthesise between the discrete goal chosen from the top-down process and the temporal transitions allowed by the current low-level policy from the bottom-up process, through a mid-level agent that acts as an intelligent tutoring system and learns to select intermediate goals $g \in S$ that: (a) can be reached from a state $s$ executing the current low-level agent; and (b) helps constructing a trajectory from $s$ to a goal abstract state $G \in \mathcal{G}$ .
42
+
43
+ # 3 SPATIO-TEMPORAL ABSTRACTION VIA REACHABILITY
44
+
45
+ We consider a goal-conditioned Markov Decision Process $(\mathcal{S},\mathcal{A},P,r_{ext})$ as environment, where $\mathcal{S}\subseteq \mathbb{R}^n$ is a continuous state space, $\mathcal{A}$ is an action space, $P(s_{t + 1}|s_t,a_t)$ is a probabilistic transition function, and $r_{ext}:S\times S\to \mathbb{R}$ is a parameterised reward function, defined as the negative distance to the task goal $g^{*}\in S$ , i.e. $r_{\mathrm{ext}}(s,g^{*}) = -\| g^{*} - s\|_{2}$ . The multi-task reinforcement learning problem consists in learning a goal conditioned policy $\pi$ to sample at each time step $t$ an action $a\sim \pi (s_t\mid g^*)$ , so as to maximizes the expected cumulative reward. The spatial goal abstraction is modeled by a set-based abstraction defined by a function $\mathcal{N}:S\rightarrow 2^S$ that maps concrete states to sets of states (i.e., $\forall s\in S,\mathcal{N}(s)\subseteq S$ ). We write $\mathcal{G}_{\mathcal{N}}$ to refer to the range of the abstraction $\mathcal{N}$ , which is intuitively the abstract goal space. We further drop the subscript (i.e., write $\mathcal{G}$ ) when $\mathcal{N}$ is clear from the context and denote elements of $\mathcal{G}$ with the upper case letter $G$ .
46
+
47
+ We propose a HRL algorithm, Spatio-Temporal Abstraction via Reachability (STAR), that learns, at the same time, a spatial goal abstraction $\mathcal{N}$ and policies at multiple time scales. The STAR algorithm, shown in Figure 1, has two main components: a 3-levels Feudal HRL algorithm (enclosed in the red dashed lines); and an abstraction refinement component (shown in the blue solid lines). STAR runs the Feudal HRL algorithm and the abstraction refinement in a feedback loop, refining the abstraction $\mathcal{N}$ at the end of every learning episode. Observe that the high-level agent (called Commander) samples a goal $G$ from the abstract goal space $\mathcal{G}$ , and that such a goal can be difficult to reach from the current state. The first intuition of the algorithm is that, to reach a possibly very far goal $G$ set by the high-level agent (Controller), the middle-level agent (Tutor) achieves a temporal abstraction of the Controller actions by sampling an intermediate subgoal $g\in S$ of a difficulty
48
+
49
+ level adapted to the current non-optimal policy. The second intuition is that the algorithm learns the abstraction iteratively. Every refinement obtains a finer abstraction $\mathcal{N}'$ from $\mathcal{N}$ . Intuitively, $\mathcal{N}'$ will split at least a goal $G_{1} \in \mathcal{G}_{\mathcal{N}}$ in two goals $G_{1}', G_{1}'' \in \mathcal{G}_{\mathcal{N}'}$ if there are different states in $G_{1}$ (i.e., $s_{a}, s_{b} \in G_{1}$ ) that cannot reach the same target $G_{2} \in \mathcal{G}$ when applying the same low-level policy. While we will define such reachability property precisely later, intuitively the refinement separates goal states that "behave differently" under the same low level policy (i.e., $\mathcal{N}'$ would represent more faithfully the environment dynamic).
50
+
51
+ We first explain how STAR uses the different hierarchy levels to address the challenges of learning policies when the abstraction is coarse (Section 3.1), and then formalize a refinement that obtains a reachability aware abstraction (Section 3.2).
52
+
53
+ # 3.1 A 3-LEVEL HIERARCHICAL ALGORITHM FOR TEMPORAL ABSTRACTION
54
+
55
+ The feudal architecture of STAR is composed of a hierarchy with three agents:
56
+
57
+ 1. Commander: the highest-level agent learns the policy $\pi_{\mathrm{Comm}}: S \times S \to \mathcal{G}$ that is a goal-conditioned on $g^{*}$ and samples an abstract goal $G \in \mathcal{G}$ that should help to reach the task goal $g^{*}$ from the current agent's state ( $G_{t+k} \sim \pi_{\mathrm{Comm}}(s_t, g^*)$ ).
58
+ 2. Tutor: the mid-level agent is conditioned by the Commander goal $G$ . It learns the policy $\pi_{\mathrm{Tut}}: S \times \mathcal{G} \to S$ and picks subgoals in the state space $(g_{t + l} \sim \pi_{\mathrm{Tut}}(s_t, G_{t + k}))$ .
59
+ 3. Controller: the low-level policy $\pi_{\mathrm{Cont}}: S \times S \to \mathcal{A}$ is goal-conditioned by the Tutor's subgoal $g$ and samples actions to reach given goal $(a \sim \pi_{\mathrm{Cont}}(s_t, g_{t + l}))$ .<sup>2</sup>
60
+
61
+ The agents work at different time scales: the Commander selects a goal $G_{t + k}$ every $k$ steps, the Tutor selects a goal $g_{t + l}$ every $l$ steps (with $k$ multiple of $l$ ), and the Controller selects an action to execute at every step. Intuitively, the Commander's role in this architecture is to select an abstract goal $G_{t + k}$ (i.e., a set of states that are similar and of interest to solve the task) from the current state $s_t$ . However, the initial abstraction $\mathcal{G}$ of the state space is very coarse (i.e., the abstract regions are large sets and still do not represent the agent's dynamic). This means that learning a flat policy that reaches $G_{t + k}$ from $s_t$ is very challenging. The Tutor samples subgoals $g_{t + l}$ from $S$ that are intermediate, easier targets to learn to reach for the Controller, instead of a possibly far away state that might prove too difficult to reach. Intuitively, the Tutor implements a temporal abstraction mechanism. The structure of STAR guides the agent through the large state-goal abstraction, while it also allows the agent to learn manageable low-level policies.
62
+
63
+ We set the reward at each level of the hierarchy following the above intuitions. The Commander receives the external environment reward after $k$ steps for learning to reach the task goal $g^{*}$ : $r_{\mathrm{Comm}}(s_t) \coloneqq \max_{x \in \mathcal{N}(s_t)} r_{\mathrm{ext}}(x, g^{*})$ . This reward is computed as the extrinsic reward of the closest point in $\mathcal{N}(s_t)$ to $g^{*}$ . The Tutor helps the Controller to reach the abstract goal, and is thus rewarded by a distance measure between $s_t$ and the $G_{t+k}$ ; $r_{\mathrm{Tut}}(s_t, G_{t+k}) \coloneqq -\| s_t - \mathrm{Center}(G_{t+k})\|_2$ , where $\mathrm{Center}(G_{t+k})$ is the center of the goal $G_{t+k}$ . Finally, the Controller is rewarded with respect to the Euclidean distance between subgoals sampled by the Tutor and the reached state: $r_{\mathrm{Cont}}(s_t, g_{t+l}) \coloneqq -\| g_{t+l} - s_t\|_2$ . This intrinsic reward allows the Controller to learn how to reach intermediate subgoal states $g_{t+l}$ .
64
+
65
+ # 3.2 REFINING $\mathcal{N}$ VIA REACHABILITY ANALYSIS
66
+
67
+ While we follow the high level description of the refinement procedure of the GARA (Zadem et al., 2023) algorithm, we adapt it to our notation and to the new theoretical results on the refinement we present later (which holds for both GARA and STAR). Furthermore, in the rest of this Section and in Section 4, we will assume a 2-level hierarchy, where $\pi_{\mathrm{Comm}}$ is the high-level policy (e.g., $\pi_{\mathrm{high}}$ ), and $\pi_{\mathrm{low}}$ is the hierarchical policy obtained composing $\pi_{\mathrm{Tut}}$ and $\pi_{\mathrm{Cont}}$ .
68
+
69
+ We first define the $k$ -step reachability relation for a goal-conditioned policy $\pi_{\mathcal{N}_{\mathrm{Low}}}$ :
70
+
71
+ $$
72
+ R _ {\pi_ {\mathcal {N} _ {\text {L o w}}}} ^ {k} (G _ {i}, G _ {j}) := \left\{s ^ {\prime} \in \mathcal {S} \mid s \in G _ {i}, s \xrightarrow [ \pi_ {\mathcal {N} _ {\text {L o w}}} (., G _ {j}) ]{k} s ^ {\prime} \right\},
73
+ $$
74
+
75
+ where $s \xrightarrow[k]{k} s'$ means that $s$ can reach $s'$ by executing the policy $\pi_{\mathcal{N}_{\mathrm{Low}}(.,G_j)}$ (targeting $G_j$ )
76
+
77
+ in $k$ steps. In other words, $R_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k (G_i,G_j)$ is the set of states reached when starting in any state in $G_{i}$ and applying the policy $\pi_{\mathcal{N}_{\mathrm{Low}}}(.,G_j)$ for $k$ steps.
78
+
79
+ The algorithm uses the notion of reachability property among a pair of abstract goals:
80
+
81
+ Definition 1 (Pairwise Reachability Property) Let $\mathcal{N}: \mathcal{S} \to 2^{\mathcal{S}}$ be a set-based abstraction and $G_{i}, G_{j} \in \mathcal{G}_{\mathcal{N}}$ . $\mathcal{N}$ satisfies the pairwise reachability property for $(G_{i}, G_{j})$ if $R_{\pi_{\mathcal{N}_{Low}}^{*}}^{k}(G_{i}, G_{j}) \subseteq G_{j}$ .
82
+
83
+ The algorithm decides to refine the abstract representation after an episode of the HRL algorithm. Let $\mathcal{E} := \{G_0, \ldots, G_n\}$ be the list of goals visited in the last episode. The refinement algorithm analyzes all the pairs $(G_i, G_{i+1}) \in \mathcal{E}$ , for $0 \leq i < n$ , and refines $\mathcal{N}$ in a new abstraction $\mathcal{N}'$ by "splitting" $G_i$ if it does not satisfy the pairwise reachability property. Each refinement obtains a new, finer abstraction $\mathcal{N}'$ where the reachability property is respected in one more goal. We formalize when an abstraction $\mathcal{N}'$ refines an abstraction $\mathcal{N}$ with respect to the reachability property as follows:
84
+
85
+ Definition 2 (Pairwise Reachability-Aware Refinement) Let $\mathcal{N}: S \to 2^S$ and $\mathcal{N}': S \to 2^S$ be two set-based abstractions such that there exists $G_i \in \mathcal{G}_N$ , $\mathcal{G}_{\mathcal{N}'} = (\mathcal{G}_N \setminus \{G_i\}) \cup \{G_1', G_2'\}$ , $G_1' \cup G_2' = G_i$ , and $G_1' \cap G_2' = \emptyset$ . $\mathcal{N}'$ refines $\mathcal{N}$ (written as $\mathcal{N}' \prec \mathcal{N}$ ) if, for some $G_j \in \mathcal{G}_N$ , $\mathcal{N}'$ satisfies the pairwise reachability property for $(G_1', G_j)$ , while $\mathcal{N}$ does not satisfy the pairwise reachability property for $(G_i, G_j)$ .
86
+
87
+ # 3.2.1 REFINEMENT COMPUTATION
88
+
89
+ We implement the refinement similarly to GARA. We represent an abstraction $\mathcal{N}$ directly with the set of abstract states $\mathcal{G}_{\mathcal{N}} := \{G_1, \ldots, G_n\}$ , a partition of the state space $\mathcal{S}$ (i.e., all the sets in $\mathcal{G}_{\mathcal{N}}$ are disjoint and their union is $\mathcal{S}$ ). We represent each $G \in \mathcal{G}_{\mathcal{N}}$ as a multi-dimensional interval (i.e., a hyper-rectangle). We (i) train a neural network $\mathcal{F}_k$ predicting the k-step reachability from each partition in $\mathcal{G}_{\mathcal{N}}$ ; and (ii) for each $G_i$ , $G_{i+1} \in \mathcal{E}$ , we check pairwise reachability from $\mathcal{F}_K$ ; and (iii) if pairwise reachability does not hold, we compute a refinement $\mathcal{N}'$ of $\mathcal{N}$ .
90
+
91
+ We approximate the reachability relation with a forward model, a fully connected feed forward neural network $\mathcal{F}_k: S \times \mathcal{G}_{\mathcal{N}} \to S$ . $\mathcal{F}_k(s_t, G_j)$ , is trained from the replay buffer and predicts the state $s_{t+k}$ the agent would reach in $k$ steps starting from a state $s_t$ when applying the low level policy $\pi_{\mathcal{N}_{\mathrm{Low}}}(s, G_j)$ conditioned on the goal $G_j$ . We avoid the non-stationarity issue of the lower-level policy $\pi_{\mathcal{N}_{\mathrm{Low}}}$ by computing the refinement only when $\pi_{\mathcal{N}_{\mathrm{Low}}}$ is stable. See Appendix C for more details. We use the forward model $\mathcal{F}_k$ to evaluate the policy's stability in the regions visited in $\mathcal{E}$ by computing the Mean Squared Error of the forward model predictions on a batch of data from the replay buffer, and consider the model stable only if the error remains smaller than a parameter $\sigma$ over a window of time.
92
+
93
+ Checking the reachability property for $(G_{i}, G_{j})$ amounts to computing the output of $\mathcal{F}_k(s, G_j)$ , for all states $s \in G_i$ , i.e., $R_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k(G_i, G_j) := \{\mathcal{F}_k(s, G_j) \mid s \in G_i\}$ , and checking if $R_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k(G_i, G_j) \subseteq G_j$ . Technically, we compute an over-approximation $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k(G_i, G_j) \supseteq R_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k(G_i, G_j)$ with the Ai2 (Gehr et al., 2018) tool. Ai2 uses abstract interpretation (Cousot & Cousot, 1992; Rival & Yi, 2020) to compute such an over-approximation: the tool starts with a set-based representation (e.g., intervals, zonotopes, ...) of the neural network input, the set $G_i$ , and then computes the set of outputs layer-by-layer. In $F_k$ , each layer applies first a linear transformation (i.e. for the weights and biases) and then a piece-wise ReLU activation function. For each layer, Ai2 computes first an over-approximation of the linear transformation (i.e., it applies the linear transformation to the input set), and then uses this result to compute an over-approximation of the ReLU activation function, producing the new input set to use in the next layer. Such computations work on abstract domains: for example, one can over-approximate a linear transformation applied to an interval by computing the transformation, and then a convex-hull to obtain the output in the form of an interval. The over-approximations for ReLU activation functions are described in detail in Gehr et al. (2018).
94
+
95
+ We split the set $G_{i}$ when it does not satisfy the reachability property w.r.t. $G_{i + 1}$ . Since $G_{i}$ is an interval, we implement the algorithm from (Zadem et al., 2023; Wang et al., 2018) that: (i) stops if
96
+
97
+ $G_{i}$ satisfies the reachability property or none of the states in $G_{i}$ reach $G_{j}$ ; and otherwise (ii) splits $G_{i}$ in two intervals, $G_{i}^{\prime}$ and $G_{i}^{\prime \prime}$ , calling the algorithm recursively on both intervals. This results in two sets of intervals, subsets of $G_{i}$ , that either satisfy the reachability property or not. Such intervals are the new intervals replacing $G_{i}$ in the new abstraction (see Appendix F).
98
+
99
+ # 4 THEORETICAL PROPERTIES OF THE REFINEMENT
100
+
101
+ In this section, we motivate the adoption of the goal-space abstraction and the reachability-aware refinement showing that: (i) there exists a bound on the sub-optimality of policies trained with a reachability-aware abstraction; and (ii) the reachability-aware refinement gradually finds a reachability-aware abstraction. Our results apply to both STAR and GARA (Zadem et al., 2023), and all the proofs are available in the Appendix A.
102
+
103
+ The theoretical results hold under the assumptions that the environment $M$ is deterministic and the reward signal $r_{ext}$ is bounded in the environment. Consequently, we assume that the distance separating a state $s \in S$ from all the states $s' \in S$ that $s$ can reach in one step is bounded. Thus, there is an upper bound $R_{\max} := \max_{s, s' \in S, \sum_{a \in A} P(s'|s, a) \geq 0} \| s - s' \|_2$ on the reward signal.
104
+
105
+ Let $\pi^{*}$ be the optimal hierarchical policy composed by a high-level policy $g\sim \pi_{\mathrm{high}}^{*}(s,g^{*})$ that samples $g\in S$ , and a low-level policy $a\sim \pi_{\mathrm{low}}^{*}(s,g)$ that samples actions $a\in \mathcal{A}$ . Since the environment is deterministic, there exists an optimal high-level trajectory containing the goals sampled with $\pi_{\mathrm{high}}^{*}$ and an optimal low-level trajectory containing all the visited states:
106
+
107
+ $$
108
+ \mathcal {T} _ {\text {h i g h t}} ^ {*} := \left\{g _ {0}, g _ {1}, \dots , g _ {m} \right\}, \quad \mathcal {T} _ {\text {L o w}} ^ {*} := \left\{s _ {0}, s _ {1}, \dots , s _ {m \cdot k} \right\}, \text {w i t h} s _ {i \cdot k} = g _ {i}, \quad \text {f o r} 0 \leq i \leq m.
109
+ $$
110
+
111
+ Let $\mathcal{N}: S \to 2^S$ be a set-based abstraction. We write $\pi_{\mathcal{N}}^{*}$ for the optimal hierarchical policy obtained with the abstraction $\mathcal{N}$ . We write $\mathcal{T}_{\mathcal{N}_{\mathrm{High}}}^{*}$ and $\mathcal{T}_{\mathcal{N}_{\mathrm{Low}}}^{*}$ for the optimal high- and low-level trajectories respectively. Below, we provide an upper bound on the difference between the optimal hierarchical policy $\pi^{*}$ and the optimal hierarchical policy $\pi_{\mathcal{N}}^{*}$ when $\mathcal{N}$ is a reachability-aware.
112
+
113
+ Definition 3 (Reachability-Aware Abstraction) Let $\mathcal{N}: S \to 2^S$ be a set-based abstraction, $\pi_{\mathcal{N}}^{*}$ the corresponding optimal hierarchical policy, and $\mathcal{T}_{high}^{*}$ the optimal high-level trajectory from $\pi_{high}^{*}$ . $\mathcal{N}$ is a reachability-aware abstraction with respect to $\mathcal{T}_{high}^{*}$ if:
114
+
115
+ 1. States are contained in their abstraction: $\forall s\in S,s\in \mathcal{N}(s)$
116
+ 2. The abstractions of the goals in the optimal trajectory are disjoint:
117
+
118
+ $$
119
+ \forall g _ {i}, g _ {j} \in \mathcal {T} _ {h i g h} ^ {*}, (g _ {i} \neq g _ {j} \rightarrow \mathcal {N} (g _ {i}) \cap \mathcal {N} (g _ {j}) = \emptyset).
120
+ $$
121
+
122
+ 3. The abstractions of each consecutive goals in the optimal trajectory satisfy the pairwise reachability property:
123
+
124
+ $$
125
+ \forall g _ {i}, g _ {i + 1} \in \mathcal {T} _ {h i g h} ^ {*}, R _ {\pi_ {\mathcal {N} _ {L o w}} ^ {*}} ^ {k} (\mathcal {N} (g _ {i}), \mathcal {N} (g _ {i + 1})) \subseteq \mathcal {N} (g _ {i + 1}).
126
+ $$
127
+
128
+ 4. The reward in the final abstract goal $\mathcal{N}(g_m)$ is bounded:
129
+
130
+ $$
131
+ \exists \epsilon > 0, \forall s \in \mathcal {N} (g _ {m}). | r _ {\text {e x t}} (g _ {m}) - r _ {\text {e x t}} (s) | \leq \epsilon .
132
+ $$
133
+
134
+ Theorem 1 (Sub-optimal Learning) Let $M$ be a deterministic environment with task goal $g^{*} \in S$ and $r_{ext}(s) = -\| g^{*} - s\|_{2}$ . Let $\mathcal{N}: \mathcal{S} \to 2^{\mathcal{S}}$ be a reachability-aware abstraction with respect to $\mathcal{T}_{high}^{*}$ . Then, for $s_0 \in \mathcal{T}_{Low}^{*}$ and $s_0' \in \mathcal{T}_{\mathcal{N}_{Low}}^{*}$ we have that:
135
+
136
+ $$
137
+ \left| V _ {\pi^ {*}} \left(s _ {0}\right) - V _ {\pi_ {N} ^ {*}} \left(s _ {0} ^ {\prime}\right) \right| \leq \left(\sum_ {i = 0} ^ {\frac {m k}{2}} \gamma^ {i} i + \sum_ {i = \frac {m k}{2}} ^ {m k} \gamma^ {i} (m k - i)\right) \cdot 2 R _ {\max } + \frac {1 - \gamma^ {m k + 1}}{1 - \gamma} \epsilon , \tag {1}
138
+ $$
139
+
140
+ where $V_{\pi}(s)$ is the value function for a policy $\pi$ (Sutton & Barto, 1998).
141
+
142
+ Moreover, if there exists a $B \geq \epsilon > 0$ such that for all $1 \leq i \leq m$ , $\max_{x,y \in \mathcal{N}(g_i)} \| x - y \| \leq B$ , then $\forall s_i \in \mathcal{T}_{Low}^*$ and $\forall s_i' \in \mathcal{T}_{\mathcal{N}_{Low}}^*$ we have that:
143
+
144
+ $$
145
+ \left| V _ {\pi_ {L o w} ^ {*}} \left(s _ {0}\right) - V _ {\pi_ {\mathcal {N} _ {L o w}} ^ {*}} \left(s _ {0} ^ {\prime}\right) \right| \leq \frac {1 - \gamma^ {m k + 1}}{1 - \gamma} \left(k R _ {m a x} + B\right). \tag {2}
146
+ $$
147
+
148
+ Equation (1) in the above theorem provides a bound on the sub-optimality of the hierarchical policy when trained under a set-based reachability-aware abstraction $\mathcal{N}$ . Intuitively, the worst trajectory $\mathcal{T}_{\mathcal{N}_{\mathrm{Low}}}^*$ , starting from $s_0' \in \mathcal{N}(s_0)$ , can progressively deviate from $\mathcal{T}_{\mathrm{Low}}^*$ as $i$ increases. When $i \geq \frac{mk}{2}$ , the trajectories progressively converge around $\mathcal{N}(g_m)$ . Equation (2) defines a tighter upper bound when there is a bound $B$ on the maximum distance between two states in each abstract goal in $\mathcal{T}_{\mathcal{N}_{\mathrm{High}}}^*$ . In practice, the existence of the bound $B$ is valid when the state space is bounded. In this case, the deviation of the two trajectories is independent from $i$ and is stable across time.
149
+
150
+ Lemma 1 Let $\mathcal{N}$ and $\mathcal{N}'$ be two set-based abstractions such that $\mathcal{N}' \prec \mathcal{N}$ and $\mathcal{N}$ satisfies the Conditions (1), and (4) of a reachability-aware abstraction (Definition 3). Also, let $G_i \in \mathcal{T}_{\mathcal{N}_{High}}^*$ (note that $G_i \in \mathcal{G}_{\mathcal{N}}$ ), and $G_i$ be the goal refined in $\mathcal{N}'$ . Then, the abstraction $\mathcal{N}'$ satisfies the following:
151
+
152
+ 1. $\exists g_{i}\in \mathcal{T}_{high}^{*}$ such that $\mathcal{N}$ does not satisfy the reachability property for $(\mathcal{N}(g_i),\mathcal{N}(g_{i + 1}))$ while $\mathcal{N}'$ does for $(\mathcal{N}'(g_i),\mathcal{N}(g_{i + 1}))$
153
+ 2. If there exists $g_j \in \mathcal{T}_{high}^*$ such that $g_j \in \mathcal{N}(g_i)$ , then $g_j \notin \mathcal{N}'(g_i)$ .
154
+
155
+ Theorem 2 Given an initial set-based abstraction $\mathcal{N}$ and assuming $\mathcal{N}(g_m)$ satisfies the Conditions (1), and (4) of Definition 3, we compute a reachability-aware abstraction after applying a finite number of reachability-aware refinements.
156
+
157
+ Theorem 2 follows from Lemma 1 and shows that applying the reachability-aware refinement for a finite number of times we compute a reachability-aware abstraction. In practice, the assumption that $\mathcal{N}(g_m)$ verifies criteria 1 and 4 of Def.3 is reasonable since the goal $g^{*}$ is known in the environment. That is to say, $\mathcal{N}(g_m)$ could correspond to a region whose center is $g^{*}$ and radius is $R_{max}$ .
158
+
159
+ # 5 EXPERIMENTAL EVALUATION
160
+
161
+ In this section we answer the following research questions: 1) Do the spatial and temporal abstraction of STAR allow for more data-efficient learning? 2) Does the reachability-aware abstraction scale to more complex environments compared to a more concrete reachability relation? 3) How does the learned abstraction decompose the environment to allow for learning successful policies?
162
+
163
+ # 5.1 ENVIRONMENT SETUP
164
+
165
+ ![](images/4187df500febdbe62555e19d4c109f90ad3530e7d49c7a3be80f7300ce7791a3.jpg)
166
+ (a) Ant Maze
167
+
168
+ ![](images/0818f4af944cc59752e2de9e5bb3c675cca2b519dccf4b96856dbcfac79798b0.jpg)
169
+ (b) Ant Fall
170
+
171
+ ![](images/0306031df7e28770714d71503757bb6a2c79125d7987293522a30bb2c939cad9.jpg)
172
+ (c) Ant Maze Cam
173
+ Figure 2: Ant environments
174
+
175
+ We evaluate our approach on a set of challenging tasks in the Ant environments (Fig.2) adapted from Duan et al. (2016) and popularised by Nachum et al. (2018). The Ant is a simulated quadrupedal robot whose body is composed of a torso and four legs attached by joints. Furthermore, each leg is split into two parts by a joint in the middle to allow bending. The observable space of the Ant is composed of the positions, orientations and velocities of the torso as well as the angles and angular velocities in each joint. Overall the state space is comprised of 30 dimensions. The actions correspond to applying forces on actuators in the joint. This actions space is continuous and 8-dimensional. We propose the following tasks:
176
+
177
+ 1. Ant Maze: in this task, the ant must navigate a ' $\supset$ ' -shaped maze to reach the exit positioned at the top left.
178
+
179
+ 2. Ant Fall: the environment is composed of two raised platforms seperated by a chasm. The ant starts on one of the platforms and must safely cross to the exit without falling. A movable block can be push into the chasm to serve as a bridge. Besides the precise maneuvers required by the ant, falling into the chasm is a very likely yet irreversible mistake.
180
+ 3. Ant Maze Cam: this is a more challenging version of Ant Maze. The upper half of the maze is fully blocked by an additional obstacle that can only be opened when the ant looks at the camera (in yellow in Fig. 2c) when on the red spot. The exit remains unchanged.
181
+
182
+ We note that these tasks are hierarchical in nature as reaching the goal requires correctly controlling the ant to be able to move (low-level) and then navigating to the exit (high-level). Moreover, in both Ant Maze Cam and Ant Fall, no reward is attributed to the intermediate behaviour that unlocks the path to the exit (looking at the camera, pushing the block). Under such circumstances, the underlying dynamics are more complex making the reachability relations more difficult to extract.
183
+
184
+ # 5.2 COMPARATIVE ANALYSIS
185
+
186
+ We compare STAR with the following algorithms:
187
+
188
+ 1. GARA (Zadem et al., 2023): this algorithm learns a spatial abstraction via reachability analysis using a two-level hierarchical policy.
189
+ 2. HIRO (Nachum et al., 2018): this algorithm relies on a Manager to sample goals directly from the state space $S$ and learns how to achieve them using the controller.
190
+ 3. HRAC (Zhang et al., 2023): adopting the same architecture as HIRO, this approach tries to approximate a reachability relation between goals in an abstract space and use it to sample rewarding reachable goals. The reachability relation is derived from measuring the shortest transition distance between states in the environment.
191
+ 4. LESSON (Li et al., 2021): a HRL algorithm that learns a latent goal representations based on slow dynamics in the environment. The latent space learns from features that are slow to change over $k$ steps, in order to capture a temporal abstraction.
192
+
193
+ In line with HIRO and HRAC, STAR relies on an oracle $\psi(s)$ that transforms the observations of the high-level agents (Tutor and Commander). In practice $\psi()$ corresponds to a feature selection applied to states. In contrast, LESSON learns a latent goal space without an oracle. In Ant Maze $\psi(s) = (x,y)$ , in Ant Fall $\psi(s) = (x,y,z)$ , and in Ant Maze Cam, $\psi(s) = (x,y,\theta_x,\theta_y,\theta_z)$ .
194
+
195
+ Fig.3 shows that STAR outperforms all of the state-of-art approaches by reaching a higher success rate with less timesteps. In particular GARA, operating only under a spatial abstraction mechanism is unable to solve Ant Maze, the easiest task in this analysis. HIRO on the other hand learns less efficient policies due to it lacking a spatial abstraction component. These results show that STAR, which combines temporal and spatial abstractions, is a more efficient approach.
196
+
197
+ To discuss the second research question, we first observe that, while the high-level dynamics of Ant Maze can be captured by the $x,y$ dimensions, the dynamics of Ant Fall require all the $x,y,z$ dimensions ( $z$ expresses if the ant is safely crossing above the pit or if it has fallen), and Ant Maze Cam requires $x,y,\theta_x,\theta_y$ , and $\theta_z$ (the orientation angles are necessary to unlock the access to the upper part of the maze). Fig.3 shows that HRAC is unable to capture meaningful relations between subgoals and fails at solving either Ant Fall or Ant Maze Cam due to the increased complexity in capturing the high-level task dynamic. Similarly, LESSON is unable to learn a good subgoal representation using slow dynamics in Ant Maze Cam. In fact, $\theta_x,\theta_y$ , and $\theta_z$ are features that do not respect the LESSON's slowness objective (i.e., they can vary rapidly across $k$ steps). As a results, the goal abstraction in LESSON may overlook them, losing critical information in the process. Instead, STAR is capable of abstracting these dimensions and converging to a successful policy. We remark that STAR, similarly to HRAC, can be seen as extensions of HIRO with the addition of a reachability-based component that improves goal representation. However, the results shown in Fig. 3 highlight how the addition of the reachability information in HRAC is even detrimental for the performance when the number of features in the oracle increases (e.g., on Ant Fall and Ant Maze Cam). Instead, the STAR's reachability-aware spatial abstraction and intermediate temporal abstraction allow the algorithm to scale to more complex tasks.
198
+
199
+ ![](images/690f8ed4d5e8b146dbd1b3880b429d8a70cb53b60b00f0cb872791aa1a32688d.jpg)
200
+ Figure 3: Comparative evaluation averaged over 10 runs for STAR, GARA, HRAC, HIRO and LESSON.
201
+
202
+ ![](images/0410ef75b63b29091950e2b0ccb1e72b8c6c012d5733b680c7ed4274f36f672b.jpg)
203
+
204
+ ![](images/0d91b3cccec91b15628c28ff6d161eb9cad2fc059e6e17939a2da0d4d0027e1e.jpg)
205
+
206
+ # 5.3 REPRESENTATION ANALYSIS
207
+
208
+ We answer the third research question examining the progress of the STAR's Commander agent at different timesteps during learning when solving the Ant Maze. From Fig.4 we can see that, progressively, the ant explores trajectories leading to the goal of the task. Additionally, the frequency of visiting goals in the difficult areas of the maze (e.g., the tight corners) is higher, and these goals are eventually refined later in the training, jibing with the configuration of the obstacles. Note that the Commander's trajectory at 3M timesteps sticks close to the obstacles and pass through the maze's opening, resembling an optimal trajectory. This study provides some insight on how STAR gradually refines the goal abstraction to identify successful trajectories in the environment. In particular, STAR learns a more precise abstraction in bottleneck areas where only a few subset of states manage to reach the next goal. We provide the representation analysis on Ant Fall in Appendix B.
209
+
210
+ ![](images/a92ed161c9b7c3a7527cd07bdce4366fb6c3386c8dd6be6b806141735c2b1752.jpg)
211
+ Figure 4: Frequency of goals visited by the Commander when evaluating a policy learned after 1M, 2M, and 3M timesteps (averaged over 5 different evaluations with 500 maximum timesteps). The subdivision of the mazes represent (abstract) goals. The color gradient represents the frequency of visits of each goal. Grey areas correspond to the obstacles of the environment in Ant Maze.
212
+
213
+ ![](images/05450d2b82a1017fa0548eaee9f78d475630da1e1df1cb3f07d8b5b337495bb7.jpg)
214
+
215
+ ![](images/47a67be4d3d38ea37bd8e2af3460eee244986af21ab02ff7644927916111e6a3.jpg)
216
+
217
+ # 6 CONCLUSION
218
+
219
+ In this paper, we propose a novel goal-conditioned HRL algorithm, STAR, that combines spatial and temporal abstractions. The spatial representation groups states with similar environment dynamics, and the temporal abstraction compensates for the non-optimality of the low-level policy, allowing online learning of both the policies and the representations. STAR's high-level agent learns a coarse, although precise, spatial approximation of the environment dynamics that, differently from other algorithms using reachability for goal representation, scales to more complex continuous control environments. STAR outperforms the existing algorithms that use either one of the abstractions and that struggle to learn meaningful representations. Here, we further provide a theoretical justification for reachability-aware abstractions, showing that we can use such representations to learn sub-optimal policies and learn them with a sequence of refinements. In the future, we plan to extend our approach to stochastic environments, which would require a different reachability property, and non-Markovian environments, which would require adding a history component to the spatial abstraction.
220
+
221
+ # ACKNOWLEDGMENTS
222
+
223
+ We thank the anonymous reviewers for their detailed feedback and discussion on our work.
224
+
225
+ This research work was partially supported by the Hi! PARIS Center, the Labex DigiCosme (project ANR11LABEX0045DIGICOSME) operated by ANR as part of the program "Investissement d'Avenir" Idex ParisSaclay (ANR11IDEX000302), the SAIF project (funded by the "France 2030" government investment plan managed by the French National Research Agency under the reference ANR-23-PEIA-0006), and the AID/CIEDS project FARO.
226
+
227
+ We additionally extend our thanks to the members of the VISTA team in LIX, Ecole Polytechnique for their generous support and provision of computational resources, which were instrumental in conducting the experiments for this research.
228
+
229
+ # REFERENCES
230
+
231
+ David Abel, Nate Umbanhowar, Khimya Khetarpal, Dilip Arumugam, Doina Precup, and Michael Littman. Value preserving state-action abstractions. In Silvia Chiappa and Roberto Calandra (eds.), Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pp. 1639-1650. PMLR, 26-28 Aug 2020. URL https://proceedings.mlr.press/v108/abel20a.html.
232
+ Andrew G. Barto and Sridhar Mahadevan. Recent advances in hierarchical reinforcement learning. Discrete Event Dynamic Systems, 13(1), 2003.
233
+ Patrick Cousot and Radhia Cousot. Abstract interpretation frameworks. J. Log. Comput., 2(4): 511-547, 1992.
234
+ Peter Dayan and Geoffrey E Hinton. Feudal reinforcement learning. In NeurIPS, volume 5, 1992.
235
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In Maria Florina Balcan and Kilian Q. Weinberger (eds.), Proceedings of The 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pp. 1329-1338, New York, New York, USA, 20-22 Jun 2016. PMLR. URL https://proceedings.mlr.press/v48/duan16.html.
236
+ Ben Eysenbach, Ruslan Salakhutdinov, and Sergey Levine. Search on the replay buffer: Bridging planning and reinforcement learning. In NeurIPS 2019, 2019.
237
+ Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. In Jennifer G. Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pp. 1582-1591. PMLR, 2018. URL http://proceedings.mlr.press/v80/fujimoto18a.html.
238
+ Marta Garnelo and Murray Shanahan. Reconciling deep learning with symbolic artificial intelligence: representing objects and relations. Current Opinion in Behavioral Sciences, 29:17-23, 2019. ISSN 2352-1546. doi: https://doi.org/10.1016/j.cobeha.2018.12.010. Artificial Intelligence.
239
+ Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin T. Vechev. AI2: safety and robustness certification of neural networks with abstract interpretation. In IEEE Symposium on Security and Privacy, 2018.
240
+ Dibya Ghosh, Abhishek Gupta, and Sergey Levine. Learning actionable representations with goal conditioned policies. In ICLR 2019, 2019.
241
+ León Illanes, Xi Yan, Rodrigo Toro Icarte, and Sheila A. McIlraith. Symbolic plans as high-level instructions for reinforcement learning. In AAAI, 2020.
242
+ Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In NeurIPS, volume 29, 2016.
243
+
244
+ Siyuan Li, Lulu Zheng, Jianhao Wang, and Chongjie Zhang. Learning subgoal representations with slow dynamics. In ICLR, 2021.
245
+ Daoming Lyu, Fangkai Yang, Bo Liu, and Steven Gustafson. SDRL: interpretable and data-efficient deep reinforcement learning leveraging symbolic planning. In AAAI, 2019.
246
+ Ofir Nachum, Shixiang Gu, Honglak Lee, and Sergey Levine. Data-efficient hierarchical reinforcement learning. In NeurIPS 2018, 2018.
247
+ Ofir Nachum, Shixiang Gu, Honglak Lee, and Sergey Levine. Near-optimal representation learning for hierarchical reinforcement learning. In ICLR, 2019.
248
+ X. Rival and K. Yi. Introduction to Static Analysis: An Abstract Interpretation Perspective. 2020.
249
+ Nikolay Savinov, Anton Raichuk, Damien Vincent, Raphael Marinier, Marc Pollefeys, Timothy P. Lillicrap, and Sylvain Gelly. Episodic curiosity through reachability. In ICLR, 2019.
250
+ Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: an Introduction. 1998.
251
+ Richard S. Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112, 1999.
252
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026-5033, 2012. doi: 10.1109/IROS.2012.6386109.
253
+ Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. CoRR, abs/1703.01161, 2017.
254
+ Shiqi Wang, Kexin Pei, Justin Whitehouse, Junfeng Yang, and Suman Jana. Formal security analysis of neural networks using symbolic intervals. In USENIX Security Symposium, 2018.
255
+ Christopher J. C. H. Watkins and Peter Dayan. Technical note: q -learning. Mach. Learn., 8(3-4): 279-292, may 1992. ISSN 0885-6125. doi: 10.1007/BF00992698. URL https://doi.org/10.1007/BF00992698.
256
+ Mehdi Zadem, Sergio Mover, and Sao Mai Nguyen. Goal space abstraction in hierarchical reinforcement learning via set-based reachability analysis. In ICDL, pp. 423-428. IEEE, 2023.
257
+ Mehdi Zadem, Sergio Mover, and Sao Mai Nguyen. STAR code from: Reconciling Spatial and Temporal Abstractions for Goal Representation, March 2024. URL https://doi.org/10.5281/zenodo.10814795.
258
+ Tianren Zhang, Shangqi Guo, Tian Tan, Xiaolin Hu, and Feng Chen. Adjacency constraint for efficient hierarchical reinforcement learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(4):4152-4166, 2023. doi: 10.1109/TPAMI.2022.3192418.
259
+
260
+ # A PROOFS OF THEOREMS
261
+
262
+ # A.1 PROOF OF THEOREM 1:
263
+
264
+ In this part of the proof, we will study the optimality of the hierarchical policies across the last $k$ steps of the trajectory. First, we consider the optimal trajectory for a flat (non-hierarchical policy) in the environment described by $M$ :
265
+
266
+ $$
267
+ \mathcal {T} ^ {*} := \left\{s _ {0}, s _ {1}, \dots , s _ {M} \right\}, \text {w h e r e} s _ {M} = g ^ {*}
268
+ $$
269
+
270
+ The optimal hierarchical policy $\pi^{*}$ composed by $\pi_{\mathrm{High}}^{*}$ and $\pi_{\mathrm{Low}}^{*}$ samples a goal $g\in S$ every $k$ steps (where $k$ is a parameter). The following optimal trajectories are thus:
271
+
272
+ $$
273
+ \mathcal {T} _ {\text {H i g h}} ^ {*} := \left\{g _ {0}, g _ {1}, \dots , g _ {m} \right\}, \text {w h e r e} g _ {m} = g ^ {*}
274
+ $$
275
+
276
+ $$
277
+ \mathcal {T} _ {\text {L o w}} ^ {*} := \left\{s _ {0}, s _ {1}, \dots , s _ {m k} \right\}, \text {w h e r e} s _ {n \cdot k} = g _ {n}, n \in [ 0, \dots , m ] \text {a n d} s _ {m k} = g ^ {*}
278
+ $$
279
+
280
+ The optimal hierarchical policy $\pi_{\mathcal{N}}^{*}$ under the abstraction $\mathcal{N}$ (defined by Def.3) yields the optimal trajectories:
281
+
282
+ $$
283
+ \mathcal {T} _ {\mathcal {N} _ {\text {H i g h}}} ^ {*} := \left\{\mathcal {N} \left(g _ {0}\right), \mathcal {N} \left(g _ {1}\right), \dots , \mathcal {N} \left(g _ {m}\right) \right\}
284
+ $$
285
+
286
+ $$
287
+ \mathcal {T} _ {\mathcal {N} _ {\text {L o w}}} ^ {*} := \left\{s _ {0} ^ {\prime}, s _ {1} ^ {\prime}, \dots , s _ {m k} ^ {\prime} \right\}, \text {w h e r e} s _ {n \cdot k} ^ {\prime} \in \mathcal {N} (g _ {n}), n \in [ 0, \dots , m ] \text {a n d} s _ {m k} ^ {\prime} \in \mathcal {N} (g _ {m})
288
+ $$
289
+
290
+ We make the distinction between $s$ and $s'$ since $\pi_{\mathrm{Low}}^*$ and $\pi_{\mathcal{N}_{\mathrm{Low}}}^*$ do not necessarily follow the same trajectory. Whereas $\pi_{\mathrm{Low}}^*$ is conditioned by goals that act as points in the state space, $\pi_{\mathcal{N}_{\mathrm{Low}}}^*$ is conditioned by a whole set of points. Moving forward, we specify the following rewards functions for the hierarchical policies learning without abstraction and with the abstraction $\mathcal{N}$ :
291
+
292
+ $$
293
+ \text {F o r} \pi^ {*}, r _ {\text {H i g h}} (s, g ^ {*}) = r _ {\text {e x t}} (s) = - \| g ^ {*} - s \| _ {2} \text {a n d} r _ {\text {L o w}} (s, g) = - \| g - s \| _ {2}
294
+ $$
295
+
296
+ For $\pi_{\mathcal{N}}^{*}, r_{\mathcal{N}_{\mathrm{High}}}(s, g^{*}) = \max_{x \in \mathcal{N}(s)} r_{\mathrm{ext}}(x, g^{*}) = \max_{x \in \mathcal{N}(s)} - \|g^{*} - x\|_{2}$ and $r_{\mathcal{N}_{\mathrm{Low}}}(s, \mathcal{N}(g)) = \mathbb{1}_{x \in \mathcal{N}(g)}(s)$ .
297
+
298
+ Intuitively, $r_{\mathcal{N}_{\mathrm{High}}}(s)$ is computed over the closest point to $g^{*}$ in $\mathcal{N}(s)$ . $r_{\mathcal{N}_{\mathrm{Low}}}(s,\mathcal{N}(g))$ is a binary reward that expresses if the agent reaches its abstract goal. This reward is chosen in this proof for its generality; it simply expresses that the agent should reach $\mathcal{N}(g)$ . In practice it is sparse and difficult to optimise (it is replaced in STAR by the negative distance to the center of $\mathcal{N}(g)$ ).
299
+
300
+ A suboptimality bound will be derived for the last $k$ steps of the trajectory, and by induction will be proven for the rest. Given criteria.4:
301
+
302
+ $$
303
+ \forall s \in \mathcal {N} (g _ {m}). | r _ {\text {e x t}} (g _ {m}) - r _ {\text {e x t}} (s) | \leq \epsilon
304
+ $$
305
+
306
+ we can claim that:
307
+
308
+ $$
309
+ \left| V _ {\pi_ {\text {L o w}} ^ {*}} \left(s _ {m k}\right) - V _ {\pi_ {\mathcal {N} _ {\text {L o w}}} ^ {*}} \left(s _ {m k} ^ {\prime}\right) \right| \leq \epsilon
310
+ $$
311
+
312
+ To derive the upper bound on suboptimality, we will proceed by computing $V_{\pi_{\mathcal{N}_{\mathrm{Low}}}^*}$ on the worst possible optimal trajectory $\mathcal{T}_{\mathcal{N}_{\mathrm{Low}}}^*$ . This gives:
313
+
314
+ $$
315
+ \begin{array}{l} | V _ {\pi_ {\mathrm {L o w}} ^ {*}} (s _ {m k - 1}) - V _ {\pi_ {\mathcal {N} _ {\mathrm {L o w}}} ^ {*}} (s _ {m k - 1} ^ {\prime}) | = | r _ {e x t} (s _ {m k - 1}) + \gamma r _ {e x t} (s _ {m k}) - r _ {e x t} (s _ {m k - 1} ^ {\prime}) - \gamma r _ {e x t} (s _ {m k} ^ {\prime}) | \\ \leq \left| r _ {e x t} \left(s _ {m k - 1}\right) - r _ {e x t} \left(s _ {m k - 1} ^ {\prime}\right) \right| + \gamma \left| r _ {e x t} \left(s _ {m k}\right) - r _ {e x t} \left(s _ {m k} ^ {\prime}\right) \right| \\ \end{array}
316
+ $$
317
+
318
+ By triangle inequality.
319
+
320
+ The second term in the inequality corresponds exactly to $\gamma |V_{\pi_{\mathrm{Low}}^*}(s_{mk}) - V_{\pi_{\mathcal{N}_{\mathrm{Low}}}^*}(s_{mk}')|$ which is bounded by $\gamma \epsilon$ . The first term can be expanded as such:
321
+
322
+ $$
323
+ \begin{array}{l} \left| r _ {e x t} \left(s _ {m k - 1}\right) - r _ {e x t} \left(s _ {m k - 1} ^ {\prime}\right) \right| = r _ {e x t} \left(s _ {m k - 1}\right) - r _ {e x t} \left(s _ {m k - 1} ^ {\prime}\right) (\text {s i n c e} r _ {e x t} \left(s _ {m k - 1}\right) \geq r _ {e x t} \left(s _ {m k - 1} ^ {\prime}\right)) \\ = - \left\| g ^ {*} - s _ {m k - 1} \right\| _ {2} + \left\| g ^ {*} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \\ \leq - \left\| g ^ {*} - s _ {m k - 1} \right\| _ {2} + \left\| g ^ {*} - s _ {m k - 1} \right\| _ {2} + \left\| s _ {m k - 1} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \\ \leq \left\| s _ {m k - 1} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \\ \end{array}
324
+ $$
325
+
326
+ Since the abstraction guarantees that starting from $\mathcal{N}(g_{m-1})$ , a state $s' \in \mathcal{N}(g_m)$ is reached with $\pi_{\mathcal{N}_{\mathrm{Low}}}^*$ in $k$ steps, then the state $s_{mk}'$ should at the worst, be reachable in one step from $s_{mk-1}'$ . In addition, the state $s_{mk-1}'$ should at the worst be reachable from $s_{(m-1)k}'$ in $k-1$ steps.
327
+
328
+ In other words, the worst state $s_{mk-1}'$ is the farthest state from $g_m$ that reaches $s_{mk}'$ in 1 step and is reached by $s_{(m-1)k}'$ in $k-1$ steps. We will bound $\| s_{mk-1} - s_{mk-1}' \|_2$ using the two reachability relations.
329
+
330
+ On one hand, since $s_{mk-1}$ also reaches $g_m = g^*$ in 1 step then $\| g_{mk} - s_{mk-1} \|_2 \leq R_{max}$ . Then:
331
+
332
+ $$
333
+ \begin{array}{l} \left\| s _ {m k - 1} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \leq \left\| s _ {m k - 1} - g _ {m} \right\| _ {2} + \left\| g _ {m} - s _ {m k} ^ {\prime} \right\| _ {2} + \left\| s _ {m k} ^ {\prime} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \\ \leq 2 R _ {m a x} + \epsilon \\ \end{array}
334
+ $$
335
+
336
+ On the other hand, $g_{m-1} = s_{(m-1)k}$ reaches $s_{mk-1}$ in $k-1$ steps, and then $\| g_{m-1} - s_{mk-1} \|_2 \leq (k-1)R_{max}$ . Similarly, we could have:
337
+
338
+ $$
339
+ \begin{array}{l} \left\| s _ {m k - 1} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \leq \left\| s _ {m k - 1} - g _ {m - 1} \right\| _ {2} + \left\| g _ {m - 1} - s _ {(m - 1) k} ^ {\prime} \right\| _ {2} + \left\| s _ {(m - 1) k} ^ {\prime} - s _ {m k - 1} ^ {\prime} \right\| _ {2} \\ \leq 2 (k - 1) R _ {m a x} + \left\| g _ {m - 1} - s _ {(m - 1) k} ^ {\prime} \right\| _ {2} \\ \end{array}
340
+ $$
341
+
342
+ This results in two distinct bounds for $\| s_{mk-1} - s_{mk-1}' \|_2$ origination from a forward reachability relation, and a backwards reachability relation. This provides the following bound:
343
+
344
+ $$
345
+ \left| V _ {\pi_ {\mathrm {L o w}} ^ {*}} (s _ {m k - 1}) - V _ {\pi_ {\mathcal {N} _ {\mathrm {L o w}}} ^ {*}} (s _ {m k - 1} ^ {\prime}) \right| \leq \min (2 R _ {m a x} + \epsilon , 2 (k - 1) R _ {m a x} + \| g _ {m - 1} - s _ {(m - 1) k} ^ {\prime} \| _ {2}) + \gamma \epsilon
346
+ $$
347
+
348
+ Bounding $\| g_{m-1} - s_{(m-1)k}' \|_2$ depends on the nature of the abstraction, and more specifically if the abstract sets can be bounded or not. Starting from the more general case, Def.3 guarantees that $s_{(m-1)k}'$ is reachable from $s_0'$ in $m.(k-1)$ steps. To simplify the computation, can also assume that $\| s_0 - s_0' \|_2 \leq \epsilon$ . (In practice, usually $s_0 = s_0'$ ). Also, $s_{(m-1)k}$ is reachable from $s_0$ in $m.(k-1)$ steps. Thus:
349
+
350
+ $$
351
+ \begin{array}{l} \left\| g _ {m - 1} - s _ {(m - 1) k} ^ {\prime} \right\| _ {2} = \left\| g _ {m - 1} - s _ {0} + s _ {0} - s _ {0} ^ {\prime} + s _ {0} ^ {\prime} - s _ {(m - 1) k} ^ {\prime} \right\| _ {2} \\ \leq 2 k (m - 1) R _ {m a x} + \epsilon \\ \end{array}
352
+ $$
353
+
354
+ Then:
355
+
356
+ $$
357
+ \begin{array}{l} \left| V _ {\pi_ {\mathrm {L o w}} ^ {*}} (s _ {m k - 1}) - V _ {\pi_ {\mathcal {N} _ {\mathrm {L o w}}} ^ {*}} (s _ {m k - 1} ^ {\prime}) \right| \leq \min (2 R _ {m a x} + \epsilon , 2 (m k - 1) R _ {m a x} + \epsilon) + \gamma \epsilon \\ \leq 2 \min (1, (m k - 1)) R _ {m a x} + (\gamma + 1) \epsilon \\ \leq 2 R _ {m a x} + (\gamma + 1) \epsilon \\ \end{array}
358
+ $$
359
+
360
+ With an iteration process the above reasoning can be extended: $\forall i\in \{0,\dots ,mk\}$
361
+
362
+ $$
363
+ \begin{array}{l} \left| r _ {e x t} \left(s _ {i}\right) - r _ {e x t} \left(s _ {i} ^ {\prime}\right) \right| = r _ {e x t} \left(s _ {i}\right) - r _ {e x t} \left(s _ {i} ^ {\prime}\right) (\text {s i n c e} r _ {e x t} \left(s _ {i}\right) \geq r _ {e x t} \left(s _ {i} ^ {\prime}\right)) \\ = - \left\| g ^ {*} - s _ {i} \right\| _ {2} + \left\| g ^ {*} - s _ {i} ^ {\prime} \right\| _ {2} \\ \leq - \left\| g ^ {*} - s _ {i} \right\| _ {2} + \left\| g ^ {*} - s _ {i} \right\| _ {2} + \left\| s _ {i} - s _ {i} ^ {\prime} \right\| _ {2} \\ \leq \left\| s _ {i} - s _ {i} ^ {\prime} \right\| _ {2} \\ \leq \min (2 (m k - i) R _ {m a x} + \epsilon , 2 i R _ {m a x} + \epsilon) \\ \leq 2 \min (m k - i, i) R _ {m a x} + \epsilon \\ \end{array}
364
+ $$
365
+
366
+ with $\min (mk - i,i) = i$ if $i\leq \frac{mk}{2}$ else $\min (mk - i,i) = mk - i$
367
+
368
+ Finally the bound can be computed as:
369
+
370
+ $$
371
+ \begin{array}{l} \left| V _ {\pi_ {\text {L o w}} ^ {*}} \left(s _ {0}\right) - V _ {\pi_ {\mathcal {N} _ {\text {L o w}}} ^ {*}} \left(s _ {0} ^ {\prime}\right) \right| = \sum_ {i = 0} ^ {m k} \gamma^ {i} \left(r _ {e x t} \left(s _ {i}\right) - r _ {e x t} \left(s _ {i} ^ {\prime}\right)\right) \\ \leq \sum_ {i = 0} ^ {m k} \gamma^ {i} \| s _ {i} - s _ {i} ^ {\prime} \| _ {2} \\ \leq \sum_ {i = 0} ^ {m k} \gamma^ {i} (2 \min (m k - i, i) R _ {\max } + \epsilon) \\ \leq \sum_ {i = 0} ^ {\frac {m k}{2}} \gamma^ {i} (2 i R _ {m a x} + \epsilon) + \sum_ {i = \frac {m k}{2}} ^ {m k} \gamma^ {i} (2 (m k - i) R _ {m a x} + \epsilon) \\ \leq \sum_ {i = 0} ^ {\frac {m k}{2}} \gamma^ {i} (2 i R _ {m a x}) + \sum_ {i = \frac {m k}{2}} ^ {m k} \gamma^ {i} (2 (m k - i) R _ {m a x}) + \frac {1 - \gamma^ {m k + 1}}{1 - \gamma} \epsilon \\ \leq \left(\sum_ {i = 0} ^ {\frac {m k}{2}} \gamma^ {i} i + \sum_ {i = \frac {m k}{2}} ^ {m k} \gamma^ {i} (m k - i)\right) 2 R _ {m a x} + \frac {1 - \gamma^ {m k + 1}}{1 - \gamma} \epsilon \\ \end{array}
372
+ $$
373
+
374
+ We will now examine the case if $\exists B\geq \epsilon >0$ such that $\forall i\in \{1,\ldots ,m\} ,\max_{x,y\in \mathcal{N}(g_i)}\| x - y\| \leq B$ . Following the reasoning established before, we can claim that:
375
+
376
+ $$
377
+ \begin{array}{l} \left| r _ {e x t} \left(s _ {i}\right) - r _ {e x t} \left(s _ {i} ^ {\prime}\right) \right| \leq \left\| s _ {i} - s _ {i} ^ {\prime} \right\| _ {2} \\ \leq \min (2 i R _ {\max } + B, 2 (k - i) R _ {\max } + B) \\ \leq 2 \left(\frac {k}{2} R _ {\text {m a x}}\right) + B \\ \leq k R _ {\max } + B \\ \end{array}
378
+ $$
379
+
380
+ Ultimately,
381
+
382
+ $$
383
+ \begin{array}{l} \left| V _ {\pi_ {\mathrm {L o w}} ^ {*}} \left(s _ {0}\right) - V _ {\pi_ {\mathcal {N} _ {\mathrm {L o w}}} ^ {*}} \left(s _ {0} ^ {\prime}\right) \right| = \sum_ {i = 0} ^ {m k} \gamma^ {i} \left(r _ {e x t} \left(s _ {i}\right) - r _ {e x t} \left(s _ {i} ^ {\prime}\right)\right) \\ \leq \frac {1 - \gamma^ {m k + 1}}{1 - \gamma} (k R _ {m a x} + B) \\ \end{array}
384
+ $$
385
+
386
+ # A.2 PROOF OF LEMMA 1 AND THEOREM 2:
387
+
388
+ By definition of $\mathcal{N}'$ , since $G_i \in \mathcal{T}_{\mathcal{N}_{\mathrm{High}}}^*$ then $\exists g_i \in G_i$ (since the reward for the high-level agent is $r_{\mathcal{N}_{\mathrm{High}}}(G_i) = \max_{s \in G_i} r_{ext}(s)$ ) such that $g_i$ reaches a state in $\mathcal{N}_{i+1}$ : To prove this we can first consider the coarsest abstraction $\mathcal{N}: S \to \mathcal{G}_{\mathcal{N}} \subseteq 2^S$ s.t. $\mathcal{G}_{\mathcal{N}} = \{G_0, G_1\}$ with $G_1 = \mathcal{N}(g_m)$ (assumed to satisfy criteria 1 and 4) and $G_0 = \mathcal{N}(g_0) = \dots = \mathcal{N}(g_{m-1})$ . In this case, the goal in question $g_i$ is in $\mathcal{N}(g_{m-1})$ and by definition reaches $g_m \in G_1$ . This corresponds to $g_{m-1}$ . Thus, the process of refinement splits $G_0$ such as $G_0 = G' \cup G''$ , $G' \cap G'' = \emptyset$ and identifies $G'$ such that $g_{m-1} \in G'$ (since $G'$ satisfies the reachability property for $(G', G_{i+1})$ ) and $G'' = \mathcal{N}'(g_0) = \dots = \mathcal{N}'(g_{m-2})$ . Additionally, $G', G''$ and $G_1$ are disjoint by definition of the refinement.
389
+
390
+ By induction, the lemma is proven. The induction also leads to a reachability-aware abstraction proving theorem 2.
391
+
392
+ # B REPRESENTATION ANALYSIS IN ANT FALL
393
+
394
+ Similarly to the study established in 5.3, we provide the results obtained in Ant Fall (visualizing the 5 dimensional representation for Ant Maze Cam is less feasible).
395
+
396
+ ![](images/78a94f85163dd3c9554162623248c687d3f2788739b9598b52e6a3582b5748d2.jpg)
397
+ 1M Timesteps
398
+
399
+ ![](images/6a52b74da870326b6ffc483af14882210e3223a6bdd947c73a387d7160e58752.jpg)
400
+ 2M Timesteps
401
+ Figure 5: Frequency of goals visited by the Commander when evaluating a policy learned after 1M, 2M, and 3M timesteps (averaged over 5 different evaluations with 500 maximum timesteps). The subdivision of the mazes represent (abstract) goals. The color gradient represents the frequency of visits of each goal. Grey areas correspond to the platforms of the environment in Ant Fall. The red box is the movable block. Observe that, around 3M timesteps, goals are further split across the $z$ -axis above the pit.
402
+
403
+ ![](images/304b7c63ad358288980aba6537d189c83cf59fcc647c3b3640eac9774031423c.jpg)
404
+ 3M Timesteps
405
+
406
+ Fig.5 shows that after 1M steps the ant gradually learns to approach the area nearing the movable block (colored in yellow in the figure). Around 2M steps, the ant starts succeeding at crossing the pit by pushing the block forward. By 3M steps, the Commander has refined the abstraction and identified as goal the bridge-like region (immediately at the back of the movable block) that it targets most frequently to maximise its success to cross the chasm.
407
+
408
+ This representation further validates our hypothesis regarding the ability the reachability-aware abstraction to identify areas of interest in the environment and orient the learning of the agent towards optimal behaviour.
409
+
410
+ # C ADDRESSING NON-STATIONARITY
411
+
412
+ Since STAR is a 3-level HRL algorithm, non-stationarity can affect the learning of the Tutor as well as the Commander.
413
+
414
+ To solve this problem in the Tutor, we incorporate the policy correction approach from Nachum et al. (2018) which adequately relabels subgoals in the replay buffer that are unadapted to the current policy of the agent.
415
+
416
+ Additionally, we address non-stationarity in the Commander level by only refining the abstraction when the controller's policy is stable. Precisely, reachability analysis for $(G_i, G_j)$ is only engaged when the controller's policy $\pi_{\mathcal{N}_{\mathrm{Low}}}(s \in G_i, G_j)$ has roughly converged to a deterministic behaviour and is not randomly taking actions. Since the forward model is trained on data generated by $\pi_{\mathcal{N}_{\mathrm{Low}}}$ , it could be used as a proxy for assessing behaviour stability. Every time the transition $(G_i, G_j)$ is explored, the error $error(\mathcal{F}_k(s \in G_i, G_j))$ is evaluated and stored. Finally, we infer the stability of learned policies from the progress of the error in the forward model during a window of time; if the last 10 evaluated errors satisfy $error(\mathcal{F}_k(s \in G_i, G_j)) < \sigma$ then the policy is considered stable and reachability analysis is conducted.
417
+
418
+ # D COMMANDER POLICY LEARNING
419
+
420
+ # D.1 POLICY TRAINING
421
+
422
+ The Commander's policy mainly uses Q-learning (Watkins & Dayan, 1992) to learn a policy $\pi_{\mathrm{Comm}}$ for goal sampling. This choice is adapted to the discrete and small nature of the problem that the Commander is expected to solve. More precisely, both the state and action spaces of the Commander correspond to $\mathcal{G}$ since the Commander is in a state $G_{t}$ and has to select a next partition $G_{t + k}$ to target. Additionally, we use the learned reachability relations to orient the exploration of the agent towards reachable goals. This is done by restricting the exploration to sample reachable goals when
423
+
424
+ possible. Formally, at a goal $G_{i}$ , the Q-values are computed only goals $G_{j}$ that $G_{i}$ is known to reach (following reachability analysis).
425
+
426
+ # D.2 HANDLING A GROWING STATE SPACE
427
+
428
+ Following a refinement of the goal space $\mathcal{G}$ , a new goal space $\mathcal{G}'$ is formed such that $|\mathcal{G}'| > |\mathcal{G}|$ . To handle a growing state space, the Commander transfer the Q-table computed on the state space $\mathcal{G}$ to the new state space $\mathcal{G}'$ . Assuming that $G_{i}$ is the goal that was refined in $\mathcal{G}$ , then $G_{i_1}'$ and $G_{i_2}'$ are the newly created goals with $G_{i_1}'$ reaching $G_{i+1}' = G_{i+1}$ . In that case, $Q(G_{i_1}', G_{i+1}') = \max_{G \in \mathcal{G}'} Q(G', G_{i+1}')$ and $Q(G_{i_2}', G_{i+1}') = \min_{G \in \mathcal{G}'} Q(G', G_{i+1}')$ . Additionally, $\forall G' \in \mathcal{G}$ , s.t $G' \neq G_{i_1}'$ and $G' \neq G_{i_2}'$ , $Q(G', G_{i_1}') = Q(G', G_{i_2}') = Q(G', G_i)$ (here $G = G'$ ). Inversely, $\forall G' \in \mathcal{G}$ , s.t $G' \neq G_{i+1}' = G_{i+1}$ , $Q(G_{i_1}', G') = Q(G_{i_2}', G') = Q(G_i, G')$ (here $G = G'$ ). In summary, the new Q-tables modify the Q-values between the refined goal and its target while preserving the rest of the values.
429
+
430
+ # D.3 INITIALISATION OF THE ABSTRACTION
431
+
432
+ The algorithm starts without an abstract goal. After initial exploration, and once the controller's policy is stable (see C for more details), we split $S$ into a set of visited states and a set of unvisited ones. Consequently the initial abstraction becomes $\mathcal{G} = G_0 \cup G_0^c$ , with $G_0$ the set of visited states and $G_0^c$ the complement of $G_0$ in $S$ , representing unvisited states. This resulting abstraction is still coarse (e.g., partitions the state once space over the $x$ and $y$ dimensions) and is mainly useful to identify an abstract state enclosing a neighborhood of the initial state.
433
+
434
+ # E ENVIRONMENT DETAILS
435
+
436
+ The implementation adapts the same environments (Ant Maze, Ant Fall) used in Nachum et al. (2018) with the addition of Ant Maze Cam. All of the environments use the Mujoco physics simulator (Todorov et al., 2012). In all the following setups, the training episode ends at max_timesteps = 500. The reward signal is dense and corresponds to the negative Euclidean distance to the goal $g^{*}$ scaled by a factor of 0.1. Success is achieved when this distance is less than a fixed threshold of 5.
437
+
438
+ 1. Ant Maze: The maze is composed of immovable blocks everywhere except in $(0,0)$ , $(8,0)$ , $(16,0)$ , $(16,8)$ , $(16,16)$ , $(8,16)$ , $(0,16)$ . The agent is initialized at position $(0,0)$ . At each episode, a target position is sampled uniformly from $g_x^* \sim [-4,20]$ , $g_y^* \sim [-4,20]$ . At evaluation time, the agent is only evaluated for a fixed exit at $(0,16)$ .
439
+ 2. Ant Fall: the agent is initialized on an elevated platform of height 4. Immovable blocks are placed everywhere except at $(-8,0)$ , $(0,0)$ , $(-8,8)$ , $(0,8)$ , $(-8,16)$ , $(0,16)$ , $(-8,24)$ , $(0,24)$ . A pit is within range $[-4,12] \times [12,20]$ . A movable block is placed at $(8,8)$ . The agent is initialized at position $(0,0,4.5)$ . At each episode, the target position is fixed to $(g_x^*, g_y^*, g_z^*) = (0,27,4.5)$ . The ant has to push the block into the pit and use it as a bridge to cross to the second platform. At evaluation time, the agent is only evaluated for a fixed exit at $(0,27,4.5)$ .
440
+ 3. Ant Maze Cam: This maze is similar to Ant Maze with the addition of a new block at (16, 8) effectively closing any passage to the top half of the maze. For the block to be removed, the ant needs to navigate to the area in the range $[16, 20] \times [0, 8]$ where a camera is placed. In the area, the orientation $ori(\theta_x, \theta_y, \theta_z)$ needs to be negative simulating an identification process by the camera. $ori(\theta_x, \theta_y, \theta_z)$ is a function that projects the orientation on the $xy$ plane.
441
+
442
+ # F THE REACHABILITY ANALYSIS
443
+
444
+ The reachability analysis in STAR closely follows the process detailed in Zadem et al. (2023). First, we approximate the k-step reachability relations between states with a neural network model: $\mathcal{F}_k$ . More precisely, $\mathcal{F}_k(s_t, G_j)$ predicts the state $s_{t+k}^{\prime}$ reached after k steps when starting from $s_t$ and targeting the abstract goal $G_j$ .
445
+
446
+ To generalise these approximations from state-wise relations to set-wise relations, we rely on off-the-shelf neural network reachability analysis techniques. Specifically, we use Ai2 (Gehr et al. (2018)) to compute the output of a neural network given a set of inputs. Consider the reachability analysis of a transition $(G_{i},G_{j})$ , Ai2 computes an over-approximation of the output set of the forward model; $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k (G_i,G_j) = \{s_{t + k}^\prime = \mathcal{F}_k(s_t,G_j),s_t\in G_i\}$ . This over-approximation is efficiently computed layer-by-layer in the neural network using operations on abstract domains. In practice, our abstract goals are represented as disjoint hyperrectangles since they are expressive in our applications and simple to analyse.
447
+
448
+ The algorithm checks if $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k (G_i,G_j)\subseteq G_j$ , i.e. the reached set of states is inside the abstract goal. If the inclusion is valid, then the reachability property is verified in $(G_{i},G_{j})$ and no splitting is required. Similarly, if $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^k (G_i,G_j)\cap G_j = \emptyset$ then the reachability property cannot be respected for any subset in $G_{i}$ and no refinement occurs. Otherwise, the algorithm splits the starting set $G_{i}$ in two subsets across a dimension of the hyperrectangle. Each split is recursively tested through reachability analysis and searched accordingly until a subset that respects reachability is found or a maximal splitting depth is reached.
449
+
450
+ Abstraction Refinement: As detailed in section F, an important step of our algorithm when conducting reachability analysis on transition $(G_{i}, G_{j})$ is to verify if $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^{k}(G_{i}, G_{j}) \subseteq G_{j}$ . In practice, since $\tilde{R}^k$ is an over-approximation, we can expect to have estimation errors in such a way that verifying the precise inclusion is very difficult. We rely on a heuristic that checks if $\frac{V(\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^{k}(G_{i}, G_{j}) \cap G_{j})}{V(G_{j})} \geq \tau_1$ , with $V()$ the volume of a hyperrectangle and $\tau_1$ a predefined threshold. This heuristic roughly translates to checking if most of the approximated reached states are indeed in the abstract goal. Similarly, to check if $\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^{k}(G_{i}, G_{j}) \cap G_{j} = \emptyset$ , we verify $\frac{V(\tilde{R}_{\pi_{\mathcal{N}_{\mathrm{Low}}}}^{k}(G_{i}, G_{j}) \cap G_{j})}{V(G_{j})} \leq \tau_2$ with $\tau_2$ a preset parameter. That is to say, we check that most of the abstract goal is not reached. Finally, we set a minimum volume ratio of a split compared to $G_{i}$ .
451
+
452
+ # G HYPERPARAMETERS
453
+
454
+ # G.1 TUTOR-CONTROLLER NETWORKS
455
+
456
+ The implementation of our algorithm is adapted from the work of Zhang et al. (2023). The Tutor and Controller use the same architecture and hyperparameters as HRAC (albeit with a different goal space). It should also be noted that the policy correction method introduced in HIRO, is similarly used in HRAC and STAR. Both the Tutor and Controller use TD3 (Fujimoto et al., 2018) for learning policies with the same architecture and hyperparameters as in Zhang et al. (2023). The hyperparameters for the Tutor and Controller networks are in table 1.
457
+
458
+ # G.2 THE COMMANDER TRAINING
459
+
460
+ The Commander uses an $\epsilon$ -greedy exploration policy with $\epsilon_0 = 0.99$ and $\epsilon_{min} = 0.01$ with a linear decay of a factor of 0.000001. The learning rate of the Commander is 0.01 for Ant Maze and Ant Maze Cam and 0.005 for Ant Fall. The Commander's experience is stored in a buffer of size 100000 (this buffer is used to train $\mathcal{F}_k$ ). The Commander's actions frequency is $k = 30$ .
461
+
462
+ # G.3 FORWARD MODEL
463
+
464
+ For the forward model we use a fully connected neural network with MSE loss. The network is of size (32, 32). We use the ADAM optimiser. This neural network is updated every episode for transitions $(G_i, G_j) \in \mathcal{E}$ if this transition has been sampled for a defined minimal number of Commander steps (to acquire sufficient data). Table.2 shows the hyperparameters of $\mathcal{F}_k$ .
465
+
466
+ # G.4 REACHABILITY ANLYSIS
467
+
468
+ Table.3 shows the hyperparameters of the reachability analysis.
469
+
470
+ <table><tr><td>Hyperparameters</td><td>Values</td><td>Ranges</td></tr><tr><td>Tutor (TD3)</td><td></td><td></td></tr><tr><td>Actor learning rate</td><td>0.0001</td><td></td></tr><tr><td>Critic learning rate</td><td>0.001</td><td></td></tr><tr><td>Replay buffer size</td><td>200000</td><td></td></tr><tr><td>Batch size</td><td>128</td><td></td></tr><tr><td>Soft update rate</td><td>0.005</td><td></td></tr><tr><td>Policy update frequency</td><td>1</td><td></td></tr><tr><td>γ</td><td>0.99</td><td></td></tr><tr><td>Tutor action frequency l</td><td>10</td><td></td></tr><tr><td>Reward scaling</td><td>0.1 for Ant Maze (and Cam) / 1.0 for Ant Fall</td><td>{0.1, 1.0}</td></tr><tr><td>Exploration strategy</td><td>Gaussian (σ = 1.0)</td><td>{1.0, 2.0}</td></tr><tr><td>Controller (TD3)</td><td></td><td></td></tr><tr><td>Actor learning rate</td><td>0.0001</td><td></td></tr><tr><td>Critic learning rate</td><td>0.001</td><td></td></tr><tr><td>Replay buffer size</td><td>200000</td><td></td></tr><tr><td>Batch size</td><td>128</td><td></td></tr><tr><td>Soft update rate</td><td>0.005</td><td></td></tr><tr><td>Policy update frequency</td><td>1</td><td></td></tr><tr><td>γ</td><td>0.95</td><td></td></tr><tr><td>Reward scaling</td><td>1.0</td><td></td></tr><tr><td>Exploration strategy</td><td>Gaussian (σ = 1.0)</td><td></td></tr></table>
471
+
472
+ Table 1: Hyperparameters for Tutor and Controller networks based on Zhang et al. (2023)
473
+
474
+ <table><tr><td>Hyperparameters</td><td>Values</td></tr><tr><td>Forward Model</td><td></td></tr><tr><td>learning rate</td><td>0.001</td></tr><tr><td>Buffer size</td><td>100000</td></tr><tr><td>Batch size</td><td>64</td></tr><tr><td>Commander steps for data-acquisition</td><td>5000 for Ant Maze and Cam/10000 for Ant Fall</td></tr><tr><td>Epochs</td><td>5</td></tr></table>
475
+
476
+ # H STAR'S PSEUDO-CODE
477
+
478
+ For reproducibility, the code for STAR along with the experimental data are published in Zadem et al. (2024).
479
+
480
+ Table 2: Hyperparameters for the forward model
481
+
482
+ <table><tr><td>Hyperparameters</td><td>Values</td></tr><tr><td colspan="2">Reachability Analysis</td></tr><tr><td>NN reachability analysis tool</td><td>Ai2 (Gehr et al., 2018)</td></tr><tr><td>τ1</td><td>0.7</td></tr><tr><td>τ2</td><td>0.01</td></tr><tr><td>Minimal volume ratio of a split</td><td>0.125</td></tr></table>
483
+
484
+ Table 3: Hyperparameters for reachability analysis
485
+
486
+ Algorithm 1 STAR
487
+ Input: Learning environment $E$
488
+ Output:Computes $\pi_{\mathrm{Comm}},\pi_{\mathrm{Tut}}$ and $\pi_{\mathrm{Cont}}$
489
+ 1: $\mathcal{D}_{\mathrm{Commander}}\gets \emptyset ,\mathcal{D}_{\mathrm{Tutor}}\gets \emptyset ,\mathcal{D}_{\mathrm{Controller}}\gets \emptyset ,\mathcal{G}\gets S$
490
+ 2: for $t\leq$ max_timesteps do
491
+ 3: $\mathcal{E}\gets \emptyset$
492
+ 4: $s_\mathrm{init}\gets$ initial state from $E,s_{t}\gets s_{\mathrm{init}}$
493
+ 5: $G_{s}\gets G\in \mathcal{G}$ such that $s_t\in G$
494
+ 6: $G_{d}\sim \pi_{\mathrm{Comm}}(G_{s},g^{*})$
495
+ 7: $g_{t}\sim \pi_{\mathrm{Tut}}(s_{t},G_{d})$
496
+ 8: while true do
497
+ 9: $\mathcal{E}\gets \mathcal{E}\cup \{(G_s,G_d)\}$
498
+ 10: $a_{t}\sim \pi_{\mathrm{Cont}}(s_{t},g_{t})$
499
+ 11: $(s_{t + 1},r_t^{\mathrm{ext}},$ done) $\leftarrow$ execute the action $a_{t}$ at $s_t$ in $E$
500
+ 12: $r_{\mathrm{Controller}} = -||g_t - s_t||_2$
501
+ 13: Update $\pi_{\mathrm{Cont}}$
502
+ 14: if not done then
503
+ 15: $s_t\gets s_{t + 1},t\gets t + 1$
504
+ 16: if $t\bmod l = 0$ then
505
+ 17: $r_{\mathrm{Commander}} = -||s_t - \mathrm{Center}(G_d)||_2$
506
+ 18: $\mathcal{D}_{\mathrm{Tutor}}\gets (s_{t - l},G_d,g_{t - l},s_t,r_{\mathrm{Tutor}},$ done)
507
+ 19: Update $\pi_{\mathrm{Tut}}$
508
+ 20: $g_{t}\sim \pi_{\mathrm{Tut}}(s_{t},G_{d})$
509
+ 21: if $t\bmod k = 0$ then
510
+ 22: $r_{\mathrm{Commander}} = -||s_t - g^* ||_2$
511
+ 23: Update $\mathcal{D}_{\mathrm{Commander}}\gets (s_{t - k},G_d,s_t,r_{\mathrm{Commander}},$ done)
512
+ 24: Update $\pi_{\mathrm{Comm}}$
513
+ 25: $G_{s}\gets G\in \mathcal{G}$ such that $s_t\in G$
514
+ 26: $G_{d}\sim \pi_{\mathrm{Comm}}(s_{t},g_{exit})$
515
+ 27: else
516
+ 28: Update $\mathcal{F}_k$ with the data from $\mathcal{D}_{\mathrm{Commander}}$
517
+ 29: $\mathcal{G}\gets \operatorname {Refine}(\mathcal{G},\mathcal{E},\mathcal{F}_k)$
518
+ 30: break the while loop and start a new episode
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c9110f1be0a88ea5cfd50f896c7cbe78188a87d811baeae9169ceb52c79a9ca
3
+ size 544654
2024/Reconciling Spatial and Temporal Abstractions for Goal Representation/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_content_list.json ADDED
@@ -0,0 +1,1782 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "RECURSIVE GENERALIZATION TRANSFORMER FOR IMAGE SUPER-RESOLUTION",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 171,
8
+ 99,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Zheng Chen $^{1}$ , Yulun Zhang $^{1*†}$ , Jinjin Gu $^{2,3}$ , Linghe Kong $^{1*}$ , Xiaokang Yang $^{1}$ $^{1}$ Shanghai Jiao Tong University, $^{2}$ Shanghai AI Laboratory, $^{3}$ The University of Sydney",
17
+ "bbox": [
18
+ 181,
19
+ 167,
20
+ 754,
21
+ 200
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 450,
31
+ 220,
32
+ 547,
33
+ 236
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Transformer architectures have exhibited remarkable performance in image superresolution (SR). Since the quadratic computational complexity of the self-attention (SA) in Transformer, existing methods tend to adopt SA in a local region to reduce overheads. However, the local design restricts the global context exploitation, which is crucial for accurate image reconstruction. In this work, we propose the Recursive Generalization Transformer (RGT) for image SR, which can capture global spatial information and is suitable for high-resolution images. Specifically, we propose the recursive-generalization self-attention (RG-SA). It recursively aggregates input features into representative feature maps, and then utilizes cross-attention to extract global information. Meanwhile, the channel dimensions of attention matrices (query, key, and value) are further scaled to mitigate the redundancy in the channel domain. Furthermore, we combine the RG-SA with local self-attention to enhance the exploitation of the global context, and propose the hybrid adaptive integration (HAI) for module integration. The HAI allows the direct and effective fusion between features at different levels (local or global). Extensive experiments demonstrate that our RGT outperforms recent state-of-the-art methods quantitatively and qualitatively. Code and pre-trained models are available at https://github.com/zhengchen1999/RGT.",
40
+ "bbox": [
41
+ 228,
42
+ 244,
43
+ 767,
44
+ 496
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 171,
54
+ 513,
55
+ 336,
56
+ 529
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Image super-resolution (SR) aims to recover a high-resolution (HR) images from its low-resolution (LR) counterpart. Image SR is an ill-posed problem, as there are multiple solutions that can map to any given LR input. To tackle this challenging inverse problem, researchers have proposed numerous deep convolutional neural networks (CNNs) (Dong et al., 2014; Lim et al., 2017; Zhang et al., 2018b; Mei et al., 2020) in the past few years. Thanks to their impressive performance against conventional approaches, CNNs have almost dominated the field of SR.",
63
+ "bbox": [
64
+ 169,
65
+ 539,
66
+ 823,
67
+ 625
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "However, deep CNNs still suffer from a limitation in global context awareness, due to the local processing principle of the convolution operator. Recently, an alternative method, Transformer, has exhibited considerable performance compared with CNN-based methods on multiple high-level computer vision tasks (Dosovitskiy et al., 2021; Liu et al., 2021; Wang et al., 2021; Chu et al., 2021; Yang et al., 2022). Transformer is first developed in the natural language processing (NLP) field, and its core component is the self-attention (SA) mechanism. This mechanism can directly model long-range dependencies by capturing the interaction between all input data. However, the computational complexity of the vanilla self-attention grows quadratically with image size, limiting its application in high-resolution scenarios, especially low-level vision tasks (e.g., image SR).",
74
+ "bbox": [
75
+ 169,
76
+ 628,
77
+ 826,
78
+ 755
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "To apply Transformer in image SR, several methods have been proposed to reduce the computational cost of self-attention. Some researchers apply local (window) self-attention, which divides the feature maps into sub-regions to limit the scope of self-attention. Meanwhile, they utilize the shift mechanism (Liang et al., 2021), overlapping windows (Chen et al., 2022b), or the cross-aggregation operation (Chen et al., 2022c), to enhance the interaction between windows. These methods achieve linear complexity with respect to image size and outperform previous CNN-based methods. However, compared with global attention, the local design needs to stack many blocks to establish global dependencies. Furthermore, some methods propose \"transposed\" self-attention (Zamir et al., 2022) that operates across the channel dimension instead of the spatial dimension. Although this method",
85
+ "bbox": [
86
+ 169,
87
+ 761,
88
+ 826,
89
+ 887
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "header",
95
+ "text": "Published as a conference paper at ICLR 2024",
96
+ "bbox": [
97
+ 171,
98
+ 32,
99
+ 478,
100
+ 47
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "page_footnote",
106
+ "text": "*Corresponding authors: Yulun Zhang, yulun100@gmail.com; Linghe Kong, linghe.kong@sjtu.edu.cn.",
107
+ "bbox": [
108
+ 189,
109
+ 896,
110
+ 800,
111
+ 910
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "page_footnote",
117
+ "text": "†The work was mainly done when Yulun Zhang was at ETH Zürich.",
118
+ "bbox": [
119
+ 192,
120
+ 910,
121
+ 596,
122
+ 922
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "page_number",
128
+ "text": "1",
129
+ "bbox": [
130
+ 493,
131
+ 948,
132
+ 504,
133
+ 959
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "can implicitly capture global information, it hinders modeling spatial dependencies, which is crucial to image SR. Therefore, there is a need to develop a method for image SR that can effectively capture global spatial information with low computational cost on high-resolution images.",
140
+ "bbox": [
141
+ 169,
142
+ 103,
143
+ 823,
144
+ 147
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "In this paper, we propose the Recursive Generalization Transformer (RGT) for image SR, which can model global spatial information and is suitable for high-resolution images. Specifically, we propose the recursive-generalization self-attention (RG-SA) to explore global information directly in linear computational complexity. The RG-SA first generalizes the input features of arbitrary resolution into representative feature maps with a small, constant size, via the recursive generalization module (RGM). Intuitively, the global information is aggregated into representative maps. Then cross-attention is utilized between input features and representative maps to exchange global information. Since the size of representative maps is much smaller than input features, the whole process is at a low computational cost. Moreover, the RG-SA further adjusts the channel dimension of query, key, and value matrices in SA to mitigate the redundancy in the channel domain.",
151
+ "bbox": [
152
+ 169,
153
+ 152,
154
+ 826,
155
+ 294
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "Furthermore, considering that the RG-SA aggregates the image features via the RGM, it is inevitable to lose some local details. Thus, we combine the RG-SA with the local self-attention (L-SA) in an alternate arrangement to better utilize the global context. To enhance the integration of two different SA modules, we propose the hybrid adaptive integration (HAI), which acts on the outside of each Transformer block. The HAI directly fuses features at different levels (local or global) before and after the block. Besides, HAI adaptively adjusts the input features through a learnable adaptor for feature alignment. Overall, equipped with the above designs, our RGT can capture global information for accurate image SR while the complexity is manageable.",
162
+ "bbox": [
163
+ 169,
164
+ 297,
165
+ 826,
166
+ 412
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "Our contributions can be summarized as follows:",
173
+ "bbox": [
174
+ 171,
175
+ 417,
176
+ 496,
177
+ 431
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "list",
183
+ "sub_type": "text",
184
+ "list_items": [
185
+ "- We propose the Recursive Generalization Transformer (RGT) for image SR. The RGT is capable of capturing global spatial information and is suitable for high-resolution images. Our RGT obtains notable SR performance quantitatively and visually.",
186
+ "- We propose the recursive-generalization self-attention (RG-SA), utilizing the recursive aggregation module and cross-attention to model global dependency with linear complexity.",
187
+ "- We further combine RG-SA with local self-attention to better exploit the global context, and propose the hybrid adaptive integration (HAI) for module integration."
188
+ ],
189
+ "bbox": [
190
+ 215,
191
+ 441,
192
+ 823,
193
+ 550
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "2 RELATED WORK",
200
+ "text_level": 1,
201
+ "bbox": [
202
+ 171,
203
+ 569,
204
+ 346,
205
+ 585
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "Image Super-Resolution. In recent years, CNN-based methods have shown superior performance over conventional SR approaches. SRCNN (Dong et al., 2014) is the pioneering work, that introduces three convolutional layers for image SR. Following this attempt, many works deepen the architecture to improve performance (Zhang et al., 2019; Magid et al., 2021; Dai et al., 2019). VDSR (Kim et al., 2016) introduces residual learning to build a network with 20 layers. EDSR (Lim et al., 2017) further simplifies residual block, which allows deeper networks. RCAN (Zhang et al., 2018a) proposes a residual-in-residual structure to train a model over 400 layers. Moreover, numerous spatial and channel attention mechanisms (Zhang et al., 2019; Liu et al., 2020; Zhou et al., 2020) are proposed to improve the reconstruction quality. For instance, HAN (Niu et al., 2020) proposes a layer attention module and channel-spatial attention. Although these CNN-based methods produce remarkable results, they still suffer from a limitation in global modeling capability.",
212
+ "bbox": [
213
+ 169,
214
+ 597,
215
+ 826,
216
+ 752
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "Vision Transformer. Transformer is proposed in natural language processing (NLP) and has been adapted to multiple high-level vision tasks, such as image classification (Dosovitskiy et al., 2021; Liu et al., 2021; Dong et al., 2022), semantic segmentation (Xie et al., 2021), and object detection (Yang et al., 2022; Tu et al., 2022). Due to the impressive performance in high-level tasks, Transformer has also been introduced to low-level vision tasks (Liang et al., 2021; Zamir et al., 2022; Wang et al., 2022; Tsai et al., 2022; Chen et al., 2022c; 2023; Li et al., 2023), including image SR. SwinIR (Liang et al., 2021), following the design of Swin Transformer (Liu et al., 2021), utilizes local window self-attention and shift mechanism. ELAN (Zhang et al., 2022) proposes multi-scale self-attention to reduce the computational cost. CAT (Chen et al., 2022c) designs the rectangle-window self-attention to aggregate the features across different windows. These methods all reduce computational complexity by applying self-attention within local regions. However, the local designs restrict the exploitation of global information that is crucial to image SR.",
223
+ "bbox": [
224
+ 169,
225
+ 757,
226
+ 826,
227
+ 925
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "header",
233
+ "text": "Published as a conference paper at ICLR 2024",
234
+ "bbox": [
235
+ 171,
236
+ 32,
237
+ 478,
238
+ 47
239
+ ],
240
+ "page_idx": 1
241
+ },
242
+ {
243
+ "type": "page_number",
244
+ "text": "2",
245
+ "bbox": [
246
+ 493,
247
+ 946,
248
+ 504,
249
+ 959
250
+ ],
251
+ "page_idx": 1
252
+ },
253
+ {
254
+ "type": "image",
255
+ "img_path": "images/282b112db39429af4c1f5c61cae380facedc27333dc69ade3f7e91e3fd9e027a.jpg",
256
+ "image_caption": [
257
+ "Figure 1: The architecture of the Recursive Generalization Transformer (RGT). The local self-attention (L-SA) blocks, and recursive-generalization self-attention (RG-SA) blocks are alternately arranged. $\\alpha_{l}$ is a learnable adaptor in the hybrid adaptive integration (HAI) of the $l^{th}$ block."
258
+ ],
259
+ "image_footnote": [],
260
+ "bbox": [
261
+ 178,
262
+ 103,
263
+ 823,
264
+ 270
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "Global Attention. To reduce the computational complexity of vanilla self-attention, in addition to local design, several works attempt to propose global attention with low overheads (Wang et al., 2021; Tu et al., 2022; Yang et al., 2022; Chen et al., 2022a; Ali et al., 2021). PVT (Wang et al., 2021) designs a spatial-reduction module to merge tokens of key and value. MaxViT (Tu et al., 2022) proposes the grid attention to gain sparse global attention. ScalableViT (Yang et al., 2022) scales attention matrices from both spatial and channel dimensions. Although these methods reduce the computational complexity to a certain extent, the theoretical complexity remains quadratic, which hinders their effective application on high-resolution images. RegionViT Chen et al. (2022a) captures global information among regional tokens to alleviate the overhead of global attention. Moreover, XCiT (Ali et al., 2021) proposes a \"transposed\" version of self-attention that operates across channels dimension rather than the spatial dimension to achieve linear complexity. However, it cannot explicitly model the spatial relationship. In contrast, we propose the recursive-generalization self-attention (RG-SA), which can explore global spatial information in linear complexity.",
271
+ "bbox": [
272
+ 169,
273
+ 342,
274
+ 826,
275
+ 523
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "3 METHOD",
282
+ "text_level": 1,
283
+ "bbox": [
284
+ 171,
285
+ 541,
286
+ 284,
287
+ 556
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "We propose the Recursive Generalization Transformer (RGT) for image SR, which is capable of capturing global context and handling high-resolution images effectively. In this section, we first introduce the architecture of RGT. Then, we focus on our proposed recursive-generalization self-attention (RG-SA) and hybrid adaptive integration (HAI).",
294
+ "bbox": [
295
+ 169,
296
+ 569,
297
+ 823,
298
+ 628
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "3.1 OVERALL ARCHITECTURE",
305
+ "text_level": 1,
306
+ "bbox": [
307
+ 171,
308
+ 640,
309
+ 401,
310
+ 655
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "The overall architecture of our proposed RGT is illustrated in Fig. 1, consisting of three modules: shallow feature extraction, deep feature extraction, and image reconstruction. Given a low-resolution (LR) image $\\mathbf{I}_{LR} \\in \\mathbb{R}^{H \\times W \\times 3}$ , RGT first leverages a convolutional layer as the shallow feature extraction to get the low-level feature $\\mathbf{F}_0 \\in \\mathbb{R}^{H \\times W \\times C}$ , where $H$ , $W$ , and $C$ represent the image height, width, and channel number. $\\mathbf{F}_0$ is used for the deep feature extraction module, which is composed of $N_1$ residual groups (RGs) and a convolutional layer. Through this module, the $\\mathbf{F}_0$ is transformed into the deep feature $\\mathbf{F}_d \\in \\mathbb{R}^{H \\times W \\times C}$ . Finally, the $\\mathbf{F}_0$ and $\\mathbf{F}_d$ are fused through a residual connection, and processed by the reconstruction module to generate the high-resolution (HR) image $\\mathbf{I}_{HR} \\in \\mathbb{R}^{\\hat{H} \\times \\hat{W} \\times 3}$ , where $\\hat{H}$ and $\\hat{W}$ are the output height and width. The reconstruction module consists of pixel-shuffle (Shi et al., 2016) and convolutional layers.",
317
+ "bbox": [
318
+ 169,
319
+ 662,
320
+ 823,
321
+ 806
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "Each RG contains $N_{2}$ Transformer blocks and a convolutional layer. And the residual connection is employed to ensure training stability. As shown in Fig. 1, there are two types of Transformer blocks: Local Self-Attention (L-SA) blocks and RG-SA blocks. The two types of blocks are arranged alternately to organize the topological structure. Each Transformer block is composed of two layer normalization (LN), self-attention, and multilayer perceptron (MLP) (Vaswani et al., 2017). Meanwhile, the HAI acts outside each Transformer block with a learnable adaptor $\\alpha$ . In this work, we apply the recently proposed rectangle-window self-attention (Rwin-SA) (Chen et al., 2022c) as local self-attention by default. Next, we pay more attention to our proposed RG-SA and HAI.",
328
+ "bbox": [
329
+ 169,
330
+ 811,
331
+ 826,
332
+ 925
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "header",
338
+ "text": "Published as a conference paper at ICLR 2024",
339
+ "bbox": [
340
+ 173,
341
+ 32,
342
+ 478,
343
+ 47
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "page_number",
349
+ "text": "3",
350
+ "bbox": [
351
+ 493,
352
+ 948,
353
+ 503,
354
+ 959
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "image",
360
+ "img_path": "images/ce4ab6fc0b1496911a69a9f2be903e589cef983033bfd199854e35af7b365f76.jpg",
361
+ "image_caption": [
362
+ "Figure 2: The illustration of the recursive-generalization self-attention (RG-SA). The RG-SA first generates the representative feature maps with constant size $(h\\times w)$ , through the recursive generalization module (RGM). Then, the cross-attention between input features and representative maps is performed to capture global information. $\\otimes$ denotes matrix multiplication."
363
+ ],
364
+ "image_footnote": [],
365
+ "bbox": [
366
+ 176,
367
+ 99,
368
+ 823,
369
+ 233
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "3.2 RECURSIVE-GENERALIZATION SELF-ATTENTION",
376
+ "text_level": 1,
377
+ "bbox": [
378
+ 171,
379
+ 320,
380
+ 555,
381
+ 333
382
+ ],
383
+ "page_idx": 3
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "The vanilla self-attention (SA) mechanism establishes connections between all input tokens. Although it can capture global context, the SA suffers the quadratic computational complexity with image size, limiting its the application of SA in high-resolution scenarios, including image SR. To tackle this problem, we propose the recursive-generalization self-attention (RG-SA), shown in Fig. 2, that can maintain linear computational complexity while capturing global information.",
388
+ "bbox": [
389
+ 169,
390
+ 345,
391
+ 823,
392
+ 416
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "The RG-SA first aggregates input image features of arbitrary resolution into compressed maps (denoted as representative feature maps), through the recursive generalization module (RGM). Intuitively, the representative maps aggregate the information of the whole image features, providing a global view of the image. Then, the cross-attention is calculated between input features and representative maps. Therefore, each token in the input image features can obtain a global receptive field. Meanwhile, we further scale the channel dimension of query, key, and value matrices in attention to mitigate the channel redundancy. It improves the performance and reduces consumption.",
399
+ "bbox": [
400
+ 169,
401
+ 421,
402
+ 823,
403
+ 521
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "Recursive Generalization Module. For simplicity, our RGM only consists of depth-wise and pixelwise convolutions, shown in Fig. 2. Given an input $\\mathbf{X}_{in} \\in \\mathbb{R}^{H \\times W \\times C}$ , we first compress spatial size of the features by recursively reusing a single depth-wise convolution $T = \\left\\lfloor \\log_{s_r} \\frac{H}{h} \\right\\rfloor$ times to obtain the rough aggregation maps $\\hat{\\mathbf{X}} \\in \\mathbb{R}^{h \\times w \\times C}$ , where $s_r$ is the convolution stride size, $h$ is a constant, and $w = W \\times \\frac{h}{H}$ . Without loss of generality, we assume $W \\leq H$ , then $w \\leq h$ . Next, we refine the rough aggregation maps to generate the representative maps $\\mathbf{X}_r \\in \\mathbb{R}^{h \\times w \\times C_r}$ , through a $3 \\times 3$ depth-wise convolution and a $1 \\times 1$ point-wise convolution. The RGM is formulated as:",
410
+ "bbox": [
411
+ 169,
412
+ 526,
413
+ 826,
414
+ 630
415
+ ],
416
+ "page_idx": 3
417
+ },
418
+ {
419
+ "type": "equation",
420
+ "text": "\n$$\n\\hat {\\mathbf {X}} = \\mathbf {W} _ {r} ^ {K} \\left(\\mathbf {X} _ {i n}\\right) = \\mathbf {W} _ {r} \\left(\\mathbf {W} _ {r} \\left(\\dots \\left(\\mathbf {W} _ {r} \\left(\\mathbf {X} _ {i n}\\right)\\right)\\right)\\right), \\tag {1}\n$$\n",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 336,
424
+ 632,
425
+ 823,
426
+ 657
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "equation",
432
+ "text": "\n$$\n\\mathbf {X} _ {r} = \\mathbf {W} _ {p} \\mathbf {W} _ {d} (\\hat {\\mathbf {X}}),\n$$\n",
433
+ "text_format": "latex",
434
+ "bbox": [
435
+ 431,
436
+ 652,
437
+ 563,
438
+ 670
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "where $\\mathbf{W}_r$ is the depth-wise convolution with $s_r$ stride, $\\mathbf{W}_d$ is the $3\\times 3$ depth-wise convolution, and $\\mathbf{W}_p$ is the $1\\times 1$ point-wise convolution. Also, the $1\\times 1$ point-wise convolution scales the channels from $C$ to $C_r = C\\times c_r$ , where $c_{r}$ is the adjustment factor. Through RGM, we can aggregate the global information of the input image features. Meanwhile, the recursive design is flexible for processing inputs with varying sizes (common in image SR) by dynamically choosing the recursion times $T$ .",
445
+ "bbox": [
446
+ 169,
447
+ 671,
448
+ 823,
449
+ 742
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "Cross-Attention. Subsequently, we reshape and project the input features $\\mathbf{X}_{in}$ as the $\\mathbf{Q} \\in \\mathbb{R}^{HW \\times Cr}$ (query) and the representative maps as the $\\mathbf{K} \\in \\mathbb{R}^{hw \\times Cr}$ (key), and $\\mathbf{V} \\in \\mathbb{R}^{hw \\times C}$ (value) to compute the cross-attention. The attention matrix $\\mathbf{A} \\in \\mathbb{R}^{HW \\times hw}$ is calculated from the dot-product interaction of query and key. Note that we further scale the channel dimensions of query, key, and value. Overall, the whole cross-attention process is defined as:",
456
+ "bbox": [
457
+ 169,
458
+ 750,
459
+ 823,
460
+ 820
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "equation",
466
+ "text": "\n$$\n\\begin{array}{l} \\mathbf {Q} = \\mathbf {W} _ {Q} \\mathbf {X} _ {i n}, \\mathbf {K} = \\mathbf {W} _ {K} \\mathbf {X} _ {r}, \\mathbf {V} = \\mathbf {W} _ {V} \\mathbf {X} _ {r}, \\\\ \\mathbf {A} = \\operatorname {S o f t M a x} \\left(\\mathbf {Q} \\mathbf {K} ^ {T} / \\sqrt {C _ {r}}\\right), \\tag {2} \\\\ \\end{array}\n$$\n",
467
+ "text_format": "latex",
468
+ "bbox": [
469
+ 346,
470
+ 821,
471
+ 823,
472
+ 859
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "Cross-Attention $(\\mathbf{X}_{in},\\mathbf{X}_r) = \\mathbf{W}_m(\\mathbf{A}\\cdot \\mathbf{V}),$",
479
+ "bbox": [
480
+ 349,
481
+ 861,
482
+ 645,
483
+ 876
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "where $\\mathbf{W}_Q\\in \\mathbb{R}^{C\\times C_r}$ , $\\mathbf{W}_K\\in \\mathbb{R}^{C_r\\times C_r}$ , and $\\mathbf{W}_V\\in \\mathbb{R}^{C_r\\times C}$ are learnable parameters and biases are omitted for simplification; $\\mathbf{W}_m\\in \\mathbb{R}^{C\\times C}$ is the projection matrix for feature fusion. Similar to vanilla self-attention (Vaswani et al., 2017; Dosovitskiy et al., 2021), we divide the channels into",
490
+ "bbox": [
491
+ 169,
492
+ 878,
493
+ 825,
494
+ 924
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "header",
500
+ "text": "Published as a conference paper at ICLR 2024",
501
+ "bbox": [
502
+ 171,
503
+ 32,
504
+ 478,
505
+ 47
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "page_number",
511
+ "text": "4",
512
+ "bbox": [
513
+ 493,
514
+ 948,
515
+ 503,
516
+ 959
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "multiple \"heads\" and execute the attention operation in parallel. Finally, we reshape the result of cross-attention to obtain the output features $\\mathbf{X}_{out} \\in \\mathbb{R}^{H \\times W \\times C}$ . Through RGM, cross-attention, and channel adjustment, our RG-SA can capture global spatial information while maintaining low computational overheads. Next, we analyze the complexity of the RG-SA in detail.",
523
+ "bbox": [
524
+ 169,
525
+ 103,
526
+ 826,
527
+ 161
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Complexity Analysis. Our RG-SA can be divided into two components: RGM and cross-attention. For RGM, the computational complexity is $\\mathcal{O}(HWC)$ . For cross-attention, the computational complexity is $\\mathcal{O}(hwHW(C + C_r) + HWC(C + C_r) + hwC_r(C + C_r))$ . Here, we analyze the single-head self-attention for simplicity. Since $h$ and $w$ are constants, and $C_r = C \\times c_r$ , the complexity of cross-attention is $\\mathcal{O}(HWC^2)$ . In general, The total computational complexity of our RG-SA is linear with the input features size $(H \\times W)$ . Additionally, by applying the small $(< 1)$ adjustment factor $c_r$ , we can mitigate the channel redundancy, thus further reducing complexity.",
534
+ "bbox": [
535
+ 169,
536
+ 169,
537
+ 823,
538
+ 268
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "3.3 HYBRID ADAPTIVE INTEGRATION",
545
+ "text_level": 1,
546
+ "bbox": [
547
+ 171,
548
+ 282,
549
+ 452,
550
+ 296
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "Alternate Arrangement. In RG-SA, the global information is captured through the cross-attention between input features and representative maps, ensuring low computational overheads. However, the RGM in RG-SA is a coarse-grained design, which leads to losing some local details and ultimately limits modeling global information. To improve the exploitation of the global context, we introduce local self-attention (L-SA) and combine it with our proposed RG-SA. Two attention modules are alternately arranged in each residual group (RG), as illustrated in Fig. 1.",
557
+ "bbox": [
558
+ 169,
559
+ 304,
560
+ 823,
561
+ 388
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "Analysis and Motivation. Although the two blocks are integrated, the linear arrangement lacks direct interaction between features at different levels (global or local), thus still cannot exploit global information effectively. For further analysis, under the alternating topology, the input and output of each Transformer block are different level features. Specifically, the input of the RG-SA block is the local features generated from L-SA, while the output is the global features. Correspondingly, the input and output of L-SA are global and local features, respectively. This observation inspires us to enhance information fusion by combining the input and output features of each block.",
568
+ "bbox": [
569
+ 169,
570
+ 397,
571
+ 825,
572
+ 494
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "Specific Design. The intuitive idea is directly integrating the input and output features via the vanilla skip connection (He et al., 2016). Nevertheless, since the misalignment between global and local features, simple addition cannot fuse features effectively. To overcome the above issues, we propose hybrid adaptive integration (HAI). As shown in Fig. 1, our HAI acts on the outside of each Transformer block. The input features are adaptively adjusted by a learnable adaptor $\\alpha$ , and added to the output features. The process of the $l^{th}$ Transformer block $\\mathcal{B}^l$ equipped with HAI is:",
579
+ "bbox": [
580
+ 169,
581
+ 503,
582
+ 823,
583
+ 587
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "equation",
589
+ "text": "\n$$\nZ ^ {l} = \\mathcal {B} ^ {l} \\left(Z ^ {l - 1}\\right) + \\alpha_ {l} \\cdot Z ^ {l - 1}, \\tag {3}\n$$\n",
590
+ "text_format": "latex",
591
+ "bbox": [
592
+ 401,
593
+ 588,
594
+ 823,
595
+ 604
596
+ ],
597
+ "page_idx": 4
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "where $Z^{l-1}$ and $Z^l$ represent the input and the output of the $l^{th}$ Transformer block, $\\alpha_l \\in \\mathbb{R}^C$ is the learnable parameter in the $l^{th}$ block. Overall, the HAI is able to enhance the integration of different SA modules on the basis of the alternate arrangement, which advances the modeling of global information. Moreover, similar to the regular residual connection, our HIA encourages more information flows to the deep network layers, resulting in better performance.",
602
+ "bbox": [
603
+ 169,
604
+ 607,
605
+ 826,
606
+ 679
607
+ ],
608
+ "page_idx": 4
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "Visual Results. To intuitively show the effectiveness of HAI, we visualize the relevant features of one RG-SA block (first row, $2^{nd}$ block in $1^{st}$ RG) and one L-SA block (second row, $5^{td}$ block in $1^{st}$ RG) of RGT in Fig. 3. The deeper color indicates larger weights. First, by observing columns (a) and (b), we can find great differences in the input and output of SA modules in some cases. It reveals the misalignment between global and local features. Secondly, directly fused by the vanilla skip connection, the features are",
613
+ "bbox": [
614
+ 169,
615
+ 686,
616
+ 452,
617
+ 867
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "over-integrated (top of (c) column), or not changed obviously (bottom of (c) column). In contrast, through HAI, the features shown in column (d) are adaptively changed according to different blocks. It indicates that the input and output features are fused effectively. More discussions on the role of HAI and the value distribution of learnable adaptors $\\alpha$ are given in Sec. 4.2.",
624
+ "bbox": [
625
+ 169,
626
+ 868,
627
+ 826,
628
+ 925
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "image",
634
+ "img_path": "images/cf9079758accd804ec96490ce81fde06a3f7a70cf5a4c688fe5da20bcb6eed07.jpg",
635
+ "image_caption": [
636
+ "Figure 3: Visualization of the features in RGT. a) Block input. (b) Block output before connection. (c) Vanilla skip connection result: directly add input to output. (d) HAI result: adjust input with $\\alpha$ before adding to output. Please zoom in for a better visualization."
637
+ ],
638
+ "image_footnote": [],
639
+ "bbox": [
640
+ 464,
641
+ 689,
642
+ 823,
643
+ 784
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "header",
649
+ "text": "Published as a conference paper at ICLR 2024",
650
+ "bbox": [
651
+ 171,
652
+ 32,
653
+ 478,
654
+ 47
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "page_number",
660
+ "text": "5",
661
+ "bbox": [
662
+ 493,
663
+ 948,
664
+ 503,
665
+ 959
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "table",
671
+ "img_path": "images/6dee0ddf23eb384ba5d843bf8cbe9834e7e27cdc218f18cc60d383dec7968e58.jpg",
672
+ "table_caption": [],
673
+ "table_footnote": [],
674
+ "table_body": "<table><tr><td>L-SA</td><td>RG-SA</td><td>HAI</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>✓</td><td></td><td></td><td>10.69</td><td>229.42</td><td>33.43</td><td>0.9396</td></tr><tr><td>✓</td><td>✓</td><td></td><td>10.04</td><td>183.08</td><td>33.52</td><td>0.9405</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>10.05</td><td>183.08</td><td>33.68</td><td>0.9414</td></tr></table>",
675
+ "bbox": [
676
+ 183,
677
+ 113,
678
+ 480,
679
+ 164
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "table",
685
+ "img_path": "images/94fcc317dd7a421c7b61a2bb977a32c4ab1aaff8563161db84dfbd254acd65d2.jpg",
686
+ "table_caption": [
687
+ "(a) Break-down ablation on each component."
688
+ ],
689
+ "table_footnote": [],
690
+ "table_body": "<table><tr><td>Method</td><td>Vanilla Skip α</td><td>Params (M) FLOPs (G) PSNR (dB)</td><td>SSIM</td></tr><tr><td>w/o HAI</td><td></td><td>10.04</td><td>183.08</td></tr><tr><td>w/ Skip</td><td>✓</td><td>10.04</td><td>183.08</td></tr><tr><td>w/ HAI</td><td>✓</td><td>10.05</td><td>183.08</td></tr><tr><td></td><td></td><td></td><td>33.68</td></tr><tr><td></td><td></td><td></td><td>0.9414</td></tr></table>",
691
+ "bbox": [
692
+ 181,
693
+ 183,
694
+ 496,
695
+ 233
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "table",
701
+ "img_path": "images/a2ee158bade68b67c91ab51b9d5fe2099861cd2ca9c0d7d63c489e56643e612a.jpg",
702
+ "table_caption": [
703
+ "(c) Ablation study on HAI."
704
+ ],
705
+ "table_footnote": [],
706
+ "table_body": "<table><tr><td>Method</td><td>Recursion</td><td>Cr</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>w/o Recur</td><td></td><td>0.5</td><td>10.05</td><td>274.54</td><td>33.57</td><td>0.9412</td></tr><tr><td>w/o Scale</td><td>✓</td><td>1</td><td>11.37</td><td>189.62</td><td>33.54</td><td>0.9404</td></tr><tr><td>RGT-S</td><td>✓</td><td>0.5</td><td>10.05</td><td>183.08</td><td>33.68</td><td>0.9414</td></tr></table>",
707
+ "bbox": [
708
+ 496,
709
+ 114,
710
+ 821,
711
+ 164
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "table",
717
+ "img_path": "images/adc6a7fdce811ee4ba378df8b4c23daca51c65fa5b97d502bf42392ca01c6bd2.jpg",
718
+ "table_caption": [
719
+ "(b) Ablation study on RG-SA."
720
+ ],
721
+ "table_footnote": [],
722
+ "table_body": "<table><tr><td>Method</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>L-SA only</td><td>10.69</td><td>229.42</td><td>33.43</td><td>0.9396</td></tr><tr><td>L-SA w/ HAI</td><td>10.69</td><td>229.42</td><td>33.44</td><td>0.9400</td></tr></table>",
723
+ "bbox": [
724
+ 506,
725
+ 183,
726
+ 821,
727
+ 233
728
+ ],
729
+ "page_idx": 5
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "(d) Further ablation study on HAI.",
734
+ "bbox": [
735
+ 555,
736
+ 234,
737
+ 764,
738
+ 250
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "Table 1: Ablation studies. We train models on DIV2K and Flickr2K, and test on Urban100 $(\\times 2)$",
745
+ "bbox": [
746
+ 179,
747
+ 253,
748
+ 815,
749
+ 268
750
+ ],
751
+ "page_idx": 5
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "4 EXPERIMENTS",
756
+ "text_level": 1,
757
+ "bbox": [
758
+ 171,
759
+ 284,
760
+ 328,
761
+ 299
762
+ ],
763
+ "page_idx": 5
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "4.1 EXPERIMENTAL SETTINGS",
768
+ "text_level": 1,
769
+ "bbox": [
770
+ 171,
771
+ 315,
772
+ 401,
773
+ 329
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "Data and Evaluation. Following recent works (Zhang et al., 2021; Magid et al., 2021; Liang et al., 2021), we choose DIV2K (Timofte et al., 2017) and Flickr2K (Lim et al., 2017) as the training data. For testing, we use five standard benchmark datasets: Set5 (Bevilacqua et al., 2012), Set14 (Zeyde et al., 2010), B100 (Martin et al., 2001), Urban100 (Huang et al., 2015), and Manga109 (Matsui et al., 2017). We conduct experiments with three upscaling factors: $\\times 2$ , $\\times 3$ , and $\\times 4$ . The low-resolution images are generated by Bicubic (BI) downsampling. To evaluate our method, we use the metrics PSNR and SSIM (Wang et al., 2004) on the Y channel of the YCbCr space.",
780
+ "bbox": [
781
+ 169,
782
+ 339,
783
+ 823,
784
+ 436
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "Implementation Details. We set two version models, RGT-S and RGT, with different computational complexity. For RGT-S, we set the residual group (RG) number $N_{1}$ as 6 and the Transformer block number $N_{2}$ for each RG as 6 for L-SA. The channel dimension number, attention head number, and mlp expansion ratio (Dosovitskiy et al., 2021) are set as 180, 6, and 2, respectively. The window size is set as $8 \\times 32$ . The $s_{r}$ (stride size) and $c_{r}$ (adjustment factor) are set as 4 and 0.5 for RG-SA. The representative map size $h$ is set as 4 for training, and 16 for testing. For RGT, we increase the number of RG from 6 to 8, while other settings remain the same as RGT-S.",
791
+ "bbox": [
792
+ 169,
793
+ 443,
794
+ 823,
795
+ 541
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "Training Settings. We train our models with batch size 32, where each input image is randomly cropped to $64 \\times 64$ size, and the total training iterations are $500\\mathrm{K}$ . Training patches are augmented using random horizontal flips and rotations with $90^{\\circ}$ , $180^{\\circ}$ , and $270^{\\circ}$ . To keep fair comparisons, we adopt Adam optimizer (Kingma & Ba, 2015) with $\\beta_{1} = 0.9$ and $\\beta_{2} = 0.99$ to minimize the $L_{1}$ loss function following previous works (Zhang et al., 2018a; Dai et al., 2019; Liang et al., 2021). The initial learning rate is set as $2 \\times 10^{-4}$ and reduced by half at the milestone [250K,400K,450K,475K]. We use PyTorch (Paszke et al., 2019) to implement our models with 4 Nvidia A100 GPUs.",
802
+ "bbox": [
803
+ 169,
804
+ 547,
805
+ 823,
806
+ 647
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "4.2 ABLATION STUDY",
813
+ "text_level": 1,
814
+ "bbox": [
815
+ 171,
816
+ 659,
817
+ 341,
818
+ 672
819
+ ],
820
+ "page_idx": 5
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "In this section, we study the effects of different components of our method. For fair comparisons, all models adopt the same basic architecture and settings as RGT-S. We conduct experiments on the $\\times 2$ factor. We adopt the dataset DIV2K (Timofte et al., 2017) and Flickr2K (Lim et al., 2017) to train models, and the iterations are 200K. The dataset Urban100 (Huang et al., 2015) is applied for testing. When we calculate the FLOPs, the input size is $3 \\times 128 \\times 128$ .",
825
+ "bbox": [
826
+ 169,
827
+ 680,
828
+ 823,
829
+ 750
830
+ ],
831
+ "page_idx": 5
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Effects of each component. We conduct a break-down ablation experiment to investigate the effects of each component on SR performance. The results are listed in Tab. 1a. First, baseline. The baseline model is derived by replacing all Transformer blocks in RGT-S with local self-attention (L-SA) (Liang et al., 2021; Chen et al., 2022b) block and removing HAI. We set the window size of L-SA as $8 \\times 32$ , which is consistent with RGT-S. Second, applying RG-SA. We introduce the recursive-generalization self-attention (RG-SA) into the baseline, and alternately arrange L-SA and RG-SA in successive Transformer blocks. Without changing the structure of the network, the model achieves a 0.09 dB improvement. Meanwhile, compared with the baseline, the FLOPs and parameters of the model are slightly reduced. It shows that our proposed RG-SA is effective regarding parameters and computational complexity. Third, applying HAI. We further adopt the hybrid adaptive integration (HAI) and get the final version of our RGT-S. The model obtains the best performance of 33.68 dB. These results demonstrate the effectiveness of the RG-SA and HAI.",
836
+ "bbox": [
837
+ 169,
838
+ 757,
839
+ 826,
840
+ 924
841
+ ],
842
+ "page_idx": 5
843
+ },
844
+ {
845
+ "type": "header",
846
+ "text": "Published as a conference paper at ICLR 2024",
847
+ "bbox": [
848
+ 171,
849
+ 32,
850
+ 478,
851
+ 47
852
+ ],
853
+ "page_idx": 5
854
+ },
855
+ {
856
+ "type": "page_number",
857
+ "text": "6",
858
+ "bbox": [
859
+ 493,
860
+ 948,
861
+ 504,
862
+ 959
863
+ ],
864
+ "page_idx": 5
865
+ },
866
+ {
867
+ "type": "image",
868
+ "img_path": "images/e0392b2b82d4b23bdb3daab294eb8336cb6fc87ef883a60e393b7dc7c1068bb9.jpg",
869
+ "image_caption": [
870
+ "Figure 4: CKA similarity between all pairs of Transformer blocks in RGT-S without or with HAI."
871
+ ],
872
+ "image_footnote": [],
873
+ "bbox": [
874
+ 176,
875
+ 102,
876
+ 524,
877
+ 239
878
+ ],
879
+ "page_idx": 6
880
+ },
881
+ {
882
+ "type": "image",
883
+ "img_path": "images/24d3d1a501a2e45aea5ac862511f66f58ee1534829fb986e4a355a47b76acc84.jpg",
884
+ "image_caption": [
885
+ "Figure 5: The value $(|\\alpha| / C, C = 180)$ distribution of $\\alpha$ of RGT-S."
886
+ ],
887
+ "image_footnote": [],
888
+ "bbox": [
889
+ 555,
890
+ 111,
891
+ 820,
892
+ 233
893
+ ],
894
+ "page_idx": 6
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "Effects of RG-SA. We investigate the design of our recursive-generalization self-attention (RG-SA). We implement ablation experiments on the recursive operation and channel adjustment factor. The results are reported in Tab. 1b. First, the impact of recursive operation. We build the model without recursion (w/o Recur) by removing the recursive operation of RGM in RGT-S. Namely, the stride depth-wise convolution is only utilized once to generate the representative maps. We keep $s_r = 4$ and $c_r = 0.5$ unchanged. Compared with RGT-S, it can be observed that the usage of recursive operation can effectively reduce the FLOPs by $30\\%$ , while achieving better performance. Second, the impact of the channel adjustment factor $c_r$ . We build and train the model without channel scaling (w/o Scale) by setting the adjustment factor $c_r$ in RGT-S as 1 (0.5 by default). Compared with RGT-S, we discover that scaling the channel dimension yields 0.14 dB performance gain, since the smaller $c_r$ mitigates the redundancy between channels, thus enhancing the feature expression.",
899
+ "bbox": [
900
+ 169,
901
+ 279,
902
+ 826,
903
+ 434
904
+ ],
905
+ "page_idx": 6
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "Effects of HAI. We show the influence of the hybrid adaptive integration (HAI) in Tab. 1c. We compared three models: without HAI (w/o HAI), with vanilla skip connection (He et al., 2016) (w/ Skip), and with HAI (w/ HAI). Both skip connection and HAI act on the outside of each Transformer block. First, the impact of vanilla skip connection. Comparing the model w/o HAI and the model w/ Skip, we can find that the simple application of skip connection seriously degrades the model performance by $0.81\\mathrm{dB}$ . This may be due to the misalignment between different level (global or local) features, which prevents their direct fusion. Second, the impact of HAI. In contrast, our proposed HAI adaptively adjusts the input features through a learnable adaptor $\\alpha$ , thus achieving valid feature integration. With the HAI, the model obtains $0.16\\mathrm{dB}$ gain.",
910
+ "bbox": [
911
+ 169,
912
+ 440,
913
+ 823,
914
+ 566
915
+ ],
916
+ "page_idx": 6
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "We also apply HAI only models only with L-SA in Tab. 1d. Since there is no feature misalignment, the performance does not change much with HAI. These results are consistent with analysis in Sec. 3.3 and demonstrates the effectiveness of HAI in solving feature misalignment.",
921
+ "bbox": [
922
+ 169,
923
+ 571,
924
+ 823,
925
+ 614
926
+ ],
927
+ "page_idx": 6
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "Furthermore, we further introduce centered kernel alignment (CKA) (Cortes et al., 2012; Kornblith et al., 2019; Raghu et al., 2021) to study the internal representation structure of the model. The higher the CKA score, the higher the representation similarity. We calculate CKA similarities between all Transformer blocks in RGT-S without and with HAI. The results are shown as heatmaps in Fig. 4. First, enhance module integration. There are obvious differences before and after the $30^{th}$ block, in the model without HAI. On the contrary, equipping with HAI, it can be found that the transition is more gradual, which indicates that the integration between the modules is more effective. Second, encourage information flow. We observe that there is still a high similarity between the initial blocks $(0^{th} \\sim 2^{nd})$ and the very deep blocks $(28^{th} \\sim 29^{th})$ in the model with HAI. It means that through HAI, more information can flow to the deep layers of the network.",
932
+ "bbox": [
933
+ 169,
934
+ 621,
935
+ 826,
936
+ 760
937
+ ],
938
+ "page_idx": 6
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "We also visualize the value distribution of $\\alpha$ of RGT-S in Fig. 5. We find that $\\alpha$ is diverse based on different blocks, indicating its adaptability. Meanwhile, the value of $\\alpha$ increases at the end block in each RG, i.e., blocks $5^{th}$ , $11^{th}$ , $17^{th}$ , and $23^{th}$ . It indicates that HAI integrates different modules.",
943
+ "bbox": [
944
+ 169,
945
+ 767,
946
+ 823,
947
+ 810
948
+ ],
949
+ "page_idx": 6
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "4.3 COMPARISONS WITH STATE-OF-THE-ART METHODS",
954
+ "text_level": 1,
955
+ "bbox": [
956
+ 169,
957
+ 821,
958
+ 578,
959
+ 834
960
+ ],
961
+ "page_idx": 6
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "We compare our two models, RGT-S and RGT, with recent state-of-the-art methods: EDSR (Lim et al., 2017), RCAN (Zhang et al., 2018a), SRFBN (Li et al., 2019), SAN (Dai et al., 2019), HAN (Niu et al., 2020), CSNLN (Mei et al., 2020), NLSA (Mei et al., 2021), CRAN (Zhang et al., 2021), DFSA (Magid et al., 2021), ELAN (Zhang et al., 2022), SwinIR (Liang et al., 2021), and CAT-A (Chen et al., 2022c). Similar to previous works (Lim et al., 2017; Zhang et al., 2018a), we use self-ensemble strategy in testing and mark the model with the symbol “+”.",
966
+ "bbox": [
967
+ 169,
968
+ 839,
969
+ 826,
970
+ 925
971
+ ],
972
+ "page_idx": 6
973
+ },
974
+ {
975
+ "type": "header",
976
+ "text": "Published as a conference paper at ICLR 2024",
977
+ "bbox": [
978
+ 173,
979
+ 32,
980
+ 478,
981
+ 47
982
+ ],
983
+ "page_idx": 6
984
+ },
985
+ {
986
+ "type": "page_number",
987
+ "text": "7",
988
+ "bbox": [
989
+ 493,
990
+ 948,
991
+ 504,
992
+ 959
993
+ ],
994
+ "page_idx": 6
995
+ },
996
+ {
997
+ "type": "table",
998
+ "img_path": "images/b546bc9cfe0661bb9450758c78cd43e4c16048b9fb046ebd54d3c08e79872fd2.jpg",
999
+ "table_caption": [],
1000
+ "table_footnote": [],
1001
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td rowspan=\"2\">Scale</td><td colspan=\"2\">Set5</td><td colspan=\"2\">Set14</td><td colspan=\"2\">B100</td><td colspan=\"2\">Urban100</td><td colspan=\"2\">Manga109</td></tr><tr><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×2</td><td>38.11</td><td>0.9602</td><td>33.92</td><td>0.9195</td><td>32.32</td><td>0.9013</td><td>32.93</td><td>0.9351</td><td>39.10</td><td>0.9773</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×2</td><td>38.27</td><td>0.9614</td><td>34.12</td><td>0.9216</td><td>32.41</td><td>0.9027</td><td>33.34</td><td>0.9384</td><td>39.44</td><td>0.9786</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×2</td><td>38.11</td><td>0.9609</td><td>33.82</td><td>0.9196</td><td>32.29</td><td>0.9010</td><td>32.62</td><td>0.9328</td><td>39.08</td><td>0.9779</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×2</td><td>38.31</td><td>0.9620</td><td>34.07</td><td>0.9213</td><td>32.42</td><td>0.9028</td><td>33.10</td><td>0.9370</td><td>39.32</td><td>0.9792</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×2</td><td>38.27</td><td>0.9614</td><td>34.16</td><td>0.9217</td><td>32.41</td><td>0.9027</td><td>33.35</td><td>0.9385</td><td>39.46</td><td>0.9785</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×2</td><td>38.28</td><td>0.9616</td><td>34.12</td><td>0.9223</td><td>32.40</td><td>0.9024</td><td>33.25</td><td>0.9386</td><td>39.37</td><td>0.9785</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×2</td><td>38.34</td><td>0.9618</td><td>34.08</td><td>0.9231</td><td>32.43</td><td>0.9027</td><td>33.42</td><td>0.9394</td><td>39.59</td><td>0.9789</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×2</td><td>38.31</td><td>0.9617</td><td>34.22</td><td>0.9232</td><td>32.44</td><td>0.9029</td><td>33.43</td><td>0.9394</td><td>39.75</td><td>0.9793</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×2</td><td>38.38</td><td>0.9620</td><td>34.33</td><td>0.9232</td><td>32.50</td><td>0.9036</td><td>33.66</td><td>0.9412</td><td>39.98</td><td>0.9798</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×2</td><td>38.36</td><td>0.9620</td><td>34.20</td><td>0.9228</td><td>32.45</td><td>0.9030</td><td>33.44</td><td>0.9391</td><td>39.62</td><td>0.9793</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×2</td><td>38.42</td><td>0.9623</td><td>34.46</td><td>0.9250</td><td>32.53</td><td>0.9041</td><td>33.81</td><td>0.9427</td><td>39.92</td><td>0.9797</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×2</td><td>38.51</td><td>0.9626</td><td>34.77</td><td>0.9270</td><td>32.59</td><td>0.9050</td><td>34.32</td><td>0.9457</td><td>40.18</td><td>0.9805</td></tr><tr><td>RGT-S (ours)</td><td>×2</td><td>38.56</td><td>0.9627</td><td>34.77</td><td>0.9270</td><td>32.59</td><td>0.9050</td><td>34.47</td><td>0.9467</td><td>40.34</td><td>0.9808</td></tr><tr><td>RGT (ours)</td><td>×2</td><td>38.59</td><td>0.9628</td><td>34.83</td><td>0.9272</td><td>32.62</td><td>0.9050</td><td>34.47</td><td>0.9474</td><td>40.45</td><td>0.9810</td></tr><tr><td>RGT+ (ours)</td><td>×2</td><td>38.62</td><td>0.9629</td><td>34.88</td><td>0.9275</td><td>32.64</td><td>0.9053</td><td>34.63</td><td>0.9474</td><td>40.45</td><td>0.9810</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×3</td><td>34.65</td><td>0.9280</td><td>30.52</td><td>0.8462</td><td>29.25</td><td>0.8093</td><td>28.80</td><td>0.8653</td><td>34.17</td><td>0.9476</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×3</td><td>34.74</td><td>0.9299</td><td>30.65</td><td>0.8482</td><td>29.32</td><td>0.8111</td><td>29.09</td><td>0.8702</td><td>34.44</td><td>0.9499</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×3</td><td>34.70</td><td>0.9292</td><td>30.51</td><td>0.8461</td><td>29.24</td><td>0.8084</td><td>28.73</td><td>0.8641</td><td>34.18</td><td>0.9481</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×3</td><td>34.75</td><td>0.9300</td><td>30.59</td><td>0.8476</td><td>29.33</td><td>0.8112</td><td>28.93</td><td>0.8671</td><td>34.30</td><td>0.9494</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×3</td><td>34.75</td><td>0.9299</td><td>30.67</td><td>0.8483</td><td>29.32</td><td>0.8110</td><td>29.10</td><td>0.8705</td><td>34.48</td><td>0.9500</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×3</td><td>34.74</td><td>0.9300</td><td>30.66</td><td>0.8482</td><td>29.33</td><td>0.8105</td><td>29.13</td><td>0.8712</td><td>34.45</td><td>0.9502</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×3</td><td>34.85</td><td>0.9306</td><td>30.70</td><td>0.8485</td><td>29.34</td><td>0.8117</td><td>29.25</td><td>0.8726</td><td>34.57</td><td>0.9508</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×3</td><td>34.80</td><td>0.9304</td><td>30.73</td><td>0.8498</td><td>29.38</td><td>0.8124</td><td>29.33</td><td>0.8745</td><td>34.84</td><td>0.9515</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×3</td><td>34.92</td><td>0.9312</td><td>30.83</td><td>0.8507</td><td>29.42</td><td>0.8128</td><td>29.44</td><td>0.8761</td><td>35.07</td><td>0.9525</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×3</td><td>34.90</td><td>0.9313</td><td>30.80</td><td>0.8504</td><td>29.38</td><td>0.8124</td><td>29.32</td><td>0.8745</td><td>34.73</td><td>0.9517</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×3</td><td>34.97</td><td>0.9318</td><td>30.93</td><td>0.8534</td><td>29.46</td><td>0.8145</td><td>29.75</td><td>0.8826</td><td>35.12</td><td>0.9537</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×3</td><td>35.06</td><td>0.9326</td><td>31.04</td><td>0.8538</td><td>29.52</td><td>0.8160</td><td>30.12</td><td>0.8862</td><td>35.38</td><td>0.9546</td></tr><tr><td>RGT-S (ours)</td><td>×3</td><td>35.11</td><td>0.9328</td><td>31.05</td><td>0.8548</td><td>29.53</td><td>0.8164</td><td>30.18</td><td>0.8884</td><td>35.39</td><td>0.9548</td></tr><tr><td>RGT (ours)</td><td>×3</td><td>35.15</td><td>0.9329</td><td>31.13</td><td>0.8550</td><td>29.55</td><td>0.8165</td><td>30.28</td><td>0.8899</td><td>35.55</td><td>0.9553</td></tr><tr><td>RGT+ (ours)</td><td>×3</td><td>35.18</td><td>0.9331</td><td>31.16</td><td>0.8558</td><td>29.57</td><td>0.8170</td><td>30.40</td><td>0.8914</td><td>35.69</td><td>0.9559</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×4</td><td>32.46</td><td>0.8968</td><td>28.80</td><td>0.7876</td><td>27.71</td><td>0.7420</td><td>26.64</td><td>0.8033</td><td>31.02</td><td>0.9148</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×4</td><td>32.63</td><td>0.9002</td><td>28.87</td><td>0.7889</td><td>27.77</td><td>0.7436</td><td>26.82</td><td>0.8087</td><td>31.22</td><td>0.9173</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×4</td><td>32.47</td><td>0.8983</td><td>28.81</td><td>0.7868</td><td>27.72</td><td>0.7409</td><td>26.60</td><td>0.8015</td><td>31.15</td><td>0.9160</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×4</td><td>32.64</td><td>0.9003</td><td>28.92</td><td>0.7888</td><td>27.78</td><td>0.7436</td><td>26.79</td><td>0.8068</td><td>31.18</td><td>0.9169</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×4</td><td>32.64</td><td>0.9002</td><td>28.90</td><td>0.7890</td><td>27.80</td><td>0.7442</td><td>26.85</td><td>0.8094</td><td>31.42</td><td>0.9177</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×4</td><td>32.68</td><td>0.9004</td><td>28.95</td><td>0.7888</td><td>27.80</td><td>0.7439</td><td>27.22</td><td>0.8168</td><td>31.43</td><td>0.9201</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×4</td><td>32.59</td><td>0.9000</td><td>28.87</td><td>0.7891</td><td>27.78</td><td>0.7444</td><td>26.96</td><td>0.8109</td><td>31.27</td><td>0.9184</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×4</td><td>32.72</td><td>0.9012</td><td>29.01</td><td>0.7918</td><td>27.86</td><td>0.7460</td><td>27.13</td><td>0.8167</td><td>31.75</td><td>0.9219</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×4</td><td>32.79</td><td>0.9019</td><td>29.06</td><td>0.7922</td><td>27.87</td><td>0.7458</td><td>27.17</td><td>0.8163</td><td>31.88</td><td>0.9266</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×4</td><td>32.75</td><td>0.9022</td><td>28.96</td><td>0.7914</td><td>27.83</td><td>0.7459</td><td>27.13</td><td>0.8167</td><td>31.68</td><td>0.9226</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×4</td><td>32.92</td><td>0.9044</td><td>29.09</td><td>0.7950</td><td>27.92</td><td>0.7489</td><td>27.45</td><td>0.8254</td><td>32.03</td><td>0.9260</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×4</td><td>33.08</td><td>0.9052</td><td>29.18</td><td>0.7960</td><td>27.99</td><td>0.7510</td><td>27.89</td><td>0.8339</td><td>32.39</td><td>0.9285</td></tr><tr><td>RGT-S (ours)</td><td>×4</td><td>32.98</td><td>0.9047</td><td>29.18</td><td>0.7966</td><td>27.98</td><td>0.7509</td><td>27.89</td><td>0.8347</td><td>32.38</td><td>0.9281</td></tr><tr><td>RGT (ours)</td><td>×4</td><td>33.12</td><td>0.9060</td><td>29.23</td><td>0.7972</td><td>28.00</td><td>0.7513</td><td>27.98</td><td>0.8369</td><td>32.50</td><td>0.9291</td></tr><tr><td>RGT+ (ours)</td><td>×4</td><td>33.16</td><td>0.9066</td><td>29.28</td><td>0.7979</td><td>28.03</td><td>0.7520</td><td>28.09</td><td>0.8388</td><td>32.68</td><td>0.9303</td></tr></table>",
1002
+ "bbox": [
1003
+ 173,
1004
+ 102,
1005
+ 828,
1006
+ 604
1007
+ ],
1008
+ "page_idx": 7
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Table 2: Quantitative comparison (PSNR/SSIM) with state-of-the-art methods. Best and second best results are colored with red and blue. Our methods outperforms other competitors.",
1013
+ "bbox": [
1014
+ 171,
1015
+ 614,
1016
+ 823,
1017
+ 643
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Quantitative results. We show the quantitative comparisons for $\\times 2$ , $\\times 3$ , and $\\times 4$ image SR in Tab. 2. We also report the comparisons of computational complexity (e.g., FLOPs), and parameter numbers in Tab. 3. As we can see, our proposed RGT significantly outperforms other methods on all datasets with all scaling factors. Compared with recent Transformer-based methods, such as SwinIR (Liang et al., 2021) and CAT-A (Chen et al., 2022c), our proposed RGT achieves better results, particularly on the Urban100 and Manga109 datasets. For instance, on the Urban100 dataset $(\\times 2)$ , RGT outperforms CAT-A by $0.21~\\mathrm{dB}$ . Meanwhile, the model size and computational complexity are lower than CAT-A. Even the small vision model, RGT-S, obtains comparable or better results than compared methods. These comparisons indicate that our proposed RGT can capture more global information compared with previous CNN-based and Transformer-based methods.",
1024
+ "bbox": [
1025
+ 169,
1026
+ 666,
1027
+ 823,
1028
+ 805
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Visual Results. We show visual comparisons $(\\times 4)$ in Fig. 6. We can observe that most compared methods suffer from blurring artifacts and cannot recover accurate textures in some representative challenging cases. In contrast, our RGT can alleviate the blurring artifacts better and recover more image details. For instance, in image img_059, some methods fail to reconstruct most of the strips correctly (e.g., SAN and DFSA), while some only restore part stripes (e.g., SwinIR and CAT-A). In contrast, our method recovers more precise structures. These visual comparisons demonstrate that our RGT is capable of reconstructing high-quality images by modeling global information. Combining with the quantitative comparisons, we further demonstrate the effectiveness of our method.",
1035
+ "bbox": [
1036
+ 169,
1037
+ 811,
1038
+ 823,
1039
+ 924
1040
+ ],
1041
+ "page_idx": 7
1042
+ },
1043
+ {
1044
+ "type": "header",
1045
+ "text": "Published as a conference paper at ICLR 2024",
1046
+ "bbox": [
1047
+ 173,
1048
+ 32,
1049
+ 478,
1050
+ 47
1051
+ ],
1052
+ "page_idx": 7
1053
+ },
1054
+ {
1055
+ "type": "page_number",
1056
+ "text": "8",
1057
+ "bbox": [
1058
+ 493,
1059
+ 948,
1060
+ 503,
1061
+ 959
1062
+ ],
1063
+ "page_idx": 7
1064
+ },
1065
+ {
1066
+ "type": "image",
1067
+ "img_path": "images/7878b879debd45bf5e239268c8dd27a690d13ce102fb7ae8967b46038411a383.jpg",
1068
+ "image_caption": [],
1069
+ "image_footnote": [],
1070
+ "bbox": [
1071
+ 181,
1072
+ 99,
1073
+ 320,
1074
+ 189
1075
+ ],
1076
+ "page_idx": 8
1077
+ },
1078
+ {
1079
+ "type": "image",
1080
+ "img_path": "images/2a6743a693708e76c9b965ec8802d5641ce358a374c7282ba54c9b95b3c1e5f3.jpg",
1081
+ "image_caption": [],
1082
+ "image_footnote": [],
1083
+ "bbox": [
1084
+ 320,
1085
+ 99,
1086
+ 419,
1087
+ 138
1088
+ ],
1089
+ "page_idx": 8
1090
+ },
1091
+ {
1092
+ "type": "image",
1093
+ "img_path": "images/69ccefe92dbf3163d6d39e8235c42434b4c13a2bd954216befd1bc37ddf2bda4.jpg",
1094
+ "image_caption": [
1095
+ "Bicubic"
1096
+ ],
1097
+ "image_footnote": [],
1098
+ "bbox": [
1099
+ 419,
1100
+ 101,
1101
+ 517,
1102
+ 140
1103
+ ],
1104
+ "page_idx": 8
1105
+ },
1106
+ {
1107
+ "type": "image",
1108
+ "img_path": "images/5d88bfacee70f6c84f5e3ea52307b57e42b8db83264c9cc09a72f747b85f8632.jpg",
1109
+ "image_caption": [
1110
+ "RCAN"
1111
+ ],
1112
+ "image_footnote": [],
1113
+ "bbox": [
1114
+ 519,
1115
+ 101,
1116
+ 614,
1117
+ 140
1118
+ ],
1119
+ "page_idx": 8
1120
+ },
1121
+ {
1122
+ "type": "image",
1123
+ "img_path": "images/34f03a4aa99776eacce1dfe432c7a3680875f1046adc9d218c3d8f1b2329d603.jpg",
1124
+ "image_caption": [
1125
+ "SAN"
1126
+ ],
1127
+ "image_footnote": [],
1128
+ "bbox": [
1129
+ 616,
1130
+ 101,
1131
+ 712,
1132
+ 140
1133
+ ],
1134
+ "page_idx": 8
1135
+ },
1136
+ {
1137
+ "type": "image",
1138
+ "img_path": "images/3ad135bbc7d471fb94e79da4d7e5131f48bd64220c9fa21fbbc6171f7e24c1c4.jpg",
1139
+ "image_caption": [
1140
+ "HAN"
1141
+ ],
1142
+ "image_footnote": [],
1143
+ "bbox": [
1144
+ 715,
1145
+ 101,
1146
+ 812,
1147
+ 140
1148
+ ],
1149
+ "page_idx": 8
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "",
1154
+ "bbox": [
1155
+ 181,
1156
+ 151,
1157
+ 320,
1158
+ 189
1159
+ ],
1160
+ "page_idx": 8
1161
+ },
1162
+ {
1163
+ "type": "image",
1164
+ "img_path": "images/b967d3741eebafee4f6bbde2682327288fa079cc67235a4048db1afdb0db0548.jpg",
1165
+ "image_caption": [
1166
+ "HR",
1167
+ "CSNLN"
1168
+ ],
1169
+ "image_footnote": [],
1170
+ "bbox": [
1171
+ 320,
1172
+ 151,
1173
+ 419,
1174
+ 189
1175
+ ],
1176
+ "page_idx": 8
1177
+ },
1178
+ {
1179
+ "type": "image",
1180
+ "img_path": "images/5acea46368fd6a158d385df818ea96467cc3c97fb4761fdd4db6e568cfb71faf.jpg",
1181
+ "image_caption": [
1182
+ "DFSA"
1183
+ ],
1184
+ "image_footnote": [],
1185
+ "bbox": [
1186
+ 419,
1187
+ 151,
1188
+ 517,
1189
+ 189
1190
+ ],
1191
+ "page_idx": 8
1192
+ },
1193
+ {
1194
+ "type": "image",
1195
+ "img_path": "images/f348bee0688b6fb637ad6b51e7b362e6375209f1e799a838afff85690d3e4bd8.jpg",
1196
+ "image_caption": [
1197
+ "SwinIR"
1198
+ ],
1199
+ "image_footnote": [],
1200
+ "bbox": [
1201
+ 519,
1202
+ 151,
1203
+ 614,
1204
+ 189
1205
+ ],
1206
+ "page_idx": 8
1207
+ },
1208
+ {
1209
+ "type": "image",
1210
+ "img_path": "images/77c5b2416212493fcd9a8111b0d910bced53879c0b63b5ebd643f00f4b24ca09.jpg",
1211
+ "image_caption": [
1212
+ "CAT-A"
1213
+ ],
1214
+ "image_footnote": [],
1215
+ "bbox": [
1216
+ 616,
1217
+ 151,
1218
+ 712,
1219
+ 189
1220
+ ],
1221
+ "page_idx": 8
1222
+ },
1223
+ {
1224
+ "type": "image",
1225
+ "img_path": "images/997fbdb5243308e96e6ac71197d6ddc37b5059973fbd998d94fdaf50d46ec4ca.jpg",
1226
+ "image_caption": [],
1227
+ "image_footnote": [],
1228
+ "bbox": [
1229
+ 715,
1230
+ 151,
1231
+ 812,
1232
+ 189
1233
+ ],
1234
+ "page_idx": 8
1235
+ },
1236
+ {
1237
+ "type": "image",
1238
+ "img_path": "images/9e2d0dcced38e6e538af69976ea0ed8e64f273f930c4f891048400805096063c.jpg",
1239
+ "image_caption": [
1240
+ "Urban100: img_059 $(\\times 4)$",
1241
+ "Urban100: img_098 (×4)"
1242
+ ],
1243
+ "image_footnote": [],
1244
+ "bbox": [
1245
+ 181,
1246
+ 200,
1247
+ 320,
1248
+ 289
1249
+ ],
1250
+ "page_idx": 8
1251
+ },
1252
+ {
1253
+ "type": "image",
1254
+ "img_path": "images/1c0c7dd0766d89ac7620952e9b9f797cceadf52fd301eb3882c128facc435ff0.jpg",
1255
+ "image_caption": [
1256
+ "HR"
1257
+ ],
1258
+ "image_footnote": [],
1259
+ "bbox": [
1260
+ 320,
1261
+ 200,
1262
+ 419,
1263
+ 239
1264
+ ],
1265
+ "page_idx": 8
1266
+ },
1267
+ {
1268
+ "type": "image",
1269
+ "img_path": "images/08d829d2f9c6ecf185fb0c60a78e38114797ac2b3660ef38a0fb096e91c94305.jpg",
1270
+ "image_caption": [
1271
+ "Bicubic"
1272
+ ],
1273
+ "image_footnote": [],
1274
+ "bbox": [
1275
+ 419,
1276
+ 200,
1277
+ 517,
1278
+ 239
1279
+ ],
1280
+ "page_idx": 8
1281
+ },
1282
+ {
1283
+ "type": "image",
1284
+ "img_path": "images/6ca6f307894d74d883d8826597a40153ebd637695d1016a2ce4d50274c0d9aad.jpg",
1285
+ "image_caption": [
1286
+ "RCAN"
1287
+ ],
1288
+ "image_footnote": [],
1289
+ "bbox": [
1290
+ 519,
1291
+ 200,
1292
+ 614,
1293
+ 239
1294
+ ],
1295
+ "page_idx": 8
1296
+ },
1297
+ {
1298
+ "type": "image",
1299
+ "img_path": "images/7b3bb1c87ea479f600cc872a8151ba570cfaa6b41fc9c36d6495607db614600b.jpg",
1300
+ "image_caption": [
1301
+ "SAN"
1302
+ ],
1303
+ "image_footnote": [],
1304
+ "bbox": [
1305
+ 616,
1306
+ 200,
1307
+ 712,
1308
+ 239
1309
+ ],
1310
+ "page_idx": 8
1311
+ },
1312
+ {
1313
+ "type": "image",
1314
+ "img_path": "images/b33bc4cc46750b9080b16a7d2d2001270d360e74624ffae4b4849652a5910d34.jpg",
1315
+ "image_caption": [
1316
+ "RGT (ours)",
1317
+ "HAN"
1318
+ ],
1319
+ "image_footnote": [],
1320
+ "bbox": [
1321
+ 715,
1322
+ 200,
1323
+ 812,
1324
+ 239
1325
+ ],
1326
+ "page_idx": 8
1327
+ },
1328
+ {
1329
+ "type": "image",
1330
+ "img_path": "images/22493c2a15a86565fba9e0e7e51d34e489643460389372155335e0f2bdbea7e2.jpg",
1331
+ "image_caption": [
1332
+ "Manga109: Momoyama. $(\\times 4)$",
1333
+ "Figure 6: Visual comparison for image SR $(\\times 4)$ in some challenging cases."
1334
+ ],
1335
+ "image_footnote": [],
1336
+ "bbox": [
1337
+ 181,
1338
+ 300,
1339
+ 320,
1340
+ 388
1341
+ ],
1342
+ "page_idx": 8
1343
+ },
1344
+ {
1345
+ "type": "image",
1346
+ "img_path": "images/c27353c7c085faf18de3a02d26073e4718747a01553692ce2e03ed489f16d939.jpg",
1347
+ "image_caption": [],
1348
+ "image_footnote": [],
1349
+ "bbox": [
1350
+ 320,
1351
+ 300,
1352
+ 419,
1353
+ 338
1354
+ ],
1355
+ "page_idx": 8
1356
+ },
1357
+ {
1358
+ "type": "image",
1359
+ "img_path": "images/db9c1b3b02401e36460287d5d9f5dae6cf2dc861af628936c923e50acf0fcfae.jpg",
1360
+ "image_caption": [],
1361
+ "image_footnote": [],
1362
+ "bbox": [
1363
+ 419,
1364
+ 300,
1365
+ 517,
1366
+ 338
1367
+ ],
1368
+ "page_idx": 8
1369
+ },
1370
+ {
1371
+ "type": "image",
1372
+ "img_path": "images/f8ffc68bad88965a1060fa1dadba591ed4c7ad31e291eb56538566ba8984beaa.jpg",
1373
+ "image_caption": [],
1374
+ "image_footnote": [],
1375
+ "bbox": [
1376
+ 519,
1377
+ 300,
1378
+ 614,
1379
+ 338
1380
+ ],
1381
+ "page_idx": 8
1382
+ },
1383
+ {
1384
+ "type": "image",
1385
+ "img_path": "images/427defd99fd657612cfbaa9c9f83496cc8fe33f969112048f09a58f9778efc40.jpg",
1386
+ "image_caption": [],
1387
+ "image_footnote": [],
1388
+ "bbox": [
1389
+ 616,
1390
+ 300,
1391
+ 712,
1392
+ 338
1393
+ ],
1394
+ "page_idx": 8
1395
+ },
1396
+ {
1397
+ "type": "image",
1398
+ "img_path": "images/dd05d13df2ed40bb431048ef7f1a3c775a0b469add410f19afe20ffe899c86d9.jpg",
1399
+ "image_caption": [],
1400
+ "image_footnote": [],
1401
+ "bbox": [
1402
+ 715,
1403
+ 300,
1404
+ 812,
1405
+ 338
1406
+ ],
1407
+ "page_idx": 8
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "",
1412
+ "bbox": [
1413
+ 181,
1414
+ 349,
1415
+ 320,
1416
+ 388
1417
+ ],
1418
+ "page_idx": 8
1419
+ },
1420
+ {
1421
+ "type": "image",
1422
+ "img_path": "images/7b7c2dc9b032780a6a381c6e1fcab85e042060df24d78707f264b8d123032a62.jpg",
1423
+ "image_caption": [
1424
+ "HR",
1425
+ "CSNLN"
1426
+ ],
1427
+ "image_footnote": [],
1428
+ "bbox": [
1429
+ 320,
1430
+ 349,
1431
+ 419,
1432
+ 388
1433
+ ],
1434
+ "page_idx": 8
1435
+ },
1436
+ {
1437
+ "type": "image",
1438
+ "img_path": "images/0432163be678f43fd9d0cb506ad778cc02d38a14548d366d398f3ec7df6b4bda.jpg",
1439
+ "image_caption": [
1440
+ "Bicubic",
1441
+ "DFSA"
1442
+ ],
1443
+ "image_footnote": [],
1444
+ "bbox": [
1445
+ 419,
1446
+ 349,
1447
+ 517,
1448
+ 388
1449
+ ],
1450
+ "page_idx": 8
1451
+ },
1452
+ {
1453
+ "type": "image",
1454
+ "img_path": "images/60320c3decabaa15ea8d2241fcbb260f77a4b3f051a12f30d7c5b6fc4878b199.jpg",
1455
+ "image_caption": [
1456
+ "RCAN",
1457
+ "SwinIR"
1458
+ ],
1459
+ "image_footnote": [],
1460
+ "bbox": [
1461
+ 519,
1462
+ 349,
1463
+ 614,
1464
+ 388
1465
+ ],
1466
+ "page_idx": 8
1467
+ },
1468
+ {
1469
+ "type": "image",
1470
+ "img_path": "images/3897f6cafaf97058d7f4143c04048ff298c950f4ac0059b2b45b447859b4ff61.jpg",
1471
+ "image_caption": [
1472
+ "SAN",
1473
+ "CAT-A"
1474
+ ],
1475
+ "image_footnote": [],
1476
+ "bbox": [
1477
+ 616,
1478
+ 349,
1479
+ 712,
1480
+ 388
1481
+ ],
1482
+ "page_idx": 8
1483
+ },
1484
+ {
1485
+ "type": "image",
1486
+ "img_path": "images/be9c3c21fb2df4789f47340b710ccd312b49010b8a833136b5b536c9d8a029f3.jpg",
1487
+ "image_caption": [
1488
+ "HAN",
1489
+ "RGT (ours)"
1490
+ ],
1491
+ "image_footnote": [],
1492
+ "bbox": [
1493
+ 715,
1494
+ 349,
1495
+ 812,
1496
+ 388
1497
+ ],
1498
+ "page_idx": 8
1499
+ },
1500
+ {
1501
+ "type": "table",
1502
+ "img_path": "images/e623ee6363c0a4338827bdbc7495809574b4955a06811cd936380f7c1c7ccfcc.jpg",
1503
+ "table_caption": [],
1504
+ "table_footnote": [],
1505
+ "table_body": "<table><tr><td>Method</td><td>EDSR</td><td>RCAN</td><td>HAN</td><td>CSNLN</td><td>SwinIR</td><td>CAT-A</td><td>RGT-S (ours)</td><td>RGT (ours)</td></tr><tr><td>Params(M)</td><td>43.09</td><td>15.59</td><td>16.07</td><td>6.57</td><td>11.90</td><td>16.60</td><td>10.20</td><td>13.37</td></tr><tr><td>FLOPs(G)</td><td>823.34</td><td>261.01</td><td>269.1</td><td>84,155.24</td><td>215.32</td><td>360.67</td><td>193.08</td><td>251.07</td></tr><tr><td>Urban100</td><td>26.64</td><td>26.82</td><td>26.85</td><td>27.22</td><td>27.45</td><td>27.89</td><td>27.89</td><td>27.98</td></tr><tr><td>Manga109</td><td>31.02</td><td>31.22</td><td>31.42</td><td>31.43</td><td>32.03</td><td>32.39</td><td>32.38</td><td>32.50</td></tr></table>",
1506
+ "bbox": [
1507
+ 174,
1508
+ 430,
1509
+ 820,
1510
+ 496
1511
+ ],
1512
+ "page_idx": 8
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Table 3: Comparison of parameters, FLOPs, and PSNR (dB) values on Urban100 and Manga109 with scaling factor $\\times 4$ . When we calculate FLOPs, the output size is $3\\times 512\\times 512$ .",
1517
+ "bbox": [
1518
+ 171,
1519
+ 500,
1520
+ 823,
1521
+ 527
1522
+ ],
1523
+ "page_idx": 8
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "4.4 MODEL SIZE ANALYSES",
1528
+ "text_level": 1,
1529
+ "bbox": [
1530
+ 171,
1531
+ 542,
1532
+ 383,
1533
+ 555
1534
+ ],
1535
+ "page_idx": 8
1536
+ },
1537
+ {
1538
+ "type": "text",
1539
+ "text": "We further show the comparison of parameter numbers, FLOPs, and performance with recent image SR methods in Tab. 3. FLOPs are measured when the output size is set as $3 \\times 512 \\times 512$ , and PSNR values are tested on Urban100 and Manga109 ( $\\times 4$ ). Our RGT has lower computational complexity and model size than CNN-based methods, EDSR (Lim et al., 2017) and RCAN (Zhang et al., 2018a). Compared with CSNLN (Mei et al., 2020), our RGT only requires $0.3\\%$ computational complexity (i.e., FLOPs). Meanwhile, compared with the recent Transformer-based model, CAT-A, our RGT performs better, while FLOPs decreased by $30.39\\%$ (109.6G) and parameters decreased by $19.46\\%$ (3.23M). Compared with SwinIR (Liang et al., 2021), RGT has comparable computational complexity and model size. Furthermore, to further demonstrate the effectiveness of our method, we provide another version of the model, RGT-S, with lower FLOPs and parameters than SwinIR. Our RGT-S still obtains notable SR performance gains compared with other methods. These comparisons indicate that our method achieves a better trade-off between model complexity and performance.",
1540
+ "bbox": [
1541
+ 169,
1542
+ 569,
1543
+ 823,
1544
+ 736
1545
+ ],
1546
+ "page_idx": 8
1547
+ },
1548
+ {
1549
+ "type": "text",
1550
+ "text": "5 CONCLUSION",
1551
+ "text_level": 1,
1552
+ "bbox": [
1553
+ 171,
1554
+ 748,
1555
+ 320,
1556
+ 763
1557
+ ],
1558
+ "page_idx": 8
1559
+ },
1560
+ {
1561
+ "type": "text",
1562
+ "text": "We propose a new Transformer model, named Recursive Generalization Transformer (RGT), for accurate image SR. Our RGT is capable of modeling global spatial information while maintaining low computational costs. Specifically, we design the recursive-generalization self-attention (RG-SA) to extract global information effectively in linear complexity. The RG-SA computes cross-attention between the input features and the representative maps recursively aggregated from the input. Meanwhile, the channel dimensions of attention matrices are further scaled to mitigate the redundancy in the channel domain. Furthermore, to improve the exploitation of the global context, we combine RG-SA with local self-attention, and propose the hybrid adaptive integration (HAI) for module integration. The HAI acts on the outside of each Transformer block to directly fuse features at different levels (local or global). Extensive experiments on image SR demonstrate that our proposed RGT achieves superior performance over recent state-of-the-art methods.",
1563
+ "bbox": [
1564
+ 169,
1565
+ 771,
1566
+ 823,
1567
+ 924
1568
+ ],
1569
+ "page_idx": 8
1570
+ },
1571
+ {
1572
+ "type": "header",
1573
+ "text": "Published as a conference paper at ICLR 2024",
1574
+ "bbox": [
1575
+ 173,
1576
+ 32,
1577
+ 478,
1578
+ 47
1579
+ ],
1580
+ "page_idx": 8
1581
+ },
1582
+ {
1583
+ "type": "page_number",
1584
+ "text": "9",
1585
+ "bbox": [
1586
+ 493,
1587
+ 948,
1588
+ 504,
1589
+ 959
1590
+ ],
1591
+ "page_idx": 8
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "ACKNOWLEDGMENTS",
1596
+ "text_level": 1,
1597
+ "bbox": [
1598
+ 171,
1599
+ 102,
1600
+ 356,
1601
+ 118
1602
+ ],
1603
+ "page_idx": 9
1604
+ },
1605
+ {
1606
+ "type": "ref_text",
1607
+ "text": "This work was supported in part by NSFC grant (62141220, U19B2035) and Shanghai Municipal Science and Technology Major Project (2021SHZDZX0102).",
1608
+ "bbox": [
1609
+ 171,
1610
+ 133,
1611
+ 823,
1612
+ 162
1613
+ ],
1614
+ "page_idx": 9
1615
+ },
1616
+ {
1617
+ "type": "text",
1618
+ "text": "REFERENCES",
1619
+ "text_level": 1,
1620
+ "bbox": [
1621
+ 171,
1622
+ 184,
1623
+ 287,
1624
+ 199
1625
+ ],
1626
+ "page_idx": 9
1627
+ },
1628
+ {
1629
+ "type": "list",
1630
+ "sub_type": "ref_text",
1631
+ "list_items": [
1632
+ "Alaaeldin Ali, Hugo Touvron, Mathilde Caron, Piotr Bojanowski, Matthijs Douze, Armand Joulin, Ivan Laptev, Natalia Neverova, Gabriel Synnaeve, Jakob Verbeek, et al. Xcit: Cross-covariance image transformers. In NeurIPS, 2021.",
1633
+ "Marco Bevilacqua, Aline Roumy, Christine Guillemot, and Marie Line Alberi-Morel. Low-complexity single-image super-resolution based on nonnegative neighbor embedding. In BMVC, 2012.",
1634
+ "Richard Chen, Rameswar Panda, and Quanfu Fan. Regionvit: Regional-to-local attention for vision transformers. In ICLR, 2022a.",
1635
+ "Xiangyu Chen, Xintao Wang, Jiantao Zhou, and Chao Dong. Activating more pixels in image superresolution transformer. arXiv preprint arXiv:2205.04437, 2022b.",
1636
+ "Zheng Chen, Yulun Zhang, Jinjin Gu, Yongbing Zhang, Linghe Kong, and Xin Yuan. Cross aggregation transformer for image restoration. In NeurIPS, 2022c.",
1637
+ "Zheng Chen, Yulun Zhang, Jinjin Gu, Linghe Kong, Xiaokang Yang, and Fisher Yu. Dual aggregation transformer for image super-resolution. In ICCV, 2023.",
1638
+ "Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. In NeurIPS, 2021.",
1639
+ "Corinna Cortes, Mehryar Mohri, and Afshin Rostamizadeh. Algorithms for learning kernels based on centered alignment. JMLR, 2012.",
1640
+ "Tao Dai, Jianrui Cai, Yongbing Zhang, Shu-Tao Xia, and Lei Zhang. Second-order attention network for single image super-resolution. In CVPR, 2019.",
1641
+ "Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Learning a deep convolutional network for image super-resolution. In ECCV, 2014.",
1642
+ "Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. In CVPR, 2022.",
1643
+ "Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.",
1644
+ "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.",
1645
+ "Jia-Bin Huang, Abhishek Singh, and Narendra Ahuja. Single image super-resolution from transformed self-exemplars. In CVPR, 2015.",
1646
+ "Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, 2016.",
1647
+ "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.",
1648
+ "Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In NeurIPS, 2019."
1649
+ ],
1650
+ "bbox": [
1651
+ 171,
1652
+ 207,
1653
+ 825,
1654
+ 924
1655
+ ],
1656
+ "page_idx": 9
1657
+ },
1658
+ {
1659
+ "type": "header",
1660
+ "text": "Published as a conference paper at ICLR 2024",
1661
+ "bbox": [
1662
+ 171,
1663
+ 32,
1664
+ 478,
1665
+ 47
1666
+ ],
1667
+ "page_idx": 9
1668
+ },
1669
+ {
1670
+ "type": "page_number",
1671
+ "text": "10",
1672
+ "bbox": [
1673
+ 490,
1674
+ 946,
1675
+ 509,
1676
+ 959
1677
+ ],
1678
+ "page_idx": 9
1679
+ },
1680
+ {
1681
+ "type": "list",
1682
+ "sub_type": "ref_text",
1683
+ "list_items": [
1684
+ "Yawei Li, Yuchen Fan, Xiaoyu Xiang, Denis Demandolx, Rakesh Ranjan, Radu Timofte, and Luc Van Gool. Efficient and explicit modelling of image hierarchies for image restoration. In CVPR, 2023.",
1685
+ "Zhen Li, Jinglei Yang, Zheng Liu, Xiaomin Yang, Gwanggil Jeon, and Wei Wu. Feedback network for image super-resolution. In CVPR, 2019.",
1686
+ "Jingyun Liang, Jiezhang Cao, Guolei Sun, Kai Zhang, Luc Van Gool, and Radu Timofte. Swinir: Image restoration using swin transformer. In ICCVW, 2021.",
1687
+ "Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Kyoung Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPRW, 2017.",
1688
+ "Jie Liu, Wenjie Zhang, Yuting Tang, Jie Tang, and Gangshan Wu. Residual feature aggregation network for image super-resolution. In CVPR, 2020.",
1689
+ "Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. \nSwin transformer: Hierarchical vision transformer using shifted windows. In ICCV, 2021.",
1690
+ "Salma Abdel Magid, Yulun Zhang, Donglai Wei, Won-Dong Jang, Zudi Lin, Yun Fu, and Hanspeter Pfister. Dynamic high-pass filtering and multi-spectral attention for image super-resolution. In ICCV, 2021.",
1691
+ "David Martin, Charless Fowlkes, Doron Tal, and Jitendra Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, 2001.",
1692
+ "Yusuke Matsui, Kota Ito, Yuji Aramaki, Azuma Fujimoto, Toru Ogawa, Toshihiko Yamasaki, and Kiyoharu Aizawa. Sketch-based manga retrieval using manga109 dataset. Multimedia Tools and Applications, 2017.",
1693
+ "Yiqun Mei, Yuchen Fan, Yuqian Zhou, Lichao Huang, Thomas S Huang, and Humphrey Shi. Image super-resolution with cross-scale non-local attention and exhaustive self-exemplars mining. In CVPR, 2020.",
1694
+ "Yiqun Mei, Yuchen Fan, and Yuqian Zhou. Image super-resolution with non-local sparse attention. In CVPR, 2021.",
1695
+ "Ben Niu, Weilei Wen, Wenqi Ren, Xiangde Zhang, Lianping Yang, Shuzhen Wang, Kaihao Zhang, Xiaochun Cao, and Haifeng Shen. Single image super-resolution via a holistic attention network. In ECCV, 2020.",
1696
+ "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.",
1697
+ "Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? In NeurIPS, 2021.",
1698
+ "Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In CVPR, 2016.",
1699
+ "Radu Timofte, Eirikur Agustsson, Luc Van Gool, Ming-Hsuan Yang, Lei Zhang, Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, Kyoung Mu Lee, et al. Ntire 2017 challenge on single image super-resolution: Methods and results. In CVPRW, 2017.",
1700
+ "Fu-Jen Tsai, Yan-Tsung Peng, Yen-Yu Lin, Chung-Chi Tsai, and Chia-Wen Lin. Stripformer: Strip transformer for fast image deblurring. In ECCV, 2022.",
1701
+ "Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxvit: Multi-axis vision transformer. In ECCV, 2022.",
1702
+ "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017."
1703
+ ],
1704
+ "bbox": [
1705
+ 171,
1706
+ 102,
1707
+ 825,
1708
+ 924
1709
+ ],
1710
+ "page_idx": 10
1711
+ },
1712
+ {
1713
+ "type": "header",
1714
+ "text": "Published as a conference paper at ICLR 2024",
1715
+ "bbox": [
1716
+ 171,
1717
+ 32,
1718
+ 478,
1719
+ 47
1720
+ ],
1721
+ "page_idx": 10
1722
+ },
1723
+ {
1724
+ "type": "page_number",
1725
+ "text": "11",
1726
+ "bbox": [
1727
+ 490,
1728
+ 948,
1729
+ 506,
1730
+ 959
1731
+ ],
1732
+ "page_idx": 10
1733
+ },
1734
+ {
1735
+ "type": "list",
1736
+ "sub_type": "ref_text",
1737
+ "list_items": [
1738
+ "Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In ICCV, 2021.",
1739
+ "Zhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou, Jianzhuang Liu, and Houqiang Li. Uformer: A general u-shaped transformer for image restoration. In CVPR, 2022.",
1740
+ "Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. TIP, 2004.",
1741
+ "Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M Alvarez, and Ping Luo. Segformer: Simple and efficient design for semantic segmentation with transformers. In NeurIPS, 2021.",
1742
+ "Rui Yang, Hailong Ma, Jie Wu, Yansong Tang, Xuefeng Xiao, Min Zheng, and Xiu Li. Scalablevit: Rethinking the context-oriented generalization of vision transformer. In ECCV, 2022.",
1743
+ "Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Ming-Hsuan Yang. Restormer: Efficient transformer for high-resolution image restoration. In CVPR, 2022.",
1744
+ "Roman Zeyde, Michael Elad, and Matan Protter. On single image scale-up using sparse-representations. In Proc. 7th Int. Conf. Curves Surf., 2010.",
1745
+ "Xindong Zhang, Hui Zeng, Shi Guo, and Lei Zhang. Efficient long-range attention network for image super-resolution. In ECCV, 2022.",
1746
+ "Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image superresolution using very deep residual channel attention networks. In ECCV, 2018a.",
1747
+ "Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image super-resolution. In CVPR, 2018b.",
1748
+ "Yulun Zhang, Kunpeng Li, Kai Li, Bineng Zhong, and Yun Fu. Residual non-local attention networks for image restoration. In ICLR, 2019.",
1749
+ "Yulun Zhang, Donglai Wei, Can Qin, Huan Wang, Hanspeter Pfister, and Yun Fu. Context reasoning attention network for image super-resolution. In ICCV, 2021.",
1750
+ "Shangchen Zhou, Jiawei Zhang, Wangmeng Zuo, and Chen Change Loy. Cross-scale internal graph neural network for image super-resolution. In NeurIPS, 2020."
1751
+ ],
1752
+ "bbox": [
1753
+ 171,
1754
+ 102,
1755
+ 825,
1756
+ 628
1757
+ ],
1758
+ "page_idx": 11
1759
+ },
1760
+ {
1761
+ "type": "header",
1762
+ "text": "Published as a conference paper at ICLR 2024",
1763
+ "bbox": [
1764
+ 171,
1765
+ 32,
1766
+ 478,
1767
+ 47
1768
+ ],
1769
+ "page_idx": 11
1770
+ },
1771
+ {
1772
+ "type": "page_number",
1773
+ "text": "12",
1774
+ "bbox": [
1775
+ 490,
1776
+ 946,
1777
+ 508,
1778
+ 959
1779
+ ],
1780
+ "page_idx": 11
1781
+ }
1782
+ ]
2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Recursive Generalization Transformer for Image Super-Resolution/801c3b9b-95c3-43bc-9157-9c390c930829_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1297310b3ef5c3155d54aa25b89f6abe9b14ec41cc2ae81ccfc117ce5b89818f
3
+ size 2546047
2024/Recursive Generalization Transformer for Image Super-Resolution/full.md ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RECURSIVE GENERALIZATION TRANSFORMER FOR IMAGE SUPER-RESOLUTION
2
+
3
+ Zheng Chen $^{1}$ , Yulun Zhang $^{1*†}$ , Jinjin Gu $^{2,3}$ , Linghe Kong $^{1*}$ , Xiaokang Yang $^{1}$ $^{1}$ Shanghai Jiao Tong University, $^{2}$ Shanghai AI Laboratory, $^{3}$ The University of Sydney
4
+
5
+ # ABSTRACT
6
+
7
+ Transformer architectures have exhibited remarkable performance in image superresolution (SR). Since the quadratic computational complexity of the self-attention (SA) in Transformer, existing methods tend to adopt SA in a local region to reduce overheads. However, the local design restricts the global context exploitation, which is crucial for accurate image reconstruction. In this work, we propose the Recursive Generalization Transformer (RGT) for image SR, which can capture global spatial information and is suitable for high-resolution images. Specifically, we propose the recursive-generalization self-attention (RG-SA). It recursively aggregates input features into representative feature maps, and then utilizes cross-attention to extract global information. Meanwhile, the channel dimensions of attention matrices (query, key, and value) are further scaled to mitigate the redundancy in the channel domain. Furthermore, we combine the RG-SA with local self-attention to enhance the exploitation of the global context, and propose the hybrid adaptive integration (HAI) for module integration. The HAI allows the direct and effective fusion between features at different levels (local or global). Extensive experiments demonstrate that our RGT outperforms recent state-of-the-art methods quantitatively and qualitatively. Code and pre-trained models are available at https://github.com/zhengchen1999/RGT.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Image super-resolution (SR) aims to recover a high-resolution (HR) images from its low-resolution (LR) counterpart. Image SR is an ill-posed problem, as there are multiple solutions that can map to any given LR input. To tackle this challenging inverse problem, researchers have proposed numerous deep convolutional neural networks (CNNs) (Dong et al., 2014; Lim et al., 2017; Zhang et al., 2018b; Mei et al., 2020) in the past few years. Thanks to their impressive performance against conventional approaches, CNNs have almost dominated the field of SR.
12
+
13
+ However, deep CNNs still suffer from a limitation in global context awareness, due to the local processing principle of the convolution operator. Recently, an alternative method, Transformer, has exhibited considerable performance compared with CNN-based methods on multiple high-level computer vision tasks (Dosovitskiy et al., 2021; Liu et al., 2021; Wang et al., 2021; Chu et al., 2021; Yang et al., 2022). Transformer is first developed in the natural language processing (NLP) field, and its core component is the self-attention (SA) mechanism. This mechanism can directly model long-range dependencies by capturing the interaction between all input data. However, the computational complexity of the vanilla self-attention grows quadratically with image size, limiting its application in high-resolution scenarios, especially low-level vision tasks (e.g., image SR).
14
+
15
+ To apply Transformer in image SR, several methods have been proposed to reduce the computational cost of self-attention. Some researchers apply local (window) self-attention, which divides the feature maps into sub-regions to limit the scope of self-attention. Meanwhile, they utilize the shift mechanism (Liang et al., 2021), overlapping windows (Chen et al., 2022b), or the cross-aggregation operation (Chen et al., 2022c), to enhance the interaction between windows. These methods achieve linear complexity with respect to image size and outperform previous CNN-based methods. However, compared with global attention, the local design needs to stack many blocks to establish global dependencies. Furthermore, some methods propose "transposed" self-attention (Zamir et al., 2022) that operates across the channel dimension instead of the spatial dimension. Although this method
16
+
17
+ can implicitly capture global information, it hinders modeling spatial dependencies, which is crucial to image SR. Therefore, there is a need to develop a method for image SR that can effectively capture global spatial information with low computational cost on high-resolution images.
18
+
19
+ In this paper, we propose the Recursive Generalization Transformer (RGT) for image SR, which can model global spatial information and is suitable for high-resolution images. Specifically, we propose the recursive-generalization self-attention (RG-SA) to explore global information directly in linear computational complexity. The RG-SA first generalizes the input features of arbitrary resolution into representative feature maps with a small, constant size, via the recursive generalization module (RGM). Intuitively, the global information is aggregated into representative maps. Then cross-attention is utilized between input features and representative maps to exchange global information. Since the size of representative maps is much smaller than input features, the whole process is at a low computational cost. Moreover, the RG-SA further adjusts the channel dimension of query, key, and value matrices in SA to mitigate the redundancy in the channel domain.
20
+
21
+ Furthermore, considering that the RG-SA aggregates the image features via the RGM, it is inevitable to lose some local details. Thus, we combine the RG-SA with the local self-attention (L-SA) in an alternate arrangement to better utilize the global context. To enhance the integration of two different SA modules, we propose the hybrid adaptive integration (HAI), which acts on the outside of each Transformer block. The HAI directly fuses features at different levels (local or global) before and after the block. Besides, HAI adaptively adjusts the input features through a learnable adaptor for feature alignment. Overall, equipped with the above designs, our RGT can capture global information for accurate image SR while the complexity is manageable.
22
+
23
+ Our contributions can be summarized as follows:
24
+
25
+ - We propose the Recursive Generalization Transformer (RGT) for image SR. The RGT is capable of capturing global spatial information and is suitable for high-resolution images. Our RGT obtains notable SR performance quantitatively and visually.
26
+ - We propose the recursive-generalization self-attention (RG-SA), utilizing the recursive aggregation module and cross-attention to model global dependency with linear complexity.
27
+ - We further combine RG-SA with local self-attention to better exploit the global context, and propose the hybrid adaptive integration (HAI) for module integration.
28
+
29
+ # 2 RELATED WORK
30
+
31
+ Image Super-Resolution. In recent years, CNN-based methods have shown superior performance over conventional SR approaches. SRCNN (Dong et al., 2014) is the pioneering work, that introduces three convolutional layers for image SR. Following this attempt, many works deepen the architecture to improve performance (Zhang et al., 2019; Magid et al., 2021; Dai et al., 2019). VDSR (Kim et al., 2016) introduces residual learning to build a network with 20 layers. EDSR (Lim et al., 2017) further simplifies residual block, which allows deeper networks. RCAN (Zhang et al., 2018a) proposes a residual-in-residual structure to train a model over 400 layers. Moreover, numerous spatial and channel attention mechanisms (Zhang et al., 2019; Liu et al., 2020; Zhou et al., 2020) are proposed to improve the reconstruction quality. For instance, HAN (Niu et al., 2020) proposes a layer attention module and channel-spatial attention. Although these CNN-based methods produce remarkable results, they still suffer from a limitation in global modeling capability.
32
+
33
+ Vision Transformer. Transformer is proposed in natural language processing (NLP) and has been adapted to multiple high-level vision tasks, such as image classification (Dosovitskiy et al., 2021; Liu et al., 2021; Dong et al., 2022), semantic segmentation (Xie et al., 2021), and object detection (Yang et al., 2022; Tu et al., 2022). Due to the impressive performance in high-level tasks, Transformer has also been introduced to low-level vision tasks (Liang et al., 2021; Zamir et al., 2022; Wang et al., 2022; Tsai et al., 2022; Chen et al., 2022c; 2023; Li et al., 2023), including image SR. SwinIR (Liang et al., 2021), following the design of Swin Transformer (Liu et al., 2021), utilizes local window self-attention and shift mechanism. ELAN (Zhang et al., 2022) proposes multi-scale self-attention to reduce the computational cost. CAT (Chen et al., 2022c) designs the rectangle-window self-attention to aggregate the features across different windows. These methods all reduce computational complexity by applying self-attention within local regions. However, the local designs restrict the exploitation of global information that is crucial to image SR.
34
+
35
+ ![](images/282b112db39429af4c1f5c61cae380facedc27333dc69ade3f7e91e3fd9e027a.jpg)
36
+ Figure 1: The architecture of the Recursive Generalization Transformer (RGT). The local self-attention (L-SA) blocks, and recursive-generalization self-attention (RG-SA) blocks are alternately arranged. $\alpha_{l}$ is a learnable adaptor in the hybrid adaptive integration (HAI) of the $l^{th}$ block.
37
+
38
+ Global Attention. To reduce the computational complexity of vanilla self-attention, in addition to local design, several works attempt to propose global attention with low overheads (Wang et al., 2021; Tu et al., 2022; Yang et al., 2022; Chen et al., 2022a; Ali et al., 2021). PVT (Wang et al., 2021) designs a spatial-reduction module to merge tokens of key and value. MaxViT (Tu et al., 2022) proposes the grid attention to gain sparse global attention. ScalableViT (Yang et al., 2022) scales attention matrices from both spatial and channel dimensions. Although these methods reduce the computational complexity to a certain extent, the theoretical complexity remains quadratic, which hinders their effective application on high-resolution images. RegionViT Chen et al. (2022a) captures global information among regional tokens to alleviate the overhead of global attention. Moreover, XCiT (Ali et al., 2021) proposes a "transposed" version of self-attention that operates across channels dimension rather than the spatial dimension to achieve linear complexity. However, it cannot explicitly model the spatial relationship. In contrast, we propose the recursive-generalization self-attention (RG-SA), which can explore global spatial information in linear complexity.
39
+
40
+ # 3 METHOD
41
+
42
+ We propose the Recursive Generalization Transformer (RGT) for image SR, which is capable of capturing global context and handling high-resolution images effectively. In this section, we first introduce the architecture of RGT. Then, we focus on our proposed recursive-generalization self-attention (RG-SA) and hybrid adaptive integration (HAI).
43
+
44
+ # 3.1 OVERALL ARCHITECTURE
45
+
46
+ The overall architecture of our proposed RGT is illustrated in Fig. 1, consisting of three modules: shallow feature extraction, deep feature extraction, and image reconstruction. Given a low-resolution (LR) image $\mathbf{I}_{LR} \in \mathbb{R}^{H \times W \times 3}$ , RGT first leverages a convolutional layer as the shallow feature extraction to get the low-level feature $\mathbf{F}_0 \in \mathbb{R}^{H \times W \times C}$ , where $H$ , $W$ , and $C$ represent the image height, width, and channel number. $\mathbf{F}_0$ is used for the deep feature extraction module, which is composed of $N_1$ residual groups (RGs) and a convolutional layer. Through this module, the $\mathbf{F}_0$ is transformed into the deep feature $\mathbf{F}_d \in \mathbb{R}^{H \times W \times C}$ . Finally, the $\mathbf{F}_0$ and $\mathbf{F}_d$ are fused through a residual connection, and processed by the reconstruction module to generate the high-resolution (HR) image $\mathbf{I}_{HR} \in \mathbb{R}^{\hat{H} \times \hat{W} \times 3}$ , where $\hat{H}$ and $\hat{W}$ are the output height and width. The reconstruction module consists of pixel-shuffle (Shi et al., 2016) and convolutional layers.
47
+
48
+ Each RG contains $N_{2}$ Transformer blocks and a convolutional layer. And the residual connection is employed to ensure training stability. As shown in Fig. 1, there are two types of Transformer blocks: Local Self-Attention (L-SA) blocks and RG-SA blocks. The two types of blocks are arranged alternately to organize the topological structure. Each Transformer block is composed of two layer normalization (LN), self-attention, and multilayer perceptron (MLP) (Vaswani et al., 2017). Meanwhile, the HAI acts outside each Transformer block with a learnable adaptor $\alpha$ . In this work, we apply the recently proposed rectangle-window self-attention (Rwin-SA) (Chen et al., 2022c) as local self-attention by default. Next, we pay more attention to our proposed RG-SA and HAI.
49
+
50
+ ![](images/ce4ab6fc0b1496911a69a9f2be903e589cef983033bfd199854e35af7b365f76.jpg)
51
+ Figure 2: The illustration of the recursive-generalization self-attention (RG-SA). The RG-SA first generates the representative feature maps with constant size $(h\times w)$ , through the recursive generalization module (RGM). Then, the cross-attention between input features and representative maps is performed to capture global information. $\otimes$ denotes matrix multiplication.
52
+
53
+ # 3.2 RECURSIVE-GENERALIZATION SELF-ATTENTION
54
+
55
+ The vanilla self-attention (SA) mechanism establishes connections between all input tokens. Although it can capture global context, the SA suffers the quadratic computational complexity with image size, limiting its the application of SA in high-resolution scenarios, including image SR. To tackle this problem, we propose the recursive-generalization self-attention (RG-SA), shown in Fig. 2, that can maintain linear computational complexity while capturing global information.
56
+
57
+ The RG-SA first aggregates input image features of arbitrary resolution into compressed maps (denoted as representative feature maps), through the recursive generalization module (RGM). Intuitively, the representative maps aggregate the information of the whole image features, providing a global view of the image. Then, the cross-attention is calculated between input features and representative maps. Therefore, each token in the input image features can obtain a global receptive field. Meanwhile, we further scale the channel dimension of query, key, and value matrices in attention to mitigate the channel redundancy. It improves the performance and reduces consumption.
58
+
59
+ Recursive Generalization Module. For simplicity, our RGM only consists of depth-wise and pixelwise convolutions, shown in Fig. 2. Given an input $\mathbf{X}_{in} \in \mathbb{R}^{H \times W \times C}$ , we first compress spatial size of the features by recursively reusing a single depth-wise convolution $T = \left\lfloor \log_{s_r} \frac{H}{h} \right\rfloor$ times to obtain the rough aggregation maps $\hat{\mathbf{X}} \in \mathbb{R}^{h \times w \times C}$ , where $s_r$ is the convolution stride size, $h$ is a constant, and $w = W \times \frac{h}{H}$ . Without loss of generality, we assume $W \leq H$ , then $w \leq h$ . Next, we refine the rough aggregation maps to generate the representative maps $\mathbf{X}_r \in \mathbb{R}^{h \times w \times C_r}$ , through a $3 \times 3$ depth-wise convolution and a $1 \times 1$ point-wise convolution. The RGM is formulated as:
60
+
61
+ $$
62
+ \hat {\mathbf {X}} = \mathbf {W} _ {r} ^ {K} \left(\mathbf {X} _ {i n}\right) = \mathbf {W} _ {r} \left(\mathbf {W} _ {r} \left(\dots \left(\mathbf {W} _ {r} \left(\mathbf {X} _ {i n}\right)\right)\right)\right), \tag {1}
63
+ $$
64
+
65
+ $$
66
+ \mathbf {X} _ {r} = \mathbf {W} _ {p} \mathbf {W} _ {d} (\hat {\mathbf {X}}),
67
+ $$
68
+
69
+ where $\mathbf{W}_r$ is the depth-wise convolution with $s_r$ stride, $\mathbf{W}_d$ is the $3\times 3$ depth-wise convolution, and $\mathbf{W}_p$ is the $1\times 1$ point-wise convolution. Also, the $1\times 1$ point-wise convolution scales the channels from $C$ to $C_r = C\times c_r$ , where $c_{r}$ is the adjustment factor. Through RGM, we can aggregate the global information of the input image features. Meanwhile, the recursive design is flexible for processing inputs with varying sizes (common in image SR) by dynamically choosing the recursion times $T$ .
70
+
71
+ Cross-Attention. Subsequently, we reshape and project the input features $\mathbf{X}_{in}$ as the $\mathbf{Q} \in \mathbb{R}^{HW \times Cr}$ (query) and the representative maps as the $\mathbf{K} \in \mathbb{R}^{hw \times Cr}$ (key), and $\mathbf{V} \in \mathbb{R}^{hw \times C}$ (value) to compute the cross-attention. The attention matrix $\mathbf{A} \in \mathbb{R}^{HW \times hw}$ is calculated from the dot-product interaction of query and key. Note that we further scale the channel dimensions of query, key, and value. Overall, the whole cross-attention process is defined as:
72
+
73
+ $$
74
+ \begin{array}{l} \mathbf {Q} = \mathbf {W} _ {Q} \mathbf {X} _ {i n}, \mathbf {K} = \mathbf {W} _ {K} \mathbf {X} _ {r}, \mathbf {V} = \mathbf {W} _ {V} \mathbf {X} _ {r}, \\ \mathbf {A} = \operatorname {S o f t M a x} \left(\mathbf {Q} \mathbf {K} ^ {T} / \sqrt {C _ {r}}\right), \tag {2} \\ \end{array}
75
+ $$
76
+
77
+ Cross-Attention $(\mathbf{X}_{in},\mathbf{X}_r) = \mathbf{W}_m(\mathbf{A}\cdot \mathbf{V}),$
78
+
79
+ where $\mathbf{W}_Q\in \mathbb{R}^{C\times C_r}$ , $\mathbf{W}_K\in \mathbb{R}^{C_r\times C_r}$ , and $\mathbf{W}_V\in \mathbb{R}^{C_r\times C}$ are learnable parameters and biases are omitted for simplification; $\mathbf{W}_m\in \mathbb{R}^{C\times C}$ is the projection matrix for feature fusion. Similar to vanilla self-attention (Vaswani et al., 2017; Dosovitskiy et al., 2021), we divide the channels into
80
+
81
+ multiple "heads" and execute the attention operation in parallel. Finally, we reshape the result of cross-attention to obtain the output features $\mathbf{X}_{out} \in \mathbb{R}^{H \times W \times C}$ . Through RGM, cross-attention, and channel adjustment, our RG-SA can capture global spatial information while maintaining low computational overheads. Next, we analyze the complexity of the RG-SA in detail.
82
+
83
+ Complexity Analysis. Our RG-SA can be divided into two components: RGM and cross-attention. For RGM, the computational complexity is $\mathcal{O}(HWC)$ . For cross-attention, the computational complexity is $\mathcal{O}(hwHW(C + C_r) + HWC(C + C_r) + hwC_r(C + C_r))$ . Here, we analyze the single-head self-attention for simplicity. Since $h$ and $w$ are constants, and $C_r = C \times c_r$ , the complexity of cross-attention is $\mathcal{O}(HWC^2)$ . In general, The total computational complexity of our RG-SA is linear with the input features size $(H \times W)$ . Additionally, by applying the small $(< 1)$ adjustment factor $c_r$ , we can mitigate the channel redundancy, thus further reducing complexity.
84
+
85
+ # 3.3 HYBRID ADAPTIVE INTEGRATION
86
+
87
+ Alternate Arrangement. In RG-SA, the global information is captured through the cross-attention between input features and representative maps, ensuring low computational overheads. However, the RGM in RG-SA is a coarse-grained design, which leads to losing some local details and ultimately limits modeling global information. To improve the exploitation of the global context, we introduce local self-attention (L-SA) and combine it with our proposed RG-SA. Two attention modules are alternately arranged in each residual group (RG), as illustrated in Fig. 1.
88
+
89
+ Analysis and Motivation. Although the two blocks are integrated, the linear arrangement lacks direct interaction between features at different levels (global or local), thus still cannot exploit global information effectively. For further analysis, under the alternating topology, the input and output of each Transformer block are different level features. Specifically, the input of the RG-SA block is the local features generated from L-SA, while the output is the global features. Correspondingly, the input and output of L-SA are global and local features, respectively. This observation inspires us to enhance information fusion by combining the input and output features of each block.
90
+
91
+ Specific Design. The intuitive idea is directly integrating the input and output features via the vanilla skip connection (He et al., 2016). Nevertheless, since the misalignment between global and local features, simple addition cannot fuse features effectively. To overcome the above issues, we propose hybrid adaptive integration (HAI). As shown in Fig. 1, our HAI acts on the outside of each Transformer block. The input features are adaptively adjusted by a learnable adaptor $\alpha$ , and added to the output features. The process of the $l^{th}$ Transformer block $\mathcal{B}^l$ equipped with HAI is:
92
+
93
+ $$
94
+ Z ^ {l} = \mathcal {B} ^ {l} \left(Z ^ {l - 1}\right) + \alpha_ {l} \cdot Z ^ {l - 1}, \tag {3}
95
+ $$
96
+
97
+ where $Z^{l-1}$ and $Z^l$ represent the input and the output of the $l^{th}$ Transformer block, $\alpha_l \in \mathbb{R}^C$ is the learnable parameter in the $l^{th}$ block. Overall, the HAI is able to enhance the integration of different SA modules on the basis of the alternate arrangement, which advances the modeling of global information. Moreover, similar to the regular residual connection, our HIA encourages more information flows to the deep network layers, resulting in better performance.
98
+
99
+ Visual Results. To intuitively show the effectiveness of HAI, we visualize the relevant features of one RG-SA block (first row, $2^{nd}$ block in $1^{st}$ RG) and one L-SA block (second row, $5^{td}$ block in $1^{st}$ RG) of RGT in Fig. 3. The deeper color indicates larger weights. First, by observing columns (a) and (b), we can find great differences in the input and output of SA modules in some cases. It reveals the misalignment between global and local features. Secondly, directly fused by the vanilla skip connection, the features are
100
+
101
+ over-integrated (top of (c) column), or not changed obviously (bottom of (c) column). In contrast, through HAI, the features shown in column (d) are adaptively changed according to different blocks. It indicates that the input and output features are fused effectively. More discussions on the role of HAI and the value distribution of learnable adaptors $\alpha$ are given in Sec. 4.2.
102
+
103
+ ![](images/cf9079758accd804ec96490ce81fde06a3f7a70cf5a4c688fe5da20bcb6eed07.jpg)
104
+ Figure 3: Visualization of the features in RGT. a) Block input. (b) Block output before connection. (c) Vanilla skip connection result: directly add input to output. (d) HAI result: adjust input with $\alpha$ before adding to output. Please zoom in for a better visualization.
105
+
106
+ <table><tr><td>L-SA</td><td>RG-SA</td><td>HAI</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>✓</td><td></td><td></td><td>10.69</td><td>229.42</td><td>33.43</td><td>0.9396</td></tr><tr><td>✓</td><td>✓</td><td></td><td>10.04</td><td>183.08</td><td>33.52</td><td>0.9405</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>10.05</td><td>183.08</td><td>33.68</td><td>0.9414</td></tr></table>
107
+
108
+ (a) Break-down ablation on each component.
109
+
110
+ <table><tr><td>Method</td><td>Vanilla Skip α</td><td>Params (M) FLOPs (G) PSNR (dB)</td><td>SSIM</td></tr><tr><td>w/o HAI</td><td></td><td>10.04</td><td>183.08</td></tr><tr><td>w/ Skip</td><td>✓</td><td>10.04</td><td>183.08</td></tr><tr><td>w/ HAI</td><td>✓</td><td>10.05</td><td>183.08</td></tr><tr><td></td><td></td><td></td><td>33.68</td></tr><tr><td></td><td></td><td></td><td>0.9414</td></tr></table>
111
+
112
+ (c) Ablation study on HAI.
113
+
114
+ <table><tr><td>Method</td><td>Recursion</td><td>Cr</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>w/o Recur</td><td></td><td>0.5</td><td>10.05</td><td>274.54</td><td>33.57</td><td>0.9412</td></tr><tr><td>w/o Scale</td><td>✓</td><td>1</td><td>11.37</td><td>189.62</td><td>33.54</td><td>0.9404</td></tr><tr><td>RGT-S</td><td>✓</td><td>0.5</td><td>10.05</td><td>183.08</td><td>33.68</td><td>0.9414</td></tr></table>
115
+
116
+ (b) Ablation study on RG-SA.
117
+
118
+ <table><tr><td>Method</td><td>Params(M)</td><td>FLOPs(G)</td><td>PSNR(dB)</td><td>SSIM</td></tr><tr><td>L-SA only</td><td>10.69</td><td>229.42</td><td>33.43</td><td>0.9396</td></tr><tr><td>L-SA w/ HAI</td><td>10.69</td><td>229.42</td><td>33.44</td><td>0.9400</td></tr></table>
119
+
120
+ (d) Further ablation study on HAI.
121
+
122
+ Table 1: Ablation studies. We train models on DIV2K and Flickr2K, and test on Urban100 $(\times 2)$
123
+
124
+ # 4 EXPERIMENTS
125
+
126
+ # 4.1 EXPERIMENTAL SETTINGS
127
+
128
+ Data and Evaluation. Following recent works (Zhang et al., 2021; Magid et al., 2021; Liang et al., 2021), we choose DIV2K (Timofte et al., 2017) and Flickr2K (Lim et al., 2017) as the training data. For testing, we use five standard benchmark datasets: Set5 (Bevilacqua et al., 2012), Set14 (Zeyde et al., 2010), B100 (Martin et al., 2001), Urban100 (Huang et al., 2015), and Manga109 (Matsui et al., 2017). We conduct experiments with three upscaling factors: $\times 2$ , $\times 3$ , and $\times 4$ . The low-resolution images are generated by Bicubic (BI) downsampling. To evaluate our method, we use the metrics PSNR and SSIM (Wang et al., 2004) on the Y channel of the YCbCr space.
129
+
130
+ Implementation Details. We set two version models, RGT-S and RGT, with different computational complexity. For RGT-S, we set the residual group (RG) number $N_{1}$ as 6 and the Transformer block number $N_{2}$ for each RG as 6 for L-SA. The channel dimension number, attention head number, and mlp expansion ratio (Dosovitskiy et al., 2021) are set as 180, 6, and 2, respectively. The window size is set as $8 \times 32$ . The $s_{r}$ (stride size) and $c_{r}$ (adjustment factor) are set as 4 and 0.5 for RG-SA. The representative map size $h$ is set as 4 for training, and 16 for testing. For RGT, we increase the number of RG from 6 to 8, while other settings remain the same as RGT-S.
131
+
132
+ Training Settings. We train our models with batch size 32, where each input image is randomly cropped to $64 \times 64$ size, and the total training iterations are $500\mathrm{K}$ . Training patches are augmented using random horizontal flips and rotations with $90^{\circ}$ , $180^{\circ}$ , and $270^{\circ}$ . To keep fair comparisons, we adopt Adam optimizer (Kingma & Ba, 2015) with $\beta_{1} = 0.9$ and $\beta_{2} = 0.99$ to minimize the $L_{1}$ loss function following previous works (Zhang et al., 2018a; Dai et al., 2019; Liang et al., 2021). The initial learning rate is set as $2 \times 10^{-4}$ and reduced by half at the milestone [250K,400K,450K,475K]. We use PyTorch (Paszke et al., 2019) to implement our models with 4 Nvidia A100 GPUs.
133
+
134
+ # 4.2 ABLATION STUDY
135
+
136
+ In this section, we study the effects of different components of our method. For fair comparisons, all models adopt the same basic architecture and settings as RGT-S. We conduct experiments on the $\times 2$ factor. We adopt the dataset DIV2K (Timofte et al., 2017) and Flickr2K (Lim et al., 2017) to train models, and the iterations are 200K. The dataset Urban100 (Huang et al., 2015) is applied for testing. When we calculate the FLOPs, the input size is $3 \times 128 \times 128$ .
137
+
138
+ Effects of each component. We conduct a break-down ablation experiment to investigate the effects of each component on SR performance. The results are listed in Tab. 1a. First, baseline. The baseline model is derived by replacing all Transformer blocks in RGT-S with local self-attention (L-SA) (Liang et al., 2021; Chen et al., 2022b) block and removing HAI. We set the window size of L-SA as $8 \times 32$ , which is consistent with RGT-S. Second, applying RG-SA. We introduce the recursive-generalization self-attention (RG-SA) into the baseline, and alternately arrange L-SA and RG-SA in successive Transformer blocks. Without changing the structure of the network, the model achieves a 0.09 dB improvement. Meanwhile, compared with the baseline, the FLOPs and parameters of the model are slightly reduced. It shows that our proposed RG-SA is effective regarding parameters and computational complexity. Third, applying HAI. We further adopt the hybrid adaptive integration (HAI) and get the final version of our RGT-S. The model obtains the best performance of 33.68 dB. These results demonstrate the effectiveness of the RG-SA and HAI.
139
+
140
+ ![](images/e0392b2b82d4b23bdb3daab294eb8336cb6fc87ef883a60e393b7dc7c1068bb9.jpg)
141
+ Figure 4: CKA similarity between all pairs of Transformer blocks in RGT-S without or with HAI.
142
+
143
+ ![](images/24d3d1a501a2e45aea5ac862511f66f58ee1534829fb986e4a355a47b76acc84.jpg)
144
+ Figure 5: The value $(|\alpha| / C, C = 180)$ distribution of $\alpha$ of RGT-S.
145
+
146
+ Effects of RG-SA. We investigate the design of our recursive-generalization self-attention (RG-SA). We implement ablation experiments on the recursive operation and channel adjustment factor. The results are reported in Tab. 1b. First, the impact of recursive operation. We build the model without recursion (w/o Recur) by removing the recursive operation of RGM in RGT-S. Namely, the stride depth-wise convolution is only utilized once to generate the representative maps. We keep $s_r = 4$ and $c_r = 0.5$ unchanged. Compared with RGT-S, it can be observed that the usage of recursive operation can effectively reduce the FLOPs by $30\%$ , while achieving better performance. Second, the impact of the channel adjustment factor $c_r$ . We build and train the model without channel scaling (w/o Scale) by setting the adjustment factor $c_r$ in RGT-S as 1 (0.5 by default). Compared with RGT-S, we discover that scaling the channel dimension yields 0.14 dB performance gain, since the smaller $c_r$ mitigates the redundancy between channels, thus enhancing the feature expression.
147
+
148
+ Effects of HAI. We show the influence of the hybrid adaptive integration (HAI) in Tab. 1c. We compared three models: without HAI (w/o HAI), with vanilla skip connection (He et al., 2016) (w/ Skip), and with HAI (w/ HAI). Both skip connection and HAI act on the outside of each Transformer block. First, the impact of vanilla skip connection. Comparing the model w/o HAI and the model w/ Skip, we can find that the simple application of skip connection seriously degrades the model performance by $0.81\mathrm{dB}$ . This may be due to the misalignment between different level (global or local) features, which prevents their direct fusion. Second, the impact of HAI. In contrast, our proposed HAI adaptively adjusts the input features through a learnable adaptor $\alpha$ , thus achieving valid feature integration. With the HAI, the model obtains $0.16\mathrm{dB}$ gain.
149
+
150
+ We also apply HAI only models only with L-SA in Tab. 1d. Since there is no feature misalignment, the performance does not change much with HAI. These results are consistent with analysis in Sec. 3.3 and demonstrates the effectiveness of HAI in solving feature misalignment.
151
+
152
+ Furthermore, we further introduce centered kernel alignment (CKA) (Cortes et al., 2012; Kornblith et al., 2019; Raghu et al., 2021) to study the internal representation structure of the model. The higher the CKA score, the higher the representation similarity. We calculate CKA similarities between all Transformer blocks in RGT-S without and with HAI. The results are shown as heatmaps in Fig. 4. First, enhance module integration. There are obvious differences before and after the $30^{th}$ block, in the model without HAI. On the contrary, equipping with HAI, it can be found that the transition is more gradual, which indicates that the integration between the modules is more effective. Second, encourage information flow. We observe that there is still a high similarity between the initial blocks $(0^{th} \sim 2^{nd})$ and the very deep blocks $(28^{th} \sim 29^{th})$ in the model with HAI. It means that through HAI, more information can flow to the deep layers of the network.
153
+
154
+ We also visualize the value distribution of $\alpha$ of RGT-S in Fig. 5. We find that $\alpha$ is diverse based on different blocks, indicating its adaptability. Meanwhile, the value of $\alpha$ increases at the end block in each RG, i.e., blocks $5^{th}$ , $11^{th}$ , $17^{th}$ , and $23^{th}$ . It indicates that HAI integrates different modules.
155
+
156
+ # 4.3 COMPARISONS WITH STATE-OF-THE-ART METHODS
157
+
158
+ We compare our two models, RGT-S and RGT, with recent state-of-the-art methods: EDSR (Lim et al., 2017), RCAN (Zhang et al., 2018a), SRFBN (Li et al., 2019), SAN (Dai et al., 2019), HAN (Niu et al., 2020), CSNLN (Mei et al., 2020), NLSA (Mei et al., 2021), CRAN (Zhang et al., 2021), DFSA (Magid et al., 2021), ELAN (Zhang et al., 2022), SwinIR (Liang et al., 2021), and CAT-A (Chen et al., 2022c). Similar to previous works (Lim et al., 2017; Zhang et al., 2018a), we use self-ensemble strategy in testing and mark the model with the symbol “+”.
159
+
160
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">Scale</td><td colspan="2">Set5</td><td colspan="2">Set14</td><td colspan="2">B100</td><td colspan="2">Urban100</td><td colspan="2">Manga109</td></tr><tr><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td><td>PSNR</td><td>SSIM</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×2</td><td>38.11</td><td>0.9602</td><td>33.92</td><td>0.9195</td><td>32.32</td><td>0.9013</td><td>32.93</td><td>0.9351</td><td>39.10</td><td>0.9773</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×2</td><td>38.27</td><td>0.9614</td><td>34.12</td><td>0.9216</td><td>32.41</td><td>0.9027</td><td>33.34</td><td>0.9384</td><td>39.44</td><td>0.9786</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×2</td><td>38.11</td><td>0.9609</td><td>33.82</td><td>0.9196</td><td>32.29</td><td>0.9010</td><td>32.62</td><td>0.9328</td><td>39.08</td><td>0.9779</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×2</td><td>38.31</td><td>0.9620</td><td>34.07</td><td>0.9213</td><td>32.42</td><td>0.9028</td><td>33.10</td><td>0.9370</td><td>39.32</td><td>0.9792</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×2</td><td>38.27</td><td>0.9614</td><td>34.16</td><td>0.9217</td><td>32.41</td><td>0.9027</td><td>33.35</td><td>0.9385</td><td>39.46</td><td>0.9785</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×2</td><td>38.28</td><td>0.9616</td><td>34.12</td><td>0.9223</td><td>32.40</td><td>0.9024</td><td>33.25</td><td>0.9386</td><td>39.37</td><td>0.9785</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×2</td><td>38.34</td><td>0.9618</td><td>34.08</td><td>0.9231</td><td>32.43</td><td>0.9027</td><td>33.42</td><td>0.9394</td><td>39.59</td><td>0.9789</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×2</td><td>38.31</td><td>0.9617</td><td>34.22</td><td>0.9232</td><td>32.44</td><td>0.9029</td><td>33.43</td><td>0.9394</td><td>39.75</td><td>0.9793</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×2</td><td>38.38</td><td>0.9620</td><td>34.33</td><td>0.9232</td><td>32.50</td><td>0.9036</td><td>33.66</td><td>0.9412</td><td>39.98</td><td>0.9798</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×2</td><td>38.36</td><td>0.9620</td><td>34.20</td><td>0.9228</td><td>32.45</td><td>0.9030</td><td>33.44</td><td>0.9391</td><td>39.62</td><td>0.9793</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×2</td><td>38.42</td><td>0.9623</td><td>34.46</td><td>0.9250</td><td>32.53</td><td>0.9041</td><td>33.81</td><td>0.9427</td><td>39.92</td><td>0.9797</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×2</td><td>38.51</td><td>0.9626</td><td>34.77</td><td>0.9270</td><td>32.59</td><td>0.9050</td><td>34.32</td><td>0.9457</td><td>40.18</td><td>0.9805</td></tr><tr><td>RGT-S (ours)</td><td>×2</td><td>38.56</td><td>0.9627</td><td>34.77</td><td>0.9270</td><td>32.59</td><td>0.9050</td><td>34.47</td><td>0.9467</td><td>40.34</td><td>0.9808</td></tr><tr><td>RGT (ours)</td><td>×2</td><td>38.59</td><td>0.9628</td><td>34.83</td><td>0.9272</td><td>32.62</td><td>0.9050</td><td>34.47</td><td>0.9474</td><td>40.45</td><td>0.9810</td></tr><tr><td>RGT+ (ours)</td><td>×2</td><td>38.62</td><td>0.9629</td><td>34.88</td><td>0.9275</td><td>32.64</td><td>0.9053</td><td>34.63</td><td>0.9474</td><td>40.45</td><td>0.9810</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×3</td><td>34.65</td><td>0.9280</td><td>30.52</td><td>0.8462</td><td>29.25</td><td>0.8093</td><td>28.80</td><td>0.8653</td><td>34.17</td><td>0.9476</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×3</td><td>34.74</td><td>0.9299</td><td>30.65</td><td>0.8482</td><td>29.32</td><td>0.8111</td><td>29.09</td><td>0.8702</td><td>34.44</td><td>0.9499</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×3</td><td>34.70</td><td>0.9292</td><td>30.51</td><td>0.8461</td><td>29.24</td><td>0.8084</td><td>28.73</td><td>0.8641</td><td>34.18</td><td>0.9481</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×3</td><td>34.75</td><td>0.9300</td><td>30.59</td><td>0.8476</td><td>29.33</td><td>0.8112</td><td>28.93</td><td>0.8671</td><td>34.30</td><td>0.9494</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×3</td><td>34.75</td><td>0.9299</td><td>30.67</td><td>0.8483</td><td>29.32</td><td>0.8110</td><td>29.10</td><td>0.8705</td><td>34.48</td><td>0.9500</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×3</td><td>34.74</td><td>0.9300</td><td>30.66</td><td>0.8482</td><td>29.33</td><td>0.8105</td><td>29.13</td><td>0.8712</td><td>34.45</td><td>0.9502</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×3</td><td>34.85</td><td>0.9306</td><td>30.70</td><td>0.8485</td><td>29.34</td><td>0.8117</td><td>29.25</td><td>0.8726</td><td>34.57</td><td>0.9508</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×3</td><td>34.80</td><td>0.9304</td><td>30.73</td><td>0.8498</td><td>29.38</td><td>0.8124</td><td>29.33</td><td>0.8745</td><td>34.84</td><td>0.9515</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×3</td><td>34.92</td><td>0.9312</td><td>30.83</td><td>0.8507</td><td>29.42</td><td>0.8128</td><td>29.44</td><td>0.8761</td><td>35.07</td><td>0.9525</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×3</td><td>34.90</td><td>0.9313</td><td>30.80</td><td>0.8504</td><td>29.38</td><td>0.8124</td><td>29.32</td><td>0.8745</td><td>34.73</td><td>0.9517</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×3</td><td>34.97</td><td>0.9318</td><td>30.93</td><td>0.8534</td><td>29.46</td><td>0.8145</td><td>29.75</td><td>0.8826</td><td>35.12</td><td>0.9537</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×3</td><td>35.06</td><td>0.9326</td><td>31.04</td><td>0.8538</td><td>29.52</td><td>0.8160</td><td>30.12</td><td>0.8862</td><td>35.38</td><td>0.9546</td></tr><tr><td>RGT-S (ours)</td><td>×3</td><td>35.11</td><td>0.9328</td><td>31.05</td><td>0.8548</td><td>29.53</td><td>0.8164</td><td>30.18</td><td>0.8884</td><td>35.39</td><td>0.9548</td></tr><tr><td>RGT (ours)</td><td>×3</td><td>35.15</td><td>0.9329</td><td>31.13</td><td>0.8550</td><td>29.55</td><td>0.8165</td><td>30.28</td><td>0.8899</td><td>35.55</td><td>0.9553</td></tr><tr><td>RGT+ (ours)</td><td>×3</td><td>35.18</td><td>0.9331</td><td>31.16</td><td>0.8558</td><td>29.57</td><td>0.8170</td><td>30.40</td><td>0.8914</td><td>35.69</td><td>0.9559</td></tr><tr><td>EDSR (Lim et al., 2017)</td><td>×4</td><td>32.46</td><td>0.8968</td><td>28.80</td><td>0.7876</td><td>27.71</td><td>0.7420</td><td>26.64</td><td>0.8033</td><td>31.02</td><td>0.9148</td></tr><tr><td>RCAN (Zhang et al., 2018a)</td><td>×4</td><td>32.63</td><td>0.9002</td><td>28.87</td><td>0.7889</td><td>27.77</td><td>0.7436</td><td>26.82</td><td>0.8087</td><td>31.22</td><td>0.9173</td></tr><tr><td>SRFBN (Li et al., 2019)</td><td>×4</td><td>32.47</td><td>0.8983</td><td>28.81</td><td>0.7868</td><td>27.72</td><td>0.7409</td><td>26.60</td><td>0.8015</td><td>31.15</td><td>0.9160</td></tr><tr><td>SAN (Dai et al., 2019)</td><td>×4</td><td>32.64</td><td>0.9003</td><td>28.92</td><td>0.7888</td><td>27.78</td><td>0.7436</td><td>26.79</td><td>0.8068</td><td>31.18</td><td>0.9169</td></tr><tr><td>HAN (Niu et al., 2020)</td><td>×4</td><td>32.64</td><td>0.9002</td><td>28.90</td><td>0.7890</td><td>27.80</td><td>0.7442</td><td>26.85</td><td>0.8094</td><td>31.42</td><td>0.9177</td></tr><tr><td>CSNLN (Mei et al., 2020)</td><td>×4</td><td>32.68</td><td>0.9004</td><td>28.95</td><td>0.7888</td><td>27.80</td><td>0.7439</td><td>27.22</td><td>0.8168</td><td>31.43</td><td>0.9201</td></tr><tr><td>NLSA (Mei et al., 2021)</td><td>×4</td><td>32.59</td><td>0.9000</td><td>28.87</td><td>0.7891</td><td>27.78</td><td>0.7444</td><td>26.96</td><td>0.8109</td><td>31.27</td><td>0.9184</td></tr><tr><td>CRAN (Zhang et al., 2021)</td><td>×4</td><td>32.72</td><td>0.9012</td><td>29.01</td><td>0.7918</td><td>27.86</td><td>0.7460</td><td>27.13</td><td>0.8167</td><td>31.75</td><td>0.9219</td></tr><tr><td>DFSA (Magid et al., 2021)</td><td>×4</td><td>32.79</td><td>0.9019</td><td>29.06</td><td>0.7922</td><td>27.87</td><td>0.7458</td><td>27.17</td><td>0.8163</td><td>31.88</td><td>0.9266</td></tr><tr><td>ELAN (Zhang et al., 2022)</td><td>×4</td><td>32.75</td><td>0.9022</td><td>28.96</td><td>0.7914</td><td>27.83</td><td>0.7459</td><td>27.13</td><td>0.8167</td><td>31.68</td><td>0.9226</td></tr><tr><td>SwinIR (Liang et al., 2021)</td><td>×4</td><td>32.92</td><td>0.9044</td><td>29.09</td><td>0.7950</td><td>27.92</td><td>0.7489</td><td>27.45</td><td>0.8254</td><td>32.03</td><td>0.9260</td></tr><tr><td>CAT-A (Chen et al., 2022c)</td><td>×4</td><td>33.08</td><td>0.9052</td><td>29.18</td><td>0.7960</td><td>27.99</td><td>0.7510</td><td>27.89</td><td>0.8339</td><td>32.39</td><td>0.9285</td></tr><tr><td>RGT-S (ours)</td><td>×4</td><td>32.98</td><td>0.9047</td><td>29.18</td><td>0.7966</td><td>27.98</td><td>0.7509</td><td>27.89</td><td>0.8347</td><td>32.38</td><td>0.9281</td></tr><tr><td>RGT (ours)</td><td>×4</td><td>33.12</td><td>0.9060</td><td>29.23</td><td>0.7972</td><td>28.00</td><td>0.7513</td><td>27.98</td><td>0.8369</td><td>32.50</td><td>0.9291</td></tr><tr><td>RGT+ (ours)</td><td>×4</td><td>33.16</td><td>0.9066</td><td>29.28</td><td>0.7979</td><td>28.03</td><td>0.7520</td><td>28.09</td><td>0.8388</td><td>32.68</td><td>0.9303</td></tr></table>
161
+
162
+ Table 2: Quantitative comparison (PSNR/SSIM) with state-of-the-art methods. Best and second best results are colored with red and blue. Our methods outperforms other competitors.
163
+
164
+ Quantitative results. We show the quantitative comparisons for $\times 2$ , $\times 3$ , and $\times 4$ image SR in Tab. 2. We also report the comparisons of computational complexity (e.g., FLOPs), and parameter numbers in Tab. 3. As we can see, our proposed RGT significantly outperforms other methods on all datasets with all scaling factors. Compared with recent Transformer-based methods, such as SwinIR (Liang et al., 2021) and CAT-A (Chen et al., 2022c), our proposed RGT achieves better results, particularly on the Urban100 and Manga109 datasets. For instance, on the Urban100 dataset $(\times 2)$ , RGT outperforms CAT-A by $0.21~\mathrm{dB}$ . Meanwhile, the model size and computational complexity are lower than CAT-A. Even the small vision model, RGT-S, obtains comparable or better results than compared methods. These comparisons indicate that our proposed RGT can capture more global information compared with previous CNN-based and Transformer-based methods.
165
+
166
+ Visual Results. We show visual comparisons $(\times 4)$ in Fig. 6. We can observe that most compared methods suffer from blurring artifacts and cannot recover accurate textures in some representative challenging cases. In contrast, our RGT can alleviate the blurring artifacts better and recover more image details. For instance, in image img_059, some methods fail to reconstruct most of the strips correctly (e.g., SAN and DFSA), while some only restore part stripes (e.g., SwinIR and CAT-A). In contrast, our method recovers more precise structures. These visual comparisons demonstrate that our RGT is capable of reconstructing high-quality images by modeling global information. Combining with the quantitative comparisons, we further demonstrate the effectiveness of our method.
167
+
168
+ ![](images/7878b879debd45bf5e239268c8dd27a690d13ce102fb7ae8967b46038411a383.jpg)
169
+
170
+ ![](images/2a6743a693708e76c9b965ec8802d5641ce358a374c7282ba54c9b95b3c1e5f3.jpg)
171
+
172
+ ![](images/69ccefe92dbf3163d6d39e8235c42434b4c13a2bd954216befd1bc37ddf2bda4.jpg)
173
+ Bicubic
174
+
175
+ ![](images/5d88bfacee70f6c84f5e3ea52307b57e42b8db83264c9cc09a72f747b85f8632.jpg)
176
+ RCAN
177
+
178
+ ![](images/34f03a4aa99776eacce1dfe432c7a3680875f1046adc9d218c3d8f1b2329d603.jpg)
179
+ SAN
180
+
181
+ ![](images/3ad135bbc7d471fb94e79da4d7e5131f48bd64220c9fa21fbbc6171f7e24c1c4.jpg)
182
+ HAN
183
+
184
+ ![](images/b967d3741eebafee4f6bbde2682327288fa079cc67235a4048db1afdb0db0548.jpg)
185
+ HR
186
+ CSNLN
187
+
188
+ ![](images/5acea46368fd6a158d385df818ea96467cc3c97fb4761fdd4db6e568cfb71faf.jpg)
189
+ DFSA
190
+
191
+ ![](images/f348bee0688b6fb637ad6b51e7b362e6375209f1e799a838afff85690d3e4bd8.jpg)
192
+ SwinIR
193
+
194
+ ![](images/77c5b2416212493fcd9a8111b0d910bced53879c0b63b5ebd643f00f4b24ca09.jpg)
195
+ CAT-A
196
+
197
+ ![](images/997fbdb5243308e96e6ac71197d6ddc37b5059973fbd998d94fdaf50d46ec4ca.jpg)
198
+
199
+ ![](images/9e2d0dcced38e6e538af69976ea0ed8e64f273f930c4f891048400805096063c.jpg)
200
+ Urban100: img_059 $(\times 4)$
201
+ Urban100: img_098 (×4)
202
+
203
+ ![](images/1c0c7dd0766d89ac7620952e9b9f797cceadf52fd301eb3882c128facc435ff0.jpg)
204
+ HR
205
+
206
+ ![](images/08d829d2f9c6ecf185fb0c60a78e38114797ac2b3660ef38a0fb096e91c94305.jpg)
207
+ Bicubic
208
+
209
+ ![](images/6ca6f307894d74d883d8826597a40153ebd637695d1016a2ce4d50274c0d9aad.jpg)
210
+ RCAN
211
+
212
+ ![](images/7b3bb1c87ea479f600cc872a8151ba570cfaa6b41fc9c36d6495607db614600b.jpg)
213
+ SAN
214
+
215
+ ![](images/b33bc4cc46750b9080b16a7d2d2001270d360e74624ffae4b4849652a5910d34.jpg)
216
+ RGT (ours)
217
+ HAN
218
+
219
+ ![](images/22493c2a15a86565fba9e0e7e51d34e489643460389372155335e0f2bdbea7e2.jpg)
220
+ Manga109: Momoyama. $(\times 4)$
221
+ Figure 6: Visual comparison for image SR $(\times 4)$ in some challenging cases.
222
+
223
+ ![](images/c27353c7c085faf18de3a02d26073e4718747a01553692ce2e03ed489f16d939.jpg)
224
+
225
+ ![](images/db9c1b3b02401e36460287d5d9f5dae6cf2dc861af628936c923e50acf0fcfae.jpg)
226
+
227
+ ![](images/f8ffc68bad88965a1060fa1dadba591ed4c7ad31e291eb56538566ba8984beaa.jpg)
228
+
229
+ ![](images/427defd99fd657612cfbaa9c9f83496cc8fe33f969112048f09a58f9778efc40.jpg)
230
+
231
+ ![](images/dd05d13df2ed40bb431048ef7f1a3c775a0b469add410f19afe20ffe899c86d9.jpg)
232
+
233
+ ![](images/7b7c2dc9b032780a6a381c6e1fcab85e042060df24d78707f264b8d123032a62.jpg)
234
+ HR
235
+ CSNLN
236
+
237
+ ![](images/0432163be678f43fd9d0cb506ad778cc02d38a14548d366d398f3ec7df6b4bda.jpg)
238
+ Bicubic
239
+ DFSA
240
+
241
+ ![](images/60320c3decabaa15ea8d2241fcbb260f77a4b3f051a12f30d7c5b6fc4878b199.jpg)
242
+ RCAN
243
+ SwinIR
244
+
245
+ ![](images/3897f6cafaf97058d7f4143c04048ff298c950f4ac0059b2b45b447859b4ff61.jpg)
246
+ SAN
247
+ CAT-A
248
+
249
+ ![](images/be9c3c21fb2df4789f47340b710ccd312b49010b8a833136b5b536c9d8a029f3.jpg)
250
+ HAN
251
+ RGT (ours)
252
+
253
+ <table><tr><td>Method</td><td>EDSR</td><td>RCAN</td><td>HAN</td><td>CSNLN</td><td>SwinIR</td><td>CAT-A</td><td>RGT-S (ours)</td><td>RGT (ours)</td></tr><tr><td>Params(M)</td><td>43.09</td><td>15.59</td><td>16.07</td><td>6.57</td><td>11.90</td><td>16.60</td><td>10.20</td><td>13.37</td></tr><tr><td>FLOPs(G)</td><td>823.34</td><td>261.01</td><td>269.1</td><td>84,155.24</td><td>215.32</td><td>360.67</td><td>193.08</td><td>251.07</td></tr><tr><td>Urban100</td><td>26.64</td><td>26.82</td><td>26.85</td><td>27.22</td><td>27.45</td><td>27.89</td><td>27.89</td><td>27.98</td></tr><tr><td>Manga109</td><td>31.02</td><td>31.22</td><td>31.42</td><td>31.43</td><td>32.03</td><td>32.39</td><td>32.38</td><td>32.50</td></tr></table>
254
+
255
+ Table 3: Comparison of parameters, FLOPs, and PSNR (dB) values on Urban100 and Manga109 with scaling factor $\times 4$ . When we calculate FLOPs, the output size is $3\times 512\times 512$ .
256
+
257
+ # 4.4 MODEL SIZE ANALYSES
258
+
259
+ We further show the comparison of parameter numbers, FLOPs, and performance with recent image SR methods in Tab. 3. FLOPs are measured when the output size is set as $3 \times 512 \times 512$ , and PSNR values are tested on Urban100 and Manga109 ( $\times 4$ ). Our RGT has lower computational complexity and model size than CNN-based methods, EDSR (Lim et al., 2017) and RCAN (Zhang et al., 2018a). Compared with CSNLN (Mei et al., 2020), our RGT only requires $0.3\%$ computational complexity (i.e., FLOPs). Meanwhile, compared with the recent Transformer-based model, CAT-A, our RGT performs better, while FLOPs decreased by $30.39\%$ (109.6G) and parameters decreased by $19.46\%$ (3.23M). Compared with SwinIR (Liang et al., 2021), RGT has comparable computational complexity and model size. Furthermore, to further demonstrate the effectiveness of our method, we provide another version of the model, RGT-S, with lower FLOPs and parameters than SwinIR. Our RGT-S still obtains notable SR performance gains compared with other methods. These comparisons indicate that our method achieves a better trade-off between model complexity and performance.
260
+
261
+ # 5 CONCLUSION
262
+
263
+ We propose a new Transformer model, named Recursive Generalization Transformer (RGT), for accurate image SR. Our RGT is capable of modeling global spatial information while maintaining low computational costs. Specifically, we design the recursive-generalization self-attention (RG-SA) to extract global information effectively in linear complexity. The RG-SA computes cross-attention between the input features and the representative maps recursively aggregated from the input. Meanwhile, the channel dimensions of attention matrices are further scaled to mitigate the redundancy in the channel domain. Furthermore, to improve the exploitation of the global context, we combine RG-SA with local self-attention, and propose the hybrid adaptive integration (HAI) for module integration. The HAI acts on the outside of each Transformer block to directly fuse features at different levels (local or global). Extensive experiments on image SR demonstrate that our proposed RGT achieves superior performance over recent state-of-the-art methods.
264
+
265
+ # ACKNOWLEDGMENTS
266
+
267
+ This work was supported in part by NSFC grant (62141220, U19B2035) and Shanghai Municipal Science and Technology Major Project (2021SHZDZX0102).
268
+
269
+ # REFERENCES
270
+
271
+ Alaaeldin Ali, Hugo Touvron, Mathilde Caron, Piotr Bojanowski, Matthijs Douze, Armand Joulin, Ivan Laptev, Natalia Neverova, Gabriel Synnaeve, Jakob Verbeek, et al. Xcit: Cross-covariance image transformers. In NeurIPS, 2021.
272
+ Marco Bevilacqua, Aline Roumy, Christine Guillemot, and Marie Line Alberi-Morel. Low-complexity single-image super-resolution based on nonnegative neighbor embedding. In BMVC, 2012.
273
+ Richard Chen, Rameswar Panda, and Quanfu Fan. Regionvit: Regional-to-local attention for vision transformers. In ICLR, 2022a.
274
+ Xiangyu Chen, Xintao Wang, Jiantao Zhou, and Chao Dong. Activating more pixels in image superresolution transformer. arXiv preprint arXiv:2205.04437, 2022b.
275
+ Zheng Chen, Yulun Zhang, Jinjin Gu, Yongbing Zhang, Linghe Kong, and Xin Yuan. Cross aggregation transformer for image restoration. In NeurIPS, 2022c.
276
+ Zheng Chen, Yulun Zhang, Jinjin Gu, Linghe Kong, Xiaokang Yang, and Fisher Yu. Dual aggregation transformer for image super-resolution. In ICCV, 2023.
277
+ Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. In NeurIPS, 2021.
278
+ Corinna Cortes, Mehryar Mohri, and Afshin Rostamizadeh. Algorithms for learning kernels based on centered alignment. JMLR, 2012.
279
+ Tao Dai, Jianrui Cai, Yongbing Zhang, Shu-Tao Xia, and Lei Zhang. Second-order attention network for single image super-resolution. In CVPR, 2019.
280
+ Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Learning a deep convolutional network for image super-resolution. In ECCV, 2014.
281
+ Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. In CVPR, 2022.
282
+ Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.
283
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
284
+ Jia-Bin Huang, Abhishek Singh, and Narendra Ahuja. Single image super-resolution from transformed self-exemplars. In CVPR, 2015.
285
+ Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, 2016.
286
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
287
+ Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In NeurIPS, 2019.
288
+
289
+ Yawei Li, Yuchen Fan, Xiaoyu Xiang, Denis Demandolx, Rakesh Ranjan, Radu Timofte, and Luc Van Gool. Efficient and explicit modelling of image hierarchies for image restoration. In CVPR, 2023.
290
+ Zhen Li, Jinglei Yang, Zheng Liu, Xiaomin Yang, Gwanggil Jeon, and Wei Wu. Feedback network for image super-resolution. In CVPR, 2019.
291
+ Jingyun Liang, Jiezhang Cao, Guolei Sun, Kai Zhang, Luc Van Gool, and Radu Timofte. Swinir: Image restoration using swin transformer. In ICCVW, 2021.
292
+ Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Kyoung Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPRW, 2017.
293
+ Jie Liu, Wenjie Zhang, Yuting Tang, Jie Tang, and Gangshan Wu. Residual feature aggregation network for image super-resolution. In CVPR, 2020.
294
+ Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo.
295
+ Swin transformer: Hierarchical vision transformer using shifted windows. In ICCV, 2021.
296
+ Salma Abdel Magid, Yulun Zhang, Donglai Wei, Won-Dong Jang, Zudi Lin, Yun Fu, and Hanspeter Pfister. Dynamic high-pass filtering and multi-spectral attention for image super-resolution. In ICCV, 2021.
297
+ David Martin, Charless Fowlkes, Doron Tal, and Jitendra Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, 2001.
298
+ Yusuke Matsui, Kota Ito, Yuji Aramaki, Azuma Fujimoto, Toru Ogawa, Toshihiko Yamasaki, and Kiyoharu Aizawa. Sketch-based manga retrieval using manga109 dataset. Multimedia Tools and Applications, 2017.
299
+ Yiqun Mei, Yuchen Fan, Yuqian Zhou, Lichao Huang, Thomas S Huang, and Humphrey Shi. Image super-resolution with cross-scale non-local attention and exhaustive self-exemplars mining. In CVPR, 2020.
300
+ Yiqun Mei, Yuchen Fan, and Yuqian Zhou. Image super-resolution with non-local sparse attention. In CVPR, 2021.
301
+ Ben Niu, Weilei Wen, Wenqi Ren, Xiangde Zhang, Lianping Yang, Shuzhen Wang, Kaihao Zhang, Xiaochun Cao, and Haifeng Shen. Single image super-resolution via a holistic attention network. In ECCV, 2020.
302
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.
303
+ Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? In NeurIPS, 2021.
304
+ Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In CVPR, 2016.
305
+ Radu Timofte, Eirikur Agustsson, Luc Van Gool, Ming-Hsuan Yang, Lei Zhang, Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, Kyoung Mu Lee, et al. Ntire 2017 challenge on single image super-resolution: Methods and results. In CVPRW, 2017.
306
+ Fu-Jen Tsai, Yan-Tsung Peng, Yen-Yu Lin, Chung-Chi Tsai, and Chia-Wen Lin. Stripformer: Strip transformer for fast image deblurring. In ECCV, 2022.
307
+ Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxvit: Multi-axis vision transformer. In ECCV, 2022.
308
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
309
+
310
+ Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In ICCV, 2021.
311
+ Zhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou, Jianzhuang Liu, and Houqiang Li. Uformer: A general u-shaped transformer for image restoration. In CVPR, 2022.
312
+ Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. TIP, 2004.
313
+ Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M Alvarez, and Ping Luo. Segformer: Simple and efficient design for semantic segmentation with transformers. In NeurIPS, 2021.
314
+ Rui Yang, Hailong Ma, Jie Wu, Yansong Tang, Xuefeng Xiao, Min Zheng, and Xiu Li. Scalablevit: Rethinking the context-oriented generalization of vision transformer. In ECCV, 2022.
315
+ Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Ming-Hsuan Yang. Restormer: Efficient transformer for high-resolution image restoration. In CVPR, 2022.
316
+ Roman Zeyde, Michael Elad, and Matan Protter. On single image scale-up using sparse-representations. In Proc. 7th Int. Conf. Curves Surf., 2010.
317
+ Xindong Zhang, Hui Zeng, Shi Guo, and Lei Zhang. Efficient long-range attention network for image super-resolution. In ECCV, 2022.
318
+ Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image superresolution using very deep residual channel attention networks. In ECCV, 2018a.
319
+ Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image super-resolution. In CVPR, 2018b.
320
+ Yulun Zhang, Kunpeng Li, Kai Li, Bineng Zhong, and Yun Fu. Residual non-local attention networks for image restoration. In ICLR, 2019.
321
+ Yulun Zhang, Donglai Wei, Can Qin, Huan Wang, Hanspeter Pfister, and Yun Fu. Context reasoning attention network for image super-resolution. In ICCV, 2021.
322
+ Shangchen Zhou, Jiawei Zhang, Wangmeng Zuo, and Chen Change Loy. Cross-scale internal graph neural network for image super-resolution. In NeurIPS, 2020.
2024/Recursive Generalization Transformer for Image Super-Resolution/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45553bee82d1d589d788a1b44af40df1af93ef407697ad6eaf318aa2b1ba9fb2
3
+ size 751989
2024/Recursive Generalization Transformer for Image Super-Resolution/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Reinforcement Symbolic Regression Machine/dd628e57-bf9c-495d-be3a-2bd7785faef8_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1d413686bf123c90fb45591000c910f3baa6285b0a2aac08a916c9e3a85081b
3
+ size 2243434
2024/Reinforcement Symbolic Regression Machine/full.md ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REINFORCEMENT SYMBOLIC REGRESSION MACHINE
2
+
3
+ Yilong Xu $^{1}$ , Yang Liu $^{2}$ , Hao Sun $^{1,*}$
4
+
5
+ $^{1}$ Gaoling School of Artificial Intelligence, Renmin University of China, Beijing, China;
6
+ $^{2}$ School of Engineering Science, University of Chinese Academy of Sciences, Beijing, China;
7
+
8
+ Emails: xuyilong88@ruc.edu.cn; liuyang22@ucas.ac.cn; haosun@ruc.edu.cn
9
+
10
+ # ABSTRACT
11
+
12
+ In nature, the behavior of many complex systems can be described by parsimonious math equations. Symbolic Regression (SR) is defined as the task of automatically distilling equations from limited data. Keen efforts have been placed on tackling this issue and demonstrated success in SR. However, there still exist bottlenecks that current methods struggle to break, when the expressions we need to explore tend toward infinity and especially when the underlying math formula is intricate. To this end, we propose a novel Reinforcement Symbolic Regression Machine (RSRM) that masters the capability of uncovering complex math equations from only scarce data. The RSRM model is composed of three key modules: (1) a Monte Carlo tree search (MCTS) agent, designed for exploration, that explores optimal math expression trees consisting of pre-defined math operators and variables, (2) a Double Q-learning block, designed for exploitation, that helps reduce the feasible search space of MCTS via properly understanding the distribution of reward, and (3) a modulated sub-tree discovery block that heuristically learns and defines new math operators to improve representation ability of math expression trees. Binding of these modules yields the SOTA performance of RSRM in SR as demonstrated by multiple benchmark datasets. The RSRM shows clear superiority over several representative baseline models.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ The pursuit of mathematical expressions through data represents a crucial undertaking in contemporary scientific research. The availability of quantitative mathematical expressions to depict natural relationships enhances human comprehension and yields more precise insights. Parsing solutions offer superior interpretability and generalization compared to numerical solutions generated by neural networks. Additionally, simple expressions exhibit computational efficiency advantages over the latter. As a result, these techniques have found applications across diverse fields, e.g., discovering fundamental physical laws (Udrescu & Tegmark, 2020; Liu & Tegmark, 2021) or governing equations (Schmidt & Lipson, 2009; Chen et al., 2021; Sun et al., 2023), modeling material constitutive relations (Wang et al., 2019), and TCP congestion control Sharan et al. (2022), among many others.
17
+
18
+ The process of fitting expressions in early years involves polynomial interpolation to derive an equation, followed by the appearance of the SINDy method (Kaiser et al., 2018), which utilizes sparse regression to identify appropriate mathematical expressions based on a predefined library of candidate terms. These methods e.g., (Sun et al., 2021; Chen et al., 2021; Champion, 2019), effectively reduce the search space from an infinitely large set of possibilities to a limited fixed set of expressions, thereby narrowing down the search process. However, the applicability of this approach is limited, since the compositional structure of many equations cannot be predefined in advance. Therefore, there is a need for more comprehensive methods to search for expressions.
19
+
20
+ The Equation Learner (Martius & Lampert, 2016; Sahoo et al., 2018) model was then introduced as a novel method in symbolic learning, which incorporates symbolic operators as activation functions. This modification enabled the neural network to generate more precise and interpretable functional relationships, allowing for the discovery of intricate math expressions. However, given the compact structure of EQL, optimizing the sparse network to distill parsimonious equations is a key challenge.
21
+
22
+ Another approach involves generating optimal expression trees (Hopcroft et al., 2006), where internal nodes correspond to operators and each leaf node represents a constant or variable. By recursively
23
+
24
+ computing the expressions of the sub-trees, these expression trees can be transformed into math expressions. Initially, genetic programming (GP) (Schmidt & Lipson, 2009; Augusto & Barbosa, 2000; Gustafson et al., 2005) was employed to address these problems. Although GP showed promise, its sensitivity to parameter settings leads to instability. Deep learning methods emerged then to tackle the problem. SymbolicGPT (Valipour et al., 2021) utilizes a generative model like GPT to create expression trees, while AIFeynman (Udrescu & Tegmark, 2020) uses neural networks to analyze the relationships and dependencies between variables and search for relevant expressions. Despite its ad-hoc characteristic, the AIFeynman (Udrescu et al., 2020) method was further improved, offering faster and more precise expression search capabilities. Additionally, reinforcement learning (RL) (Sun et al., 2023) has been employed, which utilizes the Monte Carlo tree search method to explore and discover expressions, along with a module-transplant module that generates new expressions based on existing ones. Deep (RL) methods, e.g. DSR (Petersen et al., 2019), utilize recurrent neural networks to learn expression features and generate probabilities. A policy gradient search algorithm samples the probabilities to generate a batch of expressions, which are subsequently evaluated for performance. Combining DSR and GP leads to a new model called NGGP (Mundhenk et al., 2021a), which achieves better performance. Then uDSR (Landajuela et al., 2022), a comprehensive framework that combines DSR, AIFeynman, LSPT (Large-scale pre-training), GP, and LM (Linear models) emerged to enhance the efficiency and accuracy of symbolic regression. Pre-trained generative models (Holt et al., 2022) and end-to-end transformer modules (Kamienny et al., 2022; Li et al., 2022) also achieved satisfactory expression search results.
25
+
26
+ Nevertheless, the existing methods still struggle with generating lengthy and complex equations, and are faced with issues related to overfitting, e.g., poor generalizability. To overcome these challenges, we propose a model named Reinforcement Symbolic Regression Machine (RSRM) that masters the capability of uncovering complex math equations from only scarce data, composed of an RL-search agent, a GP-based expression tuning element, and a modulated sub-tree discovery (MSDB) block. The RL-search agent is designed based on the synergy between Monte Carlo tree search (MCTS) (Coulom, 2006) and double Q-learning (Hasselt, 2010) for enhanced exploration and exploitation. The GP learner is employed to fine-tune the generated expression trees (e.g., see the demonstration in (Mundhenk et al., 2021a)), while the (MSDB) block heuristically learns and defines new math operators to improve the representation ability of math expression trees.
27
+
28
+ We would like to emphasize that MSDB addresses a crucial observation that models often struggle to generate complete expressions but excel in capturing certain components. For instance, NGGP (Mundhenk et al., 2021a) may discover an expression like $x^4 - x^3 + \cos(y) + x - 1$ , while the ground truth is $x^4 - x^3 - 0.5y^2 + x$ . Notably, it successfully recovers the simplified expression $x - 0.5y^2$ with the same distribution. To this end, MSDB offers a new alternative to simplify expressions by subtracting specific components in the context of a sub-tree, as exemplified by the subtraction of $x^4 - x^3$ in the aforementioned case. Such an MSDB module takes the divide-and-conquer concept and could significantly improve the overall search performance of the RSRM model.
29
+
30
+ The aforementioned aspects form the main contributions of this paper: Our proposed RSRM model offers a novel solution to the search for mathematical expressions. By incorporating double Q-learning into MCTS, we effectively balance exploration and exploitation of SR tasks. The proposed (MSDB) block can handle equations with symmetry (reducing the complexity), and assist in dealing with long equations by identifying common patterns and defining new math operators on the fly. As a result, the RSRM model demonstrates clear superiority over several baseline models, which surpasses that of the baseline models in terms of accuracy and generalization ability.
31
+
32
+ # 2 BACKGROUND
33
+
34
+ Genetic Programming: Genetic programming (Stephens, 2016; Koza, 1994; Schmidt & Lipson, 2009) is employed to iteratively improve expression trees in order to approximate the optimal expression tree. The mutation step in GP enables random mutations in the expression tree, while genetic recombination allows for the exchange of sub-trees between expression trees, leading to the creation of new expression trees based on the knowledge acquired from previous generations. This "genetic evolution" process progressively yields highly favorable outcomes after a few generations.
35
+
36
+ Double Q-Learning: Double Q-learning (Hasselt, 2010) is a reinforcement learning algorithm designed to overcome the overestimation bias issue in traditional Q-learning. The key idea behind Double Q-learning is to use two sets of Q-values to independently estimate the value of each action in
37
+
38
+ a given state. By using two separate Q-functions, Double Q-learning can mitigate the overestimation bias of traditional Q-learning and provide more accurate value estimations, leading to better policy learning and performance in various reinforcement learning tasks.
39
+
40
+ Monte Carlo Tree Search: MCTS (Coulom, 2006) is a decision-making search algorithm that constructs a search tree representing possible game states and associated values. It employs stochastic simulations to explore the tree and determine the value of each node. This algorithm gained prominence via its adoption by the AlphaZero team (Silver et al., 2017). MCTS consists of four steps in each iteration: (1) selection, (2) expansion, (3) simulation, and (4) backpropagation. During selection, the best child node is chosen based on certain criteria. If an expandable node lacks children, it is extended by adding available children. The simulation step involves simulating the current state before selecting the next node, often using the Upper Confidence Bound for Trees (UCT) algorithm to calculate the selection probabilities, defined as $UCT(v') = \bar{Q}(v') + c\sqrt{\ln(N(v)) / N(v')}$ . Here, $\bar{Q}(v')$ means the average reward of the child node, $N(v)$ and $N(v')$ represents the number of visits to the current node and its child node, respectively, and $c$ typically represents the exploration-exploitation tradeoff parameter. The first part of the equation makes the nodes with high reward visit more often, and the second part ensures that the nodes with fewer visits have a higher probability of being selected. Finally, in the backpropagation step, the reward function evaluates child nodes, and their values are used to update the values of parent nodes in the tree. The theoretical analysis (e.g., convergence, guarantees)) of the UCT-based MCTS algorithm can be found in Shah et al. (2022).
41
+
42
+ # 3 METHOD
43
+
44
+ The RSRM model consists of a three-step symbolic learning process: RL-based expression search, GP tuning, and MSDB. With these steps, our model effectively learns and represents the relationship present in the data, facilitating accurate and interpretable modeling. The schematic representation of RSRM is depicted in Figure 1. The full settings of our model are in Appendix A.
45
+
46
+ The RL search consists of a double Q-learning empowered MCTS agent. Here, MCTS is employed for exploration (global search) that aids in generating unexplored expressions, while double Q-learning enables exploitation that captures the local distribution of equations. Additionally, we adopt a method that involves visiting each child node a specific number of times before activating double Q-learning. This approach aims to avoid excessive reliance on historical information, mitigating the
47
+
48
+ ![](images/813b9e8149f0af942cb8ac7d6a6e9df27ebcab6e2e78e637401eae64349ca237.jpg)
49
+ Figure 1: RSRM comprises several steps. First, the data is input into the data pre-processing module to determine the parity. Each epoch, the process initiates with the utilization of the MCTS module to generate expressions (Step ①). Subsequently, these expressions undergo the addition of forms and reward calculation (Step ②). The expressions are then refined through GP (Step ③), leading to more accurate expressions (Step ④). Following this, the equation forms are integrated and rewards are calculated (Step ⑤). This iterative cycle, involving MCTS and GP, continues for several rounds, ultimately resulting in the renewal of forms based on the most proficient expressions (Step ⑥).
50
+
51
+ risk of overfitting and promoting a more robust learning process. To address the challenge of lengthy and hard equations, we introduce an interpolation method (e.g., data pre-processing) to identify whether the equation exhibits symmetry prior to each search, followed by a modulated sub-tree discovery block (MSDB). If symmetry is present, we pre-process the equation accordingly to simplify the subsequent search process. This approach effectively reduces the difficulty associated with specific equations. The MSDB examines whether the few expressions that perform well adhere to a specific form. This divide-and-conquer algorithm enables a step-by-step search for equations, facilitating the generation of long expressions.
52
+
53
+ # 3.1 EXPRESSION TREE
54
+
55
+ The objective of SR can be transformed into the generation of an optimal expression tree (Hopcroft et al., 2006), which represents a mathematical expression. The expression tree consists of internal
56
+
57
+ ![](images/283e2d091cf0c43ece91de4a22df7b0ba2a52c3bc3b4d5f888193f627d5d0678.jpg)
58
+ Figure 2: Schematic of the proposed RL search. MCTS selects functions based on the maximum reward, expands them using the results of double Q-learning, simulates node selection through the UCT function, randomly fills the current tree, and provides rewards to double Q-learning to train. Once the generation is complete, the rewards are back-propagated to the parent node.
59
+
60
+ nodes that correspond to operators (e.g., $+, -, \times, \div$ , log, exp, sin, cos) and leaf nodes that correspond to constants (e.g., 1, 2) or variables (e.g., $x$ ). By recursively computing the expressions of the subtrees, the expression tree can be transformed into mathematical expressions. The process of generating an expression tree follows a recursive method where operators are added until no more can be added. This approach simplifies the task of creating expressions as it focuses on constructing the expression tree, which can be easily generated using recursive techniques.
61
+
62
+ In contrast to previous methods, we employ a hierarchical traversal strategy for generating expression trees. This is motivated by the Monte Carlo tree search algorithm, where conducting more searches on vertices that are filled earlier is deemed more beneficial. In the context of constructing expression trees, this implies that higher-level nodes in the tree carry greater significance. Consequently, We use a hierarchical construction method to build the expression tree layer by layer, similar to the hierarchical traversal of trees.
63
+
64
+ # 3.2 REINFORCEMENT LEARNING GUIDED SEARCH
65
+
66
+ The search step relies on the double Q-learning and MCTS algorithms, which are shown in Figure 2. The specific algorithm is shown in Algorithm 1.
67
+
68
+ Reward function: The reward function used in our approach is based on the root mean square error (RMSE) and is designed to evaluate the fit of the generated equations to the measured data. It promotes concise and accurate expressions by assigning higher rewards to shorter and more precise functions. Inspired by the SPL approach (Sun et al., 2023), the reward function is computed by:
69
+
70
+ $$
71
+ \mathcal {R} = \frac {\eta^ {l}}{1 + \sqrt {\sum_ {i = 1} ^ {n} \left(y _ {i} - \hat {y} _ {i}\right) ^ {2}}}, \tag {1}
72
+ $$
73
+
74
+ where $\eta$ is a discount factor promoting concise trees, and $l$ is the number of nodes in the expression tree. $y_{i}$ and $\hat{y}_i$ the true and the predicted values generated by the MSDB with the output of Reinforcement Learning Search of the $i$ th data point, respectively. Using this reward function, our approach encourages the discovery of equations that minimize the RMSE and favors shorter and more concise expressions, leading to higher reward values for functions that provide better fits to the data.
75
+
76
+ Algorithm 1 Expression generation by RSRM
77
+ Input: dataset $S_{data}$ , expression form $\mathcal{F}$
78
+ Parameters: discount rate $\eta$ , UCT const $c$ , minimum selected times $n_0$
79
+ Outputs: best expression
80
+ Initiate $S$ as top of MTCS
81
+ Selection:
82
+ $a \gets$ children of $S$ with maximum $\mathcal{R}$ $S$ take action $a$
83
+ Simulation:
84
+ $S' \gets S$
85
+ repeat
86
+ if children of $S$ is empty then Expand $S'$
87
+ end if
88
+ if $\exists x \in$ children of $S' \rightarrow (N(x) < n_0)$ then $a' \gets x$
89
+ else $a' \gets$ randomly choose child of $S'$ by UCT
90
+ end if
91
+ $S'$ take action $a', S'' \gets S'$ , Fill up randomly $S''$
92
+ double Q-learning $\gets S', a', \mathcal{R}$ of $S''$
93
+ until $S'$ is full
94
+ Expansion
95
+ children of $S \rightarrow$ double Q-learning $\rightarrow p_{\text{children}}$
96
+ Back-propagate
97
+ Back-propagate $\mathcal{R}$ of $S'$ based on $\mathcal{F}$
98
+
99
+ Greedy selection: Our method employs greedy selection, similar to Sun et al. (2023). Instead of selecting the token with the highest UCT score, we choose the token that currently yields the best reward (Eq. 1). This ensures the selection of tokens leading to expressions resembling the current best one, potentially resulting in improved expressions, yet, increasing the possibility of overfitting. Note that UCT is employed during the MCTS simulation while the greedy selection of the maximum reward is applied to choose the optimal expression tree.
100
+
101
+ Simulated reward: At each token generation, the entire expression tree is randomly completed based on the current tree. The reward is then computed using the reward function and fed back to double Q-learning for training. This approach avoids excessive rounds of learning at the top node and filters out irrelevant nodes initially.
102
+
103
+ Parameter optimization: After an expression tree is built, we need to fill the parameter (i.e., equation coefficients) placeholders in it. We treat each placeholder as an unknown variable, which is optimized to maximize the reward. The BFGS (Roger Fletcher & Sons, 2013) algorithm, available in the scipy (Virtanen et al., 2020) module in Python, is used for optimization. In contrast to the approach in DSR (Petersen et al., 2019), we find that Gaussian random numbers with a unit mean and variance provide more effective initial values for optimization (see further information in Appendix Section C.6 where we test the performance of the model with different initial values).
104
+
105
+ # 3.3 MODULATED SUB-TREE DISCOVERY
106
+
107
+ We incorporate three specific sub-tree expression forms to enhance the exploration and analysis of equations, where $\mathcal{A}$ represents a fixed form and $f(x)$ a learnable part, explained as follows:
108
+
109
+ - $\mathcal{A} + f(x)$ : This search form focuses on identifying expressions of the form like $e^x - x$ and $e^x + x$ . By recognizing this pattern, we can effectively explore and analyze equations that follow the structure of $e^x + f(x)$ .
110
+ - $\mathcal{A} \times f(x)$ : In this search form, we obtain good expressions such as $1.57e^{x}$ and $1.56e^{x} + x$ , aiming to detect equations of the form $e^{x} \times f(x)$ .
111
+ - $\mathcal{A}^{f(x)}$ : The search form $\mathcal{A}^{f(x)}$ is designed to recognize equations like $(e^x)^{2.5}$ and $(e^x)^e$ , indicating the presence of expressions in the form $(e^x)^{f(x)}$ .
112
+
113
+ Our approach involves the establishment of these forms based on the initial token of the expression tree, because the root of an expression tree serves as a focal point, indicating the primary operation or function in the expression. Thus, we separate the sub-tree forms based on it. Specifically, if the first
114
+
115
+ token corresponds to addition (+) or subtraction (-), the method proceeds to learn the generation of the left and right sides of the respective operators. Similarly, for tokens such as multiplication $(\times)$ , division $(\div)$ , or exponentiation $(\hat{\cdot})$ , a similar procedure is followed. In the case of unary expressions, such as trigonometric functions (sin and cos), the MCTS and GP models effortlessly derive the complete expression. Therefore, while our method involves a degree of empirical design in identifying the sub-tree expression forms, it possesses a universal nature.
116
+
117
+ The complete form-discovery algorithm, which outlines the procedure for selecting and generating the search form among the three options, is provided in Algorithm 2 and Appendix Figure S1.
118
+
119
+ Algorithm 2 Search for the form of the expression through the generated expressions
120
+ Input: best expression set $S_{best}$
121
+ Parameters: selection ratio $k_{s}$ , expression percentage ratio $k_{p}$ , maximum select number $N$
122
+ Output: the form of the expression $\mathcal{F}$ $l\gets$ length of $(S_{best})$
123
+ Sort $S_{best}$ by $\mathcal{R}$ decent
124
+ for i in 1,2...l do if $i\leq N$ and $\mathcal{R}(S_{best}[i])\geq k\times \mathcal{R}_{max}$ then If number of $\mathcal{G}$ exceeds or $\mathcal{R}$ is low, break out $\mathcal{D} = \mathcal{D} + \mathrm{Split}(S_{best}[i])$ Occurrences of function in Split-by-addition( $S_{best}[i]) + 1$ end if
125
+ end for
126
+ $\mathcal{G}_0\gets \mathcal{D}$ with maximum number of occurrences.
127
+ if $\exists \mathcal{C}\notin Z\to \mathcal{G}_0 = \mathcal{A}^{\mathcal{C}}$ then $\mathcal{F} = \mathcal{A}^{f(x)}$ The form is $\mathcal{A}^{f(x)}$ $Z$ means integer set. else if $\exists \mathcal{C}\notin Z\to \mathcal{G}_0 = \mathcal{A}\times \mathcal{C}$ then $\mathcal{F} = \mathcal{A}\times f(x)$ The form is $\mathcal{A}\times f(x)$
128
+ else
129
+ $\mathcal{F} = f(x)$ The form is $\mathcal{A}\pm F(x)$
130
+ for $\mathcal{G}$ in D do if Occurrences of $\mathcal{G}\geq l\times k_p$ then $\mathcal{F} = \mathcal{F} + \mathcal{G}$ Add G to A
131
+ end if
132
+ end for
133
+ end if
134
+
135
+ Splitting by Addition: In this step, we convert the formula, which is represented as a token set, into a string using a library like sympy (Meurer et al., 2017). Then we expand the expression into a sum of simpler expressions. Next, we split the expanded expression into multiple simple expressions using sum or difference notation. In this way, we convert $[+, \times, -, x, y, z, \log, x]$ to $x \times y + z - \log(x)$ , and then transforms it to $xy, z, -\log(x)$ .
136
+
137
+ Once the expression is refined into its desired form, the subsequent search becomes more manageable. For instance, in the case of aiming to derive $\exp (x^{2}) + x^{4} + x^{3} + 0.5\log (x)$ , we can break down the search. Initially, we generate $\exp (x^2) + \ldots$ to identify the form $\exp (x^{2}) + f(x)$ , and then extend this to $\exp (x^{2}) + x^{4} + x^{3} + f(x)$ , simplifying the process of obtaining $\exp (x^{2}) + x^{4} + x^{3} + 0.5\log (x)$ .
138
+
139
+ Inspired by the approach proposed by Udrescu & Tegmark (2020), we introduce a data pre-processing module to determine the potential parity of the underlying equation. The cubic splines (Catmull & Rom, 1974) are applied for equation fitting, generating a function. Subsequently, this function is used to compute the relationship between $y(-x)$ and $y(x)$ , enabling the determination of whether $y(x)$ is an odd, even, or neither function, where $y(x)$ is the relation of $x$ and $y$ in given data.
140
+
141
+ When the error (RMSE) between $y(-x)$ and $y(x)$ remains below constant $E_{sym}$ , the function is considered even with respect to $x$ . Negative values of the independent variables are transformed to their absolute values, while retaining the dependent variable values. Further exploration is conducted using the form of $\hat{y} = (g(x) + g(-x)) / 2$ to make it discover specific forms.
142
+
143
+ Similarly, if the error between $y(-x)$ and $y(x)$ is within the limit constant $E_{sym}$ , the function is classified as odd relative to $x$ . Negative values of the independent variables are converted to absolute values, and the dependent variable values are inverted. The search continues employing the form of $\hat{y} = (g(x) - g(-x)) / 2$ to make it odd in discovering specific forms.
144
+
145
+ Once the expression is refined to its parity form, the difficulty of searching for the expression is reduced. If we want to get $\cosh (x)$ , we only need to generate $\exp (x)$ after parity determination. Such a partitioning strategy has been used in the past, e.g., Petersen et al. (2019) using sub-trees as new tokens, Sun et al. (2023) using transplanted sub-trees, Udrescu & Tegmark (2020) using problem
146
+
147
+ Table 1: Recover rate (\%) of several difficult equations in symbolic regression: trigonometric functions and sum of multiple power functions with parameter $\frac{1}{2}$ in Nguyen; power functions and trigonometric functions in Nguyen $^c$ , trigonometric functions and hyperbolic function and functions with weird power in Livermore; rational functions in R and $\mathbf{R}^0$ (where $x = 0, y = 0$ add to dataset).
148
+
149
+ <table><tr><td>Benchmark</td><td>Equation</td><td>Ours</td><td>SPL</td><td>uDSR</td><td>NGGP</td><td>DSR</td><td>GP</td></tr><tr><td>Nguyen-5</td><td>sin(x12)cos(x1) - 1</td><td>100</td><td>95</td><td>55</td><td>80</td><td>72</td><td>12</td></tr><tr><td>Nguyen-12</td><td>x14 - x13 - 0.5x22 + x2</td><td>100</td><td>28</td><td>30</td><td>21</td><td>0</td><td>0</td></tr><tr><td>Nguyen-2c</td><td>0.48x14 + 3.39x13 + 2.12x12 + 1.78x1</td><td>100</td><td>94</td><td>100</td><td>98</td><td>90</td><td>0</td></tr><tr><td>Nguyen-9c</td><td>sin(1.5x1) + sin(0.5x22)</td><td>100</td><td>96</td><td>0</td><td>90</td><td>65</td><td>0</td></tr><tr><td>Livermore-3</td><td>sin(x13)cos(x12) - 1</td><td>55</td><td>15</td><td>0</td><td>2</td><td>0</td><td>0</td></tr><tr><td>Livermore-7</td><td>sinh(x1)</td><td>100</td><td>18</td><td>0</td><td>24</td><td>3</td><td>0</td></tr><tr><td>Livermore-16</td><td>x2/5</td><td>100</td><td>40</td><td>60</td><td>26</td><td>10</td><td>5</td></tr><tr><td>Livermore-18</td><td>sin(x12)cos(x1) - 5</td><td>100</td><td>80</td><td>59</td><td>33</td><td>0</td><td>0</td></tr><tr><td>AIFeynman-9</td><td>x1 + x2 + 2√x1x2cos(x3)</td><td>67</td><td>0</td><td>8</td><td>7</td><td>0</td><td>0</td></tr><tr><td>AIFeynman-10</td><td>1/2x1(x22 + x32 + x42)</td><td>15</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>R-10</td><td>(x1 + 1)3/(x12 - x1 + 1)</td><td>49</td><td>0</td><td>17</td><td>2</td><td>0</td><td>0</td></tr><tr><td>R-20</td><td>(x15 - 3x13 + 1)/(x12 + 1)</td><td>89</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>R-30</td><td>(x15 + x16)/(x14 + x13 + x12 + x1 + 1)</td><td>91</td><td>0</td><td>0</td><td>4</td><td>0</td><td>0</td></tr></table>
150
+
151
+ decomposition. Our main innovation is the use of partial sub-trees separated according to the plus sign as part of the new expression.
152
+
153
+ Also, we conduct a parity determination performance test to compare the efficiency and effectiveness of form discovery by AIfeynman and our method. The experiment setting and results are given in Appendix G. It shows that our method (based on cubic splines) outperforms AIfeynman (based on MLP) in terms of higher accuracy and smaller data requirements.
154
+
155
+ # 4 RESULTS
156
+
157
+ We test the performance of our method on multiple different datasets and compare it with the following baseline models in symbolic learning: SPL (Sun et al., 2023), DSR (Petersen et al., 2019), NGGP (Mundhenk et al., 2021a), uDSR (Landajuela et al., 2022), DGSR (Holt et al., 2022), gplearn (Stephens, 2016), and AFPFE (Schmidt & Lipson, 2010). The description of each baseline along with parameter setting is found in Appendix B.
158
+
159
+ # 4.1 BASIC BENCHMARKS
160
+
161
+ ![](images/6942bb9c3734b157ef1e6dccdcfe76d9895c6e1f381f9cbfd18225e33ab7ae00.jpg)
162
+
163
+ ![](images/21d8bcdfe9a16c0eff85e748c275bac01694d782ce8d50d28f6dc83978bcdbcd.jpg)
164
+ Figure 3: Recover rates of benchmark datasets. a, Basic benchmarks (detailed results shown in Appendix C). b, SRbench dataset (detailed results found in Appendix D and Appendix Figure S3), where the symbol $\#$ denotes the presence of noise with a mean of $10^{-3}$ added to the target values and $*$ represents missing data in the literature.
165
+
166
+ To evaluate the efficiency of our model, we first utilize four basic benchmark datasets (see Appendix C for details): Nguyen (Uy et al., 2011), Nguyen $^c$ (McDermott et al., 2012), R (Mundhenk et al., 2021b), Livermore (Mundhenk et al., 2021b), and AIfeynman (Udrescu & Tegmark, 2020). Note that parameter optimization (e.g., calibration of the equation coefficients) is prohibited in this experiment except the Nyugen $^c$ dataset.
167
+
168
+ We employ the recovery rate as the evaluation metric, which measures the number of times the correct expression is recovered across multiple independent repetitions of a test. Note that this metric ensures that the model's output exactly matches the target expression.
169
+
170
+ We summarize the comparison of recovery rates for several difficult expressions on the five benchmark datasets listed in Table 1. The results demonstrate that our model performs well on these complex expressions. Furthermore, we compared the mean recovery rates of all equations on each benchmark (see Figure 3a and Appendix C). Our method outperforms other approaches, achieving the highest recovery rates for all benchmark expressions.
171
+
172
+ We also conducted an experiment on the trade-off between accuracy and the number of evaluations in the Nyugen Benchmark. Details of this experiment are given in Appendix Section C.7.
173
+
174
+ # 4.2 SRBENCH DATASET
175
+
176
+ We further tested our model's ability to learn more complex equations with noisy training data using the SRbench dataset La Cava et al. (2021), where parameter optimization is allowed. This dataset comprises 252 datasets sourced from Romano et al. (2021). We specifically concentrated on 131 of these datasets equipped with ground truth equations, which were drawn from two primary sources, namely, AIfeynman (Udrescu & Tegmark, 2020) and Strogatz (Strogatz, 2014) datasets.
177
+
178
+ Our evaluation encompassed a spectrum of baseline models from SRBench, as well as more contemporary approaches like uDSR (Landajuela et al., 2022) and DGSR (Holt et al., 2022). The recovery rate results of each method for different testing datasets (e.g., all datasets, only Feynman, only Strogatz) and noise effect can be found in Figure 3b. Here, the results for the AIfeynman dataset in Figure 3b are inconsistent with Figure 3a since parameter optimization is prohibited in a but engraved in b. Notably, our MSDB module demonstrated proficiency in handling intricate equations, such as the challenging example $-\left(32x_{1}^{4}x_{3}^{2}x_{4}^{2}\left(x_{3} + x_{4}\right)\right) / \left(5x_{2}^{5}x_{5}^{5}\right)$ , which can be effectively discovered through the form $\left(Cx_{1}^{4}\right) / \left(x_{2}^{5}x_{5}^{5}\right) \times f(x)$ . Additionally, numerous equations, like $-10 / 3x_{1}^{3} - 10 / 3x_{1} + 10x_{2}$ , were successfully identified by aggregating multiple smaller equations, a feat achievable through the form $Cx_{1}^{3} + f(x)$ . Consequently, our model exhibited proficiency in uncovering a wide range of equations. The comparative analysis in Figure 3b clearly illustrates the superior performance of our approach in comparison with other baseline models.
179
+
180
+ We further tested our model by discovering a surrogate formula to approximate the cumulative density function (CDF) of a normal distribution, e.g., $F(x,\mu ,\sigma) = \int_{-\infty}^{x}\frac{1}{\sqrt{2\pi}\sigma}\exp \left[-(t - \mu)^2 /(2\sigma^2)\right]dt$ , where $\mu$ and $\sigma$ denote the mean and standard deviation. Since this equation lacks an explicit elementary expression, finding a parsimonious equation for approximation based on a small training set is intractable. Nevertheless, our model shows a great capability of approximating the CFD with generalizability (see Appendix Section F for more details).
181
+
182
+ # 4.3 FREE-FALLING BALLS DATASET
183
+
184
+ We conducted an experimental evaluation on the free-falling balls dataset to assess the parametric learning capability of our model. The dataset consisted of experimental data of balls dropped from a bridge, as described in de Silva et al. (2020). The dataset comprised 20-30 observations of a ball throw height within the first 2 seconds, aiming to learn the equation governing the ball's
185
+
186
+ Table 2: MSE of free-falling balls dataset. Details of the equations generated by different models are shown in Appendix E.
187
+
188
+ <table><tr><td>Benchmark</td><td>Ours</td><td>Ours*</td><td>SPL</td><td>M-A</td><td>M-B</td><td>M-C</td></tr><tr><td>baseball</td><td>0.053</td><td>0.068</td><td>0.300</td><td>2.798</td><td>94.589</td><td>3.507</td></tr><tr><td>blue basketball</td><td>0.008</td><td>0.027</td><td>0.457</td><td>0.513</td><td>69.209</td><td>2.227</td></tr><tr><td>bowling ball</td><td>0.014</td><td>0.034</td><td>0.003</td><td>0.33</td><td>87.02</td><td>3.167</td></tr><tr><td>golf ball</td><td>0.006</td><td>0.041</td><td>0.009</td><td>0.214</td><td>86.093</td><td>1.684</td></tr><tr><td>green basketball</td><td>0.094</td><td>0.045</td><td>0.088</td><td>0.1</td><td>85.435</td><td>1.604</td></tr><tr><td>tennis ball</td><td>0.284</td><td>0.068</td><td>0.091</td><td>0.246</td><td>72.278</td><td>0.161</td></tr><tr><td>volleyball</td><td>0.033</td><td>0.025</td><td>0.111</td><td>0.574</td><td>80.965</td><td>0.76</td></tr><tr><td>whiffle ball 1</td><td>0.038</td><td>0.660</td><td>1.58</td><td>1.619</td><td>65.426</td><td>0.21</td></tr><tr><td>whiffle ball 2</td><td>0.041</td><td>0.068</td><td>0.099</td><td>0.628</td><td>58.533</td><td>0.966</td></tr><tr><td>yellow whiffle ball</td><td>1.277</td><td>1.080</td><td>0.428</td><td>17.341</td><td>44.984</td><td>2.57</td></tr><tr><td>orange whiffle ball</td><td>0.031</td><td>0.368</td><td>0.745</td><td>0.379</td><td>36.765</td><td>3.257</td></tr><tr><td>Average</td><td>0.173</td><td>0.242</td><td>0.356</td><td>2.24</td><td>71.02</td><td>1.828</td></tr></table>
189
+
190
+ drop and predict the height between 2 and 3 seconds. Since an exact solution for this dataset is not available, we employed the mean squared error (MSE) as our evaluation metric.
191
+
192
+ We consider two sets of RSRM models, the standard one and the one named RSRM* (denoted by Ours* in Table 2) that fixes the expression form $c_4x^3 + c_3x^2 + x_2x + c_1 + f(x)$ . We compared these models with the baseline method SPL (Sun et al., 2023), since other models tend to have large generalization errors due to the limited data points (20-30 per training set) in the falling balls benchmark given the fact that the exact solution is unknown. Three physics models derived from mathematical principles were selected as baseline models for this experiment, and the unknown constant coefficient values were estimated using POWELL (1964). The equations of the baseline models are presented as follows. M-A: $h(t) = c_1t^3 + c_2t^2 + c_3t + c_4$ , M-B: $h(t) = c_1\exp(c_2t) + c_3t + c_4$ , and M-C: $h(t) = c_1\log(\cosh(c_2t)) + c_3$ .
193
+
194
+ The results (see Table 2) show that in most cases, the RSRM model performs better than SPL. The RSRM model can successfully find the equation of motion for uniformly accelerated linear motion $(c_{1}x^{2} + c_{2}x + c_{3} + f(x))$ and search for additional terms to minimize the training error. This leads to improved results compared to SPL. However, there are cases where RSRM makes mistakes, such as obtaining expressions in the form of $c_{1}\cos (x)^{2} + c_{2} + f(x)$ when searching for the yellow whiffle ball. This increases the generalization error and reduces the overall effectiveness compared to SPL. Overall, RSRM outperforms SPL in physics equation discovery, demonstrating its effectiveness in solving parametric learning tasks on the free-falling balls dataset.
195
+
196
+ # 5 ABLATION STUDY
197
+
198
+ We conducted ablation studies on the Livermore dataset, namely, ablations of the double Q-learning (M-A), the MCTS algorithm (M-B), the MSDB (M-C), the pre-processing step (M-D), and GP (M-E), respectively. We list some of expressions affected by the performance of the model in Table 3.
199
+
200
+ Table 3: Ablation recovery rate $(\%)$ of the Livermore dataset. The specific recovery rates are further shown in Appendix H.
201
+
202
+ <table><tr><td>Equation</td><td>Ours</td><td>M-A</td><td>M-B</td><td>M-C</td><td>M-D</td><td>M-E</td></tr><tr><td>sin(x12)cos(x1)-2</td><td>100</td><td>100</td><td>100</td><td>6</td><td>100</td><td>100</td></tr><tr><td>sin(x31)cos(x2)-1</td><td>55</td><td>20</td><td>0</td><td>0</td><td>55</td><td>0</td></tr><tr><td>sinh(x1)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>10</td><td>100</td></tr><tr><td>∑k=19xk/3</td><td>100</td><td>83</td><td>100</td><td>88</td><td>100</td><td>67</td></tr><tr><td>x1</td><td>100</td><td>100</td><td>100</td><td>67</td><td>100</td><td>100</td></tr><tr><td>x2/5</td><td>100</td><td>100</td><td>100</td><td>12</td><td>100</td><td>33</td></tr><tr><td>Average:</td><td>97.95</td><td>94.36</td><td>93.64</td><td>80.45</td><td>89.45</td><td>84.95</td></tr></table>
203
+
204
+ When the double Q-learning module is removed, Model A with only MCTS experiences a decrease in knowledge from previous iterations. This results in reduced search efficiency but increased diversity. As a result, we observe a decrease in performance for equations like $\sum_{k=1}^{9} x^k$ , while equations like $\sin(x_1^3) \cos(x_1^2) - 1$ show improved performance. On the other hand, when the MCTS module is removed, Model B with pure double Q-learning tends to overfit more quickly. Consequently, it struggles to produce the most challenging equations, such as $\sin(x_1^3) \cos(x_1^2) - 1$ . Similarly, the absence of the expression form search module in Model C limits its ability to discover complex expressions with simple forms, such as $x_1^{1/3}$ and $\sin(x_1^3) \cos(x_1^2) - 1$ . Lastly, Model D, without the preprocessing module, suffers a significant reduction in its ability to search for odd and even functions like $\sinh(x_1)$ . The removal of the genetic algorithm (M-E) resulted in decreased efficiency across all expression searches. While simpler expressions such as $x_1^{1/3}$ still performed adequately, the performance for complex expressions notably deteriorated.
205
+
206
+ These observations highlight the importance of all the modules in RSRM. Each module contributes to the overall performance and enables the model to tackle different types of equations effectively.
207
+
208
+ # 6 CONCLUSION
209
+
210
+ We have proposed a novel model RSRM that integrates RL techniques, GP, and a modulated sub-tree discovery block to improve the search process for mathematical expressions. Our model outperforms the state-of-the-art baselines in the context of accurately recovering the exact equations for various datasets, and demonstrates superior generalization capabilities. However, one limitation of our current model is the lack of flexibility in setting the expression form as it currently encompasses only three fixed types, which restricts its adaptability to different problem domains. We anticipate future advancements in more flexible methods, e.g., potentially incorporating neural networks to generate slots for SR, utilizing other Q-learning techniques such as prioritized experience replay (Schaul et al., 2015) to enhance the exploitation, etc. Furthermore, we believe that our approach has the potential to be extended to other domains, such as reinforcement learning control tasks. By applying our method to diverse areas, we aim to enhance the performance and applicability of SR techniques.
211
+
212
+ # ACKNOWLEDGMENTS
213
+
214
+ The work is supported by the National Natural Science Foundation of China (No. 92270118), which is greatly acknowledged. Code and models of Reinforcement Symbolic Regression Machine(RSRM) are available at https://github.com/intell-sci-comput/RSRM.
215
+
216
+ # REFERENCES
217
+
218
+ Douglas Adriano Augusto and Helio JC Barbosa. Symbolic regression via genetic programming. In Proceedings. Vol. 1. Sixth Brazilian Symposium on Neural Networks, pp. 173-178. IEEE, 2000.
219
+ Edwin Catmull and Raphael Rom. A class of local interpolating splines. In Computer aided geometric design, pp. 317-326. Elsevier, 1974.
220
+ Kathleen Champion. From data to dynamics: discovering governing equations from data. PhD thesis, 2019.
221
+ Zhao Chen, Yang Liu, and Hao Sun. Physics-informed learning of governing equations from scarce data. Nature Communications, 12(1):6136, 2021.
222
+ Rémi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In International Conference on Computers and Games, 2006.
223
+ Brian M de Silva, David M Higdon, Steven L Brunton, and J Nathan Kutz. Discovery of physics from data: Universal laws and discrepancies. Frontiers in artificial intelligence, 3:25, 2020.
224
+ Steven Gustafson, Edmund K Burke, and Natalio Krasnogor. On improving genetic programming for symbolic regression. In 2005 IEEE Congress on Evolutionary Computation, volume 1, pp. 912-919. IEEE, 2005.
225
+ Hado Hasselt. Double q-learning. Advances in Neural Information Processing Systems, 23, 2010.
226
+ Samuel Holt, Zhaozhi Qian, and Mihaela van der Schaar. Deep generative symbolic regression. In International Conference on Learning Representations, 2022.
227
+ J. E. Hopcroft, R. Motwani, and J. D. Ullman. Automata theory, languages, and computation. Pearson Education, 2006.
228
+ Eurika Kaiser, J Nathan Kutz, and Steven L Brunton. Sparse identification of nonlinear dynamics for model predictive control in the low-data limit. Proceedings of the Royal Society A, 474(2219): 20180335, 2018.
229
+ Pierre-Alexandre Kamienny, Stéphane d'Ascoli, Guillaume Lample, and François Charton. End-to-end symbolic regression with transformers. arXiv preprint arXiv:2204.10532, 2022.
230
+ John R Koza. Genetic programming as a means for programming computers by natural selection. Statistics and computing, 4:87-112, 1994.
231
+ William La Cava, Patryk Orzechowski, Bogdan Burlacu, Fabricio de Franca, Marco Virgolin, Ying Jin, Michael Kommenda, and Jason Moore. Contemporary symbolic regression methods and their relative performance. In J. Vanschoren and S. Yeung (eds.), Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, volume 1. Curran, 2021. URL https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/c0c7c76d30bd3dcaefc96f40275bdc0a-Paper-round1.pdf.
232
+ Mikel Landajuela, Chak Shing Lee, Jiachen Yang, Ruben Glatt, Claudio P Santiago, Ignacio Aravena, Terrell Mundhenk, Garrett Mulcahy, and Brenden K Petersen. A unified framework for deep symbolic regression. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 33985-33998, 2022.
233
+ Wenqiang Li, Weijun Li, Linjun Sun, Min Wu, Lina Yu, Jingyi Liu, Yanjie Li, and Songsong Tian. Transformer-based model for symbolic regression via joint supervised learning. In The Eleventh International Conference on Learning Representations, 2022.
234
+
235
+ Ziming Liu and Max Tegmark. Machine learning conservation laws from trajectories. Physical Review Letters, 126(18):180604, 2021.
236
+ Georg Martius and Christoph H Lampert. Extrapolation and learning equations. arXiv preprint arXiv:1610.02995, 2016.
237
+ James McDermott, David R White, Sean Luke, Luca Manzoni, Mauro Castelli, Leonardo Vanneschi, Wojciech Jaskowski, Krzysztof Krawiec, Robin Harper, Kenneth De Jong, et al. Genetic programming needs better benchmarks. In Proceedings of the 14th annual conference on Genetic and evolutionary computation, pp. 791-798, 2012.
238
+ Aaron Meurer, Christopher P Smith, Mateusz Paprocki, Ondrej Čertík, Sergey B Kirpichev, Matthew Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K Moore, Sartaj Singh, et al. Sympy: symbolic computing in python. PeerJ Computer Science, 3:e103, 2017.
239
+ T Nathan Mundhenk, Mikel Landajuela, Ruben Glatt, Claudio P Santiago, Daniel M Faissol, and Brenden K Petersen. Symbolic regression via neural-guided genetic programming population seeding. arXiv preprint arXiv:2111.00053, 2021a.
240
+ Terrell Mundhenk, Mikel Landajuela, Ruben Glatt, Claudio P Santiago, Brenden K Petersen, et al. Symbolic regression via deep reinforcement learning enhanced genetic programming seeding. Advances in Neural Information Processing Systems, 34:24912-24923, 2021b.
241
+ Brenden K Petersen, Mikel Landajuela, T Nathan Mundhenk, Claudio P Santiago, Soo K Kim, and Joanne T Kim. Deep symbolic regression: Recovering mathematical expressions from data via risk-seeking policy gradients. arXiv preprint arXiv:1912.04871, 2019.
242
+ MJD POWELL. An efficient method for finding the minimum of a function of several variables without calculating derivatives. The computer journal, 7(2):155-162, 1964.
243
+ John Wiley Roger Fletcher and Sons. Practical methods of optimization. 2013.
244
+ Joseph D Romano, Trang T Le, William La Cava, John T Gregg, Daniel J Goldberg, Praneel Chakraborty, Natasha L Ray, Daniel Himmelstein, Weixuan Fu, and Jason H Moore. PMLB v1.0: an open source dataset collection for benchmarking machine learning methods. arXiv preprint arXiv:2012.00058v2, 2021.
245
+ Subham Sahoo, Christoph Lampert, and Georg Martius. Learning equations for extrapolation and control. In International Conference on Machine Learning, pp. 4442-4450. PMLR, 2018.
246
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
247
+ Michael Schmidt and Hod Lipson. Distilling free-form natural laws from experimental data. Science, 324(5923):81-85, 2009.
248
+ Michael D Schmidt and Hod Lipson. Age-fitness pareto optimization. In Proceedings of the 12th annual conference on Genetic and evolutionary computation, pp. 543-544, 2010.
249
+ Devavrat Shah, Qiaomin Xie, and Zhi Xu. Nonasymptotic analysis of monte carlo tree search. Operations research, (6):3234-3260, 2022.
250
+ SP Sharan, Wenqing Zheng, Kuo-Feng Hsu, Jiarong Xing, Ang Chen, and Zhangyang Wang. Symbolic distillation for learned TCP congestion control. Advances in Neural Information Processing Systems, 35:10684-10695, 2022.
251
+ David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354-359, 2017.
252
+ Trevor Stephens. Genetic programming in python, with a scikit-learn inspired api: gplearn. 2016.
253
+ SH Strogatz. Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering (westview, boulder, co), 2014.
254
+
255
+ Fangzheng Sun, Yang Liu, and Hao Sun. Physics-informed spline learning for nonlinear dynamics discovery. Proceedings of the 30th International Joint Conference on Artificial Intelligence, 2021.
256
+ Fangzheng Sun, Yang Liu, Jian-Xun Wang, and Hao Sun. Symbolic physics learner: Discovering governing equations via Monte Carlo tree search. International Conference on Learning Representations, 2023.
257
+ Silviu-Marian Udrescu and Max Tegmark. Ai feynman: A physics-inspired method for symbolic regression. Science Advances, 6(16):eaay2631, 2020.
258
+ Silviu-Marian Udrescu, Andrew Tan, Jiahai Feng, Orisvaldo Neto, Tailin Wu, and Max Tegmark. Ai feynman 2.0: Pareto-optimal symbolic regression exploiting graph modularity. Advances in Neural Information Processing Systems, 33:4860-4871, 2020.
259
+ Nguyen Quang Uy, Nguyen Xuan Hoai, Michael O'Neill, Robert I McKay, and Edgar Galván-López. Semantically-based crossover in genetic programming: application to real-valued symbolic regression. Genetic Programming and Evolvable Machines, 12:91-119, 2011.
260
+ Mojtaba Valipour, Bowen You, Maysum Panju, and Ali Ghodsi. Symbolicgpt: A generative transformer model for symbolic regression. arXiv preprint arXiv:2106.14131, 2021.
261
+ Pauli Virtanen, Ralf Gommers, Travis E Oliphant, Matt Haberland, Tyler Reddy, David Cournaopeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, et al. Scipy 1.0: fundamental algorithms for scientific computing in python. Nature Methods, 17(3):261-272, 2020.
262
+ Yiqun Wang, Nicholas Wagner, and James M Rondinelli. Symbolic regression in materials science. MRS Communications, 9(3):793-805, 2019.
263
+
264
+ # APPENDIX
265
+
266
+ # A MODEL SETTING
267
+
268
+ In this section, we give more details about the settings of our models.
269
+
270
+ # A.1 HYPERPARAMETERS
271
+
272
+ The full set of hyperparameters can be seen in Table S1.
273
+
274
+ Table S1: Hyperparameters of our model
275
+
276
+ <table><tr><td>Name</td><td>Abbreviation</td><td>Value</td></tr><tr><td colspan="3">RL parameters</td></tr><tr><td>Minimum expression lengths</td><td>lmin</td><td>4</td></tr><tr><td>Maximum expression lengths</td><td>lmax</td><td>35</td></tr><tr><td>Maximum number of parameters</td><td>cmax</td><td>10</td></tr><tr><td>Length discount rate</td><td>η</td><td>0.99</td></tr><tr><td>Training rounds</td><td>tr</td><td>50</td></tr><tr><td>UCT constant</td><td>c</td><td>√2</td></tr><tr><td>Minimum selected times</td><td>n0</td><td>3</td></tr><tr><td>Learning rate of double Q-learning</td><td>lr</td><td>10-3</td></tr><tr><td colspan="3">Genetic Programming parameters</td></tr><tr><td>GP rounds</td><td>tgp</td><td>30</td></tr><tr><td>GP population</td><td>pgp</td><td>500</td></tr><tr><td>GP number of best expressions</td><td>lb</td><td>20</td></tr><tr><td>GP Mate rate</td><td>pmate</td><td>0.5</td></tr><tr><td>GP Mutate rate</td><td>pmutate</td><td>0.5</td></tr><tr><td colspan="3">MSDB parameters</td></tr><tr><td>Error of Symmetry</td><td>Esym</td><td>10-5</td></tr><tr><td>Selection ratio</td><td>ks</td><td>0.1</td></tr><tr><td>Expression percentage ratio</td><td>kp</td><td>0.1</td></tr><tr><td>Maximum select number</td><td>N</td><td>5</td></tr></table>
277
+
278
+ # A.2 EXPRESSIONCONSTRAINT
279
+
280
+ In this study, we incorporate a prior constraint inspired by the DSR (Petersen et al., 2019) method to effectively reduce the search space for expressions. The following constraints are applied:
281
+
282
+ - Length constraint: The length of expressions is restricted within pre-defined minimum and maximum values. If the current length falls below the minimum threshold, variables $(x, y, C, \text{etc.})$ and parameters will not be generated. Conversely, if the current length, combined with the number of nodes to be generated, reaches the maximum length, only these nodes will be considered.
283
+ - Urinary operator constraint: The direct successor node of a unary operator should not be the inverse of that same operator. This constraint ensures that the generated expressions adhere to the intended structure and prevent redundant combinations.
284
+ - Trigonometric function constraint: The successor node of a trigonometric function node should not be another trigonometric function. This constraint prevents the generation of expression structures that lead to unnecessary complexity or redundancy.
285
+ - Maximum parameter limit: A specified maximum number of parameters is imposed to control the complexity of the expressions and prevent overfitting.
286
+
287
+ ![](images/5e14d930a0ef9e8f7e02f9384ed7ea84fe6a3951e997a9114e659f981ebacfad.jpg)
288
+ Figure S1: Schematic of the proposed Form-discovery. We first obtain the output of RL/GP and select the equations in which the loss is relatively small. After that, we separate these equations by plus and minus signs and count the number of times these sub-expressions occur overall, and use the smaller equations with more occurrences to cobble together to create new expression forms.
289
+
290
+ By applying these expression constraints, we aim to enhance the search efficiency and guide the generation of meaningful expressions that align with the desired properties of the target problem.
291
+
292
+ # A.3 GENETIC PROGRAMMING
293
+
294
+ Following the generation of expressions by each reinforcement learning algorithm, we engage in the optimization of a predetermined set of expressions. For this purpose, we employ a genetic algorithm, utilizing the DEAP library in Python. This algorithm initializes half of the population using the outcomes of the reinforcement learning process, while the remaining half is generated randomly. Subsequently, we retain the most promising expressions and subject them to further analysis using a subtree analyzer. This process serves to update and refine the expression form, enhancing the overall efficacy of our approach.
295
+
296
+ # A.4 FORM DISCOVERY
297
+
298
+ Presented below is an elucidative diagram (refer to Figure S1) pertaining to the process of form discovery as outlined in Algorithm 2. This visual aid serves to elucidate the sequential progression within the algorithm and delineates the roles and interpretations of variables such as $S_{sym}$ , $\mathcal{G}$ , $\mathcal{D}$ , and more.
299
+
300
+ # B BASELINE MODELS
301
+
302
+ In this section, we give more details about the settings of baselines.
303
+
304
+ - SPL (Sun et al., 2023): Rooted in the use of MCTS, SPL employs various greedy strategies to ensure efficient exploration. It utilizes full expressions as sub-trees to maximize the use of past information. While excelling in shorter expressions, it falls short in handling longer ones.
305
+ - DSR (Petersen et al., 2019): DSR takes a gradient-based RL approach along with a recurrent neural network (RNN) that generates a probability distribution over expressions. While effective for longer expressions, it may exhibit limitations in generalization ability.
306
+ - NGGP (Mundhenk et al., 2021a): Building upon DSR, NGGP enhances its capabilities. Expressions sampled via probability distribution undergo further optimization using GP. The refined expressions then train the RNN with risk-seeking policy gradient.
307
+
308
+ - uDSR (Landajuela et al., 2022): The uDSR amalgamates DSR, AIFeynman, LSPT (Large-scale pre-training), GP, and LM (Linear models). It excels in discovering formulas with constants (favoring polynomial type expressions), but albeit at the cost of increased computation time.
309
+ - DGSR (Holt et al., 2022): This model leverages pre-trained deep generative models to capture the inherent patterns and structures within equations. This pre-training phase establishes a robust foundation for the subsequent optimization steps conducted through genetic programming.
310
+ - gplearn(Stephens, 2016): The gplearn offers an efficient and rapid GP-based SR implementation. While proficient in speed, it may exhibit instability and poor scalability.
311
+ - AFP-FE (Schmidt & Lipson, 2010): Age-Fitness Pareto Optimization is an optimization technique that combines two important factors, age, and fitness, to enhance the performance of evolutionary algorithms. FE means Co-evolved Fitness Predictors.
312
+
313
+ The full set of hyperparameters can be seen below.
314
+
315
+ - SPL: In line with the original paper, we maintain the same parameter settings for SPL. The discount rate is set to $\eta = 0.9999$ , and the candidate operators include addition (+), subtraction (-), multiplication (×), division (÷), cosine (cos(·)), sine (sin(·)), exponential (exp(·)), natural logarithm (log(·)), and square root ( $\sqrt{\cdot}$ ). Other parameter values are as follows: Maximum Module Transplantation: 20, Episodes Between Module Transplantation: 50000, Maximum Tree Size: 50, and Maximum Augmented Grammars: 5.
316
+ - DSR/NGGP/uDSR: In our study, we adopt the standard parameter configurations as provided in the publicly available implementation of Deep Symbolic Optimization (DSO). This approach entails adjusting two primary hyperparameters. The entropy coefficient is set $\lambda H = 0.05$ and the risk factor is set $\epsilon = 0.005$ . Candidate operators are the same as those employed in the SPL. Additionally, NGGP incorporates other hyperparameters related to hybrid methods based on genetic programming. The specific values are listed in Table S2.
317
+ - Genetic Programming (GP): We employ the gplearn library for GP-based methods. The hyperparameters for genetic programming are identical to those presented in Table S2.
318
+ - DGSR/AFP-FE: For both of these models, we exclusively utilized the results obtained from the srbench dataset (La Cava et al., 2021), and the parameters were meticulously tested in accordance with the specifications provided in the official srbench dataset and its associated article.
319
+
320
+ Table S2: Genetic Programming Hyperparameters on baselines
321
+
322
+ <table><tr><td>Name</td><td>Value</td></tr><tr><td>Rounds</td><td>20</td></tr><tr><td>Population</td><td>1000</td></tr><tr><td>Mate rate</td><td>0.5</td></tr><tr><td>Mutate rate</td><td>0.5</td></tr></table>
323
+
324
+ # C BASIC BENCHMARK RESULT
325
+
326
+ # C.1 OVERALL RESULT
327
+
328
+ In this section, we give more details about the Min Depth and Min Complexity of difficult equations in each benchmark in Table S3.
329
+
330
+ In this table, the performance of uDSR appears to be subpar, even falling short of its predecessor NGGP. This outcome can be attributed to two primary reasons. Firstly, our application of symbolic learning lacks parameter optimization, except for the Nyugen-c dataset, in which uDSR notably excels due to its compatibility with parameterized scenarios. Secondly, uDSR exhibits a stronger tendency towards generating polynomial functions, whereas
331
+
332
+ our tests predominantly involve a substantial number of trigonometric and exponential functions. For instance, expressions such as $x_{1}x_{2}x_{3}(\sin (x_{4}) + \cos (x_{5}))$ result in complex equations like $x_{1}\left[-0.0437x1^{3} - 5.84x3 - 0.01x4^{3} + 0.0038x_{4}^{2}x5 - 0.492x_{4}x_{5} + x_{4}(x_{2} + \sin (x_{5}))\ldots \right]$ .
333
+
334
+ # C.2 NYUGEN BENCHMARK RESULT
335
+
336
+ Nyugen Benchmark is a standard benchmark for symbolic learning with one or two independent variables and equations randomly sampled over a range. And $\mathrm{Nyugen}^c$ is a parametric version of the Nguyen benchmark, allowing the use of parametric optimization to test equations with parameters. In this section, we provide additional details about the results obtained from the Nyugen and $\mathrm{Nyugen}^c$ Benchmark experiment.
337
+
338
+ By referring to Table S4, readers can obtain more detailed information about the performance of each model on each expression, their comparative analysis, and any other relevant insights derived from the experiment.
339
+
340
+ # C.3 LIVERMORE BENCHMARK RESULT
341
+
342
+ LiverMore Benchmark contains challenging equations rarely encountered in symbolic learning, including high exponentials, trigonometric functions, and complex polynomials. In this section, we provide additional details about the results obtained from the LiverMore Benchmark experiment.
343
+
344
+ By referring to Table S5, readers can obtain more detailed information about the performance of each model on each expression, their comparative analysis, and any other relevant insights derived from the experiment.
345
+
346
+ # C.4 R BENCHMARK RESULT
347
+
348
+ R Benchmark consists of three built-in rational equations with numerous polynomials as divisors and devisees, increasing the learning difficulty. In this section, we provide additional details about the results obtained from the R Rational Benchmark experiment.
349
+
350
+ By referring to Table S6, readers can obtain more detailed information about the performance of each model on each expression, their comparative analysis, and any other relevant insights derived from the experiment.
351
+
352
+ Table S3: Minimum Depth of expression tree and Minimum tokens of expression tree as Minimum Complexity of several difficult equations in each benchmark.
353
+
354
+ <table><tr><td>Benchmark</td><td>Equation</td><td>Min Depth</td><td>Min Complexity</td></tr><tr><td>Nguyen-5</td><td>sin(x12)cos(x1) - 1</td><td>6</td><td>12</td></tr><tr><td>Nguyen-12</td><td>x14 - x13 - 0.5x22 + x2</td><td>7</td><td>24</td></tr><tr><td>Nguyen-2c</td><td>0.48x14 + 3.39x13 + 2.12x12 + 1.78x1</td><td>6</td><td>25</td></tr><tr><td>Nguyen-9c</td><td>sin(1.5x1) + sin(0.5x22)</td><td>5</td><td>11</td></tr><tr><td>LiverMore-3</td><td>sin(x13)cos(x12) - 1</td><td>6</td><td>15</td></tr><tr><td>LiverMore-7</td><td>sinh(x1)</td><td>6</td><td>15</td></tr><tr><td>LiverMore-16</td><td>x2/5</td><td>7</td><td>17</td></tr><tr><td>LiverMore-18</td><td>sin(x12)cos(x1) - 5</td><td>6</td><td>19</td></tr><tr><td>AIFeynman-9</td><td>x1 + x2 + 2√x1x2 cos(x3)</td><td>6</td><td>17</td></tr><tr><td>AIFeynman-10</td><td>1/2x1(x22 + x32 + x42)</td><td>6</td><td>20</td></tr><tr><td>R-1</td><td>(x1 + 1)3/(x12 - x1 + 1)</td><td>6</td><td>21</td></tr><tr><td>R-2</td><td>(x15 - 3x13 + 1)/(x12 + 1)</td><td>7</td><td>31</td></tr><tr><td>R-3</td><td>(x15 + x16)/(x14 + x13 + x12 + x1 + 1)</td><td>7</td><td>35</td></tr></table>
355
+
356
+ Table S4: Average Recovery Rate (%) of the Nyugen Benchmark over 100 parallel runs
357
+
358
+ <table><tr><td>Name</td><td>Equation</td><td>Ours</td><td>SPL</td><td>uDSR</td><td>NGGP</td><td>DSR</td><td>GP</td></tr><tr><td>Nguyen-1</td><td>x13+x12+x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>99</td></tr><tr><td>Nguyen-2</td><td>x14+x13+x12+x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>90</td></tr><tr><td>Nguyen-3</td><td>x15+x14+x13+x12+x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>34</td></tr><tr><td>Nguyen-4</td><td>x16+x15+x14+x13+x12+x1</td><td>100</td><td>99</td><td>100</td><td>100</td><td>100</td><td>54</td></tr><tr><td>Nguyen-5</td><td>sin(x12)cos(x1)-1</td><td>100</td><td>95</td><td>45</td><td>80</td><td>72</td><td>12</td></tr><tr><td>Nguyen-6</td><td>sin(x1)+sin(x1+x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>11</td></tr><tr><td>Nguyen-7</td><td>log(x1+1)+log(x12+1)</td><td>100</td><td>100</td><td>98</td><td>100</td><td>35</td><td>17</td></tr><tr><td>Nguyen-8</td><td>√x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>96</td><td>100</td></tr><tr><td>Nguyen-9</td><td>sin(x1)+sin(x2)</td><td>100</td><td>100</td><td>91</td><td>100</td><td>100</td><td>17</td></tr><tr><td>Nguyen-10</td><td>sin(x1)cos(x2)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>86</td></tr><tr><td>Nguyen-11</td><td>x1x2</td><td>100</td><td>100</td><td>87</td><td>100</td><td>100</td><td>13</td></tr><tr><td>Nguyen-12</td><td>x14-x13-0.5x22+x2</td><td>100</td><td>28</td><td>30</td><td>21</td><td>0</td><td>0</td></tr><tr><td colspan="2">Average</td><td>100.00±0.0</td><td>93.50±11.7</td><td>87.58±13.6</td><td>91.75±13.0</td><td>83.58±18.5</td><td>44.42±22.1</td></tr><tr><td>Nguyen-1c</td><td>3.39x13+2.12x12+1.78x1</td><td>100</td><td>100</td><td>58</td><td>100</td><td>100</td><td>0</td></tr><tr><td>Nguyen-2c</td><td>0.48x14+3.39x13+2.12x12+1.78x1</td><td>100</td><td>94</td><td>100</td><td>100</td><td>100</td><td>0</td></tr><tr><td>Nguyen-5c</td><td>sin(x12)cos(x1)-0.75</td><td>100</td><td>95</td><td>67</td><td>98</td><td>0</td><td>1</td></tr><tr><td>Nguyen-7c</td><td>log(x1+1.4)+log(x12+1.3)</td><td>100</td><td>0</td><td>100</td><td>100</td><td>93</td><td>2</td></tr><tr><td>Nguyen-8c</td><td>√1.23x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>56</td></tr><tr><td>Nguyen-9c</td><td>sin(1.5x1)+sin(0.5x2)</td><td>100</td><td>98</td><td>0</td><td>96</td><td>0</td><td>0</td></tr><tr><td>Nguyen-10c</td><td>sin(1.5x1)cos(0.5x2)</td><td>100</td><td>0</td><td>0</td><td>100</td><td>100</td><td>0</td></tr><tr><td colspan="2">Average</td><td>100.00±0.0</td><td>69.57±35.2</td><td>60.71±33.2</td><td>99.14±1.2</td><td>70.43±35.7</td><td>8.43±15.6</td></tr></table>
359
+
360
+ Table S5: Average Recovery Rate (%) of the LiverMore Benchmark over 100 parallel runs
361
+
362
+ <table><tr><td>Name</td><td>Equation</td><td>Ours</td><td>SPL</td><td>uDSR</td><td>NGGP</td><td>DSR</td><td>GP</td></tr><tr><td>Livermore-1</td><td>1/3 + x1 + sin(x1)</td><td>100</td><td>94</td><td>100</td><td>100</td><td>67</td><td>100</td></tr><tr><td>Livermore-2</td><td>sin(x1)2cos(x1) - 2</td><td>100</td><td>29</td><td>58</td><td>61</td><td>26</td><td>1</td></tr><tr><td>Livermore-3</td><td>sin(x1)3cos(x1)2 - 1</td><td>55</td><td>50</td><td>0</td><td>2</td><td>0</td><td>0</td></tr><tr><td>Livermore-4</td><td>log(x1 + 1) + log(x12 + x1) + log(x1)</td><td>100</td><td>61</td><td>100</td><td>100</td><td>72</td><td>100</td></tr><tr><td>Livermore-5</td><td>x14 - x13 + x12 - x2</td><td>100</td><td>100</td><td>100</td><td>100</td><td>55</td><td>100</td></tr><tr><td>Livermore-6</td><td>4x14 + 3x13 + 2x12 + x1</td><td>100</td><td>8</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-7</td><td>sinh(x1)</td><td>100</td><td>18</td><td>0</td><td>24</td><td>0</td><td>0</td></tr><tr><td>Livermore-8</td><td>cosh(x1)</td><td>100</td><td>6</td><td>8</td><td>30</td><td>0</td><td>0</td></tr><tr><td>Livermore-9</td><td>∑i=19x1i</td><td>100</td><td>21</td><td>100</td><td>99</td><td>18</td><td>0</td></tr><tr><td>Livermore-10</td><td>6sin(x1)cos(x2)</td><td>100</td><td>75</td><td>100</td><td>100</td><td>70</td><td>23</td></tr><tr><td>Livermore-11</td><td>(x12x2)/(x1 + x2)</td><td>100</td><td>0</td><td>100</td><td>100</td><td>78</td><td>95</td></tr><tr><td>Livermore-12</td><td>x15/x23</td><td>100</td><td>100</td><td>100</td><td>100</td><td>13</td><td>100</td></tr><tr><td>Livermore-13</td><td>x13/3</td><td>100</td><td>12</td><td>100</td><td>100</td><td>59</td><td>0</td></tr><tr><td>Livermore-14</td><td>x13 + x12 + x1 + sin(x1) + sin(x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>91</td><td>100</td></tr><tr><td>Livermore-15</td><td>x11/5</td><td>100</td><td>0</td><td>100</td><td>100</td><td>28</td><td>2</td></tr><tr><td>Livermore-16</td><td>x12/5</td><td>100</td><td>0</td><td>60</td><td>26</td><td>0</td><td>0</td></tr><tr><td>Livermore-17</td><td>4sin(x1)cos(x2)</td><td>100</td><td>89</td><td>100</td><td>100</td><td>100</td><td>84</td></tr><tr><td>Livermore-18</td><td>sin(x1)2cos(x1) - 5</td><td>100</td><td>18</td><td>59</td><td>33</td><td>37</td><td>0</td></tr><tr><td>Livermore-19</td><td>x15 + x14 + x13 + x1</td><td>100</td><td>89</td><td>98</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-20</td><td>exp(-x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-21</td><td>∑i=18x1i</td><td>100</td><td>52</td><td>100</td><td>100</td><td>13</td><td>12</td></tr><tr><td>Livermore-22</td><td>exp(-0.5x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>82</td><td>100</td></tr><tr><td></td><td>Average</td><td>97.95±4.0</td><td>51.00±16.9</td><td>81.05±14.6</td><td>80.68±14.0</td><td>50.41±15.7</td><td>50.77±20.4</td></tr></table>
363
+
364
+ Table S6: Average Recovery Rate (%) of the R Rational Benchmark over 100 parallel runs
365
+
366
+ <table><tr><td>Name</td><td>Equation</td><td>Ours</td><td>SPL</td><td>uDSR</td><td>NGGP</td><td>DSR</td><td>GP</td></tr><tr><td>R0-1</td><td>(x1+1)3/(x12-x1+1)</td><td>5</td><td>0</td><td>82</td><td>15</td><td>0</td><td>0</td></tr><tr><td>R0-2</td><td>(x15-3x13+1)/(x12+1)</td><td>80</td><td>0</td><td>0</td><td>40</td><td>0</td><td>0</td></tr><tr><td>R0-3</td><td>(x15+x16)/(x14+x13+x12+x1+1)</td><td>100</td><td>0</td><td>0</td><td>100</td><td>0</td><td>0</td></tr><tr><td>R*-1</td><td>(x1+1)3/(x12-x1+1)</td><td>48</td><td>0</td><td>17</td><td>2</td><td>0</td><td>0</td></tr><tr><td>R*-2</td><td>(x15-3x13+1)/(x12+1)</td><td>89</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>R*-3</td><td>(x15+x16)/(x14+x13+x12+x1+1)</td><td>91</td><td>0</td><td>0</td><td>3</td><td>0</td><td>0</td></tr><tr><td colspan="2">Average</td><td>68.83±28.9</td><td>0.00±0.0</td><td>16.50±26.2</td><td>26.67±31.1</td><td>0.00±0.0</td><td>0.00±0.0</td></tr></table>
367
+
368
+ # C.5 AIFEYNMAN BENCHMARK RESULT
369
+
370
+ AIfeynman Benchmark contains lots of equations with physical meaning (as part of SRBench (La Cava et al., 2021)), such as expressions for gravity, kinetic energy, and light intensity superposi
371
+
372
+ tion. In this section, we provide additional details about the results obtained from the AIFeynman Benchmark experiment.
373
+
374
+ By referring to Table S7, readers can obtain more detailed information about the performance of each model on each expression, their comparative analysis, and any other relevant insights derived from the experiment.
375
+
376
+ The selection of 12 AI Feynman equations was based on a stratified representation of difficulty levels. The chosen expressions include easy ones, such as $x_{1}x_{2}$ and $\frac{3}{2} x_{1}x_{2}$ ; medium complexity expressions like $x_{1}x_{2}x_{3}\sin (x_{4})$ and $x_{1}x_{2} + x_{3}x_{4} + x_{5}x_{6}$ ; medium-hard expressions such as $0.5x_{1}(x_{2}^{2} + x_{3}^{2} + x_{4}^{2})$ and $x_{1}x_{2}x_{3}\left(\frac{1}{x_{4}} -\frac{1}{x_{5}}\right)$ ; and hard expressions like $\frac{x_1x_2x_3}{(x_4 - x_5)^2 + (x_6 - x_7)^2 + (x_8 - x_9)^2}$ and $1 + \frac{x_1x_2}{1 - x_1x_2 / 3}$ , providing a comprehensive coverage of the AIFeynman benchmark.
377
+
378
+ The comprehensive coverage of the AIfeynman benchmark is reflected in Figure 3b of the results section, showcasing the outcomes for all AI Feynman equations considered in the problem set. Notably, our model achieves a state-of-the-art $80\%$ recovery rate, indicating its proficiency in capturing the underlying mathematical structures across a diverse range of expressions.
379
+
380
+ Table S7: Average Recovery Rate (%) of the AIFeynman Benchmark over 100 parallel runs
381
+
382
+ <table><tr><td>Name</td><td>Equation</td><td>Ours</td><td>SPL</td><td>uDSR</td><td>NGGP</td><td>DSR</td><td>GP</td></tr><tr><td>AlFeynman-1</td><td>x1x2</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>AlFeynman-2</td><td>3/2x1x2</td><td>100</td><td>99</td><td>97</td><td>100</td><td>97</td><td>87</td></tr><tr><td>AlFeynman-3</td><td>x1x2x3</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>AlFeynman-4</td><td>x1x2x3sin(x4)</td><td>100</td><td>98</td><td>90</td><td>100</td><td>100</td><td>78</td></tr><tr><td>AlFeynman-5</td><td>x1x2+x3x4+x5x6</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>82</td></tr><tr><td>AlFeynman-6</td><td>x1(1+x2cos(x3))</td><td>100</td><td>100</td><td>80</td><td>100</td><td>100</td><td>100</td></tr><tr><td>AlFeynman-7</td><td>x1x2x3(1/x4-1/x5)</td><td>100</td><td>100</td><td>87</td><td>100</td><td>100</td><td>80</td></tr><tr><td>AlFeynman-8</td><td>x1(x2+x3x4sin(x5))</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>AlFeynman-9</td><td>x1+x2+2√x1x2cos(x3)</td><td>67</td><td>0</td><td>8</td><td>7</td><td>0</td><td>0</td></tr><tr><td>AlFeynman-10</td><td>1/2x1(x22+x32+x42)</td><td>15</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>AlFeynman-11</td><td>(x4-x5)2+(x6-x7)2+(x8-x9)2</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>AlFeynman-12</td><td>1+x1x2/1-x1x2/3</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td colspan="2">Average</td><td>73.50±24.1</td><td>66.42±27.8</td><td>63.50±26.0</td><td>67.25±27.4</td><td>66.42±27.8</td><td>60.58±25.7</td></tr></table>
383
+
384
+ # C.6 CONST-OPTIMIZATION EXPERIMENT
385
+
386
+ We conducted an experiment considering different initialization approaches for constant optimization. Specifically, we explored seven methods:
387
+
388
+ - Case 1. Initializing constants with a vector of ones.
389
+ - Case 2. Initializing constants with a vector of random uniform values between 0 and 1.
390
+ - Case 3. Initializing constants with a vector of random uniform values between 0.5 and 1.5.
391
+ - Case 4. Initializing constants with a vector of random Gaussian values with a mean of 0 and standard deviation of 1.
392
+ - Case 5. Initializing constants with a vector of random Gaussian values with a mean of 1 and standard deviation of 1.
393
+ - Case 6. Initializing constants with a vector of random Gaussian values with a mean of 1 and standard deviation of 0.5.
394
+ - Case 7. Initializing constants with a vector of random Gaussian values with a mean of 0 and standard deviation of $\frac{1}{3}$ .
395
+
396
+ We evaluated the recovery rate of each expression using different constant initialization methods across diverse benchmarks, employing ranges of input values such as [0,1], [-1,1], [0,10], [-10,10], [0,50], [-50,50], and data sizes of 20 or 500. Notably, Table S8 demonstrates that the average recovery rates across all initializing methods are remarkably close.
397
+
398
+ Examining the distribution of expression recovery rates below $50\%$ , $10\%$ , and $0\%$ , it becomes apparent that the method employing a vector of ones exhibits the highest percentage in Table S9. This observation indicates that the vector of ones initialization method has the highest number of expressions unable to converge across 100 parallel runs.
399
+
400
+ Table S8: Average Recovery Rate (%) of the Const Optimization Benchmark over 100 parallel runs on each size and each range
401
+
402
+ <table><tr><td>Name</td><td>Equation</td><td>Case 1</td><td>Case 2</td><td>Case 3</td><td>Case 4</td><td>Case 5</td><td>Case 6</td><td>Case 7</td></tr><tr><td>Keijzer-1</td><td>0.3x1sin(6.28x1)</td><td>33.6</td><td>33.8</td><td>33.6</td><td>33.7</td><td>33.7</td><td>33.6</td><td>34.3</td></tr><tr><td>Keijzer-4</td><td>(30.0x1x2x3)/( (x1-10.0)x22)</td><td>34.2</td><td>13.3</td><td>35.7</td><td>14.8</td><td>20.7</td><td>24.3</td><td>24.1</td></tr><tr><td>Keijzer-14</td><td>8.0/(2.0+x12+x22)</td><td>100.0</td><td>99.8</td><td>100.0</td><td>82.0</td><td>95.8</td><td>99.6</td><td>99.8</td></tr><tr><td>Keijzer-15</td><td>x10.6+x21.5-x2-x1</td><td>88.0</td><td>83.2</td><td>90.3</td><td>75.5</td><td>83.8</td><td>88.3</td><td>88.7</td></tr><tr><td>Nguyen-1c</td><td>3.39x13+2.12x12+1.78x1</td><td>97.2</td><td>97.5</td><td>97.5</td><td>96.8</td><td>95.9</td><td>96.9</td><td>97.4</td></tr><tr><td>Nguyen-2c</td><td>0.48x14+3.39x13+2.12x12+1.78x1</td><td>98.0</td><td>92.3</td><td>97.9</td><td>92.9</td><td>95.0</td><td>97.5</td><td>96.2</td></tr><tr><td>Nguyen-5c</td><td>sin(x12)cos(x1)-0.75</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td></tr><tr><td>Nguyen-7c</td><td>log(x1+1.4)+log(x12+1.3)</td><td>100.0</td><td>53.4</td><td>78.4</td><td>50.6</td><td>56.0</td><td>70.4</td><td>97.1</td></tr><tr><td>Nguyen-8c</td><td>√1.23x1</td><td>100.0</td><td>100.0</td><td>100.0</td><td>99.5</td><td>100.0</td><td>100.0</td><td>100.0</td></tr><tr><td>Nguyen-9c</td><td>sin(1.5x1)+sin(0.5x2)</td><td>35.3</td><td>47.9</td><td>43.4</td><td>42.6</td><td>43.8</td><td>45.6</td><td>46.3</td></tr><tr><td>Nguyen-10c</td><td>sin(1.5x1)cos(0.5x2)</td><td>35.1</td><td>47.7</td><td>38.7</td><td>42.8</td><td>42.7</td><td>44.3</td><td>42.3</td></tr><tr><td>Nguyen-11c</td><td>2.7x12</td><td>99.2</td><td>88.2</td><td>98.5</td><td>79.3</td><td>89.3</td><td>95.8</td><td>100.0</td></tr><tr><td>Jin*-1</td><td>2.5x14-1.3x13+0.5x12-1.7x1</td><td>98.3</td><td>97.5</td><td>96.3</td><td>97.0</td><td>94.7</td><td>97.7</td><td>97.4</td></tr><tr><td>Jin*-2</td><td>8.0x13-8.0x12+15.0x1</td><td>81.0</td><td>83.0</td><td>81.4</td><td>83.2</td><td>83.1</td><td>82.9</td><td>82.5</td></tr><tr><td>Jin*-3</td><td>0.7x13-1.7x1</td><td>100.0</td><td>54.1</td><td>92.2</td><td>52.9</td><td>76.1</td><td>83.3</td><td>87.9</td></tr><tr><td>Jin*-4</td><td>1.5 exp(x1)+5.0 cos(x1)</td><td>87.7</td><td>93.8</td><td>94.6</td><td>88.1</td><td>92.3</td><td>94.5</td><td>93.6</td></tr><tr><td>Jin*-5</td><td>6.0 sin(x1)cos(x1)</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td></tr><tr><td>Jin*-6</td><td>1.35x12+5.5 sin((x1-1)2)</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td><td>100.0</td></tr><tr><td></td><td>Average</td><td>81.06</td><td>76.19</td><td>80.90</td><td>73.46</td><td>77.17</td><td>79.74</td><td>81.08</td></tr></table>
403
+
404
+ Table S9: Percentage (%) of expressions under certain recovery rate about the Const Optimization Benchmark over each initializing method
405
+
406
+ <table><tr><td>Recovery Rate</td><td>Case 1</td><td>Case 2</td><td>Case 3</td><td>Case 4</td><td>Case 5</td><td>Case 6</td><td>Case 7</td></tr><tr><td>&lt;50%</td><td>18.04</td><td>25.26</td><td>18.04</td><td>26.29</td><td>19.07</td><td>17.53</td><td>17.01</td></tr><tr><td>&lt;10%</td><td>15.98</td><td>11.34</td><td>13.92</td><td>11.86</td><td>11.86</td><td>11.34</td><td>12.37</td></tr><tr><td>0%</td><td>7.22</td><td>4.12</td><td>6.19</td><td>3.61</td><td>4.64</td><td>3.61</td><td>3.09</td></tr></table>
407
+
408
+ # C.7 TRADE-OFF EXPERIMENT
409
+
410
+ We used five different configurations for symbolic regression on the Nyugen dataset and obtained five different sets of results. We calculated the curves of the average number of tests about the expression recovery rate for all data/ Nyugen-4/ Nyugen-5/ Nyugen-11/ Nyugen-12 for the five different data with different configurations as shown in Figure S2.
411
+
412
+ ![](images/06ae8648267b95b1ff6f3cbae340d4d8b2f05e348ac6cfda0db67ab45ab75251.jpg)
413
+ Figure S2: Trade-off between accuracy and number of evaluations in Nyugen Benchmark.
414
+
415
+ The evaluation count of the RMSM exhibits a discernible pattern, roughly falling within two ranges: the first encompasses around $80\%$ of the recovery rate, while the second spans from $80\%$ to $100\%$ .
416
+
417
+ Table S10: Trade-off experiment: Average Evaluation Number /Average Recovery Rate (%) of the Nyugen Benchmark over 100 parallel runs
418
+
419
+ <table><tr><td>Name</td><td>5 epochs</td><td>15 epochs</td><td>25 epochs</td><td>35 epochs</td><td>45 epochs</td></tr><tr><td>ALL</td><td>15654/53</td><td>27543/77</td><td>41525/87</td><td>55395/98</td><td>58240/100</td></tr><tr><td>Nyugen-4</td><td>28389/5</td><td>41638/43</td><td>54151/75</td><td>58483/100</td><td>76216/100</td></tr><tr><td>Nyugen-5</td><td>25084/0</td><td>57033/33</td><td>77075/80</td><td>118661/83</td><td>149868/100</td></tr><tr><td>Nyugen-11</td><td>20932/41</td><td>36487/62</td><td>67237/88</td><td>77757/100</td><td>84902/100</td></tr><tr><td>Nyugen-12</td><td>26345/0</td><td>65122/13</td><td>123571/41</td><td>175970/89</td><td>207889/98</td></tr></table>
420
+
421
+ ![](images/bd4007b96d9115b5111bcd4be3d4b28b04399ec0f3675921de3bccd922592aeb.jpg)
422
+ Figure S3: Result of SRBench with 10 parallel runs for each dataset.
423
+
424
+ ![](images/41efb4bf1ab1f11cafbb1c2fdcba47b47aab23de9f48828d3c6d21a83d7e5b88.jpg)
425
+
426
+ Both ranges can be approximated with linear functions; however, the second range displays a notably steeper slope, indicating that achieving higher recovery rates beyond $80\%$ becomes considerably more challenging.
427
+
428
+ We categorized RSRM into using 5, 15, 25, 35, 45 epochs and tested the average number of tests and the average recovery rate for each different environment and different data respectively in Table S10.
429
+
430
+ # D SRBENCH RESULT
431
+
432
+ We used the full set of SRBench for testing, and the overall results are as follows in Figure S3, including both the AIFeynman dataset and the Strogatz dataset.
433
+
434
+ # E FREE-FALLING BALLS DATASET RESULT
435
+
436
+ In this section, we provide additional details about the results obtained from the Falling-Balls dataset experiment. To improve the performance of the SPL model, we incorporated the operators $\log (\cosh (\cdot))$ . This addition aimed to enhance the model's ability to capture the underlying patterns in the data.
437
+
438
+ The complete results of the experiment, including the functions found, can be found in Table S11.
439
+
440
+ Table S11: Functions generated in Falling-Balls Experiment
441
+
442
+ <table><tr><td>Name</td><td>Model</td><td>Equation</td></tr><tr><td rowspan="3">baseball</td><td>Ours</td><td>-4.43t2+0.36 sin(t2+1.51)2+47.35</td></tr><tr><td>Model A</td><td>0.09t3-5.47t2+2.47t+46.52+cos(t2-2.5t)0.5</td></tr><tr><td>SPL</td><td>-4.54t2+0.625t+47.8</td></tr><tr><td rowspan="3">blue basket ball</td><td>Ours</td><td>-1.66t3-4.95t2cos(√t)+46.46</td></tr><tr><td>Model A</td><td>-0.1t3-4.49t2+37.54t+46.49-t(cos(t)+36.77)</td></tr><tr><td>SPL</td><td>-0.25t4+t3-5.11t2+46.47</td></tr><tr><td rowspan="3">bowling ball</td><td>Ours</td><td>-4.63t2+sin(0.83t)sin(t)+46.13</td></tr><tr><td>Model A</td><td>0.18t3-6.0t2+2.15t+45.43+|t-0.62|</td></tr><tr><td>SPL</td><td>-0.285t3-3.82t2+4.14×10-5exp(20.74t2-12.45t3)+46.1</td></tr><tr><td rowspan="3">golf ball</td><td>Ours</td><td>-0.09t3-4.44t2+5.26×10-5t/log(t)+49.51</td></tr><tr><td>Model A</td><td>-2.18t3+11.75t2+1.96t+25.86-2.36 exp(t)+25.98 cos(t)</td></tr><tr><td>SPL</td><td>-4.9633t2+log(cosh(t))+49.5087</td></tr><tr><td rowspan="3">green basket ball</td><td>Ours</td><td>46.34-4.15t2</td></tr><tr><td>Model A</td><td>-0.09t3-4.59t2+1.6t+45.26+(0.02√t/t-exp(cos(t))-t+1)cos(t)</td></tr><tr><td>SPL</td><td>-4.1465t2+45.9087+log(cosh(1))</td></tr><tr><td rowspan="3">tennis ball</td><td>Ours</td><td>47.78 cos(0.43t-0.02)</td></tr><tr><td>Model A</td><td>0.33t3-4.9t2+0.66t+47.74</td></tr><tr><td>SPL</td><td>-4.0574t2+log(cosh(0.121t3))+47.8577</td></tr><tr><td rowspan="3">volleyball</td><td>Ours</td><td>48.15-3.67(t+0.03)2</td></tr><tr><td>Model A</td><td>1.59t3-11.1t2+0.93t+58.53-10.53 cos(t)</td></tr><tr><td>SPL</td><td>-3.78t2+48.0744</td></tr><tr><td rowspan="3">whiffle ball1</td><td>Ours</td><td>-t2(3.83-0.31t)+47.07</td></tr><tr><td>Model A</td><td>-0.08t3-2.17t2-1.69t+46.29+√t+sin(3t)</td></tr><tr><td>SPL</td><td>-t3+4.16t2+47.01 exp(-0.15t2)</td></tr><tr><td rowspan="3">whiffle ball2</td><td>Ours</td><td>-2.18t2+0.1t cos(t)+3.35 cos(t)+43.88</td></tr><tr><td>Model A</td><td>0.46t3-4.39t2+0.19t+47.26-0.05 cos(exp(t))</td></tr><tr><td>SPL</td><td>65.86 exp(-0.0577t2)-18.61</td></tr><tr><td rowspan="3">yellow whiffle ball</td><td>Ours</td><td>(cos(1.75t)+47.59) cos(0.36t)</td></tr><tr><td>Model A</td><td>-0.27t3-2.58t2-2.5t+48.25+(t+0.41) exp(√t+t2-2√t3)</td></tr><tr><td>SPL</td><td>(148.99-14.58t2+48.96 log(cosh(x)))/(log(cosh(t))+3.065)</td></tr><tr><td rowspan="3">orange whiffle ball</td><td>Ours</td><td>-17.82t-33.11/ exp(t)0.5+80.94</td></tr><tr><td>Model A</td><td>0.42t3-3.81t2-1.4t+47.84</td></tr><tr><td>SPL</td><td>-1.66t+47.86 exp(-0.0682t2)</td></tr></table>
443
+
444
+ # F GENERALIZATION EXPERIMENT RESULT
445
+
446
+ To compare the generalization ability of our model with other methods, we conducted an experiment on generalization performance. The dataset was generated using the cumulative distribution function (CDF) defined as
447
+
448
+ $$
449
+ F (x, \mu , \sigma) = \int_ {- \infty} ^ {x} \frac {1}{\sqrt {2 \pi} \sigma} e ^ {- \frac {(t - \mu) ^ {2}}{2 \sigma^ {2}}} d t
450
+ $$
451
+
452
+ with varying means $(\mu)$ and variances $(\sigma)$ . The dataset consisted of 201 points spanning the range from $-100$ to $100$ . Each dataset is divided into three subsets: a training set, a test set, and a validation set. The training set comprises points ranging from 30 to 80, while the test set consists of points ranging from 10 to 25. The validation set covers a broader range, spanning from 0 to $100$ .
453
+
454
+ Because this equation lacks an explicit elementary expression, it's impossible to obtain an analytical solution for the entire curve by reducing the training error to zero. Therefore, learning this function
455
+
456
+ ![](images/ba3b16a1727d091f3376893fa258ac99dd319f6c02a44c160043e6fe2ea089c3.jpg)
457
+ Figure S4: Result of generalization test experiment.
458
+
459
+ ![](images/dafc69d45ed7311d183c29a0529c43e243e8dbf1e8b473e786c738c29dae81b4.jpg)
460
+
461
+ ![](images/b3597b8232c0de102944752d95fc4bdc6489ffb823c992e2ef55f86a8474ed6b.jpg)
462
+
463
+ requires balancing between training error and generalization error, demanding a stronger ability to generalize. Moreover, only half of the curve data is provided, necessitating strong generalization skills from the model to extrapolate and accurately fit the missing portion of the curve. This calls for the proficiency of the model in capturing the distribution of the entire curve.
464
+
465
+ To evaluate the performance of our approach and compare it with baselines, we define the following settings for each method:
466
+
467
+ - Ours: The training set is utilized for generating expressions and calculating the corresponding rewards. The test set is employed to evaluate the quality of the generated expressions. Finally, the validation set is employed to select the most promising expressions from the outputs.
468
+ - NGGP(Mundhenk et al., 2021a): Both the training set and the test set are used for generating expressions and computing rewards. The HallOfFame, which contains the best expressions, is then leveraged to choose expressions using the validation set.
469
+ - Linear regression: The training set and the test set are employed for training the linear regression model.
470
+ - Cubic splines: The training set and the test set are used to train the cubic spline model.
471
+ - Deep learning: In the deep learning approach, we employ a Multilayer Perceptron (MLP) architecture with one input, one output, and a hidden layer ranging in size from 30 to 50. We set the learning rate to $10^{-3}$ and train 100 epochs. We experiment with different configurations of the hidden layer and select the model that yields the best performance. The MLP is trained using the training set, and the test set is used to evaluate the performance of each model. By varying the size of the hidden layer, we aim to find the optimal architecture that achieves the highest accuracy or lowest error on the given task.
472
+
473
+ The full results of the generalization experiment can be found in Table S12 and Figure S4. This table presents a detailed overview of the performance of the model and the baselines. Additionally, Table S13 presents the equations discovered by the model and the baselines. These tables demonstrate that our model outperforms the baseline methods in terms of generalization ability. The curves fitted by our model exhibit better accuracy and capture the underlying patterns in the data more effectively.
474
+
475
+ # G PARITY DETERMINATION EXPERIMENT
476
+
477
+ In this section, we conduct an experiment to compare the efficiency and effectiveness of form discovery by AIfeynman(Udrescu & Tegmark, 2020) and our method.
478
+
479
+ According to AIfeynman (Udrescu & Tegmark, 2020), it is also possible to use MLP as a learning curve to determine the parity of a function, so we compared the efficiency and effectiveness of MLP and cubic splines in determining parity.
480
+
481
+ The configuration of the MLP follows the structure employed in AIfeynman. It consists of a five-layer neural network with a balanced training set and validation set ratio of 5:5. The input layer accepts one variable and yields an output of 128. Subsequent to the input layer, the hidden layers encompass input-output feature pairs of 128-128, 128-64, and 64-64. The output layer produces a single variable. Optimization is executed using the Adam optimizer, and the activation function for each layer is set
482
+
483
+ Table S12: Mean Squared Error (MSE) of each method and each part of the curve in the Generalization Experiment
484
+
485
+ <table><tr><td>Name</td><td>Ours</td><td>NGGP</td><td>Linear</td><td>Cubic Splines</td><td>MLP</td></tr><tr><td>total error on curve 1</td><td>1.05 × 10-5</td><td>0.00215</td><td>0.0114</td><td>0.000381</td><td>0.0142</td></tr><tr><td>total error on curve 2</td><td>9.79 × 10-6</td><td>0.00163</td><td>0.0297</td><td>0.00162</td><td>0.261</td></tr><tr><td>total error on curve 3</td><td>2.61 × 10-7</td><td>0.327</td><td>0.0821</td><td>0.00563</td><td>0.0762</td></tr><tr><td>extrapolation error on curve 1</td><td>1.65 × 10-5</td><td>0.00429</td><td>0.0215</td><td>0.000758</td><td>0.0278</td></tr><tr><td>extrapolation error on curve 2</td><td>1.41 × 10-5</td><td>0.00324</td><td>0.0565</td><td>0.00323</td><td>0.518</td></tr><tr><td>extrapolation error on curve 3</td><td>2.67 × 10-7</td><td>0.65</td><td>0.158</td><td>0.0112</td><td>0.151</td></tr><tr><td>validation error on curve 1</td><td>4.46 × 10-6</td><td>2.59 × 10-10</td><td>0.00129</td><td>2.76 × 10-10</td><td>0.000532</td></tr><tr><td>validation error on curve 2</td><td>5.45 × 10-6</td><td>1.08 × 10-10</td><td>0.00265</td><td>2.87 × 10-9</td><td>0.00177</td></tr><tr><td>validation error on curve 3</td><td>2.55 × 10-7</td><td>2.94 × 10-5</td><td>0.00518</td><td>3.75 × 10-8</td><td>0.00106</td></tr><tr><td>test error on curve 1</td><td>6.95 × 10-6</td><td>9.09 × 10-12</td><td>0.000545</td><td>&lt; 1 × 10-12</td><td>0.000253</td></tr><tr><td>test error on curve 2</td><td>2.25 × 10-7</td><td>&lt; 1 × 10-12</td><td>0.00127</td><td>&lt; 1 × 10-12</td><td>0.00344</td></tr><tr><td>test error on curve 3</td><td>8.8 × 10-8</td><td>&lt; 1 × 10-12</td><td>0.00272</td><td>&lt; 1 × 10-12</td><td>0.00358</td></tr><tr><td>training error on curve 1</td><td>3.88 × 10-6</td><td>3.57 × 10-12</td><td>0.000254</td><td>&lt; 1 × 10-12</td><td>6.93 × 10-5</td></tr><tr><td>training error on curve 2</td><td>1.26 × 10-6</td><td>&lt; 1 × 10-12</td><td>0.000524</td><td>&lt; 1 × 10-12</td><td>8.6 × 10-5</td></tr><tr><td>training error on curve 3</td><td>3.34 × 10-7</td><td>7.14 × 10-12</td><td>0.000905</td><td>&lt; 1 × 10-12</td><td>7.9 × 10-5</td></tr></table>
486
+
487
+ Table S13: Functions generated in Generalization Experiment. Our functions are easier to calculate and shorter than NGGP's.
488
+
489
+ <table><tr><td>Name</td><td>Model</td><td>Equation</td></tr><tr><td rowspan="2">curve-1</td><td>Ours</td><td>0.503 + (117.088x)/(x2+ 14702)</td></tr><tr><td>NGGP</td><td>cos(exp((0.49x log(0.028x + 29.5/(0.039x + 9.82)) - 2.78)/(0.115x - 60.5)))</td></tr><tr><td rowspan="2">curve-2</td><td>Ours</td><td>(6.08x + 0.785)/(0.0639x2+ 615.179) + 0.50003</td></tr><tr><td>NGGP</td><td>cos(2.95 exp(-0.68 exp(0.41 exp(5.5x exp(24.67/(115.6 exp((4.75x + 13.3)/x) + 3.2))/(2x + 214.3))))</td></tr><tr><td rowspan="2">curve-3</td><td>Ours</td><td>(x sin(371.57/(13928/x + x)) + x)/(0.0024 + 2x)</td></tr><tr><td>NGGP</td><td>cos(log(1 + 1.67 exp(-1.56/(exp(17.7 exp((-12.9 + 4.95 log(x)/x)/x)) / x) - 1.16 + 0.656/x))))</td></tr></table>
490
+
491
+ to the hyperbolic tangent (tanh). The training process encompasses 2000 rounds, initiated with a learning rate of 0.01, which is subsequently reduced by a factor of 0.1 whenever the loss increases.
492
+
493
+ We used seven functions, the top three are odd functions, from easy to hard, then the next three are even functions, and the last one is a non-odd non-even function.
494
+
495
+ We first tested the speed of both methods. The cubic spline method takes 0.216, 0.217, 0.219, 0.220, 0.226 milliseconds to run on 10, 100, 1000, 10000, and 100000 data points, respectively. Correspondingly, MLP takes 3.28, 3.64, 8.97, 64.1, 549.7 seconds to run.
496
+
497
+ We then tested two loss equations for the corresponding functions, as shown in the Table S14, and the loss functions are as follows: $L_{odd} = \sum_{i=1}^{n}(y(x) + y(-x))^2 / n$ , $L_{even} = \sum_{i=1}^{n}(y(x) - y(-x))^2 / n$ . It can be seen in Figure S5 that if $10^{-4}$ of MSE is used as the cutoff for whether it is an odd/even function or not, the amount of data required by MLP is about 100-1000 times more than that of the spline.
498
+
499
+ # H ABLATION EXPERIMENT RESULT
500
+
501
+ In this section, we provide more detailed information about the results obtained from the ablation experiment on LiverMore benchmark. The full results of the ablation experiment can be found in Table S15. This table presents a comprehensive overview of the performance of the model under different ablation settings.
502
+
503
+ ![](images/beff37717688984c26b83c4af6328e4129c7bb81ed863ddf78f049cdc7608ee4.jpg)
504
+ Figure S5: The parity determination performance test. We test the ability of parity determination of two models by three odd functions and even functions from easy to hard. Compete Setting of this experiment is shown in Table S14.
505
+
506
+ Table S14: The average loss results for the Parity Determination Experiment across 10 parallel runs are presented in the table below. Each cell in the table contains two values: the upper value, situated above the horizontal line, signifies the loss value of the MLP, while the lower value indicates the loss of the cubic splines.
507
+
508
+ <table><tr><td>Name</td><td>Equation</td><td>Input Range</td><td>10</td><td>100</td><td>1000</td><td>10000</td><td>100000</td></tr><tr><td rowspan="4">odd-1</td><td rowspan="4">x</td><td>[-1,1]</td><td>2.84×10-1</td><td>2.57×10-3</td><td>1.15×10-3</td><td>5.88×10-4</td><td>1.21×10-4</td></tr><tr><td>[-5,5]</td><td>1.99×10-16</td><td>5.58×10-17</td><td>2.78×10-17</td><td>3.47×10-18</td><td>1.35×10-20</td></tr><tr><td></td><td>3.04×10-1</td><td>3.31×10-3</td><td>3.37×10-3</td><td>9.79×10-4</td><td>1.22×10-4</td></tr><tr><td></td><td>1.40×10-15</td><td>3.18×10-17</td><td>0.00×100</td><td>1.55×10-17</td><td>4.85×10-19</td></tr><tr><td rowspan="4">odd-2</td><td rowspan="4">x + sinh(x) + x3</td><td>[-1,1]</td><td>2.15×10-1</td><td>2.04×10-3</td><td>1.58×10-3</td><td>1.40×10-4</td><td>1.11×10-4</td></tr><tr><td></td><td>5.59×10-4</td><td>7.02×10-7</td><td>1.77×10-9</td><td>4.51×10-13</td><td>2.16×10-12</td></tr><tr><td></td><td>7.70×10-1</td><td>5.37×10-2</td><td>4.53×10-2</td><td>1.17×10-3</td><td>3.96×10-4</td></tr><tr><td></td><td>2.85×100</td><td>2.05×10-3</td><td>5.22×10-7</td><td>2.70×10-10</td><td>1.99×10-12</td></tr><tr><td rowspan="4">odd-3</td><td rowspan="4">x3+x+ x5+ sin(x) × cosh(x)</td><td>[-1,1]</td><td>1.64×10-1</td><td>1.09×10-3</td><td>5.76×10-4</td><td>2.38×10-4</td><td>8.04×10-5</td></tr><tr><td></td><td>3.10×10-2</td><td>8.76×10-5</td><td>2.52×10-8</td><td>8.57×10-12</td><td>4.00×10-11</td></tr><tr><td></td><td>7.60×10-2</td><td>7.07×10-4</td><td>7.95×10-4</td><td>1.55×10-4</td><td>6.95×10-5</td></tr><tr><td></td><td>3.45×102</td><td>8.16×10-2</td><td>6.28×10-5</td><td>2.75×10-8</td><td>1.62×10-9</td></tr><tr><td rowspan="4">even-1</td><td rowspan="4">x2</td><td>[-1,1]</td><td>2.60×10-1</td><td>4.33×10-3</td><td>7.44×10-4</td><td>1.59×10-4</td><td>8.76×10-5</td></tr><tr><td>[-5,5]</td><td>2.64×10-14</td><td>5.11×10-15</td><td>3.01×10-15</td><td>1.78×10-13</td><td>7.81×10-13</td></tr><tr><td></td><td>1.85×10-1</td><td>2.13×10-3</td><td>6.02×10-4</td><td>3.53×10-4</td><td>2.22×10-4</td></tr><tr><td></td><td>1.33×10-13</td><td>2.73×10-13</td><td>1.38×10-13</td><td>1.20×10-12</td><td>1.95×10-11</td></tr><tr><td rowspan="4">even-2</td><td rowspan="4">x × sinh(x)</td><td>[-1,1]</td><td>7.25×10-2</td><td>1.20×10-2</td><td>9.35×10-4</td><td>2.65×10-4</td><td>7.32×10-5</td></tr><tr><td>[-5,5]</td><td>2.43×10-4</td><td>2.93×10-7</td><td>5.77×10-10</td><td>3.23×10-13</td><td>2.70×10-12</td></tr><tr><td></td><td>9.94×10-1</td><td>7.90×10-1</td><td>8.06×10-1</td><td>2.88×10-1</td><td>3.15×10-4</td></tr><tr><td></td><td>5.54×100</td><td>1.58×10-3</td><td>1.55×10-5</td><td>1.00×10-9</td><td>2.02×10-10</td></tr><tr><td rowspan="4">even-3</td><td rowspan="4">x4 + log(x2+1)+ cos(x) × exp(0.1x2)</td><td>[-1,1]</td><td>1.09×10-1</td><td>2.61×10-3</td><td>1.52×10-3</td><td>3.09×10-4</td><td>1.48×10-4</td></tr><tr><td>[-5,5]</td><td>3.68×10-2</td><td>7.85×10-6</td><td>1.53×10-8</td><td>3.20×10-12</td><td>6.55×10-12</td></tr><tr><td></td><td>9.49×10-1</td><td>9.30×10-1</td><td>9.21×10-1</td><td>6.65×10-1</td><td>7.76×10-4</td></tr><tr><td></td><td>5.20×100</td><td>3.61×10-2</td><td>2.10×10-5</td><td>2.54×10-9</td><td>3.09×10-10</td></tr><tr><td rowspan="4">none</td><td rowspan="4">x3 + log(x2+1)+ x7 + sinh(x)</td><td>[-1,1]</td><td>9.90×10-1</td><td>4.99×10-1</td><td>5.13×10-1</td><td>5.13×10-1</td><td>5.16×10-1</td></tr><tr><td>[-5,5]</td><td>1.68×100</td><td>7.05×100</td><td>2.23×101</td><td>6.81×101</td><td>2.16×102</td></tr><tr><td></td><td>9.11×10-1</td><td>9.16×10-1</td><td>9.22×10-1</td><td>6.81×10-1</td><td>4.20×10-3</td></tr><tr><td></td><td>6.95×102</td><td>4.22×101</td><td>1.30×102</td><td>4.16×102</td><td>1.31×103</td></tr></table>
509
+
510
+ Table S15: Average Recovery Rate (%) of the Ablation Experiment over 100 parallel runs
511
+
512
+ <table><tr><td>Name</td><td>Equation</td><td>Ours</td><td>ModelA</td><td>ModelB</td><td>ModelC</td><td>ModelD</td></tr><tr><td>Livermore-1</td><td>1/3 + x1 + sin(x1)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-2</td><td>sin(x12)cos(x1) - 2</td><td>100</td><td>100</td><td>100</td><td>6</td><td>100</td></tr><tr><td>Livermore-3</td><td>sin(x13)cos(x12) - 1</td><td>55</td><td>20</td><td>0</td><td>0</td><td>55</td></tr><tr><td>Livermore-4</td><td>log(x1 + 1) + log(x12 + x1) + log(x1)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-5</td><td>x14 - x13 + x12 - x2</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-6</td><td>4x14 + 3x13 + 2x12 + x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-7</td><td>sinh(x1)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>10</td></tr><tr><td>Livermore-8</td><td>cosh(x1)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>3</td></tr><tr><td>Livermore-9</td><td>∑i=19x1i</td><td>100</td><td>83</td><td>100</td><td>88</td><td>100</td></tr><tr><td>Livermore-10</td><td>6sin(x1)cos(x2)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-11</td><td>(x12x2)/(x1 + x2)</td><td>100</td><td>91</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-12</td><td>x15/x2</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-13</td><td>x11/3</td><td>100</td><td>100</td><td>100</td><td>67</td><td>100</td></tr><tr><td>Livermore-14</td><td>x13 + x12 + x1 + sin(x1) + sin(x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-15</td><td>x11/5</td><td>100</td><td>100</td><td>100</td><td>97</td><td>100</td></tr><tr><td>Livermore-16</td><td>x12/5</td><td>100</td><td>100</td><td>100</td><td>12</td><td>100</td></tr><tr><td>Livermore-17</td><td>4sin(x1)cos(x2)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-18</td><td>sin(x12)cos(x1) - 5</td><td>100</td><td>89</td><td>90</td><td>0</td><td>100</td></tr><tr><td>Livermore-19</td><td>x15 + x14 + x12 + x1</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-20</td><td>exp(-x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-21</td><td>∑i=18x1i</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>Livermore-22</td><td>exp(-0.5x12)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td colspan="2">Average</td><td>97.95±4.0</td><td>94.68±7.2</td><td>95.00±8.9</td><td>80.45±15.6</td><td>89.45±11.9</td></tr></table>
2024/Reinforcement Symbolic Regression Machine/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1efd7eec9d48da255a1704c3ede353876caddecfe7afa8604975be301cbba527
3
+ size 1570862
2024/Reinforcement Symbolic Regression Machine/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/68a4c2a6-4f91-4a29-9388-6247fb5b4f7d_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c68fb817b88792099c180667a3c34588369cf184c87c4f635e152ff27451bd69
3
+ size 1262191
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:892f0dfc4e74788c5d2369caec5c2291f6e7eb2c6e6ceb24c0419d8425e50b87
3
+ size 1022370
2024/Relaxing the Additivity Constraints in Decentralized No-Regret High-Dimensional Bayesian Optimization/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/a5d7bcbb-9c36-41dc-9472-c8aa7f47f4b2_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75afa67b9b7167306a7604677c7562f80dfdb8ec959fd5c85e79a89f10e0e35d
3
+ size 11411345
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/full.md ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REMOTE SENSING VISION-LANGUAGE FOUNDATION MODELS WITHOUT ANNOTATIONS VIA GROUND REMOTE ALIGNMENT
2
+
3
+ Utkarsh Mall $*,1,2$ , Cheng Perng Phoo $^{1,*}$ , Meilin Kelsey Liu $^{1}$ , Carl Vondrick $^{2}$ , Bharath Hariharan $^{1}$ , Kavita Bala $^{1}$
4
+
5
+ $^{1}$ Cornell University, Ithaca, NY $^{2}$ Columbia University, New York, NY *Equal Contribution Correspondence: um2171@columbia.edu
6
+
7
+ # ABSTRACT
8
+
9
+ We introduce a method to train vision-language models for remote-sensing images without using any textual annotations. Our key insight is to use co-located internet imagery taken on the ground as an intermediary for connecting remote-sensing images and language. Specifically, we train an image encoder for remote sensing images to align with the image encoder of CLIP using a large amount of paired internet and satellite images. Our unsupervised approach enables the training of a first-of-its-kind large-scale vision language model (VLM) for remote sensing images at two different resolutions. We show that these VLMs enable zero-shot, open-vocabulary image classification, retrieval, segmentation and visual question answering for satellite images. On each of these tasks, our VLM trained without textual annotations outperforms existing VLMs trained with supervision, with gains of up to $20\%$ for classification and $80\%$ for segmentation. Our code, data, and other resources are available at: https://graft.cs.cornell.edu
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Our planet is constantly captured by an extensive array of remote sensors such as satellites or drones. These earth observation images enable the monitoring of various events on the earth such as deforestation, forest fires, and droughts so that rapid actions can be taken to protect our environment. While these images can shed light on various insights about our planet, the scale of such data is huge. This has prompted the development of automatic analysis models that could extract relevant information from a large amount of remotely sensed images. While useful, these models are often specialized and can only recognize a pre-defined set of concepts. Besides, they could be complex, decreasing their accessibility to experts outside of the domain of artificial intelligence.
14
+
15
+ Researchers developing automatic analysis methods for internet imagery encountered a similar problem a few years ago. One promising solution is to leverage large-scale vision-language models (VLMs) that are trained on millions or even billions of text-image pairs collected on the internet (Radford et al., 2021; Li et al., 2023). These models have demonstrated remarkable abilities to perform open-vocabulary recognition (Gu et al., 2022; Kuo et al., 2023) and enhance accessibility to non-AI experts (Alayrac et al., 2022; Surís et al., 2023).
16
+
17
+ It would be incredibly valuable for a range of applications to replicate the success of open-vocabulary recognition for satellite images as well, allowing an analyst to simply query, say, "Where are all the farmlands in the state of Massachusetts?" without requiring any new training or annotation for farms. However, building open-vocabulary vision-language models requires a large number of text-image pairs. This is difficult in remote sensing. Unlike internet images, which are often accompanied by captions or alt-text generated by their creators, satellite images are automatically generated by remote sensors with little to no human involvement and no corresponding text annotations. Prior work has attempted to annotate satellite images with textual annotations (Lu et al., 2017), but this process is expensive and requires expertise. As such, existing image-text datasets for remote sensing are almost four orders of magnitude smaller than the data used to train CLIP (10k
18
+
19
+ ![](images/90f35b098dd47fd0e85a443fd59b79f5be1efd55bd3519a15f6d9f610625e518.jpg)
20
+ Figure 1: The key insight for building VLMs using GRAFT is to use internet ground images as an intermediary to connect satellite and text. By training a satellite image model to align its embedding with the CLIP embedding of co-located internet (ground) images, we transitively align text with satellite images, sidestepping the need for textual annotations for training remote-sensing VLMs.
21
+
22
+ vs. 400 million). This challenge motivates the question we answer in this paper: can we build a vision-language model for satellite images without textual annotations?
23
+
24
+ Our key insight is to leverage internet images taken on the ground as an intermediary between text and satellite images. A satellite image captures the condition of a particular location on Earth. The same location could be captured by humans on the ground with cameras. By leveraging the geotags associated with the ground images, we can easily link satellite images to them, creating a large dataset of ground-satellite image pairs. Coupled with pre-trained internet image encoders from CLIP, we use this data to train a vision transformer that can map satellite images to the CLIP encoder's feature space. We use a contrastive loss on these pairs. Since this feature space is shared by the CLIP text encoder as well, the satellite encoder allows an image-level textual understanding of satellite images, completely sidestepping the need for textual annotations (see Fig. 1).
25
+
26
+ Observing the fact that a satellite image can capture a much bigger physical space than a ground image (e.g., a ground image can only capture part of a lake but a satellite image can capture the whole lake), we further develop a text-to-patch retrieval model using our ground-satellite image pairs. Specifically, with the geotag associated with a ground image, we can identify the pixel location on the satellite image where the ground image is captured. We then construct a vision transformer that can output patch representations that align with the CLIP representation of the ground images. This model allows for not just classification but also localization: we show that we can use this representation to identify patches relevant to a particular textual query or perform text-to-image segmentation by leveraging foundational segmentation models such as SAM (Kirillov et al., 2023).
27
+
28
+ Since we leverage the alignment between ground images and remotely sensed images to construct vision-language models without textual annotations, we name our method GRAFT (Ground Remote Alignment for Training). As shown in Fig. 2, GRAFT can perform classification, retrieval, semantic segmentation (in conjunction with SAM), and VQA (in conjunction with tools such as ViperGPT (Surís et al., 2023), all in a zero-shot manner. We extensively evaluate our VLMs on these tasks and demonstrate state-of-the-art zero-shot performance on various text-to-image retrieval (up to $20\%$ relative improvement over baseline) and text-to-segmentation benchmarks (more than $80\%$ relative improvement over baseline). Our contributions are summarized as follows:
29
+
30
+ - We introduce GRAFT which enables training remote sensing VLMs without any text annotations.
31
+ - To leverage GRAFT we collect two million-scale datasets of remotely-sensed images at different resolutions (1m for NAIP and 10m for Sentinel-2 images).
32
+ - Leveraging GRAFT with our dataset we develop foundational vision-language model for satellite images that can understand open-world concepts at two different resolutions and outperform prior arts on various image-level and pixel-level understanding tasks by a significant margin.
33
+ - We present a solution to the zero-shot VQA problem for satellite images by extending the ViperGPT framework with our VLMs.
34
+
35
+ # 2 RELATED WORKS
36
+
37
+ Foundation Models for Remote Sensing Images. Inspired by the recent success in internet imagery (Kirillov et al., 2023; Dosovitskiy et al., 2020; Liu et al., 2021; He et al., 2022; Kolesnikov
38
+
39
+ Tennis courts next to a swimming pool
40
+
41
+ ![](images/1593c820c8de9d021f1cbbdb6cfad3932f5eaaaf5352dc56e20b47fe1b2ec40d.jpg)
42
+
43
+ ![](images/976c7ceec6404fdf5bdfab4cba44a7ee4b5f3cd3054f80c42243657acaf9e78b.jpg)
44
+
45
+ ![](images/03b68bf5f91bd09414b6215934a2d7d7f61fb1e01372279209693b17a7c474d1.jpg)
46
+
47
+ ![](images/7fbfda0ffef656b6a0bb94ec34b5733e34c2ed20769cf12a85b501fa8df47538.jpg)
48
+
49
+ ![](images/928481fdf8e42e251707750d4db32dc5cb779a38c2d270ae4a1ace73b51d2f5a.jpg)
50
+
51
+ ![](images/9e9e522b0a0de270fac355f812f6cc1e9d23072a9d092a47d9c068973ce63d2d.jpg)
52
+
53
+ ![](images/fc2bfc7113e5c97e092bf145d5c9264783f0be73b2b909f0a97fce724dc23cc8.jpg)
54
+
55
+ ![](images/1898bc56208e433700348c4801faa0a6c50087507d54f57bbe0634259b3e2abb.jpg)
56
+
57
+ ![](images/168c86eca4e1135220b2adfc27b06aeca77a4370d48834e6cb1a36edc54766e5.jpg)
58
+ Rereerval
59
+
60
+ ![](images/a4cdfaf4316e604eafaca18fa8ebe9c429941b31a742dab0b2fe4b1b13b91d68.jpg)
61
+ NAIP Images (1m resolution)
62
+
63
+ ![](images/9518502f4181c8d16c44785053ce13188b09f0c30c3e08817946a8337f076f23.jpg)
64
+
65
+ ![](images/5a079ef10d0482d8a01c0ffb81482b20e46a7f4b2935a0ab8113ef18d34179de.jpg)
66
+
67
+ ![](images/c8238ad6e29650a3befa50f2de2af602fb046e617fcee082693bef7a55294c2b.jpg)
68
+
69
+ ![](images/ea7ba1f95b3752784cb8999158da0e6e2e809fdcd6b8eb7141f76a2a5dc8a127.jpg)
70
+ Sentinel-2 Images (10 m resolution)
71
+
72
+ ![](images/616ec9364a8a36763059eb264a7b93e51264fd6485deb5f01e8dd4178c463f9b.jpg)
73
+
74
+ ![](images/89ad1c0e4db6237c7e41b1168a32ff228836df78316a19d8af753724f1c9d1df.jpg)
75
+
76
+ ![](images/1e0db7abf5082c81fbb92c858c66f61cd45b5e1d89c5db9fd314c0645d4e4f76.jpg)
77
+ Prrnne
78
+
79
+ Coastal wetlands Arable land Marine waters Permanent crops
80
+
81
+ ![](images/911ad45e9abb18e9a30e3c48478e88e17c16de325c7f275e40673777e917c7af.jpg)
82
+
83
+ ![](images/a01fdc6bdf59fc8d486eb205d7d9c5d53803b5b53455112a5d7322346d7b5251.jpg)
84
+
85
+ ![](images/5cc0511bcef5fbd2966d9eaa1506ddab66ce9864069b2b9f0647122c84eddf98.jpg)
86
+
87
+ ![](images/c92183b59165eacce2c58a997141d9b967a68124d5e72847c715bdbde825bf65.jpg)
88
+
89
+ ![](images/abecac12caef2a4ae240a21ae5fc38d619a10d8f8df8436ad0eec63239ea3fd3.jpg)
90
+
91
+ ![](images/d01393d04f5b9905bd1b2af7d0f421b1a22ac0f712abd3d6fb69b475f4236344.jpg)
92
+
93
+ ![](images/5c4eae2b6bd977dc0fc76042862854140513e01392f9886482d90be0ac5f64d3.jpg)
94
+ zerrree
95
+ Sennnnnne
96
+
97
+ ![](images/b77deab2c554d46a1f2c55adf7ef801fb95a9365ecc98e0565ca97e36e574581.jpg)
98
+ Sentinel-2 Images
99
+ NAIP Images
100
+
101
+ ![](images/e1017f94b976d1e48591f665a1f7b6273dc962307a6cfe95dc534a7c29ba804f.jpg)
102
+
103
+ ![](images/79dadeb16a4b8afecf206371833b9c162dbf8dba5a27908d757ad929644a64ae.jpg)
104
+ Supermarket
105
+
106
+ ![](images/0d649d7d8fdbac755012b11efe45fc26c8d185fea1f279a4044057457a928b25.jpg)
107
+
108
+ ![](images/9f4982b2de3ab7ef29bd42f12e397ac678249a1ca33b29f6bd5294f3a367c034.jpg)
109
+
110
+ ![](images/05d252a519bfdbd3bb7e4cb2b9c9246a9973018dbb782f2c06aa8f8ba056581d.jpg)
111
+
112
+ ![](images/c0ed52abf046cdec1f9ed7bd1aa337e0b66944c3eebd6482bb7661650f535278.jpg)
113
+
114
+ ![](images/7461a77462934385df88c33d15c49f4e673a9eb96cbc61fd49df983848f32604.jpg)
115
+ Parking lot
116
+
117
+ ![](images/43839eea0a8c96cd4942ccf31419514340c16fd5527a2cfd75b32c7f5aa1c383.jpg)
118
+
119
+ ![](images/f0b23785d2a77a919ffb26ab991d0e94037a6e7f77367d1235999bcb9cb9e31c.jpg)
120
+ Baseball field
121
+ Farmland
122
+
123
+ ![](images/c13d576e48a890b7e775a5b0559cecd6c45bdefa0dc640f2268e3672afda978b.jpg)
124
+ Dense trees or forest
125
+
126
+ ![](images/d0446bacc9fd3f74aefc46fce9a421300c573c57f0917cebaa106b27db348d28.jpg)
127
+ Query: Is there a swimming pool on the left side of the lake?
128
+
129
+ ![](images/0d4533228b3910a3df388aeb83f6bc5edadd548b8cfbf407d522b25117ada394.jpg)
130
+
131
+ ![](images/76e6c2de12506949be9338e7bea0b50b638798471cba6eaf15093fba5a48194f.jpg)
132
+ poolpatches[0]
133
+
134
+ ![](images/7658a21ebf529847aabffff1a642418edce16dc42c38cd6d4fe63ef1b43c4b04.jpg)
135
+ lake_patches[0]
136
+
137
+ ![](images/2b3a8cc4b5d531e3fb098d19fa9d6da0533ab583fabaf0f2d2a9a7712d9e56c4.jpg)
138
+ Zero-shot
139
+ Query: Is it possible to bike and swim here?
140
+
141
+ ![](images/e029e1302a79b2be135954b5869f307b3abc6e9198830c67c8de299796110b10.jpg)
142
+
143
+ ![](images/1a4ad007f221d1f8531b8e90be833e18f16845984d0029099c4aae74b8b79fff.jpg)
144
+ Result: yes
145
+ bike_pathpatches[0] swim_areapatches[0]
146
+
147
+ ![](images/d2616d032059292d41b21c7463800dd63fdbdd9c3eb80a46b0669cda73fe4bb8.jpg)
148
+
149
+ ![](images/70ac8677464278fc582c2e02bc545d179fb1752d8f08a2271b15fd1a8e5b7e36.jpg)
150
+ Figure 2: Zero-shot features of our model. GRAFT can perform image retrieval with open-world queries, and zero-shot classification for satellite images. Using other foundational models, we extend it to also perform semantic segmentation and zero-shot VQA. (Please view digitally to see details.)
151
+
152
+ et al., 2020; Dehghani et al., 2023), recent work has started exploring foundation models for remote sensing images that can then be fine-tuned for downstream tasks such as change detection. Some of these foundation models are supervised such as SatlasPretrain (Bastani et al., 2023) while others are based on self-supervised techniques such as contrastive learning (Manas et al., 2021; Mall et al., 2023) or masked image modeling (Jakubik et al., 2023; Sun et al., 2022; Cong et al., 2022; Fuller et al., 2022). These models are effective image encoders, but cannot perform open vocabulary recognition. Open vocabulary recognition can enable non-AI experts to analyze satellite data through natural interfaces such as retrieval or question answering, which is the focus of this work.
153
+
154
+ Vision-and-Language Models in Remote Sensing. Prior work has built VLMs for captioning or retrieval of satellite images (Yang & Newsam, 2010; Zhang et al., 2014; Lu et al., 2017) (see (Wen et al., 2023) for a comprehensive review). However, these models are trained on orders of magnitude less data (thousands of image-text pairs (Hu et al., 2023; Arutiunian et al., 2021) compared to billions for their internet counterparts), because text captions for satellite images cannot be crowd-sourced and must instead be curated. Recently, Zhang et al. also proposed a way to filter large image-text pair datasets to obtain satellite image-text pairs. However, many of the images come from a diverse range of sources and are not uniform. Fine-tuning from internet image models like CLIP(Radford et al., 2021) is another option(Liu et al., 2023; Al Rahhal et al., 2022), but limiting. In this work, we propose to sidestep the problem by leveraging ground images as an intermediary.
155
+
156
+ Multi-modality for better recognition. We leverage ground images from the location where the remote sensing images are captured. Leveraging multiple complementary modalities has seen success in various domains. For instance, leveraging text and image has enabled open-vocabulary
157
+
158
+ object detection/segmentation in internet imagery (Gu et al., 2022; Ghiasi et al., 2022; Kuo et al., 2023). In remote sensing, using multi-spectral images or radar sensors allows a better understanding of the environment captured by a satellite (Cong et al., 2022; Zhao et al., 2023; Jakubik et al., 2023). The ground image modality has been also been explored by the community for geo-localization where the goal is to build models that could explicitly connect the remote sensing image and ground image modality (Lin et al., 2015; Token et al., 2021; Berton et al., 2021; 2022b;a; Sun et al., 2023; Gu et al., 2023). Different from these works, we use ground images as an intermediary to connect remote sensing images with language — a novel uncharted problem domain to the best of our knowledge.
159
+
160
+ # 3 TRAINING VLMS WITHOUT TEXTUAL ANNOTATIONS
161
+
162
+ ![](images/9e5e921246e77005d8457bea752585dc1f83f7af61f034e733863469761c7901.jpg)
163
+ Figure 3: Training image-level VLM (left) and pixel-level VLM (right) with GRAFT. Note that for each satellite image there can be multiple ground images such as $\{g_1^1, g_1^2\}$ for $s_1$ .
164
+
165
+ Our key insight is to create a vision-language model for satellite images by leveraging internet images as an intermediary between text and remotely sensed satellite images (see Fig. 1). In Sec. 3.1, we describe our training methodology GRAFT. In Sec. 3.2, we present our ground-satellite image pairs collection pipeline. Finally, we discuss how we can enhance our models with other foundation models to solve more general tasks for satellite images such as semantic segmentation and VQA.
166
+
167
+ # 3.1 GRAFT: GROUND REMOTE ALIGNMENT FOR TRAINING VLMS
168
+
169
+ We build two types of VLMs operating at different levels of understanding: image-level and pixel-level. Image-level models can be used to perform tasks that require understanding the satellite image as a whole such as text-to-image retrieval and zero-shot image classification; pixel-level models can be used when precise localization is required, such as for zero-shot segmentation and visual question answering (for questions like measuring the area of certain features). We note that many existing internet VLMs (Radford et al., 2021; Li et al., 2023) map internet text-image pairs to a common representation space. To build our desired VLMs we propose to build feature extractors that map satellite images to the same representation space. We assume access to a pre-trained internet VLM $(f_{G}, f_{T})$ that maps an internet image-text pair to a common representation space (we use CLIP).
170
+
171
+ # 3.1.1 IMAGE-LEVEL VLMS
172
+
173
+ We wish to build an image-level feature extractor $f_{S}^{I}$ that maps a satellite image to the same representation space of $(f_{G}, f_{T})$ . We can use contrastive loss like CLIP to pull together corresponding pairs of satellite and ground images and push apart negative examples. However, the vanilla contrastive learning setup assumes that each data point in one modality (satellite image) maps to a single point in the other modality (internet images). Unfortunately, satellite images capture a larger area and have multiple ground images associated with them. Thus a new formulation is needed.
174
+
175
+ We posit that a satellite image's embedding should be close to all ground images captured in the area and be far from ground images for other satellite images. Specifically, for a batch of data
176
+
177
+ $$
178
+ \mathcal {B} = \left\{s _ {i}, \left\{g _ {i} ^ {j} \right\} _ {j = 1} ^ {N _ {i}} \right\} _ {i = 1} ^ {N _ {B}} \tag {1}
179
+ $$
180
+
181
+ where $s_i, i = 1, \dots, N_B$ are satellite images and $g_i^j, j = 1, \dots, N_i$ are the $N_i$ ground images taken in the geographical area captured by $s_i$ . We capture our intuition using the following loss function:
182
+
183
+ $$
184
+ \mathcal {L} ^ {I} (\mathcal {B}, f _ {S} ^ {I}) = \frac {1}{N _ {B}} \sum_ {i = 1} ^ {N _ {B}} \frac {1}{N _ {i}} \sum_ {j = 1} ^ {N _ {i}} - \log \frac {\exp \left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot f _ {G} \left(g _ {i} ^ {j}\right) / \tau\right)}{\sum_ {a = 1} ^ {N _ {B}} \sum_ {b = 1} ^ {N _ {a}} \exp \left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot f _ {G} \left(g _ {a} ^ {b}\right) / \tau\right)} \tag {2}
185
+ $$
186
+
187
+ The outer sum is over satellite images in the batch, and the inner sum is over ground images for each satellite image. The numerator is the exponentiated similarity (we use cosine distance) between the satellite image $s_i$ and one of its ground images $g_i^j$ , while the denominator contains the similarity of the satellite image $s_i$ to every ground image $g_a^b$ in the batch. $\tau$ is a temperature hyperparameter. Note that when $N_i = 1, \forall i$ , Eq. (3) reverts back to the contrastive loss used in CLIP-like formulations. We use this loss to train $f_S^I$ while keeping $f_G$ frozen. See Fig. 3 for illustration.
188
+
189
+ Coincidentally, this loss function resembles the supervised contrastive learning (SCL) (Khosla et al., 2020), although the underlying problems are different. SCL is used for a single modality where examples of the same class are pulled closer to each other whereas we use the loss function to build an encoder for satellite images that aligns with a pre-trained representation of ground images.
190
+
191
+ # 3.1.2 Pixel-LEVEL VLMS
192
+
193
+ Many satellite image understanding tasks such as segmentation require pixel-level localization. To enable pixel-level understanding, we turn to another source of information ignored in the previous section: the precise geographical location where the ground image $g_{j}^{i}$ is captured, which can be mapped to a pixel location $p_{j}^{i}$ in the corresponding satellite image $s_{i}$ .
194
+
195
+ To leverage this signal, we assume a network architecture $f_{S}^{P}$ that can produce a feature vector $f_{S}^{P}(s)[p]$ for every pixel $p$ in the satellite image $s$ . We implement $f_{S}^{P}$ using a ViT (Dosovitskiy et al., 2020) that produces feature vectors for non-overlapping patches of the satellite images. $f_{S}^{P}(s)[p]$ is then simply the output feature vector for the patch that contains pixel $p$ . We train this feature extractor using a loss function similar to Eq. (3):
196
+
197
+ $$
198
+ \mathcal {L} ^ {P} (\mathcal {B}, f _ {S} ^ {P}) = \frac {1}{N _ {B}} \sum_ {i = 1} ^ {N _ {B}} \frac {1}{N _ {i}} \sum_ {j = 1} ^ {N _ {i}} - \log \frac {\exp \left(f _ {S} ^ {P} \left(s _ {i}\right) \left[ p _ {i} ^ {j} \right] \cdot f _ {G} \left(g _ {i} ^ {j}\right) / \tau\right)}{\sum_ {a = 1} ^ {N _ {B}} \sum_ {b = 1} ^ {N _ {a}} \exp \left(f _ {S} ^ {P} \left(s _ {i}\right) \left[ p _ {i} ^ {j} \right] \cdot f _ {G} \left(g _ {a} ^ {b}\right) / \tau\right)} \tag {3}
199
+ $$
200
+
201
+ to enforce the intuition that the pixel representation should stay close to its ground images in the representation space induced by the pre-trained VLM $(f_{G}, f_{T})$ . The above equation only provides sparse signals for training: the loss is computed only on pixel locations that have at least one ground image (see Fig. 3). Nevertheless, empirically we found that this sparse supervision suffices.
202
+
203
+ # 3.2 COLLECTING GROUND-SATELLITE IMAGE PAIRS
204
+
205
+ To perform our training, we need a dataset of ground-satellite image pairs. We collected two such datasets for two different kinds of remote sensing imagery: NAIP (U.S.G.S., 2022) (high resolution, with 1 meter per pixel) and Sentinel-2 (Drusch et al., 2012) (low resolution, with 10 meters per pixel). We describe our data collection process below.
206
+
207
+ Ground Images: We collect ground images from Flickr<sup>1</sup>. To obtain representative images from diverse regions (instead of just populous places), we uniformly select locations and sample non-duplicate images with accurate geo-tags (street-level accuracy). We remove indoor images using an indoor-outdoor classifier (a ResNet18 trained on SUN397 (Xiao et al., 2010)). While we found no discerning effect between using 'all' and 'outdoor' images, we filtered for ease of experimentation.
208
+
209
+ Satellite Images: We sample satellite images with their center at the geotags of the ground images. All the ground images whose geotags fall in this satellite image are assigned to it. Additionally, we do not sample satellite images using the already assigned ground images. As a result, we avoid high overlaps between satellite images (at least 112 pixels apart). We validate this sampling choice in Sec. 4.4. Fig. 4 shows the density of the image pairs in the US (left) and the world (right) with NAIP
210
+
211
+ and Sentinel-2 respectively. To avoid over-representation, we randomly sample 25 ground images, if there are more than 25 of them. Our model uses $224 \times 224$ satellite images, however for better augmentation (rotation and translation without padding), we download $448 \times 448$ images.
212
+
213
+ ![](images/81bdaf150e17659edb9ec6b7a57d4416959183b7e1b82b049215ee261daca707.jpg)
214
+ Figure 4: Frequency histogram of locations of samples in our internet image-NAIP image pair dataset (left) and in our internet image-Sentinel-2 image pair dataset (right).
215
+
216
+ ![](images/504492a56cec6a260a37608facf9d89765fc92f1303bb3c914bff20e0468dcd1.jpg)
217
+
218
+ In addition to location consistency between ground and satellite images, we also incorporate temporal consistency into Sentinel-2 data. Specifically, we collect the temporally closest images from the location of the internet images (containing $< 1\%$ of cloud). We cannot do so for NAIP since the revisit time of NAIP is much longer (once every 2 years vs once every 5 days for Sentinel-2). We make use of EarthEngine $\mathrm{APIs}^2$ to obtain satellite imagery. Our dataset collection efforts yield 10.2 million pairs for NAIP and 8.7 million pairs for Sentinel-2 (also refer to Appendix A).
219
+
220
+ # 3.3 ENHANCING GRAFT VLMS WITH FOUNDATIONAL MODELS
221
+
222
+ While the performance GRAFT is impressive (see Sec. 4), we can further extend its capability using other foundation models and enable a wider range of applications:
223
+
224
+ Zero-shot Image Segmentation. While the pixel-level model can already be used to perform segmentation, we can improve its performance by leveraging bottom-up segmentation models like SAM Kirillov et al. (2023). To enhance the pixel-level model with SAM, we first select the highest-scoring patches using our model and then feed the center of the patch as point prompts to SAM.
225
+
226
+ Visual Question Answering (VQA). While GRAFT can be used to answer simple questions such as "Which satellite images contain a baseball field?", more nuanced questions may require sophisticated reasoning. To allow for more sophisticated questions, we couple our VLM with ViperGPT (Surís et al., 2023). ViperGPT uses an LLM to convert the natural language query into a program, which in turn makes calls to an open-vocabulary object detector. We replace the GLIP-based detector in Viper-GPT with our pixel-level GRAFT model. To produce a detection output, we threshold pixel-level scores and retrieve connected components to get instances, and then further refine each instance by using SAM as before. Further details are in the Appendix C.5.
227
+
228
+ # 3.4 IMPLEMENTATION DETAILS
229
+
230
+ We parameterize all our models using ViT-B/16 (Dosovitskiy et al., 2020). We also provide analysis on ViT-B/32 on a few tasks for fair comparison with baselines. All our models are initialized using the CLIP image encoder. We select hyperparameters using a validation set with NAIP resolution that we collected. This validation set is annotated using segmentation annotations from OpenStreetMaps from the same time as NAIP images as in (Bastani et al., 2023). The same set of hyperparameters is used for training the Sentinel-2 models. Please see Appendix C.2 for more information about this.
231
+
232
+ # 4 EXPERIMENTS AND RESULTS
233
+
234
+ In this section, we evaluate GRAFT on three kinds of tasks: image classification and retrieval, semantic segmentation and question answering. We ablate various design choices we have made.
235
+
236
+ Table 1: Zero-shot performance of Sentinel-2 image-level model on classification and retrieval benchmarks. Our model is significantly better on almost all the classification and retrieval metrics (red and blue indicate best and second best performance). We also compare our model against the 1-shot performance of remote sensing models that lack language capabilities.
237
+
238
+ <table><tr><td rowspan="3">Model</td><td rowspan="3">Labeled Satellite Data</td><td rowspan="3">Input</td><td rowspan="3">Backbone</td><td colspan="2">Classification</td><td colspan="4">Retrieval</td></tr><tr><td rowspan="2">EuroSAT Acc.</td><td rowspan="2">BEN mAP</td><td colspan="2">EuroSAT</td><td colspan="2">BEN</td></tr><tr><td>mAP100</td><td>mAP20</td><td>mAP100</td><td>mAP20</td></tr><tr><td>CLIP</td><td>X</td><td rowspan="4">Text</td><td>ViT-B/32</td><td>47.61</td><td>21.31</td><td>46.86</td><td>49.61</td><td>30.45</td><td>32.20</td></tr><tr><td>CLIP</td><td>X</td><td>ViT-B/16</td><td>53.59</td><td>23.13</td><td>63.99</td><td>72.57</td><td>32.54</td><td>33.10</td></tr><tr><td>CLIP-RSICD</td><td>✓</td><td>ViT-B/32</td><td>45.93</td><td>27.68</td><td>49.88</td><td>53.50</td><td>38.76</td><td>36.11</td></tr><tr><td>RemoteCLIP</td><td>✓</td><td>ViT-B/32</td><td>38.59</td><td>22.76</td><td>51.21</td><td>53.27</td><td>34.39</td><td>38.42</td></tr><tr><td>SeCo</td><td>X</td><td rowspan="3">Image</td><td>ResNet-50</td><td>45.63</td><td>23.86</td><td>68.78</td><td>78.42</td><td>40.48</td><td>51.11</td></tr><tr><td>CACo</td><td>X</td><td>ResNet-50</td><td>48.50</td><td>26.92</td><td>69.90</td><td>79.15</td><td>47.40</td><td>57.02</td></tr><tr><td>Satlas</td><td>✓</td><td>Swin</td><td>42.04</td><td>18.47</td><td>63.64</td><td>72.61</td><td>29.17</td><td>30.46</td></tr><tr><td>GRAFT</td><td>X</td><td rowspan="2">Text</td><td>ViT-B/32</td><td>47.80</td><td>29.31</td><td>66.12</td><td>72.36</td><td>45.88</td><td>45.35</td></tr><tr><td>GRAFT</td><td>X</td><td>ViT-B/16</td><td>63.76</td><td>32.46</td><td>81.56</td><td>85.21</td><td>49.61</td><td>53.86</td></tr></table>
239
+
240
+ # 4.1 IMAGE-LEVEL UNDERSTANDING
241
+
242
+ We are interested in understanding how GRAFT models performs at image-level understanding tasks. We consider two tasks: zero-shot image classification (i.e., assign an image a text label) and text-based image retrieval (i.e., retrieve all images relevant to a text query).
243
+
244
+ Datasets and Evaluation. For models trained on Sentinel-2 data, we evaluate classification and retrieval performance on EuroSAT (Helber et al., 2019) and BigEarthNet (or BEN by Sumbul et al. (2019)). For models trained on NAIP data, we evaluate zero-shot classification on SAT-4 and SAT-6 (Basu et al., 2015). We also create a multi-label NAIP dataset using annotations from OpenStreetMap (OSM contributors, 2023) to evaluate both classification and retrieval.
245
+
246
+ Baselines. We consider CLIP as a natural baseline. There is no prior work on vision-language models trained without annotations. Instead, we consider two vision-language models that are trained in a supervised manner with text annotations: CLIP-RSICD (Arutiunian et al., 2021) and RemoteCLIP (Liu et al., 2023). Please refer to Appendix B for the text prompt used for the zero-shot models.
247
+
248
+ In addition to the aforementioned zero-shot baselines, we also provide one-shot baselines on various representation learning approaches for Sentinel-2 models. For these baselines, instead of using textual queries, we use the feature of the single example. To get a better understanding of the performance, we report the average performance over 10 different runs.
249
+
250
+ Results. For the performance of GRAFT models trained on Sentinel-2 data, we report classification results (left) and retrieval results (right) in Tab. 1; for GRAFT models trained on NAIP, we report classification and retrieval performance in Tab. 2. Almost across the board (with the exception of one retrieval metric), our model (GRAFT) outperforms all other models irrespective of pre-training modality and pre-training supervision. Furthermore, the margin of improvement is large for many of the datasets. For example, for EuroSAT classification, GRAFT with VIT-B/16 outperforms all other models by almost 10 points (20% relative). The gains on SAT-6 are even larger (30 points). In general, the VIT-B/16 backbones perform better, with the exception of SAT-4/SAT-6. The latter two datasets have $28 \times 28$ images (smaller than the VIT-B/32 patch), which may explain this discrepancy.
251
+
252
+ The significant improvement compared to supervised VLMs such as CLIP-RSICD and RemoteCLIP suggests that it is much more advantageous to use many ground-satellite image pairs without text, rather than fine-tuning in a supervised manner on small datasets.
253
+
254
+ In addition, our zero-shot GRAFT models also outperform one-shot performance of previous foundation models, including Satlas which is pre-trained on 302 million labeled examples. For example, on the challenging BigEarthNet, zero-shot GRAFT VIT-B/32 is able to outperform 1-shot Satlas by $\sim 13$ mAP on average without using any annotated images.
255
+
256
+ Table 2: Zero-shot performance of NAIP image-level model on classification (Left) and retrieval (Right) metrics. GRAFT outperforms the existing models on both retrieval and classification tasks at this resolution as well (red and blue indicate best and second best performance).
257
+
258
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">Backbone</td><td colspan="3">Classification</td><td colspan="2">Retrieval</td></tr><tr><td>SAT-4 Acc.</td><td>SAT-6 Acc</td><td>NAIP-OSM mAP</td><td>NAIP-OSM mAP100</td><td>mAP20</td></tr><tr><td>CLIP</td><td>ViT-B/32</td><td>50.74</td><td>30.39</td><td>26.94</td><td>56.71</td><td>57.51</td></tr><tr><td>CLIP</td><td>ViT-B/16</td><td>46.60</td><td>25.82</td><td>31.89</td><td>60.88</td><td>61.59</td></tr><tr><td>CLIP-RSICD</td><td>ViT-B/32</td><td>47.72</td><td>40.57</td><td>32.51</td><td>64.58</td><td>63.71</td></tr><tr><td>RemoteCLIP</td><td>ViT-B/32</td><td>33.55</td><td>20.76</td><td>23.29</td><td>42.03</td><td>40.84</td></tr><tr><td>GRAFT</td><td>ViT-B/32</td><td>66.64</td><td>72.42</td><td>41.36</td><td>74.31</td><td>74.77</td></tr><tr><td>GRAFT</td><td>ViT-B/16</td><td>53.42</td><td>66.57</td><td>42.47</td><td>75.35</td><td>76.55</td></tr></table>
259
+
260
+ Table 3: Accuracy of our pixel-level models on the Satlas land-cover segmentation task.
261
+
262
+ <table><tr><td>Model</td><td>NAIP</td><td>Sentinel</td></tr><tr><td>CLIPSeg</td><td>26.99</td><td>20.02</td></tr><tr><td>GRAFT</td><td>49.38</td><td>31.95</td></tr><tr><td>GRAFT+SAM</td><td>-</td><td>32.43</td></tr></table>
263
+
264
+ Table 4: Performance of our model on zero-shot VQA when used with ViperGPT.
265
+
266
+ <table><tr><td rowspan="2">Model</td><td colspan="5">Question type</td></tr><tr><td>Presence</td><td>Area</td><td>Comp.</td><td>Count</td><td>Average</td></tr><tr><td>GLIP</td><td>72.04</td><td>22.91</td><td>48.98</td><td>23.57</td><td>37.69</td></tr><tr><td>GRAFT</td><td>61.46</td><td>32.04</td><td>50.34</td><td>44.38</td><td>44.05</td></tr></table>
267
+
268
+ # 4.2 Pixel-LEVEL UNDERSTANDING
269
+
270
+ We next evaluate our pixel-level model on zero-shot segmentation on the Satlas (Bastani et al., 2023) segmentation task. This task offers two benchmarks: one at NAIP resolution and the other at Sentinel-2 resolution. The segmentation task is 11-way landcover classification, but we remove 3 of the 11 categories that do not appear at all in the test set.
271
+
272
+ For the NAIP resolution, the segmentation masks are at a resolution 16 times smaller than the images. As such, for the NAIP resolution benchmark, we directly evaluate GRAFT without any SAM-based refinement. For the Sentinel-2 resolution, we report results both with and without SAM.
273
+
274
+ Baseline: We compare our model against CLIPSeg (Lüddecke & Ecker, 2022), which train a decoder on top of CLIP (using additional internet images) to perform open-world segmentation.
275
+
276
+ Results: Tab. 3 shows the results. GRAFT nearly doubles the per-class accuracy on the NAIP benchmark, and yields more than a $50\%$ relative improvement on the Sentinel-2 benchmark. Interestingly, refinement with SAM offers only a minor improvement.
277
+
278
+ # 4.3 VISUAL QUESTION ANSWERING
279
+
280
+ ViperGPT uses GLIP (Li et al., 2022) as the underlying vision model. We swap out the GLIP model with our own pixel-level model trained on the NAIP data and evaluate both models on the test set of the high-resolution version of RSVQA benchmark (Lobry et al., 2020). We subsample 500 unique test questions (because of API restrictions on the ViperGPT's LLM) and replace the images with NAIP images from the same location. We report our results in Tab. 4. With our pixel-level model, ViperGPT outperforms the variant with GLIP by a significant margin across all question and question types (except presence), yielding an almost 6 point improvement in zero-shot accuracy. Fig. 2 (last row) shows example queries, where GLIP fails to detect the swimming pool or bike path and therefore gets an incorrect answer. However, the GRAFT model can get the correct answer.
281
+
282
+ # 4.4 ABLATIONS
283
+
284
+ We conduct the following two ablations to validate our design choices. Reported performance is on a separate held-out validation set of NAIP images annotated with Open Street Maps (see Appendix C.2 materials for more information about this validation set).
285
+
286
+ Importance of sampling in data collection: To reduce overlapped satellite images, we sample satellite images such that the central pixels of each satellite image are at least 112 meters apart (see
287
+
288
+ Sec. 3.2). If instead we sample the satellite images randomly, performance drops from $74.8\%$ mAP to $69.3\%$ mAP. This vindicates our sampling strategy.
289
+
290
+ Importance of images vs text: Instead of using the CLIP embedding of internet images as the intermediary for learning, we could instead use alt-text information from the internet images as direct textual supervision for contrastive learning. Replacing the ground image embeddings with the embeddings of this alt-text reduces performance from $74.8\%$ mAP to $65.4\%$ mAP. Even using textual embeddings as an auxiliary loss still yields reduced performance ( $70\%$ mAP). This suggests that images, not text, are the better intermediary for alignment, possibly due to the large noise in alt-text (see Appendix E for more details). Further ablations can be found in the Appendix E.
291
+
292
+ # 4.5 EXAMPLE APPLICATIONS
293
+
294
+ Our models can be used to create powerful visualization and analysis tools for city and regional planning, agriculture, and climate science. For example, we can use our model to query for any open-world concept on satellite images from a large region and create maps for that concept. We show example maps for cities, roads and farms in Massachusetts using NAIP images in Fig. 5.
295
+
296
+ ![](images/23847f984667ce67453d1a8624b8829c7169c1d63d7c9ad2729576e6bdd06b65.jpg)
297
+ Figure 5: Density maps produced using open-world queries for cities, roads, and farmlands using our method (darker blue means higher density). The right-most map shows the true agricultural land use pattern. Our map matches with the ground truth.
298
+
299
+ # 5 DISCUSSION AND CONCLUSION
300
+
301
+ ![](images/3374d5d821abdc529bba5707ceb93cdf336e524d90da274acc3d680491665082.jpg)
302
+ Figure 6: Top retrievals of GRAFT when finding dynamic objects such as cargo ships or airplanes. Images with green box show a successful retrieval of dynamic objects.
303
+
304
+ Limitations: One limitation of GRAFT is that it is difficult to capture dynamic objects in satellite images. Our models cannot align satellite images with internet images of dynamic objects because of the low revisit rate of satellites. Fig. 6 shows top retrieval for concepts like 'cargo ship'. While GRAFT cannot find such dynamic objects, it can still retrieve where they might potentially be found. Using a higher temporal resolution (daily revisit) is a way to handle this problem in the future. Please refer to the Appendix F for more potential directions of improvement.
305
+
306
+ Conclusions: We present GRAFT—a method to train vision-language models for satellite images that can be used for a diverse set of vision problems in remote sensing. To train this model, we propose a novel method of connecting satellite images with text using internet images as an intermediary. This allows us to train a first-of-its-kind large-scale VLM for remote sensing imagery without expensive language-paired data. This VLM yields state-of-the-art accuracy for zero-shot image classification, retrieval, segmentation and VQA, providing gains of up to $20\%$ on classification and up to $80\%$ for segmentation. We believe that this VLM can enable scientists of all stripes to analyze the vast trove of satellite data that is now available.
307
+
308
+ # 6 ETHICS
309
+
310
+ As in all visual recognition, there is potential negative impact through violations of individual privacy. While the resolution of our satellite imagery is not sufficient for identifying individuals, it does hold the potential for detecting environmental alterations made by individuals. The use of our proposed techniques for surveillance should be appropriately regulated. Furthermore, models such as CLIP learn various biases relating to race, culture, gender, and more from the internet (Agarwal et al., 2021). Since GRAFT is trained with the text image encoder of CLIP, it may inadvertently perpetuate or even exacerbate such biases. The use of our model should be done carefully in applications that are sensitive to such biases.
311
+
312
+ Furthermore, to mitigate the misuse of our models and data we release the data and the trained models only to people complying with an ethics agreement. By adhering to the ethics agreement, the user agrees to follow the laws, regulations, and the ASPRS Code of Ethics (ASPRS). We also ask the user to provide their intended use case before accessing the model. Another thing to note is that the data we use for this training is already freely and publicly available, hence our model is not exacerbating the issue of privacy.
313
+
314
+ # 7 ACKNOWLEDGMENTS
315
+
316
+ This research is based upon work supported in part by the Office of the Director of National Intelligence (Intelligence Advanced Research Projects Activity) via 2021-20111000006, the NSF STC for Learning the Earth with Artificial Intelligence and Physics, and the U.S. DARPA ECOLE Program No. #HR00112390060. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, DARPA, or the US Government. The US Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
317
+
318
+ # REFERENCES
319
+
320
+ Sandhini Agarwal, Gretchen Krueger, Jack Clark, Alec Radford, Jong Wook Kim, and Miles Brundage. Evaluating clip: towards characterization of broader capabilities and downstream implications. CoRR, 2021.
321
+ Mohamad M Al Rahhal, Yakoub Bazi, Norah A Alsharif, Laila Bashmal, Naif Alajlan, and Farid Melgani. Multilanguage transformer for improved text to remote sensing image retrieval. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 15:9115-9126, 2022.
322
+ Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. NeurIPS, 2022.
323
+ Artashes Arutiunian, Dev Vidhani, Goutham Venkatesh, Mayank Bhaskar, Ritobrata Ghosh, and Sujit Pal. Fine tuning clip with remote sensing (satellite) images and captions, 2021.
324
+ ASPRS. Code of Ethics. https://www.asprs.org/asprs-organization/code-of-ethics-of-the-american-society-for-photogrammetry-and-remote-sensing. Accessed: 11/17/2023.
325
+ Favyen Bastani, Piper Wolters, Ritwik Gupta, Joe Ferdinando, and Aniruddha Kembhavi. Satlas: A large-scale, multi-task dataset for remote sensing image understanding. ICCV, 2023.
326
+ Saikat Basu, Sangram Ganguly, Supratik Mukhopadhyay, Robert DiBiano, Manohar Karki, and Ramakrishna Nemani. Deepsat: a learning framework for satellite imagery. In SIGSPATIAL, 2015.
327
+ Gabriele Berton, Carlo Masone, Valerio Paolicelli, and Barbara Caputo. Viewpoint invariant dense matching for visual geolocation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 12169-12178, 2021.
328
+
329
+ Gabriele Berton, Carlo Masone, and Barbara Caputo. Rethinking visual geo-localization for large-scale applications. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4878-4888, 2022a.
330
+ Gabriele Berton, Riccardo Mereu, Gabriele Trivigno, Carlo Masone, Gabriela Csurka, Torsten Sattler, and Barbara Caputo. Deep visual geo-localization benchmark. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5396-5407, 2022b.
331
+ Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. Reproducible scaling laws for contrastive language-image learning. In CVPR, 2023.
332
+ Yezhen Cong, Samar Khanna, Chenlin Meng, Patrick Liu, Erik Rozi, Yutong He, Marshall Burke, David B Lobell, and Stefano Ermon. Satmae: Pre-training transformers for temporal and multispectral satellite imagery. In NeurIPS, 2022.
333
+ Mostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski, Jonathan Heek, Justin Gilmer, Andreas Peter Steiner, Mathilde Caron, Robert Geirhos, Ibrahim Alabdulmohsin, et al. Scaling vision transformers to 22 billion parameters. In ICML, 2023.
334
+ Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. CoRR, 2020.
335
+ Matthias Drusch, Umberto Del Bello, Sébastien Carlier, Olivier Colin, Veronica Fernandez, Ferran Gascon, Bianca Hoersch, Claudia Isola, Paolo Laberinti, Philippe Martimort, et al. Sentinel2: ESA's optical high-resolution mission for GMES operational services. Remote Sensing of Environment, 2012.
336
+ Anthony Fuller, Korean Millard, and James R Green. Satvit: Pretraining transformers for earth observation. IEEE Geoscience and Remote Sensing Letters, 2022.
337
+ Golnaz Ghiasi, Xiuye Gu, Yin Cui, and Tsung-Yi Lin. Scaling open-vocabulary image segmentation with image-level labels. In European Conference on Computer Vision, pp. 540-557. Springer, 2022.
338
+ Bo Gu, Hefei Ling, Yuxuan Shi, Zongyi Li, Chuang Zhao, Ping Li, and Qiang Cao. Mutual relative position learning transformer for cross-view geo-localization. In 2023 IEEE International Conference on Image Processing (ICIP), pp. 286-290. IEEE, 2023.
339
+ Xiuye Gu, Tsung-Yi Lin, Weicheng Kuo, and Yin Cui. Open-vocabulary object detection via vision and language knowledge distillation. In ICLR 2022, 2022.
340
+ Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dólár, and Ross Girshick. Masked autoencoders are scalable vision learners. In CVPR, 2022.
341
+ Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. JSTAEORS, 2019.
342
+ Yuan Hu, Jianlong Yuan, Congcong Wen, Xiaonan Lu, and Xiang Li. Rsgpt: A remote sensing vision language model and benchmark. CoRR, 2023.
343
+ Johannes Jakubik, Linsong Chu, Paolo Fraccaro, Carlos Gomes, Gabby Nyirjesy, Ranjini Bangalore, Devyani Lambhate, Kamal Das, Dario Oliveira Borges, Daiki Kimura, Naomi Simumba, Daniela Szwarcman, Michal Muszynski, Kommy Weldemariam, Bianca Zadrozny, Raghu Ganti, Carlos Costa, Campbell Edwards, Blair & Watson, Karthik Mikkavilli, Hendrik Schmude, Johannes & Hamann, Parkin Robert, Sujit Roy, Christopher Phillips, Kumar Ankur, Muthukumaran Ramasubramanian, Iksha Gurung, Wei Ji Leong, Ryan Avery, Rahul Ramachandran, Manil Maskey, Pontus Olofossen, Elizabeth Fancher, Tsengdar Lee, Kevin Murphy, Dan Duffy, Mike Little, Hamed Alemohammad, Michael Cecil, Steve Li, Sam Khallaghi, Denys Godwin, Maryam Ahmadi, Fatemeh Kordi, Bertrand Saux, Neal Pastick, Peter Doucette, Rylie Fleckenstein, Dalton Luanga, Alex Corvin, and Erwan Granger. Prithvi-100M, August 2023.
344
+
345
+ Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. *NeurIPS*, 2020.
346
+ Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. CoRR, 2023.
347
+ Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Big transfer (bit): General visual representation learning. In ECCV, 2020.
348
+ Weicheng Kuo, Yin Cui, Xiuye Gu, AJ Piergiovanni, and Anelia Angelova. F-vlm: Open-vocabulary object detection upon frozen vision and language models. In ICLR 2023, 2023.
349
+ Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. CoRR, 2023.
350
+ Lianian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded language-image pretraining. In CVPR, 2022.
351
+ Tsung-Yi Lin, Yin Cui, Serge Belongie, and James Hays. Learning deep representations for ground-to-aerial geolocation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5007-5015, 2015.
352
+ Fan Liu, Delong Chen, Zhangqingyun Guan, Xiaocong Zhou, Jiale Zhu, and Jun Zhou. Remoteclip: A vision language foundation model for remote sensing. CoRR, 2023.
353
+ Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In ICCV, 2021.
354
+ Sylvain Lobry, Diego Marcos, Jesse Murray, and Devis Tuia. Rsvqa: Visual question answering for remote sensing data. IEEE TGRS, 2020.
355
+ Xiaoqiang Lu, Binqiang Wang, Xiangtao Zheng, and Xuelong Li. Exploring models and data for remote sensing image caption generation. IEEE Transactions on Geoscience and Remote Sensing, 56(4):2183-2195, 2017.
356
+ Timo Lüddecke and Alexander Ecker. Image segmentation using text and image prompts. In CVPR, 2022.
357
+ Utkarsh Mall, Bharath Hariharan, and Kavita Bala. Change-aware sampling and contrastive learning for satellite images. In CVPR, 2023.
358
+ Oscar Manas, Alexandre Lacoste, Xavier Giro-i Nieto, David Vazquez, and Pau Rodriguez. Seasonal contrast: Unsupervised pre-training from uncurated remote sensing data. In ICCV, 2021.
359
+ Ron Mokady, Amir Hertz, and Amit H Bermano. Clipcap: Clip prefix for image captioning. CoRR, 2021.
360
+ OSM contributors. Planet dump retrieved from https://planet.osm.org. https://www.openstreetmap.org, 2023. Accessed: 08/15/2023.
361
+ Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In ICML, 2021.
362
+ Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al. Laion-5b: An open large-scale dataset for training next generation image-text models. NeurIPS, 2022.
363
+ Gencer Sumbul, Marcela Charfuelan, Begüm Demir, and Volker Markl. Bigearthnet: A large-scale benchmark archive for remote sensing image understanding. In IGARSS, 2019.
364
+ Xian Sun, Peijin Wang, Wanxuan Lu, Zicong Zhu, Xiaonan Lu, Qibin He, Junxi Li, Xuee Rong, Zhujun Yang, Hao Chang, et al. Ringmo: A remote sensing foundation model with masked image modeling. IEEE TGRS, 2022.
365
+
366
+ Yuxi Sun, Yunming Ye, Jian Kang, Ruben Fernandez-Beltran, Shanshan Feng, Xutao Li, Chuyao Luo, Puzhao Zhang, and Antonio Plaza. Cross-view object geo-localization in a local region with satellite imagery. IEEE Transactions on Geoscience and Remote Sensing, 2023.
367
+ Dídac Surís, Sachit Menon, and Carl Vondrick. Vipergpt: Visual inference via python execution for reasoning. ICCV, 2023.
368
+ Aysim Token, Qunjie Zhou, Maxim Maximov, and Laura Leal-Taixe. Coming down to earth: Satellite-to-street view synthesis for geo-localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6488-6497, 2021.
369
+ U.S.G.S. National agriculture imagery program (naip). 2022.
370
+ Congcong Wen, Yuan Hu, Xiang Li, Zhenghang Yuan, and Xiao Xiang Zhu. Vision-language models in remote sensing: Current progress and future trends. arXiv preprint arXiv:2305.05726, 2023.
371
+ J. Xiao, J. Hays, K. A. Ehinger, A. Oliva, and A. Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In CVPR, 2010.
372
+ Yi Yang and Shawn Newsam. Bag-of-visual-words and spatial extensions for land-use classification. In Proceedings of the 18th SIGSPATIAL international conference on advances in geographic information systems, pp. 270–279, 2010.
373
+ Fan Zhang, Bo Du, and Liangpei Zhang. Saliency-guided unsupervised feature learning for scene classification. IEEE transactions on Geoscience and Remote Sensing, 53(4):2175-2184, 2014.
374
+ Zilun Zhang, Tiancheng Zhao, Yulong Guo, and Jianwei Yin. Rs5m: A large scale vision-language dataset for remote sensing vision-language foundation model. CoRR, 2023.
375
+ Mingmin Zhao, Peder Olsen, and Ranveer Chandra. Seeing through clouds in satellite images. IEEE Transactions on Geoscience and Remote Sensing, 2023.
376
+
377
+ ![](images/7eb3e51a29eeeb19afd432b340519d3c9d5dcb25300a29ce61bd638f8266bd80.jpg)
378
+ Figure 7: Distribution of the number of images corresponding to a single satellite images in our NAIP (Left) and Sentinel-2 (Right) datasets.
379
+
380
+ ![](images/1d75ca28747ce6fbe9d95de3a911d9cdfe29a811a5f5cfc784b1e3c7a8817e8f.jpg)
381
+
382
+ # A TRAINING DATASET DETAILS
383
+
384
+ The dataset at NAIP resolution contains 10.2 million pairs of satellite-ground image pairs. It contains 2.0 million unique satellite images and 7.9 million unique ground images. Note that while the overlap between satellite images is minimal they are not completely non-overlapping. As a result, the same ground image can be a part of two different satellite images in our training data. Fig. 7 (left) shows the distribution of ground images for each NAIP image in our dataset. The distribution of the number of ground images per satellite image is a decreasing function. The number of satellite images with 25 images is much higher than the rest because we subsample 25 images whenever a satellite image contains more than 25 ground images.
385
+
386
+ NAIP Preprocessing: We download the RGB bands of NAIP images. Since NAIP imagery is already stored in a normalized fashion we do not need to take anymore additional steps.
387
+
388
+ The dataset at Sentinel-2 resolution contains 8.7 million pairs of satellite-ground image pairs. It contains 1.9 million unique satellite images and 7.6 million unique ground images. Fig. 7 (right) shows the distribution of ground images for each Sentinel-2 image which follows the same trend as NAIP dataset. Fig. 8 shows example of paired data from our NAIP and Sentinel-2 dataset.
389
+
390
+ Sentinel-2 Preprocessing: We download the B4, B3, B2 (corresponding to RGB) bands of Sentinel-2 images. Note that the data from Sentinel-2 is not coming from an RGB camera sensor. The values in B4, B3, and B2 capture the reflectance for a specific wavelength close to Red, Green, and Blue. We downscale these intensities by 3000 in order to get images that approximate RGB camera sensors (see Fig. 8 (bottom)). This is a standard practice followed by other works as well(Mall et al., 2023; Manas et al., 2021).
391
+
392
+ # A.1 SPATIAL AND TEMPORAL ALIGNMENT
393
+
394
+ Temporal alignment: The temporal revisit for Sentinel-2 is about a week. For every Flickr image, we collect the temporally closest cloudless satellite image (see Sec. 3.2). The Flickr images in our dataset go back to 2014 while the earliest sentinel images we can get are from 2017. For the first three years of Flickr data, we sample the closest seasonally aligned images. On average the temporal gap between a Flickr image and a Sentinel image is around 21 days. So while it is difficult to connect ground images with satellite images of the same day, we can still align seasonality.
395
+
396
+ ![](images/dc479846666672bf6155e3b976280063c74c2c3714792879b9c34276c990ff98.jpg)
397
+
398
+ ![](images/0f238337be41d22073a9a18c8701341bd799381d8130aac6423efc638f5e0a5c.jpg)
399
+ NAIP Paired Dataset
400
+
401
+ ![](images/3eeb04b62eebcfe27cfdb68fbe05ab3e407c06e44f1d3c1b2cc3c1445212ea98.jpg)
402
+
403
+ ![](images/6342f85e08dac5cb4d8ee1c4492d3f0041dae77e74e4ccca767d353afbd62c9b.jpg)
404
+
405
+ ![](images/c8d1b79d7e76981f8d3b8ebc12e7e37f4e388af315da469e9fe73f24c583e37f.jpg)
406
+
407
+ ![](images/911146795405494546000d6902a335e0cbef518e8e162eedd0c937f830f67910.jpg)
408
+
409
+ ![](images/0881baa7be222d69915215bd7064518a0e7965ec4358c8a60334980a56b8dbbc.jpg)
410
+
411
+ ![](images/7ffc97b7e4ef45c278e93efcdf2f48f6244242327050fde46c992ef416df2b64.jpg)
412
+
413
+ ![](images/8b77da8901d8d62f1f063c26a63b82a3b5f29d805c667564075ef67453456e9c.jpg)
414
+
415
+ ![](images/280069421cbc2d882654ec64ac62018fd82c62402cb3da8bf466adb801cc84eb.jpg)
416
+ Sentinel-2 Paired Dataset
417
+
418
+ ![](images/8ef6bdc52ea4dc5a79d044203f362f41c75d4e93668a7d6c91ca2b3fd3d78d4b.jpg)
419
+
420
+ ![](images/3aec8230f3d0c3814c315f963b94d57a66e2f5829d2f5bb2af5baa9464b7b8b0.jpg)
421
+
422
+ ![](images/a8dd5cc569b0592ff26200a0d1d9d83a974307f8ac9be9f55b8306f0c621da29.jpg)
423
+ Figure 8: Examples of pairs from our NAIP and Sentinel-2 dataset. Each satellite image can contains multiple ground images. The ground images are shown at their corresponding location within the satellite images. NAIP (top) and Sentinel-2 (bottom).
424
+
425
+ ![](images/c5223281064b81afdac260d8f120c9e09bd8ae247c1258b169ec3bc8c558f26d.jpg)
426
+
427
+ ![](images/632fc664fc5815a504d57d04ce1bc26adad89cbf56b7e3eeb0533061870acd62.jpg)
428
+
429
+ ![](images/0de54609c16fb52ffb0afc4691705271d3b4a07ae555b1bc8ad68d6dc94b21b6.jpg)
430
+
431
+ Spatial alignment: As stated in Sec. 3.2, the Flickr API also provides accuracy in the geotags along with the geotags. We only use the images with the highest level of geotag accuracy (street level). However, it is not unreasonable to think that some of these geotags can still be incorrect. There are two reasons why we believe our model is robust to such noise. First, prior work on image-text contrastive learning such as OpenCLIP (Cherti et al., 2023) has shown that the training loss and architectures for such vision language models are robust even at a lower signal-to-noise ratio. Second, the patches we contrast image features with are big enough (14m for NAIP and 140m for Sentinel-2) that our model is invariant to a small amount of noise in geotagging.
432
+
433
+ # B PROMPTING
434
+
435
+ Like CLIP, we test our models using template prompts such as a photo of a {label}. For classification metrics, with labels $l_{j} \in \mathbf{L}$ , an image $x$ can be classified as label $l_{j^{*}}$ ,
436
+
437
+ $$
438
+ j ^ {*} = \underset {j} {\arg \max } f _ {S} ^ {I} (x). f _ {T} (\text {a p h o t o o f a} \{l _ {j} \}) \tag {4}
439
+ $$
440
+
441
+ In practice, we use multiple prompts and use the average text representation from those. For GRAFT we use the following prompts: A photo of a {label}, A photo taken from inside a {label}, I took a photo from a {label}. For baselines, we use the prompts prescribed in CLIP: A centered satellite photo of {label}, A centered satellite photo of a {label}, A centered satellite photo of the {label}.
442
+
443
+ Note that since our model is trained with internet images as an intermediary, it performs better with prompts describing internet imagery such as: a photo of a {label}. Whereas CLIP performs better with prompts describing satellite images such as a satellite image of a {label}.
444
+
445
+ # C ADDITIONAL IMPLEMENTATION DETAILS
446
+
447
+ # C.1 TRAINING DETAILS
448
+
449
+ Regardless of the training datasets (NAIP or Sentinel-2), we train all models for 10 epochs using AdamW with weight decay set to 1e-2. For image-level model, we linearly ramp up the learning rate from 0 to 1e-5 and then decrease the learning rate using a cosine schedule. For pixel-level model, we linearly ramp up the learning rate from 0 to 5e-5 and then decrease the learning rate to zero using a cosine schedule. All models are initialized using CLIP's weights and the temperature hyperparameter is set to $\tau = 0.07$ .
450
+
451
+ # C.2 INTERNAL VALIDATION DATASET
452
+
453
+ For the development of the image-level models, we collected an internal validation set using OpenStreetMap (OSM contributors, 2023). This validation set contains 14 categories with a total of 2632 single-label images. We measured the performance of our image-level models on this dataset using mean average precision. For developing pixel-level model, we use a subset of NAIP-OSM we collected (see Appendix C.3). This subset contains 32 categories with $17\mathrm{k}$ images. We select the best performing pixel-level models based on the zero-shot accuracy of patch prediction.
454
+
455
+ # C.3 IMAGE-LEVEL UNDERSTANDING EVALUATION DETAILS.
456
+
457
+ We measured our image-level model on 5 different datasets. The low-resolution Sentinel-2 model is evaluated on EuroSat and BigEarthNet Datasets.
458
+
459
+ Eurosat: We use the validation set of EuroSAT as our test set (the real test set is not public). It contains $540064 \times 64$ images from Sentinel-2 imagery from Europe. Each image is labeled with a single label out of 10 classes.
460
+
461
+ Table 5: List of 33 categories in the proposed NAIP-OSM dataset.
462
+
463
+ <table><tr><td>airport</td><td>football field</td><td>baseball field</td><td>beach</td><td>bridge</td></tr><tr><td>cemetery</td><td>commercial area</td><td>dam</td><td>equestrian facility</td><td>farmland</td></tr><tr><td>forest</td><td>garden</td><td>golf course</td><td>highway</td><td>marina</td></tr><tr><td>parking garage</td><td>park</td><td>parking lot</td><td>pond/lake</td><td>railroad</td></tr><tr><td>residential area</td><td>river</td><td>roundabout</td><td>sand area</td><td>school building</td></tr><tr><td>shooting range</td><td>soccer field</td><td>supermarket</td><td>swimming pool</td><td>tennis court</td></tr><tr><td>university building</td><td>warehouse</td><td>wetland</td><td></td><td></td></tr></table>
464
+
465
+ ![](images/d5c0ecdf293ef96b99586fde25c332af625097436001273d88647a2bdc7ab3e9.jpg)
466
+ Figure 9: Inferring for text-to-image retrieval (left) and zero-shot classification (right) tasks with GRAFT.
467
+
468
+ BigEarthNet (BEN): BigEarthNet (Sumbul et al., 2019) is a 19-class multilabel classification dataset. The test set contains $104k$ $120\times 120$ image from Sentinel-2.
469
+
470
+ The high-resolution NAIP model is evaluated on 3 datasets.
471
+
472
+ Sat-4 and Sat-6: The test set of the SAT-4 and SAT-6 datasets contains 64k and $81\mathrm{k}28\times 28$ images respectively. SAT-4 and SAT-6 are labeled with 4 and 6 categories respectively on NAIP images. The fourth category of SAT-4 dataset is 'None', which is not suitable for zero-shot evaluation, so we evaluate with the remaining three categories only.
473
+
474
+ NAIP-OSM: Finally, since there are not a lot of evaluation benchmarks on NAIP images. We leverage OpenStreetMap data to create a large-scale multi-label classification and retrieval dataset for NAIP. This dataset contains 33 category labels and 1.7 million $224 \times 224$ NAIP images. Tab. 5 shows the list of categories in this dataset.
475
+
476
+ Since for many of these benchmarks the images are smaller than the resolution our models and baselines support. We try a variety of image pre-processing and report the best number for each method. We try zero padding, reflection padding, and resizing transforms and report the best numbers for each method. CLIP and CLIP-RSICD work best with resizing to $224 \times 224$ images. For GRAFT ViT-B/16 we use zero-padding as it results in the best performance. For RemoteCLIP, CACo, and SeCo, we use the pre-processing proposed by them. For Satlas, reflection padding works the best. When evaluating GRAFT ViT-B/32 on EuroSat, we had to pad in images in a way that the $64 \times 64$ images align with the input patches of ViT-B/32.
477
+
478
+ Fig. 9 illustrates how we use our model for text-to-image retrieval and zero-shot classification on these 5 benchmarks.
479
+
480
+ For multiclass classification (EuroSAT), we report the top1 accuracy. For the multi-label classification task (BigEarthNet), we report mean average precision (area under precision-recall curve). For retrieval tasks, we report the standard metric used for evaluating ranking: mAP@100 and mAP@20.
481
+
482
+ # C.4 SEGMENTATION
483
+
484
+ Our segmentation results are evaluated on the newly proposed SatlasPretrain (Bastani et al., 2023) segmentation task. SatlasPretrain contains 2 test sets for NAIP and Sentinel-2 images. For NAIP, we use the test set along with the 2020 NAIP imagery. This results in a total of about $39\mathrm{k}512\times 512$ NAIP images. The segmentation labels consist of 11 landcover classes (3 of which never occur in the test set). We evaluate the per-class accuracy on the remaining 8 classes. While the NAIP images are of size $512\times 512$ , the landcover labels are at a lower resolution of $32\times 32$ . With a ViT-B/16 model, this allows us to evaluate patch prediction without having to upscale either using interpolation or other bottom-up segmentation models such as SAM. For evaluation, we divide the $512\times 512$ images into $4224\times 224$ and pass them through our models and baselines.
485
+
486
+ For Sentinel-2, we use the test set along with the sentinel-2-small imagery. This results in a total of about $2183512 \times 512$ Sentinel-2 images. Same as before we evaluate with 8 out of 11 classes. Similar to NAIP, for evaluation, we divide the $512 \times 512$ images into $4224 \times 224$ and pass them through our models and baselines.
487
+
488
+ However, for Sentinel-2, the landcover masks are also of size $512 \times 512$ . Therefore we evaluate GRAFT in two ways. Firstly, we evaluate the performance by upscaling the logits (bicubic interpolation) and using the maximum logit value as a prediction. This gives us the performance of the standalone GRAFT model. Alternatively, we also combine our model with SAM. In order to perform semantic segmentation, we use SAM's segment everything mode to get bottom-up segments. Then we assign each segment the class corresponding to the majority of the pixels in it. Our experiments in Sec. 4 suggest that using SAM in leads to a minor improvement in performance, suggesting the standalone GRAFT can also perform good segmentation.
489
+
490
+ # C.5 VQA
491
+
492
+ As stated in the main paper, we conducted VQA evaluation with 500 unique questions from the high-resolution RSVQA testset. Note that where there are 500 unique questions, the number of image-question-answer tuples is much larger since the same question can be asked on multiple images. In total, there are 2985 image-question-answer tuples in the evaluation set (presence: 576, Area: 1161, Comparison: 590, Count: 658).
493
+
494
+ # D ADDITIONAL RESULTS
495
+
496
+ Open Vocabulary Image Retrieval Fig. 10 shows more examples of open-world concepts and the understanding abilities of our model. Our method can understand and retrieve several interesting open-world concepts. For example, it can retrieve very niche concepts such as campgrounds or hedge mazes. GRAFT can also be used for tracking concepts related to sustainable development. For example, we can detect solar farms, water treatment facilities, and wind farms (Fig. 2). Such use cases would be very useful to scientists interested in analyzing a region and tracking, for example, renewable sources of energy.
497
+
498
+ Multi-spectral Satellite Images The main contribution of this work is to demonstrate that we can train large-scale vision language models for satellite images without direct text annotations, by using ground images as an intermediary. Therefore, we can also use this technique to train a model for multi-spectral satellite images. To show this, we train another VIT-B/16 model on 100k multi-spectral sentinel images-ground image pairs. To account for the change in input channels, we change the patch embedding input dimension from 3 to 12. The weights for the RGB channels are initialized to CLIP's weights, and the rest are set to zero. On the EuroSat multi-spectral test set, this model leads to a zero-shot classification accuracy of 53.78, which is an improvement of $1.26\%$ on the RGB model $(52.52\%)$ trained with the same set of images. This shows that our insight generalizes to multi-spectral datasets.
499
+
500
+ # E ABLATIONS
501
+
502
+ We provide additional ablations on GRAFT in this section.
503
+
504
+ ![](images/e0519ea01a3269e7be865a2d63614d42fdac040746c2d07cdfb7613b019b645e.jpg)
505
+ Figure 10: More examples of open-world text-to-image retrieval with GRAFT. Our model can understand various fine-grained concepts such as a water treatment facility or a hedge maze and less concrete concepts such as a university quad.
506
+
507
+ # E.1 ABLATIONS: ALT-TEXT ALIGNMENT
508
+
509
+ In Sec. 4.4 we show that ground-satellite image alignment results in better-performing models than aligning text to satellite images. We believe the main factor for this is that the ground images can provide much better semantic features to the satellite image encoder for alignment.
510
+
511
+ We use the captions and tags from Flickr data as the alt-text annotations. Often these captions include less meaningful information such as the filenames ("1819-Img.png") automatically uploaded from phones/c Cameras. Other times the captions are very specific and do not describe the scene in the image, e.g. "A photo from the island where grandma grew up". In both these cases, the captions do not correctly capture the right level of semantic information and therefore the images are more helpful.
512
+
513
+ The image-text pairs in other datasets such as LAION-5B Schuhmann et al. (2022) also contain such data. However, the methods trained on it can still learn something useful due to the sheer scale of the dataset (5 billion vs 10 million). We posit that, to learn directly from text we might need a dataset with a satellite image-text pair at this scale, which is harder to obtain and train with.
514
+
515
+ # E.2 ABLATIONS: CLIP INITIALIZATION
516
+
517
+ We initialize our model from CLIP because this helps in better learning and faster convergence. We also tried training a satellite encoder from scratch however this model performed significantly worse than CLIP and Our Best model. The EuroSat zero-shot classification performance for a model trained from scratch is $42.46\%$ vs CLIP $(53.59\%)$ and GRAFT $(63.76\%)$ . Since all the baselines we compare against are also initialized from CLIP and are not trained from scratch this comparison is fair.
518
+
519
+ # E.3 ABLATIONS: LOSS FORMULATIONS
520
+
521
+ In this section, we explore different loss formulations that could be used to create a satellite image representation that aligns with CLIP's representation of the ground images. By default, GRAFT uses Eq. (3) to enforce the intuition that the network should produce a representation of the satellite image that is close to its ground images. A few other losses could achieve similar properties:
522
+
523
+ $$
524
+ \mathcal {L} _ {2} ^ {I} (\mathcal {B}, f _ {S} ^ {I}) = \frac {1}{N _ {B}} \sum_ {i = 1} ^ {N _ {B}} - \log \frac {1}{N _ {i}} \sum_ {j = 1} ^ {N _ {i}} \frac {\exp \left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot f _ {G} \left(g _ {i} ^ {j}\right) / \tau\right)}{\sum_ {a = 1} ^ {N _ {B}} \sum_ {b = 1} ^ {N _ {i}} \exp \left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot f _ {G} \left(g _ {a} ^ {b}\right) / \tau\right)} \tag {5}
525
+ $$
526
+
527
+ $$
528
+ \mathcal {L} _ {3} ^ {I} (\mathcal {B}, f _ {S} ^ {I}) = \frac {1}{N _ {B}} \sum_ {i = 1} ^ {N _ {B}} - \log \frac {\exp \left(\left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot \left(\bar {z} _ {i} / \left\| \bar {z} _ {i} \right\|\right)\right) / \tau\right)}{\sum_ {a = 1} ^ {N _ {B}} \exp \left(f _ {S} ^ {I} \left(s _ {i}\right) \cdot \left(\bar {z} _ {a} / \left\| \bar {z} _ {a} \right\|\right) / \tau\right)}, \bar {z} _ {i} = \frac {1}{N _ {i}} \sum_ {j = 1} ^ {N _ {i}} f _ {G} \left(g _ {i} ^ {j}\right) \tag {6}
529
+ $$
530
+
531
+ $$
532
+ \mathcal {L} _ {4} ^ {I} (\mathcal {B}, f _ {S} ^ {I}) = \frac {1}{N _ {B}} \sum_ {i = 1} ^ {N _ {B}} \frac {1}{N _ {i}} \sum_ {j = 1} ^ {N _ {i}} | | f _ {S} ^ {I} (s _ {i}) - f _ {G} \left(g _ {i} ^ {j}\right) | | _ {2} ^ {2} \tag {7}
533
+ $$
534
+
535
+ We experiment with all these losses on the NAIP high-resolution dataset and report its performance on the internal validation set (Appendix C.2) in Tab. 6. Even though Khosla et al. (2020) have shown that $\mathcal{L}_2^I$ is suboptimal for their supervised setup, we find the performance to be on par with using the default formulation.
536
+
537
+ However, not all loss formulations are equal. Using the conventional contrastive loss with the average representations of all ground images as positive (Eq. (5)) yields a model that underperforms the GRAFT formulation. Discerning readers might also question whether it is necessary to enforce a satellite image's embedding to stay far from ground images associated with other satellite images. Performance using the 12 loss Eq. (7) suggests that not only it is important that a satellite image's embedding to stay close to all its associated ground images, it is also crucial that its embedding stays away from ground images associated to other satellite images.
538
+
539
+ # E.4 ADDITIONAL ABLATIONS: SCALING
540
+
541
+ GRAFT uses a large amount of satellite-ground image pairs to sidestep the need for textual annotations for training. To understand the behavior of GRAFT, we trained image-level VLMs using
542
+
543
+ Table 6: Performance of different image-level VLMs trained using different loss formulations to align the satellite image modality with the ground image modality. For the precise definition of the loss functions, please refer to Appendix E.3
544
+
545
+ <table><tr><td>Formulation</td><td>mAP</td></tr><tr><td>\( \mathcal{L}_2^I \)</td><td>74.76</td></tr><tr><td>\( \mathcal{L}_3^I \)</td><td>71.42</td></tr><tr><td>\( \mathcal{L}_4^I \)</td><td>66.80</td></tr><tr><td>Default \( \mathcal{L}^I \)</td><td>74.78</td></tr></table>
546
+
547
+ various amounts of satellite images and reported the performance in Fig. 11. We observe two different behaviors with images with different resolutions. For the model trained on NAIP images (left), the performance platues after $2 \times 10^{5}$ examples whereas the model trained on low-resolution sentinel-2 images (right) continues to scale with more data. We conjecture that the performance of NAIP models plateus because NAIP only covers the United States and a small amount of satellite images is enough to learn a good embedding.
548
+
549
+ ![](images/698b0934d233f39eacefae35b201ae173a5cd7ff3eecdd2028ab2acdcf65cc36.jpg)
550
+ Figure 11: Performance of the Image-level VLMs trained on various amounts of satellite images using GRAFT. Left: a ViT-B/16 VLM trained on high-resolution NAIP images and evaluated on our internal validation set. Right: a ViT-B/16 VLM trained on low-resolution sentinel-2 images and evaluated on EuroSAT classification. The performance for the high-resolution model plateaus after $2 \times 10^{5}$ examples whereas the low-resolution Sentinel-2 model continues to scale with more data.
551
+
552
+ ![](images/90e24b37825952b566f3cf36dfc396eec8446803944d9305bc6b88a514aaeff9.jpg)
553
+
554
+ # F FUTURE WORK
555
+
556
+ A limitation of GRAFT and other CLIP-like VLMs is that they do not possess text-generation capabilities such as BLIP-2 (Li et al., 2023). Exploring how to use ground images as an intermediary for text generation is an interesting avenue to explore in the future. However, as our results show, we can combine our model, with other frameworks-- for example with ViperGPT-- to solve tasks such as VQA. In the future, we can also combine GRAFT with other frameworks such as ClipCap (Mokady et al., 2021) to get more powerful VLMs with more capabilities such as captioning.
557
+
558
+ Another limitation that might arise since we do not fine-tune the text encoder, is that the text encoder might be biased towards concepts of ground images. For example, directional concepts such as "left of" or "top of" might not correspond meaningfully in the satellite images. Despite this aspect, our method performs better than other vision-language models (some of which are supervised with text). This shows that while there might be biases, our model is robust to them for most remote sensing recognition tasks. Nonetheless, it would be interesting for future work to look into this issue and create stronger models. For instance, one possible solution for this could be to fine-tune with a small amount of satellite image-caption data.
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:342491beed79e08933bff03defd32c0a9ceede78e6f698f23edd426db92d7357
3
+ size 1066726
2024/Remote Sensing Vision-Language Foundation Models without Annotations via Ground Remote Alignment/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Removing Biases from Molecular Representations via Information Maximization/f1893893-ca2b-4f44-86df-255efa54dd43_content_list.json ADDED
The diff for this file is too large to render. See raw diff