Chelsea707 commited on
Commit
4dc2cf0
·
verified ·
1 Parent(s): 56584c3

Add Batch 727531e9-328f-464a-acac-18708af37f0e data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +63 -0
  2. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_content_list.json +0 -0
  3. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_model.json +0 -0
  4. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_origin.pdf +3 -0
  5. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/full.md +618 -0
  6. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/images.zip +3 -0
  7. 2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/layout.json +0 -0
  8. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_content_list.json +0 -0
  9. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_model.json +0 -0
  10. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_origin.pdf +3 -0
  11. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/full.md +427 -0
  12. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/images.zip +3 -0
  13. 2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/layout.json +0 -0
  14. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_content_list.json +0 -0
  15. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_model.json +0 -0
  16. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_origin.pdf +3 -0
  17. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/full.md +385 -0
  18. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/images.zip +3 -0
  19. 2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/layout.json +0 -0
  20. 2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_content_list.json +0 -0
  21. 2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_model.json +0 -0
  22. 2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_origin.pdf +3 -0
  23. 2024/HarmonyDream_ Task Harmonization Inside World Models/full.md +787 -0
  24. 2024/HarmonyDream_ Task Harmonization Inside World Models/images.zip +3 -0
  25. 2024/HarmonyDream_ Task Harmonization Inside World Models/layout.json +0 -0
  26. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_content_list.json +0 -0
  27. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_model.json +0 -0
  28. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_origin.pdf +3 -0
  29. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/full.md +0 -0
  30. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/images.zip +3 -0
  31. 2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/layout.json +0 -0
  32. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_content_list.json +0 -0
  33. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_model.json +0 -0
  34. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_origin.pdf +3 -0
  35. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/full.md +504 -0
  36. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/images.zip +3 -0
  37. 2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/layout.json +0 -0
  38. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_content_list.json +0 -0
  39. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_model.json +0 -0
  40. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_origin.pdf +3 -0
  41. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/full.md +0 -0
  42. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/images.zip +3 -0
  43. 2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/layout.json +0 -0
  44. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_content_list.json +0 -0
  45. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_model.json +0 -0
  46. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_origin.pdf +3 -0
  47. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/full.md +692 -0
  48. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/images.zip +3 -0
  49. 2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/layout.json +0 -0
  50. 2024/Helpful or Harmful Data_ Fine-tuning-free Shapley Attribution for Explaining Language Model Predictions/b1ddfa18-ac96-4b0f-9928-8bc3d49a0c40_content_list.json +0 -0
.gitattributes CHANGED
@@ -4396,3 +4396,66 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
4396
  2024/Hard[[:space:]]Tasks[[:space:]]First_[[:space:]]Multi-Task[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]Through[[:space:]]Task[[:space:]]Scheduling/8959147f-5c07-4833-8d3d-05626bb8e852_origin.pdf filter=lfs diff=lfs merge=lfs -text
4397
  2024/HarmBench_[[:space:]]A[[:space:]]Standardized[[:space:]]Evaluation[[:space:]]Framework[[:space:]]for[[:space:]]Automated[[:space:]]Red[[:space:]]Teaming[[:space:]]and[[:space:]]Robust[[:space:]]Refusal/885036b4-b7f1-4dc9-9ae7-a2300c707e89_origin.pdf filter=lfs diff=lfs merge=lfs -text
4398
  2024/HarmoDT_[[:space:]]Harmony[[:space:]]Multi-Task[[:space:]]Decision[[:space:]]Transformer[[:space:]]for[[:space:]]Offline[[:space:]]Reinforcement[[:space:]]Learning/2fe54a30-e32c-4f80-94e9-3cca34b2d2ff_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4396
  2024/Hard[[:space:]]Tasks[[:space:]]First_[[:space:]]Multi-Task[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]Through[[:space:]]Task[[:space:]]Scheduling/8959147f-5c07-4833-8d3d-05626bb8e852_origin.pdf filter=lfs diff=lfs merge=lfs -text
4397
  2024/HarmBench_[[:space:]]A[[:space:]]Standardized[[:space:]]Evaluation[[:space:]]Framework[[:space:]]for[[:space:]]Automated[[:space:]]Red[[:space:]]Teaming[[:space:]]and[[:space:]]Robust[[:space:]]Refusal/885036b4-b7f1-4dc9-9ae7-a2300c707e89_origin.pdf filter=lfs diff=lfs merge=lfs -text
4398
  2024/HarmoDT_[[:space:]]Harmony[[:space:]]Multi-Task[[:space:]]Decision[[:space:]]Transformer[[:space:]]for[[:space:]]Offline[[:space:]]Reinforcement[[:space:]]Learning/2fe54a30-e32c-4f80-94e9-3cca34b2d2ff_origin.pdf filter=lfs diff=lfs merge=lfs -text
4399
+ 2024/Harmonic[[:space:]]Self-Conditioned[[:space:]]Flow[[:space:]]Matching[[:space:]]for[[:space:]]joint[[:space:]]Multi-Ligand[[:space:]]Docking[[:space:]]and[[:space:]]Binding[[:space:]]Site[[:space:]]Design/727be54d-2677-40c2-938d-abf04a0d2808_origin.pdf filter=lfs diff=lfs merge=lfs -text
4400
+ 2024/Harmonizing[[:space:]]Generalization[[:space:]]and[[:space:]]Personalization[[:space:]]in[[:space:]]Federated[[:space:]]Prompt[[:space:]]Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_origin.pdf filter=lfs diff=lfs merge=lfs -text
4401
+ 2024/Harmony[[:space:]]in[[:space:]]Diversity_[[:space:]]Merging[[:space:]]Neural[[:space:]]Networks[[:space:]]with[[:space:]]Canonical[[:space:]]Correlation[[:space:]]Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_origin.pdf filter=lfs diff=lfs merge=lfs -text
4402
+ 2024/HarmonyDream_[[:space:]]Task[[:space:]]Harmonization[[:space:]]Inside[[:space:]]World[[:space:]]Models/47ca1891-c736-4bc8-9421-02459b7f45e3_origin.pdf filter=lfs diff=lfs merge=lfs -text
4403
+ 2024/Harnessing[[:space:]]Hierarchical[[:space:]]Label[[:space:]]Distribution[[:space:]]Variations[[:space:]]in[[:space:]]Test[[:space:]]Agnostic[[:space:]]Long-tail[[:space:]]Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_origin.pdf filter=lfs diff=lfs merge=lfs -text
4404
+ 2024/Harnessing[[:space:]]Neural[[:space:]]Unit[[:space:]]Dynamics[[:space:]]for[[:space:]]Effective[[:space:]]and[[:space:]]Scalable[[:space:]]Class-Incremental[[:space:]]Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_origin.pdf filter=lfs diff=lfs merge=lfs -text
4405
+ 2024/Harnessing[[:space:]]the[[:space:]]Power[[:space:]]of[[:space:]]Neural[[:space:]]Operators[[:space:]]with[[:space:]]Automatically[[:space:]]Encoded[[:space:]]Conservation[[:space:]]Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_origin.pdf filter=lfs diff=lfs merge=lfs -text
4406
+ 2024/HelmFluid_[[:space:]]Learning[[:space:]]Helmholtz[[:space:]]Dynamics[[:space:]]for[[:space:]]Interpretable[[:space:]]Fluid[[:space:]]Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_origin.pdf filter=lfs diff=lfs merge=lfs -text
4407
+ 2024/Helpful[[:space:]]or[[:space:]]Harmful[[:space:]]Data_[[:space:]]Fine-tuning-free[[:space:]]Shapley[[:space:]]Attribution[[:space:]]for[[:space:]]Explaining[[:space:]]Language[[:space:]]Model[[:space:]]Predictions/b1ddfa18-ac96-4b0f-9928-8bc3d49a0c40_origin.pdf filter=lfs diff=lfs merge=lfs -text
4408
+ 2024/HexGen_[[:space:]]Generative[[:space:]]Inference[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]over[[:space:]]Heterogeneous[[:space:]]Environment/481613ed-a01e-40e0-941d-f65b0c09941a_origin.pdf filter=lfs diff=lfs merge=lfs -text
4409
+ 2024/Hidden[[:space:]]Traveling[[:space:]]Waves[[:space:]]bind[[:space:]]Working[[:space:]]Memory[[:space:]]Variables[[:space:]]in[[:space:]]Recurrent[[:space:]]Neural[[:space:]]Networks/bb3a0e6c-3e4d-4bbb-977b-75d65d4894a6_origin.pdf filter=lfs diff=lfs merge=lfs -text
4410
+ 2024/Hierarchical[[:space:]]Integral[[:space:]]Probability[[:space:]]Metrics_[[:space:]]A[[:space:]]distance[[:space:]]on[[:space:]]random[[:space:]]probability[[:space:]]measures[[:space:]]with[[:space:]]low[[:space:]]sample[[:space:]]complexity/46d3017a-0edb-4eaf-8db6-f57bc3159194_origin.pdf filter=lfs diff=lfs merge=lfs -text
4411
+ 2024/Hierarchical[[:space:]]Neural[[:space:]]Operator[[:space:]]Transformer[[:space:]]with[[:space:]]Learnable[[:space:]]Frequency-aware[[:space:]]Loss[[:space:]]Prior[[:space:]]for[[:space:]]Arbitrary-scale[[:space:]]Super-resolution/a33bdcb2-d43d-48fa-aa5e-e3dc5c559c7b_origin.pdf filter=lfs diff=lfs merge=lfs -text
4412
+ 2024/Hierarchical[[:space:]]Novelty[[:space:]]Detection[[:space:]]via[[:space:]]Fine-Grained[[:space:]]Evidence[[:space:]]Allocation/0b39ffe4-c620-47fb-ba61-dd237c6a835d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4413
+ 2024/Hierarchical[[:space:]]State[[:space:]]Space[[:space:]]Models[[:space:]]for[[:space:]]Continuous[[:space:]]Sequence-to-Sequence[[:space:]]Modeling/e1c05767-3033-490d-9d22-9250b717946e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4414
+ 2024/Hieros_[[:space:]]Hierarchical[[:space:]]Imagination[[:space:]]on[[:space:]]Structured[[:space:]]State[[:space:]]Space[[:space:]]Sequence[[:space:]]World[[:space:]]Models/f7167e7c-cf7b-440d-b815-bd0709f99e51_origin.pdf filter=lfs diff=lfs merge=lfs -text
4415
+ 2024/High-Dimensional[[:space:]]Bayesian[[:space:]]Optimization[[:space:]]via[[:space:]]Semi-Supervised[[:space:]]Learning[[:space:]]with[[:space:]]Optimized[[:space:]]Unlabeled[[:space:]]Data[[:space:]]Sampling/56d78341-e995-4e2f-9639-1a0d0c34dfa3_origin.pdf filter=lfs diff=lfs merge=lfs -text
4416
+ 2024/High-Dimensional[[:space:]]Kernel[[:space:]]Methods[[:space:]]under[[:space:]]Covariate[[:space:]]Shift_[[:space:]]Data-Dependent[[:space:]]Implicit[[:space:]]Regularization/bc81165f-43f8-4855-af48-055b8786a025_origin.pdf filter=lfs diff=lfs merge=lfs -text
4417
+ 2024/High-Order[[:space:]]Contrastive[[:space:]]Learning[[:space:]]with[[:space:]]Fine-grained[[:space:]]Comparative[[:space:]]Levels[[:space:]]for[[:space:]]Sparse[[:space:]]Ordinal[[:space:]]Tensor[[:space:]]Completion/5c542273-90a5-4226-9186-26fed9d85d90_origin.pdf filter=lfs diff=lfs merge=lfs -text
4418
+ 2024/High-Performance[[:space:]]Temporal[[:space:]]Reversible[[:space:]]Spiking[[:space:]]Neural[[:space:]]Networks[[:space:]]with[[:space:]]$_mathcalO(L)$[[:space:]]Training[[:space:]]Memory[[:space:]]and[[:space:]]$_mathcalO(1)$[[:space:]]Inference[[:space:]]Cost/a189b88d-53f2-4b7f-9373-1d0ebafc04f3_origin.pdf filter=lfs diff=lfs merge=lfs -text
4419
+ 2024/High-Probability[[:space:]]Bound[[:space:]]for[[:space:]]Non-Smooth[[:space:]]Non-Convex[[:space:]]Stochastic[[:space:]]Optimization[[:space:]]with[[:space:]]Heavy[[:space:]]Tails/ae9baa57-2bd8-4315-8a59-1f52105e3e28_origin.pdf filter=lfs diff=lfs merge=lfs -text
4420
+ 2024/High-Probability[[:space:]]Convergence[[:space:]]for[[:space:]]Composite[[:space:]]and[[:space:]]Distributed[[:space:]]Stochastic[[:space:]]Minimization[[:space:]]and[[:space:]]Variational[[:space:]]Inequalities[[:space:]]with[[:space:]]Heavy-Tailed[[:space:]]Noise/100bed5b-8f16-4123-b214-17e6d01d6d3c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4421
+ 2024/High-dimensional[[:space:]]Linear[[:space:]]Bandits[[:space:]]with[[:space:]]Knapsacks/15d7a274-21a6-4b2e-87c1-8156220d1db0_origin.pdf filter=lfs diff=lfs merge=lfs -text
4422
+ 2024/Highway[[:space:]]Value[[:space:]]Iteration[[:space:]]Networks/07da548f-f706-48d4-ae2c-2a09721bb45d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4423
+ 2024/Homomorphism[[:space:]]Counts[[:space:]]for[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks_[[:space:]]All[[:space:]]About[[:space:]]That[[:space:]]Basis/95726ebd-f3f8-4545-a0c4-481b176a72dc_origin.pdf filter=lfs diff=lfs merge=lfs -text
4424
+ 2024/How[[:space:]]Deep[[:space:]]Do[[:space:]]We[[:space:]]Need_[[:space:]]Accelerating[[:space:]]Training[[:space:]]and[[:space:]]Inference[[:space:]]of[[:space:]]Neural[[:space:]]ODEs[[:space:]]via[[:space:]]Control[[:space:]]Perspective/a3a5810a-5299-4675-a7c2-5335adc227fe_origin.pdf filter=lfs diff=lfs merge=lfs -text
4425
+ 2024/How[[:space:]]Deep[[:space:]]Networks[[:space:]]Learn[[:space:]]Sparse[[:space:]]and[[:space:]]Hierarchical[[:space:]]Data_[[:space:]]the[[:space:]]Sparse[[:space:]]Random[[:space:]]Hierarchy[[:space:]]Model/6625d38f-b451-499e-b6f1-e0a1d78b392f_origin.pdf filter=lfs diff=lfs merge=lfs -text
4426
+ 2024/How[[:space:]]Do[[:space:]]Nonlinear[[:space:]]Transformers[[:space:]]Learn[[:space:]]and[[:space:]]Generalize[[:space:]]in[[:space:]]In-Context[[:space:]]Learning_/e6f33e62-0e71-45a2-83b2-4e192f1b24dd_origin.pdf filter=lfs diff=lfs merge=lfs -text
4427
+ 2024/How[[:space:]]Does[[:space:]]Goal[[:space:]]Relabeling[[:space:]]Improve[[:space:]]Sample[[:space:]]Efficiency_/47886c7d-5a14-4f73-a2e9-c38de62e3093_origin.pdf filter=lfs diff=lfs merge=lfs -text
4428
+ 2024/How[[:space:]]Far[[:space:]]Can[[:space:]]Fairness[[:space:]]Constraints[[:space:]]Help[[:space:]]Recover[[:space:]]From[[:space:]]Biased[[:space:]]Data_/4d78ca1a-8c0e-42fc-a567-3338aba67f77_origin.pdf filter=lfs diff=lfs merge=lfs -text
4429
+ 2024/How[[:space:]]Flawed[[:space:]]Is[[:space:]]ECE_[[:space:]]An[[:space:]]Analysis[[:space:]]via[[:space:]]Logit[[:space:]]Smoothing/53b50ac9-fa0a-42de-bdab-50f87b6a45f3_origin.pdf filter=lfs diff=lfs merge=lfs -text
4430
+ 2024/How[[:space:]]Free[[:space:]]is[[:space:]]Parameter-Free[[:space:]]Stochastic[[:space:]]Optimization_/f184e57e-b020-4081-84f1-7c6a88f447f7_origin.pdf filter=lfs diff=lfs merge=lfs -text
4431
+ 2024/How[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks[[:space:]]Learn_[[:space:]]Lessons[[:space:]]from[[:space:]]Training[[:space:]]Dynamics/1c6b61bd-b30b-401a-9dba-e1d5a1b8af40_origin.pdf filter=lfs diff=lfs merge=lfs -text
4432
+ 2024/How[[:space:]]Interpretable[[:space:]]Are[[:space:]]Interpretable[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks_/8833ccba-3a74-49db-8542-41a6cf6ad495_origin.pdf filter=lfs diff=lfs merge=lfs -text
4433
+ 2024/How[[:space:]]Language[[:space:]]Model[[:space:]]Hallucinations[[:space:]]Can[[:space:]]Snowball/749baf11-a4b2-400b-a219-eb5710edc6f9_origin.pdf filter=lfs diff=lfs merge=lfs -text
4434
+ 2024/How[[:space:]]Learning[[:space:]]by[[:space:]]Reconstruction[[:space:]]Produces[[:space:]]Uninformative[[:space:]]Features[[:space:]]For[[:space:]]Perception/68a02c79-5b16-4511-be9e-6a332bdfea75_origin.pdf filter=lfs diff=lfs merge=lfs -text
4435
+ 2024/How[[:space:]]Private[[:space:]]are[[:space:]]DP-SGD[[:space:]]Implementations_/8c57d05e-1009-4657-bcc1-84d9c24ba5f1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4436
+ 2024/How[[:space:]]Smooth[[:space:]]Is[[:space:]]Attention_/d97eda7d-c0ab-4369-8294-51875ee232a6_origin.pdf filter=lfs diff=lfs merge=lfs -text
4437
+ 2024/How[[:space:]]Spurious[[:space:]]Features[[:space:]]are[[:space:]]Memorized_[[:space:]]Precise[[:space:]]Analysis[[:space:]]for[[:space:]]Random[[:space:]]and[[:space:]]NTK[[:space:]]Features/8e42e410-39a6-4a56-b445-b468550efbb5_origin.pdf filter=lfs diff=lfs merge=lfs -text
4438
+ 2024/How[[:space:]]Transformers[[:space:]]Learn[[:space:]]Causal[[:space:]]Structure[[:space:]]with[[:space:]]Gradient[[:space:]]Descent/0a9d2bcd-a31e-40ee-a97a-c16e8d308f4d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4439
+ 2024/How[[:space:]]Uniform[[:space:]]Random[[:space:]]Weights[[:space:]]Induce[[:space:]]Non-uniform[[:space:]]Bias_[[:space:]]Typical[[:space:]]Interpolating[[:space:]]Neural[[:space:]]Networks[[:space:]]Generalize[[:space:]]with[[:space:]]Narrow[[:space:]]Teachers/4a029bc1-13f1-4488-ab32-0c4a23727a7e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4440
+ 2024/How[[:space:]]Universal[[:space:]]Polynomial[[:space:]]Bases[[:space:]]Enhance[[:space:]]Spectral[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks_[[:space:]]Heterophily,[[:space:]]Over-smoothing,[[:space:]]and[[:space:]]Over-squashing/64f74698-bfb5-4fb9-8ebd-b3c97a44d1a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
4441
+ 2024/How[[:space:]]Well[[:space:]]Can[[:space:]]LLMs[[:space:]]Negotiate_[[:space:]]NegotiationArena[[:space:]]Platform[[:space:]]and[[:space:]]Analysis/59f00345-a464-42a5-9e36-3709a3e1e175_origin.pdf filter=lfs diff=lfs merge=lfs -text
4442
+ 2024/How[[:space:]]do[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Navigate[[:space:]]Conflicts[[:space:]]between[[:space:]]Honesty[[:space:]]and[[:space:]]Helpfulness_/869a85be-a0f7-4902-90e5-e2b7df921ed6_origin.pdf filter=lfs diff=lfs merge=lfs -text
4443
+ 2024/How[[:space:]]do[[:space:]]Transformers[[:space:]]Perform[[:space:]]In-Context[[:space:]]Autoregressive[[:space:]]Learning[[:space:]]_/40030b56-9a9d-4e1e-a95b-ca528aff33d1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4444
+ 2024/How[[:space:]]to[[:space:]]Escape[[:space:]]Sharp[[:space:]]Minima[[:space:]]with[[:space:]]Random[[:space:]]Perturbations/9236d1e0-2e36-4730-8b16-0dd2f6e286d2_origin.pdf filter=lfs diff=lfs merge=lfs -text
4445
+ 2024/How[[:space:]]to[[:space:]]Explore[[:space:]]with[[:space:]]Belief_[[:space:]]State[[:space:]]Entropy[[:space:]]Maximization[[:space:]]in[[:space:]]POMDPs/4eb2deba-7015-4838-94fc-77a2f5069bcb_origin.pdf filter=lfs diff=lfs merge=lfs -text
4446
+ 2024/How[[:space:]]to[[:space:]]Leverage[[:space:]]Diverse[[:space:]]Demonstrations[[:space:]]in[[:space:]]Offline[[:space:]]Imitation[[:space:]]Learning/587ad0c3-3040-40ba-b52a-7acb1463538d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4447
+ 2024/How[[:space:]]to[[:space:]]Make[[:space:]]the[[:space:]]Gradients[[:space:]]Small[[:space:]]Privately_[[:space:]]Improved[[:space:]]Rates[[:space:]]for[[:space:]]Differentially[[:space:]]Private[[:space:]]Non-Convex[[:space:]]Optimization/cc9d0b0b-3b1b-482a-bb70-96ce53bcb212_origin.pdf filter=lfs diff=lfs merge=lfs -text
4448
+ 2024/How[[:space:]]to[[:space:]]Trace[[:space:]]Latent[[:space:]]Generative[[:space:]]Model[[:space:]]Generated[[:space:]]Images[[:space:]]without[[:space:]]Artificial[[:space:]]Watermark_/169f06c8-466a-47fa-a9ee-5e7f28c7434a_origin.pdf filter=lfs diff=lfs merge=lfs -text
4449
+ 2024/Human[[:space:]]Alignment[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]through[[:space:]]Online[[:space:]]Preference[[:space:]]Optimisation/926272ae-dd06-4c5e-8798-09809cb2319b_origin.pdf filter=lfs diff=lfs merge=lfs -text
4450
+ 2024/Human[[:space:]]vs.[[:space:]]Generative[[:space:]]AI[[:space:]]in[[:space:]]Content[[:space:]]Creation[[:space:]]Competition_[[:space:]]Symbiosis[[:space:]]or[[:space:]]Conflict_/29e9ed32-750a-41f7-8a87-314ece8acccd_origin.pdf filter=lfs diff=lfs merge=lfs -text
4451
+ 2024/Human-like[[:space:]]Category[[:space:]]Learning[[:space:]]by[[:space:]]Injecting[[:space:]]Ecological[[:space:]]Priors[[:space:]]from[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]into[[:space:]]Neural[[:space:]]Networks/f2ec1a71-c75c-424c-a4bb-1eb9c6fd22a5_origin.pdf filter=lfs diff=lfs merge=lfs -text
4452
+ 2024/HumanTOMATO_[[:space:]]Text-aligned[[:space:]]Whole-body[[:space:]]Motion[[:space:]]Generation/4fe502fd-1436-46e9-a134-8e53fae4c873_origin.pdf filter=lfs diff=lfs merge=lfs -text
4453
+ 2024/Hybrid[[:space:]]Inverse[[:space:]]Reinforcement[[:space:]]Learning/1f1d1964-16e8-4fdc-92c3-4e29f0254235_origin.pdf filter=lfs diff=lfs merge=lfs -text
4454
+ 2024/Hybrid[[:space:]]Neural[[:space:]]Representations[[:space:]]for[[:space:]]Spherical[[:space:]]Data/10ef10af-671a-4604-aa1d-9bf77063c82b_origin.pdf filter=lfs diff=lfs merge=lfs -text
4455
+ 2024/Hybrid[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]from[[:space:]]Offline[[:space:]]Observation[[:space:]]Alone/58896cde-7cbd-4751-8558-65c198d50030_origin.pdf filter=lfs diff=lfs merge=lfs -text
4456
+ 2024/Hybrid$^2$[[:space:]]Neural[[:space:]]ODE[[:space:]]Causal[[:space:]]Modeling[[:space:]]and[[:space:]]an[[:space:]]Application[[:space:]]to[[:space:]]Glycemic[[:space:]]Response/a36b27a0-a987-4c79-bce1-be9ad10d0ce8_origin.pdf filter=lfs diff=lfs merge=lfs -text
4457
+ 2024/HyperFields_[[:space:]]Towards[[:space:]]Zero-Shot[[:space:]]Generation[[:space:]]of[[:space:]]NeRFs[[:space:]]from[[:space:]]Text/ed162244-617a-4d3f-b584-337c2aab2096_origin.pdf filter=lfs diff=lfs merge=lfs -text
4458
+ 2024/Hyperbolic[[:space:]]Active[[:space:]]Learning[[:space:]]for[[:space:]]Semantic[[:space:]]Segmentation[[:space:]]under[[:space:]]Domain[[:space:]]Shift/d0a4c2a8-8329-4945-88a4-9d688d01f5fb_origin.pdf filter=lfs diff=lfs merge=lfs -text
4459
+ 2024/Hyperbolic[[:space:]]Geometric[[:space:]]Latent[[:space:]]Diffusion[[:space:]]Model[[:space:]]for[[:space:]]Graph[[:space:]]Generation/7c34a5a6-6094-4bd4-9222-a9229573497e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4460
+ 2024/Hyperbolic[[:space:]]Optimizer[[:space:]]as[[:space:]]a[[:space:]]Dynamical[[:space:]]System/e7ae1ba1-4f20-4b25-926e-e404272d9c78_origin.pdf filter=lfs diff=lfs merge=lfs -text
4461
+ 2024/Hypergraph-enhanced[[:space:]]Dual[[:space:]]Semi-supervised[[:space:]]Graph[[:space:]]Classification/f38a6c4a-b706-41eb-99a7-f497fdc25671_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/727be54d-2677-40c2-938d-abf04a0d2808_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a40759cab7a7bad5e16263c0053c46510e13a1a60f8dbb04a66b8b1a31a28a81
3
+ size 5541844
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/full.md ADDED
@@ -0,0 +1,618 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design
2
+
3
+ Hannes Stark<sup>1</sup> Bowen Jing<sup>1</sup> Regina Barzilay<sup>1</sup> Tommi Jaakkola<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ A significant amount of protein function requires binding small molecules, including enzymatic catalysis. As such, designing binding pockets for small molecules has several impactful applications ranging from drug synthesis to energy storage. Towards this goal, we first develop HARMONICFLOW, an improved generative process over 3D protein-ligand binding structures based on our self-conditioned flow matching objective. FLOWSITE extends this flow model to jointly generate a protein pocket's discrete residue types and the molecule's binding 3D structure. We show that HARMONICFLOW improves upon state-of-the-art generative processes for docking in simplicity, generality, and average sample quality in pocket-level docking. Enabled by this structure modeling, FLOWSITE designs binding sites substantially better than baseline approaches.
8
+
9
+ ![](images/23df3b511b300ddd99663a3b4136f96834e5ac8d8a73bf81c1ce5ffaf0172bb7.jpg)
10
+ Figure 1. Binding site design. Given the backbone (green) and multi-ligand without structure, FLOWSITE generates residue types and structure (orange) to bind the multi-ligand and its jointly generated structure (blue). The majority of the pocket is omitted for visibility.
11
+
12
+ # 1. Introduction
13
+
14
+ Designing proteins that can bind small molecules has many applications, ranging from drug synthesis to energy storage or gene editing. Indeed, a key part of any protein's function derives from its ability to bind and interact with other molecular species. For example, we may design proteins that act as antidotes that sequester toxins or design enzymes that enable chemical reactions through catalysis, which plays a major role in most biological processes. We develop FLOWSITE to address this design challenge by building on recent advances in deep learning (DL) based protein design (Dauparas et al., 2022) and protein-molecule docking (Corso et al., 2023).
15
+
16
+ Specifically, we aim to design protein pockets to bind a certain small molecule (called ligand). We assume that
17
+
18
+ we are given a protein pocket via the 3D backbone atom locations of its residues as well as the 2D chemical graph of the ligand. We do not assume any knowledge of the 3D structure or the binding pose of the ligand. Based on this information, our goal is to predict the amino acid identities for the given backbone locations (see Figure 1). We also consider the more challenging task of designing pockets that simultaneously bind multiple molecules and ions (which we call multi-ligand). Such multi-ligand binding proteins are important, for example, in enzyme design, where the ligands correspond to reactants.
19
+
20
+ This task has not been addressed by deep learning yet. While deep learning has been successful in designing proteins that can bind to other proteins (Watson et al., 2023), designing (multi-)ligand binders is different and arguably harder in various aspects. For example, no evolutionary information is directly available, unlike when modeling interactions between amino acids only. The existing approaches, such as designing 6 drug binding proteins Polizzi & DeGrado (2020) or a single enzyme Yeh et al. (2023), build on expert knowledge and require manual steps. Therefore, we develop
21
+
22
+ FLOWSITE as a more general and automated approach and the first deep learning solution for designing pockets that bind small molecules.
23
+
24
+ FLOWSITE jointly generates discrete (residue identities) and continuous (ligand pose) variables. Our flow matching training criterion guides the model to learn a self-conditioned flow that jointly generates the contact residues and the (multi-)ligand 3D binding pose structures. To achieve this, we first develop HARMONICFLOW as a suitable generative process for 3D poses of (multi-)ligands. FLOWSITE extends this process to residue types. Starting from initial residue types and ligand atom locations sampled from a harmonic prior FLOWSITE updates them by iteratively following the learned vector field, as illustrated in Figure 2.
25
+
26
+ The HARMONICFLOW component of FLOWSITE performs the task known as docking, i.e., it realizes the 3D binding pose of the multi-ligand. As a method, it is remarkably simple in comparison to existing generative processes for docking, including the state-of-the-art product-space diffusion process of DIFFDOCK (Corso et al., 2023) that operates on ligand's center of mass, orientation, and torsion angles. HARMONICFLOW simply updates the cartesian coordinates of the atoms, yet manages to produce chemically plausible molecular structures without restricting ligand flexibility to torsions. Moreover, HARMONICFLOW outperforms product-space diffusion in average sample quality on multiple pocket-level docking tasks on PDBBind.
27
+
28
+ Having established HARMONICFLOW as an improved generative process over ligand positions, we extend it to include discrete residue types to obtain FLOWSITE. We also adopt an additional "fake-ligand" data augmentation step where side chains are treated as ligands in order to realize additional training cases. Altogether, FLOWSITE is able to recover $47.0\%$ of binding site amino acids compared to $39.4\%$ of a baseline approach. This nearly closes the gap to an oracle method $(51.4\%)$ recovery) with access to the ground truth 3D structure/pose of the ligand. Next to technical innovations (self-conditioned flow matching or equivariant refinement TFN layers) our main contributions are:
29
+
30
+ 1. FLOWSITE as the first deep learning solution to design binding sites for small molecules without prior knowledge of the molecule structure.
31
+ 2. The FLOWSITE framework as a simple approach to jointly generate discrete and continuous data.
32
+ 3. HARMONICFLOW which improves upon the state-of-the-art generative process for generating 3D ligand binding structures in average sample quality, simplicity, and applicability/generality.
33
+
34
+ # 2. Related Work
35
+
36
+ Deep learning for Docking. Designing binding sites with high affinity for a ligand requires reasoning about the binding free energy, which is deeply interlinked with modeling ligand binding 3D structures. This task of molecular docking has recently been tackled with deep-learning approaches (Stärk et al., 2022; Lu et al., 2022; Zhang et al., 2023a) including generative models (Corso et al., 2023; Qiao et al., 2023). These generative methods are based on diffusion models, building on DIFFDOCK (Corso et al., 2023), which combines diffusion processes over the ligand's torsion angles and position with respect to the protein. For the task of multi-ligand docking, no deep learning solutions exist yet, and we provide the first with HARMONICFLOW. We refer to Appendix D for additional important related work on this and the following topics.
37
+
38
+ Protein Design. A significant technical challenge for protein design is jointly modeling structure and sequence. Inverse folding approaches (Dauparas et al., 2022; Gao et al., 2023a; Yi et al., 2023; Hsu et al., 2022; Gao et al., 2023b) attempt this by designing new sequences given a protein structure. Existing ligand aware inverse folding methods such as Carbonara (Krapp et al., 2023) and LigandMPNN (Dauparas et al., 2023) are limited in their applicability for small molecule binding site design since they assume the bound ligand structure to be provided as input instead of solving the hard problem of docking jointly with designing the backbone residues as achieved by FLOWSITE.
39
+
40
+ The same limitation applies to the classical energy function and search algorithm based POCKETOPTIMIZER (Noske et al., 2023) and the sequence-structure co-design framework FAIR (Zhang et al., 2023b), which both require the bound complex as input. FAIR is further distinct from FLOWSITE in that it uses all residue types of a protein as input except for those in contact with the ligand, which simplifies recovering the amino acids of known binders to infilling missing residues based on sequence similarity.
41
+
42
+ Flow Matching. This recent generative modeling paradigm (Lipman et al., 2022; Albergo & Vanden-Eijnden, 2022; Albergo et al., 2023) generalizes diffusion models (Ho et al., 2020; Song et al., 2021) in a simpler framework. Flow matching admits more design flexibility and multiple works (Tong et al., 2023b; Pooladian et al., 2023) showed how it enables learning flows between arbitrary start and end distributions in a simulation-free manner. It is easily extended to data on manifolds (Chen & Lipman, 2023) and comes with straighter paths that enable faster integration.
43
+
44
+ Other applications of flow matching to biomolecular problems include generating Boltzmann distributions of small molecules Klein et al. (2023), protein structure generation (Yim et al., 2023a; Bose et al., 2023) and small molecule
45
+
46
+ ![](images/62b2c032c7fce3577c872eb0e7b6502aa15f266d54b1c783e34f9122050e0fba.jpg)
47
+ Figure 2. Overview of FlowSite. The generative process starts from a protein pocket's backbone atoms, initial residue types $\tilde{a}^0$ , and initial ligand positions $x_0$ . Our joint discrete-continuous self-conditioned flow updates them to $a_t$ , $x_t$ by following its vector field defined by the model outputs $\tilde{a}_1^t$ , $\tilde{x}_1^t$ . This integration is repeated until reaching time = 1 with the produced sample $a_1$ , $x_1$ .
48
+
49
+ generation (Song et al., 2023). We explain flow matching in Section 3.1.
50
+
51
+ # 3. Method
52
+
53
+ Our goal is to design binding pockets for a ligand where we assume the inputs to be the ligand's 2D chemical graph and the backbone coordinates of the pocket's residues. In this section, we lay out how FLOWSITE achieves this by first explaining our HARMONICFLOW generative process for docking in 3.1 before covering how FLOWSITE extends it to include discrete residue types in 3.2 and concluding with our model architecture in 3.3.
54
+
55
+ Overview and definitions. As visualized in Figure 2, FLOWSITE jointly updates discrete residue types and continuous ligand positions. The inputs are a protein pocket's backbone atoms $\pmb{y} \in \mathbb{R}^{L \times 4 \times 3}$ for $L$ residues with 4 atoms each and the chemical graph of a (multi-)ligand. Based on the ligand connectivity, its initial coordinates $\pmb{x} \in \mathbb{R}^{n \times 3}$ are sampled from a harmonic prior, and we initialize residue types $\pmb{a} \in \{1, \dots, 20\}^L$ with an initial token (we drop the chemical information of the ligands in our notation for brevity).
56
+
57
+ Given this at time $t = 0$ , the flow model $v_{\theta}$ with learned parameters $\theta$ iteratively updates residue types and ligand coordinates by integrating the ODE it defines. These integration steps are repeated from time $t = 0$ to time $t = 1$ to obtain the final generated binding pocket designs.
58
+
59
+ # 3.1. HarmonicFlow Structure Generation
60
+
61
+ We first lay out HARMONICFLOW for pure structure generation without residue type estimation. Our notation drops $v_{\theta}$ 's conditioning on the pocket $\mathbf{y}$ and residue estimates $\mathbf{a}$ in this subsection (see the Architecture Section 3.3 for how $\mathbf{y}$ is included). Simply put, HARMONICFLOW is flow
62
+
63
+ matching with a harmonic prior, self-conditioning, and $x_{1}$ prediction (our refinement TFN layers in Section 3.3 are also important for performance). In more detail:
64
+
65
+ Conditional Flow Matching. Given the data distribution $p_1$ of bound ligand structures and any easy-to-sample prior $p_0$ over $\mathbb{R}^{n \times 3}$ , we wish to learn an ODE that pushes the prior forward to the data distribution when integrating it from time 0 to time 1. The ODE will be defined by a time-dependent vector field $v_{\theta}(\cdot, \cdot): \mathbb{R}^{n \times 3} \times [0,1] \mapsto \mathbb{R}^{n \times 3}$ . Starting with a sample $x_0 \sim p_0(x_0)$ and following/integrating $v$ through time will produce a sample from the data distribution $p_1$ .
66
+
67
+ To see how to train $v_{\theta}$ , let us first assume access to a time-dependent vector field $u_{t}(\cdot)$ that would lead to an ODE that pushes from the prior $p_0$ to the data $p_1$ (it is not straightforward how to construct this $u_{t}$ ). This gives rise to a probability path $p_t$ by integrating $u_{t}$ until time $t$ . If we could sample $\pmb{x} \sim p_t(\pmb{x})$ we could train $v_{\theta}$ with the unconditional flow matching objective (Lipman et al., 2022)
68
+
69
+ $$
70
+ \mathcal {L} _ {F M} = \mathbb {E} _ {t \sim \mathcal {U} [ 0, 1 ], \boldsymbol {x} \sim p _ {t} (\boldsymbol {x})} \| v _ {\theta} (\boldsymbol {x}, t) - u (\boldsymbol {x}, t) \| ^ {2}. \tag {1}
71
+ $$
72
+
73
+ Among others, Tong et al. (2023b) show that to construct such a $u_{t}$ (that transports from prior $p_0$ to $p_1$ ), we can use samples from the data $\pmb{x}_1 \sim p_1(\pmb{x}_1)$ and prior $\pmb{x}_0 \sim p_0(\pmb{x}_0)$ and define $u_{t}$ via
74
+
75
+ $$
76
+ \begin{array}{l} u _ {t} (\boldsymbol {x}) = \mathbb {E} _ {\boldsymbol {x} _ {1} \sim p _ {1} \left(\boldsymbol {x} _ {1}\right), \boldsymbol {x} _ {0} \sim p _ {0} \left(\boldsymbol {x} _ {0}\right)} \\ \frac {u _ {t} \left(\boldsymbol {x} \mid \boldsymbol {x} _ {0} , \boldsymbol {x} _ {1}\right) p _ {t} \left(\boldsymbol {x} \mid \boldsymbol {x} _ {0} , \boldsymbol {x} _ {1}\right)}{p _ {t} (\boldsymbol {x})} \tag {2} \\ \end{array}
77
+ $$
78
+
79
+ where we can choose easy-to-sample conditional flows $p_t(\cdot|\cdot,\cdot)$ that give rise to simple conditional vector fields $u_t(\cdot|\cdot,\cdot)$ . We still cannot efficiently compute this $u_t(\pmb{x})$ and use it in $\mathcal{L}_{FM}$ because we do not know $p_t(\pmb{x})$ , but there is no
80
+
81
+ ![](images/ea94e57f3be2aa069ab853b794b3bd536e4eef297129a9110ce6281a38ac3a33.jpg)
82
+ Figure 3. Harmonic Prior. Initial positions for the same single multi-ligand from an isotropic Gaussian (left) and from a harmonic prior (right). (Bound structure for this multi-ligand is in Figure 1).
83
+
84
+ need to: it is equivalent to instead train with the following conditional flow matching loss since $\nabla_{\theta}\mathcal{L}_{FM} = \nabla_{\theta}\mathcal{L}_{CFM}$
85
+
86
+ $$
87
+ \begin{array}{l} \mathcal {L} _ {C F M} = \mathbb {E} _ {t \sim \mathcal {U} [ 0, 1 ], \boldsymbol {x} _ {1} \sim p _ {1} (\boldsymbol {x} _ {1}), \boldsymbol {x} _ {0} \sim p _ {0} (\boldsymbol {x} _ {0}), x \sim p _ {t} (\boldsymbol {x} | \boldsymbol {x} _ {0}, \boldsymbol {x} _ {1})} \\ \left\| v _ {\theta} (\boldsymbol {x}, t) - u _ {t} \left(\boldsymbol {x} \mid \boldsymbol {x} _ {0}, \boldsymbol {x} _ {1}\right) \right\| ^ {2}. \tag {3} \\ \end{array}
88
+ $$
89
+
90
+ Our simple choice of conditional probability path is $p_t(\pmb{x}|\pmb{x}_0,\pmb{x}_1) = \mathcal{N}(\pmb{x}|t\pmb{x}_1 + (1 - t)\pmb{x}_0,\sigma^2)$ , which gives rise to the conditional vector field $u_t(\pmb{x}|\pmb{x}_0,\pmb{x}_1) = \pmb{x}_1 - \pmb{x}_0$ . Notably, we find it helpful to parameterize $v_\theta$ to predict $\pmb{x}_1$ instead of $(\pmb{x}_1 - \pmb{x}_0)$ .
91
+
92
+ Training with the conditional flow matching loss then boils down to 1) Sample data $\pmb{x}_1 \sim p_1(\pmb{x}_1)$ and prior $\pmb{x}_0 \sim p_0(\pmb{x}_0)$ . 2) Interpolate between between the points. 3) Add noise to the interpolation to obtain $x$ . 4) Evaluate and minimize $\mathcal{L}_{CFM} = \| v_{\theta}(\pmb{x},t) - \pmb{x}_1\|^2$ with it. Inference is just as straightforward. We sample from the prior $\pmb{x}_0 \sim p_0(\pmb{x}_0)$ and integrate from $t = 0$ to $t = 1$ with an arbitrary ODE solver. We use an Euler solver, i.e., we iteratively predict $\pmb{x}_1$ as $\tilde{\pmb{x}}_1 = v_{\theta}(\pmb{x}_t,t)$ , and then calculate the step size scaled velocity estimate from it and add it to the current point $\pmb{x}_{t + \Delta t} = \pmb{x}_t + \Delta t(\tilde{\pmb{x}}_1 - \pmb{x}_0)$ . Training and inference algorithms are in Appendix A.3.
93
+
94
+ Harmonic Prior. Any prior can be used for $p_0$ in the flow matching framework. We choose a harmonic prior as in EigenFold (Jing et al., 2023) that samples atoms to be close to each other if they are connected by a bond. Potentially, this inductive bias is especially helpful when dealing with multiple molecules and ions since atoms of different molecules are already spatially separated at $t = 0$ as visualized in Figure 3.
95
+
96
+ This prior is constructed based on the ligand's covalent bonds that define a graph with adjacency matrix $\mathbf{A}$ from which we can construct the graph Laplacian $\mathbf{L} = \mathbf{D} - \mathbf{A}$ where $\mathbf{D}$ is the degree matrix. The harmonic prior is then
97
+
98
+ $p_0(\boldsymbol{x}_0) \propto \exp\left(-\frac{1}{2}\boldsymbol{x}_0^T\boldsymbol{L}\boldsymbol{x}_0\right)$ which can be sampled as a transformed gaussian.
99
+
100
+ Structure Self-conditioning. With this, we aim to bring AlphaFold2's (Jumper et al., 2021) successful recycling strategy to flow models for structure generation. Recycling enables training a deeper structure predictor without additional memory cost by performing multiple forward passes while only computing gradients for the last. For flow matching, we achieve the same by adapting the discrete diffusion model self-conditioning approach of Chen et al. (2023), similar to self-conditioning in protein structure generation diffusion models (Yim et al., 2023b; Watson et al., 2023).
101
+
102
+ Instead of defining the vector field $v_{\theta}(\boldsymbol{x}_t, t)$ as a function of $\boldsymbol{x}_t$ and $t$ alone, we additionally condition it on the prediction $\tilde{\boldsymbol{x}}_1^t$ of the previous integration step and use $v_{\theta}(\boldsymbol{x}_t, \tilde{\boldsymbol{x}}_1^t, t)$ . At the beginning of inference the self-conditioning input is a sample from the harmonic prior $\tilde{\boldsymbol{x}}_1^0 \sim p_0(\tilde{\boldsymbol{x}}_1^0)$ . In all following steps, it is the flow model's output (its prediction of $\boldsymbol{x}_1$ ) of the previous step $\tilde{\boldsymbol{x}}_1^t = v_{\theta}(\boldsymbol{x}_{t - \Delta t}, \tilde{\boldsymbol{x}}_1^{t - \Delta t}, t - \Delta t)$ . To train this, in a random 50% of the training steps, the self-conditioning input is a sample from the prior $\tilde{\boldsymbol{x}}_1^0$ . In the other 50%, we first generate a self-conditioning input $\tilde{\boldsymbol{x}}_1^{t + \Delta t} = v_{\theta}(\boldsymbol{x}_t, \tilde{\boldsymbol{x}}_1^0, t)$ , detach it from the gradient computation graph, and then use $v_{\theta}(\boldsymbol{x}_t, \tilde{\boldsymbol{x}}_1^{t + \Delta t}, t)$ for the loss computation. Algorithms 3 and 4 show these training and inference procedures.
103
+
104
+ # 3.2. FlowSite Binding Site Design
105
+
106
+ In the FLOWSITE binding site design framework, HARMONICFLOW $\tilde{\pmb{x}}_1^{t + \Delta t} = v_\theta (\pmb {x}_t,\tilde{\pmb{x}}_1^t,t)$ is augmented with an additional self-conditioned flow over the residue types to obtain $(\tilde{\pmb{x}}_1^{t + \Delta t},\tilde{\pmb{a}}_1^{t + \Delta t}) = v_\theta (\pmb {x}_t,\tilde{\pmb{x}}_1^t,\pmb {a}_t,\tilde{\pmb{a}}_1^t,t)$ . The flow no longer produces $\tilde{\pmb{x}}_1^{t + \Delta t}$ as an estimate of $\pmb{x}_{1}$ and then interpolates to $\pmb{x}_{t + \Delta t}$ but instead produces $(\tilde{\pmb{x}}_1^{t + \Delta t},\tilde{\pmb{a}}_1^{t + \Delta t})$ from which we obtain the interpolation $(\pmb {x}_{t + \Delta t},\pmb {a}_{t + \Delta t})$ and use it for the next integration step (see Figure 4). The start $a_0,\tilde{a}_1^0$ are initialized as a mask token while the structures $\pmb {x}_0,\tilde{\pmb{x}}_1^0$ are drawn from a harmonic prior.
107
+
108
+ This joint discrete-continuous data process is trained with the same self-conditioning strategy as in structure self-conditioning, but with the additional discrete self-conditioning input $\tilde{\pmb{a}}_1^1$ that is either a model output or a mask token. To the training loss we add the cross-entropy $\mathcal{L}_{type}$ between $\pmb{a}$ and $\tilde{\pmb{a}}_1^t$ . In practice, we find that the $\pmb{a}_1$ prediction $\tilde{\pmb{a}}_1^t$ already carries most information that is useful for predicting $a_1$ and we omit the interpolation $\pmb{a}_t$ as model input to obtain the simpler $(\tilde{\pmb{x}}_1^{t + \Delta t},\tilde{\pmb{a}}_1^{t + \Delta t}) = v_\theta (\pmb {x}_t,\tilde{\pmb{x}}_1^t,\tilde{\pmb{a}}_1^t,t)$ . This formulation admits a direct interpretation as recycling (Jumper et al., 2021) and a clean joint discrete-continuous process without defining a discrete data interpolation.
109
+
110
+ Fake Ligand Data Augmentation. This strategy is based
111
+
112
+ ![](images/d2099067079bac2acb4c4c7e1efece3e57556b2a6e29126073f87597e6c52ebd.jpg)
113
+ Figure 4. FlowSite self-conditioned updates. Residue type predictions $\tilde{\boldsymbol{a}}_1^t$ from invariant GAT layers and position predictions $\tilde{\boldsymbol{x}}_1^t$ from equivariant TFN layers are used as self-conditioning inputs and to interpolate to the updates $\boldsymbol{a}_t$ , $\boldsymbol{x}_t$ .
114
+
115
+ on the evidence of Polizzi & DeGrado (2020) that a protein's sidechain-sidechain interactions are similar to sidechain-ligand interactions for tight binding. In our optional data augmentation, we train with $20\%$ of the samples having a "fake ligand". Given a protein, we construct a fake ligand as the atoms of a randomly selected residue that has at least 4 other residues within $4\AA$ heavy atom distance. Additionally, we modify the protein by removing the residue that was chosen as the fake ligand and the residues that are within 7 positions next to that residue in the protein chain (Figure 5). This data augmentation was also employed in concurrent work (Dauparas et al., 2023; Corso et al., 2024).
116
+
117
+ # 3.3. Architecture
118
+
119
+ Here, we provide an overview of the FLOWSITE architecture (visualized in Appendix Figure 6) that outputs ligand positions $\tilde{x}_1$ and uses them for a residue type prediction $\tilde{a}_1$ . The structure prediction is produced by a stack of our SE(3)-equivariant refinement TFN layers that are crucial for the performance of HARMONICFLOW's structure generation. This is followed by invariant layers to predict the invariant residue types, which we found to perform better than the more expressive equivariant layers that seem well suited for structure prediction but not for recovering residue types. The precise architecture definition is in Appendix A.5 and an architecture visualization in Figure 6.
120
+
121
+ Radius Graph Representation. We represent the (multi-)ligand and the protein as graphs where nodes are connected based on their distances. Each protein residue and each ligand atom is a node. These are connected by protein-to-protein edges, ligand-to-ligand edges, and edges between ligand and protein. While only a single node is assigned to each residue, they contain information about all backbone atom positions (N, Ca, C, O).
122
+
123
+ Equivariant refinement TFN layers. Based on Tensor
124
+
125
+ Field Networks (TFN) (Geiger et al., 2020), these layers are a simple yet effective tweak from previous use cases of message passing TFNs (Jing et al., 2022; Corso et al., 2023), where we instead update and refine ligand coordinates with each layer akin to EGNNs (Hoogeboom et al., 2022). See Appendix A.5 for more details.
126
+
127
+ The $k$ -th refinement TFN layer takes as input the protein positions $\mathbf{y}$ , current ligand positions $\mathbf{x}_t$ , and features $\pmb{h}^{k-1}$ (with $\pmb{h}^0$ being zeros for the ligand and vectors between N, Ca, C, O for the protein). We construct equivariant messages for each edge via a tensor-product of neighboring nodes' invariant and equivariant features. The messages include the structure self-conditioning information by using the interatomic distances of the self-conditioning input $\pmb{x}_1^t$ to parameterize the tensor products. We sum the messages to obtain new node features $\pmb{h}^{k+1}$ and use them as input to an O(3) equivariant linear layer to predict intermediate refined ligand coordinates $\hat{\pmb{x}}_1^k$ . Before passing $\hat{\pmb{x}}_1^k$ to the next refinement TFN layer, we detach them from the gradient computation graph for the non-differentiable radius graph building of the next layer.
128
+
129
+ After a stack of $K$ TFN refinement layers, the positions $\hat{\pmb{x}}_1^K$ are used as final prediction $\tilde{\pmb{x}}_1^{t + \Delta t}$ . While $\tilde{\pmb{x}}_1^{t + \Delta t}$ is supervised with the conditional flow matching loss $\mathcal{L}_{CFM} = \|\tilde{\pmb{x}}_1^{t + \Delta t} - \pmb{x}_1\|^2$ the intermediate positions $\hat{\pmb{x}}_1^k$ contribute to an additional refinement loss $\mathcal{L}_{refine} = \sum_{k=1}^{K-1} \|\hat{\pmb{x}}_1^k - \pmb{x}_1\|^2$ .
130
+
131
+ Invariant Network. The inputs to this part of FLOWSITE are the TFN's ligand structure prediction $\tilde{x}_1$ , the protein structure $\pmb{y}$ , the invariant scalar features of the refinement TFN layers, and the self-conditioning input $a_1^t$ . From the protein structure, we construct on PiFold's (Gao et al., 2023a) distance-based invariant edge features and node features that encode the geometry of the backbone. For the edges between protein and ligand, we construct features that encode the distances from a ligand atom to all 4 backbone atoms of a connected residue.
132
+
133
+ These are processed by a stack of graph attention layers that update ligand and protein node features as well as edge features for each type of edge (ligand-to-ligand, protein-to-protein, and between the molecules). For each edge, the convolutional layers first predict attention weights from the edge features and the features of the nodes they connect. We then update a node's features by summing messages from each incoming edge weighted by the attention weights. Then, we update an edge's features based on its nodes' new features. A precise definition is in Appendix A.5. From the residue features after a stack of these convolutions, we predict new residue types $\boldsymbol{a}_{t + \Delta t}$ together with side chain torsion angles $\alpha$ . We use those in an auxiliary loss $\mathcal{L}_{torsion}$ defined as in AlphaFold2's Appendix 1.9.1 (Jumper et al., 2021). Thus, the complete loss for FLOWSITE is a weighted sum of $\mathcal{L}_{CFM}, \mathcal{L}_{refine}, \mathcal{L}_{type}$ , and $\mathcal{L}_{torsion}$ , while HAR-
134
+
135
+ MONICFLOW only uses $\mathcal{L}_{CFM}$ and $\mathcal{L}_{\text{refine}}$ .
136
+
137
+ # 4. Experiments
138
+
139
+ We evaluate FLOWSITE with multiple datasets, splits, and settings. Every reported number is averaged over 10 generated samples for each ligand. Precise experimental details are in Appendix E and code to reproduce each experiment is at https://github.com/HannesStark/ FlowSite. The main questions we seek to answer with the experiments are:
140
+
141
+ - 1. Structure Generation: How does HARMONICFLOW compare with SOTA binding structure generative models? Does it work for multi-ligands?
142
+ - 2. Binding Site recovery: What is the improvement in recovering residue types of known binding sites with FLOWSITE compared with baseline approaches?
143
+ - 3. Ablations and Flow Matching Investigations: How does flow matching behave for structure generation, and how much does each component help? (self-conditioning, ...)
144
+
145
+ # 4.1. Datasets
146
+
147
+ We use PDBBind version 2020 with 19k complexes to evaluate the structure generation capability of flow matching and the ability of FLOWSITE to design binders for a single connected ligand. We employ two dataset splits. The first is based on time, which has been heavily used in the DL community (Stärk et al., 2022; Corso et al., 2023). The second is sequence-based with a maximum of $30\%$ chain-wise similarity between train, validation, and test data. Buttenschoen et al. (2023) found DL docking methods to be significantly more challenged by sequence similarity splits.
148
+
149
+ For many binding pocket design tasks, it is required to bind multi-ligands. For example, when designing enzymes for multiple reactants. Such multi-ligands are present in Binding MOAD. We use its 41k complexes with a $30\%$ sequence similarity split carried out as described above. We construct our multi-ligands as all molecules and ions that have atoms within $4\AA$ of each other. An example of an enzyme with all substrates in the pocket as multi-ligand is in Figure 1.
150
+
151
+ # 4.2. Question 1: HarmonicFlow Structure Generation
152
+
153
+ Here, we consider the HARMONICFLOW component of FLOWSITE and investigate its binding structure generation capability. This is to find out whether HARMONICFLOW is fit for binder design where good structure generation is necessary to takethe bound ligand structure into account.
154
+
155
+ Task Setup. The architecture only contains refinement TFN layers, and there is no sequence prediction. The inputs are the (multi-)ligand's chemical graph and the protein pocket's backbone atoms and residue types (see Appendix Table 7 for experiments without residue type inputs). From this, the binding structure of the (multi-)ligand has to be inferred. There is also no fake ligand augmentation.
156
+
157
+ We test docking on the pocket level since that is the structure modeling capability required for the binding site design task (in Appendix C, we show preliminary results for docking to the whole protein). We define the binding pocket in two ways. In the Distance-Pocket definition, we calculate the distances of all ligand heavy atoms to the protein's alpha carbons, add Gaussian noise with $\sigma = 0.5$ to them, and include a residue in the pocket if it has any noisy distance smaller than $14\AA$ . The center of the pocket (where the prior $p_0$ is centered) is the center of mass of all residues within $8\AA$ of noisy ligand distance. We additionally add Gaussian noise with $\sigma = 0.2$ to the pocket center. The motivation for the noisy distance cutoffs and pocket center is to alleviate distribution shifts during inference time and to prevent the models from inferring the ligand positions from the cutoff with which the pocket was constructed.
158
+
159
+ In Radius-Pockets, we first obtain the center of mass of residues within $8\AA$ of any ligand heavy atom. The pocket includes all residues with a noisy distance to the center of mass that is less than a specific radius. This radius is $7\AA$ plus the minimum of $5\AA$ and half of the ligand's diameter. The pocket center is obtained in the same way as for Distance-Pockets.
160
+
161
+ Baseline. We compare with the state-of-the-art product-space diffusion process of DIFFDOCK (Corso et al., 2023) which has recently also been proven successful for pocket level docking (Plainer et al., 2023). Note that this is not the full DIFFDOCK docking pipeline: Both HARMONICFLOW and DIFFDOCK's diffusion can generate multiple samples and, for the task of docking, a further discriminator (called confidence model in DIFFDOCK) could be used to select the most likely poses. We only compare the 3D structure generative models and neither use language model residue embeddings. We train product-space diffusion with our pocket definitions using 5 of its default TFN layers followed by its pseudotorque and center-convolution (the TFN layers are identical to ours apart from our position updates). This uses their training parameters and the same 32 scalar and 8 vector features of our model. We use this deep learning method for comparison since (like HARMONICFLOW) it is able to dock to protein structures without an all-atom representation (unlike traditional docking methods, e.g., Autodock VINA (Trott & Olson, 2010)). This is required for the pocket design task where the sidechain atom locations are unknown.
162
+
163
+ Table 1. HARMONICFLOW vs. PRODUCT SPACE DIFFUSION. Comparison on PDBBind splits for docking into Distance-Pockets (residues close to ligand) and Radius-Pockets (residues within a radius of the pocket center). The columns $7\% < 2$ show the fraction of predictions with an RMSD to the ground truth that is less than $2\AA$ (higher is better). "Med." is the median RMSD (lower is better).
164
+
165
+ <table><tr><td rowspan="3">Method</td><td colspan="4">Sequence Similarity Split</td><td colspan="4">Time Split</td></tr><tr><td colspan="2">Distance-Pocket</td><td colspan="2">Radius-Pocket</td><td colspan="2">Distance-Pocket</td><td colspan="2">Radius-Pocket</td></tr><tr><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td></tr><tr><td>PRODUCT SPACE DIFFUSION</td><td>27.2</td><td>3.2</td><td>16.1</td><td>4.0</td><td>20.8</td><td>3.8</td><td>15.2</td><td>4.3</td></tr><tr><td>HARMONICFLOW</td><td>30.1</td><td>3.1</td><td>20.5</td><td>3.4</td><td>42.8</td><td>2.5</td><td>28.3</td><td>3.2</td></tr></table>
166
+
167
+ Table 2. Multi-Ligand Docking. Structure generation performance on Binding MOAD's multi-ligands. $\left. {\% < 2}\right\rbrack$ means the fraction of predictions with an RMSD to the ground truth less than ${2Å}$ (higher better). "Med." is the median RMSD (lower better).
168
+
169
+ <table><tr><td>Method</td><td>%&lt;2</td><td>%&lt;5</td><td>Med.</td></tr><tr><td>EIGENFOLD DIFFUSION</td><td>39.7</td><td>73.5</td><td>2.4</td></tr><tr><td>HARMONICFLOW</td><td>44.4</td><td>75.0</td><td>2.2</td></tr></table>
170
+
171
+ PDBBind docking results. In Table 1, we find that our flow matching based HARMONICFLOW outperforms product-space diffusion in average sample quality. The sampled conformations in Figure 12 show that HARMONICFLOW produces chemically plausible structures and well captures the physical constraints of interatomic interactions without the need to restrict conformational flexibility to torsion angles. No separate losses, rotation updates, or expensive torsion angle updates are required - HARMONICFLOW is arguably a cleaner and simpler solution. Thus, it is a promising future direction to further explore HARMONICFLOW for docking and other biomolecular structure generation tasks.
172
+
173
+ Binding MOAD multi-ligand docking results. For binding site design, it is often necessary to model multiple ligands and ions (e.g., reactants for an enzyme). We test this with Binding MOAD, which contains such multi-ligands. Since no deep learning solutions for multi-ligands exist yet and traditional docking methods would require side-chain atom locations, we compare with EIGENFOLD's (Jing et al., 2023) Diffusion and provide qualitative evaluation in Appendix Figure 12. For EIGENFOLD DIFFUSION, we use the same model as HARMONICFLOW and predict $x_0$ (in what corresponds to $x_0$ prediction in diffusion models), which we found to work better. Table 2 shows HARMONICFLOW as viable for docking multi-ligands - thus, the first ML method for this task with important applications besides binding site design.
174
+
175
+ # 4.3. Question 2: FlowSite Binding Site Recovery
176
+
177
+ Setup. The input to FLOWSITE is the binding pocket/site specified by its backbone and the chemical identity of the ligand (without its 3D structure). With the pocket, in practice, chosen by the user and well known, we use the Distance-
178
+
179
+ Pocket definition here.
180
+
181
+ Metrics. We use two metrics, sequence recovery and our BLOSUM score. Sequence recovery is the percentage of generated residue types of the contact residues (those with a heavy atom within $4\AA$ of the ligand) that are the same as in the original binding site. This metric only rewards exact matches, it cannot account for multiple correct solutions, and there is no notion of amino acid similarity encoded in it. Having lower penalties for mismatches of very similar amino acids would be more meaningful. To address this, we propose BLOSUM score, which takes evolutionary and physicochemical similarity into account. A precise definition is in Appendix A.1.
182
+
183
+ We note that metrics that correlate with binding affinity, such as MM-PBSA or docking scores of traditional docking software, usually require the atomic structure of the side chains as input, which is not available. Furthermore, they were only validated for discriminating different ligands, while in our design task, we desire to discriminate different binding sites.
184
+
185
+ Baselines. PIFOLD (no ligand) is the architecture of Gao et al. (2023a) and does not use any ligand information and PROTEINMPNN (no ligand) is the analog with the architecture of Dauparas et al., 2022). In PIFOLD (2D ligand), we first process the ligand with PNA (Corso et al., 2020) message passing and pass its features as additional input to the PIFOLD architecture. GROUND TRUTH POS and RANDOM LIGAND POS use the architecture of FLOWSITE without the ligand structure prediction layers. Instead, the ligand positions are either the ground truth bound structure or sampled from a standard Normal at the pocket's alpha carbon center of mass. Similarly, DIFFLOCK-POCKET POS uses fixed positions and the same architecture, but the positions are given by the pocket-level docking tool DiffDock-Pocket (Plainer et al., 2023) (we only have results for single ligands since it is not implemented for multi-ligands). The oracle GROUND TRUTH POS method also uses fake ligand data augmentation.
186
+
187
+ Pocket Recovery Results. Table 3 shows that FLOWSITE consistently is able to recover the original pocket better than simpler treatments of the (multi-)ligand, closing the gap
188
+
189
+ Table 3. Binding Site Recovery. Comparison on PDBBind and Binding MOAD sequence similarity splits for recovering residues of binding sites. Recovery is the percentage of correctly predicted residues, and BLOSUM score takes residue similarity into account. 2D ligand refers to a simple GNN encoding of the ligand's chemical graph as additional input. The GROUND TRUTH POS row has access to the, in practice, unknown ground truth 3D crystal structure of the ligand and protein.
190
+
191
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Binding MOAD</td><td colspan="2">PDBBind</td></tr><tr><td>BLOSUM score</td><td>Recovery</td><td>BLOSUM score</td><td>Recovery</td></tr><tr><td>PROTEINMPNN (no ligand)</td><td>-</td><td>-</td><td>40.3</td><td>36.3</td></tr><tr><td>PIFOLD (no ligand)</td><td>35.2</td><td>39.4</td><td>40.7</td><td>43.5</td></tr><tr><td>PIFOLD (2D ligand)</td><td>35.7</td><td>40.4</td><td>42.2</td><td>44.5</td></tr><tr><td>RANDOM LIGAND POS</td><td>38.2</td><td>41.8</td><td>41.5</td><td>43.7</td></tr><tr><td>DIFFDOCK-POCKET POS</td><td>-</td><td>-</td><td>42.6</td><td>45.0</td></tr><tr><td>FLOWSITE</td><td>44.3</td><td>47.0</td><td>47.6</td><td>49.5</td></tr><tr><td>GROUND TRUTH POS</td><td>48.4</td><td>51.4</td><td>51.3</td><td>51.2</td></tr></table>
192
+
193
+ Table 4. Flow matching investigation. Ablations of HARMONICFLOW. Column $\% < 2^{*}$ indicates performance when selecting the best of 5 generated samples.
194
+
195
+ <table><tr><td>Method</td><td>%&lt;2</td><td>%&lt;2*</td><td>Med.</td></tr><tr><td>GAUSSIAN PRIOR</td><td>17.0</td><td>29.2</td><td>3.8</td></tr><tr><td>VELOCITY PREDICTION</td><td>11.9</td><td>28.8</td><td>3.8</td></tr><tr><td>STANDARD TFN LAYERS</td><td>13.7</td><td>25.4</td><td>3.6</td></tr><tr><td>NO REFINEMENT LOSS</td><td>9.8</td><td>22.1</td><td>3.7</td></tr><tr><td>NO SELF-CONDITIONING</td><td>14.3</td><td>29.8</td><td>3.7</td></tr><tr><td>HARMONICFLOW σ = 0</td><td>18.3</td><td>31.3</td><td>3.5</td></tr><tr><td>HARMONICFLOW σ = 0.5</td><td>20.5</td><td>34.5</td><td>3.4</td></tr></table>
196
+
197
+ to the oracle method that has access to the ground truth ligand structure. The joint structure generation helps in determining the original residue types (keeping in mind that these are not necessarily the only or best). RANDOM LIGAND POS further confirms that inferring approximate ligand coordinates, like HARMONICFLOW in FLOWSITE, is crucial for recovering the binding pocket.
198
+
199
+ # 4.4. Question 3: Ablations and Flow Matching
200
+
201
+ Here, we attempt to understand better the behavior of flow-matching generative models for biomolecular structure generation via experiments with HARMONIC FLOW. We use Radius-Pockets on the sequence similarity split of PDBBind.
202
+
203
+ Investigations. GAUSSIAN PRIOR uses an isotropic Gaussian as prior instead of our harmonic prior. In VELOCITY PREDICTION, the TFN model predicts $(\pmb{x}_1 - \pmb{x}_0)$ instead of $\pmb{x}_1$ meaning that $\mathcal{L}_{CFM} = \| v_{\theta} - (\pmb{x}_1 - \pmb{x}_0)\|^2$ . In STANDARD TFN LAYERS, our refinement TFN layers are replaced, meaning that there are no intermediate position updates - only the last layer produces an update. In NO REFINEMENT LOSS, the loss $\mathcal{L}_{refine}$ is dropped from the final weighted sum of losses. NO SELF-CONDITIONING does not
204
+
205
+ use our structure self-conditioning. $\mathrm{SIGMA} = 0$ uses $\sigma = 0$ for the conditional flow, corresponding to a deterministic interpolant for training.
206
+
207
+ Results. Table 4 shows the importance of our self-conditioned flow matching objective, which enables refinement of the binding structure prediction $\tilde{\pmb{x}}_1^t$ next to updates of $\pmb{x}_t$ at little additional training time - a $12.8\%$ increase in this experiment. Furthermore, the refinement TFN layers improve structure prediction substantially. Lastly, parameterizing the vector field to predict $\pmb{x}_1$ instead of $(\pmb{x}_1 - \pmb{x}_0)$ appears more suitable for flow matching applications in molecular structure generation.
208
+
209
+ # 5. Conclusion
210
+
211
+ We proposed the HARMONICFLOW generative process for binding structure generation and FLOWSITE for binding site design. Our HARMONICFLOW improves upon the state-of-the-art generative process for docking in simplicity, applicability, and performance in various docking settings. We investigated how flow matching contributes to this, together with our technical innovations such as self-conditioned flow matching, harmonic prior ligands, or equivariant refinement TFN layers.
212
+
213
+ With FLOWSITE, we leverage our superior binding structure generative process and extend it to discrete residue types, resulting in a joint discrete-continuous process for designing ligand binding pockets—an important task for which no general and no deep learning solutions exist yet. FLOWSITE improves upon various baselines in recovering native binding sites without requiring prior knowledge of the bound protein-ligand complex. Thus, FLOWSITE is a useful step toward generally applicable binding site design, which has important applications in fields ranging from drug discovery to enzyme design.
214
+
215
+ # Acknowledgments
216
+
217
+ We thank Jason Yim, Gabriele Corso, Rachel Wu, Felix Faltings, Jeremy Wohlwend, MinGyu Choi, Juno Nam, Soojung Yang, Nick Polizzi, Jody Mou, Michael Plainer, Julia Balla, Shangyuan Tong, and Peter Holderrieth for insightful discussions and feedback.
218
+
219
+ This work was supported by the NSF Expeditions grant (award 1918839: Collaborative Research: Understanding the World Through Code), the Machine Learning for Pharmaceutical Discovery and Synthesis (MLPDS) consortium, the Abdul Latif Jameel Clinic for Machine Learning in Health, the DTRA Discovery of Medical Countermeasures Against New and Emerging (DOMANE) threats program, the DARPA Accelerated Molecular Discovery program, the NSF AI Institute CCF-2112665, the NSF Award 2134795, and the GIST-MIT Research Collaboration grant.
220
+
221
+ # Impact Statement
222
+
223
+ We develop a general framework for generating 3D point clouds in HARMONICFLOW and for jointly generating discrete and continuous data in FLOWSITE. As generative modeling frameworks, these are general methods with many possible societal impacts that do not require specific mention. We apply these methods to the tasks of docking and binding site design. In the past and present, the societal impacts of these applications have been overwhelmingly positive, with advances possible in drug discovery, enzyme design, or biological sensing. Future applications with negative outcomes can also be imagined, such as decreasing the barrier of entry for developing biological weapons.
224
+
225
+ # References
226
+
227
+ Albergo, M. S. and Vanden-Eijnden, E. Building normalizing flows with stochastic interpolants. In The Eleventh International Conference on Learning Representations, 2022.
228
+ Albergo, M. S., Boffi, N. M., and Vanden-Eijnden, E. Stochastic interpolants: A unifying framework for flows and diffusions. arXiv preprint arXiv:2303.08797, 2023.
229
+ Berman, H., Henrick, K., and Nakamura, H. Announcing the worldwide Protein Data Bank. Nat Struct Biol, 10 (12):980, Dec 2003.
230
+ Bortoli, V. D., Thornton, J., Heng, J., and Doucet, A. Diffusion schrödinger bridge with applications to score-based generative modeling, 2023.
231
+ Bose, A. J., Akhound-Sadegh, T., Fatras, K., Huguet, G., Rector-Brooks, J., Liu, C.-H., Nica, A. C., Korablyov, M., Bronstein, M., and Tong, A. Se(3)-stochastic flow matching for protein backbone generation, 2023.
232
+
233
+ Buttenschoen, M., Morris, G. M., and Deane, C. M. Posebusters: Ai-based docking methods fail to generate physically valid poses or generalise to novel sequences, 2023.
234
+ Campbell, A., Harvey, W., Weilbach, C., Bortoli, V. D., Rainforth, T., and Doucet, A. Trans-dimensional generative modeling via jump diffusion models, 2023.
235
+ Chen, R. T. and Lipman, Y. Riemannian flow matching on general geometries. arXiv preprint arXiv:2302.03660, 2023.
236
+ Chen, T., Liu, G.-H., and Theodorou, E. Likelihood training of schrödinger bridge using forward-backward SDEs theory. In International Conference on Learning Representations, 2022a. URL https://openreview.net/forum?id=nioAdKCeDXB.
237
+ Chen, T., Zhang, R., and Hinton, G. Analog bits: Generating discrete data using diffusion models with self-conditioning, 2023.
238
+ Chen, Y., Chen, Q., and Liu, H. Depact and pacmatch: A workflow of designing de novo protein pockets to bind small molecules. Journal of Chemical Information and Modeling, 62(4):971-985, Feb 2022b. ISSN 1549-9596. doi: 10.1021/acs.jcim.1c01398. URL https://doi.org/10.1021/acs.jcim.1c01398.
239
+ Corso, G., Cavalleri, L., Beaini, D., Lio, P., and Velickovic, P. Principal neighbourhood aggregation for graph nets. Advances in Neural Information Processing Systems, 33: 13260-13271, 2020.
240
+ Corso, G., Stärk, H., Jing, B., Barzilay, R., and Jaakkola, T. Diffdock: Diffusion steps, twists, and turns for molecular docking, 2023.
241
+ Corso, G., Deng, A., Fry, B., Polizzi, N., Barzilay, R., and Jaakkola, T. Deep confident steps to new pockets: Strategies for docking generalization, 2024.
242
+ Dauparas, J., Anishchenko, I., Bennett, N., Bai, H., Ragotte, R. J., Milles, L. F., Wicky, B. I. M., Courbet, A., de Haas, R. J., Bethel, N., Leung, P. J. Y., Huddy, T. F., Pellock, S., Tischer, D., Chan, F., Koepnick, B., Nguyen, H., Kang, A., Sankaran, B., Bera, A. K., King, N. P., and Baker, D. Robust deep learning-based protein sequence design using proteinmpnn. Science, 378(6615):49-56, 2022. doi: 10.1126/science.add2187.
243
+ Dauparas, J., Lee, G. R., Pecoraro, R., An, L., Anishchenko, I., Glasscock, C., and Baker, D. Atomic context-conditioned protein sequence design using ligandmpnn. bioRxiv, 2023.
244
+ Dou, J., Doyle, L., Greisen, Jr, P., Schena, A., Park, H., Johnsson, K., Stoddard, B. L., and Baker, D. Sampling
245
+
246
+ and energy evaluation challenges in ligand binding protein design. Protein Sci., 26(12):2426-2437, December 2017.
247
+ Gao, Z., Tan, C., Chacon, P., and Li, S. Z. Pifold: Toward effective and efficient protein inverse folding, 2023a.
248
+ Gao, Z., Tan, C., and Li, S. Z. Knowledge-design: Pushing the limit of protein design via knowledge refinement, 2023b.
249
+ Geiger, M., Smidt, T., M., A., Miller, B. K., Boomsma, W., Dice, B., Lapchevskyi, K., Weiler, M., Tyszkiewicz, M., Batzner, S., Uhrin, M., Frellsen, J., Jung, N., Sanborn, S., Rackers, J., and Bailey, M. Euclidean neural networks: e3nn, 2020.
250
+ Halgren, T. A., Murphy, R. B., Friesner, R. A., Beard, H. S., Frye, L. L., Pollard, W. T., and Banks, J. L. Glide: a new approach for rapid, accurate docking and scoring. 2. enrichment factors in database screening. Journal of medicinal chemistry, 2004.
251
+ Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
252
+ Hoogeboom, E., Satorras, V. G., Vignac, C., and Welling, M. Equivariant diffusion for molecule generation in 3d, 2022.
253
+ Hsu, C., Verkuil, R., Liu, J., Lin, Z., Hie, B., Sercu, T., Lerer, A., and Rives, A. Learning inverse folding from millions of predicted structures. bioRxiv, 2022. doi: 10.1101/2022.04.10.487779. URL https://www.biorxiv.org/content/ early/2022/09/06/2022.04.10.487779.
254
+ Jin, W., Wohlwend, J., Barzilay, R., and Jaakkola, T. Iterative refinement graph neural network for antibody sequence-structure co-design, 2022.
255
+ Jing, B., Corso, G., Chang, J., Barzilay, R., and Jaakkola, T. Torsional diffusion for molecular conformer generation. arXiv preprint arXiv:2206.01729, 2022.
256
+ Jing, B., Erives, E., Pao-Huang, P., Corso, G., Berger, B., and Jaakkola, T. S. Eigenfold: Generative protein structure prediction with diffusion models. In ICLR 2023-Machine Learning for Drug Discovery workshop, 2023.
257
+ Jumper, J., Evans, R., Pritzel, A., Green, T., Figurnov, M., Ronneberger, O., Tunyasuvunakool, K., Bates, R., Žídek, A., Potapenko, A., et al. Highly accurate protein structure prediction with alphafold. Nature, 596(7873):583-589, 2021.
258
+ Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
259
+
260
+ Klein, L., Kramer, A., and Noé, F. Equivariant flow matching, 2023.
261
+ Krapp, L. F., Meireles, F. A., Abriata, L. A., and Peraro, M. D. Context-aware geometric deep learning for protein sequence design. bioRxiv, 2023. doi: 10.1101/2023.06.19.545381. URL https://www.biorxiv.org/content/ early/2023/06/19/2023.06.19.545381.
262
+ Lin, H., Huang, Y., Liu, M., Li, X., Ji, S., and Li, S. Z. Diffbp: Generative diffusion of 3d molecules for target protein binding, 2022.
263
+ Lipman, Y., Chen, R. T., Ben-Hamu, H., Nickel, M., and Le, M. Flow matching for generative modeling. In The Eleventh International Conference on Learning Representations, 2022.
264
+ Liu, X., Gong, C., and Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow, 2022.
265
+ Liu, Z., Su, M., Han, L., Liu, J., Yang, Q., Li, Y., and Wang, R. Forging the basis for developing protein-ligand interaction scoring functions. Accounts of Chemical Research, 50(2):302-309, 2017.
266
+ Lu, W., Wu, Q., Zhang, J., Rao, J., Li, C., and Zheng, S. Tankbind: Trigonometry-aware neural networks for drug-protein binding structure prediction. Advances in neural information processing systems, 2022.
267
+ Malisi, C., Schumann, M., Toussaint, N. C., Kageyama, J., Kohlbacher, O., and Höcker, B. Binding pocket optimization by computational protein design. PLoS One, 7(12): e52505, December 2012.
268
+ Martinkus, K., Ludwiczak, J., Cho, K., Liang, W.-C., Lafrance-Vanasse, J., Hotzel, I., Rajpal, A., Wu, Y., Bonneau, R., Gligorijevic, V., and Loukas, A. Abdiffuser: Full-atom generation of in-vitro functioning antibodies, 2023.
269
+ McNutt, A. T., Francoeur, P., Aggarwal, R., Masuda, T., Meli, R., Ragoza, M., Sunseri, J., and Koes, D. R. Gnina 1.0: molecular docking with deep learning. Journal of cheminformatics, 13(1):1-20, 2021.
270
+ Méndez-Lucio, O., Ahmad, M., del Rio-Chanona, E. A., and Wegner, J. K. A geometric deep learning approach to predict binding conformations of bioactive molecules. Nature Machine Intelligence, 3(12):1033-1039, 2021.
271
+ Neklyudov, K., Brekelmans, R., Severo, D., and Makhzani, A. Action matching: Learning stochastic dynamics from samples, 2023.
272
+
273
+ Nelson, D. L. and Cox, M. M. Lehninger Principles of Biochemistry, Fourth Edition. Cold Spring Harbor Laboratory, fourth edition edition, 2004.
274
+ Noske, J., Kynast, J. P., Lemm, D., Schmidt, S., and Höcker, B. PocketOptimizer 2.0: A modular framework for computer-aided ligand-binding design. *Protein Sci.*, 32 (1):e4516, January 2023.
275
+ Plainer, M., Toth, M., Dobers, S., Stark, H., Corso, G., Marquet, C., and Barzilay, R. Diffdock-pocket: Diffusion for pocket-level docking with sidechain flexibility. In NeurIPS 2023 Workshop on New Frontiers of AI for Drug Discovery and Development, 2023.
276
+ Polizzi, N. F. and DeGrado, W. F. A defined structural unit enables de novo design of small-molecule-binding proteins. Science, 369(6508): 1227-1233, 2020. doi: 10.1126/science.abb8330. URL https://www.science.org/doi/abs/10. 1126/science.abb8330.
277
+ Pooladian, A.-A., Ben-Hamu, H., Domingo-Enrich, C., Amos, B., Lipman, Y., and Chen, R. T. Q. Multisample flow matching: Straightening flows with minibatch couplings, 2023.
278
+ Qiao, Z., Nie, W., Vahdat, A., au2, T. F. M. I., and Anandkumar, A. State-specific protein-ligand complex structure prediction with a multi-scale deep generative model, 2023.
279
+ Schneuing, A., Du, Y., Harris, C., Jamasb, A., Igashov, I., Du, W., Blundell, T., Lio, P., Gomes, C., Welling, M., Bronstein, M., and Correia, B. Structure-based drug design with equivariant diffusion models, 2023.
280
+ Shi, Y., Bortoli, V. D., Campbell, A., and Doucet, A. Diffusion schrödinger bridge matching, 2023.
281
+ Somnath, V. R., Pariset, M., Hsieh, Y.-P., Martinez, M. R., Krause, A., and Bunne, C. Aligned diffusion schrödinger bridges, 2023.
282
+ Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
283
+ Song, Y., Gong, J., Xu, M., Cao, Z., Lan, Y., Ermon, S., Zhou, H., and Ma, W.-Y. Equivariant flow matching with hybrid probability transport for 3d molecule generation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=hHUZ5V9XFu.
284
+ Stiel, A. C., Nellen, M., and Höcker, B. PocketOptimizer and the design of ligand binding sites. Methods Mol. Biol., 1414:63-75, 2016.
285
+
286
+ Stärk, H., Ganea, O.-E., Pattanaik, L., Barzilay, R., and Jaakkola, T. Equibind: Geometric deep learning for drug binding structure prediction, 2022.
287
+ Thomas, N., Smidt, T., Kearnes, S., Yang, L., Li, L., Kohlhoff, K., and Riley, P. Tensor field networks: Rotation-and translation-equivariant neural networks for 3d point clouds. arXiv preprint, 2018.
288
+ Thomsen, R. and Christensen, M. H. Moldock: a new technique for high-accuracy molecular docking. Journal of medicinal chemistry, 49(11):3315-3321, 2006.
289
+ Tong, A., Malkin, N., Fatras, K., Atanackovic, L., Zhang, Y., Huguet, G., Wolf, G., and Bengio, Y. Simulation-free schrödinger bridges via score and flow matching, 2023a.
290
+ Tong, A., Malkin, N., Huguet, G., Zhang, Y., Rector-Brooks, J., Fatras, K., Wolf, G., and Bengio, Y. Improving and generalizing flow-based generative models with minibatch optimal transport, 2023b.
291
+ Trott, O. and Olson, A. J. Autodock vina: improving the speed and accuracy of docking with a new scoring function, efficient optimization, and multithreading. Journal of computational chemistry, 31(2):455-461, 2010.
292
+ Verma, Y., Heinonen, M., and Garg, V. Abode: Ab initio antibody design using conjoined odes, 2023.
293
+ Vignac, C., Krawczuk, I., Siraudin, A., Wang, B., Cevher, V., and Frossard, P. Digress: Discrete denoising diffusion for graph generation, 2023a.
294
+ Vignac, C., Osman, N., Toni, L., and Frossard, P. Midi: Mixed graph and 3d denoising diffusion for molecule generation, 2023b.
295
+ Watson, J. L., Juergens, D., Bennett, N. R., Trippe, B. L., Yim, J., Eisenach, H. E., Ahern, W., Borst, A. J., Ragotte, R. J., Milles, L. F., Wicky, B. I. M., Hanikel, N., Pellock, S. J., Courbet, A., Sheffler, W., Wang, J., Venkatesh, P., Sappington, I., Torres, S. V., Lauko, A., De Bortoli, V., Mathieu, E., Ovchinnikov, S., Barzilay, R., Jaakkola, T. S., DiMaio, F., Baek, M., and Baker, D. De novo design of protein structure and function with rfdiffusion. Nature, 620(7976):1089-1100, Aug 2023.
296
+ Yeh, A. H.-W., Norn, C., Kipnis, Y., Tischer, D., Pellock, S. J., Evans, D., Ma, P., Lee, G. R., Zhang, J. Z., Anishchenko, I., Coventry, B., Cao, L., Dauparas, J., Halabiya, S., DeWitt, M., Carter, L., Houk, K. N., and Baker, D. De novo design of luciferases using deep learning. Nature, 614(7949):774-780, Feb 2023. ISSN 1476-4687. doi: 10.1038/s41586-023-05696-3. URL https://doi.org/10.1038/s41586-023-05696-3.
297
+
298
+ Yi, K., Zhou, B., Shen, Y., Lio, P., and Wang, Y. G. Graph denoising diffusion for inverse protein folding, 2023.
299
+ Yim, J., Campbell, A., Foong, A. Y., Gastegger, M., Jimenez-Luna, J., Lewis, S., Satorras, V. G., Veeling, B. S., Barzilay, R., Jaakkola, T., et al. Fast protein backbone generation with se (3) flow matching. arXiv preprint arXiv:2310.05297, 2023a.
300
+ Yim, J., Trippe, B. L., De Bortoli, V., Mathieu, E., Doucet, A., Barzilay, R., and Jaakkola, T. Se(3) diffusion model with application to protein backbone generation. arXiv preprint, 2023b.
301
+ Zhang, Y., Cai, H., Shi, C., Zhong, B., and Tang, J. E3bind: An end-to-end equivariant network for protein-ligand docking, 2023a.
302
+ Zhang, Z., Lu, Z., Hao, Z., Zitnik, M., and Liu, Q. Full-atom protein pocket design via iterative refinement, 2023b.
303
+
304
+ ![](images/3e2df72f187fde7241f23db81ae87b87da4e070a9242fe35fc361a5a1749bf23.jpg)
305
+ Selected residue: A41
306
+
307
+ ![](images/83df97e66e0c67ff1cade96a662535588db1726fd4435b497ba3d1cb873fba9b.jpg)
308
+ Remove A34-40, A42-48 from the structure
309
+ Figure 5. Visualization of Fake Ligand creation. Depicted is a fake ligand created for the Ubiquitin protein. Out of all residues that have at least 4 contacts with other residues (apart from those that are within 7 locations in the chain) a residue is randomly selected as the fake ligand. Then we remove the residue itself from the protein and all residues that are within 7 locations in the chain.
310
+
311
+ ![](images/59b7b7f206ef291733934bb95563a8bdb941130b0f5108eba24b5281294ef726.jpg)
312
+ Use {C, CA, sidechain atoms} of A41 as a fake ligand
313
+
314
+ # A. Method Details and Explanations
315
+
316
+ # A.1. BLOSUM Score
317
+
318
+ Next to sequence recovery, we also evaluate with our BLOSUM Score in an attempt to penalize amino acid predictions less if the predicted residue type is similar yet different from the original residue. With $\mathbf{A} \in \mathbb{R}^{20 \times 20}$ being the BLOSUM62 matrix, $\mathbf{X} \in \mathbb{R}^{n \times 20}$ the one hot encoded ground truth residues types and $\hat{\mathbf{X}} \in \mathbb{R}^{n \times 20}$ the predicted residues types the BLOSUM Score is:
319
+
320
+ $$
321
+ \operatorname {S c o r e} (\boldsymbol {X}, \hat {\boldsymbol {X}}) = \frac {\mathbf {1} ^ {T} \operatorname {d i a g} \left(\boldsymbol {X} \boldsymbol {A} \hat {\boldsymbol {X}} ^ {T}\right)}{\mathbf {1} ^ {T} \operatorname {d i a g} \left(\boldsymbol {X} \boldsymbol {A} \boldsymbol {X} ^ {T}\right)} \tag {4}
322
+ $$
323
+
324
+ # A.2. Fake Ligand Data Augmentation Visualization
325
+
326
+ In Figure 5, we visualize the construction of our fake ligands as described in Section 3.2. When constructing the fake ligand from a residue, we drop the backbone oxygen and nitrogen of the amino acid and keep the carbon, alpha carbon, and the side chain as the ligand's atoms.
327
+
328
+ # A.3. Flow Matching Training and Inference
329
+
330
+ In Section 3.1, we lay out the conditional flow matching objective as introduced by Lipman et al. (2022) and extended to arbitrary start and end distributions by multiple works concurrently (Albergo & Vanden-Eijnden, 2022; Albergo et al., 2023; Pooladian et al., 2023; Tong et al., 2023b). We presented conditional flow matching in this more general scenario where the prior $p_0$ and the data $p_1$ can be arbitrary distributions, as long as we can sample from the prior.
331
+
332
+ Many choices of conditional flows and conditional vector fields are possible. For different applications and scenarios, some choices perform better than others. We find it to already work well to use a very simple choice of conditional probability path $p_t(\pmb{x}|\pmb{x}_0,\pmb{x}_1) = \mathcal{N}(\pmb{x}|t\pmb{x}_1 + (1 - t)\pmb{x}_0,\sigma^2)$ , which gives rise to the conditional vector field $u_t(\pmb{x}|\pmb{x}_0,\pmb{x}_1) = \pmb{x}_1 - \pmb{x}_0$ . With this conditional flow and with parameterizing $v_\theta$ to predict $\pmb{x}_1$ , the optimization and inference is remarkably straightforward as algorithms 1 and 2 show.
333
+
334
+ # A.4. Self-conditioned Flow Matching Training and Inference
335
+
336
+ In Section 3.1, we also explain the self-conditioning training and inference procedure. When additionally using self-conditioning, the training and inference algorithms are only slightly modified and still very simple as presented in algorithms
337
+
338
+ Algorithm 1 Conditional Flow Matching training with $x_{1}$ prediction and simple constant width gaussian conditional path.
339
+ Input: Training data distribution $p_1$ , prior $p_0$ , $\sigma$ , and initialized vector field $v_{\theta}$
340
+ while Training do
341
+ $\boldsymbol{x}_0 \sim p_0(\boldsymbol{x}_0)$ ; $\boldsymbol{x}_1 \sim p_1(\boldsymbol{x}_1)$ ; $t \sim \mathcal{U}(0,1)$ $\mu_t \gets t\boldsymbol{x}_1 + (1 - t)\boldsymbol{x}_0$ $\boldsymbol{x} \sim \mathcal{N}(\mu_t, \sigma^2 I)$ $\mathcal{L}_{CFM} \gets \| v_{\theta}(\boldsymbol{x}, t) - \boldsymbol{x}_1 \|^2$ $\theta \gets \mathrm{Update}(\theta, \nabla_\theta \mathcal{L}_{CFM})$
342
+ end while
343
+ return $v_{\theta}$
344
+
345
+ Algorithm 2 Conditional Flow Matching inference with $\pmb{x}_1$ prediction and simple constant width gaussian conditional path.
346
+ Input: Prior $p_0$ , number of integration steps T, and trained vector field $v_{\theta}$
347
+ steps $\leftarrow 1$ $\Delta t\gets 1 / T$ $t\gets 0$ $\pmb {x}_0\sim p_0(\pmb {x}_0)$ $\pmb{x}_{t}\gets \pmb{x}_{0}$
348
+ while steps $\leq T - 1$ do
349
+ $\tilde{\pmb{x}}_1\gets v_\theta (\pmb {x}_t,t)$ $\pmb {x}_t\gets \pmb {x}_t + \Delta t(\tilde{\pmb{x}}_1 - \pmb {x}_t) / (1 - t)$ $t\gets t + \Delta t$
350
+ end while
351
+ return $\pmb {x}_t$
352
+
353
+ 3 and 4.
354
+
355
+ # A.5. FLOWSITE Architecture
356
+
357
+ ![](images/e4f78047d23ca97c61d246171b497244dfc841cfe3316b4d4bb956c796094978.jpg)
358
+ Figure 6. FLOWSITE architecture. The refinement TFN layers (also in HARMONICFLOW) first update the ligand coordinates $\boldsymbol{x}_{t - \Delta t}$ multiple times to produce the structure prediction $\tilde{\boldsymbol{x}}_1^t$ (from which $\tilde{\boldsymbol{x}}_t$ is computed during inference). The TFN's invariant features and $\tilde{\boldsymbol{x}}_1^t$ are fed to invariant layers to produce side chain angles $\tilde{\alpha}$ and the new residue estimate $\tilde{\boldsymbol{a}}_1^t$ .
359
+
360
+ Here, we detail the FLOWSITE architecture as visualized in Figure 6 in more detail. The first half of the architecture is an equivariant Tensor Field Network (Thomas et al., 2018) while the second part is an invariant architecture with graph attention layers similar to the architecture of PIFOLD (Gao et al., 2023a) where edge features are also initialized and updated.
361
+
362
+ Radius Graph. The protein and (multi-)ligand are represented as graphs: each residue corresponds to a node, and each ligand atom is a node. Edges are drawn between residue nodes if they are within $50\,\text{\AA}$ , between ligand nodes if they are within $50\,\text{\AA}$ , and between the two molecules' nodes if they are within $30\,\text{\AA}$ . The locations of the residue nodes are given by
363
+
364
+ Algorithm 3 Conditional Flow Matching training with $x_{1}$ prediction and simple constant width gaussian conditional path.
365
+ Input: Training data distribution $p_1$ , prior $p_0$ , $\sigma$ , and initialized vector field $v_{\theta}$
366
+ while Training do
367
+ $\boldsymbol{x}_0 \sim p_0(\boldsymbol{x}_0)$ ; $\boldsymbol{x}_1 \sim p(\boldsymbol{x}_1)$ ; $t \sim \mathcal{U}(0,1)$ ; $s \sim \mathcal{U}(0,1)$ $\mu_t \gets t\boldsymbol{x}_1 + (1 - t)\boldsymbol{x}_0$ $\boldsymbol{x} \sim \mathcal{N}(\mu_t, \sigma^2 I)$ $\tilde{\boldsymbol{x}}_1 \sim p_0(\tilde{\boldsymbol{x}}_1)$
368
+ if $s > 0.5$ then
369
+ $\tilde{\boldsymbol{x}}_1 \gets v_{\theta}(\boldsymbol{x}, \tilde{\boldsymbol{x}}_1, t)$
370
+ end if
371
+ $\mathcal{L}_{CFM} \gets \|v_{\theta}(\boldsymbol{x}, \tilde{\boldsymbol{x}}_1, t) - \boldsymbol{x}_1\|^2$ $\theta \gets \text{Update}(\theta, \nabla_\theta \mathcal{L}_{CFM})$
372
+ end while
373
+ return $v_{\theta}$
374
+
375
+ Algorithm 4 Conditional Flow Matching inference with $x_{1}$ prediction and simple constant width gaussian conditional path.
376
+ Input: Prior $p_0$ , number of integration steps T, and trained vector field $v_{\theta}$
377
+ steps $\leftarrow 1$ $\Delta t\gets 1 / T$ $t\gets 0$ $\tilde{\boldsymbol{x}}_1\sim p(\boldsymbol {x}_0)$ $\boldsymbol {x}_0\sim p(\boldsymbol {x}_0)$ $\boldsymbol {x}_t\gets \boldsymbol {x}_0$
378
+ while steps $\leq T - 1$ do
379
+ $\tilde{\boldsymbol{x}}_1\gets v_\theta (\boldsymbol {x},\tilde{\boldsymbol{x}}_1,t)$ $\boldsymbol {x}_t\gets \boldsymbol {x}_t + \Delta t(\tilde{\boldsymbol{x}}_1 - \boldsymbol {x}_t) / (1 - t)$ $t\gets t + \Delta t$
380
+ end while
381
+ return $\boldsymbol {x}_t$
382
+
383
+ their alpha carbons, while the atom locations provide the node positions for the ligand nodes.
384
+
385
+ Node Features. The ligand features as input to the TNF and to the invariant part of the architecture are atomic number; chirality; degree; formal charge; implicit valence; the number of connected hydrogens; hybridization type; whether or not it is in an aromatic ring; in how many rings it is; and finally, 6 features for whether or not it is in a ring of size 5 or 6.
386
+
387
+ The initial receptor features for the TFN are scalar feature encodings of the invariant residue types together with vector features, which are three vectors from the alpha carbon to N, C, and O.
388
+
389
+ For the invariant graph attention layer stack, the residue inputs are the invariant geometric encodings of PIFOLD (Gao et al., 2023a). Additionally, they contain the residue type self-conditioning information via embeddings of the previously predicted features $\tilde{\boldsymbol{a}}_1^t$ and the invariant scalar node features of the last refinement TFN layer.
390
+
391
+ Additionally, radial basis encodings of the sampling time $t$ of the conditional flow are added to all initial node features.
392
+
393
+ Edge Features. For the Tensor Field Network, the edge features are a radial basis embedding of the alpha carbon distances for the protein-to-protein edges, atom distances for the ligand-to-ligand edges, and alpha carbon to ligand atom distances for the edges between the protein and the ligand. Additionally, the ligand-to-ligand edges features obtain information of the structure self-conditioning by also adding the radial basis interatomic distance embeddings of the previously predicted ligand coordinates $\tilde{\boldsymbol{x}}_1^t$ to them.
394
+
395
+ Meanwhile, for the invariant graph attention part of the architecture, the ligand-to-ligand edge features are only radial basis embeddings of the interatomic distances. The protein-to-protein edge features are given by radial basis encodings of all pairwise distances between the backbone atoms N, C, Ca, O, and an additional virtual atom (as introduced by PIFOLD) associated with each residue. The edges between the protein and ligand are featurized as the embeddings of the four possible
396
+
397
+ distances between a single ligand atom and the four backbone atoms of a residue.
398
+
399
+ Tensor Field Network. The equivariant part of FLOWSITE uses our equivariant refinement TFN layers based on tensorfield networks (Thomas et al., 2018) and implemented using the e3nn library (Geiger et al., 2020). These rely on tensor products between invariant and equivariant features. We denote the tensor products as $\otimes_w$ where $w$ are the path weights. Further, we write the $i$ -th node features after the $k$ -th layer as $h_i^k$ for the equivariant Tensorfield network layers. $h_i^0$ is initialized as described above in the Node Features paragraph. Lastly, $\mathcal{N}_i$ denotes the neighbors of the $i$ -th node in the radius graph.
400
+
401
+ Equivariant TFN Refinement Layer. Each layer has a different set of weights for all four types of edges: ligand-to-ligand, protein-to-protein, ligand-to-protein, and protein-to-protein. The layers first update node features before updating ligand coordinates based on them. For every edge in the graph, a message is constructed based on the invariant and equivariant features of the nodes it connects. This is done in an equivariant fashion via tensor products. The tensor product is parameterized by the edge embeddings and the invariant scalar features of nodes that are connected by the edge. To obtain a new node embedding, the messages are summed:
402
+
403
+ $$
404
+ \boldsymbol {h} _ {i} ^ {k + 1} \leftarrow \mathbf {h} _ {i} ^ {k} + \mathrm {B N} \left(\frac {1}{| \mathcal {N} _ {i} |} \sum_ {j \in \mathcal {N} _ {i}} Y (\hat {r} _ {i j}) \otimes_ {\psi_ {i j}} \mathbf {h} _ {j} ^ {k}\right) \tag {5}
405
+ $$
406
+
407
+ $$
408
+ \text {w i t h} \psi_ {i j} = \Psi \left(e _ {i j}, \mathbf {h} _ {i} ^ {k}, \mathbf {h} _ {j} ^ {k}\right)
409
+ $$
410
+
411
+ Here, BN is the (equivariant) batch normalization of the $\mathsf{e}3\mathsf{nn}$ library. The orders of all features are always restricted to a maximum of 1. The neural networks $\Psi$ have separate sets of weights for all 4 kinds of edges. Using these new node features and the previous layer's ligand position update $\hat{\pmb{x}}^k$ (or the input positions $\hat{\pmb{x}}^0 = \pmb{x}_t$ for the first layer), the next ligand position update $\hat{\pmb{x}}^{k + 1}$ is produced via an O(3) equivariant linear layer $\Phi$ of the $\mathsf{e}3\mathsf{nn}$ library:
412
+
413
+ $$
414
+ \hat {\boldsymbol {x}} ^ {k + 1} \leftarrow \hat {\boldsymbol {x}} ^ {k + 1} + \Phi \left(\boldsymbol {h} ^ {k + 1}\right) \tag {6}
415
+ $$
416
+
417
+ Invariant Graph Attention Layers. These layers are based on PIFOLD and update both node and edge features. The initial features are described in the paragraphs above. We denote these as $h_i^l$ and $e_{ji}^l$ for the $l$ -th graph attention layer to disambiguate with the features $h_i^k$ of the equivariant refinement TFN layers. When aggregating the features for the $i$ -th node, attention weights are first created and then used to weight messages from each neighboring node. With || denoting concatenation and Ω, Ξ, and Π being feed-forward neural networks, the update is defined as:
418
+
419
+ $$
420
+ w _ {j i} \leftarrow \Pi \left(\boldsymbol {h} _ {j} ^ {l} | | \boldsymbol {e} _ {j i} ^ {l} | | \boldsymbol {h} _ {i} ^ {l}\right)
421
+ $$
422
+
423
+ $$
424
+ a _ {j i} \leftarrow \frac {\exp w _ {j i}}{\sum_ {a \in \mathcal {N} _ {i}} \exp w _ {a i}}
425
+ $$
426
+
427
+ $$
428
+ \boldsymbol {v} _ {j} = \Xi \left(\boldsymbol {e} _ {j i} ^ {l} \| \boldsymbol {h} _ {j} ^ {l}\right) \tag {7}
429
+ $$
430
+
431
+ $$
432
+ \boldsymbol {h} _ {i} ^ {l + 1} = \sum_ {j \in \mathcal {N} _ {i}} a _ {j i} \boldsymbol {v} _ {j}.
433
+ $$
434
+
435
+ We drop the global context attention used in PIFOLD as we did not find them to be helpful for sequence recovery in any of our experiments. This was with and without ligands.
436
+
437
+ Based on the new node features, the edge features are updated as follows:
438
+
439
+ $$
440
+ \boldsymbol {e} _ {j i} ^ {l + 1} = \Omega \left(\boldsymbol {h} _ {j} ^ {l + 1} \| \boldsymbol {e} _ {j i} ^ {l} \| \boldsymbol {h} _ {i} ^ {l + 1}\right) \tag {8}
441
+ $$
442
+
443
+ # B. Discussion
444
+
445
+ HARMONICFLow has the ability to produce arbitrary bond lengths and bond angles. This distinguishes it from DIFFDOCK (Corso et al., 2023), which only changes torsion angles, translation, and rotation of an initial seed conformer. Thus, unlike DIFFDOCK, HARMONICFLow would be able to produce unrealistic local structures. That this is not the case, as shown in Figure 12 attests to how HARMONICFLow learns physical constraints. Still, we argue that the role of deep learning generative models should be to solve the hard problem of finding the correct coarse structure. If one desires a conformer
446
+
447
+ ![](images/f289f0da781429d9b48e683f19d5ed5a00fbc05efb166c4cb42f1667a2f7d3a7.jpg)
448
+ Figure 7. Multi-ligand docking case study. A randomly picked complex with a multi-ligand from the Binding MOAD test set with 4 molecules as multi-ligand. We show the ground truth ligand structure (blue) and a sample of HARMONICFLOW (purple). We find that the predicted structure mostly matches the ground truth for both of the large ligands, but both small ligands are placed on the left while one of them should be on the right.
449
+
450
+ with low energy with respect to some energy function, this can be easily and quickly obtained by relaxing with that energy function.
451
+
452
+ # C. Additional Results
453
+
454
+ # C.1. Multi-ligand Docking Case Studies
455
+
456
+ In this subsection we provide 4 case studies of Multi-liand docking to assess the behaviour of HARMONICFLOW for this task. For this purpose, we randomly choose 4 complexes from the Binding MOAD test set under the condition that they contain different ligands.
457
+
458
+ Overall, we find that while the RMSDs of EIGENFOLD DIFFUSION in Table 2 are similar to those of HARMONICFLOW, the complexes that HARMONICFLOW generates are often more physically plausible. For instance, HARMONICFLOW's rings have the appropriate shape and planar systems are actually planar which often is not the case for EIGENFOLD DIFFUSION.
459
+
460
+ # C.2. Analysis of joint ODE dynamics
461
+
462
+ To analyze the behavior of the learned ODE over discrete and continuous data, we provide Figure 11. This figure shows the evolution of the $x_{1}$ prediction's RMSD and the evolution of the output entropy of the residue type probabilities. The results show how a more determined structure prediction correlates with a decrease in uncertainty of the residue type prediction.
463
+
464
+ # C.3. FlowSite Ablations
465
+
466
+ In Table 5 we provide additional ablations for FLOWSITE. In NO REFINEMENT LOSS, the loss $\mathcal{L}_{\text{refine}}$ is dropped from the final weighted sum of losses. In NO SIDE CHAIN TORSION LOSS, the loss $\mathcal{L}_{\text{torsion}}$ is dropped from the final weighted sum of losses. In BACKBONE NOISE, we add Gaussian noise to the input protein backbone coordinates with standard deviation 0.2. In ONLY EQUIVARIANT LAYERS, we replace the invariant graph attention layers in the FLOWSITE architecture with equivariant refinement TFN layers, showing how the invariant architecture is crucial for predicting the discrete residue types.
467
+
468
+ ![](images/aecfb052d3cd3148118aefac4f1e807460ec8b930e98ff4b81bb758cf5298bc2.jpg)
469
+ Figure 8. Multi-ligand docking case study. A randomly picked complex with a multi-ligand from the Binding MOAD test set for which we show the ground truth ligand structure (blue), a sample of HARMONICFLOW (purple) and a sample of EIGENFOLD DIFFUSION (yellow). We find that the rings of HARMONICFLOW have the correct shapes and that the bond lengths and angles are physically plausible while EIGENFOLD DIFFUSION fails to produce planar rings.
470
+
471
+ Table 5. Binding Site Recovery ablations. Results on the PDBBind sequence similarity split. Recovery is the percentage of correctly predicted residues, and BLOSUM score takes residue similarity into account.
472
+
473
+ <table><tr><td>Method</td><td>BLOSUM score</td><td>Recovery</td></tr><tr><td>NO SIDE CHAIN TORSION LOSS</td><td>45.9</td><td>47.7</td></tr><tr><td>BACKBONE NOISE</td><td>39.6</td><td>42.4</td></tr><tr><td>NO FAKE LIGAND AUGMENTATION</td><td>45.5</td><td>46.7</td></tr><tr><td>NO REFINEMENT LOSS</td><td>45.7</td><td>47.6</td></tr><tr><td>ONLY EQUIVARIANT LAYERS</td><td>29.8</td><td>35.3</td></tr><tr><td>FLOWSITE discrete loss weight = 0.8</td><td>46.9</td><td>47.8</td></tr><tr><td>FLOWSITE discrete loss weight = 0.2</td><td>47.6</td><td>49.5</td></tr></table>
474
+
475
+ # C.4. Docking without residue identities
476
+
477
+ For our binding site design, it is important that the structure modeling of the ligand is accurate given the evidence that having a good model of the (multi-)ligand structure is important for recovering pockets and given the interlink between 3D structure and binding affinity / binding free energy. In the main text Section 4.2, we investigated HARMONICFLOW's performance for docking with known residue identities. However, when using HARMONICFLOW for binding site design, the residue identities are not known a prior, and structure reasoning abilities in this scenario are required.
478
+
479
+ # C.5. Blind Docking
480
+
481
+ In blind docking, the binding site/pocket of the protein is unknown, and the task is to predict the binding structure given the whole protein. While in, e.g., drug discovery efforts and in our binding site design task, the pocket is known, many important applications exist where discovering the binding site is necessary. In these experiments, the runs take longer to converge than in the pocket-level experiments. Thus, the DiffDock runs were trained for 500 epochs while the HARMONICFLOW runs were trained for 250 epochs instead of the 150 epochs in the pocket-level experiments. Table 7, shows these preliminary blind docking results, which are promising for a deeper investigation of HARMONICFLOW for blind docking and for optimizing it toward this task. This could include training a confidence model as in DiffDOCK (Corso et al., 2023).
482
+
483
+ ![](images/c233980a36c41f81f003bf49cef0daca9d0a90b58cc9ebe7f05ad4a5d1567193.jpg)
484
+ Figure 9. Multi-ligand docking case study. A randomly picked complex with a multi-ligand from the Binding MOAD test set for which we show the ground truth ligand structure (blue), a sample of HARMONICFLOW (purple) and a sample of EIGENFOLD DIFFUSION (yellow). We find that EIGENFOLD DIFFUSION incorrectly placed the sulfate and its second ligand prediction is further from the ground truth while HARMONICFLOW almost perfectly places the sulfate.
485
+
486
+ Table 6. HARMONICFLOW vs. PRODUCT DIFFUSION without residue identities. Comparison on PDBBind splits for docking without residue identities into Distance-Pockets (residues close to ligand) and Radius-Pockets (residues within a radius of the pocket center). The columns $0\% < 2$ show the fraction of predictions with an RMSD to the ground truth that is less than $2\AA$ (higher is better). "Med." is the median RMSD (lower is better).
487
+
488
+ <table><tr><td rowspan="3">Method</td><td colspan="4">Sequence Similarity Split</td><td colspan="4">Time Split</td></tr><tr><td colspan="2">Distance-Pocket</td><td colspan="2">Radius-Pocket</td><td colspan="2">Distance-Pocket</td><td colspan="2">Radius-Pocket</td></tr><tr><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td><td>%&lt;2</td><td>Med.</td></tr><tr><td>PRODUCT DIFFUSION</td><td>23.2</td><td>3.4</td><td>14.3</td><td>4.0</td><td>16.9</td><td>4.3</td><td>12.3</td><td>4.6</td></tr><tr><td>HARMONICFLOW</td><td>35.5</td><td>2.8</td><td>20.8</td><td>3.5</td><td>39.3</td><td>2.8</td><td>30.7</td><td>3.3</td></tr></table>
489
+
490
+ # C.6. Predicted Complex Visualizations
491
+
492
+ We visualize generated structures of HARMONICFLOW in Figure 12 from the PDBBind test set under the time-based split of Stärk et al. (2022) in which there are no ligands whose SMILES string was already in the training data. The generated complexes show very chemically plausible ligand structures even though there are no local structure constraints as in DIFFDOCK and HARMONICFLOW has full flexibility in modeling bond angles and bond lengths.
493
+
494
+ In Table 6, we provide the docking results without residue identities, justifying HARMONICFLOW's use in FLOWSITE for binding site design.
495
+
496
+ # D. Additional Related Work
497
+
498
+ # D.1. Flow Matching, Stochastic Interpolants, and Schrodinger Bridges
499
+
500
+ While our exposition of flow matching in the main text focused on the works of Lipman et al. (2022) and Tong et al. (2023b), the innovations in this field were made by multiple papers concurrently. Namely, Action Matching (Neklyudov et al., 2023), stochastic interpolants (Albergo & Vanden-Eijnden, 2022), and rectified flow (Liu et al., 2022) also proposed procedures for learning flows between arbitrary start and end distributions.
501
+
502
+ An improvement to learning such flows would be if their transport additionally performs the optimal transport between
503
+
504
+ ![](images/ba40ba6502b23d530bdb76bdc4729937bf011b7c767ad57371c0ca170507d016.jpg)
505
+ Figure 10. Multi-ligand docking case study. A randomly picked complex with a multi-ligand from the Binding MOAD test set for which we show the ground truth ligand structure (blue), a sample of HARMONICFLOW (purple) and a sample of EIGENFOLD DIFFUSION (yellow). We can see unrealistic bond lengths and angles for EIGENFOLD DIFFUSION's prediction and the predicted ion position is further from the ground truth than for HARMONICFLOW.
506
+
507
+ Table 7. HARMONICFLOW vs. PRODUCT DIFFUSION for blind docking. Comparison on PDBBind splits for blind docking where the binding pocket of the protein is not known, and the whole protein is given as input. The columns $0 < 2$ show the fraction of predictions with an RMSD to the ground truth that is less than $2\AA$ (higher is better). Med." is the median RMSD in Å (lower is better). Top 5 and Top 10 refers to the performance when generating 5 or 10 samples and selecting the best among them.
508
+
509
+ <table><tr><td rowspan="2">Method</td><td colspan="3">Sequence Split</td><td colspan="3">Time Split</td></tr><tr><td>%&lt;2</td><td>%&lt;5</td><td>Med.</td><td>%&lt;2</td><td>%&lt;5</td><td>Med.</td></tr><tr><td>PRODUCT DIFFUSION</td><td>10.7</td><td>40.6</td><td>5.9</td><td>12.6</td><td>44.1</td><td>5.6</td></tr><tr><td>HARMONICFLOW</td><td>11.4</td><td>40.5</td><td>5.8</td><td>25.5</td><td>52.2</td><td>4.7</td></tr><tr><td></td><td>Top 5</td><td>Top 10</td><td></td><td>Top 5</td><td>Top 10</td><td></td></tr><tr><td></td><td>%&lt;2</td><td>%&lt;2</td><td></td><td>%&lt;2</td><td>%&lt;2</td><td></td></tr><tr><td>PRODUCT DIFFUSION</td><td>26.6</td><td>34.2</td><td></td><td>28.9</td><td>32.5</td><td></td></tr><tr><td>HARMONICFLOW</td><td>17.1</td><td>20.0</td><td></td><td>30.9</td><td>32.6</td><td></td></tr></table>
510
+
511
+ the two distributions with respect to some cost. With shorter paths with respect to the cost metric, even fewer integration steps can be performed, and integration errors are smaller. Towards this, Tong et al. (2023b) and Pooladian et al. (2023) concurrently propose mini-batch OT where they train with conditional flow matching but define the conditional paths between the optimal transport solution within a minibatch. They show that in the limit of the batch size, the flow will learn the optimal coupling.
512
+
513
+ This can be extended to learning Schrodinger bridges in a simulation-free manner via an iterative flow-matching and coupling definition procedure (Shi et al., 2023) akin to rectified flows. Similarly, Tong et al. (2023a) learn a flow and a score simultaneously to reproduce stochastic dynamics as in a Schrodinger bridge and Somnath et al. (2023) learn a Schrodinger bridge between aligned data in a simulation-free manner. Simulation-free here means that the learned vector fields no longer need to be rolled out / simulated during training, which is memory and time-consuming and prohibits learning Schrodinger bridges for larger applications. This was required for previous procedures for learning Schrodinger bridges (Bortoli et al., 2023; Chen et al., 2022a).
514
+
515
+ # D.2. Pocket Design
516
+
517
+ Yeh et al. (2023) successfully designed a novel Luciferase, which is an enzyme catalyzing the reaction of a Luciferin ligand.
518
+
519
+ ![](images/a13630aa64e1b55074e49111549a5737ac169cb265c3a2253d3dbc2882147512.jpg)
520
+
521
+ ![](images/e25d60715882c408b666a121b72cb1888d8d7d8d0a8d3a7ed1308c1344da22e0.jpg)
522
+
523
+ ![](images/83a253cbcc74d65c3b6b6ebf3a2298d16685548f2027f682f69dc99deb73cf79.jpg)
524
+
525
+ ![](images/7bba313e39ded981e5dcf0a16c9af049d485425709f6c02baa88f8320dfe183c.jpg)
526
+
527
+ ![](images/9dc88f15f52d1d5b0e42ca6bed70ae5c9f329f18df54fd6084de3fc265ff99a9.jpg)
528
+
529
+ ![](images/907473241050ef2834322450af802ecdb59c3727d275be17f42b63f04c96bf55.jpg)
530
+
531
+ ![](images/00c4a9cac018b3044788a6fdfff67938882050181c470a74fd5cb3d38ce73ae5.jpg)
532
+ g PDB ID: 1pzp
533
+
534
+ ![](images/1b1bc772f8d8b79a357dc8a45626b170e96c02296fce1932ecf25f78d812a1d9.jpg)
535
+ h PDB ID: 3hjq
536
+ Figure 11. Analysis of joint ODE dynamics. For multiple examples, we visualize two quantities of the trajectory of the ODE. On the x-axis is the integration step of the ODE. On the y-axis on the left in blue, the RMSD between the step's $\pmb{x}_{1}$ prediction and the final $\pmb{x}_{1}$ prediction. On the y-axis on the right in yellow, we show the entropy of the predicted probability distribution averaged over all residues.
537
+
538
+ In their pipeline, they 1) Choose a protein with a cavity of the right size for the reactants. 2) Keep its backbone 3D structure without amino acid identities and part manually, part computationally decide the amino acids of the cavity to bind the ligands (which we aim to do with FLOWSITE). 3) Design the rest of the protein's residues with existing tools such as ProteinMPNN (Dauparas et al., 2022).
539
+
540
+ The POCKETOPTIMIZER line of works (Malisi et al., 2012; Stiel et al., 2016; Noske et al., 2023) develops a pipeline for pocket residue design based on physics-inspired energy functions and search algorithms. Starting from a bound protein-ligand complex, POCKETOPTIMIZER samples different structures and residue types, which are scored with multiple options of energy functions and optimized with different search algorithms for which multiple options are available. Meanwhile, DEPACT (Chen et al., 2022b) and Dou et al. (2017) design pockets by searching databases for bound structures of similar ligands, using their protein's residues as proposals, and selecting the best combinations based on scoring functions.
541
+
542
+ # D.3. Antibody Design
543
+
544
+ Another domain where joint sequence and structure design has already been heavily leveraged is antibody design (Jin et al., 2022; Verma et al., 2023; Martinkus et al., 2023). In this task, the goal is to determine the residue types of the complementary determining regions/loops of an antibody to bind an epitope. These epitopes are proteins, and we have the opportunity to leverage evolutionary information. A modeling approach here only has to learn the interactions with the 20 possible amino acids that the epitope is built out of. Meanwhile, in our design task, where we wish to bind arbitrary small molecules, we are faced with a much wider set of possibilities for the ligand.
545
+
546
+ # D.4. Small molecule design
547
+
548
+ Another frontier where designing structure and "2D" information simultaneously has found application is in molecule generation. For instance, Vignac et al. (2023a) and Vignac et al. (2023b) show how a joint diffusion process over a small molecule's positions and its atom types can be used to successfully generate novel realistic molecules. This task was initially tackled by EDM (Hoogeboom et al., 2022) and recently was used to benchmark diffusion models with changing numbers of dimensions (Campbell et al., 2023).
549
+
550
+ Often, it is relevant to generate molecules conditioned on context. In particular, a highly valuable application, if it works well enough, would be generating molecules conditioned on a protein pocket to bind to that pocket (Lin et al., 2022; Schneuing et al., 2023). These applications would be most prominent in the drug discovery industry, where the first step in many drug design campaigns is often to find a molecule that binds to a particular target protein that is known to be relevant for a disease. In our work with FLOWSITE, we consider the opposite task where the small molecule is already given, and we instead want to design a pocket to bind this molecule. Here, the applications range from enzyme design (for which the first step of catalysis is binding the reactants (Nelson & Cox, 2004)) over antidote design to producing new biomedical marker proteins for use in medicinal diagnosis and biology research.
551
+
552
+ # D.5. Protein-Ligand Docking
553
+
554
+ Historically, docking was performed with search-based methods (Trott & Olson, 2010; Halgren et al., 2004; Thomsen & Christensen, 2006) that have a scoring function and a search algorithm. The search algorithm would start with an initial random conformer and explore the energy landscape defined by the scoring function before returning the best scoring pose as the final prediction. Recently, such scoring functions have been parameterized with machine learning approaches (McNutt et al., 2021; Mendez-Lucio et al., 2021). In these traditional docking methods, to the best of our knowledge, only extensions of Autodock Vina (Trott & Olson, 2010) support multiligand docking. However, this still requires knowledge of the complete sidechains, which is not available in our binding site design scenario.
555
+
556
+ # E. Experimental Setup Details
557
+
558
+ In this section, we provide additional details on how our experiments were run next to the exact commands and code to reproduce the results available at https://github.com/HannesStark/FlowSite. In all of the paper, we only consider heavy atoms (no hydrogens).
559
+
560
+ Training Details. For optimization, we use the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.001 for all experiments. The batch size for pure structure prediction experiments is 4, while that for binding site recovery experiments
561
+
562
+ is 16. To choose the best model out of all training epochs, we run inference every epoch for experiments that do not involve structure modeling and every 5 epochs for the ones that do. The model that is used for the test set is the one with the best metric in terms of sequence recovery or fraction of predictions with an RMSD below $2\AA$ . When training for binding site recovery, we limit the number of heavy atoms in the ligand to 60. We note that for the structure prediction experiments for Binding MOAD in Table 2, the dataset construction for both methods had a mistake where ligands were selected based on their residue ID, which is incorrect because a ligand in a different chain could have the same residue ID - we will correct this in the next version of the manuscript. All models were trained on a single A100 GPU. The models that involve structure prediction were trained for 150 epochs, while those without structure modeling and pure sequence prediction converge much faster in terms of their validation metrics and are only trained for 50 epochs. On PDBBind, FlowSite took 58.6 hours to train, and on MOAD 115.6 hours, both on an RTX A600 GPU. The DIFFOCK models are all trained for 500 epochs.
563
+
564
+ Runtime. Averaged over 4350 generated samples, the average runtime of HARMONICFLOW is 0.223 seconds per generated structure and that of FLOWSITE is 0.351 seconds per sequence.
565
+
566
+ Hyperparameters. We tuned hyperparameters on small-scale experiments in the Distance-Pocket setup for HARMONICFLOW and transferred these parameters to FLOWSITE, whose additional parameters we tested separately. The tuning for both methods was light, and we mainly stuck with the initial settings that we already found to work well. By default, our conditional probability path $p_t(\boldsymbol{x}|\boldsymbol{x}_0,\boldsymbol{x}_1) = \mathcal{N}(\boldsymbol{x}|t\boldsymbol{x}_1 + (1 - t)\boldsymbol{x}_0,\sigma^2)$ uses $\sigma = 0.5$ for which we also tried 0.1, 0.3, 0.5, 0.8. The number of integration steps we use is 20 for all methods, including EIGENFOLD DIFFUSION and PRODUCT SPACE DIFFUSION. The number of scalar features we use is 32, and we have 8 vector features and 6 of our equivariant refinement TFN layers.
567
+
568
+ PRODUCT SPACE DIFFUSION baseline. This only uses the score model, the diffusion generative model component of DiffDOCK (Corso et al., 2023). We do not use the confidence model, which is a significant part of their docking pipeline. Such a discriminator could also be used on top of HARMONICFLOW, and here, we only aim to compare the generative models. For this, we use the code at https://github.com/gcorso/DiffDock to train PRODUCT SPACE DIFFUSION with our pocket definitions using the same number of scalar features and vector features using 5 of its default TFN layers followed by its pseudo torque convolution and center-convolution. We train all experiments with PRODUCT SPACE DIFFUSION for 500 epochs.
569
+
570
+ EIGENFOLD DIFFUSION baseline. Here, we use an identical architecture as for HARMONICFLOW and only replace the flow matching training and inference with the diffusion training and inference approach of EIGENFOLD (Jing et al., 2023). The models were trained in the same settings, and most parameters that we use in HARMONICFLOW were first optimized with EIGENFOLD DIFFUSION since we used it initially.
571
+
572
+ # F. Dataset Details
573
+
574
+ Here, we lay out the details of the PDBBind and Binding MOAD datasets as we use them to evaluate HARMONICFLOW's docking abilities and FLOWSITE's binding site design.
575
+
576
+ # F.1.PDBBind
577
+
578
+ We use PDBBind dataset (Liu et al., 2017) with protein-ligand complexes of high binding affinity extracted and hand curated from the Protein Data Bank (PDB) (Berman et al., 2003). For this, we use two splits.
579
+
580
+ Splits. Firstly, the time split proposed by Stärk et al. (2022), which now is commonly used in the machine learning literature when benchmarking docking approaches, although Buttenschoen et al. (2023) among others found many shortcomings of this split, especially for blind docking. Chiefly among them is the fact that of the 363 test complexes, only 144 are not already included in the training data if a protein is counted the same based on UniProtID. The split has 17k complexes from 2018 or earlier for training/validation, and the mentioned 363 test samples are from 2019. Additionally, there is no ligand overlap with the training complexes based on SMILES identity. The data can be downloaded from https://zenodo.org/record/6408497 as preprocessed by These files were preprocessed by Stärk et al. (2022) with Open Babel before "correcting" hydrogens and flipping histidines with by running reduce https://github.com/rlabduke/reduce. For benchmarking traditional docking software, this preprocessed data should not be employed since the hydrogen bond lengths are incorrect. For our deep learning approaches that only consider heavy atoms, this is not relevant.
581
+
582
+ Secondly, a sequence similarity, which Buttenschoen et al. (2023) found to be a more difficult split than the time split for the blind docking scenario. To create this split, we cluster each chain of every protein with $30\%$ sequence similarity. The clusters for training, validation, and test are then chosen such that each protein's chains have at least $30\%$ sequence similarity with any other chain in another part of the split. This way, we obtain 17741 train, 688 validation, and 469 test complexes. After filtering for complexes that have at least one contact (a protein residue with a heavy atom within $4\AA$ ), 17714 train complexes remain while no validation or test complexes are filtered out.
583
+
584
+ Dataset Statistics. In Figure 13, we show the number of atoms per ligand in two histograms, while Figure 14 shows the number of contacts (a protein residue with a heavy atom within $4\AA$ ) per ligand. These statistics are for the training data.
585
+
586
+ # F.2. Binding MOAD Dataset
587
+
588
+ Split. The sequence similarity split that we use for BindingMOAD is carried out equivalently as for PDBBind described in Section F.1. This way, we obtain 56649 of Binding MOAD's biounits for training, 1136 for validation, and 1288 as the test set. We discarded some of the biounits and only ended up with 54575 of them since 2.1k of them did not contain any other atoms besides protein atoms and waters. From these, we only use the complexes denoted as the first biounit to reduce redundancy and have only one biounit per PDB ID after which 38477 training complexes remain. We further filter out all ligands that have only one contact (a protein residue with a heavy atom within $4\AA$ ) with their protein to obtain 36203 train, 734 validation, and 756 test proteins with a unique PDB ID for each of them.
589
+
590
+ Dataset Statistics. Here, we provide statistics for the Binding MOAD training data. In Figure 15, we show the number of ligands per protein that is obtained under our definition of ligands and multi-ligands. Each ligand in the depicted histogram can either be a multi-ligand or a single molecule. Each multi-ligand is only counted once. In Figure 16, we show the number of atoms per ligand in two histograms, while Figure 17 shows the number of contacts per ligand.
591
+
592
+ ![](images/0ca9aaf04a17e3d4617ca41468a94807e58326c6e2d60186af279dac69f2c4fe.jpg)
593
+ Figure 12. HARMONICFLOW generated complexes. Generated complexes of HARMONICFLOW for eight randomly chosen complexes in the PDBBind test set in the Distance-Pocket setup with a time-split where none of the ligands were seen during training.
594
+
595
+ ![](images/16c6f3bf372f23a26a16eca766c18527e78fdc07516c48bdc178acd1abb2092a.jpg)
596
+ Figure 13. Number of atoms per ligand: PDBBind. Histograms showing the number of heavy atoms for all ligands under our ligand definition. This includes many ions, which can be important to filter out if not relevant to the desired application.
597
+
598
+ ![](images/f82dd5e27b1d10f056cb1e4a5beb850ece7792460d714e627cbe4f567a2cb738.jpg)
599
+
600
+ ![](images/317d7f0d4a4e586c8e7621be05d93d9e0b04bed365318d2a96048e800b15faee.jpg)
601
+ Figure 14. Number of protein contacts per Ligand: PDBBind. Histograms showing the number of contacts that each ligand has with its protein. A contact is defined as having a residue with a heavy atom within 4A of any ligand heavy atom.
602
+
603
+ ![](images/a056741715430d6747a20cddc5e075f50426f77e84a5959eb090fd8d89dd11da.jpg)
604
+
605
+ ![](images/4149878555fefa6e07729f56f7af09d0a26108d2e578fdc07a53ed79ecff4316.jpg)
606
+ Figure 15. Number of Ligands per Protein: Binding MOAD. Histograms showing the number of (multi-)ligands per protein in the Binding MOAD dataset under our ligand definition. Each ligand here can be a multi-ligand. In that case, it is only counted once.
607
+
608
+ ![](images/a7dcb2cbf6f56c0c3ab8569f5663948334f5cdff746f84b9d4d9ff479ee0bba5.jpg)
609
+
610
+ ![](images/42a91e10fe064c51659c4a33783afad4a97925bf3637a403b67fd28906c5071a.jpg)
611
+ Figure 16. Number of atoms per ligand: Binding MOAD. Histograms showing the number of heavy atoms for all ligands under our ligand definition. This includes many ions, which can be important to filter out if not relevant to the desired application.
612
+
613
+ ![](images/dddb79ec3c1433dbc752f16cf9e357018f66b08f31f6cd8cbb3af88985dd14e2.jpg)
614
+
615
+ ![](images/262547bbffbae1a25088245aa8f5751073eaf639815716dc1ee039c819d2e3bb.jpg)
616
+ Figure 17. Number of protein contacts per Ligand: Binding MOAD. Histograms showing the number of contacts that each ligand has with its protein. A contact is defined as having a residue with a heavy atom within 4A of any ligand-heavy atom.
617
+
618
+ ![](images/38d580a708ce8a77d10b5ef21ef08902acec0eb3f34224240620f1f6f69ef6ea.jpg)
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b059234bf412608bb7134b76bc0fd3754b28177196d472a3817b42151cae8433
3
+ size 1531367
2024/Harmonic Self-Conditioned Flow Matching for joint Multi-Ligand Docking and Binding Site Design/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/2427e0bf-30f9-4541-9786-68d27bbec8f9_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12a81d2165a14fdee46decabedd6284017399659e24ba6ff9348bce2b270373b
3
+ size 821014
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/full.md ADDED
@@ -0,0 +1,427 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Harmonizing Generalization and Personalization in Federated Prompt Learning
2
+
3
+ Tianyu Cui $^{1}$ Hongxia Li $^{1}$ Jingya Wang $^{1}$ Ye Shi $^{1*}$
4
+
5
+ # Abstract
6
+
7
+ Federated Prompt Learning (FPL) incorporates large pre-trained Vision-Language models (VLM) into federated learning through prompt tuning. The transferable representations and remarkable generalization capacity of VLM make them highly compatible with the integration of federated learning. Addressing data heterogeneity in federated learning requires personalization, but excessive focus on it across clients could compromise the model's ability to generalize effectively. To preserve the impressive generalization capability of VLM, it is crucial to strike a balance between personalization and generalization in FPL. To tackle this challenge, we proposed Federated Prompt Learning with CLIP Generalization and low-rank Personalization (FedPGP), which employs pre-trained CLIP to provide knowledge-guidance on the global prompt for improved generalization and incorporates a low-rank adaptation term to personalize the global prompt. Further, FedPGP integrates a prompt-wise contrastive loss to achieve knowledge guidance and personalized adaptation simultaneously, enabling a harmonious balance between personalization and generalization in FPL. We conduct extensive experiments on various datasets to explore base-to-novel generalization in both category-level and domain-level scenarios with heterogeneous data, showing the superiority of FedPGP in balancing generalization and personalization.
8
+
9
+ # 1. Introduction
10
+
11
+ Federated Learning (McMahan et al., 2017) has been proposed as an efficient collaborative learning strategy, enabling clients to jointly train a global model while preserving
12
+
13
+ $^{1}$ ShanghaiTech University. Correspondence to: Ye Shi <shiye@shanghaitech.edu.cn>.
14
+
15
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
16
+
17
+ data privacy. In this context, the ability of large pre-trained Vision-Language models (VLM) like CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021) to learn transferable representations across downstream tasks makes them a natural fit for integration with federated learning. This collaborative approach not only harnesses the outstanding performance and generalization capabilities of pre-trained models but also ensures efficient and privacy-preserving global model training across multiple clients. However, due to the millions of parameters in VLM, fine-tuning the entire model in federated learning leads to high communication costs and memory footprint issues. Prompt tuning addresses these challenges by adapting pre-trained models to diverse downstream tasks with a reduced parameter count, and its integration of federated learning has been explored in previous research (Zhao et al., 2022; Guo et al., 2023b). We term the combination of prompt-tuning and federated learning as Federated Prompt Learning (FPL) for simplicity. Currently, studies in FPL have not been thoroughly explored in terms of personalization and generalization. Methods derived from traditional federated learning studies fail to capture the multi-modality of VLM, which hinders a direct transfer of these methods into FPL.
18
+
19
+ In federated learning, it is essential to account for the generalization capability to unseen domains or categories. However, existing studies in FL, like (Nguyen et al., 2022; Liu et al., 2021; Zhang et al., 2021), have struggled to achieve satisfactory results in evaluating generalization on target datasets in unseen domains. With the help of VLM which has strong generalization performance, this problem may be solved. Unfortunately, the generalization issues in prompt-based VLM have been revealed in recent research (Khattak et al., 2023a;b). For instance, CoOp (Zhou et al., 2022b) struggles with generalizing to unseen categories within the same dataset due to overfitting, resulting in lower test accuracy on novel categories compared to the zero-shot CLIP baseline with a handcrafted prompt. PromptSRC (Khattak et al., 2023b) addresses this issue with self-regularization constraints, maximizing the mutual agreement between prompted and frozen VLM features. However, the generalization of FPL is still an open challenge. FedTPG (Qiu et al., 2023) takes a step toward exploring generalization by learning a unified prompt generation network among
20
+
21
+ multiple clients but disregards the data heterogeneity.
22
+
23
+ Data heterogeneity results in another challenge in federated learning, where the data distributions among clients are not independently and identically distributed (Non-IID). This leads to discrepancies between local and global optimization objectives, making it difficult for a single global prompt to adapt to the varied local distributions. In the endeavor to learn personalized models, pFedPrompt (Guo et al., 2023a) incorporates personalized attention modules into FPL while learning a consensus among users through shared text prompts. Nevertheless, if we employ strong personalized techniques to fully adapt the prompts to local distributions, it may lead to the loss of inherent generalization in VLM. This raises the question we aim to explore:
24
+
25
+ How can we strike a balance between generalization and personalization in FPL?
26
+
27
+ To overcome the problems outlined above, we proposed Federated Prompt Learning with CLIP Generalization and low-rank Personalization (FedPGP), an effective method that reaches a balance between personalization and generalization. In FedPGP, each client learns a personalized prompt, combining a global prompt and an adaptation term to accommodate heterogeneous local distributions. The incorporation of the adaptation term allows fine-tuning of the global prompt for specific client needs. To enhance prompt generalization, we incorporate category-agnostic knowledge from CLIP, aligning the global prompt in each client towards a unified direction.
28
+
29
+ To balance generalization and personalization, we utilize a low-rank decomposition for the adaptation term, ensuring robust generalization capabilities in comparison to a full-rank term. To enable personalized prompts better access to client-specific knowledge, we aim to separate representations of global and personalized prompts for better personalization. Considering this and the knowledge-guidance from CLIP to global prompt, we introduce an additional contrastive loss into the optimization objective to further balance personalization and generalization of our FedPGP. This involves treating global prompt representations with personalized ones as negative pairs for personalization, while simultaneously treating them as positive pairs with the representation of handcrafted prompt of CLIP for generalization.
30
+
31
+ Our main contributions are summarized as follows:
32
+
33
+ - We are the first to consider both personalization and generalization in federated prompt learning. We aim to learn a personalized prompt for each client in heterogeneous federated scenarios while preserving the remarkable generalization capacity in Visual-Language models, leading to the balance of generalization and personalization.
34
+
35
+ - We propose FedPGP, utilizing low-rank decomposition adaptation to flexibly adjust the global prompt to heterogeneous local distributions, which prevents overfitting on local datasets. Additionally, we integrate an extra contrastive loss, treating representations of global and personalized prompts as negative pairs and representations of global and handcrafted prompts as positive pairs.
36
+
37
+ - We conduct extensive experiments on widely adopted datasets to investigate the base-to-novel generalization of FedPGP on both category-level and domain-level in the case of heterogeneous data. Our comparative experimental results demonstrate FedPGP's superiority in harmonizing generalization and personalization.
38
+
39
+ # 2. Related Work
40
+
41
+ Federated Learning This subsection mainly introduces the research on personalization and generalization in federated learning. Personalized federated learning (PFL) algorithms, rather than creating a universal model for all clients, tackle data heterogeneity by learning customized models for each client. Various strategies for achieving PFL have been suggested in previous studies. Some existing methods combine global model optimization with additional local model customization involving local fine-tuning (Wang et al., 2019; Mansour et al., 2020; Tan et al., 2022a), regularization (Li et al., 2020; 2021b; T Dinh et al., 2020), parameter decomposition (Jeong & Hwang, 2022; Hyeon-Woo et al., 2021; Arivazhagan et al., 2019), parameter generation (Shamsian et al., 2021; Ma et al., 2022; Li et al., 2023), and clustering methods for client grouping (Huang et al., 2021; Zhang et al., 2020; Sattler et al., 2020; Zhang et al., 2022; Cao et al., 2023; Cai et al., 2024). The theoretical significance of PFL was pointed out by (Huang et al., 2023). To be specific, FedPer (Arivazhagan et al., 2019), FedBABU (Oh et al., 2021), and FedRep (Collins et al., 2021) share the base layers while learning personalized classifier heads locally. FedBN (Li et al., 2021c) uses local batch normalization to alleviate feature shift before averaging models. FedRod (Chen & Chao, 2021) proposed learning a global predictor for generic FL and a local predictor for personalized FL.
42
+
43
+ Many existing studies in federated learning commonly assume the test dataset is a subset of the client dataset. However, a research gap exists for scenarios where the target dataset (i.e., the test dataset) is not included in the training process. This scenario is also referred to as domain generalization in centralized machine learning. FedSR (Nguyen et al., 2022) employs regularization techniques for simplified data representation, intending to achieve improved generalization capabilities. ELCFS (Liu et al., 2021) tackled federated domain generalization with continuous frequency space interpolation and the boundary-oriented
44
+
45
+ episodic learning scheme. FedADG (Zhang et al., 2021) utilizes federated adversarial learning for dynamic universal feature representation. Unlike traditional federated learning approaches, we are the first to consider both personalization and generalization in the context of FPL.
46
+
47
+ Federated Prompt Learning Prompt tuning is a technique employed to adapt pre-trained models to diverse downstream tasks. For instance, CoOp (Zhou et al., 2022b) uses tunable text prompts to replace the fixed template in CLIP, and CoCoOp (Zhou et al., 2022a) utilizes image feature to instruct the optimization of the soft text prompt. ProGrad (Zhu et al., 2023) selectively updates prompts based on aligned gradients with general knowledge to prevent forgetting essential information from VLMs. Some works also incorporate prompt tuning into federated learning. PromptFL (Guo et al., 2023b) introduced prompt learning into Federated Learning. FedPR (Feng et al., 2023) focuses on learning federated visual prompts within the null space of the global prompt for MRI reconstruction. pFedPG (Yang et al., 2023) employs a client-specific prompt generator on the server side for personalized prompts, while FedTPG (Qiu et al., 2023) also trains a global prompt generation network to enhance generalization. pFedprompt (Guo et al., 2023a) maintains a non-parametric personalized attention module for each client to generate local personalized spatial visual features. FedOTP (Li et al., 2024) employs unbalanced Optimal Transport to promote the collaboration between global and local prompts across heterogeneous clients. Designed for domain discrepancy, FedAPT (Wei et al., 2023) unlocks specific domain knowledge for each test sample to provide personalized prompts, and Fed-DPT (Su et al., 2022) applies both visual and textual prompt tuning to facilitate domain adaptation over decentralized data. However, these methods overlook the aspect of generalization. We propose FedPGP, a framework that effectively balances personalization and generalization in FPL.
48
+
49
+ Contrastive learning Contrastive learning methodologies have gained significant attention by consistently attaining state-of-the-art outcomes results in the field of visual representation learning (Chen et al., 2020a;b; Xie et al., 2022). The fundamental principle behind contrastive learning is to minimize the distance between representations generated from diverse augmentations of the same image (positive pairs) while simultaneously maximizing the distance between representations obtained from augmented views of different images (negative pairs). A proportion of research (Tan et al., 2022b; Li et al., 2021a; Mu et al., 2023) combines contrastive learning with federated learning, which improves the local training process and achieves higher model effectiveness. FedPCL (Tan et al., 2022b) employs prototype-wise contrastive learning for client-specific representations, promoting alignment with global and local prototypes to enhance knowledge sharing. MOON (Li et al.,
50
+
51
+ 2021a) minimizes the distance between local and global model representations while increasing the distance from the previous local model's representation. Different from model-wise of MOON and prototype-wise of FedPCL, our FedPGP introduces a novel prompt-wise contrastive methodology. In addition, unlike previous work focusing on aligning the global and local components, FedPGP treats representations of global and personalized prompts as negative pairs and representations of global and handcrafted prompts as positive pairs.
52
+
53
+ # 3. Proposed Method
54
+
55
+ In this section, we delve into the details of our proposed FedPGP, illustrated in Figure 1. FedPGP leverages CLIP knowledge-guidance and low-rank adaptation with an additional contrastive loss to balance generalization and personalization.
56
+
57
+ # 3.1. Preliminaries of Prompt Learning
58
+
59
+ Prompt learning methods (Zhou et al., 2022b;a) offer an efficient approach to adapting pre-trained models like CLIP to downstream tasks by training a part of the parameters in the prompt. Unlike the zero-shot transfer that utilizes a fixed word embedding $W = \{w_{1}, w_{2}, \dots, w_{l}\}$ mapped from a hand-crafted prompt (e.g., "a photo of a <label>"), prompt learning replaces a set of $M$ continuous context vectors $p = \{p_{1}, \dots, p_{M}\} \in \mathbb{R}^{d \times k}$ as the learnable prompt. Specifically, we use $p = \{p_{1}, \dots, p_{M}\}$ to replace $\{w_{2}, \dots, w_{M + 1}\}$ to be consistent with previous methods. Then the textual prompt of $k$ class can be reformulated as $P_{k} = \{w_{1}, p_{1}, \dots, p_{M}, w_{M + 2}, \dots, w_{l}\}$ and is fed into pretrained text encoder $g(\cdot)$ . Denote image encoder as $f(\cdot)$ , the prediction probability for each category of input image $x$ is computed through matching scores:
60
+
61
+ $$
62
+ p (\hat {y} = k | x) = \frac {\exp \left(\operatorname {s i m} \left(f (x) , g \left(P _ {k}\right)\right) / \tau\right)}{\sum_ {c = 1} ^ {K} \exp \left(\operatorname {s i m} \left(f (x) , g \left(P _ {c}\right)\right) / \tau\right)}, \tag {1}
63
+ $$
64
+
65
+ where $\mathrm{sim}(\cdot, \cdot)$ denotes a metric function (e.g., cosine similarity), $\hat{y}$ denotes the predicted label, $K$ denotes the number of classes, and $\tau$ denotes the temperature of Softmax. Then we optimize the learnable prompt by cross-entropy loss:
66
+
67
+ $$
68
+ \mathcal {L} _ {c e} = - \frac {1}{| \mathcal {D} |} \sum_ {(x, y) \in \mathcal {D}} \sum_ {k} y \log p (\hat {y} = k | x), \tag {2}
69
+ $$
70
+
71
+ where $y$ denotes the one-hot ground-truth annotation.
72
+
73
+ # 3.2. Federated Prompt Learning
74
+
75
+ Suppose there are $N$ clients and a central server. Each client $i$ holds local dataset $D_{i}$ with $n_i$ samples and $D = \{D_1, D_2, \dots, D_N\}$ represents the total dataset where each
76
+
77
+ Figure 1: Pipeline of FedPGP. On the left, clients send global prompts to the server for aggregation while retaining adaptation term locally. The right shows the workflow of CLIP knowledge-guidance and low-rank adaptation with an additional contrastive loss to balance generalization and personalization.
78
+ ![](images/53093823f9327e72ddf5c3cc286154b116a7c7ba7ecf21d4dc86ee3d5c8fe327.jpg)
79
+ : Learnable : Frozen : Knowledge-guidance $\otimes$ : Metric function $p_{G}$ : Global Prompt $p_1$ , $p_i$ , $p_N$ : Personalized Prompt
80
+
81
+ dataset is derived from a distinct data distribution $\mathcal{D}_i$ . Each client is equipped with a pre-trained CLIP model and a prompt learner in our federated learning setup. Let $C_t$ represent the set of selected clients participating in communication round $t$ . For each communication round $t$ , the selected clients initialize the global prompt with $p_G^{t-1}$ and perform local training $p_i^t$ through cross-entropy loss $\mathcal{L}_{ce}$ for $E$ local epoch, at $e$ local epoch the update of global prompt is:
82
+
83
+ $$
84
+ p _ {G, i} ^ {t, e} = p _ {G, i} ^ {t, e - 1} - \eta \nabla \mathcal {L} _ {c e} \left(p _ {G, i} ^ {t, e - 1}\right). \tag {3}
85
+ $$
86
+
87
+ After $E$ local epoch training, each client in $C_t$ uploads the global prompt $p_{G,i}^{t,E}$ to the server for aggregation:
88
+
89
+ $$
90
+ p _ {G} ^ {t} = \sum_ {i \in C _ {t}} \frac {n _ {i}}{\sum_ {j \in C _ {t}} n _ {j}} p _ {G, i} ^ {t, E}. \tag {4}
91
+ $$
92
+
93
+ The global prompt is aggregated in the context of federated learning, carrying the unique characteristics learned from other clients. The optimization objective of FPL can be formulated as:
94
+
95
+ $$
96
+ \min _ {p _ {G}} \sum_ {i = 1} ^ {N} \frac {n _ {i}}{\sum_ {j} n _ {j}} \mathcal {L} _ {c e} ^ {D _ {i}} \left(p _ {G}\right), \tag {5}
97
+ $$
98
+
99
+ where $\mathcal{L}_{ce}^{D_i}(p_G)$ represents the cross-entropy loss on dataset $D_{i}$ of client $i$ .
100
+
101
+ # 3.3. Generalization and Personalization for FPL
102
+
103
+ Previous research has discovered that prompted visual-language models, such as CoOp, overfit to the base classes and cannot generalize to the unseen class observed during training (Zhou et al., 2022a; Zhu et al., 2023; Ma et al., 2023). This phenomenon of overfitting to base classes implies that the prompt fails to capture more generalized elements that are crucial for recognizing a wider range of scenarios. On the contrary, the manually designed prompts adopted by the zero-shot CLIP are relatively generalizable. The problem of generalization in prompt vision-language models remains unresolved in FPL. The objective of the client's local training can be formulated as:
104
+
105
+ $$
106
+ \mathcal {L} _ {c e} ^ {D _ {i}} \left(p _ {G, i} ^ {t, e}\right) = - \frac {1}{| \mathcal {D} _ {i} |} \sum_ {(x, y) \in \mathcal {D} _ {i}} \sum_ {k} y \log p (\hat {y} = k | x). \tag {6}
107
+ $$
108
+
109
+ $\mathcal{L}_{ce}^{D_i}$ is to optimize the prompts for the client-specific task. Despite aggregating prompts in federated learning, overfitting to client-specific tasks remains a challenge. Leveraging the remarkable generalization capabilities of CLIP, FedPGP utilizes knowledge from CLIP to guide the global prompt to enhance generalization. Specifically, we obtain the representations of the handcrafted prompt $g(p_{C})$ of CLIP and the global prompt $g(p_{G})$ and align them through a metric function, such as cosine similarity. This knowledge-guidance from CLIP promotes the preservation of category-agnostic information within learnable global prompts, contributing to improve model generalization.
110
+
111
+ Due to data heterogeneity, it is difficult for a single global prompt to adapt to diverse local distributions. Different from tuning model parameters in traditional federated learning, FPL involves frozen client models and learnable prompts, leading to a distinct approach in adapting global prompt to local distributions. In FedPGP, the adaptation of global prompt $p_{G}$ to the client-specific prompt $p_{i}$ is achieved by introducing an additional adaptation term $\Delta p_{i}$ :
112
+
113
+ $$
114
+ p _ {i} = p _ {G} + \Delta p _ {i}, \tag {7}
115
+ $$
116
+
117
+ where $\Delta p_i\in \mathbb{R}^{d\times k}$ owns the same dimension of $p_G$ . Then the objective of federated learning can be formulated as:
118
+
119
+ $$
120
+ \min _ {p _ {G}, \left\{\Delta p _ {i} \right\} _ {i = 1} ^ {N}} \sum_ {i = 1} ^ {N} \frac {n _ {i}}{\sum_ {j} n _ {j}} \mathcal {L} _ {c e} ^ {D _ {i}} \left(p _ {G} + \Delta p _ {i}\right). \tag {8}
121
+ $$
122
+
123
+ # 3.4. Balance FPL's Generalization and Personalization
124
+
125
+ Previous research (Aghajanyan et al., 2020) has shown that pre-trained language models with lower intrinsic dimensions tend to exhibit better evaluation accuracy and lower relative generalization gaps across various tasks. Inspired by this, we propose that the prompt may also possess a low "intrinsic rank" during the adaptation process. To retain information derived from aggregation and knowledge-guidance of CLIP, our adaptation term is designed in a low-rank form instead of adding a full-rank term to overwrite the global prompt entirely. Specifically, the additional term is decomposed as:
126
+
127
+ $$
128
+ \Delta p _ {i} = U _ {i} V _ {i}. \tag {9}
129
+ $$
130
+
131
+ We decompose $\Delta p_i$ into multiplication between two low-rank matrices $U_i \in \mathbb{R}^{d \times b}$ and $V_i \in \mathbb{R}^{b \times k}$ , where $b$ denotes the bottleneck dimension of low-rank decomposition. Consequently, each client's personalized learnable prompt $p_i \in \mathbb{R}^{d \times k}$ can be reformulated as:
132
+
133
+ $$
134
+ p _ {i} = p _ {G} + \Delta p _ {i} = p _ {G} + U _ {i} V _ {i}, \tag {10}
135
+ $$
136
+
137
+ where $p_G \in \mathbb{R}^{d \times k}$ is the full-rank matrix and $\Delta p_i$ is the low-rank component of personalized $p_i$ . Consequently, the objective of FedPGP can be reformulated as:
138
+
139
+ $$
140
+ \min _ {p _ {G}, \left\{U _ {i}, V _ {i} \right\} _ {i = 1} ^ {N}} \sum_ {i = 1} ^ {N} \frac {n _ {i}}{\sum_ {j} n _ {j}} \mathcal {L} _ {c e} ^ {D _ {i}} \left(p _ {G} + U _ {i} V _ {i}\right). \tag {11}
141
+ $$
142
+
143
+ Employing the low-rank adaptation, FedPGP introduces personalization while preserving generalizability, striking a balance between the model's ability to generalize and personalize. Moreover, our objective is to go beyond the consensus knowledge communicated by clients through the global prompt and instead offer them personalized knowledge. To enable personalized prompts better access to client-specific
144
+
145
+ knowledge, we aim to increase dissimilarity between representations of global and personalized prompts for better personalization.
146
+
147
+ Summarizing the target we mentioned, our objective is 1) to bring close the representations of the handcrafted prompt $g(p_{C})$ of CLIP and the global prompt $g(p_{G})$ , and 2) to create a clear distinction between the representations of the global prompt $g(P_{G})$ and personalized prompt $g(P_{i})$ . Building upon the above analysis, We consider the global prompt representations $z_{G}$ with handcrafted prompt representation $z_{C}$ as positive pairs, while simultaneously treating them as negative pairs with personalized prompt representations $z_{i}$ . Consequently, we design an additional contrastive loss $\mathcal{L}_{con}$ for FedPGP to balance generalization and personalization:
148
+
149
+ $$
150
+ \mathcal {L} _ {\text {c o n}} = - \log \frac {\exp \left(\sin \left(z _ {G} , z _ {C}\right) / \tau\right)}{\exp \left(\sin \left(z _ {G} , z _ {C}\right) / \tau\right) + \exp \left(\sin \left(z _ {G} , z _ {i}\right) / \tau\right)}, \tag {12}
151
+ $$
152
+
153
+ where $\mathrm{sim}(\cdot, \cdot)$ denotes a metric function (e.g., cosine similarity). The contrastive loss can guide the global prompt to gain complementary knowledge from pre-trained CLIP representation and enable $\Delta p_i$ to learn personalized knowledge distinct from the global prompt. Consequently, our overall training objective thus becomes:
154
+
155
+ $$
156
+ \mathcal {L} = \mathcal {L} _ {c e} + \mu \mathcal {L} _ {c o n}, \tag {13}
157
+ $$
158
+
159
+ where $\mu \geq 0$ is a hyper-parameter. We offer comprehensive algorithmic details for FedPGP in Algorithm 1. For every communication round $t$ , the selected clients locally train both the global prompt $p_{G,i}$ and the low-rank adaptation term $\Delta p_i$ . After local training, the updated global prompt $p_{G,i}^{t,E}$ are sent to the server for aggregation, while the low-rank adaptation term $\Delta p_i$ is retained locally.
160
+
161
+ # 4. Experiments
162
+
163
+ In this section, we conduct extensive experiments aiming at evaluating the generalization and personalization capability of FedPGP in scenarios of heterogeneous data distribution.
164
+
165
+ # 4.1. Experimental Setup
166
+
167
+ Datasets and Data Heterogeneity. Following previous research (Guo et al., 2023a;b), we selected five datasets to investigate base-to-novel class generalization ability: OxfordPets (Parkhi et al., 2012), Flowers102 (Nilsback & Zisserman, 2008), DTD (Cimpoi et al., 2014), Caltech101 (Fei-Fei, 2004), Food101 (Bossard et al., 2014). We equally split the datasets into base and novel classes and utilized the pathological setting by assigning a specific number of non-overlapping base classes to each client. Each client model is trained on their local classes and evaluated on both local classes, base classes (classes seen on other clients), and
168
+
169
+ # Algorithm 1 FedPGP
170
+
171
+ Input: Communication rounds $T$ , local epochs $R$ , client number $N$ , local dataset $D_{i}$ , sample numbers $m_{i}$ , pretrained CLIP model text encoder $g(\cdot)$ and image encoder $f(\cdot)$ , class number $K$ , learning rate $\eta$ , the temperature of Softmax $\tau$ , hyper-parameter $\mu$ , and bottleneck number $b$ .
172
+
173
+ 1: Initialize parameters $p_i^0 = p_G^0 + \Delta p_i^0$
174
+ 2: for each communication rounds $t \in \{1, \dots, T\}$ do
175
+ 3: Sample client $C^t \in \{1, \dots, N\}$
176
+ 4: for each client $i \in C^t$ do
177
+ 5: Initialize $p_{G}^{t,0} = p_{G}^{t - 1}, p_{i}^{t,0} = p_{G}^{t,0} + \Delta p_{i}^{t - 1}$
178
+ 6: for each local epoch $e \in \{1, \dots, E\}$ do
179
+ 7: Sample a mini-batch $B_{i} \in D_{i}$
180
+ 8: Obtain the image feature $f(x)(x \in B_i)$ through image encoder $f(\cdot)$
181
+ 9: Obtain the global text feature $g(P_G^{t,e})$ , the personalized text feature $g(P_i^{t,e})$ , the CLIP general text feature $g(P_C)$ through text encoder $g(\cdot)$
182
+ 10: Calculate the cross-entropy loss $\mathcal{L}_{ce}$ , the contrastive loss $\mathcal{L}_{con}$ according to (12) and the optimization objective $\mathcal{L} = \mathcal{L}_{ce} + \mu \mathcal{L}_{con}$
183
+ 11: Update prompts $p_{G,i}^{t,e}\gets p_G^{t,e - 1} - \eta \nabla \mathcal{L}_{D_i}$
184
+ 12: end for
185
+ 13: end for
186
+ 14: Aggregate and calculate the global prompt $p_{G}^{t} = \sum_{i\in C_{t}}\frac{n_{i}}{\sum_{j\in C_{t}}n_{j}} p_{G,i}^{t,E}$
187
+ 15: end for
188
+ 16: return $p_i = p_G + \Delta p_i$
189
+
190
+ novel classes (unseen in the whole training process). For domain generalization, we evaluate FedPGP on two datasets with multi-domains: DomainNet (Peng et al., 2019) with six domains and Office-Caltech10 (Gong et al., 2012) with four domains. Similar to previous research (Nguyen et al., 2022; Zhang et al., 2021), we utilize the leave-one-domain-out validation strategy. Each client participating in the federated learning system is assigned data from one of the distinct domains. We pick one domain to serve as the target domain and use the rest as source domains. Each client possesses a distinct source domain for training and then tests its model generalization ability on the whole target domain.
191
+
192
+ For evaluation of personalization, beyond the datasets used in base-to-novel class generalization, we employed two additional benchmark datasets: CIFAR-10 (Krizhevsky et al., 2010) and CIFAR-100 (Krizhevsky et al., 2009). We applied the Dirichlet Distribution, as in previous work where the datasets were partitioned randomly among clients using a symmetric Dirichlet distribution. Besides, we employ the Pathlogicacl setting the same as in base-to-novel class generalization with non-overlapping classes across clients. The Appendix Section A.1 contains comprehensive information
193
+
194
+ regarding each dataset and provides additional details about the Non-IID settings.
195
+
196
+ Baselines. For generalization, we compare FedPGP with (i) Zero-shot CLIP (Radford et al., 2021) with hand-crafted text prompt template, e.g., "a photo of a [class]" (ii) CoOp (Zhou et al., 2022b) with learnable prompt vectors replacing hand-crafted text prompts trained on each client locally. (iii) PromptFL (Guo et al., 2023b) with unified prompt vectors learned across clients via FedAvg (McMahan et al., 2017) collectively. For personalization, we consider (iv) pFedPrompt (Guo et al., 2023a) which learns a unified prompt with personalized attention modules for each client and four baselines introduced in (Guo et al., 2023a), which are derived from traditional personalized federated learning techniques: (v) PromptFL+FT (Cheng et al., 2021), (vi) Prompt+Per (Arivazhagan et al., 2019), (vii) Prompt+Prox (Li et al., 2020) and Prompt+AMP (Huang et al., 2021).
197
+
198
+ Implementation Details. All methods presented in this paper are based on a frozen CLIP using two backbones, ResNet50 (He et al., 2016) and ViT-B16 (Dosovitskiy et al., 2020), defaulting to ViT-B16 if not explicitly specified. In federated learning, we set the client's local training epoch $E = 1$ and communication round $T = 150$ with $N = 100$ clients and partition rate $r = 10\%$ for CIFAR-10/CIFAR-100 datasets. Besides, we consider training epoch $E = 2$ and communication round $T = 25$ with client numbers $N = 10$ and a full partition rate, i.e., $r = 100\%$ for other datasets. The low-rank decomposition bottleneck is set to $b = 8$ , and the hyperparameter $\mu$ for the contrastive loss is set to 1. We employ cosine similarity as the metric function in contrastive loss. For the setting of learnable prompts, the length of prompt vectors $p$ is 16 with a dimension of 512, token position is "end" with "random" initialization. Apart from the few-shot learning, batch sizes are set to 32 during training and 100 during testing. Additional implementation details can be found in the Appendix Section A.2.
199
+
200
+ # 4.2. Performance Evaluation
201
+
202
+ Base-to-Novel Class Generalization. We evaluated the performance of FedPGP against baselines on their local classes, base classes, and novel classes respectively. We present the harmonic mean (HM) of these three accuracies to demonstrate the overall performance. The experiment results are summarized in Table 1. As indicated in Table 1(a), FedPGP achieves the best performances in local classes, highlighting its exceptional personalization capability. Moreover, FedPGP outperforms other methods in both base classes and the harmonic meanwhile also exhibiting the second-best performance in novel classes. These results show its exceptional capacity for balancing personalization and generalization. CoOp achieves the second-best performance in local classes owing to the pathological setting. However, it
203
+
204
+ Table 1: Accuracy comparison (%) on clients' local classes and Base-to-novel generalization.
205
+
206
+ (a) Average over 5 datasets.
207
+
208
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>79.18</td><td>79.83</td><td>83.25</td><td>80.72</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>94.28</td><td>69.40</td><td>73.16</td><td>77.55</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>90.00</td><td>85.65</td><td>78.53</td><td>84.46</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>89.84</td><td>85.04</td><td>77.40</td><td>83.78</td></tr><tr><td>FedMaPLe</td><td>90.81</td><td>84.90</td><td>81.49</td><td>85.56</td></tr><tr><td>FedCoCoOp</td><td>90.01</td><td>85.08</td><td>81.4</td><td>85.35</td></tr><tr><td>FedPGP</td><td>95.67</td><td>85.69</td><td>81.75</td><td>87.33</td></tr></table>
209
+
210
+ (c) Flowers102.
211
+
212
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>67.69</td><td>68.85</td><td>77.23</td><td>71.01</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>96.39</td><td>55.91</td><td>64.47</td><td>68.54</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>94.32</td><td>76.19</td><td>70.1</td><td>78.96</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>92.73</td><td>73.06</td><td>66.09</td><td>75.75</td></tr><tr><td>FedMaPLe</td><td>94.89</td><td>77.49</td><td>70.46</td><td>79.71</td></tr><tr><td>FedCoCoOp</td><td>94.57</td><td>77.88</td><td>74.39</td><td>81.4</td></tr><tr><td>FedPGP</td><td>99.68</td><td>78.48</td><td>75.11</td><td>83.13</td></tr></table>
213
+
214
+ (e) Caltech101.
215
+
216
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>95.72</td><td>96.96</td><td>93.99</td><td>95.54</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>99.39</td><td>86.37</td><td>86.12</td><td>90.22</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>97.04</td><td>97.27</td><td>92.79</td><td>95.65</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>96.76</td><td>97.34</td><td>91.99</td><td>95.30</td></tr><tr><td>FedMaPLe</td><td>96.47</td><td>96.7</td><td>94.32</td><td>95.82</td></tr><tr><td>FedCoCoOp</td><td>96.65</td><td>95.45</td><td>92.46</td><td>94.82</td></tr><tr><td>FedPGP</td><td>99.46</td><td>96.09</td><td>93.62</td><td>96.33</td></tr></table>
217
+
218
+ (b) OxfordPets.
219
+
220
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>89.34</td><td>89.31</td><td>96.86</td><td>91.70</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>95.33</td><td>82.51</td><td>92.92</td><td>89.90</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>95.12</td><td>95.16</td><td>91.89</td><td>94.03</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>95.95</td><td>95.24</td><td>91.25</td><td>94.10</td></tr><tr><td>FedMaPLe</td><td>93.75</td><td>95.53</td><td>97.45</td><td>95.55</td></tr><tr><td>FedCoCoOp</td><td>96.02</td><td>96.01</td><td>97.25</td><td>96.42</td></tr><tr><td>FedPGP</td><td>96.65</td><td>95.87</td><td>97.33</td><td>96.61</td></tr></table>
221
+
222
+ (d) DTD.
223
+
224
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>53.79</td><td>54.62</td><td>58.20</td><td>55.47</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>86.38</td><td>39.2</td><td>37.65</td><td>47.13</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>72.71</td><td>71.41</td><td>49.28</td><td>62.44</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>74.07</td><td>71.84</td><td>50.20</td><td>63.37</td></tr><tr><td>FedMaPLe</td><td>78.37</td><td>65.35</td><td>55.85</td><td>65.26</td></tr><tr><td>FedCoCoOp</td><td>72.61</td><td>68.20</td><td>54.4</td><td>64.08</td></tr><tr><td>FedPGP</td><td>89.07</td><td>69.65</td><td>55.25</td><td>68.15</td></tr></table>
225
+
226
+ (f) Food101.
227
+
228
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>89.38</td><td>89.39</td><td>89.98</td><td>89.58</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>93.92</td><td>82.99</td><td>84.62</td><td>86.92</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>90.79</td><td>88.22</td><td>88.6</td><td>89.19</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>89.68</td><td>87.72</td><td>87.49</td><td>88.29</td></tr><tr><td>FedMaPLe</td><td>90.59</td><td>89.43</td><td>89.38</td><td>89.80</td></tr><tr><td>FedCoCoOp</td><td>90.18</td><td>87.86</td><td>88.51</td><td>88.84</td></tr><tr><td>FedPGP</td><td>93.51</td><td>88.37</td><td>88.44</td><td>90.04</td></tr></table>
229
+
230
+ Table 2: The average classification accuracy using leave-one-domain-out validation on Offica-Caltech10 and DomainNet.
231
+
232
+ <table><tr><td rowspan="2">Datasets Domains</td><td colspan="5">Office-Caltech10</td><td colspan="7">DomainNet</td></tr><tr><td>A</td><td>C</td><td>D</td><td>W</td><td>Avg</td><td>C</td><td>I</td><td>P</td><td>Q</td><td>R</td><td>S</td><td>Avg.</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>19.40</td><td>18.32</td><td>21.87</td><td>18.59</td><td>19.55</td><td>49.89</td><td>47.23</td><td>53.61</td><td>32.10</td><td>48.19</td><td>50.79</td><td>46.96</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>41.54</td><td>15.55</td><td>56.04</td><td>43.60</td><td>39.18</td><td>83.42</td><td>53.28</td><td>80.80</td><td>49.41</td><td>75.18</td><td>82.88</td><td>70.83</td></tr><tr><td>PromptFL (Guo et al., 2023b)</td><td>96.34</td><td>91.57</td><td>97.96</td><td>98.30</td><td>96.04</td><td>95.28</td><td>73.72</td><td>94.50</td><td>61.60</td><td>95.72</td><td>95.43</td><td>86.04</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>96.13</td><td>92.52</td><td>97.57</td><td>97.96</td><td>96.05</td><td>95.47</td><td>69.44</td><td>94.95</td><td>61.24</td><td>75.18</td><td>95.41</td><td>81.95</td></tr><tr><td>FedPGP</td><td>96.55</td><td>91.92</td><td>98.93</td><td>98.75</td><td>96.54</td><td>96.45</td><td>74.46</td><td>95.43</td><td>62.12</td><td>96.06</td><td>96.05</td><td>86.76</td></tr></table>
233
+
234
+ cannot effectively generalize its performance to other base classes and new classes. When it comes to FPL, PromptFL and PromptProx sacrifice the personalization capability in local classes to gain better generalization ability.
235
+
236
+ Leave-One-Domain-Out Generalization. Table 2 shows the average classification accuracy with leave-one-domain-
237
+
238
+ out validation on Office-Caltech10 and DomainNet. As we can see, FedPGP achieves the highest average accuracy and outperforms all baselines across nearly all target domains. Through local prompt tuning, CoOp's domain generalization capabilities generally surpass those of CLIP. We notice that FPL enhances the model's domain generalization power, marking a significant improvement compared
239
+
240
+ Table 3: Accuracy comparison (%) on the Pathological Non-IID setting over 10 clients.
241
+
242
+ <table><tr><td>Methods</td><td>OxfordPets</td><td>Flowers102</td><td>DTD</td><td>Caltech101</td><td>Food101</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>83.21±1.30</td><td>70.14±0.76</td><td>44.23±0.63</td><td>87.37±0.44</td><td>70.43±2.42</td></tr><tr><td>PromptFL (Zhou et al., 2022b)</td><td>90.79±0.61</td><td>72.80±1.14</td><td>54.11±0.22</td><td>89.70±1.99</td><td>77.31±1.64</td></tr><tr><td>PromptFL+FT (Cheng et al., 2021)</td><td>91.23±0.50</td><td>72.31±0.91</td><td>53.74±1.36</td><td>89.70±0.25</td><td>77.16±1.56</td></tr><tr><td>Prompt+PER (Arivazhagan et al., 2019)</td><td>89.50±1.62</td><td>72.11±1.35</td><td>50.23±0.82</td><td>86.72±1.45</td><td>71.29±1.87</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>89.24±0.41</td><td>66.40±0.29</td><td>44.26±1.11</td><td>89.41±0.55</td><td>76.24±1.94</td></tr><tr><td>Prompt+AMP (Huang et al., 2021)</td><td>80.21±0.44</td><td>69.10±0.13</td><td>47.16±0.92</td><td>87.31±1.60</td><td>74.48±1.71</td></tr><tr><td>pFedPrompt (Guo et al., 2023a)</td><td>91.84±0.41</td><td>86.46±0.15</td><td>77.14±0.09</td><td>96.54±1.31</td><td>92.26±1.34</td></tr><tr><td>FedPGP</td><td>98.96±0.42</td><td>99.29±0.03</td><td>91.52±0.41</td><td>98.90±0.19</td><td>95.52±0.15</td></tr></table>
243
+
244
+ Table 4: The detailed classification accuracy using leave-one-domain-out validation on Offica-Caltech10 dataset.
245
+
246
+ <table><tr><td rowspan="2">Datasets
247
+ Source Domains</td><td colspan="6">Office-Caltech10</td></tr><tr><td></td><td>Amazon</td><td>Caltech</td><td>DSLR</td><td>Webcam</td><td>Avg.</td></tr><tr><td rowspan="4">CoOp (Zhou et al., 2022b)</td><td>Amazon</td><td>—</td><td>89.03</td><td>16.49</td><td>19.1</td><td>41.54±41.15</td></tr><tr><td>Caltech</td><td>26.89</td><td>—</td><td>5.87</td><td>13.89</td><td>15.55±10.61</td></tr><tr><td>DSLR</td><td>64.96</td><td>86.62</td><td>—</td><td>16.56</td><td>56.04±35.87</td></tr><tr><td>Webcam</td><td>50.16</td><td>76.94</td><td>3.72</td><td>—</td><td>43.6±37.05</td></tr><tr><td rowspan="4">FedPGP</td><td>Amazon</td><td>—</td><td>96.45</td><td>96.03</td><td>97.18</td><td>96.55±0.58</td></tr><tr><td>Caltech</td><td>94.66</td><td>—</td><td>86.92</td><td>93.59</td><td>91.92±4.19</td></tr><tr><td>DSLR</td><td>98.08</td><td>99.36</td><td>—</td><td>99.36</td><td>98.93±0.74</td></tr><tr><td>Webcam</td><td>98.98</td><td>98.98</td><td>98.3</td><td>—</td><td>98.75±0.39</td></tr></table>
248
+
249
+ to the local approach. Moreover, FedPGP enhances the model's ability to generalize while accomplishing personalization, which proves the effectiveness of our framework's design. We provide the detailed classification accuracy on each source domain within the Office-Caltech10 dataset in Table 4. Additional experiment results on specific client domain generalization are available in the Appendix Section B.1.
250
+
251
+ Evaluation on Personalization. We report the performance of FedPGP against baselines in Table 3, 5. To facilitate comparison, we present the results in Table 3 utilizing ResNet50 as the backbone, aligning with the setting in (Guo et al., 2023a). As shown in Table 3, our FedPGP demonstrates significantly superior performance compared to baseline methods across all datasets. This confirms that our framework's ability to personalize effectively is successful in addressing extreme non-IID scenarios. Table 5 shows the results of FedPGP and baseline methods on CIFAR-10 and CIFAR100 datasets with Dirichlet Non-IID setting over 100 clients with $10\%$ partition. In the scenario with Dirichlet settings and the substantial number of clients, our approach FedPGP consistently demonstrates superior performance compared to the baseline methods. This further emphasizes the effectiveness of our approach.
252
+
253
+ Table 5: Accuracy comparison (\%) on the Dirichlet Non-IID setting in CIFAR-10 and CIFAR-100 over 100 clients.
254
+
255
+ <table><tr><td>Methods</td><td>CIFAR-10</td><td>CIFAR-100</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>87.52±0.56</td><td>64.83±0.49</td></tr><tr><td>CoOp (Zhou et al., 2022b)</td><td>93.13±0.34</td><td>74.78±0.41</td></tr><tr><td>PromptFL (Zhou et al., 2022b)</td><td>92.32±0.79</td><td>73.72±0.61</td></tr><tr><td>Prompt+Prox (Li et al., 2020)</td><td>91.79±0.46</td><td>71.08±0.89</td></tr><tr><td>FedPGP</td><td>94.82±0.37</td><td>77.44±0.15</td></tr></table>
256
+
257
+ # 4.3. Ablation Study
258
+
259
+ Effect of Parameter $\mu$ of Contrastive Loss In this subsection, we investigated the impact of the contrastive loss parameter $\mu$ in a Pathological Non-IID setting across four datasets with varying shot numbers. The results are presented in Figure 2, which shows an improvement in test accuracy with an increase in the number of shots. Upon observation, optimal results are mostly achieved with $\mu$ set to 1 in experiments, leading to our adoption of $\mu = 1$ for other experiments.
260
+
261
+ Effective of Low-rank Adaption In this subsection, we explored the effectiveness of low-rank adaptation by comparing it with full-rank adaptation. The results of the two
262
+
263
+ ![](images/493e1b81f3de8827c62e318df93cde72aeed5048611a62bf42b72aed482ea39a.jpg)
264
+ Figure 2: Quantitative comparisons on four datasets across varying shot numbers and parameter $\mu$ of contrastive loss in FedPGP over 10 clients.
265
+
266
+ Table 6: Accuracy (%) of ablation study on adaption and additional loss for clients' local classes and Base-to-novel generalization.
267
+
268
+ <table><tr><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td>FedPGP w/o Positive</td><td>94.63</td><td>84.68</td><td>77.75</td><td>85.13</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>98.57</td><td>48.00</td><td>63.40</td><td>64.17</td></tr><tr><td>FedPGP</td><td>95.67</td><td>85.69</td><td>81.75</td><td>87.33</td></tr></table>
269
+
270
+ methods are shown in Table 6. As we can see, full-rank adaptation achieves the best performance on local classes but it completely overwrites the global prompt, resulting in a loss of category-agnostic knowledge and the generalization capacity. Although low-rank adaptation performance on the local class is below the full-rank adaptation, it significantly outperforms the full-rank adaptation in terms of base-to-novel generalization.
271
+
272
+ Effective of Contrastive Loss We demonstrate the efficacy of contrastive loss in achieving balance by separately testing the generalization ability of the model without positive pairs and the personalization ability of the model with negative pairs. Table 6 shows the performance of the model without knowledge-guidance from CLIP (positive pairs), compared to the performance when the contrastive loss is employed. FedPGP outperforms the model without knowledge-guidance across all three accuracies and the harmonic mean. Table 7 shows the performance of the model without pushing the representation of global prompt and personalized prompt (negative pairs), compared to the performance when the contrastive loss is employed. The results show the negative pairs enhance the model's ability to personalize for Non-IID data distribution in federated prompt learning. In general, our ablation study on contrastive loss demonstrates its ability to balance personalization and generalization in federated prompt learning.
273
+
274
+ Table 7: Accuary (%) of ablation study on additional loss for personalization.
275
+
276
+ <table><tr><td>Methods</td><td>OxfordPets</td><td>Flowers102</td><td>DTD</td><td>Caltech101</td><td>Food101</td></tr><tr><td>FedPGP w/o Negative</td><td>97.65±0.20</td><td>98.63±0.11</td><td>90.78±0.31</td><td>98.48±0.17</td><td>94.72±0.18</td></tr><tr><td>FedPGP</td><td>98.96±0.42</td><td>99.29±0.03</td><td>91.52±0.41</td><td>98.90±0.19</td><td>95.52±0.15</td></tr></table>
277
+
278
+ # 5. Conclusion
279
+
280
+ In this paper, we propose a novel approach named FedPGP, which represents a pioneering effort to harmonize personalization and generalization in federated prompt learning. In our approach, each client gains generalization capabilities through knowledge-guidance of CLIP and acquires personalization abilities by adapting the global prompt to a personalized prompt. Further, with low-rank decomposition adaptation and an extra contrastive loss, FedPGP learns a personalized prompt for each client in heterogeneous federated scenarios while preserving the remarkable generalization capacity in pre-trained Vision-Language models. Extensive experiments on various datasets explored base-to-novel generalization in both unseen categories and domains, showing the superiority of FedPGP in balancing generalization and personalization. In future work, we aim to explore the theoretical foundations of low-rank adaptation in federated prompt learning.
281
+
282
+ # Acknowledgement
283
+
284
+ This work was supported by NSFC (No.62303319), Shanghai Sailing Program (22YF1428800, 21YF1429400), Shanghai Local College Capacity Building Program (23010503100), Shanghai Frontiers Science Center of Human-centered Artificial Intelligence (ShangHAI), MoE Key Laboratory of Intelligent Perception and Human Machine Collaboration (ShanghaiTech University), and Shanghai Engineering Research Center of Intelligent Vision and Imaging.
285
+
286
+ # Impact Statement
287
+
288
+ There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here.
289
+
290
+ # References
291
+
292
+ Aghajanyan, A., Zettlemoyer, L., and Gupta, S. Intrinsic dimensionality explains the effectiveness of language model fine-tuning. arXiv preprint arXiv:2012.13255, 2020.
293
+ Arivazhagan, M. G., Aggarwal, V., Singh, A. K., and Choudhary, S. Federated learning with personalization layers. arXiv preprint arXiv:1912.00818, 2019.
294
+ Bossard, L., Guillaumeun, M., and Van Gool, L. Food-101-mining discriminative components with random forests. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part VI 13, pp. 446-461. Springer, 2014.
295
+ Cai, Z., Shi, Y., Huang, W., and Wang, J. Fed- $\mathrm{CO}_{2}$ : Cooperation of online and offline models for severe data heterogeneity in federated learning. Advances in Neural Information Processing Systems, 36, 2024.
296
+ Cao, Y.-T., Shi, Y., Yu, B., Wang, J., and Tao, D. Knowledge-aware federated active learning with non-iid data. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 22279-22289, 2023.
297
+ Chen, H.-Y. and Chao, W.-L. On bridging generic and personalized federated learning for image classification. arXiv preprint arXiv:2107.00778, 2021.
298
+ Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pp. 1597-1607. PMLR, 2020a.
299
+ Chen, X., Fan, H., Girshick, R., and He, K. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b.
300
+ Cheng, G., Chadha, K., and Duchi, J. Fine-tuning is fine in federated learning. arXiv preprint arXiv:2108.07313, 3, 2021.
301
+ Cimpoi, M., Maji, S., Kokkinos, I., Mohamed, S., and Vedaldi, A. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3606-3613, 2014.
302
+ Collins, L., Hassani, H., Mokhtari, A., and Shakkottai, S. Exploiting shared representations for personalized federated learning. In International conference on machine learning, pp. 2089-2099. PMLR, 2021.
303
+
304
+ Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
305
+ Fei-Fei, L. Learning generative visual models from few training examples. In Workshop on Generative-Model Based Vision, IEEE Proc. CVPR, 2004, 2004.
306
+ Feng, C.-M., Li, B., Xu, X., Liu, Y., Fu, H., and Zuo, W. Learning Federated Visual Prompt in Null Space for MRI Reconstruction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8064-8073, 2023.
307
+ Gong, B., Shi, Y., Sha, F., and Grauman, K. Geodesic flow kernel for unsupervised domain adaptation. In 2012 IEEE conference on computer vision and pattern recognition, pp. 2066-2073. IEEE, 2012.
308
+ Guo, T., Guo, S., and Wang, J. pFedPrompt: Learning Personalized Prompt for Vision-Language Models in Federated Learning. In Proceedings of the ACM Web Conference 2023, pp. 1364-1374, 2023a.
309
+ Guo, T., Guo, S., Wang, J., Tang, X., and Xu, W. PromptFL: Let federated participants cooperatively learn prompts instead of models-federated learning in age of foundation model. IEEE Transactions on Mobile Computing, 2023b.
310
+ He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
311
+ Huang, W., Shi, Y., Cai, Z., and Suzuki, T. Understanding convergence and generalization in federated learning through feature learning theory. In The Twelfth International Conference on Learning Representations, 2023.
312
+ Huang, Y., Chu, L., Zhou, Z., Wang, L., Liu, J., Pei, J., and Zhang, Y. Personalized cross-silo federated learning on non-iid data. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pp. 7865-7873, 2021.
313
+ Hyeon-Woo, N., Ye-Bin, M., and Oh, T.-H. Fedpara: Low-rank hadamard product for communication-efficient federated learning. arXiv preprint arXiv:2108.06098, 2021.
314
+ Jeong, W. and Hwang, S. J. Factorized-FL: Personalized Federated Learning with Parameter Factorization & Similarity Matching. Advances in Neural Information Processing Systems, 35:35684-35695, 2022.
315
+ Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q., Sung, Y.-H., Li, Z., and Duerig, T. Scaling up visual and vision-language representation learning with
316
+
317
+ noisy text supervision. In International conference on machine learning, pp. 4904-4916. PMLR, 2021.
318
+ Khattak, M. U., Rasheed, H., Maaz, M., Khan, S., and Khan, F. S. Maple: Multi-modal prompt learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19113-19122, 2023a.
319
+ Khattak, M. U., Wasim, S. T., Naseer, M., Khan, S., Yang, M.-H., and Khan, F. S. Self-regulating Prompts: Foundational model adaptation without forgetting. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15190-15200, 2023b.
320
+ Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009.
321
+ Krizhevsky, A., Nair, V., and Hinton, G. Cifar-10 (canadian institute for advanced research). URL http://www.cs.toronto.edu/kriz/cifar.html, 5(4):1, 2010.
322
+ Li, H., Cai, Z., Wang, J., Tang, J., Ding, W., Lin, C.-T., and Shi, Y. FedTP: Federated Learning by Transformer Personalization. IEEE Transactions on Neural Networks and Learning Systems, 2023.
323
+ Li, H., Huang, W., Wang, J., and Shi, Y. Global and local prompts cooperation via optimal transport for federated learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024.
324
+ Li, Q., He, B., and Song, D. Model-contrastive federated learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10713-10722, 2021a.
325
+ Li, T., Sahu, A. K., Zaheer, M., Sanjabi, M., Talwalkar, A., and Smith, V. Federated optimization in heterogeneous networks. Proceedings of Machine learning and systems, 2:429-450, 2020.
326
+ Li, T., Hu, S., Beirami, A., and Smith, V. Ditto: Fair and robust federated learning through personalization. In International Conference on Machine Learning, pp. 6357-6368. PMLR, 2021b.
327
+ Li, X., Jiang, M., Zhang, X., Kamp, M., and Dou, Q. FedBN: Federated learning on non-iid features via local batch normalization. arXiv preprint arXiv:2102.07623, 2021c.
328
+ Liu, Q., Chen, C., Qin, J., Dou, Q., and Heng, P.-A. FedDG: Federated domain generalization on medical image segmentation via episodic learning in continuous frequency space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1013-1023, 2021.
329
+
330
+ Ma, C., Liu, Y., Deng, J., Xie, L., Dong, W., and Xu, C. Understanding and mitigating overfitting in prompt tuning for vision-language models. IEEE Transactions on Circuits and Systems for Video Technology, 2023.
331
+ Ma, X., Zhang, J., Guo, S., and Xu, W. Layer-wised model aggregation for personalized federated learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10092-10101, 2022.
332
+ Mansour, Y., Mohri, M., Ro, J., and Suresh, A. T. Three approaches for personalization with applications to federated learning. arXiv preprint arXiv:2002.10619, 2020.
333
+ McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pp. 1273-1282. PMLR, 2017.
334
+ Mu, X., Shen, Y., Cheng, K., Geng, X., Fu, J., Zhang, T., and Zhang, Z. FedProc: Prototypical contrastive federated learning on non-iid data. Future Generation Computer Systems, 143:93-104, 2023.
335
+ Nguyen, A. T., Torr, P., and Lim, S. N. FedSR: A simple and effective domain generalization method for federated learning. Advances in Neural Information Processing Systems, 35:38831-38843, 2022.
336
+ Nilsback, M.-E. and Zisserman, A. Automated flower classification over a large number of classes. In 2008 Sixth Indian conference on computer vision, graphics & image processing, pp. 722-729. IEEE, 2008.
337
+ Oh, J., Kim, S., and Yun, S.-Y. FedBABU: Towards enhanced representation for federated image classification. arXiv preprint arXiv:2106.06042, 2021.
338
+ Parkhi, O. M., Vedaldi, A., Zisserman, A., and Jawahar, C. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pp. 3498-3505. IEEE, 2012.
339
+ Peng, X., Bai, Q., Xia, X., Huang, Z., Saenko, K., and Wang, B. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 1406-1415, 2019.
340
+ Qiu, C., Li, X., Mummadi, C. K., Ganesh, M. R., Li, Z., Peng, L., and Lin, W.-Y. Text-driven Prompt Generation for Vision-Language Models in Federated Learning. arXiv preprint arXiv:2310.06123, 2023.
341
+ Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
342
+
343
+ Sattler, F., Müller, K.-R., and Samek, W. Clustered federated learning: Model-agnostic distributed multitask optimization under privacy constraints. IEEE transactions on neural networks and learning systems, 32(8):3710-3722, 2020.
344
+ Shamsian, A., Navon, A., Fetaya, E., and Chechik, G. Personalized federated learning using hypernetworks. In International Conference on Machine Learning, pp. 9489-9502. PMLR, 2021.
345
+ Su, S., Yang, M., Li, B., and Xue, X. Cross-domain federated adaptive prompt tuning for clip. arXiv preprint arXiv:2211.07864, 2022.
346
+ T Dinh, C., Tran, N., and Nguyen, J. Personalized federated learning with moreau envelopes. Advances in Neural Information Processing Systems, 33:21394-21405, 2020.
347
+ Tan, A. Z., Yu, H., Cui, L., and Yang, Q. Towards personalized federated learning. IEEE Transactions on Neural Networks and Learning Systems, 2022a.
348
+ Tan, Y., Long, G., Ma, J., Liu, L., Zhou, T., and Jiang, J. Federated learning from pre-trained models: A contrastive learning approach. Advances in Neural Information Processing Systems, 35:19332-19344, 2022b.
349
+ Wang, K., Mathews, R., Kiddon, C., Eichner, H., Beaufays, F., and Ramage, D. Federated evaluation of on-device personalization. arXiv preprint arXiv:1910.10252, 2019.
350
+ Wei, G., Wang, F., Shah, A., and Chellappa, R. Dual prompt tuning for domain-aware federated learning. arXiv preprint arXiv:2310.03103, 2023.
351
+ Xie, Z., Zhang, Z., Cao, Y., Lin, Y., Bao, J., Yao, Z., Dai, Q., and Hu, H. Simmim: A simple framework for masked image modeling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9653-9663, 2022.
352
+ Yang, F.-E., Wang, C.-Y., and Wang, Y.-C. F. Efficient model personalization in federated learning via client-specific prompt generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 19159-19168, 2023.
353
+ Zhang, L., Lei, X., Shi, Y., Huang, H., and Chen, C. Federated learning with domain generalization. arXiv preprint arXiv:2111.10487, 2021.
354
+ Zhang, L., Shi, Y., Chang, Y.-C., and Lin, C.-T. Federated fuzzy neural network with evolutionary rule learning. IEEE Transactions on Fuzzy Systems, 2022.
355
+ Zhang, M., Sapra, K., Fidler, S., Yeung, S., and Alvarez, J. M. Personalized federated learning with first order
356
+
357
+ model optimization. arXiv preprint arXiv:2012.08565, 2020.
358
+ Zhao, H., Du, W., Li, F., Li, P., and Liu, G. Reduce communication costs and preserve privacy: Prompt tuning method in federated learning. arXiv preprint arXiv:2208.12268, 2022.
359
+ Zhou, K., Yang, J., Loy, C. C., and Liu, Z. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16816-16825, 2022a.
360
+ Zhou, K., Yang, J., Loy, C. C., and Liu, Z. Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9):2337-2348, 2022b.
361
+ Zhu, B., Niu, Y., Han, Y., Wu, Y., and Zhang, H. Prompt-aligned gradient for prompt tuning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15659-15669, 2023.
362
+
363
+ # A. Experimental Details
364
+
365
+ # A.1. Dataset Setup
366
+
367
+ For our evaluation, we've chosen nine diverse visual classification datasets as our benchmark. Table 8 provides a detailed overview, including information on original tasks, class numbers, training and testing sample sizes, and domain counts. In datasets with multiple domains, we utilize the well-established Office-Caltech10 benchmark, featuring four domains: Amazon, Caltech, DSLR, and WebCam. These domains capture variations arising from different camera devices and real-world environments. Additionally, we leverage DomainNet, a large-scale dataset comprising six domains: Clipart, Infograph, Painting, Quickdraw, Real, and Sketch. We focus on training with 10 selected classes from each dataset. Visual examples of raw instances from these two multi-domain datasets can be found in Figure 3.
368
+
369
+ Table 8: Statistical details of datasets used in experiments.
370
+
371
+ <table><tr><td>Dataset</td><td>Classes</td><td>Train</td><td>Test</td><td>Domains</td><td>Task</td></tr><tr><td>OxfordPnts (Parkhi et al., 2012)</td><td>37</td><td>2,944</td><td>3,669</td><td>1</td><td>Fine-grained pets recognition</td></tr><tr><td>Flowers102 (Nilsback &amp; Zisserman, 2008)</td><td>102</td><td>4,093</td><td>2,463</td><td>1</td><td>Fine-grained flowers recognition</td></tr><tr><td>DTD (Cimpoi et al., 2014)</td><td>47</td><td>2,820</td><td>1,692</td><td>1</td><td>Texture recognition</td></tr><tr><td>Caltech101 (Fei-Fei, 2004)</td><td>100</td><td>4,128</td><td>2,465</td><td>1</td><td>Object recognition</td></tr><tr><td>Food101 (Bossard et al., 2014)</td><td>101</td><td>50,500</td><td>30,300</td><td>1</td><td>Fine-grained food recognition</td></tr><tr><td>CIFAR10 (Krizhevsky et al., 2009)</td><td>10</td><td>50,000</td><td>10,000</td><td>1</td><td>Image Classification</td></tr><tr><td>CIFAR100 (Krizhevsky et al., 2009)</td><td>100</td><td>50,000</td><td>10,000</td><td>1</td><td>Image Classification</td></tr><tr><td>DomainNet (Peng et al., 2019)</td><td>10</td><td>18278</td><td>4573</td><td>6</td><td>Image recognition</td></tr><tr><td>Office-Caltech10 (Gong et al., 2012)</td><td>10</td><td>2025</td><td>508</td><td>4</td><td>Image recognition</td></tr></table>
372
+
373
+ ![](images/fbbfb93291e68696f1f5b82b01380fc37b23fa3d0b81b5a7a730026bbfcfcdd6.jpg)
374
+ (a) DomainNet
375
+ Amazon
376
+
377
+ ![](images/a962b92bc2af952edac82ea8cb35669f94e3efd9f1d748af32666070bde11b9f.jpg)
378
+ (b) Office-Caltech10
379
+ Figure 3: Visual examples of raw instances from two datasets with multiple domains: "Bird" in DomainNet (left) and "Bike" in Office-Caltech10 (right).
380
+
381
+ # A.2. Experimental Setup
382
+
383
+ We employ SGD optimizer with learning rate $\eta = 0.001$ . The experiments were conducted three times using different seeds. We calculated the average performance and the final result in federated prompt learning is obtained by averaging the performance across all clients. All experiments are conducted with Pytorch on NVIDIA A40 GPUs.
384
+
385
+ Base-to-Novel Class Generalization. For Base-to-Novel generalization, we separate each dataset into base and novel classes equally and distribute the base classes to each client without overlapping. Each client trains their local model on their local classes, and we evaluate their personalized prompt on both local classes, base classes (classes seen on other clients but unseen during local training), and novel classes (unseen in the whole training process). The accuracy is the average overall 10 clients.
386
+
387
+ Leave-One-Domain-Out Generalization. For Leave-One-Domain-Out generalization, each client participating in the federated learning system is assigned data from one of the distinct domains. We pick one domain to serve as the target domain and use the rest of the domains as source domains. Each client possesses a distinct source domain for training and then tests its model generalization ability on the whole target domain. The accuracy is the average overall 3 clients in Office-Caltech10 and 5 clients in DomainNet.
388
+
389
+ Personalization. For evaluation of personalization, we apply Dirichlet distribution on CIFAR-10 and CIFAR-100 over 100 clients. Specifically, the datasets are partitioned randomly among clients using a symmetric Dirichlet distribution with hyperparameter $\alpha = 0.3$ . Besides, we employ the Pathlogicacl setting the same as in base-to-novel class generalization with non-overlapping classes across 10 clients for other datasets.
390
+
391
+ Effect of Individual Components. For the ablation study, we employ $\mathcal{L}_{\text{neg}} = 1 - \sin(z_G, z_i)$ as the additional loss for FedPGP without positive pairs, and $\mathcal{L}_{\text{pos}} = \sin(z_G, z_C)$ as the additional loss for FedPGP without negative pairs. The hyperparameter is set as $\mu = 1$ for the additional loss.
392
+
393
+ # B. Additional Experimental Results
394
+
395
+ # B.1. Detailed Results of Leave-One-Domain-Out Generalization
396
+
397
+ In Table 4 and Table 9, we provide the detailed classification accuracy on each source domain within Office-Caltech10 and DomainNet datasets, respectively. Notably, as PromptFL and PromptProx utilize a single global prompt, their results remain consistent across different source domains. Therefore, the presented results specifically focus on CoOp and our FedPGP, both employing distinct local models for each client. To be specific, the values shown in the table indicate the testing results on the target domain across clients with different source domains. Comparing the results of CoOp and our FedPGP, we observe that FedPGP consistently outperforms CoOp in all cases with a significantly smaller standard deviation, showcasing the robust generalization capability of our proposed method.
398
+
399
+ Table 9: The detailed classification accuracy using leave-one-domain-out validation on DomainNet dataset.
400
+
401
+ <table><tr><td rowspan="2">Datasets
402
+ Source Domains</td><td colspan="8">DomainNet</td></tr><tr><td></td><td>Clipart</td><td>Infograph</td><td>Painting</td><td>Quickdraw</td><td>Real</td><td>Sketch</td><td>Avg.</td></tr><tr><td rowspan="6">CoOp (Zhou et al., 2022b)</td><td>Clipart</td><td>—</td><td>81.17</td><td>82.80</td><td>69.98</td><td>90.71</td><td>92.46</td><td>83.42±8.96</td></tr><tr><td>Infograph</td><td>57.41</td><td>—</td><td>60.00</td><td>30.64</td><td>65.09</td><td>53.24</td><td>53.28±15.20</td></tr><tr><td>Painting</td><td>86.80</td><td>70.88</td><td>—</td><td>67.06</td><td>92.62</td><td>83.04</td><td>80.80±11.67</td></tr><tr><td>Quickdraw</td><td>48.50</td><td>44.02</td><td>50.00</td><td>—</td><td>53.02</td><td>51.50</td><td>49.41±3.94</td></tr><tr><td>Real</td><td>89.95</td><td>79.27</td><td>93.70</td><td>27.29</td><td>—</td><td>85.69</td><td>75.18±30.05</td></tr><tr><td>Sketch</td><td>86.55</td><td>84.27</td><td>86.91</td><td>64.51</td><td>92.15</td><td>—</td><td>82.88±12.09</td></tr><tr><td rowspan="6">FedPGP</td><td>Clipart</td><td>—</td><td>96.23</td><td>96.80</td><td>95.96</td><td>96.27</td><td>96.99</td><td>96.45±0.43</td></tr><tr><td>Infograph</td><td>76.45</td><td>—</td><td>74.44</td><td>69.29</td><td>76.24</td><td>75.90</td><td>74.46±3.21</td></tr><tr><td>Painting</td><td>96.18</td><td>95.89</td><td>—</td><td>93.01</td><td>96.02</td><td>96.08</td><td>95.43±1.50</td></tr><tr><td>Quickdraw</td><td>66.22</td><td>52.30</td><td>63.42</td><td>—</td><td>62.30</td><td>66.36</td><td>62.12±6.11</td></tr><tr><td>Real</td><td>97.12</td><td>95.75</td><td>97.03</td><td>93.17</td><td>—</td><td>97.25</td><td>96.06±1.87</td></tr><tr><td>Sketch</td><td>96.71</td><td>95.88</td><td>96.56</td><td>94.75</td><td>96.38</td><td>—</td><td>96.05±0.81</td></tr></table>
403
+
404
+ # B.2. Detailed Results of Individual Components in Base-to-Novel Generalization
405
+
406
+ Table 10 presents the per-dataset results for each component of our FedPGP framework in the Base-to-novel generalization setting. The results demonstrate the effectiveness of CLIP knowledge-guidance in enhancing performance for both base
407
+
408
+ and novel classes. Additionally, even though full-rank adaptation outperforms our low-rank adaptation on local classes, its generalization on both base and novel classes significantly diminishes due to overwriting the global prompt. These findings emphasize the efficacy of FedPGP in enhancing model generalization across diverse datasets.
409
+
410
+ Table 10: Accuracy (%) of ablation study on adaption and additional loss for clients' local classes and Base-to-novel generalization.
411
+
412
+ <table><tr><td>Dataset</td><td>Methods</td><td>Local</td><td>Base</td><td>Novel</td><td>HM</td></tr><tr><td rowspan="3">Average over 5 datasets</td><td>FedPGP w/o Positive</td><td>94.63</td><td>84.68</td><td>77.75</td><td>85.13</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>98.57</td><td>48.00</td><td>63.40</td><td>64.17</td></tr><tr><td>FedPGP</td><td>95.67</td><td>85.69</td><td>81.75</td><td>87.33</td></tr><tr><td rowspan="3">Oxford Pets</td><td>FedPGP w/o Positive</td><td>95.88</td><td>95.44</td><td>96.77</td><td>96.03</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>99.94</td><td>41.28</td><td>73.32</td><td>62.67</td></tr><tr><td>FedPGP</td><td>96.65</td><td>95.87</td><td>97.33</td><td>96.61</td></tr><tr><td rowspan="3">Flowers102</td><td>FedPGP w/o Positive</td><td>98.73</td><td>77.18</td><td>62.22</td><td>76.61</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>99.91</td><td>35.43</td><td>53.97</td><td>52.85</td></tr><tr><td>FedPGP</td><td>99.68</td><td>78.48</td><td>75.11</td><td>83.13</td></tr><tr><td rowspan="3">DTD</td><td>FedPGP w/o Positive</td><td>87.34</td><td>67.33</td><td>49.83</td><td>64.70</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>96.29</td><td>25.12</td><td>34.81</td><td>38.01</td></tr><tr><td>FedPGP</td><td>89.07</td><td>69.65</td><td>54.25</td><td>68.15</td></tr><tr><td rowspan="3">Caltech101</td><td>FedPGP w/o Positive</td><td>98.34</td><td>96.02</td><td>92.57</td><td>95.58</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>99.89</td><td>75.94</td><td>81.08</td><td>84.48</td></tr><tr><td>FedPGP</td><td>99.46</td><td>96.09</td><td>93.62</td><td>96.33</td></tr><tr><td rowspan="3">Food101</td><td>FedPGP w/o Positive</td><td>92.85</td><td>87.42</td><td>87.36</td><td>89.14</td></tr><tr><td>FedPGP w/ Full-rank Adaption</td><td>96.84</td><td>62.21</td><td>73.8</td><td>75.09</td></tr><tr><td>FedPGP</td><td>93.51</td><td>88.37</td><td>88.44</td><td>90.04</td></tr></table>
413
+
414
+ # B.3. Effect of Number of Bottleneck
415
+
416
+ In this subsection, we explore the impact of the number of bottleneck $b$ in our low-rank decomposition of adaptation term $\Delta p_{i}$ . We present the accuracy results considering the impact of both the bottleneck and shot number using a random seed. It can be observed that the classification accuracy improves as the bottleneck and shot number increase, showing the number of bottleneck determines the extent to which the knowledge in the global prompt is rewritten. We select the number of bottleneck $b = 8$ for the balance of generalization and personalization.
417
+
418
+ # B.4. Learning Curves
419
+
420
+ To analyze the convergence pattern of our FedPGP, we visualized the test accuracy across 10 clients with a local training epoch $E = 2$ and communication round $T = 25$ . The results are illustrated in Figure 4, revealing accelerated convergence and enhanced stability exhibited by FedPGP.
421
+
422
+ Table 11: Quantitative comparisons on 4 datasets across varying number of shots with different number of bottleneck in FedPGP over 10 clients.
423
+
424
+ <table><tr><td>Dataset</td><td>Bottleneck</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan="4">Oxford Pets</td><td>1</td><td>92.4</td><td>92.89</td><td>93.96</td><td>94.28</td><td>95.12</td></tr><tr><td>2</td><td>92.39</td><td>93.04</td><td>94.93</td><td>95.91</td><td>96.39</td></tr><tr><td>4</td><td>92.51</td><td>93.62</td><td>94.66</td><td>96.72</td><td>97.32</td></tr><tr><td>8</td><td>93.16</td><td>93.12</td><td>96.31</td><td>97.93</td><td>97.81</td></tr><tr><td rowspan="4">Flowers102</td><td>1</td><td>86.89</td><td>91.92</td><td>96.26</td><td>98.56</td><td>98.75</td></tr><tr><td>2</td><td>87.79</td><td>93.95</td><td>96.28</td><td>97.60</td><td>98.71</td></tr><tr><td>4</td><td>87.77</td><td>94.86</td><td>97.61</td><td>98.92</td><td>99.37</td></tr><tr><td>8</td><td>89.74</td><td>96.55</td><td>97.64</td><td>98.88</td><td>99.05</td></tr><tr><td rowspan="4">DTD</td><td>1</td><td>53.13</td><td>60.52</td><td>70.41</td><td>85.61</td><td>83.00</td></tr><tr><td>2</td><td>52.63</td><td>58.77</td><td>73.97</td><td>87.75</td><td>91.05</td></tr><tr><td>4</td><td>55.02</td><td>66.05</td><td>76.80</td><td>89.27</td><td>90.08</td></tr><tr><td>8</td><td>55.47</td><td>69.91</td><td>85.27</td><td>89.16</td><td>92.00</td></tr><tr><td rowspan="4">Caltech101</td><td>1</td><td>93.46</td><td>93.93</td><td>96.06</td><td>97.62</td><td>98.40</td></tr><tr><td>2</td><td>93.27</td><td>94.36</td><td>96.69</td><td>97.89</td><td>98.33</td></tr><tr><td>4</td><td>94.44</td><td>96.32</td><td>97.02</td><td>98.20</td><td>98.30</td></tr><tr><td>8</td><td>95.74</td><td>95.10</td><td>98.09</td><td>98.28</td><td>99.00</td></tr></table>
425
+
426
+ ![](images/68cbf365f8c3a496c43bcadf7e76eb21bb8758f64b2f619a9aa345bc80077c2f.jpg)
427
+ Figure 4: Accuracy learning curves of FedPGP and baselines on four datasets over 10 clients.
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:314bcd1549490343e77a4c83043d526d331887f328c3776e2673e4768182af7b
3
+ size 1256764
2024/Harmonizing Generalization and Personalization in Federated Prompt Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/e063e52d-2200-4fef-bca4-43f791d25c32_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0413fb6ecf9e1147ea4752f226942b357abdb26c0ad2f51bc549fe15d305bd6b
3
+ size 960396
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/full.md ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Harmony in Diversity: Merging Neural Networks with Canonical Correlation Analysis
2
+
3
+ Stefan Horoi $^{1,2}$ Albert Manuel Orozco Camacho $^{3,2}$ Eugene Belilovsky $^{3,2}$ Guy Wolf $^{1,2}$
4
+
5
+ # Abstract
6
+
7
+ Combining the predictions of multiple trained models through ensembling is generally a good way to improve accuracy by leveraging the different learned features of the models, however it comes with high computational and storage costs. Model fusion, the act of merging multiple models into one by combining their parameters reduces these costs but doesn't work as well in practice. Indeed, neural network loss landscapes are high-dimensional and non-convex and the minima found through learning are typically separated by high loss barriers. Numerous recent works have been focused on finding permutations matching one network features to the features of a second one, lowering the loss barrier on the linear path between them in parameter space. However, permutations are restrictive since they assume a one-to-one mapping between the different models' neurons exists. We propose a new model merging algorithm, CCA Merge, which is based on Canonical Correlation Analysis and aims to maximize the correlations between linear combinations of the model features. We show that our alignment method leads to better performances than past methods when averaging models trained on the same, or differing data splits. We also extend this analysis into the harder setting where more than 2 models are merged, and we find that CCA Merge works significantly better than past methods.
8
+
9
+ # 1. Introduction
10
+
11
+ A classical idea for improving the predictive performance and robustness of machine learning models is to use multi-
12
+
13
+ <sup>1</sup>Université de Montréal <sup>2</sup>Mila - Quebec AI Institute <sup>3</sup>Concordia University. Correspondence to: Stefan Horoi <stefan.horoi@umontreal.ca>, Guy Wolf <guy.wolf@umontreal.ca>, Eugene Belilovsky <eugene.belilovsky@concordia.ca>.
14
+
15
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
16
+
17
+ 1Our code is publicly available at https://github.com/shoroi/align-n-merge
18
+
19
+ ![](images/63f533a4a552c206c4739d5edde7ab97f9daf855e10f32b7c10ef9b54fd03177.jpg)
20
+ Figure 1: Visual representation of using CCA Merge to align two models. Canonical Correlation Analysis is used to find a common representation space where orthogonal linear combinations of the features (neurons) from $\mathcal{A}$ and $\mathcal{B}$ are maximally correlated. The linear transformation $\mathbf{P}^{\mathcal{A}}$ (resp. $\mathbf{P}^{\mathcal{B}}$ ) and its inverse can be used to go from the representation space of model $\mathcal{A}$ (resp. model $\mathcal{B}$ ) to this common representation space and back. By applying $\mathbf{P}^{\mathcal{B}}$ first and then $\mathbf{P}^{\mathcal{A}^{-1}}$ we can align the representations of model $\mathcal{B}$ to those of model $\mathcal{A}$ . Applying the same transformation directly to the parameters of model $\mathcal{B}$ effectively aligns the two models, thus allowing their merging.
21
+
22
+ ple trained models simultaneously. Each model might learn to extract different, complementary pieces of information from the input data, and combining the models would take advantage of this complementarity; thus benefiting the final performance (Ho, 1995). One of the simplest ways to implement this idea is to use ensembles, where multiple models are trained on a given task and their outputs are combined through averaging or majority vote at inference (Ho, 1995; Lobacheva et al., 2020). While this method yields good results, it comes with the disadvantages of having to store in memory the parameters of multiple models and having to run each of them individually at inference time, resulting in high storage and computational costs, particularly in the case of neural networks (NNs). Another way of leveraging multiple models to improve predictive performance is to combine the different sets of parameters into a single model. This is typically done through averaging or interpolation
23
+
24
+ in the parameter space of the models. After this "fusion" only a single model remains which will be used at inference time; therefore, the storage and computational costs are minimized, being the same as for a single model. The downside of such model fusion methods is that existing methods are not robust and typically do not perform as well in practice as ensembling (Stoica et al., 2024). Neural networks are highly over-parameterized for the task they solve (Arpit et al., 2017) and their loss landscapes are high-dimensional and non-convex objects which are still somewhat poorly understood despite many recent works shedding light on some of their characteristics (Goodfellow & Vinyals, 2015; Keskar et al., 2017; Li et al., 2018; Horoi et al., 2022). Multiple good local minima can be found for a given model and task but these minima are most often separated by regions of high loss (Frankle et al., 2020). Therefore, combining the parameters from multiple trained models without falling into one of these high-loss regions and destroying the features learned during training is a hard task and constitutes an active area of research.
25
+
26
+ Previous works established empirically that any two minima in an NN parameter space found through SGD and its variants are linked by a non-linear low-loss path (Garipov et al., 2018; Draxler et al., 2018). The term mode connectivity describes this phenomenon. However, to find this low-loss path between two minima one needs to run a computationally expensive optimization algorithm. As such, model fusion based on nonlinear mode connectivity has not been explored. On the other hand, linear mode connectivity which describes two optima connected by a linear low loss path in the parameter space (Frankle et al., 2020), provides a straightforward way of combining these models. Indeed, if the loss remains low on the linear path from one model to the other, merging the two models is as simple as averaging or linearly interpolating their parameters. This has emerged as a simple, yet powerful way to compare NN minima. However, this phenomenon is very rare in practice and is not guaranteed even for networks with the same initializations (Frankle et al., 2020).
27
+
28
+ One reason linear mode connectivity is hard to obtain is due to the well-known NN invariance to permutations. Indeed, it is possible to permute the neurons of an NN layer without changing the actual function learned by the model as long as the connections/weights to the subsequent layer are permuted consistently. Therefore, it is possible to have the same features learned at every layer of two different NN models and them not be linearly mode-connected if the order of the features differs from one network to the other. Using this invariance as justification, Entezari et al. (2022) conjectured that most SGD solutions can be permuted in such a way that they are linearly mode connected to most other SGD solutions and presented empirical support for this conjecture. Many works in recent years have provided
29
+
30
+ algorithms for finding permutations that successfully render pairs of SGD solutions linearly mode connected, or at least significantly lower the loss barrier on the linear path between these solutions, further supporting this conjecture (Tatro et al., 2020; Singh & Jaggi, 2020; Peña et al., 2023; Ainsworth et al., 2023).
31
+
32
+ While these algorithms and the found transformations have been successful in lowering the loss barrier when interpolating between pairs of SGD solutions most of them do not consider the possibility that perhaps other linear transformations, besides permutations, would provide an even better matching of NN weights. While the permutation conjecture is enticing given its simplicity and NNs' invariance to permutations, there is nothing inherently stopping NNs from distributing computations that are done by one neuron in a model to be done by multiple neurons in another model. Permutations would fail to capture this relationship since it is not a one-to-one mapping between features. Furthermore, the focus of recent works has been mainly on merging pairs of models, and merging multiple models has received limited study. However, if a similar function is learned by networks trained on the same task then it should be possible to extract the commonly learned features from not only two but also a larger population of models. Model merging algorithms should therefore be able to find these features and the relationship between them and then merge many models without negatively affecting performance.
33
+
34
+ Contributions In this work we introduce CCA Merge, a more flexible way of merging models based on maximizing the correlation between linear combinations of neurons. Furthermore we focus on the difficult setting of merging not only two but also multiple models which were fully trained from random initializations. Our main contributions are threefold:
35
+
36
+ - We propose a new model merging method based on Canonical Correlation Analysis (Sec. 3) which we will refer to as "CCA Merge". This method is more flexible than past, permutation-based methods and therefore makes better use of the correlation information between neurons (Sec. 4.2).
37
+ - We compare CCA Merge to past works and find that it yields better performing merged models across a variety of architectures and datasets. This is true in both settings where the models were trained on the same data (Sec. 4.3) or on disjoint splits of the data (Sec. 4.5).
38
+ - We take on the difficult problem of aligning features from multiple models and then merging them. We find that CCA Merge is significantly better at finding the common learned features from populations of NNs and aligning them, leading to lesser accuracy drops as the number of models being merged increases (Sec. 4.4).
39
+
40
+ # 2. Related Work
41
+
42
+ Mode connectivity Freeman & Bruna (2017) proved theoretically that one-layered ReLU neural networks have asymptotically connected level sets. Garipov et al. (2018) and Draxler et al. (2018) explore these ideas empirically and introduce the concept of mode connectivity to describe ANN minima that are connected by nonlinear paths in parameter space along which the loss remains low. Frankle et al. (2020) introduced the concept of linear mode connectivity describing the scenario in which two ANN minima are connected by a linear low loss path in parameter space.
43
+
44
+ Model merging through alignment More recently, Entezari et al. (2022) have conjectured that "Most SGD solutions belong to a set $S$ whose elements can be permuted in such a way that there is no barrier on the linear interpolation between any two permuted elements in $S$ " or in other words most SGD solutions are linearly mode connected provided the right permutation is applied to align the two solutions. Many recent works seem to support this conjecture, proposing methods for finding the "right" permutations (Tatro et al., 2020; Singh & Jaggi, 2020; Pena et al., 2023; Ainsworth et al., 2023).
45
+
46
+ "Easy" settings for model averaging Linear mode connectivity is hard to achieve in deep learning models. Frankle et al. (2020) established that even models trained on the same dataset with the same learning procedure and even the same initialization might not be linearly mode connected if they have different data orders/augmentations. It seems that only models that are already very close in parameter space can be directly combined through linear interpolation. This is the case for snapshots of a model taken at different points during its training trajectory (Garipov et al., 2018; Izmailov et al., 2018) or multiple fine-tuned models with the same pre-trained initialization (Wortsman et al., 2022; Ilharco et al., 2023; Yadav et al., 2023). This latter setting is the one typically considered in NLP research. Another setting that is worth mentioning here is the "federated learning" inspired one where models are merged every couple of epochs during training (McMahan et al., 2017). The common starting point in parameter space and the small number of training iterations before merging make LMC easier to attain. Model fusion has been very successful in these settings where aligning the models prior to merging is not required.
47
+
48
+ We emphasize that these settings are different from ours in which we aim to merge fully trained models with different parameter initializations and SGD noise (data order and augmentations).
49
+
50
+ Merging multiple models Merging more than two models has only been explored thoroughly in the "easy" settings described above. For example, Wortsman et al. (2022) aver
51
+
52
+ age models fine-tuned with different hyperparameter configurations and find that this improves accuracy and robustness. Jolicoeur-Martineau et al. (2024) average the weights of a population of neural networks multiple times during training, leading to performance gains. On the other hand, works that have focused on providing feature alignment methods to be able to merge models in settings in which LMC is not trivial have mainly done so for 2 models at the time (Singh & Jaggi, 2020; Ainsworth et al., 2023; Pena et al., 2023; Jordan et al., 2023). An exception to this is Git Re-Basin (Ainsworth et al., 2023) which proposes a "Merge Many" algorithm for merging a set of multiple models by successively aligning each model to the average of all the other models. However, results obtained with this method, which they use to merge up to 32 models, only concern the very simple set-up of MLPs trained on MNIST. Singh & Jaggi (2020) also consider merging multiple models but either in a similarly simple set-up, i.e. 4 MLPs trained on MNIST, or they fine-tune the resulting model after merging up to 8 VGG11 models trained on CIFAR100. We extend this line of work to more challenging settings, using more complex model architectures, we report the merged models accuracies directly without fine-tuning and make this a key focus in our work.
53
+
54
+ Model merging beyond permutations We note that the two model merging methods based on optimal transport (Singh & Jaggi, 2020; Peña et al., 2023) can also align models beyond permutations. However, in Singh & Jaggi (2020) this only happens when the two models being merged have different numbers of neurons at each layer. When the models have the same number of neurons the alignment matrix found by their method is a permutation, as such the majority of their results are with permutations. The method proposed by Peña et al. (2023) isn't constrained to finding binary permutation matrices but binarity is still encouraged through the addition of an entropy regularizer. Furthermore, our CCA based method is different in nature from both of these since it is not inspired by optimal transport theory.
55
+
56
+ CCA in deep learning In the general context of deep learning, Canonical Correlation Analysis has been used to align and compare learned representations in deep learning models (Raghu et al., 2017; Morcos et al., 2018; Gotmare et al., 2019), a task which is similar to the feature matching conducted by model merging algorithms. These past works serve as great motivation for the present paper.
57
+
58
+ # 3. Using CCA to Merge Models
59
+
60
+ # 3.1. Merging Models: Problem Definition
61
+
62
+ Let $\mathcal{M}$ denote a standard multilayer perceptron (MLP) and layer $L_{i} \in \mathcal{M}$ denote a linear layer of that model with a $\sigma = \mathrm{ReLU}$ activation function, weights $\mathbf{W}_i \in \mathbb{R}^{n_i \times n_{i-1}}$ and bias $\mathbf{b}_i \in \mathbb{R}^{n_i}$ . Its input is the vector of embeddings
63
+
64
+ from the previous layer $\mathbf{x}_{i - 1}\in \mathbb{R}^{n_i - 1}$ and its output can be described as:
65
+
66
+ $$
67
+ \mathbf {x} _ {i} = \sigma \left(\mathbf {W} _ {i} \cdot \mathbf {x} _ {i - 1} + \mathbf {b} _ {i}\right)
68
+ $$
69
+
70
+ We use " $\cdot$ " to denote standard matrix multiplication.
71
+
72
+ Problem statement Now consider two deep learning models $\mathcal{A}$ and $\mathcal{B}$ with the same architecture. We are interested in the problem of merging the parameters from models $\mathcal{A}$ and $\mathcal{B}$ in a layer-by-layer fashion. As mentioned in Sec. 2, simply interpolating the models parameters typically doesn't work when the models are trained from scratch from different initializations. We therefore need to align the two models' features before averaging them. We use the term "feature" in our work to refer to the individual outputs of a hidden layer neuron within a neural network. We sometimes also use the term "neuron" to refer to its learned feature or, vice-versa, we might use the term "feature" to refer to a neuron and its parameters. Mathematically, we are looking for linear transformations $\mathbf{T}_i \in \mathbb{R}^{n_i \times n_i}$ which can be applied at the output level of model $\mathcal{B}$ layer $i$ parameters to maximize the alignment with model $\mathcal{A}$ 's parameters and minimize the interpolation error. The output of the transformed layer $i$ of $\mathcal{B}$ is then:
73
+
74
+ $$
75
+ \mathbf {x} _ {i} ^ {\mathcal {B}} = \sigma \left(\mathbf {T} _ {i} \cdot \mathbf {W} _ {i} ^ {\mathcal {B}} \cdot \mathbf {x} _ {i - 1} ^ {\mathcal {B}} + \mathbf {T} _ {i} \cdot \mathbf {b} _ {i} ^ {\mathcal {B}}\right)
76
+ $$
77
+
78
+ We therefore also need to apply the inverse of $\mathbf{T}_i$ at the input level of the following layer's weights to keep the flow of information consistent inside a given model:
79
+
80
+ $$
81
+ \mathbf {x} _ {i + 1} ^ {\mathcal {B}} = \sigma (\mathbf {W} _ {i + 1} ^ {\mathcal {B}} \cdot \mathbf {T} _ {i} ^ {- 1} \cdot \mathbf {x} _ {i} ^ {\mathcal {B}} + \mathbf {b} _ {i + 1} ^ {\mathcal {B}})
82
+ $$
83
+
84
+ After finding transformations $\{\mathbf{T}_i\}_{i = 1}$ for every merging layer in the network we can merge the two model's parameters at every layer:
85
+
86
+ $$
87
+ \mathbf {W} _ {i} = \frac {1}{2} \left(\mathbf {W} _ {i} ^ {\mathcal {A}} + \mathbf {T} _ {i} \cdot \mathbf {W} _ {i} ^ {\mathcal {B}} \cdot \mathbf {T} _ {i - 1} ^ {- 1}\right) \tag {1}
88
+ $$
89
+
90
+ For the biases we have $\mathbf{b}_i = \frac{1}{2} (\mathbf{b}_i^{\mathcal{A}} + \mathbf{T}_i\cdot \mathbf{b}_i^{\mathcal{B}})$ . The linear transformations $\mathbf{T}$ therefore need to be invertible so we can undo their changes at the input level of the next layer and they need to properly align the layers of models $\mathcal{A}$ and $\mathcal{B}$ . This problem statement is a generalization of the one considered in past works where transformations $\mathbf{T}$ were constrained to being permutations (Tatro et al., 2020; Entezari et al., 2022; Ainsworth et al., 2023; Jordan et al., 2023).
91
+
92
+ We note that while artificial neural networks are invariant to permutations in the order of their neurons, this is not the case for general invertible linear transformations. Therefore, after applying the transformations to model $\mathcal{B}$ to align it to $\mathcal{A}$ its functionality might be altered. However, our results (Sec. 4) seem to suggest that the added flexibility of merging linear combinations of features outweighs the possible negative effects of this loss in functionality.
93
+
94
+ Practical considerations In practice, it is often easier to keep model $\mathcal{A}$ fixed and to find a way to transform model $\mathcal{B}$ such that the average of their weights can yield good performance, as opposed to transforming the parameters of both models. Also, depending on the model architecture, it might not be necessary to compute transformations after each single layer, for example, skip connections preserve the representation space, and the last layers of models are already aligned by the training labels. Therefore we refer to the specific layers in a network where transformations must be computed as "merging layers".
95
+
96
+ Merging multiple models In the case where multiple models are being merged there is a simple way of extending any method which aligns features between two models to the multiple models scenario. Suppose we have a set of models $\{\mathcal{M}_i\}_{i=1}^n$ which we want to merge. We can pick one of them, say $\mathcal{M}_j$ for $1 \leq j \leq n$ , to be the reference model. Then we can align the features of every other model in the set to those of the reference model and average the weights. While this "all-to-one" merging approach is quite straightforward it seems to work well in practice.
97
+
98
+ # 3.2. CCA Merge: Merging models with CCA
99
+
100
+ The "best" way to align two layers from two different deep learning models and compute the transformations $\mathbf{T}$ is still an open-question and has been the main differentiating factor between past works (see the baselines presented in Sec. 4.3 and "Model merging through alignment" in Sec. 2).
101
+
102
+ We propose the use of Canonical Correlation Analysis (CCA) to find the transformations which maximize the correlations between linear combinations of the original features from models $\mathcal{A}$ and $\mathcal{B}$ . Let $\mathbf{X}_i^{\mathcal{M}} \in \mathbb{R}^{m \times n_i}$ denote the set of outputs (internal representations or neural activations) of the $i$ -th layer of model $\mathcal{M} \in \{\mathcal{A}, \mathcal{B}\}$ in response to $m$ given input examples. We center $\mathbf{X}_i^{\mathcal{M}}$ so that each column (feature or neuron) has a mean of 0.
103
+
104
+ CCA finds projection matrices $\mathbf{P}_i^A$ and $\mathbf{P}_i^B$ which bring the neural activations $\mathbf{X}_i^A$ and $\mathbf{X}_i^B$ respectively from their original representation spaces into a new, common, representation space through the multiplications $\mathbf{X}_i^A\cdot \mathbf{P}_i^A$ and $\mathbf{X}_i^B\cdot \mathbf{P}_i^B$ . The features of this new representation space are orthogonal linear combinations of the original features of $\mathbf{X}_i^A$ and $\mathbf{X}_i^B$ , and they maximize the correlations between the two projected sets of representations.
105
+
106
+ Once the two projection matrices $\mathbf{P}_i^A$ and $\mathbf{P}_i^B$ aligning $\mathbf{X}_i^A$ and $\mathbf{X}_i^B$ respectively have been found through CCA, we can define the transformation $\mathbf{T}_i = \left(\mathbf{P}_i^B\cdot \mathbf{P}_i^{A^{-1}}\right)^\top$ . This transformation can be thought of as first bringing the activations of model $B$ into the common, maximally correlated space between the two models by multiplying by $\mathbf{P}_i^B$ and
107
+
108
+ then applying the inverse of $\mathbf{P}_i^{\mathcal{A}}$ to go from the common space found by CCA to the embedding space of model $\mathcal{A}$ . The transpose here is simply to account for the fact that $\mathbf{T}_i$ multiplies $\mathbf{W}_i$ on the left while the $\mathbf{P}_i^{\mathcal{M}}$ 's were described as multiplying $\mathbf{X}_i^{\mathcal{M}}$ on the right, for $\mathcal{M} \in \{\mathcal{A}, \mathcal{B}\}$ . The averaging of the parameters of model $\mathcal{A}$ and transformed $\mathcal{B}$ can then be conducted following Eq. 1.
109
+
110
+ Background on CCA In this section we omit the layer index $i$ since it is implicit. CCA finds the projection matrices $\mathbf{P}^{\mathcal{A}}$ and $\mathbf{P}^{\mathcal{B}}$ by iteratively defining vectors $\mathbf{p}^{\mathcal{A}}$ and $\mathbf{p}^{\mathcal{B}}$ in $\mathbb{R}^n$ such that the projections $\mathbf{X}^{\mathcal{A}}\cdot \mathbf{p}^{\mathcal{A}}$ and $\mathbf{X}^{\mathcal{B}}\cdot \mathbf{p}^{\mathcal{B}}$ have maximal correlation and norm 1.
111
+
112
+ Let $\mathbf{S}^{\mathcal{A}\mathcal{A}} = (\mathbf{X}^{\mathcal{A}})^{\top} \cdot \mathbf{X}^{\mathcal{A}}$ , $\mathbf{S}^{\mathcal{B}\mathcal{B}} = (\mathbf{X}^{\mathcal{B}})^{\top} \cdot \mathbf{X}^{\mathcal{B}}$ and $\mathbf{S}^{\mathcal{A}\mathcal{B}} = (\mathbf{X}^{\mathcal{A}})^{\top} \cdot \mathbf{X}^{\mathcal{B}}$ denote the scatter matrix of $\mathbf{X}^{\mathcal{A}}$ , the scatter matrix of $\mathbf{X}^{\mathcal{B}}$ and the cross-scatter matrix of $\mathbf{X}^{\mathcal{A}}$ and $\mathbf{X}^{\mathcal{B}}$ respectively.
113
+
114
+ $$
115
+ \mathbf{p}^{\mathcal{A}},\mathbf{p}^{\mathcal{B}} = \operatorname *{arg max}_{\substack{\mathbf{p}^{\mathcal{A}},\mathbf{p}^{\mathcal{B}}}}(\mathbf{p}^{\mathcal{A}})^{\top}\mathbf{S}^{\mathcal{AB}}\mathbf{p}^{\mathcal{B}}
116
+ $$
117
+
118
+ s.t. $\| \mathbf{X}^{\mathcal{A}}\cdot \mathbf{p}^{\mathcal{A}}\|^{2} = (\mathbf{p}^{\mathcal{A}})^{\top}\cdot \mathbf{S}^{\mathcal{A}\mathcal{A}}\cdot \mathbf{p}^{\mathcal{A}} = 1$
119
+
120
+ $$
121
+ \| \mathbf {X} ^ {\mathcal {B}} \cdot \mathbf {p} ^ {\mathcal {B}} \| ^ {2} = (\mathbf {p} ^ {\mathcal {B}}) ^ {\top} \cdot \mathbf {S} ^ {\mathcal {B B}} \cdot \mathbf {p} ^ {\mathcal {B}} = 1
122
+ $$
123
+
124
+ Since these vectors $\mathbf{p}^{\mathcal{A}}$ and $\mathbf{p}^{\mathcal{B}}$ are defined iteratively they are also required to be orthogonal to the vectors found previously in the metrics defined by $\mathbf{S}^{\mathcal{A},\mathcal{A}}$ and $\mathbf{S}^{\mathcal{B},\mathcal{B}}$ respectively. Formulating this as an ordinary eigenvalue problem and making it symmetric by a change of variables allows us to find the closed-form solutions as being the vectors in $\mathbf{P}^{\mathcal{A}}$ and $\mathbf{P}^{\mathcal{B}}$ defined by:
125
+
126
+ $$
127
+ \begin{array}{l} \mathbf {U}, \mathbf {S}, \mathbf {V} ^ {\top} = \operatorname {S V D} \left(\left(\mathbf {S} ^ {\mathcal {A A}}\right) ^ {- 1 / 2} \cdot \mathbf {S} ^ {\mathcal {A B}} \cdot \left(\mathbf {S} ^ {\mathcal {B B}}\right) ^ {- 1 / 2}\right) \\ \mathbf {P} ^ {\mathcal {A}} = \left(\mathbf {S} ^ {\mathcal {A A}}\right) ^ {- 1 / 2} \cdot \mathbf {U} \quad \text {a n d} \quad \mathbf {P} ^ {\mathcal {B}} = \left(\mathbf {S} ^ {\mathcal {B B}}\right) ^ {- 1 / 2} \cdot \mathbf {V} \\ \end{array}
128
+ $$
129
+
130
+ In practice we use Regularized CCA to make the computation of $\mathbf{P}^{\mathcal{A}}$ and $\mathbf{P}^{\mathcal{B}}$ more robust (see App. A.2). For more details we direct the reader to De Bie et al. (2005) from which this section was inspired.
131
+
132
+ # 4. Results
133
+
134
+ # 4.1. Experimental Details
135
+
136
+ We trained VGG11 models (Simonyan & Zisserman, 2015) on CIFAR10 (Krizhevsky & Hinton, 2009), ResNet20 models on CIFAR100 and ResNet18 models on ImageNet (Rusakovsky et al., 2015). We trained models of different widths, multiplying their original width by $w \in \{1, 2, 4, 8\}$ . The models were trained either using the one-hot encodings of the labels or the CLIP (Radford et al., 2021) embeddings of the class names as training objectives. This last setting is similar to the one used by Stoica et al. (2024) and we found it to yield better learned representations and performances on the task as well as less variability between random initializations.
137
+
138
+ # 4.2. CCA's flexibility allows it to better model relations between neurons
139
+
140
+ We first aim to illustrate the limits of permutation based matching and the flexibility offered by CCA Merge. Suppose we want to merge two models, $\mathcal{A}$ and $\mathcal{B}$ , at a specific merging layer, and let $\{\mathbf{z}_i^{\mathcal{M}}\}_{i=1}^n$ denote the set of neurons of model $\mathcal{M} \in \{\mathcal{A}, \mathcal{B}\}$ at that layer. We note here that, in terms of network weights, $\mathbf{z}_i^{\mathcal{M}}$ simply refers to the $i$ -th row of the weight matrix $\mathbf{W}^{\mathcal{M}}$ at that layer. Given the activations of the two sets of neurons in response to a set of given inputs, we can compute the correlation matrix $\mathbf{C}$ where element $\mathbf{C}_{ij}$ is the correlation between neurons $\mathbf{z}_i^{\mathcal{A}}$ and $\mathbf{z}_j^{\mathcal{B}}$ . For each neuron $\mathbf{z}_i^{\mathcal{A}}$ , for $1 \leq i \leq n$ , the distribution of its correlations with all neurons from model $\mathcal{B}$ is of key interest for the problem of model merging. If, as the permutation hypothesis implies, there exists a one-to-one mapping between $\{\mathbf{z}_i^{\mathcal{A}}\}_{i=1}^n$ and $\{\mathbf{z}_i^{\mathcal{B}}\}_{i=1}^n$ , then we would expect to have one highly correlated neuron for each $\mathbf{z}_i^{\mathcal{A}}$ - say $z_j^{\mathcal{B}}$ for some $1 \leq j \leq n$ - and all other correlations $\mathbf{C}_{ik}$ , $k \neq j$ , close to zero. On the other hand, if there are multiple neurons from model $\mathcal{B}$ highly correlated with $z_i^{\mathcal{A}}$ , this would indicate that the feature learned by $z_i^{\mathcal{A}}$ is distributed across multiple neurons in model $\mathcal{B}$ - a relationship that CCA Merge would capture.
141
+
142
+ In the left column of Fig. 2, we plot the distributions of the correlations between two ResNet20x8 models (i.e., all the elements from the correlation matrix $\mathbf{C}$ ) for 2 different merging layers. The vast majority of correlations have values around zero, as expected, since each layer learns multiple different features. In the right column of Fig. 2 we use box plots to show the values of the top 5 correlation values across all $\{\mathbf{z}_i^A\}_{i=1}^n$ . For each neuron $\mathbf{z}_i^A$ , we select its top $k$ -th correlation from $\mathbf{C}$ and we plot these values for all neurons $\{\mathbf{z}_i^A\}_{i=1}^n$ . For example, for $k = 1$ , we take the value $\max_{1 \leq j \leq n} \mathbf{C}_{ij}$ , for $k = 2$ we take the second largest value from the $i$ -th row of $\mathbf{C}$ , and so on. We observe the top correlations values are all relatively high but none of them approaches full correlation (i.e., value of one), suggesting that the feature learned by each neuron $\mathbf{z}_i^A$ from model $\mathcal{A}$ is distributed across multiple neurons from $\mathcal{B}$ - namely, those having high correlations - as opposed to having a single highly correlated match.
143
+
144
+ Given the flexibility of CCA Merge, we expect it to better capture these relationships between the neurons of the two networks. We recall that CCA Merge computes a linear transformation $\mathbf{T}$ that matches to each neuron $\mathbf{z}_i^A$ a linear combination $\mathbf{z}_i^A\approx \sum_{j = 1}^n\mathbf{T}_{ij}\mathbf{z}_j^B$ of the neurons in $\mathcal{B}$ . We expect the distribution of the coefficients (i.e., elements of $\mathbf{T}$ ) to match the distribution of the correlations ( $\mathbf{C}_{ij}$ elements), indicating the linear transformation found by CCA Merge adequately models the correlations and relationships between the neurons of the two models. For each neuron
145
+
146
+ $\mathbf{z}_i^A$ , we select its top $k$ -th, for $k \in \{1,2\}$ , correlation from the $i$ -th row of $\mathbf{C}$ and its top $k$ -th coefficient from the $i$ -th row of $\mathbf{T}$ and we plot a histogram of these values for all neurons $\{\mathbf{z}_i^A\}_{i=1}^n$ in Fig. 3. Indeed, the distributions of the correlations and those of the CCA Merge coefficients are visually similar, albeit not fully coinciding. To quantify this similarity we compute the Wasserstein distance between these distributions, normalized by the equivalent quantity if the transformation was a permutation matrix. For a permutation matrix, the top 1 values would be of 1 for every neuron $\mathbf{z}_i^A$ and all other values would be 0. We can see that CCA Merge finds coefficients that closely match the distribution of the correlations, more so than simple permutations, since the ratio of the two distances are 0.15 and 0.04, respectively, for top 1 values in the two considered layers and 0.35 and 0.23 for top 2 values.
147
+
148
+ ![](images/1629383ffa6d62938f0cdfbae1b203602f86cec532118aa3404232c9b8b02899.jpg)
149
+
150
+ ![](images/61f01244661083bd3d27f3148af9bb739a8847fa09935dc8a5b47add2a31bd27.jpg)
151
+
152
+ ![](images/6571a5b8a11f8bcbf7cc38dbc1f3f46b5f280f1a2a60060b6a833f79da92bfe9.jpg)
153
+
154
+ ![](images/0fba4f2981fbc26f8e1cbd790ff84371019b2cd10432d421ea80ea12a642c9ec.jpg)
155
+ Figure 2: Left column: distribution of correlation values between the neurons $\{\mathbf{z}_i^A\}_{i=1}^n$ and $\{\mathbf{z}_i^B\}_{i=1}^n$ of two ResNet20x8 models ( $\mathcal{A}$ and $\mathcal{B}$ ) trained on CIFAR100 at two different merging layers; Right column: for $k \in \{1,2,3,4,5\}$ the distributions of the top $k$ -th correlation values for all neurons in model $\mathcal{A}$ at those merging layers.
156
+
157
+ Furthermore, when using permutations to merge 2 models, $\mathcal{A}$ and $\mathcal{B}$ , a large percentage (25-50%) of the neurons from model $\mathcal{A}$ do not get matched with their highest correlated neuron from model $\mathcal{B}$ by the permutation matrix, we call these non-optimal matches. In such cases, the relationship between these highly correlated but not matched neurons is completely ignored during merging. CCA Merge on the other hand consistently assigns high transformation coefficients to the top correlated neurons. See App. B for more details.
158
+
159
+ # 4.3. Models merged with CCA Merge achieve better performance
160
+
161
+ In Table 1 we show the test accuracies of merged VGG11 and ResNet20 models of different widths trained on CIFAR10 and CIFAR100 respectively for CCA Merge and multiple other popular model merging methods. The number of models being merged is 2 and for each experiment, we report the mean and standard deviation across 4 merges where the base models were trained with different initial-
162
+
163
+ ![](images/26c6a731ff1a035093bc3b6ff8f5b41e66a304306e4de6325cc202eb382793bf.jpg)
164
+
165
+ ![](images/f0b70d65da4bfd8c783b300d860e4879ad3137af9d53e930acfad4a174e76284.jpg)
166
+ Figure 3: Distributions of top 1 (left column) and 2 (right column) correlations (blue) and CCA Merge transformation coefficients (orange) across neurons from model $\mathcal{A}$ at two different merging layers. In the left column for example, for each neuron $\mathbf{z}_i^{\mathcal{A}}$ we have one correlation value corresponding to $\max_{1\leq j\leq n}\mathbf{C}_{ij}$ and one coefficient value corresponding to $\max_{1\leq j\leq n}\mathbf{T}_{ij}$ where $\mathbf{C}$ is the cross-correlation matrix between neurons of models $\mathcal{A}$ and $\mathcal{B}$ , and $\mathbf{T}$ is the CCA Merge transformation matching neurons of $\mathcal{B}$ to those of $\mathcal{A}$ . Wasserstein distance between the distributions of top $k\in \{1,2\}$ correlations and top $k$ Merge CCA coefficients are reported, relative to equivalent distances between correlations and Permute transforms (all top 1 values are 1, and top 2 values are 0).
167
+
168
+ ![](images/931773875d717603519a450eccc621023fc18d38a538efeaa067118462999194.jpg)
169
+
170
+ ![](images/38e7d463077ee2864c5daff0115c5d7e1fb965eca252f5b822f256bd327637bb.jpg)
171
+
172
+ ization, data augmentation, and data order seeds. Results for more widths can be found in App. C. We report the average accuracies of the base models being merged under the label "Base models avg." (i.e. each model is evaluated individually and their accuracies are then averaged) as well as the accuracies of ensembling the models (the logits of the different models are averaged and the final prediction is the argmax). Ensembling is considered to be the upper limit of what model fusion methods can achieve. Also, since the models being merged were trained on the same data, we do not expect the merged models to outperform the endpoint ones in this particular setting, see App. G for more details. We compare CCA Merge with the following methods:
173
+
174
+ - Direct averaging: averaging the models' weights without applying any transformation to align neurons. This is equivalent to $\mathbf{T} = \mathbf{T}^{-1} = \mathbf{I}$ , the identity matrix.
175
+ - Permute: permuting model weights to align them, the permutation matrix is found by solving the linear sum assignment problem consisting of maximizing the sum of correlations between matched neurons. This method is equivalent to the "Matching Activations" one from Ainsworth et al. (2023), the "Permute" method considered in Stoica et al. (2024) and the neuron alignment algorithm proposed by Li et al. (2015); Tatro et al. (2020) and used in Jordan et al. (2023).
176
+
177
+ - OT Fusion: Using optimal transport to align neurons. This is the method presented in Singh & Jaggi (2020).
178
+ - Matching Weights: permuting model weights by directly minimizing the distance between the two model weights by solving a sum of bilinear assignments problem (SOBLAP). This is the main method from Ainsworth et al. (2023).
179
+ - ZipIt!: model merging method proposed by Stoica et al. (2024). We note that ZipIt! also allows the merging of neurons from the same network which results in a redundancy reduction effect that the other methods do not have. Also, it isn't strictly speaking a permutation-based method although similar.
180
+
181
+ The models were trained from scratch from different initializations, the merging was based on the training data (to compute activation statistics) but all accuracies reported are on the test set. For ResNets, we recompute the BatchNorm statistics after the weight averaging and before evaluation as suggested by Jordan et al. (2023) to avoid variance collapse.
182
+
183
+ VGG11 models merged with CCA Merge have significantly higher accuracies than models merged with any other method, and this is true across all model widths considered. Differences in accuracy ranging from $10\%$ ( $\times 8$ width) up to $25\%$ ( $\times 1$ width) can be observed between CCA Merge and the second-best performing method. Furthermore, CCA Merge is more robust when merging smaller width models, incurring smaller accuracy drops than other methods when the width is decreased from $\times 8$ to $\times 1$ ; $1.71\%$ drop for CCA Merge versus $18.34\%$ for Matching Weights and $8.19\%$ for Permute. Lastly, CCA Merge seems to be more stable across different initializations, the accuracies having smaller standard deviations than all other methods for the same width except for Matching Weights for $\times 8$ width models. We note that for VGG models with width multipliers above $\times 2$ , we ran into out-of-memory issues when running ZipIt!, which is why those results are not present. The same conclusions seem to hold for ResNets20 trained on CIFAR100, although the differences in performance here are less pronounced.
184
+
185
+ In Table 2 we present the performance of merged ResNet18 models of width 4 trained on ImageNet. In this setting we ran into OOM issues with ZipIt! therefore we only compare with Direct averaging, Permute, OT Fusion and Matching Weights, the four of which are significantly outperformed by CCA Merge. CCA Merge reduces the gap between model merging methods and model ensembles.
186
+
187
+ For both VGG and ResNet architectures as well as for all considered datasets the added flexibility of CCA Merge over permutation-based methods seems to benefit the merged models. Aligning models using linear combinations allows CCA Merge to better model relationships between neurons and to take into account features that are distributed across
188
+
189
+ multiple neurons. In addition to the raw performance benefits, CCA Merge seems to be more stable across different model widths as well as across different random initializations and data order and augmentation.
190
+
191
+ # 4.4. CCA merging finds better common representations between many models
192
+
193
+ In this section, we present our results related to the merging of many models, a significantly harder task. This constitutes the natural progression to the problem of merging pairs of models and is a more realistic setting for distributed or federated learning applications where there are often more than 2 models. Furthermore, aligning populations of neural networks brings us one step closer to finding the common learned features that allow different neural networks to perform equally as well on complex tasks despite having different initializations, data orders, and data augmentations.
194
+
195
+ As previously mentioned, the problem of merging many models is often ignored by past works except for the settings in which linear mode connectivity is easily obtained. Ainsworth et al. (2023) introduced "Merge Many", an adaptation of Matching Weights for merging a set of models. In Merge Many each model in the set is sequentially matched to the average of all the others until convergence. A simpler way of extending any model merging method to the many models setting is to choose one of the models in the group as the reference model and to align every other network in the group to it. Then the reference model and all the other aligned models can be merged. It is by using this "all-to-one" merging that we extend CCA Merge, Permute, OT Fusion and Matching Weights to the many model settings. ZipIt! is naturally able to merge multiple models since it aggregates all neurons and merges them until the desired size is obtained.
196
+
197
+ In Fig. 4 we show the accuracies of the merged models as the number of models being merged increases. For both VGG and ResNet architectures aligning model weights with CCA continues to yield better performing merged models. In fact, models merged with CCA Merge applied in an all-to-one fashion maintain their accuracy relatively well while the ones merged with other methods see their accuracies drop significantly. In the VGG case, the drop for other methods is drastic, all merged models having less than $20\%$ accuracy when more than 3 models are being merged which constitutes a decrease of more than $25\%$ from the 2 models merged scenario. CCA Merge on the other hand suffers a drop in accuracy of less than $3\%$ when going from merging 2 models to 5, staying around the $80\%$ mark. We also note that despite being designed specifically for the many models setting, Merge Many performs only slightly better than its 2 model counterpart (Matching Weights applied in an all-to-one fashion).
198
+
199
+ <table><tr><td>Method</td><td>VGG11×1 CIFAR10</td><td>VGG11×8 CIFAR10</td><td>ResNet20×1 CIFAR100</td><td>ResNet20×8 CIFAR100</td></tr><tr><td>Base models avg.</td><td>87.27 ±0.25%</td><td>88.20 ±0.45%</td><td>69.21 ±0.22%</td><td>78.77 ±0.28%</td></tr><tr><td>Ensemble</td><td>89.65 ±0.13%</td><td>90.21 ±0.24%</td><td>73.51 ±0.20%</td><td>80.98 ±0.21%</td></tr><tr><td>Direct averaging</td><td>10.54 ±0.93%</td><td>10.45 ±0.74%</td><td>1.61 ±0.16%</td><td>14.00 ±1.66%</td></tr><tr><td>Permute</td><td>54.39 ±6.45%</td><td>62.58 ±3.31%</td><td>28.76 ±2.20%</td><td>72.90 ±0.08%</td></tr><tr><td>OT Fusion</td><td>53.86 ±10.4%</td><td>68.32 ±3.13%</td><td>29.05 ±2.55%</td><td>72.45 ±0.08%</td></tr><tr><td>Matching Weights</td><td>55.40 ±4.67%</td><td>73.74 ±1.77%</td><td>21.38 ±4.36%</td><td>74.29 ±0.51%</td></tr><tr><td>ZipIt!</td><td>52.93 ±6.37%</td><td>-</td><td>25.26 ±2.30%</td><td>72.47 ±0.41%</td></tr><tr><td>CCA Merge (ours)</td><td>82.65 ±0.73%</td><td>84.36 ±2.09%</td><td>31.79 ±1.97%</td><td>75.06 ±0.18%</td></tr></table>
200
+
201
+ Table 1: VGG11 trained on CIFAR10 & ResNet20 trained on CIFAR100 - Accuracies and standard deviations from 4 different merges of 2 models are presented. Models averaged with CCA Merge notably outperform models merged with other methods, narrowing the gap between merged models and model ensembles. Model ensembles are significantly more memory and compute expensive and represent the upper bound of attainable performance for model merging methods.
202
+
203
+ <table><tr><td>Method</td><td>Top 1 Acc. (%)</td><td>Top 5 Acc. (%)</td></tr><tr><td>Base models avg.</td><td>75.44 ±0.06</td><td>92.17 ±0.05</td></tr><tr><td>Ensemble</td><td>77.62 ±0.07</td><td>93.48 ±0.01</td></tr><tr><td>Direct averaging</td><td>0.12 ±0.03</td><td>0.64 ±0.01</td></tr><tr><td>Permute</td><td>51.45 ±1.02</td><td>76.96 ±0.76</td></tr><tr><td>OT Fusion</td><td>50.55 ±0.98</td><td>76.35 ±0.97</td></tr><tr><td>Matching Weights</td><td>45.41 ±0.33</td><td>72.78 ±0.42</td></tr><tr><td>CCA Merge (ours)</td><td>63.61 ±0.22</td><td>85.41 ±0.25</td></tr></table>
204
+
205
+ Table 2: ResNet18x4 trained on ImageNet - Accuracies and standard deviations from 3 different merges of 2 models are presented. Even on this significantly harder image classification task CCA Merge outperforms past model merging methods for both top 1 and top 5 accuracies, helping to reduce the gap between model merging methods and model ensembles.
206
+
207
+ For ResNets, the accuracy of models merged with Permute drops by $\sim 15\%$ when going from merging 2 models to 20. While less drastic than in the VGG case this decrease in performance is still significant. ZipIt! displays a slightly more pronounced drop when going from 2 models merged to 5. CCA Merge on the other hand is a lot more robust, incurring a less than $4\%$ drop in accuracy even as the number of merged models is increased to 20. Additionally, accuracy values for models merged by CCA Merge seem to plateau sooner than those for Permute.
208
+
209
+ These results suggest that CCA Merge is significantly better than past methods at finding the "common features" learned by groups of neural networks and aligning them. The limitations of permutation-based methods in taking into account complex relationships between neurons from different models are highlighted in this context. Here it is harder to align features given that there are more of them to consider and therefore easier to destroy the features when averaging them.
210
+
211
+ ![](images/31cafcb60856416e5fe7f2a361d01a23e90d0a5d6ff9598972eeaf012d504918.jpg)
212
+ Figure 4: Accuracies of averaging multiple models after feature alignment with different merging methods. Mean and standard deviation across 4 random seeds are shown.
213
+
214
+ Permutations and feature mismatches To explain the success of CCA Merge in the multi-model setting, we have examined feature mismatches between networks. When merging models $\mathcal{A},\mathcal{B}$ and $\mathcal{C}$ , we choose one reference model, say model $\mathcal{A}$ , align $\mathcal{B}$ and $\mathcal{C}$ to $\mathcal{A}$ and then merge by averaging. This results in an indirect matching of models $\mathcal{B}$ and $\mathcal{C}$ through the reference model $\mathcal{A}$ . Neurons $i$ from $\mathcal{B}$ and $j$ from $\mathcal{C}$ are matched indirectly through $\mathcal{A}$ if they both are matched to the same neuron $k$ from $\mathcal{A}$ . Ideally, this indirect matching should be the same as the direct matching resulting from aligning $\mathcal{B}$ and $\mathcal{C}$ directly. This would mean that the same features from $\mathcal{B}$ and $\mathcal{C}$ are matched regardless of whether they are merged together or with a third model. However, this does not seem to be the case for permutation-based methods: over $50\%$ of the neurons from $\mathcal{B}$ don't get matched to the same neuron from $\mathcal{C}$ when aligned directly or indirectly through $\mathcal{A}$ . Additionally, the Frobenius norm of the differences between the direct and indirect matching matrices is significantly lower for CCA Merge than for a permutation-based method. This suggests CCA Merge generates fewer feature mismatches in the multi-model setting, explaining in part its success over permutation-based methods. For detailed results and further information see App. E.
215
+
216
+ <table><tr><td>Method</td><td>(1) 80%-20%</td><td>(2) Dirichlet</td><td>(3) 50 classes</td></tr><tr><td>Base models avg.</td><td>65.66 ±0.71%</td><td>59.98 ±1.80%</td><td>41.42 ±0.54%</td></tr><tr><td>Ensemble</td><td>77.84 ±0.23%</td><td>73.77 ±0.44%</td><td>69.91 ±0.49%</td></tr><tr><td>Direct averaging</td><td>11.40 ±1.62%</td><td>20.55 ±3.07%</td><td>16.90 ±2.02%</td></tr><tr><td>Permute</td><td>62.11 ±0.30%</td><td>58.45 ±1.76%</td><td>43.82 ±1.31%</td></tr><tr><td>OT Fusion</td><td>61.56 ±0.21%</td><td>57.67 ±1.49%</td><td>43.02 ±1.27%</td></tr><tr><td>Matching Weights</td><td>58.18 ±0.68%</td><td>55.87 ±1.80%</td><td>41.15 ±1.45%</td></tr><tr><td>ZipIt!</td><td>61.41 ±0.51%</td><td>57.97 ±1.29%</td><td>55.08 ±0.70%</td></tr><tr><td>CCA Merge (ours)</td><td>66.35 ±0.19%</td><td>60.38 ±1.68%</td><td>46.57 ±0.76%</td></tr></table>
217
+
218
+ Table 3: ResNet20×8 trained on 3 different splits of CIFAR100 - Accuracies and standard deviations from 4 different merges of 2 models are presented. When the models being merged have learned different features from disjoint sets of the training data but with all the classes (splits 1 and 2) CCA Merge is the only model merging method which outperforms the average of the base models. In the case where the models being merged were trained on disjoint subsets of the classes (split 3) CCA Merge still outperforms past model merging methods except for ZipIt!. However ZipIt! allows same-model neuron merging, making a direct comparison with the other methods, including ours, somewhat unfair.
219
+
220
+ # 4.5. CCA Merge is better at combining learned features from different data splits
221
+
222
+ In this section we consider the more realistic setting where the models are trained on disjoint splits of the data, therefore they're expected to learn (at least some) different features. Such a set-up is natural in the context of federated or distributed learning. We consider ResNet20 models trained on 3 different data splits of the CIFAR100 training dataset. The first (1) data split is the one considered in Ainsworth et al. (2023); Jordan et al. (2023) where one model is trained on $80\%$ of the data from the first 50 classes of the CIFAR100 dataset and $20\%$ of the data from the last 50 classes, the second model being trained on the remaining examples. In the second (2) data split we use samples from a Dirichlet distribution with parameter vector $\alpha = (0.5, 0.5)$ to subsample each class in the dataset and create 2 disjoint data splits, one for each model to be trained on. Lastly, with the third (3) data split we consider the more extreme scenario from Stoica et al. (2024) where one model is trained on $100\%$ of the data from 50 classes, picked at random, and the second one is trained on the remaining classes, with no overlap. For this last setting, in order for both models to have a common output space they were trained using the CLIP (Radford et al., 2021) embeddings of the class names as training objectives. In Table 3 we report mean and standard deviation of accuracies across 4 different model pairs.
223
+
224
+ For the first two data splits CCA Merge outperforms the other methods, beating the second best method by $\sim 4\%$ and $\sim 2\%$ on the first and second data splits respectively. For the third data split CCA Merge is the second best performing method after ZipIt!. However, ZipIt! was designed for this specific setting and, as we previously noted, it allows the merging of features from the same network to reduce redundancies, thus making it more flexible than the other methods which only perform "alignment". In all cases CCA Merge outperforms or is comparable with the base models average
225
+
226
+ indicating that, to some extent, our method successfully combines different learned features from the two models.
227
+
228
+ # 5. Discussion and Conclusion
229
+
230
+ Recent model fusion successes exploit inter-model relationships between neurons by modelling them as permutations before fusing models. Here, we argue that, while assuming a one-to-one correspondence between neurons yields interesting merging methods, it is rather limited as not all neurons from one network have an exact match with a neuron from another network. Our proposed CCA Merge takes the approach of linearly transforming model parameters beyond permutation-based optimization. This added flexibility allows our method to outperform recent competitive baselines when merging pairs of models trained on the same data or on disjoint splits of the data (Tables 1, 2 and 3). Furthermore, when considering the harder task of merging many models, CCA Merge models showcase remarkable accuracy stability as the number of models merged increases, while past methods suffer debilitating accuracy drops. This suggests a path towards achieving strong linear connectivity between a set of models, which is hard to do with permutations (Sharma et al., 2024). One limitation of our method is that it requires input data to align the models. The forward pass to compute the activations increases computational costs and in some settings such a "shared" dataset might not be available. We discuss this further in App. F.
231
+
232
+ Merging many models successfully, without incurring an accuracy drop, is one of the big challenges in this area of research. Our method, CCA Merge, makes a step in the direction of overcoming this challenge. As future work, it would be interesting to further study the common representations learned by populations of neural networks. Also, an interesting future research avenue is to test CCA Merge with models trained on entirely different datasets, to test its limits in terms of combining different features.
233
+
234
+ # Acknowledgements
235
+
236
+ This work was partially funded by the Natural Sciences and Engineering Research Council of Canada (NSERC) CGS D 569345 - 2022 scholarship [S.H.]; FRQNT-NSERC grant 2023-NOVA-329125 [E.B. & G.W.]; Canada CIFAR AI Chair, NSF DMS grant 2327211 and NSERC Discovery grant 03267 [G.W.]. This work is also supported by resources from Compute Canada and Calcul Québec. The content is solely the responsibility of the authors and does not necessarily represent the views of the funding agencies.
237
+
238
+ # Impact Statement
239
+
240
+ This paper presents work whose goal is to advance the field of Machine Learning, specifically the sub-field interested in merging models which were trained from scratch, potentially from different initializations, on different data splits or datasets or following different training procedures.
241
+
242
+ As deep learning has gained in popularity, many open-source models have become available online and are increasingly being used in research and in industry. In many cases these models do not come from the same initialization and the training data and pipelines are varied and in some cases unavailable. Advances in model merging might provide more storage and compute efficient ways of taking advantage of such open-sourced models, thus reducing resource consumption. Furthermore, model merging methods have the potential of allowing us to find the fundamental shared features learned by different models, thus unifying different data representations and furthering our understanding of deep learning models.
243
+
244
+ Any other societal and ethical impacts of our work are likely to be the same as for any work advancing the field of Machine Learning in general.
245
+
246
+ # References
247
+
248
+ Ainsworth, S., Hayase, J., and Srinivasa, S. Git re-basin: Merging models modulo permutation symmetries. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=CQsmMYmlP5T.
249
+ Arpit, D., Jastrzebski, S., Ballas, N., Krueger, D., Bengio, E., Kanwal, M. S., Maharaj, T., Fischer, A., Courville, A., Bengio, Y., and Lacoste-Julien, S. A closer look at memorization in deep networks. In Precup, D. and Teh, Y. W. (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 233-242. PMLR, 06-11 Aug 2017. URL https://proceedings.mlr.org/press/v70/arpit17a.html.
250
+
251
+ De Bie, T., Cristianini, N., and Rosipal, R. Eigenproblems in Pattern Recognition, pp. 129-167. Springer Berlin Heidelberg, Berlin, Heidelberg, 2005. ISBN 978-3-540-28247-1. doi: 10.1007/3-540-28247-5_5. URL https://doi.org/10.1007/3-540-28247-5_5.
252
+ Draxler, F., Veschgini, K., Salmhofer, M., and Hamprecht, F. Essentially no barriers in neural network energy landscape. In Dy, J. and Krause, A. (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1309-1318. PMLR, 10-15 Jul 2018. URL https://proceedings.mlr.press/v80/draxler18a.html.
253
+ Entezari, R., Sedghi, H., Saukh, O., and Neyshabur, B. The role of permutation invariance in linear mode connectivity of neural networks. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=dNigytemkL.
254
+ Frankle, J., Dziugaite, G. K., Roy, D., and Carbin, M. Linear mode connectivity and the lottery ticket hypothesis. In III, H. D. and Singh, A. (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 3259-3269. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/frankle20a.html.
255
+ Freeman, C. D. and Bruna, J. Topology and geometry of half-rectified network optimization. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=Bk0FWVcqx.
256
+ Garipov, T., Izmailov, P., Podoprikhin, D., Vetrov, D. P., and Wilson, A. G. Loss surfaces, mode connectivity, and fast ensembling of dnns. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/be3087e74e9100d4bc4c6268cdbe8456-Paper.pdf.
257
+ Goodfellow, I. J. and Vinyals, O. Qualitatively characterizing neural network optimization problems. In Bengio, Y. and LeCun, Y. (eds.), The third International Conference on Learning Representations, 2015. URL http://arxiv.org/abs/1412.6544.
258
+ Gotmare, A., Keskar, N. S., Xiong, C., and Socher, R. A closer look at deep learning heuristics: Learning rate
259
+
260
+ restarts, warmup and distillation. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=r14EOsCqKX.
261
+ Ho, T. K. Random decision forests. In Proceedings of 3rd international conference on document analysis and recognition, volume 1, pp. 278-282. IEEE, 1995.
262
+ Horoi, S., Huang, J., Rieck, B., Lajoie, G., Wolf, G., and Krishnaswamy, S. Exploring the geometry and topology of neural network loss landscapes. In Bouadi, T., Fromont, E., and Hullermeier, E. (eds.), Advances in Intelligent Data Analysis XX, pp. 171-184, Cham, 2022. Springer International Publishing. ISBN 978-3-031-01333-1.
263
+ Ilharco, G., Ribeiro, M. T., Wortman, M., Schmidt, L., Hajishirzi, H., and Farhadi, A. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=6t0Kwf8-jrj.
264
+ Izmailov, P., Podoprikhin, D., Garipov, T., Vetrov, D., and Wilson, A. G. Averaging weights leads to wider optima and better generalization. In Globerson, A. and Silva, R. (eds.), Uncertainty in Artificial Intelligence, volume 34. AUAI Press, 2018. URL http://auai.org/ uai2018/proceedings/papers/313.pdf.
265
+ Jolicoeur-Martineau, A., Gervais, E., FATRAS, K., Zhang, Y., and Lacoste-Julien, S. Population parameter averaging (PAPA). Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=cPDVjsOytS.
266
+ Jordan, K., Sedghi, H., Saukh, O., Entezari, R., and Neyshabur, B. REPAIR: REnormalizing permuted activations for interpolation repair. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=gU5sJ6ZggcX.
267
+ Keskar, N. S., Mudigere, D., Nocedal, J., Smelyanskiy, M., and Tang, P. T. P. On large-batch training for deep learning: Generalization gap and sharp minima. In 5th International Conference on Learning Representations (ICLR), 2017.
268
+ Krizhevsky, A. and Hinton, G. Learning multiple layers of features from tiny images. Technical Report 0, University of Toronto, Toronto, Ontario, 2009. URL https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf.
269
+ Li, H., Xu, Z., Taylor, G., Studer, C., and Goldstein, T. Visualizing the loss landscape of neural nets. In Advances in Neural Information Processing Systems (NeurIPS), volume 31, pp. 6389-6399. Curran Associates, Inc., 2018.
270
+
271
+ Li, Y., Yosinski, J., Clune, J., Lipson, H., and Hopcroft, J. Convergent learning: Do different neural networks learn the same representations? In Storchus, D., Rostamizadeh, A., and Kumar, S. (eds.), Proceedings of the 1st International Workshop on Feature Extraction: Modern Questions and Challenges at NIPS 2015, volume 44 of Proceedings of Machine Learning Research, pp. 196-212, Montreal, Canada, 11 Dec 2015. PMLR. URL https://proceedings.mlr.press/v44/1i15convergent.html.
272
+ Lobacheva, E., Chirkova, N., Kodryan, M., and Vetrov, D. P. On power laws in deep ensembles. Advances In Neural Information Processing Systems, 33:2375-2385, 2020.
273
+ McMahan, B., Moore, E., Ramage, D., Hampson, S., and Arcas, B. A. y. Communication-Efficient Learning of Deep Networks from Decentralized Data. In Singh, A. and Zhu, J. (eds.), Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, volume 54 of Proceedings of Machine Learning Research, pp. 1273-1282. PMLR, 20-22 Apr 2017. URL https://proceedings.mlr.press/v54/mcmahan17a.html.
274
+ Morcos, A., Raghu, M., and Bengio, S. Insights on representational similarity in neural networks with canonical correlation. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/a7a3d70c6d17a73140918996d03c014f-Paper.pdf.
275
+ Pena, F. A. G., Medeiros, H. R., Dubail, T., Aminbeidokhti, M., Granger, E., and Pedersoli, M. Re-basin via implicit sinkhorn differentiation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 20237-20246, June 2023.
276
+ Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., Krueger, G., and Sutskever, I. Learning transferable visual models from natural language supervision. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/radford21a.html.
277
+ Raghu, M., Gilmer, J., Yosinski, J., and Sohl-Dickstein, J. Svcca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability.
278
+
279
+ In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/dc6a7e655d7e5840e66733e9ee67cc69-Paper.pdf.
280
+ Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A. C., and Fei-Fei, L. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211-252, 2015. doi: 10.1007/s11263-015-0816-y.
281
+ Sharma, E., Kwok, D., Denton, T., Roy, D. M., Rolnick, D., and Dziugaite, G. K. Simultaneous linear connectivity of neural networks modulo permutation, 2024. URL https://arxiv.org/abs/2404.06498.
282
+ Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. In the 3rd International Conference on Learning Representations (ICLR 2015), pp. 1-14, 2015.
283
+ Singh, S. P. and Jaggi, M. Model fusion via optimal transport. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 22045-22055. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/fb2697869f56484404c8cee2985b01d-Paper.pdf.
284
+ Stoica, G., Bolya, D., Bjorner, J. B., Ramesh, P., Hearn, T., and Hoffman, J. Zipit! merging models from different tasks without training. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=LEYUkvdUhq.
285
+ Tatro, N., Chen, P.-Y., Das, P., Melnyk, I., Sattigeri, P., and Lai, R. Optimizing mode connectivity via neuron alignment. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 15300-15311. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/aecd42329922dfc97eee948606e1f8e-Paper.pdf.
286
+ Wortsman, M., Ilharco, G., Gadre, S. Y., Roelofs, R., Gontijo-Lopes, R., Morcos, A. S., Namkoong, H., Farhadi, A., Carmon, Y., Kornblith, S., and Schmidt,
287
+
288
+ L. Model soups: averaging weights of multiple finetuned models improves accuracy without increasing inference time. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 23965-23998. PMLR, 17-23 Jul 2022. URL https://proceedings.mlr.press/v162/wortsman22a.html.
289
+ Yadav, P., Tam, D., Choshen, L., Raffel, C., and Bansal, M. TIES-merging: Resolving interference when merging models. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=xtaX3WyCj1.
290
+
291
+ # A. Additional Practical Considerations for CCA Merge
292
+
293
+ # A.1. Aligning $\mathcal{B}$ to $\mathcal{A}$ rather than transforming both
294
+
295
+ Given that CCA naturally finds a common representation space which maximally correlates the activations of both models being merged, $\mathbf{X}^{\mathcal{A}}$ and $\mathbf{X}^{\mathcal{B}}$ , it is natural to consider merging the models in this common space. This would be done by transforming the parameters of model $\mathcal{A}$ with the found transformations $\mathbf{P}_i^{\mathcal{A}}$ and transforming the parameters of model $\mathcal{B}$ with transformations $\mathbf{P}_i^{\mathcal{B}}$ and then averaging both transformed models. However, the reason for applying transformation $\mathbf{T} = (\mathbf{P}^{\mathcal{B}} \cdot \mathbf{P}^{\mathcal{A}})^{\top}$ to model $\mathcal{B}$ to align it to $\mathcal{A}$ and merging both models in the representation space of model $\mathcal{A}$ instead of transforming both the weights of model A and model B and merging in the common space found by CCA is because of the ReLU non-linearity. The common representation space found by CCA has no notion of directionality, and might contain important information even in negative orthants (high-dimensional quadrants where at least one of the variables has negative values) that might get squashed to zero by ReLU non-linearities. The representation space of model $\mathcal{A}$ doesn't have this problem.
296
+
297
+ # A.2. Regularized CCA
298
+
299
+ The closed form CCA solution requires inverting the scatter matrices $\mathbf{S}^{\mathcal{A}\mathcal{A}}$ and $\mathbf{S}^{\mathcal{BB}}$ which can lead to poor performance and instability when the eigenvalues of these matrices are small. To make CCA more robust, the identity matrix $\mathbf{I}$ scaled by a regularization hyper-parameter $\gamma$ is added to the two scatter matrices. Therefore to complete the CCA computation the matrices $\mathbf{S}^{\mathcal{A}\mathcal{A}} + \gamma \mathbf{I}$ and $\mathbf{S}^{\mathcal{BB}} + \gamma \mathbf{I}$ are used instead of $\mathbf{S}^{\mathcal{A}\mathcal{A}}$ and $\mathbf{S}^{\mathcal{BB}}$ .
300
+
301
+ To chose the hyper-parameter $\gamma$ for any experiment, i.e. a combination of model architecture and data set / data split, we train additional models from scratch and conduct the merging with different $\gamma$ values. The $\gamma$ value leading to the best merged accuracy is kept and applied to the other experiments with CCA Merge. The models used to select $\gamma$ are discarded to avoid over-fitting and the CCA Merge accuracies are reported for new sets of models.
302
+
303
+ # B. Further empirical analysis of matching matrices
304
+
305
+ # B.1. Non-optimal matches of permutation-based methods
306
+
307
+ When merging 2 models, $\mathcal{A}$ and $\mathcal{B}$ , with Permute, a large percentage (25-50%) of the neurons from model $\mathcal{A}$ do not get matched with their highest correlated neuron from model $\mathcal{B}$ by the permutation matrix, we call these non-optimal matches. In other words, for neurons in $\mathcal{A}$ that have a non-optimal match, a higher correlated neuron from $\mathcal{B}$ exists to which that $\mathcal{A}$ neuron isn't matched. Since permutation-based methods aim to optimize an overall cost, the found solutions match some neurons non-optimally in order to obtain a better overall score. However, since permutation-based methods either completely align two features (value of 1 in the matching matrix) or not at all (value of 0), the merging completely ignores the relationship between these highly correlated but not matched neurons.
308
+
309
+ In Fig. 5 we present the percent of neurons from net $\mathcal{A}$ that get non-optimally matched to a neuron from net $\mathcal{B}$ for all merging layers inside a ResNet20 trained on CIFAR100. We can see from these results that the limiting nature of permutations causes Permute to disregard some meaningful relationships between learned features, hindering the merged model accuracy.
310
+
311
+ # B.2. Highest correlated neurons are associated to top CCA Merge transformation coefficients
312
+
313
+ Since CCA Merge combines linear combinations of neurons instead of just individual ones, we can't run the exact same analysis as we did in the previous section for Permute. However, we have looked at whether or not, for each neuron from model $\mathcal{A}$ , the top 1 and top 2 correlated neuron from model $\mathcal{B}$ (i.e. neurons with the highest or second highest correlations respectively) get assigned high coefficients in the CCA Merge transformation matrices. We report these values in the Fig. 6.
314
+
315
+ In the vast majority of cases the highest correlated neuron from model $\mathcal{B}$ gets assigned one of the 5 highest coefficients in the CCA Merge transform, and the top 2 correlated neuron gets assigned one of the 10 highest coefficients of the transform. These results showcase how CCA Merge better accounts for the relationships between neurons of different models during the merging procedure.
316
+
317
+ ![](images/09c21e4ebd7b1af82959b2300a05276cf09c4da407f65eb4f32f6cd29404b0de.jpg)
318
+ Figure 5: Percent $(\%)$ of non-optimal matches when merging ResNet20x8 models trained on CIFAR100. The mean and standard deviation across 15 possible 2-model merges out of a group of 6 models fully trained from different initializations are shown.
319
+
320
+ # C. Additional Results
321
+
322
+ Here we present the extended Table 1 results, where we also include results for widths $\times 2$ and $\times 4$ for both VGG and ResNet models. The same overall conclusions hold with CCA Merge performing generally better than all other considered baselines. CCA Merge's standard deviation isn't always the lowest however as width increases but it's comparable with the other methods. As noted in the main text we ran into out-of-memory issues when running ZipIt! for VGG models with width greater than $\times 2$ .
323
+
324
+ Table 4: VGG11/CIFAR10 - Accuracies and standard deviations after merging 2 models
325
+
326
+ <table><tr><td>Width multiplier</td><td>×1</td><td>×2</td><td>×4</td><td>×8</td></tr><tr><td>Base models avg.</td><td>87.27 ±0.25%</td><td>87.42 ±0.86%</td><td>87.84 ±0.21%</td><td>88.20 ±0.45%</td></tr><tr><td>Ensemble</td><td>89.65 ±0.13%</td><td>89.74 ±0.44%</td><td>90.12 ±0.16%</td><td>90.21 ±0.24%</td></tr><tr><td>Direct averaging</td><td>10.54 ±0.93%</td><td>10.28 ±0.48%</td><td>10.00 ±0.01%</td><td>10.45 ±0.74%</td></tr><tr><td>Permute</td><td>54.39 ±6.45%</td><td>63.32 ±1.12%</td><td>64.81 ±1.99%</td><td>62.58 ±3.31%</td></tr><tr><td>OT Fusion</td><td>53.86 ±10.4%</td><td>65.97 ±2.13%</td><td>66.34 ±3.17%</td><td>68.32 ±3.13%</td></tr><tr><td>Matching Weights</td><td>55.40 ±4.67%</td><td>66.98 ±1.96%</td><td>71.92 ±2.21%</td><td>73.74 ±1.77%</td></tr><tr><td>ZipIt!</td><td>52.93 ±6.37%</td><td>60.73 ±2.07%</td><td>-</td><td>-</td></tr><tr><td>CCA Merge (ours)</td><td>82.65 ±0.73%</td><td>83.31 ±1.05%</td><td>85.54 ±0.51%</td><td>84.36 ±2.09%</td></tr></table>
327
+
328
+ # D. VGG Results with REPAIR
329
+
330
+ In this section, specifically in Table 6, we present the results for merging VGG networks with REPAIR (Jordan et al., 2023) applied to mitigate the variance collapse phenomenon. Since the standard VGG architecture doesn't contain normalization layers it isn't as straightforward as just resetting the BatchNorm statistics as it was for ResNets. Applying REPAIR seems to greatly help past methods and all methods are now comparable in terms of accuracy, with Matching Weights (Ainsworth et al., 2023) being slightly better, but the standard deviations overlapping with CCA Merge. The great performance of CCA Merge without REPAIR suggests that perhaps models merged with our method do not suffer from variance collapse to the same extent as models merged with permutation-based methods. One interesting thing to note is that REPAIR also
331
+
332
+ ![](images/a74ffe2569d9cacba32544a52bfc8182a78d5634a9e23ff464388f235088c719.jpg)
333
+ Figure 6: Percent $(\%)$ of top 1 and top 2 correlated neurons that have top 5 and top 10 CCA Merge coefficients respectively when merging ResNet20x8 models trained on CIFAR100. The mean and standard deviation across 15 possible 2-model merges out of a group of 6 models fully trained from different initializations are shown.
334
+
335
+ Table 5: ResNet20/CIFAR100 - Accuracies and standard deviations after merging 2 models
336
+
337
+ <table><tr><td>Width multiplier</td><td>×1</td><td>×2</td><td>×4</td><td>×8</td></tr><tr><td>Base models avg.</td><td>69.21 ±0.22%</td><td>74.22 ±0.14%</td><td>77.28 ±0.34%</td><td>78.77 ±0.28%</td></tr><tr><td>Ensemble</td><td>73.51 ±0.20%</td><td>77.57 ±0.19%</td><td>79.90 ±0.08%</td><td>80.98 ±0.21%</td></tr><tr><td>Direct averaging</td><td>1.61 ±0.16%</td><td>2.67 ±0.16%</td><td>5.13 ±0.52%</td><td>14.00 ±1.66%</td></tr><tr><td>Permute</td><td>28.76 ±2.20%</td><td>49.45 ±0.41%</td><td>64.65 ±0.34%</td><td>72.90 ±0.08%</td></tr><tr><td>OT Fusion</td><td>29.05 ±2.55%</td><td>48.74 ±1.11%</td><td>64.07 ±0.38%</td><td>72.45 ±0.08%</td></tr><tr><td>Matching Weights</td><td>21.38 ±4.36%</td><td>44.85 ±0.66%</td><td>64.66 ±0.45%</td><td>74.29 ±0.51%</td></tr><tr><td>ZipIt!</td><td>25.26 ±2.30%</td><td>47.72 ±0.53%</td><td>63.69 ±0.31%</td><td>72.47 ±0.41%</td></tr><tr><td>CCA Merge (ours)</td><td>31.79 ±1.97%</td><td>54.26 ±1.00%</td><td>68.75 ±0.22%</td><td>75.06 ±0.18%</td></tr></table>
338
+
339
+ significantly helps Direct Averaging, where the networks aren't aligned before merging. Without REPAIR, Direct Averaging performed no better than random, however with REPAIR the $\times 8$ models achieve $>70\%$ accuracy even without any sort of alignment.
340
+
341
+ Since CCA Merge uses general invertible linear transformations for alignment instead of permutations, the model being aligned can have its functionality altered post alignment. Therefore, when applying REPAIR to models merged with CCA Merge, we do not set the mean and standard deviation of the averaged model's activations to be the average of the mean and standard deviation of the models being merged (standard REPAIR). Instead, we simply reset the mean and standard deviation of the neurons to be the same as the ones of the reference model, i.e. the one to which no transformation is applied and therefore its functionality wasn't altered. To make sure that the comparison to the other methods is fair we have also tried doing this for all the other methods, with the results being around $1\%$ worse than simply applying standard REPAIR (results show in Table 6).
342
+
343
+ Table 6: VGG11/CIFAR10 - Accuracies and standard deviations after merging 2 models with REPAIR
344
+
345
+ <table><tr><td>Width multiplier</td><td>×1</td><td>×2</td><td>×4</td><td>×8</td></tr><tr><td>Base models avg.</td><td>87.27 ±0.25%</td><td>87.42 ±0.86%</td><td>87.84 ±0.21%</td><td>88.20 ±0.45%</td></tr><tr><td>Ensemble</td><td>89.65 ±0.13%</td><td>89.74 ±0.44%</td><td>90.12 ±0.16%</td><td>90.21 ±0.24%</td></tr><tr><td>Direct averaging</td><td>29.89 ±0.58%</td><td>43.16 ±5.19%</td><td>56.83 ±4.34%</td><td>73.75 ±3.12%</td></tr><tr><td>Permute</td><td>84.56 ±0.30%</td><td>85.72 ±0.87%</td><td>87.57 ±0.13%</td><td>88.35 ±0.62%</td></tr><tr><td>OT Fusion</td><td>83.33 ±0.32%</td><td>84.18 ±1.12%</td><td>86.34 ±0.38%</td><td>87.09 ±0.30%</td></tr><tr><td>Matching Weights</td><td>85.62 ±0.38%</td><td>86.98 ±0.34%</td><td>88.68 ±0.18%</td><td>88.94 ±0.14%</td></tr><tr><td>CCA Merge (ours)</td><td>85.02 ±0.27%</td><td>86.51 ±0.37%</td><td>87.38 ±0.55%</td><td>88.17 ±0.67%</td></tr></table>
346
+
347
+ # E. Why does CCA Merge outperform permutation-based methods in the multi-model setting?
348
+
349
+ # E.1. When merging multiple models, feature mismatches of permutation-based methods get compounded
350
+
351
+ When merging more than two models, say $\mathcal{A}$ , $\mathcal{B}$ and $\mathcal{C}$ in the 3-model case, we choose one reference model, WLOG model $\mathcal{A}$ , align all other models to that one and then merge by averaging (all-to-one merging). Let $\mathbf{T}_{\mathcal{BA}}$ denote the transformation aligning a given layer of model $\mathcal{B}$ to the same layer of model $\mathcal{A}$ and $\mathbf{T}_{\mathcal{CA}}$ the transformation aligning $\mathcal{C}$ to $\mathcal{A}$ at that same layer, we can also align $\mathcal{A}$ to $\mathcal{B}$ (resp. $\mathcal{C}$ ) by taking the inverse of $\mathbf{T}_{\mathcal{BA}}$ (resp. $\mathbf{T}_{\mathcal{CA}}$ ) which we denote $\mathbf{T}_{\mathcal{AB}} = \mathbf{T}_{\mathcal{BA}}^{-1}$ (resp. $\mathbf{T}_{\mathcal{AC}} = \mathbf{T}_{\mathcal{CA}}^{-1}$ ). This alignment to $\mathcal{A}$ also gives rise to an indirect matching between models $\mathcal{B}$ and $\mathcal{C}$ through $\mathcal{A}$ , since we can align $\mathcal{C}$ to $\mathcal{A}$ with $\mathbf{T}_{\mathcal{CA}}$ and then apply the transformation $\mathbf{T}_{\mathcal{AB}}$ to align it to $\mathcal{B}$ , we use $\mathbf{T}_{\mathcal{CAB}}$ to denote the transformation of this indirect alignment. In other words, neurons $i$ from $\mathcal{B}$ and $j$ from $\mathcal{C}$ are matched indirectly through $\mathcal{A}$ if they both are matched to the same neuron $k$ from $\mathcal{A}$ . To see why multi-model merging fails for permutations we can look at how this indirect matching of $\mathcal{B}$ and $\mathcal{C}$ ( $\mathbf{T}_{\mathcal{CAB}}$ ) compares to the direct matching of $\mathcal{B}$ and $\mathcal{C}$ found by directly optimizing for the transformation matrix $\mathbf{T}_{\mathcal{CB}}$ . It turns out that for permutation-based methods these matrices differ significantly, in fact the majority of neurons from net $\mathcal{C}$ , between $50 - 80\%$ on average, do not get matched with the same neuron from $\mathcal{B}$ if we use $\mathbf{T}_{\mathcal{CAB}}$ versus if we use the direct matching $\mathbf{T}_{\mathcal{CB}}$ .
352
+
353
+ In Fig. 7 we present the percent of neurons getting mismatched in this way by Permute for all merging layers inside a ResNet20 trained on CIFAR100. These results help explain why permutations-based methods suffer a drastic drop in accuracy as the number of models being merged increases since there are severe mismatches between the features being aligned that get compounded.
354
+
355
+ # E.2. The direct and indirect matching matrices $(\mathbf{T}_{\mathcal{CB}}$ and $\mathbf{T}_{\mathcal{CAB}}$ resp.) are closer for CCA Merge than for Permute
356
+
357
+ We can also look directly at the Frobenius norm of the difference between $\mathbf{T}_{\mathcal{CAB}}$ and $\mathbf{T}_{\mathcal{CB}}$ for CCA Merge and Permute to see for which method the indirect matching between $\mathcal{C}$ and $\mathcal{B}(\mathbf{T}_{\mathcal{CAB}})$ and the direct matching between $\mathcal{C}$ and $\mathcal{B}(\mathbf{T}_{\mathcal{CB}})$ are the most similar. We report the results for the same 20 merges considered above in Fig. 8. We see that the indirect and direct matching matrices between $\mathcal{C}$ and $\mathcal{B}$ are significantly closer for CCA Merge than for Permute, which helps explain why CCA Merge outperforms permutation-based methods in the multi-model setting.
358
+
359
+ We have run these analyses using the Permute matching method since it is the most straightforward to analyze and we have seen from our empirical results that it constitutes a strong baseline. However we expect all permutation-based methods to be susceptible to these types of non-optimal merging and mismatches because of their permutation matching matrices and since their accuracies behave similarly as the number of models being merged increases (for the multi-model scenario).
360
+
361
+ # F. Analysis of computational costs
362
+
363
+ We have tracked the runtime for 5 different 2-model merges of ResNet20x8 models trained on CIFAR100 and we report these values in the table below.
364
+
365
+ The merging for methods relying on data (Permute, ZipIt!, CCA Merge) can be split into 2 parts, computing the metrics (eg. covariances or correlations) and computing the transformations. Computing the metrics is by a large margin the most time-expensive part of the procedure, taking on average 33.44s when using the entire CIFAR100 training set. Computing the transforms on the other hand takes less than a second for Permute and CCA Merge and 3.77s for ZipIt!, which represents
366
+
367
+ ![](images/867e373099515e3ecded8e2336c0c9ca67cba60c404278b4d33609b0cf1dda43.jpg)
368
+ Figure 7: Percent $(\%)$ of neurons getting mismatched when merging ResNet20x8 models trained on CIFAR100. The mean and standard deviation across 20 possible 3-model merges out of a group of 6 models fully trained from different initializations are shown.
369
+
370
+ Table 7: Runtime for 5 different 2-model merges of ResNet20x8 models trained on CIFAR100
371
+
372
+ <table><tr><td></td><td>Permute</td><td>ZipIt!</td><td>CCA Merge</td><td>Matching Weights</td></tr><tr><td>Time for the whole merging (s)</td><td>33.63±0.08</td><td>37.39±0.34</td><td>34.50±0.57</td><td>3.07±0.27</td></tr><tr><td>Time for computing the transforms (s)</td><td>0.05±0.01</td><td>3.77±0.35</td><td>0.93±0.57</td><td></td></tr></table>
373
+
374
+ $\leq 3\%$ (for Permute and CCA Merge) and $10\%$ (for ZipIt!) of the time required for the entire merging. Among all data-based merging methods, CCA Merge performs the best in accuracy with comparable computation time, therefore it should be prioritized over other such methods. Matching Weights, which doesn't require data, takes 3.07s to complete, however it performs worse than CCA Merge in terms of accuracy in practice.
375
+
376
+ It is also valuable to describe how these costs scale with model and dataset size. Computing the correlations scales quadratically with the number of neurons in a layer and linearly with the dimension of the activations (which takes into account the size of the input images and the number of examples used to compute the metrics).
377
+
378
+ # G. Merged Models vs. Endpoint Models Accuracies
379
+
380
+ In past works such as Ainsworth et al. (2023) or Jordan et al. (2023), the merged ResNet models achieving the same accuracy as the endpoint models (or close to) when training on the full train datasets have been extremely wide ones. Specifically, for the ResNet20 architecture on CIFAR10 those results were obtained for models of widths $\times 16$ or greater. Zero barrier merging was not achieved for the model widths considered in our work. Exploring the very wide model setting is not an objective of ours since the effect of model width on merging is already well understood, with wider models leading to better performing merges (Entezari et al., 2022; Ainsworth et al., 2023; Jordan et al., 2023). Therefore we only trained models of width up to $\times 8$ , which are more likely to be encountered in practice. For the model widths reported in our work the accuracy barriers are consistent with those reported in Jordan et al. (2023) for Permute (solving the linear sum assignment problem maximizing the correlation between matched neurons), with CCA Merge outperforming those results.
381
+
382
+ Furthermore, our ResNet20 results are reported on the CIFAR100 dataset which is a harder classification task than CIFAR10, therefore it is harder to achieve zero-barrier merging. Also, in all the disjoint training scenarios presented in Table 3 we do achieve greater accuracy than the endpoint models and outperform past methods, not only in settings considered by past works such as $80\% -20\%$ training splits but in novel settings as well, such as Dirichlet training splits.
383
+
384
+ ![](images/db54ba4b7e3e1baf751b04cd600a6118ddb1f7856a5b12ae59cd718f5f3cd726.jpg)
385
+ Figure 8: Frobenius norm of the difference between the transformation matrices $\mathbf{T}_{\mathcal{B},\mathcal{A}\mathcal{C}}$ , aligning $\mathcal{B}$ and $\mathcal{C}$ through $\mathcal{A}$ , and $\mathbf{T}_{\mathcal{B}\mathcal{C}}$ aligning $\mathcal{B}$ and $\mathcal{C}$ directly. The mean and standard deviation across 20 possible 3-model merges out of a group of 6 models fully trained from different initializations are shown.
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cf476ac392cc6f7117a1d57ad7780011040b725a5ba9ba743215bd087d6e305
3
+ size 745973
2024/Harmony in Diversity_ Merging Neural Networks with Canonical Correlation Analysis/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HarmonyDream_ Task Harmonization Inside World Models/47ca1891-c736-4bc8-9421-02459b7f45e3_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e63858b230288204bd25378eece3bd6ed0363b855100261fe2a77b367d9402c9
3
+ size 3021549
2024/HarmonyDream_ Task Harmonization Inside World Models/full.md ADDED
@@ -0,0 +1,787 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HarmonyDream: Task Harmonization Inside World Models
2
+
3
+ Haoyu Ma $^{1}$ Jialong Wu $^{1}$ Ningya Feng $^{1}$ Chenjun Xiao $^{2}$ Dong Li $^{2}$ Jianye Hao $^{23}$ Jianmin Wang $^{1}$ Mingsheng Long $^{1}$
4
+
5
+ # Abstract
6
+
7
+ Model-based reinforcement learning (MBRL) holds the promise of sample-efficient learning by utilizing a world model, which models how the environment works and typically encompasses components for two tasks: observation modeling and reward modeling. In this paper, through a dedicated empirical investigation, we gain a deeper understanding of the role each task plays in world models and uncover the overlooked potential of sample-efficient MBRL by mitigating the domination of either observation or reward modeling. Our key insight is that while prevalent approaches of explicit MBRL attempt to restore abundant details of the environment via observation models, it is difficult due to the environment's complexity and limited model capacity. On the other hand, reward models, while dominating implicit MBRL and adept at learning compact task-centric dynamics, are inadequate for sample-efficient learning without richer learning signals. Motivated by these insights and discoveries, we propose a simple yet effective approach, HarmonyDream, which automatically adjusts loss coefficients to maintain task harmonization, i.e. a dynamic equilibrium between the two tasks in world model learning. Our experiments show that the base MBRL method equipped with HarmonyDream gains $10\% - 69\%$ absolute performance boosts on visual robotic tasks and sets a new state-of-the-art result on the Atari 100K benchmark. Code is available at https://github.com/thuml/HarmonyDream.
8
+
9
+ *Equal contribution $^{1}$ School of Software, BNrist, Tsinghua University. $^{2}$ Huawei Noah's Ark Lab. $^{3}$ College of Intelligence and Computing, Tianjin University.
10
+ Haoyu Ma <mhy22@mails.tsinghua.edu.cn>. Jialong Wu <wujialong0229@gmail.com>. Correspondence to: Mingsheng Long <mingsheng@tsinghua.edu.cn>.
11
+
12
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
13
+
14
+ # 1. Introduction
15
+
16
+ Learning efficiently to operate in environments with complex observations requires generalizing from past experiences. Model-based reinforcement learning (MBRL, Sutton (1990)) utilizing world models (Ha & Schmidhuber, 2018; LeCun, 2022) offers a promising approach. In MBRL, the agent learns behaviors by simulating trajectories based on world model predictions. These imaginary rollouts can reduce the need for real-environment interactions, thus improving the sample efficiency of model-based agents.
17
+
18
+ Concretely, world models are designed to learn and predict two key components of dynamics (formally defined in Sec. 2.1): how the environment transits and is observed (i.e. the observation modeling task) and how the task has been progressed (i.e. the reward modeling task) (Kaiser et al., 2020; Hafner et al., 2020; 2021). While observation transitions and rewards in low-dimensional spaces can be classically learned by separate models, for environments with high-dimensional and partial observations, it is favorable for world models to learn both tasks from a shared representation, a form of multi-task learning $^{1}$ (Caruana, 1997), aiming to improve learning efficiency and generalization performance (Jaderberg et al., 2017; Laskin et al., 2020; Yarats et al., 2021). However, to best exploit the benefits of multi-task learning, it demands careful designs to weigh the contribution of each task without allowing either one to dominate (Misra et al., 2016; Kendall et al., 2018), which naturally leads to the following question:
19
+
20
+ # How do MBRL methods properly exploit the intrinsic multi-task benefits within world model learning?
21
+
22
+ In this work, we take a unified multi-task view to revisit world model learning in MBRL literature (Moerland et al., 2023): Prevalent explicit MBRL approaches (Kaiser et al., 2020; Hafner et al., 2021; Seo et al., 2022b), which is also our primary focus, aim to learn an exact duplicate of the environment by predicting each element (e.g., observations, rewards, and terminal signals), which gives the agent access to accurately learned transitions. However, learning to predict future observations can be difficult and inefficient since
23
+
24
+ ![](images/b7f5e7e2034cb3c47bd310fd91de659efaa639e81b7d5eaafde7fc47fe272f4b.jpg)
25
+ Figure 1. A multi-task view of world models. (Left) World models typically consist of components for two tasks: observation modeling and reward modeling. (Right) A spectrum of world model learning in MBRL. Explicit MBRL learns models dominated by observation modeling, while implicit MBRL relies solely on reward modeling. In the spirit of implicit MBRL, our proposed HarmonyDream enables explicit MBRL to maintain a dynamic equilibrium between them to unleash the multi-task benefits of world model learning, thus boosting the sample efficiency of MBRL.
26
+
27
+ it encourages the world model to capture everything in the environment, including task-irrelevant nuances (Okada & Taniguchi, 2021; Deng et al., 2022). Consequently, world model learning in explicit MBRL is typically dominated by observation modeling to capture complex observations and their associated dynamics but still suffers from model inaccuracies and compounding errors. This can be overcome by the spirit of implicit MBRL, which learns task-centric world models solely from reward modeling (Oh et al., 2017; Schrittwieser et al., 2020; Hansen et al., 2022) to realize the value equivalence principle, i.e., the predicted rewards along a trajectory of the world model matches that of the real environment (Grimm et al., 2020). This approach builds world models directly useful for MBRL to identify the optimal policy or value, and tends to perform better in tasks where the complete dynamics related to observations are too complicated to be perfectly modeled. Nevertheless, as the reward signals in RL are known to be sparser than signals in self-supervised learning, potentially leading to representation learning challenges, it is more practical to incorporate auxiliary tasks that provide richer learning signals beyond rewards (Jaderberg et al., 2017; Anand et al., 2022).
28
+
29
+ To support the above insights, we conduct a dedicated empirical investigation and reveal surprising deficiencies in sample efficiency within the default practice of a state-of-the-art model-based method (Dreamer, Hafner et al. (2020; 2021; 2023)). Notably, increasing the coefficient of reward loss in world model learning leads to dramatically boosted sample efficiency (see Sec. 2.3). Our analysis identifies the root cause as the domination of observation models in explicit world model learning: due to an overload of redundant observation signals, the model may establish spurious correlations in observations without realizing incorrect reward predictions, which ultimately hinders the learning process of the agent. On the other hand, a pure implicit version of Dreamer, which learns world models solely exploiting reward modeling, is also proven to be inefficient. In summary, domination of either task cannot properly exploit the multi-task benefits within world model learning.
30
+
31
+ As shown in Fig. 1, we propose to address the problem with HarmonyDream, a simple approach for explicit world model learning that exploits the advantages of both sides. By automatically adjusting loss coefficients through lightweight harmonizers, HarmonyDream seeks task harmonization inside world models, i.e., it maintains a dynamic equilibrium between reward and observation modeling during world model learning. We evaluate our approach on various challenging visual control domains, including Meta-world (Yu et al., 2020b), RLbench (James et al., 2020), distracted DMC variants (Grigsby & Qi, 2020; Zhang et al., 2018), the Atari 100K benchmark (Kaiser et al., 2020), and a challenging task from Minecraft (Fan et al., 2022), demonstrating consistent improvements in sample efficiency and generality to different base MBRL approaches (Deng et al., 2022).
32
+
33
+ The main contributions of this work are three-fold:
34
+
35
+ - To the best of our knowledge, our work, for the first time, systematically identifies the multi-task essence of world models and analyzes the deficiencies caused by the domination of a particular task, which is unexpectedly overlooked by most previous works.
36
+ - We propose HarmonyDream, a simple yet effective world model learning approach to mitigate the domination of either observation or reward modeling, without the need for exhaustive hyperparameter tuning.
37
+ - Our experiments show that HarmonyDream improves Dreamer with $10\% - 69\%$ higher success rates or episode returns (up to $90\%$ more success on Meta-world Assembly) in visual robotic tasks. Moreover, our method reaches a new state of the art, $136.5\%$ mean human performance, on the Atari 100K benchmark.
38
+
39
+ # 2. A Multi-task Analysis in World Models
40
+
41
+ In this paper, we focus on vision-based RL tasks, formulated as partially observable Markov decision processes (POMDP). A POMDP is defined as a tuple
42
+
43
+ ![](images/5c9d3658459798a85c96f15f185df125319f667c75a7b6498ef062c26e350024.jpg)
44
+ (a) Learning curves of different loss coefficients
45
+
46
+ ![](images/a494bebe00acb3c16f7efb7d58eef89a321a7150e8d214f96dd9887023d38765.jpg)
47
+ (b) Loss scales
48
+ Figure 2. Analysis experiments revealing the (b) imbalanced nature of world model learning and potential multi-task benefits yet to be properly exploited. Simply adjusting the coefficient of reward loss leads to (a) dramatically boosted sample efficiency of DreamerV2 agents and (c) better representations with lower environment state regression errors.
49
+
50
+ ![](images/5cd233d7f3df17bab74c3928ecef0c8d0bd27d9aac365d88a256b96e34ba9d19.jpg)
51
+ (c) State regression
52
+
53
+ $(\mathcal{O}, \mathcal{A}, p, r, \gamma)$ , where actions $a_{t} \sim \pi(a_{t} | o_{\leq t}, a_{< t})$ generated by the agent receive high-dimensional observations $o_{t} \sim p(o_{t} | o_{< t}, a_{< t})$ and scalar rewards $r_{t} = r(o_{\leq t}, a_{< t})$ generated by the unknown transition dynamics $p$ and reward function $r$ . The goal of MBRL is to learn an agent that maximizes the $\gamma$ -discounted cumulative rewards $\mathbb{E}_{p,\pi}\left[\sum_{t=1}^{T} \gamma^{t-1} r_{t}\right]$ , leveraging a learned world model which approximates the underlying environment $(p, r)$ .
54
+
55
+ # 2.1. Two tasks in World Models
56
+
57
+ Two key tasks can be formally identified in world models, namely observation modeling and reward modeling.
58
+
59
+ Definition 2.1. The observation modeling task in world models is to predict consequent observations $p(o_{t+1:T} \mid o_{1:t}, a_{1:T})$ of a trajectory, given future actions. Similarly, the reward modeling task in world models is to predict future rewards $p(r_{t+1:T} \mid o_{1:t}, a_{1:T})$ .
60
+
61
+ As mentioned before, these two tasks provide a unified view of MBRL: while explicit MBRL learns world models for both observations and rewards to mirror the complete dynamics of the environment, implicit MBRL only learns from reward modeling to capture task-centric dynamics.
62
+
63
+ # 2.2. Overview of World Model Learning
64
+
65
+ We conduct detailed analysis and build our method primarily upon DreamerV2 $^{2}$ (Hafner et al., 2021), but we also demonstrate the generality of our method to various base MBRL algorithms, including DreamerV3 (Hafner et al., 2023) and DreamerPro (Deng et al., 2022) (see Sec. 4.4).
66
+
67
+ The world model in Dreamer (left in Fig. 1) consists of the following four components:
68
+
69
+ Representation model: $z_{t}\sim q_{\theta}(z_{t}|z_{t - 1},a_{t - 1},o_{t})$
70
+
71
+ Observation model: $\hat{o}_t\sim p_\theta (\hat{o}_t\mid z_t)$
72
+
73
+ Transition model: $\hat{z}_t\sim p_\theta (\hat{z}_t|z_{t - 1},a_{t - 1})$ (1)
74
+
75
+ Reward model: $\hat{r}_t\sim p_\theta (\hat{r}_t|z_t)$
76
+
77
+ The latent representation $z_{t}$ is generated by the representation model using the previous latent state $z_{t-1}$ , the current action $a_{t-1}$ , and the current visual observation $o_{t}$ . The latent prediction $\hat{z}_{t}$ , meanwhile, is generated by the transition model using only the previous state and current action. All model parameters $\theta$ are trained to learn the observations, rewards, and transitions of the environment by jointly minimizing the following objectives:
78
+
79
+ Observation loss: $\mathcal{L}_o(\theta) = -\log p_\theta (o_t|z_t)$
80
+
81
+ Reward loss: $\mathcal{L}_r(\theta) = -\log p_\theta (r_t\mid z_t)$ (2)
82
+
83
+ Dynamics loss: $\mathcal{L}_d(\theta) = \mathrm{KL}[q_\theta (z_t\mid z_{t - 1},a_{t - 1},o_t)$
84
+
85
+ $$
86
+ \left. \left\| p _ {\theta} \left(\hat {z} _ {t} \mid z _ {t - 1}, a _ {t - 1}\right) \right], \right.
87
+ $$
88
+
89
+ where the dynamics loss simultaneously trains the latent predictions toward the representations, and regularizes the representations to be predictable. In practice, the observation model and reward model typically leverage Gaussian distributions, and both losses take the form of a simple $L_{2}$ loss between prediction $\hat{o}_t,\hat{r}_t$ and ground truth $o_t,r_t$ respectively, excluding irrelevant constants.
90
+
91
+ Taking our multi-task view, the observation model and reward model with their associated losses account for the aforementioned two tasks in the world model of Dreamer. However, they do not operate in isolation and instead interact with and regularize each other upon the shared representation and transition model, in pursuit of either complete or task-centric latent dynamics, respectively.
92
+
93
+ The overall objective can be formulated as follows:
94
+
95
+ $$
96
+ \mathcal {L} (\theta) = w _ {o} \mathcal {L} _ {o} (\theta) + w _ {r} \mathcal {L} _ {r} (\theta) + w _ {d} \mathcal {L} _ {d} (\theta). \tag {3}
97
+ $$
98
+
99
+ By default, $w_{o}$ , $w_{r}$ , and $w_{d}$ are typically set to approximately equal weights (namely, $w_{o} = w_{r} = w_{d} = 1.0$ ) (Hafner et al., 2020; 2021; Seo et al., 2022b; Wu et al.,
100
+
101
+ ![](images/83848e46d073b0131d52825e45330cd07dbe07ff0fed71300ca2b1d3c7693d05.jpg)
102
+ Figure 3. Analysis of world models learned with different reward loss coefficients. Rewards are labeled at the bottom right corner, with predictions marked as correct or incorrect. Dominating observation modeling in world models incurs spurious correlations between actions, observations, and rewards, which can be dissolved by properly emphasizing reward modeling.
103
+
104
+ 2022), overlooking the potential domination of a particular task. In contrast, we conduct a careful empirical investigation to understand the role each task plays in world models and reveal the deficiency of the default weighting strategy.
105
+
106
+ # 2.3. Dive into World Model Learning
107
+
108
+ We consider the tasks of pulling a lever up, pulling a handle up sideways, and hammering a screw on the wall, from the Meta-world domain (Yu et al., 2020b), as our testbed to investigate world model learning. The prominent improvements of the derived approach in our benchmark experiments (see Sec. 4) prove that our discoveries can be generalized to various domains and tasks.
109
+
110
+ First of all, we experiment with simply adjusting the coefficient of the reward loss in Eq. (3). Results in Fig. 2a reveal a surprising fact that by simply tuning the reward loss weights $(w_{r} \in \{1, 10, 100\})$ , the agent can achieve considerable improvements in terms of sample efficiency.
111
+
112
+ # Finding 1. Leveraging the reward loss by adjusting its coefficient in world model learning has a great impact on the sample efficiency of model-based agents.
113
+
114
+ One obvious reason for this is that the reward loss only accounts for a tiny proportion of the learning signals, actually a single scalar $r_t$ . As shown in Fig. 2b, the scale of $\mathcal{L}_r$ is two orders of magnitude smaller than that of $\mathcal{L}_o$ , which usually aggregates $H \times W \times C$ dimensions: $\log p_{\theta}(o_t | z_t) = \sum_{h,w,c} \log p_{\theta}(o_t^{(h,w,c)} | z_t)$ . As discussed before, reward modeling is crucial for extracting task-relevant representations and driving behavior learning of the agents. Dominated by observation modeling, the world model fails to learn a task-centric latent space and predict accurate rewards, which hinders the agent learning process.
115
+
116
+ We then explore further to demonstrate how the observation modeling task dominating world models can specifically hurt behavior learning. To isolate distracting factors, we
117
+
118
+ consider an offline setting (Levine et al., 2020). Concretely, we use a fixed replay buffer on the task of Lever Pull and offline train DreamerV2 agents with different reward loss coefficients on it (see details in Appendix C.4). In Fig. 3, we showcase a trajectory where the default Dreamer agent $(w_{r} = 1)$ fails to lift the lever. It is evident that it learns a spurious correlation (Geirhos et al., 2020) between the actions of the robot and that of the lever and predicts inaccurate transitions and rewards, which misleads the agents to unfavorable behaviors. Properly balancing the reward loss $(w_{r} = 100)$ can emphasize task-relevant information, such as whether the lever is actually lifted, to correct hallucinations by world models. Quantitative analysis in Fig. 2c measuring the ability of world models' representations to predict the ground truth states also suggests emphasizing reward modeling learns better task-centric representations.
119
+
120
+ # Finding 2. Observation modeling as a dominating task can result in world models establishing spurious correlations without realizing incorrect reward predictions.
121
+
122
+ Although we have shown above that exploiting reward modeling can bring benefits to world models and MBRL, learning world models depending solely on scarce reward signals, as implicit MBRL, has limited capability to learn meaningful representations, and thus can encounter optimization challenges and hinder sample-efficient learning (Yarats et al., 2021). Our experiment results in Fig. 2a show that a pure implicit version of DreamerV2 without the observation loss $(w_{o} = 0)$ produces inferior results with a high variance.
123
+
124
+ # Finding 3. Learning signal of world models from rewards alone without observations is inadequate for sample-efficient model-based learning.
125
+
126
+ Discussion. We are not the first to adjust loss coefficients in world model learning, but we dedicatedly investigate this. Here we discuss the differences between our findings and previous literature. Our Finding 1 coincides with high re
127
+
128
+ ![](images/0bd2020627958a070a25f091c32f41be5857418a278ca16f01f40b1b7d49e768.jpg)
129
+ Figure 4. Overview of HarmonyDream. (Left) Built upon Dreamer, we introduce lightweight harmonizers to maintain a dynamic equilibrium between tasks. (Right) Comparison between the original harmonious loss (Eq. (4)) and the rectified one (Eq. (5)). The latter prevents an extremely large loss weight.
130
+
131
+ ![](images/6f8a7c453d60941952ca153cee176f67cbcfeb78599b9b91195c7a658adf9e94.jpg)
132
+
133
+ ward loss weights manually tuned (typically 100 or 1000) in decoder-free model-based RL (Nguyen et al., 2021; Deng et al., 2022). Our analysis differs from theirs in two significant ways: 1) We focus on a decoder-based world model, where the observations are learned from explicit reconstructions. 2) We discovered that emphasizing reward modeling is also beneficial for visually simple tasks (e.g. Meta-world tasks), in addition to visually demanding tasks with noisy backgrounds. Our Finding 3 is similar to the reward-only ablation in Dreamer (Hafner et al., 2020), but we prove that even if given higher loss weights, learning a world model purely from rewards is less sample-efficient than properly exploiting both observation and reward modeling.
134
+
135
+ # 3. HarmonyDream
136
+
137
+ In light of the discoveries and insights, we propose a simple yet effective method, HarmonyDream, as the first step towards exploiting the multi-task essence of explicit world model learning. Instead of task domination, we aim to dynamically maintain a harmonious interaction between the two tasks in world models: while observation modeling facilitates representation learning and prevents information loss, reward modeling enhances task-centric representations to inform behavior learning of the agents.
138
+
139
+ HarmonyDream mitigates the potential domination of a particular task in world models by introducing lightweight harmonizers, as shown in Fig. 4. Specifically, to maintain a dynamic equilibrium and avoid task domination, losses associated with different tasks are scaled to the same constant. A straightforward but suboptimal way is to set each loss weight to the reciprocal of the corresponding loss, i.e., $w_{i} = \mathrm{sg}\left(\frac{1}{\mathcal{L}_{i}}\right), i \in \{o,r,d\}$ , where sg is a stop gradient function. Technically, as the loss is only calculated from a mini-batch of data and fluctuates throughout training, these weights are sensitive to outlier values and thus may further aggravate training instability. Instead, we adopt a variational method to learn the weights of different losses by the following harmonic loss for world model learning:
140
+
141
+ $$
142
+ \begin{array}{l} \mathcal {L} (\theta , \sigma_ {o}, \sigma_ {r}, \sigma_ {d}) = \sum_ {i \in \{o, r, d \}} \mathcal {H} (\mathcal {L} _ {i} (\theta), \sigma_ {i}) \\ = \sum_ {i \in \{o, r, d \}} \frac {1}{\sigma_ {i}} \mathcal {L} _ {i} (\theta) + \log \sigma_ {i}. \tag {4} \\ \end{array}
143
+ $$
144
+
145
+ The variational formulation $\mathcal{H}(\mathcal{L}_i(\theta),\sigma_i) = \sigma_i^{-1}\mathcal{L}_i(\theta) + \log \sigma_i$ serves as harmonizers to dynamically but smoothly rescale different losses, where the weight $\sigma_{i}^{-1}$ with a learnable parameter $\sigma_{i} > 0$ approximates a "global" reciprocal of the loss scale, as stated in the following proposition:
146
+
147
+ Proposition 3.1. The optimal solution $\sigma^{*}$ that minimizes the expected loss $\mathbb{E}[\mathcal{H}(\mathcal{L},\sigma)]$ , or equivalently $\nabla_{\sigma}\mathbb{E}[\mathcal{H}(\mathcal{L},\sigma)] = 0$ , is $\sigma^{*} = \mathbb{E}[\mathcal{L}]$ . In other words, the harmonized loss scale is $\mathbb{E}[\mathcal{L} / \sigma^{*}] = 1$ .
148
+
149
+ In practice, $\sigma_{i}$ is parameterized as $\sigma_{i} = \exp (s_{i}) > 0$ , in order to optimize parameters $s_i$ free of sign constraint. More essentially, we propose a rectification on Eq. (4), since a loss $\mathcal{L}$ with small values, such as the reward loss, can lead to extremely large coefficient $1 / \sigma \approx \mathcal{L}^{-1} \gg 1$ , which potentially hurt training stability. Specifically, we simply add a constant in regularization terms:
150
+
151
+ $$
152
+ \begin{array}{l} \mathcal {L} (\theta , \sigma_ {o}, \sigma_ {r}, \sigma_ {d}) = \sum_ {i \in \{o, r, d \}} \hat {\mathcal {H}} (\mathcal {L} _ {i} (\theta), \sigma_ {i}) \\ = \sum_ {i \in \{o, r, d \}} \frac {1}{\sigma_ {i}} \mathcal {L} _ {i} (\theta) + \log (1 + \sigma_ {i}). \tag {5} \\ \end{array}
153
+ $$
154
+
155
+ The harmonized loss scale by the rectified harmonic loss is equal to $\frac{2}{1 + \sqrt{1 + 4 / \mathbb{E}[\mathcal{L}]}} < 1$ (derived in Appendix B). We illustrate the corresponding loss weights learned with different loss scales in the right of Fig. 4, showing that the rectified loss effectively mitigates extremely large weights.
156
+
157
+ Discussion. Our harmonious loss is related in spirit to uncertainty weighting (Kendall et al., 2018) but has several key differences. Uncertainty weighting is derived from maximum likelihood estimation, which parameterizes noises
158
+
159
+ ![](images/7fc6d1d977b56d7e49fa646f74dcf8baf34b8a8514c3a92af7bbc148e4c820b1.jpg)
160
+ (a) Meta-world
161
+
162
+ ![](images/002758eb1b2b52081f86dc26d60ae9aaec25369c1a18909158f4e8c1ad4c17b7.jpg)
163
+ Figure 5. Visual control domains for evaluation, including robotic manipulation (a-b), distracted locomotion (c), and video games (d-e).
164
+
165
+ ![](images/99ec86e5e4a3a405f0ae1dd6d12ee577d0357838c6dbbc6f824e37741ba283dc.jpg)
166
+ (b) RLBench
167
+
168
+ ![](images/e09ffa57be06a650f69688af438f4ab69fbac99ff577b0175fb8b71fe8121511.jpg)
169
+
170
+ ![](images/8ee32323c89faf9d51c6028345659b4794adc9e248db1296f00f62e7053c8281.jpg)
171
+ (c) Distracted DMC variants
172
+
173
+ ![](images/add325c19840a77fcc6a1dc7b131fc98e3912b354e5510b71f9cd8e26f89bf28.jpg)
174
+
175
+ ![](images/96708c0769c07149c43529b1d544ed716630e09e2724d4f993e4cdc524e1b6f2.jpg)
176
+ (d) Atari
177
+
178
+ ![](images/32f987dffb1c7e7088b744cedc050263e7136ee3abf7372c0ae52a1af8e315b3.jpg)
179
+ (e) Minecraft
180
+
181
+ of Gaussian-distributed outputs of each task, known as homoscedastic uncertainty. In contrast, our motivation is to balance loss scales among tasks. More specifically, measuring the uncertainty of observations and rewards results in putting each observation pixel on equal footing as the scalar reward, still overlooking the large disparity in dimension sizes. However, we take high-dimensional observations as a whole and directly balance the two losses. Furthermore, we do not make assumptions on the distributions behind losses, which makes it possible for us to balance the KL loss, while uncertainty weighting has no theoretical basis for doing so.
182
+
183
+ # 4. Experiments
184
+
185
+ We evaluate the ability of HarmonyDream to boost sample efficiency of base MBRL methods on diverse and challenging visual control domains as shown in Figure 5, including robotic manipulation and locomotion, and video game tasks. We conduct most experiments for HarmonyDream based on DreamerV2 but also demonstrate its generality to other base MBRL methods, including DreamerV3 (Hafner et al., 2023) and DreamerPro (Deng et al., 2022). Experimental details and additional results can be found in Appendix C and E.
186
+
187
+ # 4.1. Meta-world Experiments
188
+
189
+ Environment details. Meta-world is a benchmark of 50 robotic manipulation tasks with fine-grained observation details, such as small target objects. Due to our limited computational resources, we choose a set of representative tasks according to the categories of task difficulty by Seo et al. (2022a): two from the easy category (Lever Pull and Handle Pull Side), two from the medium category (Hammer and Sweep Into), and two from the hard category (Push and Assembly). These tasks are run over different numbers of environment steps: easy tasks and Hammer over 250K steps, Sweep Into over 500K steps, the else over 1M steps.
190
+
191
+ Results. In Fig. 6a, we report the performance of HarmonyDream on six Meta-world tasks, in comparison with our base MBRL method DreamerV2. By simply adding harmonizers to the original DreamerV2 method, our HarmonyDream demonstrates superior performance in terms of both sample efficiency and final success rate. In particular, HarmonyDream achieves over $75\%$ and $90\%$ success rates on the challenging Push and Assembly tasks, respectively, while DreamerV2 fails to learn a meaningful policy.
192
+
193
+ # 4.2. RLBench Experiments
194
+
195
+ Environment details. To assess our method on more complex visual robotic manipulation tasks, we perform evaluations on the RLBench (James et al., 2020) domain. Most tasks in RLBench have high intrinsic difficulty and only offer sparse rewards. Learning these tasks requires expert demonstrations, dedicated network structure, and additional inputs (James & Davison, 2022; James et al., 2022), which is out of our scope. Therefore, following Seo et al. (2022a), we conduct experiments on two relatively easy tasks (Push Button and Reach Target) with dense rewards.
196
+
197
+ Results. In Fig. 6b, we show the superiority of our approach on the RLBench domain. HarmonyDream offers $28\%$ of absolute final performance gain on the Push Button task and $50\%$ on the more difficult Reach Target tasks. The results presented above prove the ability of HarmonyDream to promote sample efficiency of model-based RL on robotic manipulation domains for both easy and difficult tasks.
198
+
199
+ # 4.3. DMC Remastered Experiments
200
+
201
+ Environment details. DMC Remastered (Grigsby & Qi, 2020) is a challenging extension of the widely used robotic locomotion benchmark, DeepMind Control Suite (Tassa et al., 2018) with randomly generated graphics emphasizing visual diversity. We train and evaluate our agents on three tasks: Cheetah Run, Walker Run, and Cartpole Balance.
202
+
203
+ Results. Fig. 7a demonstrates the effectiveness of HarmonyDream on three DMCR tasks. Our method greatly enhances the base DreamerV2 method to unleash its potential. Fig. 7b shows different learning curves of the dynamics loss between HarmonyDream and DreamerV2. It is worth noting that DMCR tasks contain distracting visual factors, such as background and robot body color, which may hinder the learning process of observation modeling. DreamerV2 diverges in learning loss on this task, but by leveraging the importance of reward modeling, HarmonyDream bypasses distractors in observations and can learn task-centric transitions more easily, indicated by converged dynamics loss.
204
+
205
+ # 4.4. Generality to Model-based RL Methods
206
+
207
+ DreamerV3. DreamerV3 (Hafner et al., 2023) improves DreamerV2 to master diverse domains. Notably, our method is orthogonal to the various modifications in DreamerV3.
208
+
209
+ ![](images/db638d276e93c3e0113d53068c8d3242c12dc740115029a74e90c25d6c85e4a4.jpg)
210
+
211
+ ![](images/8974cfd823b232eece00040ac98e1eb143e5d46022f5d05eef4a10501ed16430.jpg)
212
+
213
+ ![](images/f538a865505d4e003e839c407bf014f284d1194e862db154d3c894a4e4771a24.jpg)
214
+
215
+ ![](images/12ebd661d22bed763b58424e96314da860fa824686e57fa8b7f10b30a5d878e3.jpg)
216
+
217
+ ![](images/4a4c4f74d72057ddb3f48636e440fe6dfd46c3b2f68db481c499fa218b496c51.jpg)
218
+ Figure 6. Learning curves on visual manipulation tasks from (a) Meta-World and (b) RLBench benchmarks, measured on the success rate. We report the mean and $95\%$ confidence interval across five runs.
219
+
220
+ ![](images/00971453356c9c60d95cb500d2501986ceebacfef8a2b3c918745026ba358b1c.jpg)
221
+ (a) Meta-world
222
+
223
+ ![](images/59a7c2a8e5fc78627190b6728cd348f1b546aa7e82a3bbeec14812087df19461.jpg)
224
+
225
+ ![](images/1e499fae13495fecb91ea76c79593cf9100905d70a7674c39ba1702d92abbc4e.jpg)
226
+ (b) RLBench
227
+
228
+ ![](images/6e657516841b6c51aa3e25578004297bd4874d7943b347231db4a725fc0afba6.jpg)
229
+ (a) Learning curves
230
+
231
+ ![](images/7387cae02a0a65df86fdce110dcf95dba4ff0c70a8b845a7ac66e423c5a477d9.jpg)
232
+ Figure 7. Learning curves (a) on three DMC Remastered visual locomotion tasks and (b) one dynamics loss curve shown on Cheetah Run. We report the mean and $95\%$ confidence interval across five runs.
233
+
234
+ ![](images/6d41f66ac8c01be2fbdeb7e46601d22ac3ab080272e1dd8d195143b9bc5f0f9c.jpg)
235
+
236
+ ![](images/3af386ff13d2470f3a0f8e7c7cfee2eabac76c2068eba58c6c1bde8ca245f9b1.jpg)
237
+ (b) Dynamics loss
238
+
239
+ DreamerV3 introduces a static symlog transformation to mitigate the problem of different per-dimension scales across environment domains, while HarmonyDream dynamically balances the overall loss scales across tasks in world model learning, considering together per-dimension scales, dimensions, and training dynamics. We refer to a detailed discussion in Appendix D.1. Experiments on Meta-world and RLBench, as shown in Fig. 8, illustrate that our method can combine with DreamerV3 to further improve performance. To further illustrate the applicability of our method, we also evaluate our Harmony DreamerV3 on two video game domains: Minecraft and Atari. For the Minecraft domain, we choose a challenging task of learning a basic skill, Hunt Cow, from the MineDojo benchmark (Fan et al., 2022). As shown in Fig. 9, Harmony DreamerV3 exhibits great improvement in the Minecraft domain. For the Atari 100K benchmark (Kaiser et al., 2020), we improve DreamerV3 to achieve $136.5\%$ of mean human performance, setting a new state of the art among methods without lookahead search.
240
+
241
+ DreamerPro. DreamerPro (Deng et al., 2022) is a model-based RL method that "reconstructs" the cluster assignment of the observation. We conduct DreamerPro experiments on the DMCR domain. By default, DreamerPro uses a manually tuned reward loss weight $w_{r} = 1000$ . We demonstrate in Fig. 8 that our method can still achieve higher sample efficiency and, on average, outperform manually tuned loss weights that are computationally costly.
242
+
243
+ # 4.5. Analysis
244
+
245
+ Comparison to implicit MBRL. As shown in Sec. 2.3, learning from reward modeling alone lacks sample efficiency. However, one may argue that purposefully designed implicit MBRL methods can be more effective. In Fig. 10a, we show comparisons with an implicit MBRL method, TD-MPC (Hansen et al., 2022) on three tasks of Meta-world. We observe that TD-MPC has difficulty in efficient learning as it lacks observation modeling to guide representation learning. In contrast, our method achieves superior performance. We
246
+
247
+ ![](images/6c7ba09e8e95e854527685568271a76f4006ce3a2d7195e15fa0edc4ea1ce454.jpg)
248
+ Figure 8. Performance of HarmonyDream applied to DreamerV3 (left) and DreamerPro (right).
249
+
250
+ ![](images/256aac30d0d255f2d2772dbbf186bc0d1437e3308a1ea14818089063c5236db5.jpg)
251
+
252
+ ![](images/26f804afa4c83505c15b76f56cd7a18b9f4bdebf097b3bd650f9b4e34bed6bef.jpg)
253
+
254
+ ![](images/de5839226dadf4c2911b6ff3a61dd18c040d085196008e62402ac9267d810fba.jpg)
255
+
256
+ ![](images/7b8788b26c89bffc9f47971166450c184e3eb7b4051df96ef0033a507aaac634.jpg)
257
+ Figure 9. Performance of HarmonyDream based on DreamerV3 on the Atari 100K benchmark (left) and the Hunt Cow task from the MineDojo benchmark (right).
258
+
259
+ also compare with another implicit MBRL method, RePo (Zhu et al., 2023), as shown in the following paragraph.
260
+
261
+ Comparison to Dreamer-based task-centric methods. Denoised MDP (Wang et al., 2022) and RePo (Zhu et al., 2023) represent modifications to the Dreamer architecture that share a similar point with our approach in enhancing task-centric representations. We compare our method to these two methods on Meta-world, DMC Remastered, and additionally, natural background DMC (Zhang et al., 2018), which is also a distracted DMC variant used originally in the RePo paper. Fig. 11 shows that our HarmonyDream has a higher sample efficiency than Denoised MDP and RePo. Detailed discussion and comparison to these methods can be found in Appendix E.9 and E.10, respectively.
262
+
263
+ Comparison to multi-task learning methods. While our focus is not on developing a new multi-task learning method, we compare HarmonyDream with advanced methods in this area, including Uncertainty Weighting (UW, Kendall et al. (2018)), Dynamics Weight Average (DWA, Liu et al. (2019)), and NashMTL (Navon et al., 2022). Fig. 10b illustrates that our straightforward method is the most effective one among these methods, which also has the advantage of extreme simplicity. In-depth discussions on the differences between methods and why these methods can hardly make more improvements are included in Appendix D.2.
264
+
265
+ Ablation on rectified loss. We illustrate, through Fig. 17 in Appendix, the effectiveness of our rectified loss (Eq. (5)) in enhancing training stability and final performance.
266
+
267
+ # 5. Related Work
268
+
269
+ World models for visual RL. There exist several approaches to learning world models that explicitly model observations, transitions, and rewards. They can be widely utilized to boost sample efficiency in visual RL. In world models, visual representation can be learned via image reconstruction (Ha & Schmidhuber, 2018; Kaiser et al., 2020; Hafner et al., 2019; Seo et al., 2022a;b), or reconstruction-free contrastive learning (Okada & Taniguchi, 2021; Deng et al., 2022). Dreamer (Hafner et al., 2020; 2021; 2023) represents a series of methods that learn latent dynamics models from observations and learn behaviors by latent imagination. These methods have proven their effectiveness in tasks like video games (Hafner et al., 2021) and real robot control (Wu et al., 2022). Regardless, the problem of task domination is general for world models, and our findings and approach are not limited to our focused Dreamer architecture.
270
+
271
+ Implicit model-based RL. Implicit MBRL (Moerland et al., 2023) is a more abstract approach and aims to learn value equivalence models (Grimm et al., 2020) that focus on task-centric characteristics of the environment. This approach mitigates the objective mismatch (Lambert et al., 2020) between maximum likelihood estimation for world models and maximizing returns for policies. A typical success is MuZero (Schrittwieser et al., 2020; Ye et al., 2021), which learns a world model by predicting task-specific rewards, values, and policies, without observation reconstruction. Similarly, TD-MPC (Hansen et al., 2022) learns implicit world models for continuous control. While focusing on Dreamer, our analysis is consistent with those of MuZero showing that the potential efficiency of task-centric models can be better released when properly leveraging richer information from observation models (Anand et al., 2022).
272
+
273
+ Multi-task learning. Multi-task learning (Caruana, 1997; Ruder, 2017) aims to improve different tasks by jointly learning from a shared representation. A common approach is to aggregate task losses, where the loss or gradient of each task is manipulated by criteria like uncertainty (Kendall et al., 2018), performance metric (Guo et al., 2018), gradient norm (Chen et al., 2018) or gradient direction (Yu et al., 2020a; Wang et al., 2021; Navon et al., 2022), to avoid negative
274
+
275
+ ![](images/916c990a0328e188b4e4219bc2f7db31af609ecbd31e3d749ceff9b658dcf19e.jpg)
276
+ (a) Comparison to TD-MPC
277
+
278
+ ![](images/8859a842c2f36cc821ae03a5a7a780bdfdc07f3c84e3b5f2acdc0b1b07a0a093.jpg)
279
+ (b) Comparison to multi-task learning methods applied to DreamerV2
280
+
281
+ ![](images/cd8e86a7bfea720e298294453fe8ce8a77d8af7c521a55ba2b7ed7fc886f20b7.jpg)
282
+
283
+ ![](images/03e05b9b5129b3a669c47539153bb48eb331f1cb9b08fe8970d694a9f97d2d16.jpg)
284
+
285
+ ![](images/a2aa7beca89fc64fc8c822348f5ca3f784ee46fb192d508836456218a192c5de.jpg)
286
+ Figure 10. Comparison of HarmonyDream to implicit MBRL methods and multi-task learning methods.
287
+
288
+ ![](images/4220aa926f127de0c38c52ed5b9c21391531a8ec8a191478afe88c04b6ed40df.jpg)
289
+ Figure 11. Comparison of HarmonyDream with Dreamer-based task-centric methods, Denoised MDP (left) and RePo (right).
290
+
291
+ ![](images/183f7f098918a555910f78f61f9e95e94e3f5fd72b74f7f00af121721220950e.jpg)
292
+
293
+ ![](images/1db9627e0444e07b7ecb8a3fafe924696eda01f6f7d8fa08be89fb0e69b0100a.jpg)
294
+
295
+ transfer (Jiang et al., 2023). Previous works on multi-task learning in RL typically considered different policy learning tasks defined by different reward functions or environment dynamics (Rusu et al., 2016; Teh et al., 2017; Yu et al., 2020a). In contrast, we innovatively depict world model learning as multi-task learning, composed of reward and observation modeling, and HarmonyDream learns to maintain a delicate equilibrium between them to mitigate domination.
296
+
297
+ # 6. Discussion
298
+
299
+ We identify two tasks inside world models—observation and reward modeling—and interpret different MBRL methods as different task weighting. Our empirical study reveals that domination of a particular task can dramatically deteriorate the sample efficiency of MBRL. We thus introduce HarmonyDream, a simple world model learning approach that dynamically balances these tasks, thereby substantially improving sample efficiency.
300
+
301
+ HarmonyDream is particularly effective for scenarios where observation models are necessary for better representation learning, but the default weighting strategy of explicit world model learning causes negative effects due to observation modeling domination. These scenarios are mainly vision-based RL tasks, typically with complicated observations, including but not limited to:
302
+
303
+ - Fine-grained task-relevant observations: Robotics manipulation tasks (e.g., Meta-world and RLBench) and video games (e.g., Atari games, particularly Breakout, Qbert, and Gopher) require accurately modeling
304
+
305
+ interactions with small objects.
306
+
307
+ - Highly varied task-irrelevant observations: Redundant visual components such as backgrounds (e.g., natural background DMC) and body color (e.g., DMCR) can easily distract visual agents if task-relevant information is not emphasized correctly.
308
+ - Hybrid of both: More difficult open-world tasks (e.g. Minecraft) can encounter both, including small target entities and abundant visual details.
309
+
310
+ These environment features are ubiquitous in realistic applications, and simply emphasizing reward modeling through HarmonyDream without any architecture modifications or hyperparameter tuning can make remarkable improvements.
311
+
312
+ Benchmark environments featuring clean observations with prominent target objects, such as standard DMC and Crafter (Hafner, 2022), do not encounter significant domination of observation modeling and are expected to gain marginal improvements with HarmonyDream, as shown in Fig. 16 (for DMC) and Fig. 22 (for Crafter) in Appendix. Nevertheless, we do not observe any negative performance change with HarmonyDream on these clean benchmarks.
313
+
314
+ The development of our method is primarily based on empirical and intuitive observations. A future direction is to explain our method theoretically, or to better measure and balance the contributions of world model tasks empirically, beyond simply considering loss scales. We hope our work can offer valuable insights and help pave the way for exploiting the multi-task nature of world models.
315
+
316
+ # Acknowledgements
317
+
318
+ We would like to thank many colleagues, in particular Haixu Wu, Baixu Chen, Yuhong Yang, Chaoyi Deng, and Jincheng Zhong, who provided us with valuable discussions. This work was supported by the National Natural Science Foundation of China (62022050 and U2342217), the BNRist Innovation Fund (BNR2024RC01010), the Huawei Innovation Fund, and the National Engineering Research Center for Big Data Software.
319
+
320
+ # Impact Statement
321
+
322
+ This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
323
+
324
+ # References
325
+
326
+ Anand, A., Walker, J., Li, Y., Vértes, E., Schrittwieser, J., Ozair, S., Weber, T., and Hamrick, J. B. Procedural generalization by planning with self-supervised world models. In ICLR, 2022.
327
+ Caron, M., Misra, I., Mairal, J., Goyal, P., Bojanowski, P., and Joulin, A. Unsupervised learning of visual features by contrasting cluster assignments. In NeurIPS, 2021.
328
+ Caruana, R. Multitask learning. Machine learning, 28: 41-75, 1997.
329
+ Chen, Z., Badrinarayanan, V., Lee, C.-Y., and Rabinovich, A. Gradnorm: Gradient normalization for adaptive loss balancing in deep multitask networks. In ICML, 2018.
330
+ Deng, F., Jang, I., and Ahn, S. Dreamerpro: Reconstruction-free model-based reinforcement learning with prototypical representations. In ICML, 2022.
331
+ Fan, L., Wang, G., Jiang, Y., Mandlekar, A., Yang, Y., Zhu, H., Tang, A., Huang, D.-A., Zhu, Y., and Anandkumar, A. Minedojo: Building open-ended embodied agents with internet-scale knowledge. In NeurIPS, 2022.
332
+ Geirhos, R., Jacobsen, J.-H., Michaelis, C., Zemel, R., Brendel, W., Bethge, M., and Wichmann, F. A. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11):665-673, 2020.
333
+ Grigsby, J. and Qi, Y. Measuring visual generalization in continuous control from pixels. arXiv preprint arXiv:2010.06740, 2020.
334
+ Grimm, C., Barreto, A., Singh, S., and Silver, D. The value equivalence principle for model-based reinforcement learning. In NeurIPS, 2020.
335
+
336
+ Guo, M., Haque, A., Huang, D.-A., Yeung, S., and Fei-Fei, L. Dynamic task prioritization for multitask learning. In ECCV, 2018.
337
+ Ha, D. and Schmidhuber, J. Recurrent world models facilitate policy evolution. In NeurIPS, 2018.
338
+ Hafner, D. Benchmarking the spectrum of agent capabilities. In ICLR, 2022.
339
+ Hafner, D., Lillicrap, T., Fischer, I., Villegas, R., Ha, D., Lee, H., and Davidson, J. Learning latent dynamics for planning from pixels. In ICML, 2019.
340
+ Hafner, D., Lillicrap, T., Ba, J., and Norouzi, M. Dream to control: Learning behaviors by latent imagination. In ICLR, 2020.
341
+ Hafner, D., Lillicrap, T., Norouzi, M., and Ba, J. Mastering atari with discrete world models. In ICLR, 2021.
342
+ Hafner, D., Pasukonis, J., Ba, J., and Lillicrap, T. Mastering diverse domains through world models. arXiv preprint arXiv:2301.04104, 2023.
343
+ Hansen, N., Wang, X., and Su, H. Temporal difference learning for model predictive control. In ICML, 2022.
344
+ Jaderberg, M., Mnih, V., Czarnecki, W. M., Schaul, T., Leibo, J. Z., Silver, D., and Kavukcuoglu, K. Reinforcement learning with unsupervised auxiliary tasks. In ICLR, 2017.
345
+ James, S. and Davison, A. J. Q-attention: Enabling efficient learning for vision-based robotic manipulation. IEEE Robotics and Automation Letters, 2022.
346
+ James, S., Ma, Z., Arrojo, D. R., and Davison, A. J. Rlbench: The robot learning benchmark & learning environment. IEEE Robotics and Automation Letters, 2020.
347
+ James, S., Wada, K., Laidlow, T., and Davison, A. J. Coarse-to-fine q-attention: Efficient learning for visual robotic manipulation via discretisation. In CVPR, 2022.
348
+ Jiang, J., Chen, B., Pan, J., Wang, X., Dapeng, L., Jiang, J., and Long, M. Forkmerge: Overcoming negative transfer in multi-task learning. In NeurIPS, 2023.
349
+ Kaiser, L., Babaeizadeh, M., Milos, P., Osinski, B., Campbell, R. H., Czechowski, K., Erhan, D., Finn, C., Kozakowski, P., Levine, S., et al. Model-based reinforcement learning for atari. In ICLR, 2020.
350
+ Kendall, A., Gal, Y., and Cipolla, R. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In CVPR, 2018.
351
+
352
+ Lambert, N., Amos, B., Yadan, O., and Calandra, R. Objective mismatch in model-based reinforcement learning. In L4DC, 2020.
353
+ Laskin, M., Srinivas, A., and Abbeel, P. Curl: Contrastive unsupervised representations for reinforcement learning. In ICML, 2020.
354
+ LeCun, Y. A path towards autonomous machine intelligence. preprint posted on openreview, 2022.
355
+ Levine, S., Kumar, A., Tucker, G., and Fu, J. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
356
+ Liu, B., Liu, X., Jin, X., Stone, P., and Liu, Q. Conflict-averse gradient descent for multi-task learning. In NeurIPS, 2021.
357
+ Liu, S., Johns, E., and Davison, A. J. End-to-end multi-task learning with attention. In CVPR, 2019.
358
+ Micheli, V., Alonso, E., and Fleuret, F. Transformers are sample efficient world models. In ICLR, 2023.
359
+ Micikevicius, P., Narang, S., Alben, J., Diamos, G., Elsen, E., Garcia, D., Ginsburg, B., Houston, M., Kuchaiev, O., Venkatesh, G., and Wu, H. Mixed precision training. In ICLR, 2018.
360
+ Misra, I., Shrivastava, A., Gupta, A., and Hebert, M. Cross-stitch networks for multi-task learning. In CVPR, 2016.
361
+ Moerland, T. M., Broekens, J., Plaat, A., and Jonker, C. M. Model-based reinforcement learning: A survey. Foundations and Trends® in Machine Learning, 16(1):1-118, 2023.
362
+ Navon, A., Shamsian, A., Achituve, I., Maron, H., Kawaguchi, K., Chechik, G., and Fetaya, E. Multi-task learning as a bargaining game. In ICML, 2022.
363
+ Nguyen, T., Shu, R., Pham, T., Bui, H., and Ermon, S. Temporal predictive coding for model-based planning in latent space. In ICML, 2021.
364
+ Oh, J., Singh, S., and Lee, H. Value prediction network. In NeurIPS, 2017.
365
+ Okada, M. and Taniguchi, T. Dreaming: Model-based reinforcement learning by latent imagination without reconstruction. In ICRA, 2021.
366
+ Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.
367
+
368
+ Robine, J., Höftmann, M., Uelwer, T., and Harmeling, S. Transformer-based world models are happy with 100k interactions. In ICLR, 2023.
369
+ Ruder, S. An overview of multi-task learning in deep neural networks. arXiv preprint arXiv:1706.05098, 2017.
370
+ Rusu, A. A., Rabinowitz, N. C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., and Hadsell, R. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
371
+ Schrittwieser, J., Antonoglou, I., Hubert, T., Simonyan, K., Sifre, L., Schmitt, S., Guez, A., Lockhart, E., Hassabis, D., Graepel, T., et al. Mastering atari, go, chess and shogi by planning with a learned model. Nature, 588(7839): 604-609, 2020.
372
+ Seo, Y., Hafner, D., Liu, H., Liu, F., James, S., Lee, K., and Abbeel, P. Masked world models for visual control. In CoRL, 2022a.
373
+ Seo, Y., Lee, K., James, S. L., and Abbeel, P. Reinforcement learning with action-free pre-training from videos. In ICML, 2022b.
374
+ Sutton, R. S. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Machine learning proceedings 1990, pp. 216-224. Elsevier, 1990.
375
+ Tassa, Y., Doron, Y., Muldal, A., Erez, T., Li, Y., Casas, D. d. L., Budden, D., Abdelmaleki, A., Merel, J., Lefrancq, A., et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
376
+ Teh, Y., Bapat, V., Czarnecki, W. M., Quan, J., Kirkpatrick, J., Hadsell, R., Heess, N., and Pascanu, R. Distral: Robust multitask reinforcement learning. In NeurIPS, 2017.
377
+ Wang, T., Du, S. S., Torralba, A., Isola, P., Zhang, A., and Tian, Y. Denoised mdps: Learning world models better than the world itself. In ICML, 2022.
378
+ Wang, Z., Tsvetkov, Y., First, O., and Cao, Y. Gradient vaccine: Investigating and improving multi-task optimization in massively multilingual models. In ICLR, 2021.
379
+ Wu, J., Ma, H., Deng, C., and Long, M. Pre-training contextualized world models with in-the-wild videos for reinforcement learning. In NeurIPS, 2023.
380
+ Wu, P., Escontrela, A., Hafner, D., Goldberg, K., and Abbeel, P. Daydreamer: World models for physical robot learning. In CoRL, 2022.
381
+ Yarats, D., Zhang, A., Kostrikov, I., Amos, B., Pineau, J., and Fergus, R. Improving sample efficiency in model-free reinforcement learning from images. In AAAI, 2021.
382
+
383
+ Yarats, D., Fergus, R., Lazaric, A., and Pinto, L. Mastering visual continuous control: Improved data-augmented reinforcement learning. In ICLR, 2022.
384
+ Ye, W., Liu, S., Kurutach, T., Abbeel, P., and Gao, Y. Mastering atari games with limited data. In NeurIPS, 2021.
385
+ Yu, T., Kumar, S., Gupta, A., Levine, S., Hausman, K., and Finn, C. Gradient surgery for multi-task learning. In NeurIPS, 2020a.
386
+ Yu, T., Quillen, D., He, Z., Julian, R., Hausman, K., Finn, C., and Levine, S. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In CoRL, 2020b.
387
+ Zhang, A., Wu, Y., and Pineau, J. Natural environment benchmarks for reinforcement learning. arXiv preprint arXiv:1811.06032, 2018.
388
+ Zhou, B., Li, K., Jiang, J., and Lu, Z. Learning from visual observation via offline pretrained state-to-go transformer. In NeurIPS, 2023.
389
+ Zhu, C., Simchowitz, M., Gadipudi, S., and Gupta, A. Repo: Resilient model-based reinforcement learning by regularizing posterior predictability. In NeurIPS, 2023.
390
+
391
+ # A. Behavior Learning
392
+
393
+ HarmonyDream does not change the behavior learning procedure of its base MBRL methods (Hafner et al., 2021; 2023; Deng et al., 2022), and we briefly describe the actor-critic learning scheme shared with these base methods.
394
+
395
+ Specifically, we leverage a stochastic actor and a deterministic critic parameterized by $\psi$ and $\xi$ , respectively, as shown below:
396
+
397
+ $$
398
+ \text {A c t o r :} \hat {a} _ {t} \sim \pi_ {\psi} (\hat {a} _ {t} \mid \hat {z} _ {t}) \quad \text {C r i t i c :} v _ {\xi} (\hat {z} _ {t}) \approx \mathrm {E} _ {p _ {\theta}, \pi_ {\psi}} \left[ \sum_ {\tau \geq t} \gamma^ {\tau - t} \hat {r} _ {\tau} \right], \tag {6}
399
+ $$
400
+
401
+ where $p_{\theta}$ is the world model. The actor and critic are jointly trained on the same imagined trajectories $\{\hat{z}_{\tau},\hat{a}_{\tau},\hat{r}_{\tau}\}$ with horizon $H$ generated by the transition model and reward model in Eq. (1) and the actor in Eq. (6). The critic is trained to regress the $\lambda$ -target:
402
+
403
+ $$
404
+ \mathcal {L} _ {\text {c r i t i c}} (\xi) \doteq \mathbb {E} _ {p _ {\theta}, \pi_ {\psi}} \left[ \sum_ {\tau = t} ^ {t + H} \frac {1}{2} \left(v _ {\xi} \left(\hat {z} _ {\tau}\right) - \operatorname {s g} \left(V _ {\tau} ^ {\lambda}\right)\right) ^ {2} \right], \tag {7}
405
+ $$
406
+
407
+ $$
408
+ V _ {\tau} ^ {\lambda} \doteq \hat {r} _ {\tau} + \gamma \left\{ \begin{array}{l l} (1 - \lambda) v _ {\xi} \left(\hat {z} _ {\tau + 1}\right) + \lambda V _ {\tau + 1} ^ {\lambda} & \text {i f} \tau < t + H \\ v _ {\xi} \left(\hat {z} _ {\tau + 1}\right) & \text {i f} \tau = t + H. \end{array} \right. \tag {8}
409
+ $$
410
+
411
+ The actor, meanwhile, is trained to output actions that maximize the critic output by backpropagating value gradients through the learned world model. The actor loss is defined as follows:
412
+
413
+ $$
414
+ \mathcal {L} _ {\text {a c t o r}} (\psi) \doteq \mathbb {E} _ {p _ {\theta}, \pi_ {\psi}} \left[ \sum_ {\tau = t} ^ {t + H} \left(- V _ {\tau} ^ {\lambda} - \eta \mathrm {H} \left[ \pi_ {\psi} \left(\hat {a} _ {\tau} \mid \hat {z} _ {\tau}\right) \right]\right) \right], \tag {9}
415
+ $$
416
+
417
+ where $\mathrm{H}\left[\pi_{\psi}(\hat{a}_{\tau}|\hat{z}_{\tau})\right]$ is an entropy regularization which encourages exploration, and $\eta$ is the hyperparameter that adjusts the regularization strength. For more details, we refer to Hafner et al. (2020).
418
+
419
+ # B. Derivations
420
+
421
+ Proof of Proposition 3.1. To minimize $\mathbb{E}[\mathcal{H}(\mathcal{L},\sigma)]$ , we force the partial derivative w.r.t. $\sigma$ to 0:
422
+
423
+ $$
424
+ \begin{array}{l} \nabla_ {\sigma} \mathbb {E} [ \mathcal {H} (\mathcal {L}, \sigma) ] = \nabla_ {\sigma} \mathbb {E} \left[ \frac {1}{\sigma} \mathcal {L} + \log \sigma \right] = \mathbb {E} \left[ \nabla_ {\sigma} \left(\frac {1}{\sigma} \mathcal {L} + \log \sigma\right) \right] (10) \\ = \mathbb {E} \left[ - \frac {1}{\sigma^ {2}} \mathcal {L} + \frac {1}{\sigma} \right] = \frac {1}{\sigma} - \frac {1}{\sigma^ {2}} \mathbb {E} [ \mathcal {L} ] = 0. (11) \\ \end{array}
425
+ $$
426
+
427
+ This results in the solution $\sigma^{*} = \mathbb{E}[\mathcal{L}]$ , and equivalently, the harmonized loss scale is $\mathbb{E}[\mathcal{L} / \sigma^*] = 1$ .
428
+
429
+ Analytic solution of rectified loss. Similarly, minimizing $\mathbb{E}\big[\hat{\mathcal{H}} (\mathcal{L},\sigma)\big]$ yields
430
+
431
+ $$
432
+ \begin{array}{l} \nabla_ {\sigma} \mathbb {E} \left[ \hat {\mathcal {H}} (\mathcal {L}, \sigma) \right] = \nabla_ {\sigma} \left(\frac {1}{\sigma} \mathbb {E} [ \mathcal {L} ] + \log (1 + \sigma)\right) = - \frac {1}{\sigma^ {2}} \mathbb {E} [ \mathcal {L} ] + \frac {1}{1 + \sigma} = 0 \tag {12} \\ \sigma = \frac {\mathbb {E} [ \mathcal {L} ] + \sqrt {\mathbb {E} [ \mathcal {L} ] ^ {2} + 4 \mathbb {E} [ \mathcal {L} ]}}{2}. \\ \end{array}
433
+ $$
434
+
435
+ Therefore the learnable loss weight, in our rectified harmonic loss, approximates the analytic loss weight:
436
+
437
+ $$
438
+ \frac {1}{\sigma} = \frac {2}{\mathbb {E} [ \mathcal {L} ] + \sqrt {\mathbb {E} [ \mathcal {L} ] ^ {2} + 4 \mathbb {E} [ \mathcal {L} ]}}, \tag {13}
439
+ $$
440
+
441
+ corresponding to a loss scale $\mathbb{E}[\mathcal{L}]$ , which is less than the unrectified $1 / \mathbb{E}[\mathcal{L}]$ . Adding a constant in the regularization term $\log (1 + \sigma)$ results in the $4\mathbb{E}[\mathcal{L}]$ in the $\sqrt{\mathbb{E}[\mathcal{L}]^2 + 4\mathbb{E}[\mathcal{L}]}$ term, which prevents the loss weight from getting extremely large when faced with a small $\mathbb{E}[\mathcal{L}]$ .
442
+
443
+ # C. Experimental Details
444
+
445
+ # C.1. Benchmark Environments
446
+
447
+ Meta-world. Meta-world (Yu et al., 2020b) is a benchmark of 50 distinct robotic manipulation tasks. We choose six tasks in all according to the difficulty criterion (easy, medium, hard, and very hard) proposed by Seo et al. (2022a). Specifically, we choose Handle Pull Side and Lever Pull from the easy category, Hammer and Sweep Into from the medium category, and Push and Assembly from the hard category. We observe that although the Hammer task belongs to the medium category, it is relatively easy for the DreamerV2 agent to learn, and our HarmonyDream can already achieve high success with 250K environment steps. Therefore, we train our agents over 250K environment steps on Hammer, along with the two easy tasks. For the remaining tasks, we train our agents over 500K environment steps for Sweep Into, and 1M environment steps for Push and Assembly, according to their various difficulties. In all tasks, the episode length is 500 environment steps with no action repeat.
448
+
449
+ ![](images/7d63d7cfd7063ffa56cce6a8637c5eca7ffeb022ef2525cd1424507d54926684.jpg)
450
+ Figure 12. Example observations of Meta-world tasks: Lever Pull, Handle Pull Side, Hammer, Sweep Into, Push, and Assembly (left to right).
451
+
452
+ ![](images/950ee1e1c2cacb72a0052ee788626fe8c5a273d80f6dfa7ed60aaba13942cc07.jpg)
453
+
454
+ ![](images/66a2c3da24aebaae7c5421111b9e31f4709819d00ec28cdb8fd03fb00a017791.jpg)
455
+
456
+ ![](images/93858f22e73d803ec10198ab6e8457304b4ee09b0e5d73277b963c65de71f2ce.jpg)
457
+
458
+ ![](images/77a7e3465a8ace58ac25c0433b2f2da9bc631359497c3ed98b936d88d4a1cc59.jpg)
459
+
460
+ ![](images/617ed0a2b91a57d17362b1a8567e208efa91c7af397767337d2b6e6847130f58.jpg)
461
+
462
+ RLBench. RLBench (James et al., 2020) is a challenging benchmark for robot learning. Most tasks in RLBench are overchallenging for DreamerV2, even equipped with HarmonyDream. Therefore, following Seo et al. (2022a), we choose two relatively easy tasks (i.e. Push Button, Reach Target) and use an action mode that specifies the delta of joint positions. Because the original RLBench benchmark does not provide dense rewards for the Push Button task, we assign a dense reward following Seo et al. (2022a), which is defined as the sum of the L2 distance of the gripper to the button and the magnitude of the button being pushed. In our experiments, we found that the original convolutional encoder and decoder of
463
+
464
+ DreamerV2 can be insufficient for learning the RLBench task. Therefore, in this domain, we adopt the ResNet-style encoder and decoder from Wu et al. (2023) for both DreamerV2 and our HarmonyDream. Note here that changes in the encoder and decoder architecture are completely orthogonal to our method and contributions. For tasks in the RLBench domain, the maximum episode length is set to 400 environment steps with an action repeat of 2.
465
+
466
+ ![](images/ecbfcb56fded762ca23afaa28d96d7ec01a889f8ec13f722d74f9abc025125b8.jpg)
467
+ Figure 13. Example observations of RLBench tasks: Push Button and Reach Target.
468
+
469
+ ![](images/3e033ec81304b48f851b57aad938787b1109c46c37af3e7c810ae91d2349c234.jpg)
470
+
471
+ DMC Remastered. The DMC Remastered (DMCR) (Grigsby & Qi, 2020) benchmark is a challenging extension of the widely used robotic locomotion benchmark, DeepMind Control Suite (Tassa et al., 2018), by expanding a complicated graphical variety. On initialization of each episode for both training and evaluation, the DMCR environment randomly resets 7 factors affecting visual conditions, including floor texture, background, robot body color, target color, reflectance, camera position, and lighting. Our agents are trained and evaluated on three tasks: Cheetah Run, Walker Run, and Cartpole Balance. We use all variation factors in all of our experiments and train our agents over 1M environment steps. Following the common setup of DeepMind Control Suite (Hafner et al., 2020; Yarats et al., 2022), we set the episode length to 1000 environment steps with an action repeat of 2.
472
+
473
+ Atari 100K Benchmark. The Atari 100K benchmark contains 26 video games with up to 18 discrete actions. On this benchmark, the agent is
474
+
475
+ ![](images/72b905ebcaf34a5dc6077095897682360d90eca044aad5ef4e26b8c0b6ea2896.jpg)
476
+
477
+ ![](images/2599b0a719549a2a0ddf2a28c8a8bafff8d298e5f586bd890fdab4444645ce46.jpg)
478
+ Figure 14. Example observations of DMC Remasted tasks: Cheetah Run, Walker Run, and Cartpole Balance.
479
+
480
+ ![](images/0122289eb9a380273982f08efdedeafbf9646fbbf8a8c0e0a67cd4d644e06671.jpg)
481
+
482
+ allowed to interact with each game environment for 100K steps, equivalent to 400K frames due to a frameskip of 4. This number of interaction steps, roughly two hours of real-time gameplay, has become a widely adopted standard in the realm of sample-efficient reinforcement learning. Human players are evaluated after two hours to get familiar with the game. Following the established protocol, we report the raw performance for each game, and the mean and median of human normalized scores: $(\text{score}_{\text{agent}} - \text{score}_{\text{random}}) / (\text{score}_{\text{human}} - \text{score}_{\text{random}})$ . For this benchmark, we keep all implementation details the same as DreamerV3.
483
+
484
+ Natural Background DMC. Natural background DMC (Zhang et al., 2018) modifies the DeepMind Control Suite by substituting its static background with natural videos. In our paper, this environment is implemented using the RePo (Zhu et al., 2023) codebase<sup>3</sup>. Following RePo, we train and evaluate our agent on three tasks: Cheetah Run, Walker Run and Cartpole Swingup. We adopt the standard configuration of DMC for natural background DMC, with a maximum episode length of 1000 environment steps and an action repeat of 2.
485
+
486
+ Minecraft. Minecraft is a popular open-world game where a player explores a procedurally generated 3D world with diverse types of terrains to roam, materials to mine, tools to craft, structures to build, and wonders to discover. We leverage MineDojo (Fan et al., 2022), an massive simulation suite developed on Minecraft, encompassing over 3000 distinct tasks. Our focus was to master a fundamental skill, Hunt Cow, utilizing the manual dense reward provided by MineDojo. We prune the action space of MineDojo to Table 1, following the practice of STG-Transformer (Zhou et al., 2023). For this benchmark, we employ the Large model size variant of DreamerV3, comprising approximately 77M parameters. To ensure the terrain diversity of the environment, we hard reset the environment to generate a new world every 5 episodes. Observations for our agents consist solely of RGB frames, with a resolution of $128 \times 128 \times 3$ pixels. The maximum episode length is 500 environment steps, with no action repeat.
487
+
488
+ Table 1. Pruned Action Space of the MineDojo Environment
489
+
490
+ <table><tr><td>Index</td><td>Descriptions</td><td>Num of Actions</td></tr><tr><td>0</td><td>Forward and backward</td><td>3</td></tr><tr><td>1</td><td>Move left and right</td><td>3</td></tr><tr><td>2</td><td>Jump, sneak, and sprint</td><td>4</td></tr><tr><td>3</td><td>Camera delta pitch/yaw (±15° for each action)</td><td>5</td></tr><tr><td>4</td><td>Use and Attack</td><td>3</td></tr></table>
491
+
492
+ # C.2. Base MBRL Methods
493
+
494
+ DreamerV2. Unless otherwise specified, HarmonyDream (Ours) in the experiment section refers to the HarmonyDream method based on DreamerV2 (Hafner et al., 2021). Details about DreamerV2 have been elaborated on in the main text, and we refer readers to Sec. 2.2 and Hafner et al. (2020; 2021).
495
+
496
+ DreamerV3. DreamerV3 (Hafner et al., 2023) is a general and scalable algorithm that builds upon DreamerV2. In order to master a wide range of domains with fixed hyperparameters, DreamerV3 made many changes to DreamerV2, including using symlog predictions, utilizing world model regularization by combining KL balancing and free bits, modifying the network architecture, and so forth. A main modification relevant to our method is that DreamerV3 explicitly partitions the dynamics loss in Eq. (2) into a dynamics loss and a representation loss as follows:
497
+
498
+ Dynamics loss: $\mathcal{L}_{\mathrm{dyn}}(\theta) = \max (1,\mathrm{KL}\left[\mathrm{sg}(q_{\theta}(z_t|z_{t - 1},a_{t - 1},o_t))\parallel p_{\theta}(\hat{z}_t|z_{t - 1},a_{t - 1})\right])$
499
+
500
+ Representation loss: $\mathcal{L}_{\mathrm{rep}}(\theta) = \max (1,\mathrm{KL}\left[q_{\theta}(z_t\mid z_{t - 1},a_{t - 1},o_t)\parallel \mathrm{sg}(p_{\theta}(\hat{z}_t\mid z_{t - 1},a_{t - 1}))]\right)$
501
+
502
+ Since $\mathcal{L}_{\mathrm{dyn}}(\theta)$ and $\mathcal{L}_{\mathrm{rep}}(\theta)$ yield the same loss value, leading to identical learned coefficients, we implement Harmony DreamerV3 by recombining the two losses into $\mathcal{L}_d(\theta)$ as follows:
503
+
504
+ $$
505
+ \mathcal {L} _ {d} (\theta) \dot {=} \alpha \mathcal {L} _ {\mathrm {d y n}} (\theta) + (1 - \alpha) \mathcal {L} _ {\mathrm {r e p}} (\theta). \tag {15}
506
+ $$
507
+
508
+ Here $\alpha$ is the KL balancing coefficient predefined by DreamerV3. In this way, we can use the same learning objective as Eq. (5) for Harmony DreamerV3.
509
+
510
+ DreamerPro. DreamerPro (Deng et al., 2022) is a reconstruction-free model-based RL method that incorporates prototypical representations in the world model learning process. The overall learning objective of the DreamerPro method is defined as follows:
511
+
512
+ $$
513
+ \mathcal {L} _ {\text {D r e a m e r P r o}} (\theta) = \mathcal {L} _ {\text {S w A V}} (\theta) + \mathcal {L} _ {\text {T e m p}} (\theta) + \mathcal {L} _ {\mathrm {R}} (\theta) + \mathcal {L} _ {\mathrm {K L}} (\theta). \tag {16}
514
+ $$
515
+
516
+ The $\mathcal{L}_{\mathrm{SwAV}}$ term stands for prototypical representation loss used in SwAV (Caron et al., 2021), which improves prediction from an augmented view and induces useful features for static images. $\mathcal{L}_{\mathrm{Temp}}$ stands for temporal loss that considers temporal structure and reconstructs the cluster assignment of the observation instead of the visual observation itself. As $\mathcal{L}_{\mathrm{SwAV}} + \mathcal{L}_{\mathrm{Temp}}$ replaces $\mathcal{L}_o$ in Eq. (2), we build our Harmony DreamerPro by substituting the overall learning objective into the following
517
+
518
+ $$
519
+ \mathcal {L} _ {\text {H a r m o n y D r e a m e r P r o}} (\theta) = \sum_ {i \in \{\text {S w A V}, \text {T e m p}, \text {R}, \text {K L} \}} \frac {1}{\sigma_ {i}} \mathcal {L} _ {i} (\theta) + \log (1 + \sigma_ {i}). \tag {17}
520
+ $$
521
+
522
+ # C.3. Hyperparameters
523
+
524
+ Our proposed HarmonyDream only involves adding lightweight harmonizers, each corresponding to a single learnable parameter, and thus does not introduce any additional hyperparameters. For Harmony DreamerV3 and Harmony DreamerPro, we use the default hyperparameters of DreamerV3 and DreamerPro, respectively. For our HarmonyDream based on DreamerV2, we use the same set of hyperparameters as DreamerV2 (Hafner et al., 2021). Important hyperparameters for HarmonyDream are listed in Table 2.
525
+
526
+ Table 2. Hyperparameters in our HarmonyDream based on DreamerV2. We use the same hyperparameters as DreamerV2.
527
+
528
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Observation size</td><td>64 × 64 × 3</td></tr><tr><td>Observation preprocess</td><td>Linearly rescale from [0, 255] to [-0.5, 0.5]</td></tr><tr><td>Action Repeat</td><td>1 for Meta-world</td></tr><tr><td></td><td>2 for RLBench, DMCR and Natural Background DMC</td></tr><tr><td>Max episode length</td><td>500 for Meta-world, DMCR and Natural Background DMC</td></tr><tr><td></td><td>200 for RLBench</td></tr><tr><td>Early episode termination</td><td>True for RLBench, False otherwise</td></tr><tr><td>Trajectory segment length T</td><td>50</td></tr><tr><td>Random exploration</td><td>5000 environment steps for Meta-world and RLBench</td></tr><tr><td></td><td>1000 environment steps for DMCR and Natural Background DMC</td></tr><tr><td>Replay buffer capacity</td><td>10^6</td></tr><tr><td>Training frequency</td><td>Every 5 environment steps</td></tr><tr><td>Imagination horizon H</td><td>15</td></tr><tr><td>Discount γ</td><td>0.99</td></tr><tr><td>λ-target discount</td><td>0.95</td></tr><tr><td>Entropy regularization η</td><td>1 × 10^-4</td></tr><tr><td>Batch size</td><td>50 for Meta-world and RLBench</td></tr><tr><td></td><td>16 for DMCR and Natural Background DMC</td></tr><tr><td>RSSM hidden size</td><td>1024</td></tr><tr><td>World model optimizer</td><td>Adam</td></tr><tr><td>World model learning rate</td><td>3 × 10^-4</td></tr><tr><td>Actor optimizer</td><td>Adam</td></tr><tr><td>Actor learning rate</td><td>8 × 10^-5</td></tr><tr><td>Critic optimizer</td><td>Adam</td></tr><tr><td>Critic learning rate</td><td>8 × 10^-5</td></tr><tr><td>Evaluation episodes</td><td>10</td></tr></table>
529
+
530
+ # C.4. Analysis Experiment Details (Fig. 2c and 3)
531
+
532
+ For the analysis in Sec. 2.3, namely Fig. 2c and 3, we conduct our experiments on a fixed training buffer to better ablate distracting factors. We first train a separate DreamerV2 agent and use training trajectories collected during its whole training process as our fixed buffer. The fixed buffer comprises $250\mathrm{K}$ environment steps and covers data from low-return to high-return trajectories (Levine et al., 2020). We then offline train our DreamerV2 agents with different reward loss coefficients on this buffer. All other hyperparameters, such as training frequency, training steps, and evaluation episodes, are the same as in Table 2.
533
+
534
+ Details for Fig. 2c We denote the agent trained using $w_{r} = 1$ as original weight and trained using $w_{r} = 100$ for Lever Pull, $w_{r} = 10$ for Handle Pull Side and Hammer as balanced weight. To build the state regression dataset, first, we gather 10,000 segments of trajectories, each with a length of 50, from the evaluation episodes of both the agent trained using original weight and the agent trained using balanced weight. These segments are then combined into a dataset comprising 20,000 segments. This dataset is subsequently divided into a training set and a validation set at a ratio of $90\%$ to $10\%$ . Each data point in the dataset consists of a ground truth state and a predicted state representation, where the ground truth state is made up of the actual positions of task-relevant objects. We use a 4-layer MLP with a hidden size of 400 and an MSE loss to regress the representation to the ground-truth state. We report regression loss results on the validation set.
535
+
536
+ Details for Fig. 3 In the Lever Pull task, the robot needs to reach the end of a lever (marked in blue in the observation) and pull it to the designated position (marked in red in the observation). We utilize a trajectory where the default DreamerV2 with $w_{r} = 1$ fails to lift the lever to analyze the reason behind its poor performance. Both agents use 15 frames for observation and reconstruction and predict 35 frames open-loop. We plot each image with an interval of 5 frames in Fig. 3.
537
+
538
+ # C.5. Computational Resources
539
+
540
+ We implement our HarmonyDream based on DreamerV2 using PyTorch (Paszke et al., 2019). Training is conducted with automatic mixed precision (Micikevicius et al., 2018) on Meta-world and RLBench and full precision on DMCR. In terms of training time, it takes $\sim 24$ hours for each run of Meta-world experiments over $250\mathrm{K}$ environment steps, $\sim 24$ hours for RLBench over $500\mathrm{K}$ environment steps, and $\sim 23$ hours for DMCR over 1M environment steps, respectively. The lightweight harmonizers introduced by HarmonyDream do not affect the training time. In terms of memory usage, Meta-world and RLBench experiments require $\sim 10\mathrm{GB}$ GPU memory, and DMCR requires $\sim 5\mathrm{GB}$ GPU memory, thus, the experiments can be done using typical 12GB GPUs.
541
+
542
+ # D. Extended Discussions
543
+
544
+ # D.1. Differences with DreamerV3
545
+
546
+ When we started this work, DreamerV3 had not been released. Thus, we primarily conduct experiments based on DreamerV2, as mentioned in the main paper. We state here that the modifications introduced by DreamerV3 do not fully address the problem of task domination inside world models, which is the problem HarmonyDream intends to solve. As shown in Appendix E.1 and E.6, HarmonyDream applied to DreamerV3 can further unleash the potentials of this base method.
547
+
548
+ There are mainly two changes of DreamerV3 relevant to improving world model learning: KL balancing and symlog predictions. We have already shown in Appendix C.2 that KL balancing is orthogonal to our method and that we can easily incorporate this modification into our approach. On the other hand, symlog predictions also do not solve our problem of seeking a balance between reward modeling and observation modeling. First of all, the symlog transformation only shrinks extremely large values but is unable to rescale various values into exactly the same magnitude, while our harmonious loss properly addresses this by dynamically approximating the scales of the values. More importantly, the primary reason why $L_{r}$ has a significantly smaller loss scale is the difference in dimension: as we have stated in Sec 2.3, the observation loss $L_{o}$ usually aggregates $H \times W \times C$ dimensions, while the reward loss $L_{r}$ is derived from only a scalar. In summary, using symlog predictions as DreamerV3 only mitigates the problem of differing per-dimension scales (typically across environment domains) by a static transformation, while our method aims to dynamically balance the overall loss scales across tasks in world model learning, considering together per-dimension scales, dimensions, and training dynamics.
549
+
550
+ In practice, DreamerV3 uses twohot symlog predictions for the reward predictor to replace the MSE loss in DreamerV2. This approach increases the scale of the reward loss, but is insufficient to mitigate the domination of the image loss. We observe that the reward loss in DreamerV3 is still significantly smaller than the observation loss, especially for visually demanding domains such as RLbench, where the reward loss is still two orders of magnitude smaller.
551
+
552
+ # D.2. Comparisons with Multi-task Learning Methods
553
+
554
+ In this paper, we understand world model learning from a multi-task or multi-objective view. Methods in the field of multi-task learning or multi-objective learning can be roughly categorized into loss-based and gradient-based. Since gradient-based methods mainly address the problem of gradient conflicts (Yu et al., 2020a; Liu et al., 2021), which is not the main case in world model learning, we focus our discussion on loss-based methods, which assigns different weights to task
555
+
556
+ losses by various criteria. We choose the following methods as our baselines to discuss differences and conduct comparisons experiments. The experiment results can be found in Fig. 10b of the main paper.
557
+
558
+ Uncertainty Weighting (UW, Kendall et al. (2018)) balances tasks with different scales of targets, which is measured as uncertainty of outputs. As pointed out in Section 2.2, in world model learning, observation loss $\mathcal{L}_o(\theta) = -\log p_\theta (o_t\mid z_t) = -\sum_{h,w,c}\log p_\theta (o_t^{(h,w,c)}\mid z_t)$ and reward loss $\mathcal{L}_r(\theta) = -\log p_\theta (r_t\mid z_t)$ differs not only in scales but also in dimensions. To implement UW, we opt for depicting the uncertainty of each pixel. By assuming all pixel values share a common standard deviation $\sigma_o$ for Gaussian distributions, the uncertainty-weighted image loss takes the following form: $\mathcal{L}(\theta ,\sigma_o) = \sum_{h,w,c}(\hat{o}_t^{(h,w,c)} - o_t^{(h,w,c)})^2 /2\sigma_o + \log \sigma_o = \sigma_o^{-1}\mathcal{L}_o(\theta) + HWC\log \sigma_o$ . A detailed explanation of the differences between our harmonious loss and UW is provided in the discussion section in Section 3.
559
+
560
+ Dynamics Weight Average (DWA, Liu et al. (2019)) balances tasks according to their learning progress, illustrating the various task difficulties. However, in world model learning, since the data in the replay buffer is growing and non-stationary the relative descending rate of losses may not accurately measure task difficulties and learning progress.
561
+
562
+ NashMTL (Navon et al., 2022) is the most similar to our method, whose optimization direction has balanced projections of individual gradient directions. However, its implementation is far more complex than our method, as it introduces an optimization procedure to determine loss weights on each iteration. In our experiments, we also find this optimization is prone to deteriorate to produce near-zero weights without careful tuning of optimization parameters.
563
+
564
+ In Fig 10b, we compare against the multi-task methods we mentioned above. Experiments are conducted on Lever Pull from Meta-world, Push Button from RLBench, and Cheetah Run from DMCR, respectively. Our method is the most effective among multi-task methods and has the advantage of simplicity. Although NashMTL produces similar results on the Lever Pull task, it outputs extreme loss weights on the other two tasks, which accounts for its low performance. Our HarmonyDream, on the other hand, uses a rectified loss that effectively mitigates extremely large loss weights.
565
+
566
+ # E. Extended Experiment Results
567
+
568
+ # E.1. Atari 100K Experiments
569
+
570
+ We based our implementation of HarmonyDream applied to DreamerV3 (denoted as Harmony DreamerV3) on the official DreamerV3 codebase<sup>4</sup>. To ensure the fairness and quality of our results, we also reproduced DreamerV3 results using the official code and configurations. Fig 15 shows Atari learning curves of the reproduced DreamerV3 and our Harmony DreamerV3 on all 26 environments. Note here that our learning curves are plotted using evaluation scores, rather than averaged training scores as in DreamerV3, which may account for part of the differences between our curves and that reported by Hafner et al. (2023). Both DreamerV3 and our Harmony DreamerV3 are evaluated for 100 episodes every 20K environment steps. In each curve, the solid line represents the average evaluation score across 5 seeds, while the shaded region indicates the standard deviation. This is consistent with the figure representation in DreamerV3.
571
+
572
+ Table 3 shows the mean score and aggregated human normalized scores of our Harmony DreamerV3 on Atari tasks, compared to other methods. The scores in the Simple, TWM, IRIS, and DreamerV3 (Original) columns correspond to the scores reported in their papers, respectively. The DreamerV3 (Reproduced) column contains scores reproduced using the official codebase. The reproduced results exhibit performance comparable to the reported results. The slight discrepancy in the human-normalized score is primarily attributed to the subpar performance in the Crazy Climber game. Our Harmony DreamerV3 significantly improves upon the base method's performance. It either matches or surpasses DreamerV3 in 23 of the 26 tested environments, thereby setting a new state-of-the-art benchmark with a human mean score of $136.5\%$ . It's noteworthy that this enhancement is achieved without the addition of any hyperparameters or alterations to any network structures. By harmonizing tasks in world model learning, we fully exploit the inherent potential of our base model, further highlighting the value of our work.
573
+
574
+ ![](images/a15c9bfb21c0c4c96103f2bbeddf5fca0f8714115557b799b4a55afe560ec4bd.jpg)
575
+
576
+ ![](images/3018a65b0910b73d5aed85086b8e26c8d3c62b51a8202e1331b2b6bc74bcf7b4.jpg)
577
+
578
+ ![](images/808526cd284bc88e229fb959ef51f51a5da348dffde85df6add0e68545d1400f.jpg)
579
+
580
+ ![](images/0ea33aa1ce4d7e7e4bd27c27723f277a1640ef882ca9c3e13e34bf659655028d.jpg)
581
+
582
+ ![](images/75872cba1cb62c9fec9876e767fc6bd2ade6220efdc4484f48e7dc29455e52fb.jpg)
583
+
584
+ ![](images/026afa490c3c1f1cfd25e50d4867f9be24132893ad8c31618909d5d5bf862637.jpg)
585
+
586
+ ![](images/00aec6c60a2fe31119a040899693448523483909bb9cdf8787adc731f9fab5f5.jpg)
587
+
588
+ ![](images/98abc6cdf8ab3056ed2810cb3a22a5f248a46d64e0cb4312837f3aeae92abaac.jpg)
589
+
590
+ ![](images/0952b4eeb19d4296054ebe8b6fef97f9be4678c126e6d9e58fc72dc85fe3f1d6.jpg)
591
+
592
+ ![](images/81e4ec5a2a9f63a9093687db89cdba75d8b8b174b13dde03b991908345733f43.jpg)
593
+
594
+ ![](images/19b3250723fb631d22346b55f2fe32b6c38d657cb63606b2348cfe23c4aa7b49.jpg)
595
+
596
+ ![](images/b3d16764e94843dce7b4cc49e10143e7c80ac4b91a415eeacd02a97e3aef2966.jpg)
597
+
598
+ ![](images/d451cb37f7edd85f93cb4d671f9aa4773005037869996e09c3fd11f63983a7c9.jpg)
599
+
600
+ ![](images/e23186d552f0b47d449a6093036d55c73c3d44b47d592feb61fd3dc546f9a19d.jpg)
601
+
602
+ ![](images/b11120b041be7848136fac90ca7bc4ed70b53edb64ee3a03be4cd6c864bee6ae.jpg)
603
+
604
+ ![](images/fc4adbeea141f2bbd455edc7bd5747d3fb09e67a63250c50238cd2860d731cd3.jpg)
605
+
606
+ ![](images/d5de8c7132087af559ad7870294830696311108cfa810e51b0f6b5e97be73c73.jpg)
607
+
608
+ ![](images/fa8b5b3ec1129f7f71b5e02551bf6300c256b1325e9b257f38e1fc773f7535a7.jpg)
609
+
610
+ ![](images/58a63751df089dba77fdf275c29031df461b3b57fffcb5b9f89f56698225953e.jpg)
611
+ Figure 15. Atari learning curves of DreamerV3 (reproduced) and Harmony DreamerV3 with a budget of 400K frames, amounting to 100K policy steps.
612
+
613
+ ![](images/66ac636f7619a169d66b3137dad1cdf3560a25c2bfa18a6ba65eae057dc61224.jpg)
614
+
615
+ ![](images/feecf294f66b71d5372d234d42ca90c08859553d5f6d8e51853ce2517cb5ae79.jpg)
616
+
617
+ ![](images/7c659ceae0a26b671524fc8d8085ffe9959e77713f7207570ab9e100ae824de8.jpg)
618
+
619
+ ![](images/da0975974a2b96482115c1a8117ad7b5781da7436653a60dd2fa9b285eb368ba.jpg)
620
+
621
+ ![](images/421a4ca4ed483da090f498371322db233588b339109168c543a83bb547fc4229.jpg)
622
+
623
+ ![](images/84a1eb7cecba9720798ec3cd64a5ffe896365e4ef4ca47567a445474ef91c7d8.jpg)
624
+
625
+ ![](images/7e1269653a3ae47d148323b86b4a94b42bc2cd0b1ad8bcc35302172c04f67e59.jpg)
626
+ Dreamerv3 Harmony DreamerV3
627
+
628
+ ![](images/c40ccff8438b3d9e5ee1de86dc9c990231a7a31e264be8319ba26eca26be5327.jpg)
629
+
630
+ ![](images/bd94ba092e65e0c3d81b7ee6bb4610b1fd7a9762cd19a837af28ccbbb653027e.jpg)
631
+
632
+ Table 3. Mean scores on the Atari 100K benchmark per game as well as the aggregated human normalized mean and median. Bold numbers indicate scores within $5\%$ of the best.
633
+
634
+ <table><tr><td>Game</td><td>Random</td><td>Human</td><td>SimPLe (2020)</td><td>TWM (2023)</td><td>IRIS (2023)</td><td>DreamerV3 (Original)</td><td>DreamerV3 (Reproduced)</td><td>Harmony DreamerV3</td></tr><tr><td>Alien</td><td>228</td><td>7128</td><td>617</td><td>675</td><td>420</td><td>959</td><td>786</td><td>890</td></tr><tr><td>Amidar</td><td>6</td><td>1720</td><td>74</td><td>122</td><td>143</td><td>139</td><td>175</td><td>141</td></tr><tr><td>Assault</td><td>222</td><td>742</td><td>527</td><td>683</td><td>1524</td><td>706</td><td>680</td><td>1003</td></tr><tr><td>Asterix</td><td>210</td><td>8503</td><td>1128</td><td>1117</td><td>854</td><td>932</td><td>974</td><td>1140</td></tr><tr><td>Bank Heist</td><td>14</td><td>753</td><td>34</td><td>467</td><td>53</td><td>649</td><td>894</td><td>1069</td></tr><tr><td>Battle Zone</td><td>2360</td><td>37188</td><td>4031</td><td>5068</td><td>13074</td><td>12250</td><td>11314</td><td>16456</td></tr><tr><td>Boxing</td><td>0</td><td>12</td><td>8</td><td>78</td><td>70</td><td>78</td><td>78</td><td>80</td></tr><tr><td>Breakout</td><td>2</td><td>30</td><td>16</td><td>20</td><td>84</td><td>31</td><td>24</td><td>53</td></tr><tr><td>Chopper Com.</td><td>811</td><td>7388</td><td>979</td><td>1697</td><td>1565</td><td>420</td><td>1390</td><td>1510</td></tr><tr><td>Crazy Climber</td><td>10780</td><td>35829</td><td>62584</td><td>71820</td><td>59234</td><td>97190</td><td>78969</td><td>82739</td></tr><tr><td>Demon Attack</td><td>152</td><td>1971</td><td>208</td><td>350</td><td>2034</td><td>303</td><td>241</td><td>203</td></tr><tr><td>Freeway</td><td>0</td><td>30</td><td>17</td><td>24</td><td>31</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Frostbite</td><td>65</td><td>4335</td><td>237</td><td>1476</td><td>259</td><td>909</td><td>939</td><td>679</td></tr><tr><td>Gopher</td><td>258</td><td>2412</td><td>597</td><td>1675</td><td>2236</td><td>3730</td><td>4936</td><td>13043</td></tr><tr><td>Hero</td><td>1027</td><td>30826</td><td>2657</td><td>7254</td><td>7037</td><td>11161</td><td>12160</td><td>13378</td></tr><tr><td>James Bond</td><td>29</td><td>303</td><td>101</td><td>362</td><td>463</td><td>445</td><td>318</td><td>317</td></tr><tr><td>Kangaroo</td><td>52</td><td>3035</td><td>51</td><td>1240</td><td>838</td><td>4098</td><td>2773</td><td>5118</td></tr><tr><td>Krull</td><td>1598</td><td>2666</td><td>2205</td><td>6349</td><td>6616</td><td>7782</td><td>7764</td><td>7754</td></tr><tr><td>Kung Fu Master</td><td>258</td><td>22736</td><td>14862</td><td>24555</td><td>21760</td><td>21420</td><td>23753</td><td>22274</td></tr><tr><td>Ms Pacman</td><td>307</td><td>6952</td><td>1480</td><td>1588</td><td>999</td><td>1327</td><td>1696</td><td>1681</td></tr><tr><td>Pong</td><td>-21</td><td>15</td><td>13</td><td>19</td><td>15</td><td>18</td><td>18</td><td>19</td></tr><tr><td>Private Eye</td><td>25</td><td>69571</td><td>35</td><td>87</td><td>100</td><td>882</td><td>1036</td><td>2932</td></tr><tr><td>Qbert</td><td>164</td><td>13455</td><td>1289</td><td>3331</td><td>746</td><td>3405</td><td>2872</td><td>3933</td></tr><tr><td>Road Runner</td><td>12</td><td>7845</td><td>5641</td><td>9109</td><td>9615</td><td>15565</td><td>14248</td><td>14646</td></tr><tr><td>Seaquest</td><td>68</td><td>42055</td><td>683</td><td>774</td><td>661</td><td>618</td><td>544</td><td>665</td></tr><tr><td>Up N Down</td><td>533</td><td>11693</td><td>3350</td><td>15982</td><td>3546</td><td>7667</td><td>5636</td><td>10874</td></tr><tr><td>Human Mean</td><td>0%</td><td>100%</td><td>33%</td><td>96%</td><td>105%</td><td>112%</td><td>108%</td><td>136.5%</td></tr><tr><td>Human Median</td><td>0%</td><td>100%</td><td>13%</td><td>51%</td><td>29%</td><td>49%</td><td>42%</td><td>67.1%</td></tr></table>
635
+
636
+ # E.2. DeepMind Control Suite Experiments
637
+
638
+ The DeepMind Control Suite (DMC, Tassa et al. (2018)) is a widely used benchmark for visual locomotion. We have conducted additional experiments on four tasks: Cheetah Run, Quadruped Run, Walker Run, and Finger Turn Hard. In Fig. 16, we present comparisons between our HarmonyDream and the base DreamerV2. We note that the performance of relatively easy DMC tasks has been almost saturated by recent literature (Yarats et al., 2021; Hafner et al., 2021), and we suppose that in this domain, current limitations of model-based methods are not rooted in the world model, but rather in behavior learning (Hafner et al., 2023), which falls outside the scope of our method and contributions. Nevertheless, our HarmonyDream is still able to obtain a noticeable gain in performance in the more difficult Quadruped Run task.
639
+
640
+ ![](images/6cd3642e7d6d8f453d12f17d90d14eee19d998b2a6aa7a971400c177dea0f2e3.jpg)
641
+ Figure 16. Learning curves of HarmonyDream and DreamerV2 on the DMC domain.
642
+
643
+ ![](images/05edd228016af89dce32658dfbd52a423bacf0d0951fbb615445d69692113376.jpg)
644
+
645
+ ![](images/738ee22eba70c1dda9536919a5a56533fc233ab9b108493205d6d127a515289e.jpg)
646
+
647
+ ![](images/759d880eb0a2c2eca6482e4d4b5a99fa8a9ba1e19d170b95018a93bdbbe9c86a.jpg)
648
+
649
+ # E.3. Ablation Study on Rectified Harmonious Loss
650
+
651
+ In Sec. 3, we have already presented a detailed explanation on the necessity of our rectified harmonic loss, changing the regularization term from $\log \sigma_{i}$ in Eq. (4) to $\log (1 + \sigma_i)$ in Eq. (5). Here, we present experimental results to support our claim. We use Unrectified to note our method trained using the objective in Eq. (4), and Rectified (Ours) to note our method trained using Eq. (5). As shown in Fig. 17 and Fig. 18, the excessively large reward coefficient (Fig. 17c) for Unrectified can lead to a divergence in the dynamics loss (Fig. 17b), which in turn negatively impacts performance (Fig. 17a and Fig. 18).
652
+
653
+ ![](images/cdc467344260f5c206806a4049ad0d1de29fb08f4180d63120b39551ac939b4c.jpg)
654
+ (a) Learning curves.
655
+
656
+ ![](images/511b4945c48a6fd3eaf04617f940151cb9eda0cd12a74224f4a3779f9376c14f.jpg)
657
+ (b) Dynamics loss.
658
+
659
+ ![](images/370f375d6d81c8519b57fe3dad0b72c7e6eb807be5ca10043776f866b80f2ef4.jpg)
660
+ (c) Reward coefficient.
661
+
662
+ ![](images/26ef7c9fe69e55869961dd7a086594b4e266cd68a611d6b29074a833b2ff5fb5.jpg)
663
+ Figure 17. Training curves for Unrectified HarmonyDream (denoted as Unrectified) using Eq. (4) on the DMC Quadruped Run task, in comparison with our HarmonyDream (denoted as Rectified).
664
+
665
+ ![](images/e56a96be6e517dcd15f5073498a38266db5c51841988233e218cedec04e96965.jpg)
666
+ Figure 18. Learning curves for Unrectified HarmonyDream (denoted as Unrectified) using Eq. (4) on the DMCR domain, in comparison with our HarmonyDream (denoted as Rectified).
667
+
668
+ ![](images/31b728d500d9496c317167c9d86444800236a87cb797c770b10e1d66760f84df.jpg)
669
+
670
+ # E.4. Ablation Study on Adjusting Dynamics Loss Weight $w_{d}$
671
+
672
+ Manually tuning the dynamics loss coefficient $w_{d}$ (e.g. $w_{d} = 0.1$ ) is common in MBRL methods (Hafner et al., 2021; 2023; Seo et al., 2022a;b). We note that our HarmonyDream differs from these previous approaches as we treat the different losses in a multi-task view and balance loss scales between them, while previous approaches see $w_{d}$ simply as a hyperparameter. Fig. 19 shows a comparison between fixing $w_{d}$ to 1 in HarmonyDream (denoted as HarmonyDream $w_{d} = 1$ ) and using $\sigma_{d}$ to balance $w_{d}$ (denoted as HarmonyDream (Ours)), where our proposed HarmonyDream performs slightly better than the one fixing $w_{d}$ , and both methods outperform DreamerV2 by a clear margin. This result highlights the importance of harmonizing two different modeling tasks in world models, instead of only tuning on the shared dynamics part of them.
673
+
674
+ ![](images/0d91c6dcccef8e7895882bd119e2adc8db4eeecad8315b42df8cd4b81ea8927f.jpg)
675
+ Figure 19. Ablation on adjusting $w_{d}$ in HarmonyDream.
676
+
677
+ ![](images/49a6e06deed8636e612ce76f5d450977432b63bcbbe2f940f1879a95228774d9.jpg)
678
+
679
+ ![](images/a3bbd709bcd4b91f5075b28a295b7c18f6fe8f4d14287cb0fe84d7324c5e3e3a.jpg)
680
+
681
+ # E.5. Comparison to Tuned Weights
682
+
683
+ We present a direct comparison between our HarmonyDream and manually tuned weights for DreamerV2. For the Meta-world domain, we plot the tuned better results from $w_{r} \in \{10, 100\}$ , $w_{o} = 1$ . For the DMCR domain, we plot tuned results using $w_{r} = 100$ , $w_{o} = 1$ . Results in Fig. 20 show that our HarmonyDream outperforms manually tuned weights in most tasks, which adds to the value of our method.
684
+
685
+ ![](images/11de00ab7d2ba87088b88fd0fa23171f1aa0c2f0aa62f0ad28a8a02ed09750c9.jpg)
686
+
687
+ ![](images/324f76f2689256c20d40ce911755634624348bf141012b0550623a9b184d0ce8.jpg)
688
+ (a) Meta-world.
689
+
690
+ ![](images/9e3f8d0e49ef1abf7284f4a2c7c7ee639eee6ec3ac33a7c7777f46f2208d0c83.jpg)
691
+
692
+ ![](images/21fe6fb649e3959d506e82325e12d6a8c4c7ebf0ec4683f9bd681c1ce4db7d4f.jpg)
693
+ Figure 20. Learning curves of HarmonyDream compared to tuned weights on Meta-world and DMCR.
694
+
695
+ ![](images/fc6e8dfaf2e94c04e93a1f8d7abe1169a0f707f9269501aee826f8777233ea5c.jpg)
696
+ (b) DMCR.
697
+
698
+ ![](images/8169efbb8501ad01ae915a217ccfe7370262cd1a032f2cee428ec2118a785659.jpg)
699
+
700
+ # E.6. Extended Results of Harmony DreamerV3 on Meta-world
701
+
702
+ In Fig. 8 of the main paper, we have presented the aggregated results of our HarmonyDream generalized to DreamerV3 (referred to as Harmony DreamerV3), on three Meta-world tasks: Lever Pull, Handle Pull Side, and Hammer. Here in Fig. 21, we provide individual results of these three tasks, along with the results of an additional task, Sweep Into. Our approach consistently improves the sample efficiency of our base method, proving excellent generality.
703
+
704
+ ![](images/a39405aedc301305e40c1b69663d107422ebd6bfe7a000e9889c4e85ddf56d38.jpg)
705
+ Figure 21. Detailed results of Harmony DreamerV3 on Meta-world.
706
+
707
+ ![](images/3dc67c2503370e40a6326bcbfba9eeb4554a07546a2c28c7effc79a38483da2b.jpg)
708
+
709
+ ![](images/170f4a1d21f129ec86a7d44a7d226160953c02864a82ee915469895ba03d8b21.jpg)
710
+
711
+ ![](images/ccfb5a3206ae2c0c573905714ded674829afcf6e76556d71cf68b25d24e5cc94.jpg)
712
+
713
+ # E.7. Additional Results of Harmony DreamerV3 on Crafter
714
+
715
+ Crafter (Hafner, 2022) is a 2D open-world survival game benchmark where the agent needs to learn multiple skills within a single environment. High rewards in this benchmark demand robust generalization and representation capabilities from the agent. However, our method is not typically effective in the Crafter domain, which is characterized by clear observations and distinct target objects. As a result, Harmony DreamerV3 marginally outperforms DreamerV3, as shown in Fig. 22.
716
+
717
+ ![](images/ddbbdb343f92300fbd883705a72f5c13524c15b0df25ae9cfdffc058dc2d483f.jpg)
718
+ Figure 22. Results of Harmony DreamerV3 on Crafter.
719
+
720
+ # E.8. Extended Results of Implicit MBRL Methods
721
+
722
+ We observe that the performance of TD-MPC (Hansen et al., 2022) is fairly low compared to our HarmonyDream. Due to our limited computational resources, we only conduct experiments on the Meta-world and DMCR domain. The Meta-world result in Fig. 10a aggregates over three tasks: Lever Pull, Handle Pull Side, and Hammer, which are the same three tasks as in Fig. 8. Full TD-MPC results in Fig. 23 show that TD-MPC is unable to learn a meaningful policy in some tasks.
723
+
724
+ ![](images/23facdebd6d6cc0253dd67fd309e838fd557a7c2e984bc2310a5e9e746ed103a.jpg)
725
+
726
+ ![](images/3582cae7f2db0cc821fe38992e05155be872353de8863511408d40edba87b55d.jpg)
727
+ (a) Meta-world.
728
+
729
+ ![](images/ceab2e366d55645d13a07929aabb713520b7f2d35b8e3990e7c4529714948783.jpg)
730
+
731
+ ![](images/755ec8be488c7bb5622e97b7d8ad344f23dd766793c13664eabf06cd14caec55.jpg)
732
+ Figure 23. Learning curves of TD-MPC.
733
+
734
+ ![](images/c938bc67c4cb09fff74080aaccba7d5aeacf2951f826f5c72b2f40d6527661d1.jpg)
735
+ (b)DMCR.
736
+
737
+ ![](images/8db7f4d1f979405d2f16e8180cd01842bc88cc99919ed5e1a5c164dfd5d414c2.jpg)
738
+
739
+ # E.9. Comparison with Denoised MDP
740
+
741
+ HarmonyDream shares a similar point with Denoised MDP (Wang et al., 2022) in enhancing task-centric representations. However, the two approaches are orthogonal. In Fig. 24, we show a comparison of our method to Denoised MDP. Denoised MDP performs information decomposition by changing the MDP transition structure and utilizing the reward as a guide to separate task-relevant information. However, since Denoised MDP does not modify the weight for the reward modeling
742
+
743
+ task, the observation modeling task can still dominate the learning process. Consequently, the training signals from the reward modeling task may be inadequate to guide decomposition. It's also worth noting that Denoised MDP only added noise distractors to task-irrelevant factors in their DMC experiments. On the other hand, the benchmark adopted in our experiments, DMCR, adds visual distractors to both task-irrelevant and task-relevant factors, such as the color of the body and floor, which adds complexity to both factors and results in more challenging tasks. These two reasons above can account for the low performance of Denoised MDP in our benchmarks.
744
+
745
+ ![](images/cd64241fd9c2c93030ae3d72ea91ef1717350e99fc667edf01601e0e88be090c.jpg)
746
+ Figure 24. Comparison of HarmonyDream with Denoised MDP.
747
+
748
+ ![](images/d4084dc841224594795684edf6529894e403808cbefe542351a0d22ae644585e.jpg)
749
+
750
+ ![](images/a345b605a61ac7f0243147a9b0c378ca8f9e3bd5c697930a6f7dbd2b02d91a8a.jpg)
751
+
752
+ # E.10. Comparison with RePo
753
+
754
+ RePo (Zhu et al., 2023) is a modification on DreamerV2 that removes the observation reconstruction loss while introducing a dynamically adjusted coefficient of dynamics loss. As shown in Fig. 25, our HarmonyDream shows a higher sample efficiency compared to RePo on both natural background DMC and DMCR. It is notable that RePo takes a similar form as HarmonyDream without observation loss (i.e. fixing $w_{o} = 0$ ). While the adjusted coefficient of RePo does not guarantee uniform loss scales, we observe in our experiments that it, in effect, makes dynamics loss and reward loss have more similar scales. We demonstrate on the DMCR domain that the two share similar learning curves, which to some extent enhances our Finding 3, that learning signals from rewards alone is inadequate for sample-efficient learning due to limited representation learning capability. We also note that RePo still needs to carefully tune a crucial hyperparameter, the information bottleneck $\epsilon$ , while HarmonyDream does not introduce any hyperparameters.
755
+
756
+ ![](images/3fbce3409abdc1d8ed01243ea280e3b02f4ae597eb52390fc7cd4e4522a4fd2e.jpg)
757
+ (a) Natural background (BG) DMC.
758
+
759
+ ![](images/59ae4173db753d5739d48c99fe65d591844fa8b65de6e0614a16f52b456fd018.jpg)
760
+
761
+ ![](images/7937832fe5d40e121f12071a243d9e72c5a7fd04b45aa5f85ccc38ef99d65f03.jpg)
762
+
763
+ ![](images/c7aa0bdb5411044b7b3822581f6e55b76d0e273376c5879e524d212f36ed6749.jpg)
764
+ Figure 25. Comparison of HarmonyDream with RePo.
765
+
766
+ ![](images/e5d73a3ca0a8d04d4408f41fd6084f05d073411795f3366bbf8102a04a2f37d8.jpg)
767
+ (b) DMCR.
768
+
769
+ ![](images/38b8a596e4a5b218efe547d87d2936d4309d8a6c9b55437fd76558b0c60cf2e0.jpg)
770
+
771
+ # E.11. Learned Coefficients
772
+
773
+ Fig. 27 illustrates the learned harmony loss coefficients for two Meta-world tasks: Lever Pull and Handle Pull Side. The harmonized reward loss coefficient for Lever Pull is observed to be higher than that for Handle Pull Side. This observation aligns with the fact that the coefficient pair $(w_{r}, w_{o}) = (100, 1)$ yields superior performance on Lever Pull, while the pair $(w_{r}, w_{o}) = (10, 1)$ facilitates better learning on Handle Pull Side, as depicted in Fig. 2a.
774
+
775
+ Additionally, we present the impact of varying loss coefficients for DreamerV2 on the Meta-world Hammer task in Fig. 26, supplementing the information in Fig. 2a.
776
+
777
+ ![](images/357df419405203959f221f5e422b59fd4b5ebce422a7ea21c2c99952492fb980.jpg)
778
+ Figure 26. Effects of different loss coefficients on an additional task.
779
+
780
+ ![](images/6cb83b430ee2a389c44dc8897455193b4d75a8f371aa5ee8166212642963c2ed.jpg)
781
+ Figure 27. Learned harmony loss coefficients on Meta-world tasks.
782
+
783
+ ![](images/d62c69a1ba65aa8a0c797a3af3454eccf0c6e046511f1a854ad9830ad56de281.jpg)
784
+
785
+ # E.12. Quantitative Evaluation of the Beneficial Impact of Observation Modeling on Reward Modeling
786
+
787
+ To explore the possible beneficial impact of observation modeling on reward modeling, we utilize the offline experimental setup in Fig 2c and 3, whose details are described in Appendix C.4. We offline train two DreamerV2 agents using task weights $(w_{r} = 100, w_{o} = 1)$ and $(w_{r} = 100, w_{o} = 0)$ and evaluate the ability to accurately predict rewards on a validation set with the same distribution as the offline training set. For this task, we gathered 20,000 segments of trajectories, each of length 50. We utilized 35 frames for observation and predicted the reward for the remaining 15 frames. Results are reported in the form of average MSE loss. We observe that the world model with observation modeling predicts the reward better than the world model that only models the reward. The prediction loss of $(w_{r} = 100, w_{o} = 1)$ is 0.379, while the loss of $(w_{r} = 100, w_{o} = 0)$ is 0.416. This result indicates that observation modeling has a positive effect on reward modeling.
2024/HarmonyDream_ Task Harmonization Inside World Models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c69f1aae268f119301f1b4c7d5f3704c88a573b2ee6a111f6a9f04ebc79c850
3
+ size 1980282
2024/HarmonyDream_ Task Harmonization Inside World Models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/e1ddc5f1-eaf3-4073-812e-a0f518bc5202_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f46e92393fe388e64c7625e95f90d83b127d5139f5b539f941490191e643966f
3
+ size 2697086
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91efb87a4ec52fdd940aefac5685979c4aa8bef8fc7541cef5023dcd13059f45
3
+ size 3078776
2024/Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/e3776478-f994-4e5a-ba2e-f2f06ee40361_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c74491f40ac42943e841861ff8e0a25fc13b5d173ae3e4cb4499a98e6174d148
3
+ size 569279
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/full.md ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning
2
+
3
+ Depeng Li $^{1}$ Tianqi Wang $^{1}$ Junwei Chen $^{1}$ Wei Dai $^{2}$ Zhigang Zeng $^{1}$
4
+
5
+ # Abstract
6
+
7
+ Class-incremental learning (CIL) aims to train a model to learn new classes from non-stationary data streams without forgetting old ones. In this paper, we propose a new kind of connectionist model by tailoring neural unit dynamics that adapt the behavior of neural networks for CIL. In each training session, it introduces a supervisory mechanism to guide network expansion whose growth size is compactly commensurate with the intrinsic complexity of a newly arriving task. This constructs a near-minimal network while allowing the model to expand its capacity when cannot sufficiently hold new classes. At inference time, it automatically reactivates the required neural units to retrieve knowledge and leaves the remaining inactivated to prevent interference. We name our model AutoActivator, which is effective and scalable. To gain insights into the neural unit dynamics, we theoretically analyze the model's convergence property via a universal approximation theorem on learning sequential mappings, which is under-explored in the CIL community. Experiments show that our method achieves strong CIL performance in rehearsal-free and minimal-expansion settings with different backbones.
8
+
9
+ # 1. Introduction
10
+
11
+ Contrary to typical machine learning methods that work on independent and identically distributed data, class incremental learning (CIL) tackles the problem of training a single model on non-stationary data distributions. In this scenario, tasks typically consist of subsets of disjoint classes
12
+
13
+ $^{1}$ School of Artificial Intelligence and Automation, Huazhong University of Science and Technology, Wuhan, China $^{2}$ School of Information and Control Engineering, China University of Mining and Technology, Xuzhou, China. Correspondence to: Zhigang Zeng <zgzeng@hust.edu.cn>.
14
+
15
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
16
+
17
+ that are presented sequentially, without providing task identities at inference time (Wang et al., 2023). However, with data of the current task accessible but none (at least the bulk) of the past, CIL is challenged by a sharp performance decline on the previously learned tasks, known as catastrophic forgetting problem (McCloskey & Cohen, 1989).
18
+
19
+ Recently, CIL of neural networks has seen explosive growth in striving for less forgetting (Bonicelli et al., 2022; Tong et al., 2023; Qiao et al., 2024; Li et al., 2024a). Prior works fall into three main categories (Masana et al., 2023). Rehearsal-based approaches maintain a small portion of past samples and mix them with that of a new task at either input layer (pixel level) (Lopez-Paz & Ranzato, 2017; Bang et al., 2021) or hidden layer (internal representations) (Van de Ven et al., 2020; Hayes et al., 2020). However, this line of work suffers from substantial performance degradation with a smaller buffer that carries inadequate task-specific knowledge and becomes infeasible when a rehearsal buffer is not allowed due to memory constraints or privacy issues. Regularization-based approaches aim to minimize the impact of learning new tasks on the weights (Kirkpatrick et al., 2017; Wolczyk et al., 2022) or feature representations (Schwarz et al., 2018; Li et al., 2024b) that are important for previous tasks. Although avoiding data storage, the involved penalty terms make a fixed-size model rather inflexible to find the optimal solutions as it retains the memory of previous classes entirely in the parameter space. Architecture-based approaches dynamically adapt network components by expansion (Verma et al., 2021; Yang et al., 2023) or mask (Serrà et al., 2018; Ke et al., 2021) operation to absorb knowledge for novel classes. Nevertheless, network expansion usually renders the model size grow quickly as each session proceeds, which should be counted into the memory budget for a fair comparison (Zhou et al., 2023).
20
+
21
+ Yet, in the brain—which clearly has implemented an efficient and scalable function for incremental learning—the reactivation of neuronal activity patterns that represent previous experiences is believed to be important for stabilizing new memories (Rasch & Born, 2007; Joseph et al., 2010). Motivated by the principle of learning and memory in cognitive neuroscience, this paper proposes a new kind of connectionist model that automatically reactivates the involved
22
+
23
+ ![](images/beca7191b7f23ba1deb91c9bd7e729c4afd4fb1a9ae4c6b4c78ec598e57fded0.jpg)
24
+ Figure 1. Overview of AutoActivator. It first generates several batches of random nodes, denoted by different shapes; Then, together with existing ones for knowledge transfer, it parsimoniously recruits new nodes meeting the supervisory mechanism (e.g., in red circles) to a scalable neural unit, where those joined ones are positively influenced by each other as marked by black arrows. In AutoActivator, the former layers are built under the guidance of supervisory mechanism (Section 4.1) while the final classifier layer is step-wise updated by close-formed solutions (Section 4.2). The activation thresholds render a neural unit partially/entirely active or inactivated for prediction.
25
+
26
+ collections of nodes (dubbed neural units)<sup>1</sup> as activators to retrieve knowledge while leaving the remainder as deactivators to avoid crosstalk, hence the name AutoActivator. This is achieved by harnessing neural unit dynamics that adapt the behavior of neural networks for CIL. As shown in Figure 1, AutoActivator pioneers a novel CIL paradigm that runs through the training and test phase:
27
+
28
+ As opposed to the over-parameterized or expanding-and-pruning implementations, one can start with modeling the neural unit from scratch and dynamically grow the network as actually needed by a given task. Specifically, in each training session, we first randomly allocate several batches of random nodes together with the counterparts from earlier sessions and introduce a supervisory mechanism to remove the redundant nodes for the current session. Those meeting the supervisory mechanism are temporarily on standby in the candidate pool. Then, only one batch that contributes to causing a maximum reduction in training errors is added to the corresponding neural unit, i.e., the recruited nodes are positively influenced by the existing ones such that each plays an irreplaceable role. This way constructs a minimalist network for sequential tasks and thus suffices to train more incoming tasks. Meanwhile, we parameterize each neural unit with an activation threshold measured by the predicted probability during training, which guards the decision boundary of learned classes against distortion. At inference time, given batches of test instances from a certain task or class trained, the reactivation of neural units is performed partially or entirely without knowing the task identities.
29
+
30
+ # Our main contributions are threefold:
31
+
32
+ - We design neural unit dynamics that govern the behavior
33
+
34
+ ior of neural networks, including the rules of node generation/connection, activation threshold, and update, as well as interactions responding to non-stationary data streams. The model's convergence property on learning sequential mappings is theoretically guaranteed.
35
+
36
+ - AutoActivator is an efficient and scalable CIL method, characterized by parsimoniously constructing a CIL model whose complexity is commensurate with the intrinsic complexity of each learning task. The method is inherently immune to catastrophic forgetting as neural units reactivated partially or entirely do not infringe upon others, and has strong task-order robustness.
37
+ - Experiments on multiple benchmark datasets consistently demonstrate that our method provides competitive CIL performance, with absolute superiority of rehearsal-free and minimal-expansion desiderata.
38
+
39
+ # 2. Related Work
40
+
41
+ Class-Incremental Learning. We discuss a selection of representative CIL approaches and how they relate to our work. Rehearsal-based approaches explicitly preserve data from previously learned tasks to retrain with the current task. Aided with rehearsal buffers, IL2M (Belouadah & Popescu, 2019) rectifies the network predictions, RM (Bang et al., 2021) focuses on the classification uncertainty to select hard samples, and i-CTRL (Tong et al., 2023) is founded on structured representations for rehearsal. Our method does not buffer past data for the whole CIL process and thus eliminates shortcomings such as scalability and privacy issues. Regularization-based approaches involve penalty terms to vary the plasticity of parameters. EWC (Kirkpatrick et al., 2017) is the pioneer of this branch, followed by SI (Zenke et al., 2017), and MAS (Aljundi et al., 2018). Their net
42
+
43
+ work parameter is associated with the weight importance computed by different strategies. Nevertheless, the challenge is to correctly assign credit to the network weights when the number of tasks is large. Our method keeps the neural unit weights intact during sequential training, i.e., the newly recruited nodes without infringing upon others. Architecture-based approaches isolate existing model parameters or attach additional parameters as each session proceeds. Methods such as DER (Yan et al., 2021), FOSTER (Wang et al., 2022a), and DNE (Hu et al., 2023) acquire sufficient learning capacity by adding a sub-network per task. However, the increased capacity for future tasks must be meticulously balanced with the number of parameters added, particularly considering that the number of tasks the model needs to learn is often unknown in advance. Our method differs in that (i) the expansion quota is commensurate with the intrinsic complexity of each task; (ii) it's more effective to start with a small/compact branch instead of scaling arbitrarily and pruning; and (iii) empirically, our final memory budget is comparable or even superior to the non-growing networks in regularization-based methods.
44
+
45
+ Neural Network Dynamics. The learning dynamics of a connectionist model, such as an artificial neural network (ANN), refers to how the network's internal state evolves over time in response to inputs (Vahedian et al., 2021; Marton et al., 2022). This can involve different levels, including the connections of the neurons, the activation patterns, the flow of information through the network's layers, and the overall convergence and learning behavior (Vyas et al., 2020). For example, training a feed-forward neural network with random hidden nodes has been explored in the single-task learning (Pao & Takefuji, 1992; Li & Wang, 2017). The general idea is to randomly generate hidden nodes (weights and biases), and only output weights need to be tuned in either a deterministic or nondeterministic manner. Such a randomized learning dynamic has demonstrated great potential in developing fast learner models and easy-implementation learning algorithms, such as convolutional/graph randomized networks (Zhang & Suganthan, 2016; Huang et al., 2023). By bridging this intriguing learning dynamic to the architectural update paradigm, our work attempts to build an efficient and scalable network for CIL.
46
+
47
+ # 3. Class-Incremental Learning Setup
48
+
49
+ Notations. Denote $\Gamma = \{g_1, g_2, \ldots\}$ as a set of bounded nonconstant piecewise continuous functions, $\operatorname{span}(\Gamma)$ as a function space spanned by $\Gamma$ , and $L_2(D_t)$ as the space of all Lebesgue measurable functions $f = [f_1, f_2, \ldots, f_{C_t}]: \mathbb{R}^{M_t} \to \mathbb{R}^{C_t}$ defined on $D_t$ . Hence, $L_2$ norm is defined as
50
+
51
+ $$
52
+ \| f \| = \left(\sum_ {c = 1} ^ {C _ {t}} \int_ {D _ {t}} | f _ {c} (x) | ^ {2} d x\right) ^ {\frac {1}{2}} < \infty \tag {1}
53
+ $$
54
+
55
+ The inner product of $\vartheta = [\vartheta_1,\vartheta_2,\dots ,\vartheta_{C_t}]:\mathbb{R}^{M_t}\to \mathbb{R}^{C_t}$ and $f$ is further formulated as
56
+
57
+ $$
58
+ \langle f, \vartheta \rangle = \sum_ {c = 1} ^ {C _ {t}} \left\langle f _ {c}, \vartheta_ {c} \right\rangle = \sum_ {c = 1} ^ {C _ {t}} \int_ {D _ {t}} f _ {c} (x) \vartheta_ {c} (x) d x \tag {2}
59
+ $$
60
+
61
+ We now define CIL formally. A model sequentially learns from the supervised learning datasets $D_{t} = \{(X_{t},Y_{t})|X_{t}\in \mathbb{R}^{N_{t}\times M_{t}},Y_{t}\in \mathbb{R}^{N_{t}\times C_{t}}\}$ of task $t$ ( $t = 1,2,\dots,T$ ), where $X_{t}$ is the data, $Y_{t}$ is the label, $N_{t}$ is the number of samples, $M_{t}$ and $C_t$ are the dimensions, respectively. The model $\mathcal{M}(X_{t - 1};\theta_{t - 1})$ ( $t\geq 2$ ) trained on previous task(s) is parameterized by its connection weights $\theta_{t - 1}$ . The objective is to train an updated model $\mathcal{M}(X_t;\theta_t)$ that accommodates the newly emerging $C_t$ classes, during which the data of previous tasks is inaccessible. When fed test instances from any of tasks 1 to $T$ , the model $\mathcal{M}(X_T;\theta_T)$ can make predictions without task descriptors/identifiers.
62
+
63
+ Fair Comparisons. Since different CIL methods have very different requirements in data, networks, and computation, it is intractable to compare all under the same experimental conditions. Following the suggestion in (Zhou et al., 2023), we holistically evaluate different methods by considering both accuracy and memory cost for a fair comparison. We align the memory cost of model size and exemplar buffer (if any) by switching them to a 32-bit floating number which we refer to as memory budget. Also, with the increasing prominence of foundation models, pre-trained models equipped with informative representations have become available for various downstream requirements (McDonnell et al., 2023; Mehta et al., 2023). Following the settings in prior work (Cha et al., 2021; Rios et al., 2022; Bonicelli et al., 2022; Tang et al., 2023), we optionally inject AutoActivator into some advanced pre-trained backbones such as ResNet (used in PCL (Hu et al., 2021), OWM (Zeng et al., 2019), etc.) and ViT (used in DualPrompt (Wang et al., 2022c), CODA-Prompt (Smith et al., 2023), etc.). Such a setting accommodates real-world scenarios where pre-training is usually involved as a base session (Bonicelli et al., 2022). We conduct experiments across multiple datasets with or without starting with the same pre-training.
64
+
65
+ # 4. Methodology
66
+
67
+ Our AutoActivator is a new kind of connectionist model (see Figure 1), with tailored rules of node generation/connection, activation threshold, and update, as well as interactions responding to sequential tasks. To obtain a good grasp of the CIL model, we first provide the theoretical guide to node expansion in Section 4.1. We then perform the reactivation of involved neural units for learning-without-forgetting decision-making in Section 4.2.
68
+
69
+ # 4.1. Modeling Neural Units via Supervisory Mechanism
70
+
71
+ Instead of empirically over-parameterized or expanding-and-pruning implementations, we seek a brand-new solution with theoretical support during sequential training. With this consideration, we start with modeling a neural unit from scratch and then grow additional nodes as the given problem requires. In this way, the expansion quota is compactly commensurate with the intrinsic complexity of each task, and thus constructs near-minimal neural network architectures for the CIL process. However, two main problems are: (1) How to generate and connect new nodes to a scalable neural unit? (2) How to update and then reactivate the neural units recruited without recourse to task identities?
72
+
73
+ To answer the first question, we draw inspiration from recent advances in network randomization (Huang et al., 2023; Ramanujan et al., 2020; Wang & Li, 2017), a randomized learning technique for developing fast learner models and easy-implementation learning algorithms. A common and basic idea behind this technique is to randomly generate hidden nodes (weights and biases), and only output weights need to be tuned (Pao & Takefuji, 1992; Zhang & Suganthan, 2016; Li & Wang, 2017; Zhang et al., 2022). In this way, one can add new nodes with random weights to different network layers progressively. Specifically, given a target function $f: \mathbb{R}^{M_t} \to \mathbb{R}^{C_t}$ of task $t$ ( $t = 1, 2, \ldots$ ) defined on datasets $D_{t} = \{(X_{t}, Y_{t})\}$ , we suppose a neural unit has been added $L - 1$ nodes one after another directly connected to its readout layer. During each training session $t$ , the output function of the existing network is given by $f_{L - 1}(X_{t}) = \sum_{j = 1}^{L - 1} \beta_{j}(t) g_{j}(X_{t} w_{j} + b_{j})$ ( $L = 1, 2, \ldots, f_{0} = 0$ ) and the current residual error for training is denoted as $e_{L - 1}(t) = f - f_{L - 1}$ , where $w_{j}$ and $b_{j}$ are the hidden parameters, and $\beta_{j}$ is the output weights. Then, the following Proposition 4.1 provides a solution to connect the newly generated node $g_{L}$ ( $w_{L}$ and $b_{L}$ ) to the existing network $f_{L - 1}$ when $C_{t} = 1$ .
74
+
75
+ Proposition 4.1. (Kwok & Yeung, 1997) Let $\Gamma$ be a set of basis functions $g$ . For a fixed $g \in \Gamma$ ( $\| g \| \neq 0$ ), the expression $\| f - (f_{L-1} + \beta_L g_L) \|$ achieve its minimum iff
76
+
77
+ $$
78
+ \beta_ {L} = \left\langle e _ {L - 1}, g _ {L} \right\rangle / \| g _ {L} \| ^ {2} \tag {3}
79
+ $$
80
+
81
+ Proposition 4.1 lays the groundwork for how to connect a new node to the existing network but is limited to the regression problem in single-task learning. Meanwhile, constructing such a new node by Eq. (3) is less practical in the sense that the reduction of residual error per node expansion will be close to zero (Igelnik & Pao, 1995; Wang & Li, 2017), failing to guarantee preferable learning performance with considerable confidence and convergence rate. The main cause is that fixed random weights, which only perform the forward pass without the backward pass, are prone to incur numerous redundant nodes. Therefore, alternatively, random node generation should be "supervisory"
82
+
83
+ by exerting additional conditions in the forward pass. To this end, we introduce a supervisory mechanism to guide the node generation in modeling neural units for CIL.
84
+
85
+ In AutoActivator, the former layers are built under the guidance of supervisory mechanism where each layer is made up of a certain number of scalable neural units, while the final classifier layer is step-wise updated by close-formed solutions. The method randomly allocates a batch of nodes in each training session. The batch that causes the highest reduction in training error is added to the neural unit of the current task. For simplicity, Theorem 4.2 formulates neural units over a two-layer AutoActivator, which can be stacked or injected into existing backbones.
86
+
87
+ Theorem 4.2. (Universal Approximation Theorem for Convergence Property) Suppose that $\text{span}(\Gamma)$ is dense in $L_{2}$ space and $\forall g \in \Gamma$ , $G$ is a collection of some $g$ with nonlinear activation. Given $0 < r(t) < 1$ and a nonnegative real number sequence $\{\mu_{L}(t)\}$ w.r.t. task $t$ ( $t = 1, 2, \ldots; c = 1, \ldots, C_{t}$ ), with $\lim_{L \to +\infty} \mu_{L}(t) = 0$ and $\mu_{L}(t) \leq (1 - r(t))$ . For $L^{2} = 1, 2, \ldots$ , and step size $l \in \mathbb{N}^{+}$ , denoted by
88
+
89
+ $$
90
+ \delta_ {L} ^ {\star} (t) = \sum_ {c = 1} ^ {C _ {t}} \delta_ {L, c} ^ {\star} (t), \delta_ {L, c} ^ {\star} (t) = (1 - r (t) - \mu_ {L} (t)) \| e _ {L - l, c} ^ {\star} (t) \| ^ {2} \tag {4}
91
+ $$
92
+
93
+ If a batch of new nodes $G_{l}(X_{t}W_{l} + B_{l})^{3}$ are randomly generated to satisfy the following inequalities:
94
+
95
+ $$
96
+ \left\langle e _ {L - l, c} ^ {*} (t), G _ {l} \beta_ {l, c} (t) \right\rangle \geq \delta_ {L, c} ^ {\star} (t), c = 1, 2, \dots , C _ {t} \tag {5}
97
+ $$
98
+
99
+ and connected to the existing neural unit through the output weights in the following least-squares sense:
100
+
101
+ $$
102
+ [ \beta_ {1} ^ {\star} (t), \dots , \beta_ {L} ^ {\star} (t) ] = \arg \min _ {\beta (t)} \| f - \sum_ {j = 1} ^ {L} \beta_ {j} (t) g _ {j} \| \tag {6}
103
+ $$
104
+
105
+ Then, we have $\lim_{L\to +\infty}\| f - f_L^\star \| = 0$ where $f_{L}^{\star} = f_{L - l}^{\star}+$ $\beta_l^\star (t)G_l$ and $G_{l} = [g_{L - l + 1},\dots ,g_{L}]$
106
+
107
+ Proof. See Appendix A.
108
+
109
+ ![](images/3b347266bc675fda7a3a9613ac4d81b0f5667689c05c80abccde168439a41b9d.jpg)
110
+
111
+ Based on Theorem 4.2, we can formulate the indicator $\xi_L(t) = \sum_{c=1}^{C_t} \xi_{L,c}(t)$ of supervisory mechanisms for guiding node expansion by a designated step size $l$ , among which
112
+
113
+ $$
114
+ \begin{array}{l} \xi_ {L, c} (t) = \left\langle e _ {L - l, c} ^ {\star} (t), G _ {l} \beta_ {l, c} (t) \right\rangle \\ - (1 - r (t) - \mu_ {L} (t)) \langle e _ {L - l, c} ^ {\star} (t), e _ {L - l, c} ^ {\star} (t) \rangle > 0 \tag {7} \\ \end{array}
115
+ $$
116
+
117
+ Intuitively, $0 < r(t) < 1$ matters in the residual error decreasing speed of task $t$ , which resembles the learning rate
118
+
119
+ of gradient descent but differs in its explicit scope; $\mu_L(t)$ can be seen as the balance coefficient for ensuring the convergence of Theorem 4.2, which can be found in its proof.
120
+
121
+ Remark 4.3. The theoretical analysis redefines Eq. (3) in the context of classification problem for learning sequential tasks. Modeling neural units with supervisory mechanisms can easily add additional capacity. For one thing, it guarantees the convergence property of a model on a sequence of tasks. In particular, we generate several candidate nodes satisfying supervisory mechanisms in a one-by-one or batch-by-batch manner simultaneously and only recruit ones that cause a maximum reduction in residual errors. This is beneficial to accelerate the convergence rate. For another, during sequential training, the required expansion quota potentially matches the inherent difficulty of each newly arriving task. This not only constructs a near-minimal network architecture for CIL but also suffices to train more incoming tasks.
122
+
123
+ # 4.2. Reactivating Updated Neural Units
124
+
125
+ This section addresses the aforementioned second question, i.e., update the connection weights between neural units and the readout layer (termed output weights) and then reactivate the involved neural units as activators for decision-making. Unlike neural networks with an empirically fixed topology that is unitedly trained, the updates of output weights under node expansion must be repeated every time nodes are added. Hence, computational efficiency becomes the main bottleneck when leveraging the commonly used backpropagation algorithm.
126
+
127
+ Update. Here we seek an alternative solution under the premise of supervisory mechanisms, which ensures that the nodes already existing in each neural unit are indispensable in learning a given task. That is the pseudoinverse of a partitioned matrix described by some earlier studies (Leonides, 2012; Ben-Israel & Greville, 2003; Chen & Wan, 1999). A dynamic stepwise updating algorithm is then used to update the output weights instantly. It applies to the node expansion process in Theorem 4.2, as illustrated in the following.
128
+
129
+ Assume that there has been a matrix $A_{L}$ and we expand it by adding additional $l$ $(l = 1,2,\dots)$ node(s). Let $G_{l}$ be the resulting matrix. For task $t$ , outputs of the neural unit are given by $\hat{Y}_t = A_L W_L^\star (t)$ , where $W_{L}^{\star}(t) = [\beta_{1}^{\star}(t),\ldots ,\beta_{L}^{\star}(t)]$ as presented in Eq. (6). Denote by $A_{L + l} = [A_L,G_l]$ , we have
130
+
131
+ $$
132
+ W _ {L + l} ^ {\star} (t) \triangleq (A _ {L + 1}) ^ {\dagger} Y _ {t} = \left[ \begin{array}{c} W _ {L} ^ {\star} (t) - D B ^ {\mathrm {T}} Y _ {t} \\ B ^ {\mathrm {T}} Y _ {t} \end{array} \right] \quad (8)
133
+ $$
134
+
135
+ where the pseudoinverse of $A_{L + l}$ is
136
+
137
+ $$
138
+ \left(A _ {L + 1}\right) ^ {\dagger} = \left[ \begin{array}{c} \left(A _ {L}\right) ^ {\dagger} - D B ^ {\mathrm {T}} \\ B ^ {\mathrm {T}} \end{array} \right] \tag {9}
139
+ $$
140
+
141
+ $$
142
+ B ^ {\mathrm {T}} = \left\{ \begin{array}{l l} C ^ {\dagger} & \text {i f} C \neq 0 \\ (D ^ {\mathrm {T}} D + I) ^ {- 1} D ^ {\mathrm {T}} \left(A _ {L}\right) ^ {+} & \text {i f} C = 0 \end{array} \right. \tag {10}
143
+ $$
144
+
145
+ where $C = G_{l} - A_{L}D$ and $D = (A_L)^\dagger G_l$ .
146
+
147
+ This way, updating output weights has three strengths. First, the update process can be easily finished without complete retraining, i.e., a new pseudoinverse matrix is obtained through a simple calculation of the existing ones. Second, it updates the output weights progressively when adding nodes to each neural unit. In each step, the output weights are theoretically the optimal solution in the least-square sense. Third, only output weights need to be optimized every time, as explicitly expressed in close-formed solutions. Therefore, it avoids the back-propagation of error signals.
148
+
149
+ Reactivation. In the CIL scenario, task identities are typically absent at the inference time. Hence, another key technical point of AutoActivator is to partially or entirely re-activate the required neural units for task-agnostic decision-making. Herein an activation threshold is calculated during training to be used for activating some of the neural units at the test time. Suppose $T$ tasks with $\sum_{t=1}^{T} C_t$ classes have been sequentially trained, yielding $T$ neural units. The following explains how our approach automatically performs the reactivation when fed test instances from tasks 1 to $T$ .
150
+
151
+ We first retrospect the training phase to passingly introduce the activation threshold of each neural unit, averaged by the highest predicted probability belonging to class $c$ ( $c = 1,2,\ldots,C_t$ ):
152
+
153
+ $$
154
+ \operatorname {t h r e s h o l d} (t) = \operatorname {m e a n}. \max . \left(\operatorname {s o f t m a x} \left(\hat {Y} _ {t}\right) - \alpha (t)\right) \tag {11}
155
+ $$
156
+
157
+ where $\alpha(t) = 1 / C_t$ is the lowest probability triggering a decision. Hence, a neural unit is finally parameterized by its supervisory mechanism-based random weights (and biases), dynamically stepwise updated output weights, and the activation thresholds. Then, for test instances of any classes seen so far, the objective is to minimize the distance:
158
+
159
+ $$
160
+ c \leftarrow \arg \min _ {t} | t h r e s h o l d (t) - t h r e s h o l d (t) | \tag {12}
161
+ $$
162
+
163
+ where “ $\leftarrow$ ” means returning index, $c$ is the predicted class, and $\tilde{\text{threshold}}(t)$ is computed in Eq. (11) but with test instances. Indeed, Eq. (11) rectifies the inter-class confusion occurring in the similar softmax outputs given test instances from different tasks; Eq. (12) further brings these results to a comparable level and returns the predicted class by tracking the minimal distance in terms of the activation thresholds. From the perspective of methodology, it works on test images arriving in batches or instances, among which feeding batches of test instances from a certain task or class trained facilitates the reactivation progress. Therefore, our AutoActivator can selectively reactivate the involved neural units to retrieve knowledge and leave the remaining inactivated to prevent interference. We summarize its CIL procedure in Algorithm 1 in Appendix B.
164
+
165
+ Table 1. Comparison results on the split MNIST and FashionMNIST datasets with MLP. We report the average classification accuracy (ACA), backward transfer (BWT) across five random task-order runs, and the aligned memory budget (MB) = model size (#model, MB) + exemplar buffer (#exemplar, MB), where 0 means no rehearsal. No pre-training is used for AutoActivator and all the compared methods.
166
+
167
+ <table><tr><td rowspan="2">METHOD</td><td colspan="2">MEMORY BUDGET</td><td colspan="2">MNIST-10/5</td><td colspan="2">FASHIONMNIST-10/5</td></tr><tr><td>#MODEL ↓</td><td>#EXEMPLAR ↓</td><td>ACA(%) ↑</td><td>BWT ↑</td><td>ACA(%) ↑</td><td>BWT ↑</td></tr><tr><td>SGD (LOWER BOUND)</td><td>1.82</td><td>-</td><td>~19.91</td><td>-</td><td>~19.81</td><td>-</td></tr><tr><td>MTL (UPER BOUND)</td><td>1.82</td><td>-</td><td>~98.56</td><td>-</td><td>~96.61</td><td>-</td></tr><tr><td>MAS</td><td>5.47</td><td>0</td><td>44.61±6.62</td><td>-0.06±0.06</td><td>34.91±5.47</td><td>-0.61±0.09</td></tr><tr><td>OLEWC</td><td>5.47</td><td>0</td><td>57.38±4.04</td><td>-0.38±0.06</td><td>54.09±4.03</td><td>-0.40±0.08</td></tr><tr><td>SI</td><td>5.47</td><td>0</td><td>69.44±4.37</td><td>-0.04±0.09</td><td>52.11±2.22</td><td>-0.49±0.06</td></tr><tr><td>EFT</td><td>16.54</td><td>0</td><td>82.53±1.15</td><td>-0.09±0.07</td><td>74.79±1.23</td><td>-0.13±0.05</td></tr><tr><td>PCL</td><td>3.01</td><td>0</td><td>94.14±0.67</td><td>-0.03±0.03</td><td>83.27±0.81</td><td>-0.12±0.01</td></tr><tr><td>AOP</td><td>5.39</td><td>0</td><td>94.43±0.21</td><td>-0.05±0.02</td><td>82.97±0.95</td><td>-0.14±0.04</td></tr><tr><td>CRNET</td><td>1.81</td><td>0</td><td>94.49±0.32</td><td>-0.02±0.02</td><td>86.01±0.74</td><td>-0.09±0.01</td></tr><tr><td>FS-DGPM</td><td>1.82</td><td>5.98</td><td>89.12±1.14</td><td>-0.08±0.01</td><td>80.89±0.74</td><td>-0.12±0.02</td></tr><tr><td>NISPA</td><td>1.82</td><td>5.98</td><td>91.07±0.86</td><td>-0.04±0.00</td><td>80.93±0.59</td><td>-0.15±0.02</td></tr><tr><td>BIC</td><td>1.82</td><td>5.98</td><td>93.93±0.58</td><td>-0.04±0.01</td><td>82.36±0.72</td><td>-0.11±0.03</td></tr><tr><td>ARI</td><td>3.65</td><td>5.98</td><td>93.60±0.57</td><td>-0.04±0.00</td><td>82.89±0.83</td><td>-0.10±0.01</td></tr><tr><td>Co2L</td><td>1.82</td><td>5.98</td><td>93.78±0.24</td><td>-0.04±0.00</td><td>80.93±0.59</td><td>-0.15±0.02</td></tr><tr><td>RPS-NET</td><td>14.60</td><td>5.98</td><td>94.53±1.92</td><td>-0.02±0.01</td><td>84.18±1.60</td><td>-0.03±0.01</td></tr><tr><td>LOGD</td><td>1.82</td><td>5.98</td><td>94.87±0.59</td><td>-0.04±0.01</td><td>84.39±0.47</td><td>-0.09±0.03</td></tr><tr><td>IL2M</td><td>1.82</td><td>5.98</td><td>95.51±0.42</td><td>-0.04±0.01</td><td>82.38±2.04</td><td>-0.15±0.03</td></tr><tr><td>AUTOACTIVATOR (OURS)</td><td>2.04</td><td>0</td><td>97.32±0.03</td><td>0.00±0.00</td><td>88.46±0.06</td><td>-0.09±0.08</td></tr></table>
168
+
169
+ # 5. Experiment
170
+
171
+ # 5.1. Experiment Setting
172
+
173
+ Datasets. We experiment on multiple datasets commonly used for CIL. Small Scale: Both MNIST (LeCun et al., 1998) and FashionMNIST (Xiao et al., 2017) are respectively split into 5 disjoint tasks with 2 classes per task. The evaluation starts with the toy examples since AutoActivator belongs to the theoretical and embryonic approach. Medium Scale: CIFAR-100 (Krizhevsky et al., 2009) is divided into 10 (25) tasks with each task containing 10 (4) disjoint classes. Large Scale: ImageNet-R (Hendrycks et al., 2021) has 200 classes with 24,000 samples for training and 6,000 for testing. It is split into 10 tasks with 20 classes in each task. The substantial intra-class variability renders it more akin to intricate real-world problems. We provide details of the data splits used in Appendix C.1.
174
+
175
+ Baselines. We extensively compare our method with (i) representative and the latest CIL baselines: IL2M (Belouadah & Popescu, 2019), BiC (Wu et al., 2019), LOGD (Tang et al., 2021), FS-DGPM (Deng et al., 2021), Co $^2$ L (Cha et al., 2021), ARI (Wang et al., 2022b), NISPA (Gurbuz & Dovrolis, 2022), DDGR (Gao & Liu, 2023), SI (Zenke et al., 2017), MAS (Aljundi et al., 2018), OLEWC (Schwarz et al., 2018), AOP (Guo et al., 2022), CRNet (Li & Zeng, 2023), RPS-Net (Rajasegaran et al., 2019), EFT (Verma et al., 2021), DER (Yan et al., 2021), PCL (Hu et al., 2021), MORE (Kim et al., 2022), CLDNet (Li et al., 2024b), among which the original FS-DGPM uses a multihead incremental setting where each task has a separate
176
+
177
+ classifier but task identities are not provided in our experiments; (ii) recent prompt-based methods over the pretrained ViT: L2P (Wang et al., 2022d), DualPrompt (Wang et al., 2022c), CODA-Prompt (Smith et al., 2023); and (iii) non-CIL baselines: stochastic gradient descent for sequential training (SGD; approximate lower bound) and joint multiple-task learning (MTL; approximate upper bound).
178
+
179
+ Training. We refer to every aforementioned method's original codebases for implementation and hyper-parameter selection to ensure the best performance. We repeat each experiment five times with randomly shuffled task orderings to get the mean and the standard deviation estimates. More implementation details for architectures, hyper-parameters, and metrics are provided in Appendix C.
180
+
181
+ # 5.2. Main Comparison Results
182
+
183
+ MNIST-10/5 and FashionMNIST-10/5. Table 1 extensively compares different baselines on two standard benchmark datasets adapted for CIL. Our AutoActivator provides strong CIL performance with respect to three measurements. (i) ACA: it achieves the best average accuracy of $97.32\%$ and $88.46\%$ , surpassing the second-best competitors by $1.81\%$ and $2.45\%$ , respectively; (ii) BWT: it behaves with almost zero forgetting during sequentially learning five 2-class tasks, like some work in the task-incremental learning (TIL) scenario where task identities are required to match specific masks (Kang et al., 2022); and (iii) Memory budget: our final #model is slightly $(\sim 12\%)$ larger than the rehearsal-based ones but our method needs no #exemplar buffers.
184
+
185
+ Table 2. Comparison results on the split CIFAR-100 dataset with ResNet-18, including MORE that originally uses DeiT-S/16 (Touvron et al., 2021). Scale ratio approximately gives the % of the final memory budget (MB) and the initial model size (MB), averaged over the two sequences. All methods allow to start with the same pre-training or learning from scratch and only the winner results are reported.
186
+
187
+ <table><tr><td rowspan="2">METHOD</td><td rowspan="2">SCALE RATIO (%) ↓</td><td colspan="2">CIFAR-100/10</td><td colspan="2">CIFAR-100/25</td></tr><tr><td>ACA(%) ↑</td><td>BWT ↑</td><td>ACA(%) ↑</td><td>BWT ↑</td></tr><tr><td>SGD</td><td>-</td><td>7.75±0.17</td><td>-</td><td>3.18 ±0.23</td><td>-</td></tr><tr><td>NISPA</td><td>&gt;200</td><td>37.60±0.73</td><td>-0.25±0.02</td><td>29.50±0.66</td><td>-0.31±0.01</td></tr><tr><td>LOGD</td><td>119.26</td><td>47.45±0.31</td><td>-0.13±0.03</td><td>48.71±0.23</td><td>-0.16±0.00</td></tr><tr><td>RPS-NET</td><td>&gt;200</td><td>58.95±0.25</td><td>-0.18±0.01</td><td>57.43±0.35</td><td>-0.19±0.01</td></tr><tr><td>DDGR</td><td>&gt;200</td><td>59.84±0.57</td><td>-</td><td>59.15±0.63</td><td>-</td></tr><tr><td>IL2M</td><td>119.26</td><td>60.14±0.68</td><td>-0.10±0.01</td><td>61.33±0.32</td><td>-0.02±0.02</td></tr><tr><td>BIC</td><td>155.34</td><td>61.03±0.71</td><td>-0.09±0.00</td><td>60.24±0.59</td><td>-0.08±0.04</td></tr><tr><td>PCL</td><td>146.02</td><td>63.58±0.37</td><td>-0.11±0.01</td><td>62.84±0.43</td><td>-0.12±0.01</td></tr><tr><td>Co2L</td><td>&gt;200</td><td>64.31±0.47</td><td>-0.15±0.02</td><td>63.67±0.28</td><td>-0.11±0.01</td></tr><tr><td>DER</td><td>&gt;200</td><td>65.29±1.01</td><td>-0.16±0.01</td><td>63.54±0.97</td><td>-0.18±0.01</td></tr><tr><td>CLDNET</td><td>115.82</td><td>65.42±0.36</td><td>-</td><td>64.98±0.42</td><td>-</td></tr><tr><td>MORE</td><td>120.08</td><td>67.13±1.03</td><td>-</td><td>66.95±0.98</td><td>-</td></tr><tr><td>FS-DGPM</td><td>191.71</td><td>67.54±0.36</td><td>-0.23±0.02</td><td>68.45±0.38</td><td>-0.27±0.04</td></tr><tr><td>OURS</td><td>114.26</td><td>69.65±0.14</td><td>-0.01±0.01</td><td>70.16±0.20</td><td>-0.03±0.01</td></tr></table>
188
+
189
+ Table 3. Comparison results on the split ImageNet-R dataset using pre-trained ViT. Buffer counts the number of exemplars saved for rehearsal. Forgetting (denoted by $\mathcal{F}$ ) is negatively correlated with BWT. All results except ours and CODA-Prompt (Smith et al., 2023) are extracted from (Wang et al., 2022c). Note that the original CODA-Prompt uses an easier accuracy-related AIA metric than others and we have aligned it here.
190
+
191
+ <table><tr><td>METHOD</td><td>BUFFER ↓</td><td>ACA(%) ↑</td><td>F ↓</td></tr><tr><td>ER</td><td></td><td>55.13±1.29</td><td>0.35±0.52</td></tr><tr><td>BIC</td><td></td><td>52.14±1.08</td><td>0.37±1.05</td></tr><tr><td>GDUMB</td><td>1000</td><td>38.32±0.55</td><td>-</td></tr><tr><td>DER++</td><td></td><td>55.47±1.31</td><td>0.35±1.50</td></tr><tr><td>Co2L</td><td></td><td>53.45±1.55</td><td>0.37±1.81</td></tr><tr><td>L2P</td><td></td><td>61.57±0.66</td><td>0.10±0.20</td></tr><tr><td>DUALPROMPT</td><td rowspan="2">0</td><td>68.13±0.49</td><td>0.05±0.20</td></tr><tr><td>CODA-PROMPT</td><td>69.01±0.55</td><td>0.05±0.20</td></tr><tr><td>OURS†</td><td></td><td>65.45±0.85</td><td>0.03±0.20</td></tr><tr><td>OURS††</td><td></td><td>70.32±0.55</td><td>0.02±0.20</td></tr><tr><td>UPPER BOUND</td><td>-</td><td>79.13±0.18</td><td>-</td></tr></table>
192
+
193
+ These results indicate that AutoActivator well trades off between model accuracy and memory budget. This makes sense for real-world applications under privacy-sensitive and resource-limited CIL scenarios. Meanwhile, the steady standard deviations show that our method has strong task-order robustness, with similar results regardless of random orderings for 5 independent runs.
194
+
195
+ CIFAR-100/10 and CIFAR-100/25. Table 2 reports two more challenging task sequences evenly split by the widely-used visual benchmark CIFAR-100. Based on the empirical evaluation, our method achieves the best average classification accuracy of $69.65\%$ and $70.16\%$ , improving upon the second-best method by $2.11\%$ on CIFAR-100/10 and $1.71\%$
196
+
197
+ on CIFAR-100/25, respectively. Interestingly, although pretraining implicitly alleviates the effects of catastrophic forgetting, it is not necessarily translated to CIL performance. We observe that some well-known methods still suffer from a large forgetting given the pre-trained backbone compared with a learning-from-scratch paradigm, similar findings can be observed in (Wang et al., 2022c). In addition to average classification accuracy, our method outperforms the selected state-of-the-art methods on scale ratio, indicating that the network expansion is compactly commensurate with the intrinsic complexity of a task sequence. Again, the proposed method yields competitive standard deviations indicating the superiority task-order robustness.
198
+
199
+ ImageNet-R-200/10. Table 3 records the performance of compared methods starting from the same ImageNet pretrained ViT-B/16 for the split ImageNet-R sequence. This yields two versions of our system: Ours† refers to only one pre-trained ViT being used; Ours†† refers to attaching complementary prompts to two pre-trained ViT, resembling what DualPrompt learns two sets of disjoint prompt spaces but are untouched during CIL process. We observe that it is still particularly challenging for rehearsal-based methods with a buffer size of 1000. By contrast, there is an obvious gain for the recent emerging prompt-based methods, even though they are rehearsal-free. It is worth mentioning that Ours†† outperforms the strongest competitors DualPrompt and CODA-Prompt by $2.19\%$ and $1.31\%$ , respectively. This implies that prompt-based methods have not come close to exhausting their capacity for accuracy, e.g., combining with our method for a marginal boost. The proposed connectionist model, which tailors neural unit dynamics with its convergence property theoretically guaranteed, can thus serve as a general CIL classifier. Meanwhile, our method shows competitive performance on the metric Forgetting. In
200
+
201
+ Table 4. Parameter analysis of supervisory mechanisms. We report the ACA, the cumulative number of nodes (Nodes), and the whole running time (Time) per task sequence under different $l$ and $T_{max}$ .
202
+
203
+ <table><tr><td rowspan="2">STEP SIZE</td><td rowspan="2">Tmax</td><td colspan="3">MNIST-10/5</td><td colspan="3">FASHIONMNIST-10/5</td></tr><tr><td>ACA(%)↑</td><td>NODES↓</td><td>TIME(S)↓</td><td>ACA(%)↑</td><td>NODES↓</td><td>TIME(S)↓</td></tr><tr><td rowspan="4">l=1</td><td>1</td><td>96.86</td><td>692</td><td>12.87</td><td>88.22</td><td>702</td><td>13.13</td></tr><tr><td>10</td><td>97.08</td><td>640</td><td>18.38</td><td>88.32</td><td>623</td><td>16.26</td></tr><tr><td>50</td><td>97.30</td><td>586</td><td>28.28</td><td>88.54</td><td>574</td><td>30.50</td></tr><tr><td>200</td><td>97.31</td><td>532</td><td>62.45</td><td>88.53</td><td>512</td><td>48.99</td></tr><tr><td rowspan="4">l=10</td><td>1</td><td>96.82</td><td>700</td><td>6.76</td><td>88.19</td><td>720</td><td>6.83</td></tr><tr><td>10</td><td>97.05</td><td>680</td><td>10.92</td><td>88.37</td><td>680</td><td>13.39</td></tr><tr><td>50</td><td>97.24</td><td>670</td><td>19.74</td><td>88.51</td><td>660</td><td>17.95</td></tr><tr><td>200</td><td>97.21</td><td>650</td><td>42.83</td><td>88.52</td><td>650</td><td>33.40</td></tr></table>
204
+
205
+ ![](images/d734169f7d3d34176e4892c751015e43af9babb9ae76c040c7b6a7e811b244b7.jpg)
206
+ (a)
207
+
208
+ ![](images/36946936c20f1b29b4856801ba0af48177bfe2b3f50d86303cc4cb9a1f7c49ed.jpg)
209
+ (b)
210
+
211
+ ![](images/60139086abf398af16761bc877fab8df13553f14cdccdb6d54755f669f8f38c9.jpg)
212
+ (c)
213
+
214
+ ![](images/29a96f9f71fe657dc63e229087001d04d69ff066478bdb67e03093fde3ffd79d.jpg)
215
+ (d)
216
+ Figure 2. t-SNE visualization where each color represents a class. (a) Mixed raw sample space based on the training data of ten classes as a reference. (b)-(f) Well-clustered representation space based on neural units' outputs after learning two classes per session.
217
+
218
+ ![](images/17638a749666073972c0ce6de99f6f1d54ee5fb9c26e05cdcf4c61a5bb156700.jpg)
219
+ (e)
220
+
221
+ ![](images/8b354ab7b78274b09d300416fdce2ae62005f8bf7658ad792d2b3fc729a9f5e9.jpg)
222
+ (f)
223
+
224
+ Table 5. Influence of expected accuracy in supervisory mechanisms. We report the neural unit size per task $(t = 1,2,\dots ,5)$ and the average number of parameters per class.
225
+
226
+ <table><tr><td>R(t)</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>#PARAM (M)</td></tr><tr><td>99%</td><td>200</td><td>200</td><td>50</td><td>30</td><td>200</td><td>0.0535</td></tr><tr><td>98%</td><td>200</td><td>200</td><td>20</td><td>20</td><td>100</td><td>0.0425</td></tr><tr><td>95%</td><td>20</td><td>70</td><td>20</td><td>10</td><td>20</td><td>0.0110</td></tr></table>
227
+
228
+ Table 6. Effectiveness of reactivation process, measured by the $\mathrm{ACA}(\%)$ under different components.
229
+
230
+ <table><tr><td>COMPONENT I</td><td>X</td><td>✓</td><td>✓</td></tr><tr><td>COMPONENT II</td><td>X</td><td>X</td><td>✓</td></tr><tr><td>MNIST-10/5</td><td>13.69</td><td>97.18</td><td>97.21</td></tr><tr><td>FASHIONMNIST-10/5</td><td>22.05</td><td>86.46</td><td>88.37</td></tr><tr><td>CIFAR-100/10</td><td>5.56</td><td>69.21</td><td>69.27</td></tr><tr><td>IMAGENET-R</td><td>4.98</td><td>63.25</td><td>65.83</td></tr></table>
231
+
232
+ a nutshell, prompt-based methods exhibit a wise utilization of pre-trained transformer-based backbones while our AutoActivator seeks an effective and scalable implementation.
233
+
234
+ # 5.3. Analysis of Modifying Neural Unit Dynamics
235
+
236
+ We now conduct an extensive empirical investigation to display the effectiveness of modules in the proposed novel connectionist model. This also covers the ablation study and parameter analysis, which pertains to each component serving for CIL. We first investigate two key components in supervisory mechanisms through the lens of CIL: (1) step size $l$ for recruiting node(s) each time—we refer to $l = 1$ as a one-by-one version and $l \geq 2$ as a batch-by-batch version; and (2) the maximum times of random generation $T_{max}$ —it determines the number of attempts for mining candidate nodes that meet with a supervisory mechanism.
237
+
238
+ One-by-One v.s. Batch-by-Batch Version. It can be observed from Table 4 that both versions could achieve the same-level results. However, under the equal $T_{max}$ setting, the one-by-one version ( $l = 1$ ) shows superiority in expand-
239
+
240
+ ing more compact neural units as adding only one node each time is potentially more targeted; By contrast, the batch-by-batch version $(l = 10)$ could significantly reduce the time requirements. It is worth mentioning that the results of both versions under proper $T_{max}$ (e.g., $T_{max} = 50$ used in our experiments) are at an acceptable level.
241
+
242
+ The Maximum Times of Random Generation. Also from Table 4, we observe that a larger $T_{max}$ contributes to shrinking the Nodes while slightly improving the ACA without sacrificing the Time too much. However, an excessively high value would make the construction of the candidate pool time-consuming, while a too little one would give rise to learning instability for failure in finding nodes that are useful enough. Hence, $T_{max}$ is related to both opportunity and efficiency in the process of node generation.
243
+
244
+ Representation Learning of Neural Units. We also visualize the representation learning of scalable neural units. Fig. 2 depicts the t-SNE visualization (Van der Maaten & Hinton, 2008) of the raw sample space and the output representations of neural units. We observe that the same classes are well clustered while different classes are properly separated. Therefore, the representation learning of neural units could provide useful information for decision-making, i.e., to adjust the decision boundary for all classes simultaneously, and facilitate the dynamic stepwise update of output weights in the least-square sense.
245
+
246
+ The Actual Expansion Quota. To indicate the expansion quota on given problems, we gather the neural unit size and count the number of parameters (#param). Taking FashionMNIST-10/5 as an example, we specify the maximum number of nodes $L_{max}(t) = 200$ as one of the termination criteria and vary another termed expected accuracy $R(t)$ for node expansion. Table 5 shows that the final expansion quota is commensurate with the intrinsic complexity of every task, e.g., only 30 nodes are recruited for Task 4 under $R(t) = 99\%$ . Meanwhile, the node expansion slightly introduced additional parameters, about $0.0535 \mathrm{M}$ for each class, which only equals the level of replaying 7 exemplars.
247
+
248
+ Ablation Study of Activation Thresholds. We then validate the effectiveness of reactivation for defying the inter-class confusion in CIL. Note that Component I by Eq. (11) rectifies inter-class confusion and Component II by Eq. (12) calibrates the results. Table 6 shows that our model would suffer serious forgetting without them. By contrast, using Component I could tackle this issue in most cases, together with Component II for a marginal boost. In particular, the latter works well for the case of substantial intra-class variability, demonstrating that AutoActivator could exactly reactivate the involved neural units without recourse to task identities. More insights and analysis are given in Appendix D.
249
+
250
+ # 6. Conclusion
251
+
252
+ We propose to harness neural unit dynamics for efficient and scalable CIL. Unlike most architecture-based methods whose expansion criterion relies on changes of the loss, which lacks theoretical guarantees, the supervisory mechanism narrows the gap using a universal approximation theorem. The reactivation paradigm pioneered is biologically plausible, and we believe this has a lot of potential room for exploration. Sufficient comparison experiments and ablation analysis display the effectiveness of our model. Other interesting investigations that we leave for future work include combining our approach with class-imbalance sequences, which may benefit from an AutoActivator-like algorithm.
253
+
254
+ # Acknowledgements
255
+
256
+ This work was supported by the National Natural Science Foundation of China under Grants 623B2040 and 61936004, and the 111 Project on Computational Intelligence and Intelligent Control under Grant B18024.
257
+
258
+ # Impact Statement
259
+
260
+ This paper presents work whose goal is to advance the field of General Machine Learning. We would like to discuss the potential societal consequences that may result from the limitation of our work. The supervised learning dataset we used by following most existing CIL methods involves the availability of a task boundary during training. From a practical perspective, however, it can be a restrictive assumption and somewhat not be real-world applicable. We leave further study (e.g., novel class discovery technique) on this as future work. Besides, we assume the availability of a pre-trained backbone. While this assumption is widely accepted, as pre-trained models have become a common asset in advanced vision communities, it is important to consider that biases and fairness issues present in the original model may persist during the CIL process. To mitigate the bias and fairness issues, we strongly recommend that users conduct a thorough examination of the pre-trained models.
261
+
262
+ # References
263
+
264
+ Aljundi, R., Babiloni, F., Elhoseiny, M., Rohrbach, M., and Tuytelaars, T. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision, pp. 139-154, 2018.
265
+ Bang, J., Kim, H., Yoo, Y., Ha, J.-W., and Choi, J. Rainbow memory: Continual learning with a memory of diverse samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8218-8227, 2021.
266
+ Belouadah, E. and Popescu, A. IL2M: Class incremental learning with dual memory. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 583-592, 2019.
267
+ Ben-Israel, A. and Greville, T. N. Generalized Inverses: Theory and Applications, volume 15. Springer Science & Business Media, 2003.
268
+ Bonicelli, L., Boschini, M., Porrello, A., Concetto, S., Calderara, S., et al. On the effectiveness of lipschitz-driven rehearsal in continual learning. In Advances in Neural Information Processing Systems, volume 35, pp. 31886-31901, 2022.
269
+ Cha, H., Lee, J., and Shin, J. Co $^2$ L: Contrastive continual learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9516-9525, 2021.
270
+ Chen, C. P. and Wan, J. Z. A rapid learning and dynamic stepwise updating algorithm for flat neural networks and the application to time-series prediction. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 29(1):62-72, 1999.
271
+ Deng, D., Chen, G., Hao, J., Wang, Q., and Heng, P.-A. Flattening sharpness for dynamic gradient projection memory benefits continual learning. In Advances in Neural Information Processing Systems, volume 34, pp. 18710-18721, 2021.
272
+ Douillard, A., Cord, M., Ollion, C., Robert, T., and Valle, E. PODNet: Pooled outputs distillation for small-tasks incremental learning. In Computer vision-ECCV 2020: 16th European conference, Glasgow, UK, August 23-28, 2020, proceedings, part XX 16, pp. 86-102. Springer, 2020.
273
+ Gao, R. and Liu, W. DDGR: continual learning with deep diffusion-based generative replay. In International Conference on Machine Learning, pp. 10744-10763. PMLR, 2023.
274
+ Guo, Y., Hu, W., Zhao, D., and Liu, B. Adaptive orthogonal projection for batch and online continual learning. In
275
+
276
+ Proceedings of the AAAI Conference on Artificial Intelligence, pp. 6783-6791, 2022.
277
+ Guo, Y., Liu, B., and Zhao, D. Dealing with cross-task class discrimination in online continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11878-11887, 2023.
278
+ Gurbuz, M. B. and Dovrolis, C. NISPA: Neuro-inspired stability-plasticity adaptation for continual learning in sparse networks. In International Conference on Machine Learning, pp. 8157-8174. PMLR, 2022.
279
+ Hayes, T. L., Kafle, K., Shrestha, R., Acharya, M., and Kanan, C. Remind your neural network to prevent catastrophic forgetting. In European Conference on Computer Vision, pp. 466-483. Springer, 2020.
280
+ Hendrycks, D., Basart, S., Mu, N., Kadavath, S., Wang, F., Dorundo, E., Desai, R., Zhu, T., Parajuli, S., Guo, M., et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8340-8349, 2021.
281
+ Hsu, Y.-C., Liu, Y.-C., Ramasamy, A., and Kira, Z. Re-evaluating continual learning scenarios: A categorization and case for strong baselines. arXiv preprint arXiv:1810.12488, 2018.
282
+ Hu, W., Qin, Q., Wang, M., Ma, J., and Liu, B. Continual learning by using information of each class holistically. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 7797-7805, 2021.
283
+ Hu, Z., Li, Y., Lyu, J., Gao, D., and Vasconcelos, N. Dense network expansion for class incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11858-11867, 2023.
284
+ Huang, C., Li, M., Cao, F., Fujita, H., Li, Z., and Wu, X. Are graph convolutional networks with random weights feasible? IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(3):2751-2768, 2023.
285
+ Igelnik, B. and Pao, Y.-H. Stochastic choice of basis functions in adaptive function approximation and the functional-link net. IEEE Transactions on Neural Networks, 6(6):1320-1329, 1995.
286
+ Joseph, O., Pleydell-Bouverie, B., Dupret, D., and Csicsvari, J. Play it again: reactivation of waking experience and memory. Trends in Neurosciences, 33(5):220-229, 2010.
287
+ Kang, H., Mina, R. J. L., Madjid, S. R. H., Yoon, J., Hasegawa-Johnson, M., Hwang, S. J., and Yoo, C. D. Forget-free continual learning with winning subnetworks. In International Conference on Machine Learning, pp. 10734-10750. PMLR, 2022.
288
+
289
+ Ke, Z., Liu, B., Ma, N., Xu, H., and Shu, L. Achieving forgetting prevention and knowledge transfer in continual learning. In Advances in Neural Information Processing Systems, volume 34, pp. 22443-22456, 2021.
290
+ Kim, G., Liu, B., and Ke, Z. A multi-head model for continual learning via out-of-distribution replay. In Conference on Lifelong Learning Agents, pp. 548-563. PMLR, 2022.
291
+ Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu, A. A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521-3526, 2017.
292
+ Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. Handbook of Systemic Autoimmune Diseases, 2009.
293
+ Kwok, T.-Y. and Yeung, D.-Y. Objective functions for training new hidden units in constructive neural networks. IEEE Transactions on Neural Networks, 8(5):1131-1148, 1997.
294
+ LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998.
295
+ Leonides, C. Control and Dynamic Systems V18: Advances in Theory and Applications. Elsevier, 2012.
296
+ Li, D. and Zeng, Z. CRNet: A fast continual learning framework with random theory. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(9):10731-10744, 2023.
297
+ Li, D., Wang, T., Chen, J., Kawaguchi, K., Lian, C., and Zeng, Z. Multi-view class incremental learning. Information Fusion, 102:102021, 2024a.
298
+ Li, D., Wang, T., Chen, J., Ren, Q., Kawaguchi, K., and Zeng, Z. Towards continual learning desiderata via hsic-bottleneck orthogonalization and equiangular embedding. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 13464-13473, 2024b.
299
+ Li, M. and Wang, D. Insights into randomized algorithms for neural networks: Practical issues and common pitfalls. Information Sciences, 382:170-178, 2017.
300
+ Lin, H., Zhang, B., Feng, S., Li, X., and Ye, Y. PCR: Proxy-based contrastive replay for online class-incremental continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24246-24255, 2023.
301
+ Liu, Y., Schiele, B., and Sun, Q. Adaptive aggregation networks for class-incremental learning. In Proceedings
302
+
303
+ of the IEEE/CVF conference on Computer Vision and Pattern Recognition, pp. 2544-2553, 2021.
304
+ Lopez-Paz, D. and Ranzato, M. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, volume 30, pp. 6470-6479, 2017.
305
+ Márton, C. D., Zhou, S., and Rajan, K. Linking task structure and neural network dynamics. Nature Neuroscience, 25(6):679-681, 2022.
306
+ Masana, M., Liu, X., Twardowski, B., Menta, M., Bagdanov, A. D., and van de Weijer, J. Class-incremental learning: survey and performance evaluation on image classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(5):5513-5533, 2023.
307
+ McCloskey, M. and Cohen, N. J. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of Learning and Motivation, volume 24, pp. 109-165. Elsevier, 1989.
308
+ McDonnell, M. D., Gong, D., Parvaneh, A., Abbasnejad, E., and van den Hengel, A. RanPAC: Random projections and pre-trained models for continual learning. In Advances in Neural Information Processing Systems, volume 36, 2023.
309
+ Mehta, S. V., Patil, D., Chandar, S., and Strubell, E. An empirical investigation of the role of pre-training in lifelong learning. Journal of Machine Learning Research, 24(214):1-50, 2023.
310
+ Pao, Y.-H. and Takefuji, Y. Functional-link net computing: theory, system architecture, and functionalities. Computer, 25(5):76-79, 1992.
311
+ Qiao, Z., Pham, Q., Cao, Z., Le, H. H., Suganthan, P. N., Jiang, X., and Savitha, R. Class-incremental learning for time series: Benchmark and evaluation. arXiv preprint arXiv:2402.12035, 2024.
312
+ Rajasegaran, J., Hayat, M., Khan, S., Khan, F. S., and Shao, L. Random path selection for incremental learning. In Advances in Neural Information Processing Systems, volume 32, pp. 12669-12679, 2019.
313
+ Ramanujan, V., Wortsman, M., Kembhavi, A., Farhadi, A., and Rastegari, M. What's hidden in a randomly weighted neural network? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11893-11902, 2020.
314
+ Rasch, B. and Born, J. Maintaining memories by reactivation. Current Opinion in Neurobiology, 17(6):698-703, 2007.
315
+
316
+ Rios, A., Ahuja, N., Ndiour, I., Genc, U., Itti, L., and Tickoo, O. incDFM: Incremental deep feature modeling for continual novelty detection. In European Conference on Computer Vision, pp. 588-604. Springer, 2022.
317
+ Schwarz, J., Czarnecki, W., Luketina, J., Grabska-Barwinska, A., Teh, Y. W., Pascanu, R., and Hadsell, R. Progress & compress: A scalable framework for continual learning. In International Conference on Machine Learning, pp. 4528-4537, 2018.
318
+ Serrà, J., Suris, D., Miron, M., and Karatzoglou, A. Overcoming catastrophic forgetting with hard attention to the task. In International Conference on Machine Learning, pp. 4548-4557. PMLR, 2018.
319
+ Shim, D., Mai, Z., Jeong, J., Sanner, S., Kim, H., and Jang, J. Online class-incremental continual learning with adversarial shapley value. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 9630-9638, 2021.
320
+ Smith, J. S., Karlinsky, L., Gutta, V., Cascante-Bonilla, P., Kim, D., Arbelle, A., Panda, R., Feris, R., and Kira, Z. CODA-Prompt: Continual decomposed attention-based prompting for rehearsal-free continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11909-11919, 2023.
321
+ Tang, S., Chen, D., Zhu, J., Yu, S., and Ouyang, W. Layerwise optimization by gradient decomposition for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9634-9643, 2021.
322
+ Tang, Y.-M., Peng, Y.-X., and Zheng, W.-S. When prompt-based incremental learning does not meet strong pretraining. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1706-1716, 2023.
323
+ Tong, S., Dai, X., Wu, Z., Li, M., Yi, B., and Ma, Y. Incremental learning of structured memory via closed-loop transcription. In International Conference on Learning Representations, 2023.
324
+ Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., and Jégou, H. Training data-efficient image transformers & distillation through attention. In International Conference on Machine Learning, pp. 10347-10357. PMLR, 2021.
325
+ Vahedian, F., Li, R., Trivedi, P., Jin, D., and Koutra, D. Convolutional neural network dynamics: A graph perspective. arXiv preprint arXiv:2111.05410, 2021.
326
+ Van de Ven, G. M., Siegelmann, H. T., and Tolias, A. S. Brain-inspired replay for continual learning with artificial neural networks. Nature communications, 11(1):4069, 2020.
327
+
328
+ Van der Maaten, L. and Hinton, G. Visualizing data using t-SNE. Journal of Machine Learning Research, 9(11), 2008.
329
+ Verma, V. K., Liang, K. J., Mehta, N., Rai, P., and Carin, L. Efficient feature transformations for discriminative and generative continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13865-13875, 2021.
330
+ Vyas, S., Golub, M. D., Sussillo, D., and Shenoy, K. V. Computation through neural population dynamics. Annual Review of Neuroscience, 43:249-275, 2020.
331
+ Wang, D. and Li, M. Stochastic configuration networks: Fundamentals and algorithms. IEEE Transactions on Cybernetics, 47(10):3466-3479, 2017.
332
+ Wang, F.-Y., Zhou, D.-W., Ye, H.-J., and Zhan, D.-C. FOSTER: Feature boosting and compression for class incremental learning. In European Conference on Computer Vision, pp. 398-414. Springer, 2022a.
333
+ Wang, F.-Y., Zhou, D.-W., Liu, L., Ye, H.-J., Bian, Y., Zhan, D.-C., and Zhao, P. BEEF: Bi-compatible class incremental learning via energy-based expansion and fusion. In International Conference on Learning Representations, 2023.
334
+ Wang, R., Bao, Y., Zhang, B., Liu, J., Zhu, W., and Guo, G. Anti-retroactive interference for lifelong learning. In European Conference on Computer Vision, pp. 163-178. Springer, 2022b.
335
+ Wang, Z., Zhang, Z., Ebrahimi, S., Sun, R., Zhang, H., Lee, C.-Y., Ren, X., Su, G., Perot, V., Dy, J., et al. DualPrompt: Complementary prompting for rehearsal-free continual learning. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XXVI, pp. 631-648. Springer, 2022c.
336
+ Wang, Z., Zhang, Z., Lee, C.-Y., Zhang, H., Sun, R., Ren, X., Su, G., Perot, V., Dy, J., and Pfister, T. Learning to prompt for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 139-149, 2022d.
337
+ Wei, Y., Ye, J., Huang, Z., Zhang, J., and Shan, H. Online prototype learning for online continual learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 18764-18774, 2023.
338
+ Wołczyk, M., Piczak, K., Wojcik, B., Pustelnik, L., Morawiecki, P., Tabor, J., Trzcinski, T., and Spurek, P. Continual learning with guarantees via weight interval constraints. In International Conference on Machine Learning, pp. 23897-23911. PMLR, 2022.
339
+
340
+ Wu, T.-Y., Swaminathan, G., Li, Z., Ravichandran, A., Vasconcelos, N., Bhotika, R., and Soatto, S. Class incremental learning with strong pre-trained models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9601-9610, 2022.
341
+ Wu, Y., Chen, Y., Wang, L., Ye, Y., Liu, Z., Guo, Y., and Fu, Y. Large scale incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 374-382, 2019.
342
+ Xiao, H., Rasul, K., and Vollgraf, R. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
343
+ Yan, S., Xie, J., and He, X. DER: Dynamically expandable representation for class incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3014-3023, 2021.
344
+ Yang, B., Lin, M., Zhang, Y., Liu, B., Liang, X., Ji, R., and Ye, Q. Dynamic support network for few-shot class incremental learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(3):2945-2951, 2023.
345
+ Zeng, G., Chen, Y., Cui, B., and Yu, S. Continual learning of context-dependent processing in neural networks. Nature Machine Intelligence, 1(8):364-372, 2019.
346
+ Zenke, F., Poole, B., and Ganguli, S. Continual learning through synaptic intelligence. In International Conference on Machine Learning, pp. 3987-3995, 2017.
347
+ Zhang, C., Bengio, S., and Singer, Y. Are all layers created equal? Journal of Machine Learning Research, 23:1-28, 2022.
348
+ Zhang, G., Wang, L., Kang, G., Chen, L., and Wei, Y. SLAC: Slow learner with classifier alignment for continual learning on a pre-trained model. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 19148-19158, 2023.
349
+ Zhang, L. and Suganthan, P. N. Visual tracking with convolutional random vector functional link network. IEEE Transactions on Cybernetics, 47(10):3243-3253, 2016.
350
+ Zhou, D.-W., Wang, Q.-W., Ye, H.-J., and Zhan, D.-C. A model or 603 exemplars: Towards memory-efficient class-incremental learning. In International Conference on Learning Representations, 2023.
351
+ Zhuang, H., Weng, Z., Wei, H., Xie, R., Toh, K.-A., and Lin, Z. ACIL: Analytic class-incremental learning with absolute memorization and privacy protection. In Advances in Neural Information Processing Systems, volume 35, pp. 11602-11614, 2022.
352
+
353
+ # A. Proof of Theorem 4.2
354
+
355
+ Proof. First, we deduce the intermediate values w.r.t. output weights $\beta_{l}(t)$ , the counterpart of Eq. (3) in Proposition 4.1.
356
+
357
+ $$
358
+ \begin{array}{l} \mathcal {L} = \left\| f - f _ {L} \right\| ^ {2} \\ = \| f - f _ {L - l} - \left(g _ {L - l + 1} \beta_ {L - l + 1} (t) + \dots + g _ {L} \beta_ {L} (t)\right) \| ^ {2} \\ = \left\| e _ {L - l} (t) - \left[ g _ {L - l + 1}, \dots , g _ {L} \right] \left[ \beta_ {L - l + 1} (t), \dots , \beta_ {L} (t) \right] ^ {\mathrm {T}} \right\| ^ {2} \\ = \left\| e _ {L - l} (t) - G _ {l} \beta_ {l} (t) \right\| ^ {2} \\ = \sum_ {c = 1} ^ {C _ {t}} \left\langle e _ {L - l, c} (t) - G _ {l} \beta_ {l, c} (t), e _ {L - l, c} (t) - G _ {l} \beta_ {l, c} (t) \right\rangle \tag {13} \\ = \sum_ {c = 1} ^ {C _ {t}} \left(\langle e _ {L - l, c} (t), e _ {L - l, c} (t) \rangle - 2 \langle e _ {L - l, c} (t), G _ {l} \beta_ {l, c} (t) \rangle + \langle G _ {l} \beta_ {l, c} (t), G _ {l} \beta_ {l, c} (t) \rangle\right) \\ = \| e _ {L - l} (t) \| ^ {2} - \sum_ {c = 1} ^ {C _ {t}} 2 \langle e _ {L - l, c} (t), G _ {l} \beta_ {l, c} (t) \rangle + \sum_ {c = 1} ^ {C _ {t}} \langle G _ {l} \beta_ {l, c} (t), G _ {l} \beta_ {l, c} (t) \rangle \\ \end{array}
359
+ $$
360
+
361
+ where $G_{l} = [g_{L - l + 1},\dots ,g_{L}],\beta_{l}(t) = [\beta_{L - l + 1}(t),\dots ,\beta_{L}(t)]^{\mathrm{T}}$ and $e_{L - l}(t) = f_L - f_{L - l}$
362
+
363
+ Take the derivative of Eq. (13) w.r.t. $\beta_{l,c}(t)$ , we have
364
+
365
+ $$
366
+ \frac {\partial \mathcal {L}}{\partial \beta_ {l , c} (t)} = - 2 G _ {l} ^ {\mathrm {T}} e _ {L - l, c} (t) + 2 G _ {l} ^ {\mathrm {T}} G _ {l} \beta_ {l, c} (t) \tag {14}
367
+ $$
368
+
369
+ By setting Eq. (14) to zero, we have
370
+
371
+ $$
372
+ \beta_ {l, c} (t) = \left(G _ {l} ^ {\mathrm {T}} G _ {l}\right) ^ {\dagger} G _ {l} ^ {\mathrm {T}} e _ {L - l, c} (t) \tag {15}
373
+ $$
374
+
375
+ Then, denote by $\beta_{l}(t) = [\beta_{l,1},\dots,\beta_{l,C_{t}}]$ and $e_L(t) = e_{L - l}^\star (t) - G_l\beta_l(t)$ the intermediate values. Given optimal results $[\beta_1^{\star}(t),\ldots ,\beta_L^{\star}(t)]$ by Eq. (6), let $e_L^\star (t) = f - \sum_{j = 1}^L\beta_j^\star (t)g_j(e_0^\star (t) = f)$ . For the progression $\| e_L^\star (t)\|^2$ , we have
376
+
377
+ $$
378
+ \begin{array}{l} \left\| e _ {L} ^ {\star} (t) \right\| ^ {2} \leq \left\| e _ {L} (t) \right\| ^ {2} \\ = \left\langle e _ {L - l} ^ {\star} (t) - G _ {l} \beta_ {l} (t), e _ {L - l} ^ {\star} (t) - G _ {l} \beta_ {l} (t) \right\rangle \tag {16} \\ \leq \left\| e _ {L - l} ^ {\star} (t) \right\| ^ {2} - \left\| G _ {l} \beta_ {l} (t) \right\| ^ {2} \\ \leq \left\| e _ {L - l} ^ {*} (t) \right\| ^ {2} \\ \end{array}
379
+ $$
380
+
381
+ We note that the progression $\| e_L^* (t)\|^2$ is monotonically decreasing. Using Eqs. (4-5), we can further obtain
382
+
383
+ $$
384
+ \begin{array}{l} \left\| e _ {L} ^ {\star} (t) \right\| ^ {2} - (r (t) + \mu_ {L} (t)) \left\| e _ {L - l} ^ {\star} (t) \right\| ^ {2} \\ \leq \left\| e _ {L} (t) \right\| ^ {2} - \left(r (t) + \mu_ {L} (t)\right) \left\| e _ {L - l} ^ {\star} (t) \right\| ^ {2} \\ = \sum_ {c = 1} ^ {C _ {t}} \langle e _ {L - l, c} ^ {\star} (t) - G _ {l} \beta_ {l, c} (t), e _ {L - l, c} ^ {\star} (t) - G _ {l} \beta_ {l, c} (t) \rangle - \sum_ {c = 1} ^ {C _ {t}} (r (t) + \mu_ {L} (t)) \langle e _ {L - l, c} ^ {\star} (t), e _ {L - l, c} ^ {\star} (t) \rangle \\ = \sum_ {c = 1} ^ {C _ {t}} \left((1 - r (t) - \mu_ {L} (t)) \langle e _ {L - l, c} ^ {\star} (t), e _ {L - l, c} ^ {\star} (t) \rangle - \sum_ {c = 1} ^ {C _ {t}} 2 \langle e _ {L - l, c} ^ {\star} (t), G _ {l} \beta_ {l, c} (t) \rangle + \sum_ {c = 1} ^ {C _ {t}} \langle G _ {l} \beta_ {l, c} (t), G _ {l} \beta_ {l, c} (t) \rangle \right. \tag {17} \\ = \sum_ {c = 1} ^ {C _ {t}} \delta_ {L, c} ^ {\star} (t) \| e _ {L - l} ^ {\star} (t) \| ^ {2} - e _ {L - l, c} ^ {\star \mathrm {T}} (t) G _ {l} (G _ {l} ^ {\mathrm {T}} G _ {l}) ^ {\dagger} G _ {l} ^ {\mathrm {T}} e _ {L - l, c} ^ {\star} (t) \\ \leq \sum_ {c = 1} ^ {C _ {t}} \delta_ {L, c} ^ {\star} (t) - \langle e _ {L - l, c} ^ {\star} (t), G _ {l} \beta_ {l, c} (t) \rangle \\ \leq 0 \\ \end{array}
385
+ $$
386
+
387
+ Therefore, we have $\| e_L^\star (t)\|^2\leq (r(t) + \mu_L(t))\| e_{L - l}^\star (t)\|^2$ . Note that $0 < r(t) < 1$ and $\lim_{L\to +\infty}\mu_L(t) = 0$ , i.e., $\lim_{L\to +\infty}\| e_L^\star (t)\| = 0$ . This completes the proof.
388
+
389
+ # B. Algorithm description for AutoActivator
390
+
391
+ To better illustrate our method, the whole procedure of training and testing is provided in Algorithm 1. We now show the expansion process from the perspective of matrix/vector multiplication. Note that nodes added to each scalable neural unit are in a fully-connected manner but different neural units on a certain layer are not fully connected to the next layer (see Figure 1), for example, their weights are stored in a list specific to a certain layer. This is significantly different from a fully-connected (FC) layer or multi-layer perceptron (MLP) in that our classifier layer is additionally parameterized by the activation threshold for expansion-based decision-making, i.e., reactivating the required neural units in different lists.
392
+
393
+ Algorithm 1 ActoActivator Training and Test Algorithm
394
+ Input: Datasets $\{D_t\}_{t=1}^T$ ; Termination criteria of expanding hidden unit $t$ : the maximum number of nodes $L_{max}(t)$ and expected accuracy $R(t)$
395
+ 1: # During Sequential Training
396
+ 2: for $t = 1,2,\ldots,T$ do
397
+ 3: while None of the termination criteria is satisfied do
398
+ 4: Recruit randomly generated nodes based on supervisory mechanisms by Eq. (7)
399
+ 5: Update output weights by Eq. (8)
400
+ 6: end while
401
+ 7: Compute activation thresholds by Eq. (11)
402
+ 8: end for
403
+ 9: # At Inference Time
404
+ 10: Given batches of test instances from a certain task
405
+ 11: Reactivate the required hidden units by Eq. (12)
406
+ Output: Task identity $t$ and the predicted classes $c$
407
+
408
+ In our algorithm, we compactly expand the network on multiple layers. Among them, the former layers are built under the guidance of supervisory mechanism (Section 4.1) while the final classifier layer is step-wise updated by close-formed solutions (Section 4.2). Importantly, when it comes to our expansion process, the final classifier layer together with at least one (or multiple) former layer(s) is required. This is because the mentioned two different types of layers work together to complete the inference/forward pass in our algorithm.
409
+
410
+ Without the loss of generality, we take a two-layer AutoActivator on the split MNIST (five 2-classification tasks) as an example. For the first task whose input has 784 dimensions, we start with modeling the neural unit from scratch with step size $l$ nodes (e.g., $l = 10$ ) that are randomly generated but recruited for expansion under the guidance of supervisory mechanism. When it meets the termination criteria, it yields input weight matrix $W_{in} \in R^{784 \times L_1}$ (e.g., $L_1 = 200$ ) from the former layer and output weight matrix $W_{out} \in R^{L_1 \times 2}$ from the classifier layer. These two matrices are respectively saved in two lists corresponding to two different types of layers, which are also bound to an activation threshold (denoted by threshold(1)). For the second task whose input has 784 dimensions, similarly, we start with expanding the former layer by progressively recruiting additional $l$ nodes (e.g., $l = 10$ ). When it meets the termination criteria, it yields the newly added input weight matrix $W_{in}' \in R^{784 \times L_2}$ (e.g., $L_2 = 150$ ) for the former layer and output weight matrix $W_{out}' \in R^{L_2 \times 2}$ for the classifier layer. These two matrices are bound to an activation threshold (denoted by threshold(2)). The final weight of the former layer is kept in a list $[W_{in}, W_{in}']$ without row/column-wise concatenation, and the same goes for the final weight of the classifier layer that is kept in a list $[W_{out}, W_{out}']$ . In this case, the final dimension of the weight in that former layer is composed of separate $784 \times L_1$ and $784 \times L_2$ , instead of $(784 + 784) \times (L_1 + L_2)$ ; the final dimension of the weight in that classifier layer is composed of separate $L_1 \times 2$ and $L_2 \times 2$ , instead of $(L_1 + L_2) \times (2 + 2)$ . Given the input feature vector from either of trained tasks has $m = 784$ dimensions, only the input-output weight matrix pair that achieves its activation threshold serves for making the decision. Thus the size of output vector is 2 dimensional with remaining deactivated. Note that since the size of $L_1$ and $L_2$ is adaptively decided by the complexity/difficulty of a given task, which are usually different, the input feature vector (of size $m$ ) should be the original input from that task, e.g., $m = 784$ in the task sequence. This learning paradigm is dramatically different from a multi-head classifier. Our theoretical contribution guarantees the model's convergence property on learning sequential mappings. The above also works for multi-layer AutoActivator. Additionally, AutoActivator can be extended to convolution modules or injected into some advanced backbones such as ResNet or ViT, which accommodates the real-world scenario where pre-training is usually involved as an initial step.
411
+
412
+ # C. Additional implementation details
413
+
414
+ # C.1. Data splits and architectures
415
+
416
+ We run experiments on extensive datasets adapted for CIL under different widely used backbones, which are implemented in PyTorch with NVIDIA RTX 3080-Ti GPUs. For fair comparisons, (i) all methods select the same or similar-sized neural network architectures; (ii) following the settings in (Ke et al., 2021; Hu et al., 2021; Rios et al., 2022; Zeng et al., 2019; Wu et al., 2022), all methods allow to start from the same pre-training unless otherwise specified; and (iii) the data for pre-training can not include in that of CIL, e.g., we manually remove the overlapping classes. The resulting data splits and architectures used in our experiments are shown in Table 7.
417
+
418
+ Table 7. Details of the data splits and the selected architectures for pre-training and CIL. These are what we exactly used in our experiments of the main text unless otherwise specified.
419
+
420
+ <table><tr><td rowspan="2">DATASET</td><td rowspan="2">ARCHIRETURE</td><td colspan="2">DATA SPLIT</td></tr><tr><td>PRE-TRAINING</td><td>CIL</td></tr><tr><td>MNIST FASHIONMNIST</td><td>MLP</td><td>X</td><td>MNIST-10/5 FASHIONMNIST-10/5</td></tr><tr><td>CIFAR-100</td><td>RESNET-18</td><td>TINY-IMAGENET</td><td>CIFAR-100/10, CIFAR-100/25</td></tr><tr><td>IMAGENET-R</td><td>ViT-B/16</td><td>IMAGENET</td><td>IMAGENET-R-200/10</td></tr></table>
421
+
422
+ # C.2. Hyper-parameter
423
+
424
+ We carefully reproduce the selected baselines and use the hyper-parameter settings by referring to their original source code. When conducting experiments with different datasets, we keep about $10\%$ of the training data from each task for validation. With regard to baselines, we use the SGD optimizer with an initial learning rate (0.001 for MNIST, FashionMNIST; 0.01 for the remaining) and do much tuning. For the rehearsal-based approaches, we keep a random exemplar set of 2k per task sequence or $\sim 200$ per class by following the similar setting in (Rajasegaran et al., 2019; Hsu et al., 2018). For regularization-based approaches, the penalty coefficient is from set $\{100, 1000, 10000, 100000\}$ . For architecture-based approaches, we pay attention to their model size after learning all tasks. In our method, the maximum number of nodes $L_{max}(t)$ and expected accuracy $R(t)$ of neural unit $t$ for task $t$ are problem-dependent and not fixed. Instead, we perform the early termination criteria at the level of node expansion instead of epochs (Serrà et al., 2018) or phases (Gurbuz & Dovrolis, 2022), by tracking the lowest value of the residual error achieved so far on the validation set. This way is flexible in determining the most appropriate hyper-parameter settings without over-fitting, e.g., for MNIST-10/5 and FashionMNIST-10/5, we use $L_{max}(t) = 200$ and $R(t) = 99\%$ ; for CIFAR-100, we use $L_{max}(t) = 1000$ and $R(t) = 90\%$ (CIFAR-100/10), and $L_{max}(t) = 500$ and $R(t) = 80\%$ (CIFAR-100/25). Similarly, we empirically set the step size $l = 10$ for node expansion each time and the maximum times of random generation $T_{max} = 50$ (see Table 4 for more details); $r(t) = 0.9$ and $\mu_L(t) = \frac{1 - r(t)}{L + 1}$ based on Theorem 4.2.
425
+
426
+ To ensure a fair comparison, when in the absence of pre-training, every comparison method uses a similar-sized neural network architecture that is fully trainable; when in the presence of pre-training, every comparison method starts from the same pre-trained backbone as a base session. Then, following the settings in (Hu et al., 2021; Zeng et al., 2019; Hayes et al., 2020; Ke et al., 2021; Wang et al., 2022c), we keep the pre-trained model untouched for methods such as PCL and ours or still make it fully trainable for methods that could not learn well with a frozen backbone, as evaluated in (Wang et al., 2022c). That is, all methods allow to start with the same pre-training or learning from scratch and only the winning results are reported.
427
+
428
+ # C.3. Metrics
429
+
430
+ We evaluate all considered baselines based on the following metrics (higher is better): Average Classification Accuracy (ACA), i.e., $\mathbf{ACAT}^T$ , measures the test performance of the final model at hand on all $T$ tasks seen so far:
431
+
432
+ $$
433
+ \mathrm {A C A} = \frac {1}{T} \sum_ {t = 1} ^ {T} R _ {T, t} \tag {18}
434
+ $$
435
+
436
+ where $R_{T,t}$ is the test accuracy for task $t$ after training on task $T$ ; Average Incremental Accuracy (AIA) involves the intermediate results as each step/session proceeds, say
437
+
438
+ $$
439
+ \mathrm {A I A} = \frac {1}{T} \sum_ {t = 1} ^ {T} A C A ^ {t} \tag {19}
440
+ $$
441
+
442
+ Among them, it is typically $ACA^1 > ACA^2 > \dots > ACA^t > \dots > ACA^T$ . Therefore, ACA is more challenging than AIA, and our experiments focus more on the former while using the latter for a direct comparison with certain of competitors. Backward Transfer (BWT) (Lopez-Paz & Ranzato, 2017) indicates a model's ability in knowledge retention, averaged over all tasks:
443
+
444
+ $$
445
+ \mathrm {B W T} = \frac {1}{T - 1} \sum_ {t = 1} ^ {T - 1} R _ {T, t} - R _ {t, t} \tag {20}
446
+ $$
447
+
448
+ Negative BWT values mean that learning new tasks causes forgetting past tasks while a model with BWT = 0 can be considered forgetting-free (Kang et al., 2022).
449
+
450
+ As an additional metric (fewer is better), we report the Memory Budget by aligning the memory cost of network parameters and old samples, i.e., switching them to a 32-bit floating number. In this way, both the final model size (#model, MB) and exemplar buffers (#exemplar, MB) are counted into the memory budget (MB), calculated with an approximate summation of them. For example, the budget for saving a simple 2-layer MLP (with [784-400-400-10] neurons) converts to 478 410 floats $\times$ 4 bytes/float $\div$ (1 $024\times 1$ 024) bytes $\approx$ 1.82 MB; the budget for saving 2k samples (with $28\times 28$ gray-scaled pixels) converts to 1 568 000 floats $\times$ 4 bytes/float $\div$ (1 $024\times 1$ 024) bytes $\approx$ 5.98 MB, as reported in Table 1.
451
+
452
+ # D. Additional Comparison Results
453
+
454
+ # D.1. Experiments on Unevenly Split Task Sequence
455
+
456
+ Unlike the intra-sequence balanced CIL where a dataset with $C$ classes evenly divided into $T$ tasks, e.g., MNIST-10/5 and CIFAR-100/10, we now preliminarily investigate the intra-sequence imbalanced CIL where a dataset with $C$ classes are unevenly split into $C_t$ classes—CIFAR- $\{100(C_t) | C_t \neq C_{t+1}\}$ . This yields CIFAR- $\{100(10), 100(20), 100(30), \ldots\}$ and CIFAR- $\{100(2), 100(4), \ldots\}$ , in which the value in parentheses indicates the number of classes for the current task. Figure 3 evaluates different algorithms under such a more realistic CIL where tasks are not evenly split. Compared with Table 2, almost all the methods experience performance degradation since the intra-sequence imbalanced case has something to do with the choice of architecture or expansion. This is reflected in the different numbers of both classes and samples within each task. In the resulting 4-task and 10-task sequences, our method gets the best ACA and shows absolute superiority in BWT values. These results demonstrate that the proposed method introduces a supervisory mechanism to guide network expansion, whose growth size fully considers the intrinsic complexity of each task sequentially presented.
457
+
458
+ ![](images/e9074e4318bc4f64bb1cba22505b29acc54b40b88eae6d05470fbfae7288d2dd.jpg)
459
+ Figure 3. Performance comparison on the intra-sequence imbalanced case. Left: CIFAR-\{100(10), 100(20), 100(30), 100(40)\}; Right: CIFAR-\{100(2), 100(4), 100(6), \ldots\}.
460
+
461
+ # D.2. Experiments on the Scalability for CIL
462
+
463
+ To show the scalability of our method, we further display the changes of model sizes during sequential training. All methods are built upon the same backbone architecture ResNet-18 ( $\sim 44.6\mathrm{MB}$ ). Note that RPS-Net and MORE need extra
464
+
465
+ exemplar buffers. We report the actually involved model size (i.e., paths) for RPS-Net. It can be observed from Figure 4 that the proposed method outperforms the competitors. That is, after incrementally learning 10 tasks, it remains the model size relatively unchanged, without relying on exemplar buffers. We believe this is promising for practical CIL under resource-limited and privacy-sensitive scenarios.
466
+
467
+ ![](images/2fe5e6377ea03a9a90ee3c0cf48b105b4733319b7c0b7eedf99d5caeb1d69bf5.jpg)
468
+ Figure 4. Growth of the network as the number of tasks increases for CIFAR-100/10.
469
+
470
+ # D.3. Experiments on the Training Time and Computational Costs
471
+
472
+ As the proposed method uses a supervisory mechanism-based node recruitment step followed by a weight update step (where matrix inversion is needed), it is natural to think of the training time cost, e.g., comparing it with simpler rehearsal-based methods. Since different methods have very different requirements in computational burden, Table 8 records their per-epoch running time, demonstrating our superiority in developing a fast and easy-implementation CIL model under selected parameters $(l = 10, T_{max} = 50)$ . As our work uses a dynamic network architecture, we also provide the computational costs measured by floating point operations per second (FLOPS). The calculation of FLOPs is affected by the size of the network and input. For a fair comparison, we follow the exact settings in AANet (Liu et al., 2021), with ResNet-32 for $32 \times 32$ CIFAR-100 and ResNet-18 for $224 \times 224$ ImageNet-Subset. The results yielded from ours and AANets are 70.12 M (1.82 G) and 140.00 M (3.64 G) on CIFAR-100 (ImageNet-Subset), respectively. This demonstrates the effectiveness and efficiency of our method in constructing dynamic network architecture for CIL.
473
+
474
+ Table 8. Comparison results with rehearsal-based methods on running time per epoch.
475
+
476
+ <table><tr><td>METHOD</td><td>GEM</td><td>LOGD</td><td>RPS-NET</td><td>IL2M</td><td>FS-DGPM</td><td>OURS</td></tr><tr><td>TIME (s)</td><td>48</td><td>333</td><td>56</td><td>50</td><td>63</td><td>12</td></tr></table>
477
+
478
+ # D.4. Experiments on Single CIL and Online CIL
479
+
480
+ In addition to the standard CIL scenario, here we consider another two variants. One is single-class incremental learning that learns one class at a time. This is the most common case in practice because once a new class is encountered, we want to learn it immediately rather than wait for a few new classes to occur and learn them together. Following the setting in PCL (Hu et al., 2021), Table 9 reports the comparison results for the Single CIL. In this scenario, the results except ours are drawn from that of PCL. It's worth mentioning that PCL, namely per-class continual learning, particularly excels at class-incremental learning one-by-one. For the CIFAR-100/100 (100 tasks), PCL yields $63.61\%$ and the proposed method is superior to it by $1.87\%$ .
481
+
482
+ Another is Online CIL, in which a model learns new classes continually and data can only be observed once. In this scenario, the results except ours are taken from their original papers and the four competitors need the exemplar buffer. It is observed from Table 9 that our method outperforms ASER (Shim et al., 2021), PRC (Lin et al., 2023), OnPro (Wei et al., 2023), GSA (Guo et al., 2023) on CIFAR-100/10 with fewer memory (buffer) usage. This demonstrates the effectiveness of the proposed method in the Online CIL scenario.
483
+
484
+ # D.5. Comparison Results When Using More Additional Parameters
485
+
486
+ In the main text, Table 3 adopts a ViT-B/16 transformer model pre-trained on ImageNet-21K and then incrementally learns tasks from the well-established 200-class Split Imagenet-R. In this setting, our method outperforms the selected baselines by
487
+
488
+ Table 9. Comparison results on the CIFAR-100/100 for Single CIL and CIFAR-100/10 for Online CIL.
489
+
490
+ <table><tr><td colspan="2">SINGLE CIL</td><td colspan="2">ONLINE CIL</td></tr><tr><td>METHOD</td><td>ACA(%) ↑</td><td>METHOD</td><td>ACA(%) ↑</td></tr><tr><td>EWC</td><td>2.93</td><td>ASER</td><td>14.0</td></tr><tr><td>RPS-NET</td><td>4.13</td><td>PCR</td><td>25.6</td></tr><tr><td>OWM</td><td>63.26</td><td>ONPRO</td><td>30.4</td></tr><tr><td>PCL</td><td>63.61</td><td>GSA</td><td>31.4</td></tr><tr><td>OURS</td><td>65.48</td><td>OURS</td><td>32.5</td></tr></table>
491
+
492
+ Table 10. Comparison results when more additional parameters are built upon a pre-trained model.
493
+
494
+ <table><tr><td>METHOD</td><td>ACA(%) ↑</td><td>ADDITIONAL NO. PARAMS (×106) ↓</td></tr><tr><td>SLAC</td><td>77.00</td><td>~123.7</td></tr><tr><td>RANPAC</td><td>77.90</td><td>~12.5</td></tr><tr><td>OURS*</td><td>76.32</td><td>~3.90</td></tr><tr><td>OURS**</td><td>78.91</td><td>~127.5</td></tr><tr><td>UPPER BOUND</td><td>79.13</td><td>-</td></tr></table>
495
+
496
+ only incurring $0.6 \times 10^{6}$ additional number of parameters (Additional No. Params) except for the pre-trained ViT. Now we further compare our method with competitors using more Additional No. Params. When more additional parameters are built upon a pre-trained model, strong baselines like SLCA (Zhang et al., 2023) and RanPAC (McDonnell et al., 2023) show better performance than that of all methods in Table 3. In Table 10, when our method enlarges its model size (Additional No. Params is about $3.9 \times 10^{6}$ ), denoted by Ours*, its ACA is very approaching SLCA and RanPAC. Since our method belongs to the theoretical and embryonic approach, highlighting a fair comparison by considering both accuracy and memory usage, the result is still promising. Furthermore, as SLAC can be naturally plug-and-play with other CIL approaches, we make this combination with Ours*, denoted by Ours**. We can achieve extra performance improvement, and the results surpass SLCA and RanPAC by $1.91\%$ and $1.01\%$ , surprisingly getting closer to the upper bound.
497
+
498
+ # D.6. Further Comparison on ImageNet-100 and ImageNet-1K Using the Metric AIA
499
+
500
+ Before concluding our empirical evaluation, Table 11 provides a comparison between the proposed method and some top-performing methods on ImageNet-100 and ImageNet-1K, measured by AIA. We first test our methods on ImageNet-100. Following the benchmark protocol used in PODNet (Douillard et al., 2020), AANets (Liu et al., 2021), DER(Yan et al., 2021), FOSTER (Wang et al., 2022a), and ACIL (Zhuang et al., 2022), we start from a model trained on 50 base classes (B50), and the remaining 50 classes are divided into splits of 10 steps. Note that we directly take the reported results on ImageNet-100 B50 from their original papers to report the best performance. It can be observed that our method is superior to the strongest baseline by $0.52\%$ . Similarly, we test our methods on ImageNet-1K. For our method, we build it upon the available backbone provided by ACIL where a ResNet-18 was well-trained based on half of the ImageNet-1K datasets. This ImageNet-1K B500 setting is also used in PODNet, AANets, and ACIL but not in DER and FOSTER. For this, we mark DER and FOSTER with B0, i.e., training on ImageNet-1K from scratch. Although training from scratch seems more attractive, they rely on storing 20 000 old task exemplars that our method does not. It can be observed that our method outperforms the strongest baseline by $0.82\%$ .
501
+
502
+ Table 11. Comparison results using the metric AIA(%).* denotes additional exemplar buffer is required during CIL.
503
+
504
+ <table><tr><td>METHOD</td><td>IMAGENET-100</td><td>IMAGENET-1K</td></tr><tr><td>PODNET*</td><td>74.33</td><td>64.13</td></tr><tr><td>AANETS*</td><td>75.58</td><td>64.85</td></tr><tr><td>DER*</td><td>77.73</td><td>66.73 (B0)</td></tr><tr><td>FOSTER*</td><td>77.54</td><td>68.34 (B0)</td></tr><tr><td>ACIL</td><td>74.76</td><td>64.84</td></tr><tr><td>OURS</td><td>78.25</td><td>69.16</td></tr></table>
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a97bbeb0247ff303f3f28089011d7cd23349838d3e4fe76e213e0742aa7763a
3
+ size 751122
2024/Harnessing Neural Unit Dynamics for Effective and Scalable Class-Incremental Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/34fb1b3c-5359-4cd3-91d9-310d9ace9b91_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22f1ea432f0f29481e0d9c71fce9a8af1e50a86bf213fdb8c0e0f6f44cdb855d
3
+ size 3715068
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a72a1bf79203ac49ea005fca2b4df147afb298d3ad8a9be621b66e04fceff5c
3
+ size 2606284
2024/Harnessing the Power of Neural Operators with Automatically Encoded Conservation Laws/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/9dcc0d04-eaff-4327-ab68-e535b8c82f8a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf98239c12146ddd973c0753cc0b0534c1479dd1c08a1c558536512ded53cba1
3
+ size 10501928
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/full.md ADDED
@@ -0,0 +1,692 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HelmFluid: Learning Helmholtz Dynamics for Interpretable Fluid Prediction
2
+
3
+ Lanxiang Xing*1 Haixu Wu*1 Yuezhou Ma1 Jianmin Wang1 Mingsheng Long1
4
+
5
+ # Abstract
6
+
7
+ Fluid prediction is a long-standing challenge due to the intrinsic high-dimensional non-linear dynamics. Previous methods usually utilize the nonlinear modeling capability of deep models to directly estimate velocity fields for future prediction. However, skipping over inherent physical properties but directly learning superficial velocity fields will overwhelm the model from generating precise or physics-reliable results. In this paper, we propose the Helmholtz theorem toward an accurate and interpretable predictor for fluid. Inspired by the Helmholtz theorem, we design a Helmhysics block to learn Helmholtz dynamics, which decomposes fluid dynamics into more solvable curl-free and divergence-free parts, physically corresponding to potential and stream functions of fluid. By embedding the Helmhysics block into a Multi-scale Multihead Integral Architecture, HelmFluid can integrate learned Helmholtz dynamics along temporal dimension in multiple spatial scales to yield future fluid. Compared with previous velocity estimating methods, HelmFluid is faithfully derived from Helmholtz theorem and ravels out complex fluid dynamics with physically interpretable evidence. Experimentally, HelmFluid achieves consistent state-of-the-art in both numerical simulated and real-world observed benchmarks, even for scenarios with complex boundaries. Code is available at https://github.com/thuml/HelmFluid.
8
+
9
+ # 1. Introduction
10
+
11
+ Fluid is one of the basic substances in the physical world. Its prediction is of immense importance in extensive real-world applications, such as atmospheric prediction for weather forecasting and airflow modeling for airfoil design, which has attracted significant attention from both science and
12
+
13
+ *Equal contribution ${}^{1}$ School of Software,BNRist, Tsinghua University. Lanxiang Xing <xlx22@mails.tsinghua.edu.cn>. Correspondence to: Mingsheng Long <mingsheng@tsinghua.edu.cn>.
14
+
15
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
16
+
17
+ engineering areas. However, it is quite challenging to capture and predict the intricate high-dimensional non-linear dynamics within the fluid due to imperfect observations, coupled multiscale interactions, etc. In this paper, we focus on a more practical scenario that predicts future states of fluid from partially observed physical quantities.
18
+
19
+ Recently, deep models have achieved impressive progress in solving complex physical systems (Karniadakis et al., 2021; Wang et al., 2023). One paradigm is learning neural operators to directly predict the future fluid field based on past observations (Lu et al., 2021a; Li et al., 2021; Wu et al., 2023). These methods focus on leveraging the non-linear modeling capacity of deep models to approximate complex mappings between past and future fluids. However, directly learning neural operators may fail to generate interpretable evidence for prediction results and incur uncontrolled errors. Another mainstreaming paradigm attempts to estimate the dynamic fields of fluid with deep models for future prediction. It is notable that the superficial dynamics are actually driven by underlying physical rules. Directly estimating the velocity fields regarding less physical properties may overwhelm the model from generating precise and plausible prediction results (Sun et al., 2018; Zhang et al., 2022). As shown in Figure 1, it is hard to directly capture the complex dynamics of fluid, where the learned dynamics will be too tanglesome to guide the fluid prediction.
20
+
21
+ To tackle the above challenges, we attempt to capture the intricate dynamics with physical insights for accurate and interpretable fluid prediction. In this paper, we dive into the physical properties of fluid and propose the Helmholtz dynamics as a new paradigm to represent fluid dynamics. Concretely, Helmholtz dynamics is inspired by the Helmholtz theorem (Bladel, 1959) and attributes the intricate dynamics to the potential and stream functions of fluid, which are intrinsic physical quantities of fluid and can directly derive the curl-free and divergence-free parts of fluid respectively. Compared with superficial velocity fields, our proposed Helmholtz dynamics decompose the intricate dynamics into more solvable components, thereby easing the dynamics learning process of deep models. Besides, this new dynamics requires the model to learn the inherent properties of fluid explicitly, which also empowers the prediction with endogenetic physical interpretability.
22
+
23
+ ![](images/2ab8197544ae110679cc2a1819f5691a0ee7062d39e12fbfbf1053996cae3f2f.jpg)
24
+ Figure 1. Comparison on dynamics and fluid modeling. Different from the numerical method (Ruzanski et al., 2011) and optical-flow-based deep model (Sun et al., 2018), HelmFluid infers the dynamics from the inherent physics quantities: potential and stream functions.
25
+
26
+ Based on the above ideas, we present the Helmholtz model with novel Helmhodynamics blocks to capture the Helmholtz dynamics for interpretable fluid prediction. Helmhynamics is faithfully implemented from the Helmholtz decomposition, which can separately estimate the potential and stream functions of fluid from learned spatiotemporal correlations and further derive curl-free and divergence-free velocities. As a flexible module, HelmhDynamics can conveniently encode boundary conditions into the correlation calculation process and adapt to complex boundary settings in multifarious real-world applications. Further, we design the Multi-scale Multihead Integral Architecture in HelmhFluid to fit the multiscale nature of fluid, which can integrate Helmholtz dynamics learned by HelmhDynamics blocks along temporal dimension in multiple spatial scales to predict the future fluid. Experimentally, HelmhFluid achieves consistent state-of-the-art in various scenarios, covering both synthetic and real-world benchmarks with complex boundary settings. Our contributions are summarized in the following:
27
+
28
+ - Inspired by the Helmholtz theorem, we propose the Helmholtz dynamics to attribute intricate dynamics into inherent properties of fluid, which decomposes intricate dynamics into more solvable parts and empowers the prediction process with physical interpretability.
29
+ - We propose HelmFluid with the HelmDynamics block to capture Helmholtz dynamics. By integrating learned dynamics along temporal dimension with the Multi-scale Multihead Integral Architecture, HelmFluid can predict future fluid with physically plausible evidence.
30
+ - HelmFluid achieves consistent state-of-the-art in extensive benchmarks, covering both synthetic and real-world datasets, as well as various boundary conditions.
31
+
32
+ # 2. Related Work
33
+
34
+ As a foundation problem in science and engineering areas, fluid prediction has been widely explored. Traditional methods can solve Navier-Stokes equations with numerical algorithms, while they may fail in the real-world fluid due to imperfect observations of initial conditions and inaccurate estimation of equation parameters. Besides, these numerical
35
+
36
+ methods also suffer from huge computation cost. Recently, owing to the great non-linear modeling capacity, data-driven deep models for fluid prediction have attached substantial interests, which can be roughly categorized into the following paradigms according to whether learning velocity fields explicitly or not.
37
+
38
+ Neural fluid simulator This paradigm of works attempts to directly generate future fluid with deep models. One direction is formulating partial differential equations (PDEs) along with initial and boundary conditions as loss function terms, and parameterizing the solution as a deep model (Evans, 2010; Raissi et al., 2019; 2020; Lu et al., 2021b). These approaches rely highly on exact physics equations, thereby suffering from imperfect observations and inherent randomness in real-world applications. Another branch of methods does not require the exact formulation of governing PDEs. They attempt to learn neural operators to approximate complex input-output mappings in scientific tasks, which enables the prediction of future fluid solely based on past observations. For example, (Lu et al., 2021a) proposed DeepONet in a branch-trunk framework with proven universal approximation capability. FNO (Li et al., 2021) approximates the integral operator through a linear transformation in the Fourier domain. Afterward, U-NO (Rahman et al., 2023) enhances FNO with a multi-scale framework. Later, Wu et al. (2023) proposed latent spectral models (LSM) to solve high-dimensional PDEs in the latent space by learning multiple basis operators. Still, these methods may fail to provide interpretable evidence for prediction results, such as intuitive physics quantities or visible velocity fields. Going beyond the above-mentioned methods, we propose HelmFluid as a purely data-driven model but with special designs to enhance physical interpretability.
39
+
40
+ Fluid dynamics modeling Estimating velocity fields is a direct and intuitive way of predicting the future fluid. Typically, optical flow (Horn & Schunck, 1981) is proposed to describe the motion between two successive observations. Recently, many deep models have been proposed to estimate optical flow, such as PWC-Net (Sun et al., 2018) and RAFT (Teed & Deng, 2020). However, since the optical flow was originally designed for rigid bodies, it struggles seriously in capturing fluid motion and will bring serious accumulation
41
+
42
+ errors in the prediction process. Especially for fluid, Zhang et al. incorporated physical constraints from Navier-Stokes equations to refine the velocity field predicted by PwC-Net (Sun et al., 2018) and further embedded the advection-diffusion equation into the deep model to predict the future fluid. Recently, Vortex (Deng et al., 2023) ensembles the observable Eulerian flow and the hidden Lagrangian vortical evolution to capture the intricate dynamics within the fluid. Unlike previous works, we propose to learn the inherent physical quantities of Helmholtz dynamics that explicitly derive the velocity fields, and further predict the future fluid with the Runge-Kutta temporal integral. This decomposes the intricate dynamics into more solvable components and facilitates our model with physical interpretability.
43
+
44
+ Computer graphics for fluid simulation Solving Navier-Stokes equations with learning-based computer graphics methods often uses a stream function paradigm to enforce the incompressibility condition (Ando et al., 2015). Kim et al. successfully synthesized plausible and divergence-free 2D and 3D fluid velocities from a set of reduced parameters but requiring ground truth velocity supervision, a rarity in real-world data. Recently, Liu et al. estimated the underlying physics of advection-diffusion equations, incorporating ground truth velocity and diffusion tensors supervision. Franz et al. simulated a realistic 3D density and velocity sequence from single-view sequences without 3D supervision, but it is not designed for predictive tasks as it utilizes future information to calculate current density. Unlike previous methods, our method learns the velocity field end-to-end from physical quantities observed in the past via Helmholtz dynamics, relying neither on ground truth velocity supervision nor on stream function. Such an unsupervised paradigm enables our model to capture more intricate fluid dynamics and extends its capability to a broader range of scenarios.
45
+
46
+ # 3. HelmFluid
47
+
48
+ In this paper, we highlight the key components of fluid prediction as providing physical interpretability and handling intricate dynamics. To achieve these objectives, we present the HelmFluid model with HelmDynamics blocks to capture the Helmholtz dynamics for 2D fluid, which is inspired by the Helmholtz theorem and attributes superficial complex dynamics to the inherent properties of fluid. Further, we design the Multiscale Multihead Integral Architecture to integrate the learned dynamics along the temporal dimension in multiple scales to predict the future states of fluid.
49
+
50
+ # 3.1. Learning Helmholtz Dynamics
51
+
52
+ Learning intricate velocity fluid directly from data may overwhelm the model. Hence, we propose to learn Helmholtz dynamics via a HelmDynamics block, which is a faithful implementation of the Helmholtz theorem that decomposes
53
+
54
+ complex fluid dynamics into more solvable components.
55
+
56
+ Helmholtz decomposition theorem Helmholtz decomposition (Bladel, 1959) plays an important role in simulating fluid dynamics, which can decompose a dynamic field into a curl-free component and a divergence-free component for simplification, and is highly related to the solvability theory of Navier-Stokes equations (Faith A., 2013).
57
+
58
+ Given a 3D dynamic field $\mathbf{F}:\mathbb{V}\to \mathbb{R}^3$ with a bounded domain $\mathbb{V}\subseteq \mathbb{R}^3$ , we can obtain the following decomposition based on the Helmholtz theorem:
59
+
60
+ $$
61
+ \mathbf {F} (\mathbf {r}) = \nabla \Phi (\mathbf {r}) + \nabla \times \mathbf {A} (\mathbf {r}), \mathbf {r} \in \mathbb {V}. \tag {1}
62
+ $$
63
+
64
+ It is notable that $\Phi : \mathbb{V} \to \mathbb{R}$ denotes the potential function, which is a scalar field with its gradient field $\nabla \Phi$ representing the curl-free part of $\mathbf{F}$ guaranteed by $\nabla \times (\nabla \Phi) = \mathbf{0}$ . And $\mathbf{A} : \mathbb{V} \to \mathbb{R}^3$ denotes the stream function, which is a vector field with $\nabla \times \mathbf{A}$ represents the divergence-free part of $\mathbf{F}$ guaranteed by $\nabla (\nabla \times \mathbf{A}) = \mathbf{0}$ , thereby also indicating the incompressibility of the flow field.
65
+
66
+ Helmholtz dynamics for 2D fluid Following mainstream works and conventional settings (Li et al., 2021), and for conciseness of presentation, this paper presents the Helmholtz theorem into 2D space by restricting the $z$ -axis component of $\mathbf{F}$ to 0, i.e. $\mathbf{F}(\mathbf{r}) = (\mathbf{F}_x(\mathbf{r}), \mathbf{F}_y(\mathbf{r}), 0)^{\mathrm{T}}$ . This restriction also vanishes the components of the stream function along $x$ -axis and $y$ -axis, namely $\mathbf{A}(\mathbf{r}) = ((0,0,\mathbf{A}_z(\mathbf{r}))^\mathrm{T}$ , indicating that the stream function degenerates to a scalar field. Generalizations and experiments on more practical 3D fluid prediction are included in Appendix A.
67
+
68
+ According to the Helmholtz decomposition theorem (Eq. 1), the fluid dynamics can be equivalently decomposed into curl-free and divergence-free parts for simplification. Thus, we define Helmholtz dynamics $\mathbf{F}_{\mathrm{Helm}}(\Phi ,\mathbf{A})$ explicitly as the function of potential and stream functions, which are inherent physics quantities of fluid. Concretely, for a 2D fluid defined in the domain $\mathbb{V}\subseteq \mathbb{R}^2$ , its Helmholtz dynamics $\mathbf{F}_{\mathrm{Helm}}$ can be formalized by potential function $\Phi :\mathbb{V}\to \mathbb{R}$ and stream function $\mathbf{A}:\mathbb{V}\rightarrow \mathbb{R}$ of fluid as follows:
69
+
70
+ $$
71
+ \begin{array}{l} \mathbf {F} _ {\mathrm {H e l m}} (\Phi , \mathbf {A}) = \nabla \Phi + \nabla \times \mathbf {A} \\ = \underbrace {\left(\frac {\partial \Phi}{\partial x} , \frac {\partial \Phi}{\partial y}\right)} _ {\text {C u r l - f r e e V e l o c i t y}} + \underbrace {\left(\frac {\partial \mathbf {A}}{\partial y} , - \frac {\partial \mathbf {A}}{\partial x}\right)} _ {\text {D i v e r g e n c e - f r e e V e l o c i t y}}. \tag {2} \\ \end{array}
72
+ $$
73
+
74
+ According to the Helmholtz theorem (Eq. 1), the function value of $\mathbf{F}_{\mathrm{Helm}}$ is equivalent to the real dynamic field $\mathbf{F}$ but is more tractable. By incorporating $\Phi$ and $\mathbf{A}$ , Helmholtz dynamics naturally decomposes the intricate fluid into more solvable components and ravels out the complex dynamics into intrinsic physics quantities, thus benefiting more interpretable dynamics modeling (Bhatia et al., 2013).
75
+
76
+ ![](images/8f7f10162ddbe8a8d9c9ac5b3556ed701986458c15c73a6177d670375df5977d.jpg)
77
+ Figure 2. HelmDynamics block, which learns spatiotemporal correlations $\mathbf{c}(\mathbf{r})$ both in the domain and on the boundary to estimate potential and stream functions of fluid from past observations for composing the Helmholtz dynamics.
78
+
79
+ HelmDynamics block To learn the Helmholtz dynamics, we propose the Helmhodynamics block to estimate the potential and stream functions from past observations. As shown in Figure 2, we first embed input observations into two successive deep representations to keep the temporal dynamics information explicitly. Given a sequence of $T$ frames $\mathbf{x} = [\mathbf{x}_1,\dots ,\mathbf{x}_T],\mathbf{x}_i\in \mathbb{R}^{H\times W}$ successively observed from 2D fluid, this process can be written as
80
+
81
+ $$
82
+ \widehat {\mathbf {x}} _ {T - 1} = \operatorname {E m b e d} \left(\mathbf {x} _ {(T - \tau): (T - 1)}\right) \tag {3}
83
+ $$
84
+
85
+ $$
86
+ \widehat {\mathbf {x}} _ {T} = \operatorname {E m b e d} \left(\mathbf {x} _ {(T - \tau + 1): T}\right),
87
+ $$
88
+
89
+ where $\widehat{\mathbf{x}}_{T - 1},\widehat{\mathbf{x}}_T\in \mathbb{R}^{d_{\mathrm{model}}\times H\times W}$ are the feature tensors at timestamps $T - 1$ and $T$ respectively. Here, we embed the observations from a $\tau$ lookback window to capture the spatiotemporal information, which is to project the temporal dimension $\tau$ to the channel dimension $d_{\mathrm{model}}$ by two convolutional layers with an in-between activation function.
90
+
91
+ Next, following the convention in dynamics modeling (Sun et al., 2018; Teed & Deng, 2020), we adopt spatiotemporal correlations between fluid at the previous timestamp and the current timestamp to represent the dynamics information. Especially as physics quantities of fluid are highly affected by boundary conditions, we go beyond previous approaches and propose to further include boundary conditions $\mathbb{S}$ when calculating the spatiotemporal correlations:
92
+
93
+ $$
94
+ \mathbf {c} (\mathbf {r}) = \operatorname {C o n c a t} \left(\left[ \widehat {\mathbf {x}} _ {T} (\mathbf {r}) \cdot \widehat {\mathbf {x}} _ {T - 1} \left(\mathbf {r} ^ {\prime}\right) \right] _ {\mathbf {r} ^ {\prime} \in \mathbf {N} _ {\mathbf {r}}}, \right. \tag {4}
95
+ $$
96
+
97
+ $$
98
+ \left. \left[ \mathbb {1} _ {\mathbb {S}} (\mathbf {r} ^ {\prime}) \left(\widehat {\mathbf {x}} _ {T} (\mathbf {r}) \cdot \widehat {\mathbf {x}} _ {T - 1} (\mathbf {r} ^ {\prime})\right) \right] _ {\mathbf {r} ^ {\prime} \in \mathbf {N} _ {\mathbf {r}}}\right), \mathbf {r} \in \mathbb {V}
99
+ $$
100
+
101
+ where $\cdot$ denotes the inner-product operation and $\mathbf{N}_{\mathbf{r}}$ denotes the neighbors around position $\mathbf{r}$ . $\mathbb{1}_{\mathbb{S}}(\cdot)$ denotes the indicator function, whose value is 1 when $\mathbf{r}' \in \mathbb{S}$ and 0 otherwise. $\mathbf{c}(\mathbf{r}) \in \mathbb{R}^{2|\mathbf{N}_{\mathbf{r}}|}$ represents the correlation map between the current fluid at $\mathbf{r}$ and its $|\mathbf{N}_{\mathbf{r}}|$ neighbors in the previous fluid, with additional consideration on the boundary conditions $\mathbb{S}$ . Thus, we obtain the extracted dynamics information $\mathbf{c} \in \mathbb{R}^{2|\mathbf{N}_{\mathbf{r}}| \times H \times W}$ . Subsequently, we can decode the potential and stream functions from the dynamics information and
102
+
103
+ ![](images/f04c894192bb9be9d9dffee662aefacec4c805ccbe9712f4edc4f9b8ddbb9f13.jpg)
104
+ Figure 3. Transform potential and stream functions to velocity.
105
+
106
+ calculate the Helmholtz dynamics as follows:
107
+
108
+ $$
109
+ \widehat {\Phi} = \mathrm {D e c o d e r} _ {\Phi} (\mathbf {c}), \widehat {\mathbf {A}} = \mathrm {D e c o d e r} _ {\mathbf {A}} (\mathbf {c}),
110
+ $$
111
+
112
+ $$
113
+ \widehat {\mathbf {F}} _ {\text {H e l m}} = \nabla \widehat {\boldsymbol {\Phi}} + \nabla \times \widehat {\mathbf {A}},
114
+ $$
115
+
116
+ (5)
117
+
118
+ where $\widehat{\Phi},\widehat{\mathbf{A}}\in \mathbb{R}^{H\times W}$ and $\widehat{\mathbf{F}}_{\mathrm{Helm}}\in \mathbb{R}^{2\times H\times W}$ represents the learned 2D fields of curl-free velocity, divergence-free velocity, and combined velocity respectively (Figure 3). $\mathrm{Decoder}_{\Phi}$ and $\mathrm{Decoder}_{\mathbf{A}}$ are learnable deep layers instantiated as two convolutional layers with an in-between activation function. We summarize the above process as
119
+
120
+ $$
121
+ \widehat {\mathbf {F}} _ {\text {H e l m}} = \operatorname {H e l m D y n a m i c s} \left(\widehat {\mathbf {x}} _ {(T - 1)}, \widehat {\mathbf {x}} _ {T}\right). \tag {6}
122
+ $$
123
+
124
+ Note that we follow the standard practice in RAFT (Teed & Deng, 2020) and learn the fluid dynamics information from spatiotemporal correlations $\mathbf{c}$ . However, rather than directly learning the velocity field from $\mathbf{c}(\mathbf{r})$ as in RAFT, we compose it from the learned potential and stream functions. Experimentally, this allows us to learn a more reasonable velocity field and enhances the accuracy of fluid prediction.
125
+
126
+ # 3.2. Multiscale Multihead Integral Architecture
127
+
128
+ After tackling intricate dynamics with the HelmDynamics blocks, we further present the Multiscale Multihead Integral Architecture to fuse learned dynamics along the temporal dimension for predicting future fluid, consisting of a multihead integral block and a multiscale modeling framework.
129
+
130
+ ![](images/eb3a11a80e08d7a75ea6377b2d2729f2fb79fb69bc6d1baac5e9ccf3bcfcca23.jpg)
131
+ Figure 4. HelmFluid architecture (left part), which employs Runge-Kutta with BFECC (Kim et al., 2005) as a TempoIntegral Block to integrate the learned Helmholtz dynamics along the temporal dimension (right part) at multiple scales with multihead to generate future fluid field. Especially, a residual connection across different scales is utilized to ensure the consistency of learned multiscale dynamics.
132
+
133
+ ![](images/18dec376955c6b082d47a85b6e52f10bc65724aceb2203533315be716273a5d9.jpg)
134
+
135
+ Multihead dynamics To predict the complex dynamics in fluid, we propose a multihead design for temporal integral, which is widely used in the attention mechanism to augment nonlinear capacity of deep models (Vaswani et al., 2017). The multihead design enables the model to capture different dynamic patterns via multiple Helmholtz dynamics $\widehat{\mathbf{F}}_{\mathrm{Helm},i}$ learned within different heads. As shown in Figure 4, given the deep representations $\widehat{\mathbf{x}}_{(T - 1)},\widehat{\mathbf{x}}_T\in \mathbb{R}^{d_{\mathrm{model}}\times H\times W}$ of two successive frames of fluid, we first split them into multiple heads along the channel dimension, with each head $i$ as $\widehat{\mathbf{x}}_{(T - 1),i},\widehat{\mathbf{x}}_{T,i}\in \mathbb{R}^{\frac{d_{\mathrm{model}}}{M}\times H\times W},i\in \{1,\dots ,M\}$ where $M$ is the number of heads. Then we compute the Helmholtz dynamics from the deep representations for each head $i$ :
136
+
137
+ $$
138
+ \widehat {\mathbf {F}} _ {\operatorname {H e l m}, i} = \operatorname {H e l m D y n a m i c s} \left(\widehat {\mathbf {x}} _ {(T - 1), i}, \widehat {\mathbf {x}} _ {T, i}\right), \tag {7}
139
+ $$
140
+
141
+ where $\widehat{\mathbf{F}}_{\mathrm{Helm},i}\in \mathbb{R}^{2\times H\times W},i = 1,\dots ,M.$
142
+
143
+ Multiscale modeling It is known in physics that the fluid exhibits different properties at different scales. These multiscale dynamics entangle with each other, making the fluid extremely intractable. Thus, we adopt a multiscale modeling framework to enhance dynamics modeling.
144
+
145
+ Given input embeddings $\widehat{\mathbf{x}}_{(T - 1)},\widehat{\mathbf{x}}_T\in \mathbb{R}^{d_{\mathrm{model}}\times H\times W}$ , we adopt a multiscale encoder to obtain deep representations in $L$ scales: $\widehat{\mathbf{x}}_{(T - 1)}^l,\widehat{\mathbf{x}}_T^l\in \mathbb{R}^{d_{\mathrm{model}}^l\times \lfloor \frac{H}{2(l - 1)}\rfloor \times \lfloor \frac{W}{2(l - 1)}\rfloor},l\in \{1,\dots ,L\}$ . As the dynamics at larger scales are less affected by noise and more capable of giving a reliable background velocity field for the smaller scales, we ensemble the learned dynamics from coarse to fine to ease the multiscale dynamics modeling process. As shown in Figure 4, we obtain the velocity field $\widehat{\mathbf{v}}_i^l$ at the $l$ -th scale by
146
+
147
+ $$
148
+ \widehat {\mathbf {v}} _ {i} ^ {l} = \left\{ \begin{array}{l} \widehat {\mathbf {F}} _ {\operatorname {H e l m}, i} ^ {l}, l = L \\ \widehat {\mathbf {F}} _ {\operatorname {H e l m}, i} ^ {l} + \text {U p s a m p l e} \left(\widehat {\mathbf {v}} _ {i} ^ {l + 1}\right), 1 \leq l < L \end{array} \right. \tag {8}
149
+ $$
150
+
151
+ where $\widehat{\mathbf{v}}_i^l\in \mathbb{R}^{2\times H\times W}$ , and Upsample $(\cdot)$ is the bilinear interpolation to keep resolution compatible. We incorporate the idea of residual learning for multiscale dynamics to align the velocity values. This ensures the consistency of velocity field at the fine scale with that at the coarse scale.
152
+
153
+ TempoIntegral block To predict the future fluid field, we integrate the feature space along the temporal dimension. Concretely, for scale $l \in 1,2,\dots,L$ and head $i \in 1,2,\dots,M$ , we integrate the deep representation $\widehat{\mathbf{x}}_{T,i}^{l}$ by its corresponding velocity field $\widehat{\mathbf{v}}_i^l$ . As shown in Figure 4, for a position $\mathbf{r}$ , we take the second-order Runge-Kutta method (DeVries & Wolf, 1994) as the numerical integral method to estimate its position in the future $\mathrm{d}t$ time: $\mathbf{r}_i^{l'} = \mathbf{r} + \widehat{\mathbf{v}}_i^l (\mathbf{r} + \widehat{\mathbf{v}}_i^l (\mathbf{r})\frac{\mathrm{d}t}{2})\mathrm{d}t$ . This equation can directly deduce the next step representation by moving the pixel at $\mathbf{r}$ to $\mathbf{r}'$ . Following the convention in temporal integral, we adopt the back-and-forth error compensation and correction (BFECC, (Kim et al., 2005)) for better position mapping, which enhances the Runge-Kutta with an ensemble of bidirectional integral. Since the mapped coordinates $\mathbf{r}_i^{l'}$ may not be integer positions on regular grids, we further use bilinear interpolation to yield representations on regular grids. We summarize the whole temporal integral process for each head $i$ at each scale $l$ as
154
+
155
+ $$
156
+ \begin{array}{l} \widehat {\mathbf {x}} _ {(T + 1), i} ^ {l} = \text {I n t e r p o l a t e} \left(\text {B F E C C} \left(\widehat {\mathbf {x}} _ {T, i} ^ {l}, \widehat {\mathbf {v}} _ {i} ^ {l}\right)\right) \\ \widehat {\mathbf {x}} ^ {l} = \underset {\sim} {\sim} (\widehat {\mathbf {x}} ^ {l}, \dots) \end{array} \tag {9}
157
+ $$
158
+
159
+ $$
160
+ \widehat {\mathbf {x}} _ {(T + 1)} ^ {l} = \operatorname {C o n c a t} \left(\left[ \widehat {\mathbf {x}} _ {(T + 1), i} ^ {l} \right] _ {i = 1, \dots , M}\right).
161
+ $$
162
+
163
+ Eventually, we progressively aggregate the predicted context features from large to small scales and obtain the final prediction of the fluid field with a projection layer. More details of the model architecture including implementation of the BFECC method are deferred to Appendix B.2.
164
+
165
+ # 4. Experiments
166
+
167
+ We extensively evaluate HelmFluid on five benchmarks, including both simulated and real-world observed scenarios, covering known and unknown boundary settings (see Figure 5). Extensions to 3D fluid are included in Appendix A. Descriptions of datasets, baselines, and implementation details are listed in Appendix B.
168
+
169
+ Baselines We compare HelmFluid with nine competitive baselines, including one numerical method DARTS (Ruzanski et al., 2011), four neural fluid simulators: LSM (Wu
170
+
171
+ ![](images/2f4a81d0aae5f8ade55c9dfce1540258ce5f84b10e29f6afa66f3318b7f8678f.jpg)
172
+ Navier-Stokes
173
+
174
+ ![](images/f780ddcd8e753bba6a05224b650767158299ff08216b13ba060ec751ab6ea062.jpg)
175
+ Bounded N-S
176
+
177
+ ![](images/b0301951540487371ab0aee0deb04a726de0c6e37d0df0628d77f8847b86c7ac.jpg)
178
+ Sea Temperature
179
+
180
+ ![](images/76e8bc5ae4705b3f24587dde066c4b2e5e80652df76482867329ca38d33049f1.jpg)
181
+ ERA5 Z500
182
+
183
+ ![](images/c887fb27a144c94e7ee2dcc0769044fac1697a2c187c49ecf3913613d883db5a.jpg)
184
+ Spreading Ink
185
+ Figure 5. Summary of five experiment benchmarks, including (a) simulated and (b) real-world data.
186
+
187
+ <table><tr><td>BENCHMARK</td><td>BOUNDARY</td><td>LENGTH</td></tr><tr><td>NAVIER-STOKES</td><td>UNKNOWN</td><td>10</td></tr><tr><td>BOUNDED N-S</td><td>KNOWN</td><td>10</td></tr><tr><td>ERA5 Z500</td><td>KNOWN</td><td>10</td></tr><tr><td>SEA TEMPERATURE</td><td>UNKNOWN</td><td>10</td></tr><tr><td>SPREADING INK</td><td>KNOWN</td><td>46-63</td></tr></table>
188
+
189
+ Table 1. Performance comparison on the Navier-Stokes dataset under different resolutions. Relative L2 is recorded. For clarity, the best result is in bold and the second best is underlined. The relative promotion is calculated between the best and second-best models, that is $1 - \frac{\text{The best error}}{\text{The second best error}}$ . The timewise error curve is recorded from the $64 \times 64$ settings.
190
+
191
+ <table><tr><td>MODEL</td><td>64 × 64</td><td>128 × 128</td><td>256 × 256</td></tr><tr><td>DARTS (RUZANSKI ET AL., 2011)</td><td>0.8046</td><td>0.7002</td><td>0.7904</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>0.1982</td><td>0.1589</td><td>0.2953</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>0.1556</td><td>0.1028</td><td>0.1645</td></tr><tr><td>MWT (GUPTA ET AL., 2021)</td><td>0.1586</td><td>0.0841</td><td>0.1390</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>0.1435</td><td>0.0913</td><td>0.1392</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>0.1535</td><td>0.0961</td><td>0.1973</td></tr><tr><td>HELMFLUID (OURS)</td><td>0.1261</td><td>0.0807</td><td>0.1310</td></tr><tr><td>PROMOTION</td><td>12.1%</td><td>4.0%</td><td>5.8%</td></tr></table>
192
+
193
+ ![](images/1a5c5d6fb7f394b994d76ee00786c1420b56d2dd06edd1d28295efdb52038fa0.jpg)
194
+
195
+ et al., 2023), U-NO (Rahman et al., 2023), WMT (Gupta et al., 2021), FNO (Li et al., 2021), two fluid-dynamics-modeling solutions: Vortex (Deng et al., 2023), PWC-Net with fluid Refinement (Zhang et al., 2022), one vision backbone widely-used in fluid modeling: U-Net (Ronneberger et al., 2015), and one model specialized for weather forecasting: FourcastNet (Pathak et al., 2022). Here, LSM and U-NO are previous state-of-the-art models in fluid prediction. Note that due to the inconsistent settings in fluid prediction, some of the baselines are not suitable for all benchmarks. Thus, in the main text, we only provide comparisons to baselines on their official benchmarks. But to ensure transparency, we also provide the complete results for other baselines in Table 21.
196
+
197
+ # 4.1. Simulated Data
198
+
199
+ Navier-Stokes with unknown boundary This dataset is simulated from a viscous, incompressible fluid field on a two-dimensional unit torus, which obeys Navier-Stokes equations (Li et al., 2021). The task is to predict the future 10 steps based on the past 10 observations.
200
+
201
+ As presented in Table 1, HelmFluid significantly surpasses other models, demonstrating its advancement in fluid prediction. In comparison with the second-best model, HelmFluid achieves $12.1\%$ relative error reduction (0.1261 vs. 0.1435) in the $64 \times 64$ resolution setting and achieves consistent state-of-the-art in all time steps. Besides, HelmFluid performs best for the inputs under various resolutions, verifying its capability to handle the dynamics at different scales.
202
+
203
+ To intuitively present the model capability, we also provide
204
+
205
+ Table 2. Model performance comparison on Bounded N-S dataset.
206
+
207
+ <table><tr><td>MODEL</td><td>RELATIVE L2</td></tr><tr><td>DARTS (RUZANSKI ET AL., 2011)</td><td>0.1820</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>0.0846</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>0.1176</td></tr><tr><td>MWT (GUPTA ET AL., 2021)</td><td>0.1407</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>0.1200</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>0.0737</td></tr><tr><td>HELMFLUID (OURS)</td><td>0.0652</td></tr><tr><td>PROMOTION</td><td>11.5%</td></tr></table>
208
+
209
+ several showcases in Figure 6. In comparing to U-NO and LSM, HelmFluid precisely predicts the fluid motion, especially the twist parts, which involve complex interactions among several groups of fluid particles. Besides, HelmFluid also generates the learned velocity field for each step, which reflects the rotation and diffusion of fluid, empowering prediction with interpretable evidence. These results demonstrate the advantages of HelmFluid in capturing complex dynamics and endowing model interpretability.
210
+
211
+ Bounded N-S with known boundary This dataset simulates a wide pipe scenario, where the incompressible fluid moves from left to right, passing by several solid columns with position and size fixed in the dataset. The goal is to predict the future 10 steps based on past 10 observations.
212
+
213
+ HelmFluid also performs best in this challenging task and presents a consistent advantage in all prediction steps. While U-Net seems to be close to HelmFluid in averaged relative L2, it fails to capture the Karmen vortex phenomenon and results in blurry predictions (Figure 7), which will seriously
214
+
215
+ ![](images/fcd65d374607bd06d48236b99c4c386dee348e12b10b812d3e28f3477008bd3a.jpg)
216
+ Figure 6. Showcase comparison and learned Helmholtz dynamics on the Navier-Stokes dataset under the $64 \times 64$ input resolution.
217
+
218
+ ![](images/8f7889df8200f51b2c7b6aaedf60a2b30a20d936189a20f51497bd10c33823a8.jpg)
219
+ Figure 7. Timewise error and showcases on Bounded N-S dataset. For clarity, we highlight and zoom in the key parts of fluid in red boxes.
220
+
221
+ ![](images/a6de69cd06067e3b64719911a53489ea74e7fcb252a6fd3478e2572fa83625b8.jpg)
222
+
223
+ ![](images/27fefc263b655b91ce0a2b6fd3b6c8af3d47e1dab25d15bb14158ceb7087918a.jpg)
224
+
225
+ ![](images/4aca2b0cc022c2992af00c4a833230ff170461375401a9b91984aabbf5fbe7d6.jpg)
226
+
227
+ ![](images/51a9b975139cb1bd036a04cb02f50ea5e942e1d0a9281df0c9b3466eb331fa7c.jpg)
228
+
229
+ Table 3. Model comparison on the ERA5 Z500 dataset.
230
+
231
+ <table><tr><td>MODELS</td><td>RMSE</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>632.94</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>596.80</td></tr><tr><td>MWT (GUPTA ET AL., 2021)</td><td>596.45</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>596.84</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>561.27</td></tr><tr><td>FOURCASTNET (PATHAK ET AL., 2022)</td><td>594.49</td></tr><tr><td>HELMFLUID (OURS)</td><td>521.44</td></tr><tr><td>PROMOTION</td><td>7.1%</td></tr></table>
232
+
233
+ impede its interpretability. In contrast, HelmFluid precisely predicts the Karmen vortex around boundaries with eidetic texture. This result benefits from the learning paradigm designed based on Helmholtz dynamics.
234
+
235
+ Besides, we provide the comparison of learned dynamics among HelmFluid, DARTS (2011) and PWC-Net (2022) in Figure 1. HelmFluid shows impressive capturing of the dynamics accurately, even for vortices around solid columns. This capability stems from HelmFluid's design in learning potential and stream functions instead of directly learning velocities, thereby mitigating overwhelming the model by intricate dynamics. It is notable that the numerical method DARTS degenerates seriously in both quantitative results (Table 2) and learned dynamics (Figure 1), which highlights challenges in this task and the advantage of HelmFluid.
236
+
237
+ # 4.2. Real-world Data
238
+
239
+ ERA5 Z500 with known boundary This dataset is processed from the fifth generation of ECMWF reanalysis
240
+
241
+ Table 4. Model comparison on the Sea Temperature dataset.
242
+
243
+ <table><tr><td>MODELS</td><td>RELATIVE L2</td><td>MSE</td></tr><tr><td>DARTS (RUZANSKI ET AL., 2011)</td><td>0.3308</td><td>0.1094</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>0.1735</td><td>0.0379</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>0.1935</td><td>0.0456</td></tr><tr><td>MWT (GUPTA ET AL., 2021)</td><td>0.2075</td><td>0.0506</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>0.1969</td><td>0.0472</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>0.1759</td><td>0.0389</td></tr><tr><td>HELMFLUID (OURS)</td><td>0.1704</td><td>0.0368</td></tr><tr><td>PROMOTION</td><td>1.8%</td><td>2.9%</td></tr></table>
244
+
245
+ (ERA5) data (Hersbach et al., 2020). Following the practice of weather forecasting, we choose the geopotential height at $500\mathrm{hPa}$ (Z500) with a resolution of $2.5^{\circ}$ and a time interval of 3 hours as our data. The goal is to predict the geopotential height for 10 timesteps given 2 observations.
246
+
247
+ The Root Mean Square Error (RMSE) for Z500 is detailed in Table 3, revealing that HelmFluid consistently outperforms all other comparative baselines. Notably, it surpasses FourcastNet (2022), the pioneering model to leverage ERA5 reanalysis data for medium-range meteorological forecasts. This superior performance indicates that HelmFluid is adept at predicting real-world atmospheric fluid dynamics and has the potential to advance weather forecasting capabilities. More showcases can be found in Figure 22.
248
+
249
+ Sea Temperature with unknown boundary This dataset consists of the reanalysis ocean temperature data (MDS) provided by ECMWF. We adapted the data in four $64 \times 64$ regions located in different oceans. The goal is to predict
250
+
251
+ ![](images/d3319ee10467831833d4bd51051489eee7b44e320d4c49ca5ca49c49f92446cf.jpg)
252
+ Figure 8. Showcases of prediction results (future 20 and 40 steps) and learned velocity fields (future 40 steps) on the Spreading Ink dataset. We also show velocity fields of the first timestep estimated by numerical method (DARTS) and deep optical flow (PWC-Net).
253
+
254
+ Table 5. Model comparison on Spreading Ink. Averaged Perceptual loss, Relative L2 and MSE of three sub-videos are reported.
255
+
256
+ <table><tr><td>MODELS</td><td>METRICS</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>3.596 / 0.2620 / 0.0176</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>4.095 / 0.2776 / 0.0198</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>5.604 / 0.2971 / 0.0227</td></tr><tr><td>VORTEX (DENG ET AL., 2023)</td><td>3.949 / 0.2483 / 0.0161</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>3.760 / 0.2698 / 0.0187</td></tr><tr><td>HELMFLUID (OURS)</td><td>3.323 / 0.2183 / 0.0125</td></tr><tr><td>PROMOTION</td><td>7.6% / 12.1% / 22.3%</td></tr></table>
257
+
258
+ the temperature for the next 10 days based on 10 past days.
259
+
260
+ The results in Table 4 demonstrate that HelmFluid can handle real-world data well and outperform all baselines. It is worth noting that the test set is collected from different regions with respect to the training and validation sets, which involves the distribution shift problem. Thus, these results also verify the generality and transferability of HelmFluid.
261
+
262
+ Spreading Ink with known boundary This benchmark consists of three videos collected by Deng et al., involving more than 100 successive frames respectively. Following the experiment setting in Vortex (2023), the goal is to predict the last 1/3 frames of the video using the first 2/3.
263
+
264
+ The quantitative results are listed in Table 5. HelmFluid still performs well in this long-term forecasting task. In addition to the relative L2 and MSE, it also consistently achieves the lowest VGG perceptual loss, implying that the prediction results of HelmFluid can maintain the realistic texture and intuitive physics. As for showcases in Figure 8, we find that HelmFluid can precisely capture the diffusion of ink. Even for the future 40 frames, HelmFluid still performs well in capturing the hollow position and surpasses numerical methods, optical flow and Vortex, in learning the velocity.
265
+
266
+ # 4.3. Model analysis
267
+
268
+ Efficiency analysis To evaluate model practicability, we also provide efficiency analysis in Figure 9. In comparison with the second-best model U-NO, HelmFluid presents a
269
+
270
+ Table 6. Ablation on the HelmDynamics block, which includes learning w/o HelmDynamics on the $64 \times 64$ Navier-Stokes dataset, and learning w/o boundary conditions on Bounded N-S dataset.
271
+
272
+ <table><tr><td>DATA</td><td>MODEL</td><td>RELATIVE L2</td></tr><tr><td rowspan="3">NAVIER-STOKES</td><td>DIRECTLY LEARNING VELOCITY</td><td>0.1412</td></tr><tr><td>LEARNING HELMDYNAMICS</td><td>0.1261</td></tr><tr><td>PROMOTION</td><td>10.7%</td></tr><tr><td rowspan="3">BOUNDED N-S</td><td>W/O BOUNDARY CONDITIONS</td><td>0.0846</td></tr><tr><td>W/ BOUNDARY CONDITIONS</td><td>0.0652</td></tr><tr><td>PROMOTION</td><td>22.9%</td></tr></table>
273
+
274
+ favorable trade-off between efficiency and performance. In particular, HelmFluid surpasses U-NO by $12.1\%$ in relative L2 with comparable running time. See Appendix D for full results and comparisons under aligned model size.
275
+
276
+ Ablations To highlight advantages of learning Helmholtz dynamics, we compare HelmFluid with its two variants: directly learning the velocity field and removing the boundary condition design. As shown in Table 6, directly estimating the velocity field will cause $10.7\%$ performance drop. A plausible reason is that deep models can be overwhelmed by complex fluid interactions, and thus learning Helmholtz dynamics is beneficial. Also, our design in incorporating boundary condition is essential. Empowered by the Helm-Dynamics block, our model can conveniently utilize the boundary information, unleashing its potential in handling fluid with complex boundaries. Complete quantitative and
277
+
278
+ ![](images/6ce9b3d74f6faa621b8d37a6e31f189d0078c6dda76205cb2a10837a03eb7750.jpg)
279
+ Figure 9. Efficiency comparison evaluated on the $64 \times 64$ Naiver-Stokes and $128 \times 128$ Bounded N-S averaged from $10^{3}$ iterations.
280
+
281
+ ![](images/fe761a562262f30322afa344dc4d1483d69095ecbf37fe24338fbe3b0668f578.jpg)
282
+
283
+ ![](images/a23dfa49898a9c61d80df2ea00c115b77edd489b07a96d83fac9bbc279ab0786.jpg)
284
+ Figure 10. Showcases of the 3D Smoke Dataset, visualization from 3D perspective and 2D horizontal slice are both provided.
285
+
286
+ ![](images/3de649640232d41eefe564958bbef1dda204cc26514d9b64f4bf2ae47bbf5507.jpg)
287
+ Figure 11. Tracking of the local maxima of Bounded N-S.
288
+
289
+ visual comparisons are included in Appendices C and E.
290
+
291
+ Dynamics tracking This paper is based on the Eulerian specification of fluid. As a supplement, we also provide a Lagrangian perspective to analyze model predictions. Technically, we locate the local maxima of fluid and keep tracking it in the subsequent frames. The closer the predicted trajectory of the point is to its real counterpart, the better tracking of the point is indicated. As shown in Figure 11, the trajectory predicted by HelmFluid is the closest to the ground truth, verifying the capability of HelmFluid in capturing the intricate dynamics of fluid.
292
+
293
+ Generalization on boundary conditions HelmFluid incorporates boundary conditions as additional data for correlation calculations, enhancing its predictive capabilities. To evaluate the model's performance under various boundary conditions, we undertook a modification of the Bounded Navier-Stokes dataset by altering the geometric form of the solid columns from circular to square, thereby introducing a distinct set of boundary conditions for testing. We tested on three different training-testing scenarios, including zero-shot testing on the alternative dataset, fine-tuning the model parameters on the alternative dataset followed by testing, and blending two distinct datasets for separate testing. All the models are trained with the same number of epochs.
294
+
295
+ As shown in Table 7, direct zero-shot testing on a new dataset leads to a significant degradation in model performance. However, merely fine-tuning for 3 epochs achieved comparable or even superior test results on the original dataset. In the scenario of mixed training, test metrics on both datasets improve by $2.9\%$ and $16.7\%$ , respectively.
296
+
297
+ Table 7. Experimental results for generalized boundary conditions, circle denotes the original Bounded N-S dataset, while square denotes the modified dataset. The underlined metric indicates training performance with the test set being identical.
298
+
299
+ <table><tr><td>DATASET</td><td>CIRCLE</td><td>SQUARE</td></tr><tr><td>TRAINED ON CIRCLE</td><td>0.0731</td><td>0.1501</td></tr><tr><td>FINTUNED 3 EPOCHS ON CIRCLE</td><td>-</td><td>0.0791</td></tr><tr><td>FINTUNED 100 EPOCHS ON CIRCLE</td><td>-</td><td>0.0781</td></tr><tr><td>TRAINED ON SQUARE</td><td>0.1503</td><td>0.0855</td></tr><tr><td>FINTUNED 3 EPOCHS ON SQUARE</td><td>0.0710</td><td>-</td></tr><tr><td>FINTUNED 100 EPOCHS ON SQUARE</td><td>0.0691</td><td>-</td></tr><tr><td>TRAINED ON CIRCLE AND SQUARE</td><td>0.0618</td><td>0.0712</td></tr></table>
300
+
301
+ This proves the generalizability of HelmFluid in handling various boundary conditions and demonstrates an improvement as the dataset grows in size and diversity.
302
+
303
+ # 4.4. Extend HelmFluid to 3D Fluid
304
+
305
+ The form of Helmholtz decomposition implies its applicability across arbitrarily high dimensions. To address fluid prediction in three-dimensional scenarios, we extend the HelmFluid model to 3D and experiment on the simulated 3D smoke buoyancy dataset with known boundary. As shown in Figure 10, HelmFluid generates smoke that closely matches the shape and position of the ground truth, effectively reflecting the variations in location and intensity of the smoke. See Appendix A for details of the dataset and implementation.
306
+
307
+ # 5. Conclusions and Future Work
308
+
309
+ In this paper, we present the HelmFluid model towards accurate and interpretable fluid prediction. Instead of directly learning velocity fields, we propose to learn the Helmholtz dynamics, which casts the intricate dynamics of fluid into inherent physics quantities. With HelmDynamics blocks and Multiscale Multiscale Integral Architecture, HelmFluid can precisely estimate the potential and stream functions for Helmholtz dynamics, which empowers the prediction process with physical interpretability. HelmFluid achieves consistent state-of-the-art on both simulated and real-world datasets, even for scenarios with complex boundaries. In the future, we plan to further extend HelmFluid to large-scale datasets, such as world climate and ocean current modeling.
310
+
311
+ # Acknowledgements
312
+
313
+ This work was supported by the National Key Research and Development Plan (2021YFC3000905), the National Natural Science Foundation of China (U2342217 and 62022050), the BNRist Innovation Fund (BNR2024RC01010), and the National Engineering Research Center for Big Data Software.
314
+
315
+ # Impact Statement
316
+
317
+ This paper presents work whose goal is to advance deep learning research for fluid prediction, which has the potential application to enhance the interpretability of atmospheric forecasts, ocean forecasts, and turbulence predictions in machine learning. Our work only focuses on the scientific problem, so there is no potential ethical risk.
318
+
319
+ # References
320
+
321
+ Ando, R., Thuerey, N., and Wojtan, C. A stream function solver for liquid simulations. ACM Trans. Graphics, 2015.
322
+ Baukal Jr, C. E., Gershtein, V., and Li, X. J. Computational fluid dynamics in industrial combustion. CRC press, 2000.
323
+ Bayindir, C. and Namli, B. Efficient sensing of von kármán vortices using compressive sensing. Comput. Fluids, 2021.
324
+ Bhatia, H., Norgard, G., Pascucci, V., and Bremer, P.-T. The helmholtz-hodge decomposition—a survey. IEEE Trans. Vis. Comput. Graph., 2013.
325
+ Bladel, J. On helmholtz's theorem in finite regions. IRE Trans. Anntenas Propag., 1959.
326
+ Deng, Y., Yu, H.-X., Wu, J., and Zhu, B. Learning vortex dynamics for fluid inference and prediction. In *ICLR*, 2023.
327
+ DeVries, P. L. and Wolf, R. P. A first course in computational physics. Comput. Phys., 1994.
328
+ Evans, L. C. Partial differential equations. American Mathematical Soc., 2010.
329
+ Faith A., M. An introduction to fluid mechanics. Cambridge University Press, 2013.
330
+ Franz, E., Solenthaler, B., and Thuerey, N. Learning to estimate single-view volumetric flow motions without 3d supervision. In *ICLR*, 2023.
331
+ Gupta, G., Xiao, X., and Bogdan, P. Multiwavelet-based operator learning for differential equations. In NeurIPS, 2021.
332
+
333
+ Hersbach, H., Bell, B., Berrisford, P., Hirahara, S., Horányi, A., Muñoz-Sabater, J., Nicolas, J., Peubey, C., Radu, R., Schepers, D., et al. The era5 global reanalysis. Quarterly Journal of the Royal Meteorological Society, 146(730): 1999-2049, 2020.
334
+ Horn, B. K. and Schunck, B. G. Determining optical flow. AI, 1981.
335
+ Hu, Y., Li, T.-M., Anderson, L., Ragan-Kelley, J., and Durand, F. Taichi: a language for high-performance computation on spatially sparse data structures. ACM Trans. Graphics, 2019.
336
+ Johnson, J., Alahi, A., and Fei-Fei, L. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016.
337
+ Karniadakis, G. E., Kevrekidis, I. G., Lu, L., Perdikaris, P., Wang, S., and Yang, L. Physics-informed machine learning. Nat. Rev. Phys., 2021.
338
+ Kim, B., Liu, Y., Llamas, I., and Rossignac, J. Flowfixer: Using bfecc for fluid simulation. In NPH, 2005.
339
+ Kim, B., Azevedo, V. C., Thuerey, N., Kim, T., Gross, M., and Solenthaler, B. Deep fluids: A generative network for parameterized fluid simulations. Comput. Graph. Forum, 2019.
340
+ Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. In ICLR, 2015.
341
+ Li, Z., Kovachki, N. B., Azizzadenesheli, K., liu, B., Bhattacharya, K., Stuart, A., and Anandkumar, A. Fourier neural operator for parametric partial differential equations. In ICLR, 2021.
342
+ Li, Z., Shu, D., and Farimani, A. B. Scalable transformer for PDE surrogate modeling. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=djyn8Q0anK.
343
+ Liu, P., Tian, L., Zhang, Y., Aylward, S., Lee, Y., and Niethammer, M. Discovering hidden physics behind transport dynamics. In CVPR, 2021.
344
+ Lu, L., Jin, P., Pang, G., Zhang, Z., and Karniadakis, G. E. Learning nonlinear operators via deeponet based on the universal approximation theorem of operators. Nat. Mach. Intell., 2021a.
345
+ Lu, L., Meng, X., Mao, Z., and Karniadakis, G. E. Deepxde: A deep learning library for solving differential equations. SIAM Rev., 2021b.
346
+
347
+ (MDS), E. C. M. S. I. C. M. D. S. Global ocean physics reanalysis. DOI: 10.48670/moi-00021 (Accessed on 23 September 2023), 2023.
348
+ Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.
349
+ Pathak, J., Subramanian, S., Harrington, P., Raja, S., Chattopadhyay, A., Mardani, M., Kurth, T., Hall, D., Li, Z., Azizzadenesheli, K., et al. Fourcastnet: A global data-driven high-resolution weather model using adaptive fourier neural operators. arXiv preprint arXiv:2202.11214, 2022.
350
+ Rahman, M. A., Ross, Z. E., and Azizzadenesheli, K. U-NO: U-shaped neural operators. TMLR, 2023.
351
+ Raissi, M., Perdikaris, P., and Karniadakis, G. E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys., 2019.
352
+ Raissi, M., Yazdani, A., and Karniadakis, G. E. Hidden fluid mechanics: Learning velocity and pressure fields from flow visualizations. Science, 2020.
353
+ Ronneberger, O., Fischer, P., and Brox, T. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015.
354
+ Ruzanski, E., Chandrasekar, V., and Wang, Y. The casa nowcasting system. J. Atmos. Oceanic Technol., 2011.
355
+ Sun, D., Yang, X., Liu, M.-Y., and Kautz, J. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In CVPR, 2018.
356
+ Teed, Z. and Deng, J. Raft: Recurrent all-pairs field transforms for optical flow. In ECCV, 2020.
357
+ Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I. Attention is all you need. In NeurIPS, 2017.
358
+ Wang, H., Fu, T., Du, Y., Gao, W., Huang, K., Liu, Z., Chandak, P., Liu, S., Van Katwyk, P., Deac, A., et al. Scientific discovery in the age of artificial intelligence. Nature, 2023.
359
+ Wang, R., Kashinath, K., Mustafa, M., Albert, A., and Yu, R. Towards physics-informed deep learning for turbulent flow prediction. $KDD$ , 2019.
360
+
361
+ Wu, H., Hu, T., Luo, H., Wang, J., and Long, M. Solving high-dimensional pdes with latent spectral models. In ICML, 2023.
362
+ Zhang, M., Wang, J., Thomole, J. B., and Piggott, M. Learning to estimate and refine fluid motion with physical dynamics. In ICML, 2022.
363
+
364
+ # A. Extend HelmFluid to 3D Fluid
365
+
366
+ Here we present the potential extension of Helmholtz decomposition $\mathbf{F}(\mathbf{r}) = \nabla \Phi (\mathbf{r}) + \nabla \times \mathbf{A}(\mathbf{r}),\mathbf{r}\in \mathbb{V}$ . For 2D cases in the main text, the velocity component on the $z$ -axis is set to be zero, thereby $\mathbf{A}_x(\mathbf{r}) = \mathbf{A}_y(\mathbf{r}) = 0$ . By extending the Helmhodynamics block to learn $\widehat{\Phi}\in \mathbb{R}^{1\times D\times H\times W}$ and $\widehat{\mathbf{A}}\in \mathbb{R}^{3\times D\times H\times W}$ , where $D$ is the additional depth dimension of 3D fluid, we can adapt Helmholtz to 3D fluid prediction. Then, following the Helmholtz decomposition presented in Eq. 1, we can easily obtain the inferred 3D vector velocity field, thereby enabling Helmholtz to achieve the velocity-aware 3D fluid prediction.
367
+
368
+ To validate the capabilities of HelmFluid on 3D fluid prediction scheme, we generated 3D smoke buoyancy dataset by modifying the 3D solver (under MIT license) from https://github.com/BaratiLab/FactFormer/. 3D smoke buoyancy problem is governed by the incompressible Navier-Stokes equation coupled with advection equation (Li et al., 2023):
369
+
370
+ $$
371
+ \frac {\partial \mathbf {u} (\mathbf {x} , t)}{\partial t} + \mathbf {u} (\mathbf {x}, t) \cdot \nabla \mathbf {u} (\mathbf {x}, t) = \nu \nabla^ {2} \mathbf {u} (\mathbf {x}, t) - \frac {1}{\rho} \nabla p (\mathbf {x}, t) + \mathbf {f} (\mathbf {x}, t), \quad \mathbf {x} \in (0, L) ^ {3}, t \in (0, T ],
372
+ $$
373
+
374
+ $$
375
+ \frac {\partial d (\mathbf {x} , t)}{\partial t} + \mathbf {u} (\mathbf {x}, t) \cdot \nabla d (\mathbf {x}, t) = 0, \quad \mathbf {x} \in (0, L) ^ {3}, t \in (0, T ], \tag {10}
376
+ $$
377
+
378
+ $$
379
+ \nabla \cdot \mathbf {u} (\mathbf {x}, t) = 0, \quad \mathbf {x} \in (0, L) ^ {3}, t \in [ 0, T ],
380
+ $$
381
+
382
+ $$
383
+ \mathbf {u} (\mathbf {x}, 0) = 0, \quad \mathbf {d} (\mathbf {x}, 0) = d _ {0} (\mathbf {x}), \quad \mathbf {f} (\mathbf {x}, t) = [ 0, 0, \eta d (\mathbf {x}, t) ] \qquad \mathbf {x} \in (0, L) ^ {3}, t \in (0, T ],
384
+ $$
385
+
386
+ where $L$ is set 32, $\eta$ is the buoyancy factor. The goal is to predict the future 10 steps based on the past 10 frames. We generated 1000 trajectories for training and 200 for testing and provided 3D showcases and 2D slices in Figure 12.
387
+
388
+ ![](images/b9a3f6074d381313fd67fbc62b03852d07446ecf96508111f4ec3240938e2199.jpg)
389
+ Figure 12. Showcases of the 3D Dataset, visualization from 3D perspective and 2D horizontal slice are provided.
390
+
391
+ # B. Implementation Details
392
+
393
+ # B.1. Dataset
394
+
395
+ We summarize the experiment datasets in Table 8. More details can be found in the following.
396
+
397
+ Table 8. A summary of experiment datasets. Note that the Spreading Ink dataset is different from other benchmarks, which only contains three video sequences. We strictly follow the Vortex (Deng et al., 2023) to split the video for training, validation and test. For example, in the training phase of video 1, we use the first 70 frames for training and the subsequent 30 frames for validation. As for the test, we use the first 100 frames as input and predict the following 50 frames.
398
+
399
+ <table><tr><td>DATASET</td><td>(INPUT, PREDICT LENGTH)</td><td>(TRAINING, VALIDATION, TEST)</td><td>OBSERVED STATE</td><td>REYNOLD NUMBERS</td></tr><tr><td>NAVIER-STOKES</td><td>(10,10)</td><td>(1000,200,200)</td><td>VORTICITY</td><td>~ 10^4</td></tr><tr><td>BOUNDED N-S</td><td>(10,10)</td><td>(1000,200,200)</td><td>GRAYSCALE</td><td>~ 300</td></tr><tr><td>ERA5 Z500</td><td>(2,10)</td><td>(20425, 2087, 4174)</td><td>GEOPOTENTIAL</td><td>UNKNOWN</td></tr><tr><td>SEA TEMPERATURE</td><td>(10,10)</td><td>(170249, 17758, 65286)</td><td>TEMPERATURE</td><td>UNKNOWN</td></tr><tr><td>SPREADING INK VIDEO 1</td><td>(100, 50)</td><td>ONE VIDEO SEQUENCE</td><td>RGB IMAGE</td><td>UNKNOWN</td></tr><tr><td>SPREADING INK VIDEO 2</td><td>(126, 63)</td><td>ONE VIDEO SEQUENCE</td><td>RGB IMAGE</td><td>UNKNOWN</td></tr><tr><td>SPREADING INK VIDEO 3</td><td>(93, 46)</td><td>ONE VIDEO SEQUENCE</td><td>RGB IMAGE</td><td>UNKNOWN</td></tr></table>
400
+
401
+ Navier-Stokes Navier-Stokes equations describe the motion of a viscous incompressible field. In this paper, we follow (Li et al., 2021) and generate fluid on a 2D torus with the following equation:
402
+
403
+ $$
404
+ \begin{array}{r} \frac {\partial \mathbf {u}}{\partial t} + (\mathbf {u} \cdot \nabla) \mathbf {u} - \nu \nabla^ {2} \mathbf {u} = - \frac {1}{\rho} \nabla p + \mathbf {g} \\ \nabla \cdot \mathbf {u} = 0 \end{array} \tag {11}
405
+ $$
406
+
407
+ $$
408
+ \nabla \times \mathbf {u} (x, 0) = \omega_ {0} (x), x \in (0, 1) ^ {2},
409
+ $$
410
+
411
+ where $\mathbf{u} \in \mathbb{R}^2$ represents the velocity field, $p$ denotes the pressure, and $\rho$ is the fluid density, which we assumed to be constant in the incompressible fluid field. $\nu \in \mathbb{R}_+$ is the kinematic viscosity representing the intrinsic nature of the fluid, which is assumed to be constant. $\mathbf{g} \in \mathbb{R}^2$ represents the summation of all the external forces applied on the fluid field. Vorticity is calculated by the velocity field, $\omega = \nabla \times \mathbf{u}$ . At time zero, the initial vorticity field $\omega_0$ is given. The goal is to predict the following vorticity fields from given observations.
412
+
413
+ We randomly sampled the initial vorticity $w_{0}$ on a two-dimensional unit torus from a Gaussian distribution and solved the equation with a numerical method to obtain the future velocity field. After generating the fluid field with $256 \times 256$ spatial resolution and $10^{-4}$ second temporal resolution, we downsampled it to a sequence of 1 second per frame and corresponding spatial resolution. Thus, each sequence consists of 20 frames with a total duration of 20 seconds. We fixed the viscosity $\nu = 10^{-5}$ for all three sub-datasets of different resolutions. To verify the model capacity in different resolutions, we generate three subsets ranging from $64 \times 64$ to $256 \times 256$ with 1000 training sequences, 200 validation sequences and 200 test sequences. The goal is to predict the future 10 steps based on the past 10 observations.
414
+
415
+ Bounded N-S In real-world applications, we usually need to handle the complex boundary conditions in fluid prediction. Specifically, suppose a $512 \times 512$ sized two-dimensional space with top and bottom as boundaries, with free space outside the image. We let a randomly colored fluid flow from left to right. To test the model performance under scenarios with complex boundaries, we randomly sampled fifteen circles of different sizes as obstacles and uniformly placed them in the $512 \times 512$ space. Then we used Taichi (Hu et al., 2019) as a simulator engine to generate fluid within top-down boundaries with a numerical fluid solver for the advection equation (Baukal Jr et al., 2000), and generated a sufficiently long sequence with one initial source condition. The generated fluid field contains the Karmen vortex phenomenon (Bayindir & Namli, 2021) with many vortices of various sizes, making this problem extremely challenging.
416
+
417
+ Towards the flow field dataset, after the colored fluid field spreads over the space from left to right, we sample frames in the frequency of 60 steps and add the sampled frames into the dataset. To remove the noise from chromatic aberration, we transform all the samples into grayscale. Then we downsample the image to $128 \times 128$ and split the long sequence into disjoint subsequences with 20 timesteps. After randomly dividing them into train, validation, and test sets, we finally obtained the training, validation, and test set, which contains 1000, 200, and 200 sequences, respectively. The goal is to predict the future 10 steps based on the past 10 observations.
418
+
419
+ ERA5 Z500 We downsampled the geopotential height at $500\mathrm{hPa}$ (Z500) from the ERA5 global reanalysis data to a resolution of $2.5^{\circ}$ , resulting in a grid size of $72\times 144$ . For our experiments, we utilized data from 2013 to 2019 for training, 2020 as validation, and 2021 and 2022 as test sets, obtaining more than 20,000 sequences. To mitigate the influence of geographic location bias on the Z500 predictions, we implemented a normalization technique by subtracting the Z500 values
420
+
421
+ at each location from the corresponding average from 2013 to 2019. The task is to forecast the subsequent 10 frames of data, predicated on the preceding two observations. This equates to a predictive horizon of 30 hours into the future.
422
+
423
+ Sea Temperature We downloaded 20 years of daily mean sea water potential temperature on the sea surface from the reanalysis ocean data (MDS) provided by ECMWF. For experiments, we use cropped $64 \times 64$ temperature data in Atlantic, Indian, and South Pacific for training and validation, to be more exact, from 2000 to 2018 for training with 170,249 sequences and from 2019 to 2020 for validation with 17,758 sequences. Additionally, we use the sea temperature in the North Pacific from 2000 to 2020 for testing, including 65,286 sequences. For each $64 \times 64$ cropped area, we normalize it in spatial and temporal dimensions to ensure the observations are in a standard distribution, which can make the task free from the noises of sudden change and observation errors, and mainly focus on the dynamics modeling. Since there exists the region shift between training and test sets, this benchmark not only requires the model to capture complex dynamics in the ocean but also maintain good generality. The task is to predict the future 10 frames based on the past 10 observations, corresponding to predicting sea surface temperature in the 10 coming days based on 10 past days' observations.
424
+
425
+ Spreading Ink The dataset consists of three open source short videos from (Deng et al., 2023). The length of three videos are 150, 189, and 139, respectively. Following the experiment setting in Vortex (2023), we split the training and test sets in chronological order by the ratio of 2:1 for each video. Given all the training parts, the goal is to predict all the testing frames at once. For example, for the first video, we need to train our model on the first 100 frames and directly adopt this model to predict all the future 50 frames at once, namely the long-term forecasting task. Since the prediction horizon is much longer than other tasks, this problem poses special challenges in handling accumulative errors. Also, for real fluid video datasets, our concerns also include the model's portrayal of motion continuity and the realism of the generated video.
426
+
427
+ # B.2. Implementations
428
+
429
+ In this section, we illustrate the concrete design for incorporating boundary conditions, the aggregation operation, and BFECC with Runge-Kutta Integral within the Multihead Multiscale Integral Architecture.
430
+
431
+ Boundary Conditions Here we detail the implementation of incorporating boundary conditions as a supplementary of Eq. 4. For given boundary conditions $\mathbb{S}$ and the position $\mathbf{r}$ , we calculate the correlation on the intersection between boundary $\mathbb{S}$ and $\mathbf{r}$ neighbour $\mathbf{N}_{\mathbf{r}}$ . Concretely, we multiply the boundary mask $\mathbb{1}_{\mathbb{S}}$ to embedded neighbour feature $\widehat{\mathbf{x}}_{T-1}(\mathbf{r}')$ , that is,
432
+
433
+ $$
434
+ \mathbb {1} _ {\mathbb {S}} \left(\mathbf {r} ^ {\prime}\right) \left(\widehat {\mathbf {x}} _ {T} (\mathbf {r}) \cdot \widehat {\mathbf {x}} _ {T - 1} \left(\mathbf {r} ^ {\prime}\right)\right) = \left(\widehat {\mathbf {x}} _ {T} (\mathbf {r}) \cdot \mathbb {1} _ {\mathbb {S}} \left(\mathbf {r} ^ {\prime}\right) \left(\widehat {\mathbf {x}} _ {T - 1} \left(\mathbf {r} ^ {\prime}\right)\right)\right), \mathbf {r} ^ {\prime} \in \mathbb {V}. \tag {12}
435
+ $$
436
+
437
+ This will preserve the number of neighbor correlation channels, and for $\mathbf{r}' \notin \mathbb{S}$ , the correlation values will be set to zero.
438
+
439
+ Aggregation Operation Given learned deep representations of prediction $\widehat{\mathbf{x}}_{(T + 1)}^{l},\widehat{\mathbf{x}}_{(T + 1)}^{l + 1}$ at the $(l + 1)$ -th and $l$ -th scales, the aggregation operation integrates information between different scales, which can be formalized as follows:
440
+
441
+ $$
442
+ \widehat {\mathbf {x}} _ {(T + 1)} ^ {l} = \mathrm {C o n v} \left(\mathrm {C o n c a t} \left[ \left(\mathrm {U p s a m p l e} \left(\widehat {\mathbf {x}} _ {(T + 1)} ^ {l + 1}\right)\right), \widehat {\mathbf {x}} _ {(T + 1)} ^ {l} \right]\right), l \mathrm {f r o m} (L - 1) \mathrm {t o} 1,
443
+ $$
444
+
445
+ where we use bilinear interpolation for the operator Upsample $(\cdot)$ .
446
+
447
+ BFECC with Runge-Kutta Integral As mentioned in the main text, the second-order Runge-Kutta method can be expressed as $\mathrm{RK2}(\mathbf{r},\mathbf{v}) = \mathbf{r} + \mathbf{v}(\mathbf{r} + \mathbf{v}(\mathbf{r})\frac{\mathrm{d}\mathbf{t}}{2})\mathrm{d}\mathbf{t}$ , where $\mathbf{r}\in \mathbb{R}^{H\times W}$ and $\mathbf{v}\in \mathbb{R}^{2\times H\times W}$ . Relying solely on the Runge-Kutta method for temporal integration may result in error accumulations during advection. To address this issue, BFECC employs a combination of forward and backward integrals, which can be formulated as follows:
448
+
449
+ $$
450
+ \mathbf {r} _ {\mathrm {F o r t h}} ^ {\prime} = \mathrm {R K 2} (\mathbf {r}, \mathbf {v})
451
+ $$
452
+
453
+ $$
454
+ \begin{array}{r} \mathbf {r} _ {\text {B a c k}} ^ {\prime} = \mathrm {R K 2} \left(\mathbf {r} _ {\text {F o r t h}} ^ {\prime}, - \mathbf {v}\right) \\ \mathbf {r} - \mathbf {r} _ {\text {D}} ^ {\prime}. \end{array} \tag {13}
455
+ $$
456
+
457
+ $$
458
+ \tilde {\mathbf {r}} = \mathbf {r} + \frac {\mathbf {r} - \mathbf {r} _ {\mathrm {B a c k}} ^ {\prime}}{2} \tag {13}
459
+ $$
460
+
461
+ $$
462
+ \mathrm {B F E C C} (\mathbf {r}, \mathbf {v}) = \mathrm {R K 2} (\tilde {\mathbf {r}}, \mathbf {v})
463
+ $$
464
+
465
+ For a given point $\mathbf{r}$ , we initially integrate with the velocity vector $\mathbf{v}$ to obtain $\mathbf{r}_{\mathrm{Forth}}^{\prime}$ . Subsequently, we utilize $\mathbf{r}_{\mathrm{Forth}}^{\prime}$ in conjunction with $-\mathbf{v}$ to perform another integral, resulting in $\mathbf{r}_{\mathrm{Back}}^{\prime}$ . The disparity between $\mathbf{r}$ and $\mathbf{r}_{\mathrm{Back}}^{\prime}$ signifies the deviation between forward and backward integrals, with half of this difference employed to correct the initial position $\mathbf{r}$ .
466
+
467
+ # B.3. Metrics and Standard Deviations
468
+
469
+ In all four datasets, we report the mean value of relative L2 of three repeated experiments with different random seeds as a main metric. Experimentally, the standard deviations of relative L2 are smaller than 0.001 for Navier-Stokes, Bounded N-S and Sea temperature and smaller than 0.003 for Spreading Ink. For scientific rigor, we keep four decimal places for all results. For the Sea Temperature dataset, we report the MSE loss following the common practice in meteorological forecasting. For the Spreading Ink dataset, we used VGG Perceptual Loss (Johnson et al., 2016) to measure the realism of the generated fluids. Given $n$ step predictions $\{\widehat{\mathbf{x}}_i\}_{i = 1,\dots ,n}$ and corresponding ground truth $\{\mathbf{x}_i\}_{i = 1,\dots ,n},\widehat{\mathbf{x}}_i,\mathbf{x}_i\in \mathbb{R}^{H\times W}$ , the above-mentioned metrics can be calculated as follows:
470
+
471
+ $$
472
+ \mathrm {M S E} = \frac {1}{n} \sum_ {i = 1} ^ {n} \frac {1}{H \times W} \| \mathbf {x} _ {i} - \widehat {\mathbf {x}} _ {i} \| _ {2} ^ {2}, \mathrm {R e l a t i v e L 2 L o s s} = \frac {\sqrt {\sum_ {i = 1} ^ {n} \| \mathbf {x} _ {i} - \widehat {\mathbf {x}} _ {i} \| _ {2} ^ {2}}}{\sqrt {\sum_ {i = 1} ^ {n} \| \mathbf {x} _ {i} \| _ {2} ^ {2}}}.
473
+ $$
474
+
475
+ Specifically, for the Spreading Ink dataset and Bounded N-S dataset with prescribed boundary conditions $\mathbb{S}$ , we exclusively calculate the loss function within the specified boundary and subsequently report the average. Let $\mathbb{D}$ denote the region inside the container, and thus, MSE and Relative L2 can be computed as follows:
476
+
477
+ $$
478
+ \mathrm {M S E} = \frac {1}{n} \sum_ {i = 1} ^ {n} \frac {1}{| \mathbb {D} |} \sum_ {(j, k) \in \mathbb {D}} (\mathbf {x} _ {i j k} - \widehat {\mathbf {x}} _ {i j k}) ^ {2}, \mathrm {R e l a t i v e L 2 L o s s} = \frac {\sqrt {\sum_ {i = 1} ^ {n} \sum_ {(j , k) \in \mathbb {D}} (\mathbf {x} _ {i j k} - \widehat {\mathbf {x}} _ {i j k}) ^ {2}}}{\sqrt {\sum_ {i = 1} ^ {n} \sum_ {(j , k) \in \mathbb {D}} \mathbf {x} _ {i j k} ^ {2}}},
479
+ $$
480
+
481
+ where $\mathbf{x}_{ijk}$ represents the value at position $(j,k)$ of $i$ -th frame, and $|\mathbb{D}|$ represents the number of grid points in $\mathbb{D}$ .
482
+
483
+ # B.4. Model and Experiment Configurations
484
+
485
+ All the experiments are implemented in PyTorch(Paszke et al., 2019), and conducted on a single NVIDIA A100 40GB GPU. We repeat all the experiments three times with random seeds selected from 0 to 1000 and report the average results. We train the model with Adam optimizer (Kingma & Ba, 2015) for all baselines. See Table 9 for details.
486
+
487
+ Table 9. Experiment configurations in HelmFluid for different benchmarks.
488
+
489
+ <table><tr><td>BENCHMARK</td><td>LEARNING RATE</td><td>BATCH SIZE</td></tr><tr><td>NAVIER-STOKES</td><td>5 × 10-5</td><td>10</td></tr><tr><td>BOUNDED N-S</td><td>5 × 10-5</td><td>5</td></tr><tr><td>ERA5 Z500</td><td>5 × 10-5</td><td>5</td></tr><tr><td>SEA TEMPERATURE</td><td>5 × 10-5</td><td>10</td></tr><tr><td>SPREADING INK</td><td>5 × 10-5</td><td>5</td></tr></table>
490
+
491
+ In this section, we provide a detailed overview of the model configurations for HelmFluid. Given that fluid dynamics vary across different resolutions, we augment the number of scales for larger inputs, as outlined in Table 10. For the Multihead Multiscale Integral Architecture, we adhere to the conventional design principles of U-Net (Ronneberger et al., 2015), incorporating downsampling, upsampling, and the aggregation of multiscale features.
492
+
493
+ Table 10. Hyperparameter configurations of HelmFluid for different resolutions.
494
+
495
+ <table><tr><td>INPUT RESOLUTIONS</td><td>HYPERPARAMETERS</td><td>VALUES</td></tr><tr><td rowspan="4">64 × 64</td><td>NUMBER OF SCALES L</td><td>3</td></tr><tr><td>NUMBER OF HEADS M</td><td>4</td></tr><tr><td>CHANNELS OF DEEP REPRESENTATIONS {d1MODEL, ..., dLMODEL}</td><td>{64,128,128}</td></tr><tr><td>NUMBER OF NEIGHBOURS TO CALCULATE SPATIOTEMPORAL CORRELATIONS |Nr|</td><td>81</td></tr><tr><td rowspan="2">128 × 128</td><td>NUMBER OF SCALES L</td><td>4</td></tr><tr><td>NUMBER OF HEADS M</td><td>4</td></tr><tr><td rowspan="2">256 × 256</td><td>CHANNELS OF DEEP REPRESENTATIONS {d1MODEL, ..., dLMODEL}</td><td>{128,256,512,512}</td></tr><tr><td>NUMBER OF NEIGHBOURS TO CALCULATE SPATIOTEMPORAL CORRELATIONS |Nr|</td><td>81</td></tr></table>
496
+
497
+ # C. Ablation Study
498
+
499
+ As a supplementary analysis to the main text, we perform detailed ablations in the quantitative aspect to validate the impact of learning HelmDynamics and accounting for boundary conditions.
500
+
501
+ # C.1. HelmDynamics Block
502
+
503
+ In this subsection, we will discuss the design of HelmDynamics Block from three perspectives. First, the necessity of learning velocity from HelmDynamics. Second, the effectiveness of potential and stream functions. Third, the usefulness of multilevel modeling, which we mentioned above, enhances the consistency of velocity fields at different scales. We compare the result on the $64 \times 64$ resolution Navier-Stokes dataset and report relative L2, training time, and GPU memory.
504
+
505
+ Learning HelmDynamics or Directly Learning Velocity We provide the results in Figure 13, and compare between learning velocity with HelmDynamics and learning velocity directly. We discover that directly learning the superficial velocity will overwhelm the model from capturing complex fluid interactions. As presented in Table 11, without Helmholtz dynamics, the performance decreases from 0.1261 to 0.1412, demonstrating the effectiveness of our proposed Helmholtz dynamics. In addition, the calculation of HelmDynamics only brings marginal extra computation costs.
506
+
507
+ ![](images/fa4942e232150ae0bce99816fbb8a59959d2c98a080bc46d0816d3b2e93f04db.jpg)
508
+ Ground Truth $(T = 10)$
509
+
510
+ ![](images/b4fe37ac9d09e293eb34b3ac359b1e0bc52dcb14281d3e011977e4a6c9e70ee9.jpg)
511
+ Velocity Learned from HelmDynamics
512
+
513
+ ![](images/07b81f3b61545afa1ed5fd4981199f94e52650afb995d713c38d3737931d3e3b.jpg)
514
+ Figure 13. Velocity field and error comparison between learning by HelmDynamics Block and learning directly.
515
+
516
+ ![](images/7ae3573c62091c08328d97c42612e22f4aee38dae7b210e5f8302a5068900b41.jpg)
517
+ Velocity Learned Directly
518
+ Error with HelmDynamic Block
519
+
520
+ ![](images/9e603db6757afaf9574fd141a1be8008468b4f33c4d3048d5f43219b8d3fb767.jpg)
521
+ Error without HelmDynamic Block
522
+
523
+ ![](images/919a322f745230d597a4d8b427b211937f893c7fd299df811c80af9bb035a7e6.jpg)
524
+
525
+ Table 11. Ablations on dynamics learning in ${64} \times {64}$ Navier-Stokes Dataset.
526
+
527
+ <table><tr><td rowspan="2">METRICS</td><td colspan="2">MULTIHEAD VERSION</td><td colspan="2">SINGLE HEAD VERSION</td></tr><tr><td>VELOCITY</td><td>HELMDYNAMICS</td><td>VELOCITY</td><td>HELMDYNAMICS</td></tr><tr><td>RELATIVE L2</td><td>0.1412</td><td>0.1261</td><td>0.1461</td><td>0.1344</td></tr><tr><td>GPU MEMORY (GB)</td><td>14.86</td><td>16.30</td><td>13.02</td><td>14.41</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>72.18</td><td>80.20</td><td>48.25</td><td>61.22</td></tr></table>
528
+
529
+ Are Both Potential and Stream Functions Effective? As presented in Table 12, only learning potential function or stream function will cause a decrease in the final performance, demonstrating the effectiveness of both components.
530
+
531
+ Table 12. Ablations on learning HelmDynamics, single potential or stream function in ${64} \times {64}$ Navier-Stokes Dataset.
532
+
533
+ <table><tr><td>METRICS</td><td>HELMDYNAMICS</td><td>ONLY POTENTIAL FUNCTION</td><td>ONLY STREAM FUNCTION</td></tr><tr><td>RELATIVE L2</td><td>0.1261</td><td>0.1460</td><td>0.1305</td></tr><tr><td>GPU MEMORY (GB)</td><td>16.30</td><td>16.29</td><td>16.30</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>80.20</td><td>79.57</td><td>79.60</td></tr></table>
534
+
535
+ Learning HelmDynamics in Multiple Scales As presented in Eq. 8, we ensemble the learned HelmDynamics in multiple scales. Here we also provide ablations on just employing HelmDynamics in one single scale in Table 13. We can find that our multiscale design can facilitate the dynamics modeling.
536
+
537
+ Number of neighbors in correlation calculation A larger regional area will provide more information for spatiotemporal correlation calculation. In this paper, we choose $|\mathbf{N_r}|$ as $9\times 9$ . Here in Table 14, we also compared with $7\times 7$ , $5\times 5$ , and $3\times 3$ . The model parameters are quite close for several neighbor sizes, but the best performance is obtained for $9\times 9$ .
538
+
539
+ Table 13. Ablations on learning HelmDynamics in multiple or single scales.
540
+
541
+ <table><tr><td>METRICS</td><td>MULTIPLE SCALES</td><td>SINGLE SCALE (BOTTOM)</td><td>SINGLE SCALE (TOP)</td></tr><tr><td>RELATIVE L2</td><td>0.1261</td><td>0.1441</td><td>0.1798</td></tr><tr><td>GPU MEMORY (GB)</td><td>16.30</td><td>8.80</td><td>11.68</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>80.20</td><td>30.69</td><td>45.32</td></tr></table>
542
+
543
+ Table 14. Ablations on the number of neighbors in correlation calculation.
544
+
545
+ <table><tr><td>NUMBER OF NEIGHBOURS IN CORRELATION |Nr|</td><td>3×3</td><td>5×5</td><td>7×7</td><td>9×9</td></tr><tr><td>PARAMETER NUMBER</td><td>9,825,421</td><td>9,848,461</td><td>9,883,021</td><td>9,929,101</td></tr><tr><td>RELATIVE L2</td><td>0.1337</td><td>0.1273</td><td>0.1272</td><td>0.1261</td></tr></table>
546
+
547
+ # C.2. Boundary Conditions
548
+
549
+ In this subsection, we discuss the design for boundary condition in correlation calculation, compare the result on the Bounded N-S dataset, and report relative L2, training time and GPU memory. As shown in Figure 14, while omitting boundary conditions, the learned velocities are perpendicular to the boundary, leading to discontinuous predictions. We present the quantitative results in Table 15, without input boundary condition, the performance drops seriously, indicating the necessity of our design in HelmDyanmics. It is also notable that as a flexible module, it is quite convenient to incorporate boundary conditions into the HelmDyanmics block, which is also a unique advantage of our model against others.
550
+
551
+ ![](images/818f46001e1571911cac86dd3d63f15555c047df4efae2fa2b8d11c20845ee9e.jpg)
552
+ Ground Truth (T=10)
553
+
554
+ ![](images/5f90d5a6cebde7a57d719948a34252fec6fc5122e6e4de5a7450bf0e7e0642fe.jpg)
555
+ Without Boundary
556
+
557
+ ![](images/25344e6987e343ec7e964d9f8eda00df4c39b05dca64a867cea2e45d227717c1.jpg)
558
+ With Boundary
559
+ Figure 14. Velocity field and error comparison between learning by HelmDynamics Block and learning directly.
560
+
561
+ ![](images/285b2bf5142fe5774c64c304586ce3e6cb3b44e3841e72c5ea0195bf2705ff95.jpg)
562
+ Ground Truth
563
+
564
+ ![](images/4cf3327a784c1e05084d3a80a042b0b7ff552a7082699b6ce30d2854a1f6ad02.jpg)
565
+ Error without Boundary Test L2:0.0846
566
+
567
+ ![](images/21694e1c65e2cfc64af5ef51935f6499a0aa5437e419b1f7084ea9e497447f43.jpg)
568
+ Error with Boundary Test L2:0.0652
569
+
570
+ ![](images/58871f8ad26d002156353f544e90a7d2566260d2590262c4117183614c16e69a.jpg)
571
+
572
+ Table 15. Ablations on boundary conditions in the Bounded N-S dataset.
573
+
574
+ <table><tr><td>METRICS</td><td>OMITTING BOUNDARY CONDITIONS</td><td>USING BOUNDARY CONDITIONS</td></tr><tr><td>RELATIVE L2</td><td>0.0846</td><td>0.0652</td></tr><tr><td>GPU MEMORY (GB)</td><td>26.98</td><td>29.48</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>226.20</td><td>267.63</td></tr></table>
575
+
576
+ # C.3. Multiscale Multihead Integral Architecture
577
+
578
+ We include a summary of ablations for multiscale multihead integral architecture in Table 16, including order of runge-kutta for temporal integral, number of heads and number of scales in multiscale multihead integral architecture. We compare the results on the Navier-Stokes dataset of $64 \times 64$ resolution and report relative L2, training time, and GPU memory.
579
+
580
+ Order of Runge-Kutta for temporal integral Runge-Kutta methods are widely employed for iteratively solving PDEs. The accuracy of the results increases with a higher number of orders but at the cost of additional computation time. In HelmFluid, the accuracy of prediction results is contingent on the precision of the velocity obtained through HelmDynamics blocks. According to our experiments, the second-order Runge-Kutta method is already sufficient for temporal integral, while less order leads to inaccuracies, and more order leads to about $10\%$ more training time. Thus, we choose the second-order Runge-Kutta for integral to trade off performance and efficiency.
581
+
582
+ Number of heads in multihead modeling Adding heads is a convention to augment model capacity (Vaswani et al., 2017), and in fluid prediction, different heads can capture different dynamic patterns. In this paper, adding heads also means more operations in conducting integral. We set $M$ as 4 for a good balance of running time and performance.
583
+
584
+ Table 16. Model performances on Navier-Stokes Dataset of ${64} \times {64}$ resolution with different selections for orders of Runge-Kutta, number of neighbors in correlations, number of heads and number of scales in multiscale multihead integral architecture.
585
+ The red marked hyperparameter represents the final configuration of HelmFluid.
586
+
587
+ <table><tr><td>ORDER OF RUNGE-KUTTA</td><td>1</td><td>2</td><td>3</td><td>4</td></tr><tr><td>RELATIVE L2</td><td>0.1298</td><td>0.1261</td><td>0.1268</td><td>0.1278</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>80.04</td><td>81.20</td><td>88.30</td><td>90.49</td></tr><tr><td>NUMBER OF HEADS M</td><td>1</td><td>4</td><td>8</td><td>16</td></tr><tr><td>PARAMETER NUMBER</td><td>11,063,245</td><td>9,929,101</td><td>9,812,653</td><td>9,762,205</td></tr><tr><td>RELATIVE L2</td><td>0.1344</td><td>0.1261</td><td>0.1279</td><td>0.1249</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>59.69</td><td>81.20</td><td>120.86</td><td>171.97</td></tr><tr><td>NUMBER OF SCALES L</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>PARAMETER NUMBER</td><td>9,283,977</td><td>9,929,101</td><td>15,906,193</td><td>29,820,309</td></tr><tr><td>RELATIVE L2</td><td>0.1514</td><td>0.1261</td><td>0.1361</td><td>0.1330</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>64.43</td><td>81.20</td><td>99.83</td><td>120.06</td></tr></table>
588
+
589
+ Number of scales in multiscale modeling This hyperparameter is highly related to the nature of fluid. Considering both model efficiency and fluid dynamics, we choose $L$ as 3 for $64 \times 64$ inputs and 4 for larger inputs.
590
+
591
+ # C.4. Sensitivity to the Number of Parameters
592
+
593
+ We also add the sensitivity analysis to the number of parameters on the $64 \times 64$ Navier-Stokes dataset in Table 17. We report the results of changing the channels of deep representations to a half and twice the original channels. These results show that the original configuration can achieve a favorable balance between performance of efficiency.
594
+
595
+ Table 17. Ablations on the number of parameters.
596
+
597
+ <table><tr><td>CHANNELS COMPARED TO THE OFFICIAL CONFIGURATION</td><td>1/2</td><td>1</td><td>2</td></tr><tr><td>RELATIVE L2</td><td>0.1380</td><td>0.1261</td><td>0.1242</td></tr><tr><td>GPU MEMORY (GB)</td><td>9.64</td><td>16.30</td><td>29.99</td></tr><tr><td>RUNNING TIME (S / EPOCH)</td><td>75.10</td><td>80.20</td><td>112.13</td></tr><tr><td>#PARAMETER</td><td>2,516,173</td><td>9,929,101</td><td>39,446,029</td></tr></table>
598
+
599
+ # D. Additional Results
600
+
601
+ # D.1. Efficiency comparison
602
+
603
+ Efficiency for different models In the main text, we presented an efficiency comparison through plots. Here, we provide detailed quantitative results in Table 18 as a supplementary reference.
604
+
605
+ Table 18. Efficiency comparison between six deep models on Naiver-Stokes ${64} \times {64}$ dataset,where we fixed the batch size to 10 .
606
+
607
+ <table><tr><td>MODELS</td><td>HELMFLUID</td><td>U-NET</td><td>FNO</td><td>MWT</td><td>U-NO</td><td>LSM</td></tr><tr><td>#PARAMETER</td><td>9,929,101</td><td>17,312,650</td><td>1,188,641</td><td>7,989,593</td><td>61,157,793</td><td>19,188,033</td></tr><tr><td>TRAINING TIME (S / EPOCH)</td><td>80.20</td><td>46.29</td><td>18.91</td><td>90.02</td><td>103.82</td><td>44.49</td></tr><tr><td>RELATIVE L2</td><td>0.1261</td><td>0.1982</td><td>0.1556</td><td>0.1586</td><td>0.1435</td><td>0.1535</td></tr></table>
608
+
609
+ Align model size It's important to note that all baseline models are reproduced using their official configurations from their respective papers, which might lead to an unbalanced model size issue. To ensure a fair comparison, we also scale up
610
+
611
+ the parameters of FNO and compare it with HelmFluid. Refer to Table 19 for the results. Notably, even with an increased parameter size comparable to HelmFluid, FNO still exhibits inferior performance.
612
+
613
+ Table 19. Align model size in ${64} \times {64}$ Navier-Stokes.
614
+
615
+ <table><tr><td>RELATIVE L2</td><td>FNO</td><td>FNO (ENLARGED)</td><td>HELMFLUID</td></tr><tr><td>64 × 64 NAVIER-STOKES</td><td>0.1556</td><td>0.1524</td><td>0.1261</td></tr><tr><td>128 × 128 NAVIER-STOKES</td><td>0.1028</td><td>0.1025</td><td>0.0807</td></tr><tr><td>256 × 256 NAVIER-STOKES</td><td>0.1645</td><td>0.1474</td><td>0.1310</td></tr><tr><td>BOUNDED N-S</td><td>0.1176</td><td>0.1116</td><td>0.0652</td></tr><tr><td>SEA TEMPERATURE</td><td>0.1935</td><td>0.1958</td><td>0.1704</td></tr><tr><td>VIDEO 1</td><td>0.1709</td><td>0.1872</td><td>0.1399</td></tr><tr><td>VIDEO 2</td><td>0.4864</td><td>0.5250</td><td>0.3565</td></tr><tr><td>VIDEO 3</td><td>0.1756</td><td>0.1676</td><td>0.1584</td></tr><tr><td>MODEL PARAMETER</td><td>1,188,641</td><td>10,633,265</td><td>9,929,101</td></tr></table>
616
+
617
+ # D.2. Full Results for Spreading Ink
618
+
619
+ We reported the averaged metrics on Spreading Ink dataset. Here, we detail the metrics on three sub-datasets respectively in Table 20. Except Relative L2 and MSE are worse than U-Net on Video3, HelmFluid consistently outperforms other models on the other metrics. However, images generated by U-Net appear fragmented, worse than HelmFluid from a visual perspective. Additionally, we present the showcases of three sub-datasets in Figure 25, 26 and 27.
620
+
621
+ Table 20. Model comparison on Spreading Ink for each video. Perceptual loss, Relative L2 and MSE are reported.
622
+
623
+ <table><tr><td>MODEL</td><td>VIDEO1</td><td>VIDEO2</td><td>VIDEO3</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>1.500 / 0.1544 / 0.0080</td><td>3.982 / 0.4780 / 0.0330</td><td>5.307 / 0.1535 / 0.0119</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>2.023 / 0.1709 / 0.0097</td><td>4.732 / 0.4864 / 0.0342</td><td>5.531 / 0.1756 / 0.0156</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>4.210 / 0.1792 / 0.0106</td><td>6.204 / 0.5312 / 0.0408</td><td>6.397 / 0.1810 / 0.0166</td></tr><tr><td>VORTEX (DENG ET AL., 2023)</td><td>1.704 / 0.1580 / 0.0083</td><td>4.171 / 0.4150 / 0.0249</td><td>5.973 / 0.1718 / 0.0150</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>1.666 / 0.1592 / 0.0084</td><td>4.167 / 0.4890 / 0.0346</td><td>5.448 / 0.1611 / 0.0132</td></tr><tr><td>HELMFLUID (OURS)</td><td>1.464 / 0.1399 / 0.0065</td><td>3.296 / 0.3565 / 0.0184</td><td>5.208 / 0.1584 / 0.0127</td></tr></table>
624
+
625
+ # D.3. Align baselines in all benchmarks
626
+
627
+ As we stated in Section 4, some of the baselines are not suitable for part of the benchmarks, specifically Vortex (Deng et al., 2023), DARTS (Ruzanski et al., 2011), PwC-Net with fluid Refinement (Sun et al., 2018) and MWT (Gupta et al., 2021), which means their performance will degenerate seriously or the running time is extremely slow if we stiffly apply them to all benchmarks. Specifically, due to the special design for temporal information in Vortex, we only compare it in the Spreading Ink dataset in the main text. As for the DARTS, since it is designed for the mass field and not applicable for videos with RGB channels, we do not include it in the Spreading Ink dataset. Besides, PwC-Net with fluid Refinement (Zhang et al., 2022) is proposed to learn the optical flow for fluid, which suffers from the accumulative error, making it far inferior to other methods. Thus, we only compare PwC-Net in the learning velocity field in the main text.
628
+
629
+ However, we still provide the missing experiments in Table 21 to ensure transparency.
630
+
631
+ - Vortex (Deng et al., 2023) models multiple vortex trajectories as a function of time. Since different video sequences have inherently different vortex trajectories, we need to re-train Vortex to fit every video sequence. However, the other three benchmarks except Spreading Ink, have more than 1000 different video sequences. It means that we need to train $1000+$ Vortex models for these benchmarks, which is unacceptable. But we still implement this experiment, where we train one vortex model on one single video sequence and generalize it to others.
632
+ - Due to the slow movement of the spreading ink dataset, DARTS (Ruzanski et al., 2011) showed outstanding quantitative results. However, it fails to predict the correct future in the other three datasets. Moreover, DARTS method solves the least squares problem in the frequency domain for every case, which will bring huge computation costs. In particular,
633
+
634
+ Table 21. Align baselines in all benchmarks, including DARTS (Ruzanski et al., 2011), adapted version of PWC-Net (Sun et al., 2018), MWT (Gupta et al., 2021), Vortex (Deng et al., 2023). We report Relative L2 for the Navier-Stokes dataset and Bounded N-S dataset, MSE and relative L2 for the Sea Temperature dataset, and Perceptual loss, Relative L2 and MSE for Spreading Ink.
635
+
636
+ <table><tr><td></td><td>NAVIER-STOKES</td><td>BOUNDED N-S</td><td>SEA TEMPERATURE</td><td>SPREADING INK (VIDEO 3)</td></tr><tr><td>DARTS</td><td>0.8046</td><td>0.1820</td><td>0.3308 / 0.1094</td><td>4.940 / 0.1601 / 0.0130</td></tr><tr><td>PWC-UNET</td><td>0.1765</td><td>0.0729</td><td>0.1805 / 0.0406</td><td>5.341 / 0.1591 / 0.0128</td></tr><tr><td>MWT</td><td>0.1586</td><td>0.1407</td><td>0.2075 / 0.0510</td><td>1.521 / 0.1775 / 0.0160</td></tr><tr><td>VORTEX</td><td>8.1379</td><td>1.6259</td><td>4.9302 / 0.1796</td><td>5.973 / 0.1718 / 0.0150</td></tr><tr><td>HELMFLUID</td><td>0.1261</td><td>0.0652</td><td>0.1704 / 0.0368</td><td>5.208 / 0.1584 / 0.0127</td></tr></table>
637
+
638
+ the other deep methods predict the whole sequence in less than 0.1 seconds, while DARTS takes more than 10 seconds. Also, the changes in estimated velocity are very slight with the change of time, which leads to incorrect location estimation. And the extrapolation causes blurring in long-term prediction.
639
+
640
+ - PWC-Net (Sun et al., 2018) specifically focuses on estimating velocity between adjacent observations. Initially, we attempted to extrapolate predictions using the estimated velocity field, but this approach resulted in severe distortion. To harness the estimated velocity more effectively, we input both the velocity and observations into a U-Net (Ronneberger et al., 2015), yielding improved results denoted as PWC-UNet in Table 21. Despite the enhancement provided by the estimated velocity from PWC-Net, U-Net still falls short compared to HelmFluid.
641
+ - MWT (Gupta et al., 2021) predict the future frames based on wavelet analysis. It fails in long-term prediction. The prediction on video 3 of Spreading Ink (Figure 15) shows that as the prediction time gets longer, the prediction image stays at the same position and appears weird texture.
642
+
643
+ ![](images/d5e051645a2796c1385147e96d30e91a1aa387382828add6a8d9b44cd32199ed.jpg)
644
+ Figure 15. Showcases of HelmFluid, DARTS, and MWT on the Spread Ink dataset.
645
+
646
+ # D.4. Performance on turbulence dataset
647
+
648
+ To effectively show the model performance in handling turbulent fluid, we assess HelmFluid and other baseline models using a turbulence dataset with dimensions of $64 \times 64$ (Wang et al., 2019). This dataset comprises 6000 sequences for training, 1700 for validation, and 2100 for testing. The objective is to predict subsequent velocity fields based on preceding observations. For optimal performance on the dataset, all models are trained with an input sequence of 25 timesteps and evaluated over 20 timesteps. The results are presented in Table 22.
649
+
650
+ Table 22. Performance on turbulence dataset.
651
+
652
+ <table><tr><td>TURBULENCE DATASET</td><td>MSE</td></tr><tr><td>U-NET (RONNEBERGER ET AL., 2015)</td><td>1062.13</td></tr><tr><td>TF-NET (WANG ET AL., 2019)</td><td>1061.78</td></tr><tr><td>FNO (LI ET AL., 2021)</td><td>1187.44</td></tr><tr><td>U-NO (RAHMAN ET AL., 2023)</td><td>3276.09</td></tr><tr><td>LSM (WU ET AL., 2023)</td><td>1069.26</td></tr><tr><td>HELMFLUID</td><td>1042.38</td></tr></table>
653
+
654
+ # E. More Showcases
655
+
656
+ As a supplement to the main text, we provide more showcases here for comparison (Figure 16-27). Videos are provided in Supplementary Materials.
657
+
658
+ ![](images/bdfcd5e235a0b70a0e9c66b34956364dc3dab86ecf704a9e576f0b8061a52caa.jpg)
659
+ Figure 16. Showcases of the Navier-Stokes dataset with resolution of $64 \times 64$ .
660
+
661
+ ![](images/a8c77f389f76ff2136adc27d04b8b1570e50d5df22d5d4b4248b9c8146ac38e9.jpg)
662
+ Figure 17. Showcases of the Navier-Stokes dataset with resolution of $128 \times 128$ .
663
+
664
+ ![](images/b9bfd794b7ecba08ba1d620d58f597e67e1133f9e3060d0f2fce2e6544362b79.jpg)
665
+ Figure 18. Showcases of the Navier-Stokes dataset with resolution of $256 \times 256$ .
666
+
667
+ ![](images/cf011b18edc68de02b447e7fdeba45eb6c6eb8c57c7b4da6c05b136f3f41538d.jpg)
668
+ Figure 19. Showcases of HelmFluid on Navier-Stokes dataset with resolution $64 \times 64$ and $128 \times 128$ .
669
+
670
+ ![](images/939a72f42c616531849dad05f15eff0cb2d3611a7b8206a6815b3e543403e48f.jpg)
671
+ Figure 20. Showcases of the Bounded N-S dataset.
672
+
673
+ ![](images/38f262157e5d76eb2e823ec521e6324d6ea3f497013a9a1fb3ec7432d6fde094.jpg)
674
+ Figure 21. Showcases of HelmFluid on the Bounded N-S dataset.
675
+
676
+ ![](images/9a44b1bab466fd5227a86d2488513351dcfd3f5d58b1179997d7e2535ed89e93.jpg)
677
+ Figure 22. Showcases of the ERA5 Z500 dataset.
678
+
679
+ ![](images/0610a8b53c90eba240d8922b6e3adbe3e428612d30f1b120bd7fb429a37da3ab.jpg)
680
+ Figure 23. Showcases of the Sea Temperature dataset.
681
+
682
+ ![](images/409d3ad7eab58cb89e558104c26d676111de811e0788bd517aad389cd3b4e2e4.jpg)
683
+ Figure 24. Showcases of HelmFluid on the Sea Temperature dataset.
684
+
685
+ ![](images/654bb8b4a71785c9ae72c647f9e03420efe226e70e13f3e1b25b7f3d3ae92627.jpg)
686
+ Figure 25. Showcases of the Spreading Ink dataset (Video 1).
687
+
688
+ ![](images/90e9e613fcc5f36113a21d73372bb8ed0cf3c6129268cc5ac79492846c78e918.jpg)
689
+ Figure 26. Showcases of the Spreading Ink dataset (Video 2).
690
+
691
+ ![](images/45cd0bc33d028a53ed8617c3826bc770cb685cd5938d64c31efefcba08e6a42d.jpg)
692
+ Figure 27. Showcases of the Spreading Ink dataset (Video 3).
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf6e789d69e15145469145be3b3cf04816e898c4895bbe48552c2ccf2f0f44bd
3
+ size 3084694
2024/HelmFluid_ Learning Helmholtz Dynamics for Interpretable Fluid Prediction/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Helpful or Harmful Data_ Fine-tuning-free Shapley Attribution for Explaining Language Model Predictions/b1ddfa18-ac96-4b0f-9928-8bc3d49a0c40_content_list.json ADDED
The diff for this file is too large to render. See raw diff