Chelsea707 commited on
Commit
0b021ca
·
verified ·
1 Parent(s): 628c90e

Add Batch 2be2eb24-d137-4c16-aa39-ca4379c74085 data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +64 -0
  2. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_content_list.json +0 -0
  3. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_model.json +0 -0
  4. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_origin.pdf +3 -0
  5. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/full.md +628 -0
  6. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/images.zip +3 -0
  7. 2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/layout.json +0 -0
  8. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_content_list.json +0 -0
  9. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_model.json +0 -0
  10. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_origin.pdf +3 -0
  11. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/full.md +0 -0
  12. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/images.zip +3 -0
  13. 2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/layout.json +0 -0
  14. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_content_list.json +0 -0
  15. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_model.json +0 -0
  16. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_origin.pdf +3 -0
  17. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/full.md +493 -0
  18. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/images.zip +3 -0
  19. 2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/layout.json +0 -0
  20. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_content_list.json +0 -0
  21. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_model.json +0 -0
  22. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_origin.pdf +3 -0
  23. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/full.md +0 -0
  24. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/images.zip +3 -0
  25. 2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/layout.json +0 -0
  26. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_content_list.json +0 -0
  27. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_model.json +0 -0
  28. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_origin.pdf +3 -0
  29. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/full.md +0 -0
  30. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/images.zip +3 -0
  31. 2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/layout.json +0 -0
  32. 2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_content_list.json +0 -0
  33. 2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_model.json +0 -0
  34. 2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_origin.pdf +3 -0
  35. 2024/Balanced Resonate-and-Fire Neurons/full.md +649 -0
  36. 2024/Balanced Resonate-and-Fire Neurons/images.zip +3 -0
  37. 2024/Balanced Resonate-and-Fire Neurons/layout.json +0 -0
  38. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_content_list.json +0 -0
  39. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_model.json +0 -0
  40. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_origin.pdf +3 -0
  41. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/full.md +0 -0
  42. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/images.zip +3 -0
  43. 2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/layout.json +0 -0
  44. 2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_content_list.json +0 -0
  45. 2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_model.json +0 -0
  46. 2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_origin.pdf +3 -0
  47. 2024/Balancing Similarity and Complementarity for Federated Learning/full.md +617 -0
  48. 2024/Balancing Similarity and Complementarity for Federated Learning/images.zip +3 -0
  49. 2024/Balancing Similarity and Complementarity for Federated Learning/layout.json +0 -0
  50. 2024/Barrier Algorithms for Constrained Non-Convex Optimization/980db8ed-3d0a-452d-9db6-34115c4de8fb_content_list.json +0 -0
.gitattributes CHANGED
@@ -3628,3 +3628,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
3628
  2024/BECoTTA_[[:space:]]Input-dependent[[:space:]]Online[[:space:]]Blending[[:space:]]of[[:space:]]Experts[[:space:]]for[[:space:]]Continual[[:space:]]Test-time[[:space:]]Adaptation/b231a0e3-1da2-4fa3-b7f2-1add99b3becf_origin.pdf filter=lfs diff=lfs merge=lfs -text
3629
  2024/BLO-SAM_[[:space:]]Bi-level[[:space:]]Optimization[[:space:]]Based[[:space:]]Finetuning[[:space:]]of[[:space:]]the[[:space:]]Segment[[:space:]]Anything[[:space:]]Model[[:space:]]for[[:space:]]Overfitting-Preventing[[:space:]]Semantic[[:space:]]Segmentation/af3e77a7-820b-4c87-987c-2c80e373a320_origin.pdf filter=lfs diff=lfs merge=lfs -text
3630
  2024/BOtied_[[:space:]]Multi-objective[[:space:]]Bayesian[[:space:]]optimization[[:space:]]with[[:space:]]tied[[:space:]]multivariate[[:space:]]ranks/3b9d52f6-4d49-4dbf-929c-d1ac2591c12c_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3628
  2024/BECoTTA_[[:space:]]Input-dependent[[:space:]]Online[[:space:]]Blending[[:space:]]of[[:space:]]Experts[[:space:]]for[[:space:]]Continual[[:space:]]Test-time[[:space:]]Adaptation/b231a0e3-1da2-4fa3-b7f2-1add99b3becf_origin.pdf filter=lfs diff=lfs merge=lfs -text
3629
  2024/BLO-SAM_[[:space:]]Bi-level[[:space:]]Optimization[[:space:]]Based[[:space:]]Finetuning[[:space:]]of[[:space:]]the[[:space:]]Segment[[:space:]]Anything[[:space:]]Model[[:space:]]for[[:space:]]Overfitting-Preventing[[:space:]]Semantic[[:space:]]Segmentation/af3e77a7-820b-4c87-987c-2c80e373a320_origin.pdf filter=lfs diff=lfs merge=lfs -text
3630
  2024/BOtied_[[:space:]]Multi-objective[[:space:]]Bayesian[[:space:]]optimization[[:space:]]with[[:space:]]tied[[:space:]]multivariate[[:space:]]ranks/3b9d52f6-4d49-4dbf-929c-d1ac2591c12c_origin.pdf filter=lfs diff=lfs merge=lfs -text
3631
+ 2024/BRAIn_[[:space:]]Bayesian[[:space:]]Reward-conditioned[[:space:]]Amortized[[:space:]]Inference[[:space:]]for[[:space:]]natural[[:space:]]language[[:space:]]generation[[:space:]]from[[:space:]]feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_origin.pdf filter=lfs diff=lfs merge=lfs -text
3632
+ 2024/BWS_[[:space:]]Best[[:space:]]Window[[:space:]]Selection[[:space:]]Based[[:space:]]on[[:space:]]Sample[[:space:]]Scores[[:space:]]for[[:space:]]Data[[:space:]]Pruning[[:space:]]across[[:space:]]Broad[[:space:]]Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_origin.pdf filter=lfs diff=lfs merge=lfs -text
3633
+ 2024/BadPart_[[:space:]]Unified[[:space:]]Black-box[[:space:]]Adversarial[[:space:]]Patch[[:space:]]Attacks[[:space:]]against[[:space:]]Pixel-wise[[:space:]]Regression[[:space:]]Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_origin.pdf filter=lfs diff=lfs merge=lfs -text
3634
+ 2024/Bagged[[:space:]]Deep[[:space:]]Image[[:space:]]Prior[[:space:]]for[[:space:]]Recovering[[:space:]]Images[[:space:]]in[[:space:]]the[[:space:]]Presence[[:space:]]of[[:space:]]Speckle[[:space:]]Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_origin.pdf filter=lfs diff=lfs merge=lfs -text
3635
+ 2024/Balanced[[:space:]]Data,[[:space:]]Imbalanced[[:space:]]Spectra_[[:space:]]Unveiling[[:space:]]Class[[:space:]]Disparities[[:space:]]with[[:space:]]Spectral[[:space:]]Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_origin.pdf filter=lfs diff=lfs merge=lfs -text
3636
+ 2024/Balanced[[:space:]]Resonate-and-Fire[[:space:]]Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_origin.pdf filter=lfs diff=lfs merge=lfs -text
3637
+ 2024/Balancing[[:space:]]Feature[[:space:]]Similarity[[:space:]]and[[:space:]]Label[[:space:]]Variability[[:space:]]for[[:space:]]Optimal[[:space:]]Size-Aware[[:space:]]One-shot[[:space:]]Subset[[:space:]]Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_origin.pdf filter=lfs diff=lfs merge=lfs -text
3638
+ 2024/Balancing[[:space:]]Similarity[[:space:]]and[[:space:]]Complementarity[[:space:]]for[[:space:]]Federated[[:space:]]Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_origin.pdf filter=lfs diff=lfs merge=lfs -text
3639
+ 2024/Barrier[[:space:]]Algorithms[[:space:]]for[[:space:]]Constrained[[:space:]]Non-Convex[[:space:]]Optimization/980db8ed-3d0a-452d-9db6-34115c4de8fb_origin.pdf filter=lfs diff=lfs merge=lfs -text
3640
+ 2024/Batch[[:space:]]Singular[[:space:]]Value[[:space:]]Polarization[[:space:]]and[[:space:]]Weighted[[:space:]]Semantic[[:space:]]Augmentation[[:space:]]for[[:space:]]Universal[[:space:]]Domain[[:space:]]Adaptation/8b55c033-c4c9-48da-85a3-5da2e3623d44_origin.pdf filter=lfs diff=lfs merge=lfs -text
3641
+ 2024/Batch[[:space:]]and[[:space:]]match_[[:space:]]black-box[[:space:]]variational[[:space:]]inference[[:space:]]with[[:space:]]a[[:space:]]score-based[[:space:]]divergence/fc47c116-028b-47db-a6b0-8d0c2b3fbdd5_origin.pdf filter=lfs diff=lfs merge=lfs -text
3642
+ 2024/BayOTIDE_[[:space:]]Bayesian[[:space:]]Online[[:space:]]Multivariate[[:space:]]Time[[:space:]]Series[[:space:]]Imputation[[:space:]]with[[:space:]]Functional[[:space:]]Decomposition/2ddf436e-b74f-4f05-8cc1-b099d4a9e436_origin.pdf filter=lfs diff=lfs merge=lfs -text
3643
+ 2024/Bayesian[[:space:]]Adaptation[[:space:]]of[[:space:]]Network[[:space:]]Depth[[:space:]]and[[:space:]]Width[[:space:]]for[[:space:]]Continual[[:space:]]Learning/4cbfbdf3-8364-4385-8be4-a401c61db103_origin.pdf filter=lfs diff=lfs merge=lfs -text
3644
+ 2024/Bayesian[[:space:]]Design[[:space:]]Principles[[:space:]]for[[:space:]]Offline-to-Online[[:space:]]Reinforcement[[:space:]]Learning/cb8f7d82-5c6f-4c03-9e19-5529006d84ec_origin.pdf filter=lfs diff=lfs merge=lfs -text
3645
+ 2024/Bayesian[[:space:]]Exploration[[:space:]]Networks/a04bc1d3-d628-4722-b665-088fadb77a51_origin.pdf filter=lfs diff=lfs merge=lfs -text
3646
+ 2024/Bayesian[[:space:]]Knowledge[[:space:]]Distillation_[[:space:]]A[[:space:]]Bayesian[[:space:]]Perspective[[:space:]]of[[:space:]]Distillation[[:space:]]with[[:space:]]Uncertainty[[:space:]]Quantification/9fa97dc6-3e4c-49ea-9ae5-d8c5e0458e52_origin.pdf filter=lfs diff=lfs merge=lfs -text
3647
+ 2024/Bayesian[[:space:]]Optimization[[:space:]]of[[:space:]]Function[[:space:]]Networks[[:space:]]with[[:space:]]Partial[[:space:]]Evaluations/9b3bbd9f-a5f7-496c-b5fb-a2b7d24112f7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3648
+ 2024/Bayesian[[:space:]]Power[[:space:]]Steering_[[:space:]]An[[:space:]]Effective[[:space:]]Approach[[:space:]]for[[:space:]]Domain[[:space:]]Adaptation[[:space:]]of[[:space:]]Diffusion[[:space:]]Models/4e2aa49c-2490-438e-9db3-e820ab599f84_origin.pdf filter=lfs diff=lfs merge=lfs -text
3649
+ 2024/Bayesian[[:space:]]Program[[:space:]]Learning[[:space:]]by[[:space:]]Decompiling[[:space:]]Amortized[[:space:]]Knowledge/0d4d79cc-e8f2-427a-b784-d4ccd6f22606_origin.pdf filter=lfs diff=lfs merge=lfs -text
3650
+ 2024/Bayesian[[:space:]]Regret[[:space:]]Minimization[[:space:]]in[[:space:]]Offline[[:space:]]Bandits/2a629afb-52ca-4ccd-834a-02667b7c8a4b_origin.pdf filter=lfs diff=lfs merge=lfs -text
3651
+ 2024/Bayesian[[:space:]]Uncertainty[[:space:]]for[[:space:]]Gradient[[:space:]]Aggregation[[:space:]]in[[:space:]]Multi-Task[[:space:]]Learning/51fabc9c-f61c-4a2b-a9a9-1a9888fbc4e6_origin.pdf filter=lfs diff=lfs merge=lfs -text
3652
+ 2024/Be[[:space:]]Your[[:space:]]Own[[:space:]]Neighborhood_[[:space:]]Detecting[[:space:]]Adversarial[[:space:]]Examples[[:space:]]by[[:space:]]the[[:space:]]Neighborhood[[:space:]]Relations[[:space:]]Built[[:space:]]on[[:space:]]Self-Supervised[[:space:]]Learning/3a089b8c-286c-43f2-ad07-d92fdf33491f_origin.pdf filter=lfs diff=lfs merge=lfs -text
3653
+ 2024/Behavior[[:space:]]Generation[[:space:]]with[[:space:]]Latent[[:space:]]Actions/19941686-3e39-4466-bee4-9ad909b9b0ba_origin.pdf filter=lfs diff=lfs merge=lfs -text
3654
+ 2024/BeigeMaps_[[:space:]]Behavioral[[:space:]]Eigenmaps[[:space:]]for[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]from[[:space:]]Images/5f930ab7-9fc9-4acc-b997-1e55576d232c_origin.pdf filter=lfs diff=lfs merge=lfs -text
3655
+ 2024/Benchmarking[[:space:]]Deletion[[:space:]]Metrics[[:space:]]with[[:space:]]the[[:space:]]Principled[[:space:]]Explanations/7c189274-98e1-4af1-8c9d-2b88f0a17579_origin.pdf filter=lfs diff=lfs merge=lfs -text
3656
+ 2024/Benchmarking[[:space:]]and[[:space:]]Building[[:space:]]Long-Context[[:space:]]Retrieval[[:space:]]Models[[:space:]]with[[:space:]]LoCo[[:space:]]and[[:space:]]M2-BERT/a0d4e637-d38d-401c-9b41-a06a552d7488_origin.pdf filter=lfs diff=lfs merge=lfs -text
3657
+ 2024/Benign[[:space:]]Overfitting[[:space:]]in[[:space:]]Adversarial[[:space:]]Training[[:space:]]of[[:space:]]Neural[[:space:]]Networks/eb755888-75b6-4cc0-aa9d-a390f7a6c188_origin.pdf filter=lfs diff=lfs merge=lfs -text
3658
+ 2024/Benign[[:space:]]Overfitting[[:space:]]in[[:space:]]Two-Layer[[:space:]]ReLU[[:space:]]Convolutional[[:space:]]Neural[[:space:]]Networks[[:space:]]for[[:space:]]XOR[[:space:]]Data/21fe6f4b-ccae-4026-af3c-8b69232c62f6_origin.pdf filter=lfs diff=lfs merge=lfs -text
3659
+ 2024/Bespoke[[:space:]]Non-Stationary[[:space:]]Solvers[[:space:]]for[[:space:]]Fast[[:space:]]Sampling[[:space:]]of[[:space:]]Diffusion[[:space:]]and[[:space:]]Flow[[:space:]]Models/584bee0d-1d42-4098-9e80-76bdbbc0968b_origin.pdf filter=lfs diff=lfs merge=lfs -text
3660
+ 2024/Best[[:space:]]Arm[[:space:]]Identification[[:space:]]for[[:space:]]Stochastic[[:space:]]Rising[[:space:]]Bandits/f75f0d15-f08e-451f-be37-4631d9df8372_origin.pdf filter=lfs diff=lfs merge=lfs -text
3661
+ 2024/Best[[:space:]]of[[:space:]]Both[[:space:]]Worlds[[:space:]]Guarantees[[:space:]]for[[:space:]]Smoothed[[:space:]]Online[[:space:]]Quadratic[[:space:]]Optimization/9c7fe5f2-234e-4685-821c-6f92715aa220_origin.pdf filter=lfs diff=lfs merge=lfs -text
3662
+ 2024/Better[[:space:]]&[[:space:]]Faster[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Multi-token[[:space:]]Prediction/d33b8ba3-b81d-4c15-bcea-75ac09022295_origin.pdf filter=lfs diff=lfs merge=lfs -text
3663
+ 2024/Better[[:space:]]Locally[[:space:]]Private[[:space:]]Sparse[[:space:]]Estimation[[:space:]]Given[[:space:]]Multiple[[:space:]]Samples[[:space:]]Per[[:space:]]User/cb0ad214-8af0-4bc4-b01b-458350854804_origin.pdf filter=lfs diff=lfs merge=lfs -text
3664
+ 2024/Better[[:space:]]Safe[[:space:]]than[[:space:]]Sorry_[[:space:]]Pre-training[[:space:]]CLIP[[:space:]]against[[:space:]]Targeted[[:space:]]Data[[:space:]]Poisoning[[:space:]]and[[:space:]]Backdoor[[:space:]]Attacks/3b65312d-be01-4f81-b2b8-9798f78b5b71_origin.pdf filter=lfs diff=lfs merge=lfs -text
3665
+ 2024/BetterV_[[:space:]]Controlled[[:space:]]Verilog[[:space:]]Generation[[:space:]]with[[:space:]]Discriminative[[:space:]]Guidance/df211fc8-d445-4be3-bbfe-51bee401554a_origin.pdf filter=lfs diff=lfs merge=lfs -text
3666
+ 2024/Beyond[[:space:]]Chinchilla-Optimal_[[:space:]]Accounting[[:space:]]for[[:space:]]Inference[[:space:]]in[[:space:]]Language[[:space:]]Model[[:space:]]Scaling[[:space:]]Laws/13d02317-c78e-490c-8893-c0a4b1a21aed_origin.pdf filter=lfs diff=lfs merge=lfs -text
3667
+ 2024/Beyond[[:space:]]ELBOs_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Evaluation[[:space:]]of[[:space:]]Variational[[:space:]]Methods[[:space:]]for[[:space:]]Sampling/96b7551e-5ec9-485e-8ae9-38efc5da2d9f_origin.pdf filter=lfs diff=lfs merge=lfs -text
3668
+ 2024/Beyond[[:space:]]Implicit[[:space:]]Bias_[[:space:]]The[[:space:]]Insignificance[[:space:]]of[[:space:]]SGD[[:space:]]Noise[[:space:]]in[[:space:]]Online[[:space:]]Learning/694d958c-5630-43d7-bbf1-faee7029b738_origin.pdf filter=lfs diff=lfs merge=lfs -text
3669
+ 2024/Beyond[[:space:]]Individual[[:space:]]Input[[:space:]]for[[:space:]]Deep[[:space:]]Anomaly[[:space:]]Detection[[:space:]]on[[:space:]]Tabular[[:space:]]Data/6edaed53-c9fa-49fb-a2b6-5e0784bf7936_origin.pdf filter=lfs diff=lfs merge=lfs -text
3670
+ 2024/Beyond[[:space:]]Point[[:space:]]Prediction_[[:space:]]Score[[:space:]]Matching-based[[:space:]]Pseudolikelihood[[:space:]]Estimation[[:space:]]of[[:space:]]Neural[[:space:]]Marked[[:space:]]Spatio-Temporal[[:space:]]Point[[:space:]]Process/05b3cd61-abbf-4181-a5e8-b4fcb20f0064_origin.pdf filter=lfs diff=lfs merge=lfs -text
3671
+ 2024/Beyond[[:space:]]Regular[[:space:]]Grids_[[:space:]]Fourier-Based[[:space:]]Neural[[:space:]]Operators[[:space:]]on[[:space:]]Arbitrary[[:space:]]Domains/e1f34d24-c283-432d-8000-344619c45a4b_origin.pdf filter=lfs diff=lfs merge=lfs -text
3672
+ 2024/Beyond[[:space:]]Sole[[:space:]]Strength_[[:space:]]Customized[[:space:]]Ensembles[[:space:]]for[[:space:]]Generalized[[:space:]]Vision-Language[[:space:]]Models/0fe7f6ff-13b1-4201-b5bc-4da95deb8ad4_origin.pdf filter=lfs diff=lfs merge=lfs -text
3673
+ 2024/Beyond[[:space:]]the[[:space:]]Calibration[[:space:]]Point_[[:space:]]Mechanism[[:space:]]Comparison[[:space:]]in[[:space:]]Differential[[:space:]]Privacy/dee06751-1823-4cae-a751-962503642365_origin.pdf filter=lfs diff=lfs merge=lfs -text
3674
+ 2024/Beyond[[:space:]]the[[:space:]]Federation_[[:space:]]Topology-aware[[:space:]]Federated[[:space:]]Learning[[:space:]]for[[:space:]]Generalization[[:space:]]to[[:space:]]Unseen[[:space:]]Clients/2a481a5f-ee3d-4410-970a-d542ce6bd155_origin.pdf filter=lfs diff=lfs merge=lfs -text
3675
+ 2024/Beyond[[:space:]]the[[:space:]]Norms_[[:space:]]Detecting[[:space:]]Prediction[[:space:]]Errors[[:space:]]in[[:space:]]Regression[[:space:]]Models/41a2d764-b4c3-4bbc-a30f-f3ba79c35178_origin.pdf filter=lfs diff=lfs merge=lfs -text
3676
+ 2024/Beyond[[:space:]]the[[:space:]]ROC[[:space:]]Curve_[[:space:]]Classification[[:space:]]Trees[[:space:]]Using[[:space:]]Cost-Optimal[[:space:]]Curves,[[:space:]]with[[:space:]]Application[[:space:]]to[[:space:]]Imbalanced[[:space:]]Datasets/49e25eb9-a9b1-4689-bf99-c9d52d9a381a_origin.pdf filter=lfs diff=lfs merge=lfs -text
3677
+ 2024/BiE_[[:space:]]Bi-Exponent[[:space:]]Block[[:space:]]Floating-Point[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Quantization/daab3cd5-f67b-4267-bdd3-5430c1cd2b36_origin.pdf filter=lfs diff=lfs merge=lfs -text
3678
+ 2024/BiLLM_[[:space:]]Pushing[[:space:]]the[[:space:]]Limit[[:space:]]of[[:space:]]Post-Training[[:space:]]Quantization[[:space:]]for[[:space:]]LLMs/7cad9d18-02f8-4185-a169-126bb4264856_origin.pdf filter=lfs diff=lfs merge=lfs -text
3679
+ 2024/BiSHop_[[:space:]]Bi-Directional[[:space:]]Cellular[[:space:]]Learning[[:space:]]for[[:space:]]Tabular[[:space:]]Data[[:space:]]with[[:space:]]Generalized[[:space:]]Sparse[[:space:]]Modern[[:space:]]Hopfield[[:space:]]Model/a8844364-5882-4a59-b846-a18ab8f84545_origin.pdf filter=lfs diff=lfs merge=lfs -text
3680
+ 2024/Bias[[:space:]]of[[:space:]]Stochastic[[:space:]]Gradient[[:space:]]Descent[[:space:]]or[[:space:]]the[[:space:]]Architecture_[[:space:]]Disentangling[[:space:]]the[[:space:]]Effects[[:space:]]of[[:space:]]Overparameterization[[:space:]]of[[:space:]]Neural[[:space:]]Networks/ef74da7a-ed6e-4155-87fc-e1dc98589774_origin.pdf filter=lfs diff=lfs merge=lfs -text
3681
+ 2024/Bidirectional[[:space:]]Reciprocative[[:space:]]Information[[:space:]]Communication[[:space:]]for[[:space:]]Few-Shot[[:space:]]Semantic[[:space:]]Segmentation/cb788f38-e9b6-4050-bf28-e122fb008e48_origin.pdf filter=lfs diff=lfs merge=lfs -text
3682
+ 2024/Bifurcated[[:space:]]Attention[[:space:]]for[[:space:]]Single-Context[[:space:]]Large-Batch[[:space:]]Sampling/21b4bb40-d4d9-4cef-94c9-5cbc166a05c8_origin.pdf filter=lfs diff=lfs merge=lfs -text
3683
+ 2024/Biharmonic[[:space:]]Distance[[:space:]]of[[:space:]]Graphs[[:space:]]and[[:space:]]its[[:space:]]Higher-Order[[:space:]]Variants_[[:space:]]Theoretical[[:space:]]Properties[[:space:]]with[[:space:]]Applications[[:space:]]to[[:space:]]Centrality[[:space:]]and[[:space:]]Clustering/465b7718-b497-4d83-83c2-576f176d275b_origin.pdf filter=lfs diff=lfs merge=lfs -text
3684
+ 2024/Binary[[:space:]]Decomposition_[[:space:]]A[[:space:]]Problem[[:space:]]Transformation[[:space:]]Perspective[[:space:]]for[[:space:]]Open-Set[[:space:]]Semi-Supervised[[:space:]]Learning/3558bf3b-d621-4fc4-80f6-5c7467c5392e_origin.pdf filter=lfs diff=lfs merge=lfs -text
3685
+ 2024/Binning[[:space:]]as[[:space:]]a[[:space:]]Pretext[[:space:]]Task_[[:space:]]Improving[[:space:]]Self-Supervised[[:space:]]Learning[[:space:]]in[[:space:]]Tabular[[:space:]]Domains/81ac2d7b-c85b-423e-9592-39b5e709afc7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3686
+ 2024/Bipartite[[:space:]]Matching[[:space:]]in[[:space:]]Massive[[:space:]]Graphs_[[:space:]]A[[:space:]]Tight[[:space:]]Analysis[[:space:]]of[[:space:]]EDCS/f6efa723-1bbd-4446-8799-5bea8bcb97d7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3687
+ 2024/Bivariate[[:space:]]Causal[[:space:]]Discovery[[:space:]]using[[:space:]]Bayesian[[:space:]]Model[[:space:]]Selection/3f27afef-9760-4330-b449-8f8c002f1409_origin.pdf filter=lfs diff=lfs merge=lfs -text
3688
+ 2024/Block[[:space:]]Acceleration[[:space:]]Without[[:space:]]Momentum_[[:space:]]On[[:space:]]Optimal[[:space:]]Stepsizes[[:space:]]of[[:space:]]Block[[:space:]]Gradient[[:space:]]Descent[[:space:]]for[[:space:]]Least-Squares/8087e36e-cc7c-4574-b250-edddfcc9ec53_origin.pdf filter=lfs diff=lfs merge=lfs -text
3689
+ 2024/Boosting[[:space:]]Offline[[:space:]]Optimizers[[:space:]]with[[:space:]]Surrogate[[:space:]]Sensitivity/326e3dbe-a5f6-40f8-9d7f-3442addc1318_origin.pdf filter=lfs diff=lfs merge=lfs -text
3690
+ 2024/Boosting[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Strongly[[:space:]]Delayed[[:space:]]Feedback[[:space:]]Through[[:space:]]Auxiliary[[:space:]]Short[[:space:]]Delays/8ce32c69-af3b-4127-8235-32c62e205054_origin.pdf filter=lfs diff=lfs merge=lfs -text
3691
+ 2024/Bootstrap[[:space:]]AutoEncoders[[:space:]]With[[:space:]]Contrastive[[:space:]]Paradigm[[:space:]]for[[:space:]]Self-supervised[[:space:]]Gaze[[:space:]]Estimation/4f6af029-6ed2-4c1d-8fe0-9c0d8bd76a07_origin.pdf filter=lfs diff=lfs merge=lfs -text
3692
+ 2024/Bootstrapping[[:space:]]Fisher[[:space:]]Market[[:space:]]Equilibrium[[:space:]]and[[:space:]]First-Price[[:space:]]Pacing[[:space:]]Equilibrium/04439f6a-1ff2-48ec-8f0d-770eaa3aece2_origin.pdf filter=lfs diff=lfs merge=lfs -text
3693
+ 2024/Borda[[:space:]]Regret[[:space:]]Minimization[[:space:]]for[[:space:]]Generalized[[:space:]]Linear[[:space:]]Dueling[[:space:]]Bandits/a52defe4-2bfb-4e9b-9c66-01117adda009_origin.pdf filter=lfs diff=lfs merge=lfs -text
3694
+ 2024/Bottleneck-Minimal[[:space:]]Indexing[[:space:]]for[[:space:]]Generative[[:space:]]Document[[:space:]]Retrieval/62892456-f897-4185-9fc9-03f1395ddc6b_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/d83ea235-621e-44a6-a14f-a9ddd0aade55_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5046b81a2fbf34594ecd48c8cc3c62174b993e0845696aa172a71480f144a6a7
3
+ size 604205
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/full.md ADDED
@@ -0,0 +1,628 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BRAIN: Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback
2
+
3
+ Gaurav Pandey<sup>1</sup> Yatin Nandwani<sup>1</sup> Tahira Naseem<sup>1</sup> Mayank Mishra<sup>1</sup> Guangxuan Xu<sup>1</sup> Dinesh Raghu<sup>1</sup> Sachindra Joshi<sup>1</sup> Asim Munawar<sup>1</sup> Ramón Fernandez Astudillo<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ Distribution matching methods for language model alignment such as Generation with Distributional Control (GDC) and Distributional Policy Gradient (DPG) have not received the same level of attention in reinforcement learning from human feedback (RLHF) as contrastive methods such as Sequence Likelihood Calibration (SLiC), Direct Preference Optimization (DPO) and its variants. We identify high variance of the gradient estimate as the primary reason for the lack of success of these methods and propose a self-normalized baseline to reduce the variance. We further generalize the target distribution in DPG, GDC and DPO by using Bayes' rule to define the reward-conditioned posterior. The resulting approach, referred to as BRAIN - Bayesian Reward-conditioned Amortized Inference acts as a bridge between distribution matching methods and DPO and significantly outperforms prior art in summarization and Antropic HH tasks.
8
+
9
+ # 1. Introduction
10
+
11
+ Reinforcement Learning from Human Feedback (RLHF) has emerged as a pivotal technique to fine-tune Large Language Models (LLMs) into conversational agents that obey pre-defined human preferences (Ouyang et al., 2022; Bai et al., 2022; OpenAI et al., 2023; Touvron et al., 2023). This process involves collecting a dataset of human preferences and using it to align a Supervised Fine-Tuned (SFT) model to human preferences.
12
+
13
+ Proximal Policy Optimization (PPO) RLHF (Ziegler et al., 2019), has been instrumental in the development of groundbreaking models such as GPT-3.5 (Ouyang et al., 2022; Ye
14
+
15
+ <IBM Research AI. Correspondence to: Gaurav Pandey <gpandey1@in.ibm.com>.
16
+
17
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
18
+
19
+ et al., 2023) and GPT-4 (OpenAI et al., 2023) among others. This RL technique trains a separate Reward Model (RM) to discriminate outputs based on human preferences. The RM is then used to train a policy that maximizes the expected reward while regularizing it to not diverge too much from the SFT model.
20
+
21
+ Despite its clear success, PPO has lately been displaced by offline contrastive techniques that are more scalable and do not make full use of a separate RM. Techniques like Likelihood Calibration (SLiC) (Zhao et al., 2023) or Rank Responses to align Human Feedback (RRHF) (Yuan et al., 2023) only keep ranking information from a RM. Direct Preference Optimization (DPO) (Rafailov et al., 2023), which is currently the de-facto method used to align high-performing models such as Zephyr (Tunstall et al., 2023), Mixtral (Jiang et al., 2024) or LLaMa-3 $^1$ , trains the policy directly on human preferences without the need of a separate reward model $^2$ .
22
+
23
+ Both PPO and DPO are derived from KL-controlled reward maximization (Jaques et al., 2017), which has a well known closed form solution (Levine, 2018). This optimal policy comes however in the form of an energy-based model (EBM) with an intractable partition function. A set of less well-known methods for RL in language models use distribution matching to align an SFT model to this EBM (Khalifa et al., 2020b; Parshakova et al., 2019; Korbak et al., 2022). During the alignment of an SFT model via distribution matching, we need to sample from the target EBM. However, sampling from the target EBM is challenging, and hence distribution matching approaches sample from a proposal distribution instead, and reweigh the samples based on their importance weights. Despite the clear intuition behind distribution matching, these methods are not used commonly for the task of reinforcement learning from human feedback.
24
+
25
+ In this work, we address the primary reason for the lack of success of distribution matching methods for RLHF. Towards this end, we propose BRAIN- Bayesian
26
+
27
+ Reward-conditioned Amortized Inference that extends the distribution-matching methods in two significant ways. Firstly, we propose a Bayesian approach to construct the target distribution for distribution matching. Specifically, we treat the SFT model as the prior distribution over the outputs for a given input, that is, $p(y|x)$ . The likelihood $p(G = 1|x,y)$ captures the goodness of an output for a given input and is defined as a function of the reward $r(x,y)$ based on the reward-modelling assumptions. The resulting reward-conditioned posterior $p(y|x,G = 1)$ , obtained using Bayes' rule, is chosen as the target distribution. When the underlying preference model behind the reward function $r(x,y)$ follows Bradley-Terry assumptions, we show that the posterior corresponds to the optimal policy of the KL-regularized reward-maximization objective used in PPO-RLHF (Ziegler et al., 2019).
28
+
29
+ More significantly, we observe that the distribution matching technique suffers from high-variance of the gradient estimate, despite the baseline proposed in Korbak et al. (2022). In this work, we propose a self-normalized baseline that significantly reduces the variance of the gradient estimate. We prove that the resulting estimate corresponds to the gradient of a novel self-normalized KL divergence objective for distribution matching. Furthermore, self-normalization in the baseline helps us to establish DPO-sft (a version of DPO where samples are generated from the SFT model and scored by the reward model) as a special case of the BRAIN objective.
30
+
31
+ In our experiments on TL;DR summarization (Stiennon et al., 2020; Volske et al., 2017) and AntropicHH (Bai et al., 2022), BRAIN establishes a new state-of-the-art by significantly outperforming existing SoTA RL methods DPO and RSO (Rafailov et al., 2023). In addition, we bridge the gap between BRAIN and DPO by careful augmentation of DPO objective in two ways. Specifically, we incorporate: 1) multiple outputs for a given input prompt, and 2) reward as an importance weight in the DPO objective.
32
+
33
+ Overall, we make the following contributions:
34
+
35
+ 1. We propose a Bayesian approach to construct the target distribution in distribution matching methods of RL for LLMs. The resulting posterior generalizes the PPO optimal policy.
36
+ 2. For distilling the posterior in our training policy, we propose a self-normalized baseline for variance reduction of the gradient estimate of the objective. The resulting algorithm is referred to as BRAIN and the gradient estimate is referred to as the BRAIN gradient estimate.
37
+ 3. We theoretically prove that the proposed gradient estimate is an unbiased estimator of a modified form of KL divergence that we name BRAIN objective.
38
+ 4. We derive the exact form of the BRAIN objective under
39
+
40
+ Bradley-Terry preference model assumption. We also show DPO can be derived as a special case of the BRAIN objective.
41
+
42
+ 5. Finally, we empirically substantiate our claims by experimenting on two natural language generation tasks.
43
+
44
+ # 2. Related Works
45
+
46
+ In relation to RLHF approaches, InstructGPT (Ouyang et al., 2022) made fundamental contributions to conversational agent alignment and showed how Proximal Policy Optimization (PPO) (Schulman et al., 2017) could be used for this purpose. PPO is however an online-RL algorithm, which carries high costs of sampling and keeping additional LLMs in memory, such as value networks.
47
+
48
+ After PPO, offline-RL algorithms emerged that are simpler and have lower computational costs. SLiC (Zhao et al., 2023) proposed a margin loss between preferred and rejected outputs, regularized with a SFT loss, RRHF (Yuan et al., 2023) extends this idea to multiple outputs. Direct Preference Optimization (DPO) (Rafailov et al., 2023) starts from the KL-controlled reward maximization objective as PPO and derives an analytical form for a reward model based on the optimal policy for this objective. Once plugged into the standard parametrization of a Bradley-Terry reward model, this yields an objective without an explicit reward and results in a contrastive gradient update rule. DPO is well funded theoretically and has found clear empirical success in aligning LLMs (Tunstall et al., 2023; Ivison et al., 2023; Jiang et al., 2024). It has also a large amount of follow-up works. Statistical Rejection Sampling Optimization (RSO) (Liu et al., 2023) proposes sampling from the optimal distribution and use a reward model for labeling, Identity Preference Optimization (IPO) (Azar et al., 2024) introduces additional regularization, Kahneman-Tversky Optimization (KTO) (Ethayarajh et al., 2024) derives a similar loss that does not require preference pairs and Odds Ratio Preference Optimization (ORPO) (Hong et al., 2024) enriches the SFT loss with a term based on the odds of producing the desired response.
49
+
50
+ As mentioned in Section 1, PPO and DPO originate from the same KL-controlled reward maximization which has an EBM as its optimal policy solution. Distributional Policy Gradient (DPG) (Parshakova et al., 2019) proposes using importance sampling to learn a policy matching the distribution of an EBM via KL minimization. DPG notes that, for stability purposes, offline optimization is needed. Generation with Distributional Control (GDC) (Khalifa et al., 2020a) proposes the application of DPG to controlled language generation, introduces a KL threshold to update of the offline proposal distribution and makes a connection with maximum entropy methods. GDC++ (Korbak et al., 2022) shows that, similarly to regular policy gradient, variance
51
+
52
+ reduction increases performance. It also shows that distributional matching of the optimal distribution optimizes the same objective as KL-controlled reward maximization.
53
+
54
+ Similar to the above approaches, BRAIn uses distribution matching to train the policy. However, it differs from GDC and $\mathrm{GDC + + }$ in two major aspects. Firstly, the target distribution in BRAIn is the reward-conditioned posterior derived using Bayes' rule. Secondly, and more importantly, BRAIn uses a self-normalized baseline which results in significant variance reduction of the gradient estimate and hence, it tremendously improves performance. The self-normalized baseline yields a connection to DPO (Rafailov et al., 2023), showing that DPO-sft (a variant of DPO where the samples come from base/SFT policy and are scored using a reward model) is a special case of BRAIn.
55
+
56
+ Related to learning distributions conditioned on desired features, earlier works such as Ficler & Goldberg (2017), train special feature embeddings to produce text with desired target features. More recently Chen et al. (2021) conditions on a goodness token, and (Lu et al., 2022; Korbak et al., 2023) threshold a reward model for the same purpose. Although inspired by reward conditioning, BRAIN deviates from these approaches by not explicitly parametrizing the conditional distribution that takes both prompt $x$ and desired reward as input. Instead, BRAIN poses the problem as distributional matching of the posterior distribution.
57
+
58
+ # 3. Notation
59
+
60
+ Let $x$ be an input prompt and $\mathcal{V}$ be the set of all output sequences. Let $p(y|x)$ be the conditional probability assigned by a supervised fine-tuned (SFT) language model (LM) to an output $y \in \mathcal{V}$ for an input $x$ . Let $r(x,y)$ be the corresponding reward value assigned by a given reward function. Further, let $G$ represent a binary random variable such that the probability $p(G = 1|y,x)$ captures the goodness of a given output $y$ for a given input $x$ . The relationship between probability $p(G = 1|y,x)$ and reward value $r(x,y)$ depends upon the modelling assumptions made while training the reward model. In section 5.1.1, we illustrate the connection between $p(G = 1|y,x)$ and $r(x,y)$ for both absolute and relative reward models such as Bradley-Terry.
61
+
62
+ Given the prior $p(y|x)$ , and the goodness model $p(G = 1|y,x)$ , we define the posterior $p(y|x,G = 1)$ as our desired distribution that assigns high probability to 'good' outputs. To mimic sampling from the posterior distribution, we aim to train a new model $q_{\theta}(y|x)$ by minimizing the KL divergence between the two.
63
+
64
+ # 4. Approach
65
+
66
+ Bayesian reformulation: We first use Bayes' rule to represent the reward-conditioned posterior as:
67
+
68
+ $$
69
+ p (y | x, G = 1) = \frac {p (y | x) p (G = 1 | y , x)}{p (G = 1 | x)} \tag {1}
70
+ $$
71
+
72
+ We are interested in sampling from $p(y|x, G = 1)$ , i.e., samples with high reward. An obvious solution is to sample from $p(y|x)$ and keep rejecting the samples until a sample with a high reward is obtained. Despite its simplicity, rejection sampling is expensive. Hence, in this work, we propose to learn a distribution, $q_{\theta}(y|x)$ , that can mimic sampling from the posterior without the computation overhead of rejection sampling.
73
+
74
+ Training objective: To train the parameters $\theta$ , we propose to minimize the KL-divergence between the posterior distribution $p(y|x, G = 1)$ , and $q_{\theta}(y|x)$ . This is equivalent to maximizing the objective:
75
+
76
+ $$
77
+ \mathcal {L} _ {x} (\theta) = - \mathbb {E} _ {p (y | x, G = 1)} \left[ \log \frac {p (y | x , G = 1)}{q _ {\theta} (y | x)} \right] \tag {2}
78
+ $$
79
+
80
+ By collecting all the constant terms with respect to $\theta$ in $C$ , the objective can be written as
81
+
82
+ $$
83
+ \mathcal {L} _ {x} (\theta) = \mathbb {E} _ {p (y | x, G = 1)} \left[ \log q _ {\theta} (y | x) \right] + C \tag {3}
84
+ $$
85
+
86
+ Henceforth, the constant $C$ will be omitted in subsequent formulations of the objective $\mathcal{L}_x(\theta)$ .
87
+
88
+ Approximation with importance sampling: To empirically compute the expectation in eq. (3), we need to sample from the posterior $p(y|x, G = 1)$ . Unfortunately, it is not possible to do so directly, and hence we resort to importance sampling (Tokdar & Kass, 2010),
89
+
90
+ $$
91
+ \mathcal {L} _ {x} (\theta) = \mathbb {E} _ {q ^ {\prime} (y | x)} \left[ \frac {p \left(y _ {i} \mid x , G = 1\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)} \log q _ {\theta} (y | x) \right] \tag {4}
92
+ $$
93
+
94
+ where $q'(y|x)$ is an an easy-to-sample proposal distribution. Taking into account the Bayes rule in equation (1) we approximate the expectation by a sample average of $n$ outputs $(y_1, \ldots, y_n)$ from $q'(y|x)$ . We further use self-normalized importance sampling (ch. 9 in Owen (2013)), normalizing the weights by their sum. This results in the following loss for a given $x$ :
95
+
96
+ $$
97
+ \hat {\mathcal {L}} _ {x} (\theta) = \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \log q _ {\theta} (y _ {i} | x), \text {w h e r e} y _ {i} \sim q ^ {\prime} (y | x) \tag {5}
98
+ $$
99
+
100
+ $$
101
+ \hat {\alpha} _ {y _ {i}} = \frac {\alpha_ {y _ {i}}}{\sum_ {j = 1} ^ {n} \alpha_ {y _ {j}}}, \alpha_ {y _ {i}} = \frac {p \left(y _ {i} \mid x\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)} p (G = 1 \mid y _ {i}, x) \tag {6}
102
+ $$
103
+
104
+ Note that we dropped $p(G = 1|x)$ from $\alpha_{y_i}$ as it will get cancelled due to self-normalization. We have added subscripts to $\alpha$ to show that they depend on the samples $y$ . The
105
+
106
+ gradient of the objective can be written as
107
+
108
+ $$
109
+ \nabla_ {\theta} \hat {\mathcal {L}} _ {x} (\theta) = \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x) \tag {7}
110
+ $$
111
+
112
+ Baseline subtraction: One critical issue with the loss in eq. (5) is that it assigns a positive weight to all the samples $y_{i}$ for a given $x$ , irrespective of its reward distribution $p(G = 1|y_i,x)$ . In other words, the model is trained to increase the probability of all the samples and not just the high-reward ones. This is not an issue when all the samples have high reward, that is, the proposal distribution is the same as the posterior $q^{\prime}(y|x) = p(y|x,G = 1)$ .
113
+
114
+ When the proposal is away from the posterior, we hypothesize that it is crucial for low-reward samples to have negative weights. In GDC++ (Korbak et al., 2022), the authors proposed to subtract the following baseline from its gradient estimate:
115
+
116
+ $$
117
+ B a s e l i n e = Z \frac {q _ {\theta} (y | x)}{q ^ {\prime} (y | x)} \nabla_ {\theta} \log q _ {\theta} (y | x) \tag {8}
118
+ $$
119
+
120
+ where $Z$ is the normalization constant of the target EBM (target posterior in this paper). In contrast, we propose a self-normalized baseline as described below:
121
+
122
+ To obtain a baseline for our case, we first note the following general result (derived for $q_{\theta}(y|x)$ here),
123
+
124
+ $$
125
+ \begin{array}{l} \mathbb {E} _ {q _ {\theta} (y | x)} \nabla_ {\theta} \log q _ {\theta} (y | x) = \mathbb {E} _ {q _ {\theta} (y | x)} \frac {1}{q _ {\theta} (y | x)} \nabla_ {\theta} q _ {\theta} (y | x) (9) \\ = \sum_ {y \in \mathcal {Y}} \nabla_ {\theta} q _ {\theta} (y | x) = \nabla_ {\theta} \sum_ {y \in \mathcal {Y}} q _ {\theta} (y | x) = \nabla_ {\theta} 1 = 0 (10) \\ \end{array}
126
+ $$
127
+
128
+ Thus, this expectation can be subtracted from the gradient in (7) without introducing any bias. To estimate the baseline, we reuse the same samples $(y_{1},\ldots ,y_{n})$ that are used in (5) and apply self-normalized importance sampling to get:
129
+
130
+ $$
131
+ \mathbb {E} _ {q _ {\theta} (y | x)} \nabla_ {\theta} \log q _ {\theta} (y | x) \approx \sum_ {i = 1} ^ {n} \hat {\beta} _ {y _ {i}} \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x) \tag {11}
132
+ $$
133
+
134
+ $$
135
+ y _ {i} \sim q ^ {\prime} (y | x) \text {a n d} \hat {\beta} _ {y _ {i}} = \frac {\beta_ {y _ {i}}}{\sum_ {j = 1} ^ {n} \beta_ {y _ {j}}}, \beta_ {y _ {i}} = \frac {q _ {\theta} (y _ {i} | x)}{q ^ {\prime} (y _ {i} | x)} \tag {12}
136
+ $$
137
+
138
+ Subtracting the baseline estimate from eq. (7), we get:
139
+
140
+ $$
141
+ \nabla_ {\theta} \hat {\mathcal {L}} _ {x} (\theta) = \sum_ {i = 1} ^ {n} \left(\hat {\alpha} _ {y _ {i}} - \hat {\beta} _ {y _ {i}}\right) \nabla_ {\theta} \log q _ {\theta} \left(y _ {i} \mid x\right) \tag {13}
142
+ $$
143
+
144
+ $y_{i},\hat{\alpha}_{y_{i}}$ , and $\hat{\beta}_{y_i}$ are same as in eqs. (6) and (12). We call the self-normalized baseline subtracted gradient estimate in (13) the BRAIn gradient estimate. Intuitively, $\alpha_{y_i}$ and $\beta_{y_i}$ are proportional to the posterior $p(y_{i}|x,G = 1)$ and policy
145
+
146
+ $q_{\theta}(y_i|x)$ distributions, respectively. Thus, the weight (difference of normalized $\alpha_{y_i}$ and $\beta_{y_i}$ ) of each $y_i$ captures how far the current estimate of policy $q_{\theta}(y_i|x)$ is from the true posterior $p(y_i|x,G = 1)$ . This also alleviates the critical issue of assigning positive weights to all $y_i$ irrespective of their reward. Samples with lower reward, and hence lower posterior $p(y_i|x,G = 1)$ (consequently lower $\alpha_{y_i}$ ), will get negative weights as soon as the policy distribution $q_{\theta}(y_i|x)$ assigns higher probability to them (consequently higher $\beta_{y_i}$ ) than the posterior, and vice-versa.
147
+
148
+ Algorithm 1 Bayesian Reward-conditioned Amortized Inference
149
+ Require: $r(x,y),p(y|x),D,e,m,n,k$
150
+ 1: Initialize $q^{\prime}(y|x)\gets p(y|x),q_{\theta}(y|x)\gets p(y|x)$
151
+ 2: Initialize $D_0\gets \{\}$
152
+ 3: for $t = 1$ to e do
153
+ 4: $S_{t}\gets$ randomly selected m prompts from $D$
154
+ 5: for all $x\in S_t$ do
155
+ 6: $Y_{x}\gets$ generate n samples using $q^{\prime}(y|x)$
156
+ 7: for all $y\in Y_x$ do
157
+ 8: Cache log $q^{\prime}(y|x)$ ,log $p(y|x)$ $r(x,y)$ in $S_{t}$
158
+ 9: Cache normalized $\hat{\alpha}_{y}$ (eq. (6) or eq. (20)) in $S_{t}$
159
+ 10: end for
160
+ 11: end for
161
+ 12: $D_{t}\gets D_{t - 1}\cup S_{t}$
162
+ 13: for $j = 1$ to k do
163
+ 14: $B\gets$ randomly sampled batch from $D_{t}$
164
+ 15: for all $(x,Y_x,q'(y|x),\hat{\alpha}_y)\in B$ do
165
+ 16: Compute $\hat{\beta}_y$ (eq. (12))
166
+ 17: $\mathcal{L}_x(\theta)\gets \sum_{y\in Y_x}(\hat{\alpha}_y - \hat{\beta}_y)\log q_\theta (y|x)$
167
+ 18: end for
168
+ 19: Update $\theta$ using $\nabla_{\theta}\sum_{x\in B}\mathcal{L}_x(\theta)$
169
+ 20: end for
170
+ 21: $q^{\prime}(y|x)\gets q_{\theta}(y|x)$
171
+ 22: end for
172
+ 23: Return $q_{\theta}$
173
+
174
+ The BRAIN algorithm with the self-normalized baseline is given in Algorithm 1. We initialize both our proposal $q'(y|x)$ and policy $q_{\theta}(y|x)$ with $p(y|x)$ . We update the proposal $e$ times after every $k$ gradient updates. $m$ is the number of prompts sampled from dataset $D$ after updating the proposal, and $n$ is the number of outputs generated for each prompt $x \in D$ .
175
+
176
+ In our experiments, we show that subtracting the self-normalized baseline results in a large improvement in performance. We hypothesize that the baseline allows the model to focus on distinctive features of high-reward outputs compared to the lower-reward ones. A formal justification of the resultant BRAIN gradient estimate is provided in the Appendix 4.1.
177
+
178
+ # 4.1. A formal justification of the BRAIN gradient estimate:
179
+
180
+ Self-normalized importance sampling (SNIS) introduces bias in any estimator. In this paper, we have used SNIS to approximate the importance weights as well as the baseline in our gradient estimate. Using biased gradient estimators for training often results in optimization of an objective different from the desired one.
181
+
182
+ However, in our case, we show that using the BRAIN gradient estimate for training, results in minimizing a self-normalized version of KL-divergence (defined below) whose minimum value is achieved only when $q_{\theta}(y|x) = p(y|x,G = 1)$ . Note that this is a consequence of the chosen self-normalized baseline in (12).
183
+
184
+ First, we define self-normalized KL divergence in the context of this paper. Next, we show that our proposed BRAIN gradient estimate is an unbiased estimator of the gradient of this divergence measure. Finally, we prove that this self-normalized KL divergence is non-negative and equals 0 only when the policy learns to mimic the posterior. The proofs are in appendix A.
185
+
186
+ Definition 4.1. Let the proposal distribution $q'(y|x)$ , training policy $q_{\theta}(y|x)$ and posterior $p(y|x, G = 1)$ be as defined earlier. Furthermore, we assume that support(p) $\subseteq$ support(qθ) $\subseteq$ support(q'). For any $n$ outputs, $Y_{x} = (y_{1}, \ldots, y_{n})$ , let $\hat{\alpha}_{y_i}$ and $\hat{\beta}_{y_i}$ be the self-normalized importance sampling weights for the loss and the baseline, respectively (eqs. (6) and (12)). The self-normalized KL divergence between the posterior and training policy for the given proposal distribution is defined as:
187
+
188
+ $$
189
+ \begin{array}{l} D _ {n} ^ {q ^ {\prime}} (p (y | x, G = 1) | | q _ {\theta} (y | x)) \\ = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \left[ D _ {K L} \left(\hat {\alpha} _ {Y _ {x}} \mid \mid \hat {\beta} _ {Y _ {x}}\right) \right] \text {w h e r e} \tag{14} \\ \end{array}
190
+ $$
191
+
192
+ $$
193
+ D _ {K L} \left(\hat {\alpha} _ {Y _ {x}} \| \hat {\beta} _ {Y _ {x}}\right) = \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \log \frac {\hat {\alpha} _ {y _ {i}}}{\hat {\beta} _ {y _ {i}}} \tag {15}
194
+ $$
195
+
196
+ Theorem 4.2. The BRAIN gradient estimate defined in (13) is an unbiased estimator of the gradient (w.r.t. $\theta$ ) of negative self-normalized KL-divergence between the posterior $p(y|x, G = 1)$ and training policy $q_{\theta}(y|x)$ defined in (14). Here, the dependence of KL divergence on $\theta$ comes from $\hat{\beta}_{y_i}$ being a function of $q_{\theta}(y_i|x)$ .
197
+
198
+ Since the gradient of our objective in eq. (13) is the same as the gradient of negative self-normalized KL-divergence defined in eq. (14), in the rest of the paper, we refer to negative self-normalized KL-divergence between the posterior and the training policy as BRAIN objective.
199
+
200
+ Theorem 4.3. The self-normalized KL-divergence defined in (14) reaches its minimum value of 0 if and only if the
201
+
202
+ KL-divergence between the posterior and training policy also reaches 0. Also, $q_{\theta}(y|x) = p(y|x,G = 1)$ is the only minima of self-normalized KL-divergence defined in (14).
203
+
204
+ # 5. Connection with existing RLHF methods
205
+
206
+ In this section, we show that the proposed BRAIN algorithm acts as a bridge between two disparate objectives used for reinforcement learning in LLMs as shown in Figure 1.
207
+
208
+ 1. Distribution matching objectives as described in (Korbak et al., 2022; Parshakova et al., 2019; Khalifa et al., 2020b).
209
+ 2. The contrastive-training approach presented in DPO (Rafailov et al., 2023), specifically DPO-sft where the samples come from the base/SFT policy and are scored using the reward model.
210
+
211
+ In the rest of the section:
212
+
213
+ 1. We establish the connection between the target distribution of BRAIN as defined in (1), and the PPO-optimal policy which is the target distribution for PPO, DPO as well as distribution matching methods for RLHF. Specifically, we establish that under Bradley-Terry preference modelling assumptions, the posterior becomes equal to the PPO-optimal policy.
214
+ 2. We derive the DPO-sft gradient estimate as a special case of the BRAIN gradient estimate.
215
+
216
+ # 5.1. Posterior and PPO-optimal policy
217
+
218
+ In this section, we show that for a Bradley-Terry preference model, the posterior $p(y|x,G = 1)$ corresponds to the PPO-optimal policy. Before we jump into the proof, we briefly describe Bradley-Terry preference model and its connection with the goodness model in BRAIN $p(G = 1|y,x)$ .
219
+
220
+ # 5.1.1. BRADLEY-TERRY PREFERENCE MODEL FOR LLMS
221
+
222
+ Given an absolute goodness measure $g_{i}$ for each $y_{i}$ , Bradley-Terry Model (BTM) defines the probability of choosing $y_{i}$ over $y_{j}$ as:
223
+
224
+ $$
225
+ \mathbb {P} \left(y _ {i} \succ y _ {j}\right) = \frac {g _ {i}}{g _ {i} + g _ {j}} \tag {16}
226
+ $$
227
+
228
+ Recall that in our formulation, the binary random variable $G$ represents the goodness of an output, and hence, the conditional probability $p(G = 1|y_i,x)$ can be used as a proxy for $g_{i}$ :
229
+
230
+ $$
231
+ \mathbb {P} \left(y _ {i} \succ y _ {j} \mid x\right) = \frac {p \left(G = 1 \mid y _ {i} , x\right)}{p \left(G = 1 \mid y _ {i} , x\right) + p \left(G = 1 \mid y _ {j} , x\right)} \tag {17}
232
+ $$
233
+
234
+ ![](images/1e6afbb7eebc1e359e91842b73b89457378acca0c8f30658ecdb1ba21cfb627e.jpg)
235
+ Figure 1. BRAIN acts as a bridge between distribution matching methods (GDC (Khalifa et al., 2020b) and $\mathrm{GDC + + }$ (Korbak et al., 2022)) and DPO (Rafailov et al., 2023), specifically DPO-sft where the samples come from the base/SFT policy. The values $\alpha_{i},\hat{\alpha}_{i}$ and $\hat{\beta}_i$ are as defined in equations (6) and (12) whereas $Z$ is the normalization constant of the target. Note that the proposal distribution in the distribution matching methods and BRAIN is chosen differently.
236
+
237
+ During training of the reward function $r(x,y)$ , we are given triplets $(x,y_i,y_j)$ such that for an input $x$ , the response $y_i$ is preferred over the response $y_j$ . We train it by maximizing the log-likelihood over all the training triplets. During training, the goodness measure $g_i$ is parameterized as $\exp \left(\frac{r(x,y_i)}{\gamma}\right)$ resulting in the following log-likelihood of a triplet:
238
+
239
+ $$
240
+ \log \mathbb {P} \left(y _ {i} \succ y _ {j} | x\right) = \log \sigma \left(\frac {r \left(x , y _ {i}\right) - r \left(x , y _ {j}\right)}{\gamma}\right) \tag {18}
241
+ $$
242
+
243
+ Thus, by equating eq. (18) and log of eq. (17), we get the maximum likelihood estimate of the log-odds as:
244
+
245
+ $$
246
+ \log \frac {p (G = 1 \mid y _ {i} , x)}{p (G = 1 \mid y _ {j} , x)} = \frac {r (x , y _ {i}) - r (x , y _ {j})}{\gamma} \tag {19}
247
+ $$
248
+
249
+ The above ratio is exactly what we need to compute self-normalized importance weights $\alpha_{y_i} / \sum_{j=1}^{n} \alpha_{y_j}$ in eq. (5). We formalize this result in the proposition below.
250
+
251
+ Proposition 5.1. For the Bradley-Terry preference model defined in eq. (17) and parameterized by eq. (18), the self-normalized importance-weights $\hat{\alpha}_{y_i} = \alpha_{y_i} / \sum_{j=1}^{n} \alpha_{y_j}$ have the following form:
252
+
253
+ $$
254
+ \frac {\exp \left(\frac {r (x , y _ {i})}{\gamma} + \log p \left(y _ {i} \mid x\right) - \log q ^ {\prime} \left(y _ {i} \mid x\right)\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {r (x , y _ {j})}{\gamma} + \log p \left(y _ {j} \mid x\right) - \log q ^ {\prime} \left(y _ {j} \mid x\right)\right)} \tag {20}
255
+ $$
256
+
257
+ In the special case where the proposal distribution $q'(y|x)$ is the same as the prior distribution $p(y|x)$ , the importance
258
+
259
+ weights reduces to
260
+
261
+ $$
262
+ \hat {\alpha} _ {y _ {i}} = \frac {\exp \left(\frac {r (x , y _ {i})}{\gamma}\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {r (x , y _ {j})}{\gamma}\right)} \tag {21}
263
+ $$
264
+
265
+ See the appendix for the proof. Observe that $\hat{\alpha}_{y_i}$ in eq. (21) is nothing but a softmax over the reward values $r(x, y_i)$ . In the next section, we show that DPO is a special case of our formulation when we replace softmax with argmax and set $n = 2$ . This amounts to assigning all the importance weight to the output sample with the most reward.
266
+
267
+ Theorem 5.2. For a Bradley-Terry reward model, the posterior $p(y|x,G = 1)$ is same as the PPO optimal policy given by:
268
+
269
+ $$
270
+ p ^ {*} (y | x) = \frac {p (y | x) \exp \left(\frac {r (x , y)}{\gamma}\right)}{\left(\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) \exp \left(\frac {r (x , \bar {y})}{\gamma}\right)\right)} \tag {22}
271
+ $$
272
+
273
+ The above eqn. for PPO optimal policy is as shown in equation(4) in Rafailov et al. (2023). Note that the reference policy in DPO is same as the prior policy in our formulation.
274
+
275
+ # 5.2. DPO-sft as a special case of BRAIN
276
+
277
+ In DPO (Rafailov et al., 2023), an ideal setting is discussed where the samples are generated from the base policy $(p(y|x)$ in our case) and annotated by humans. Often, the preference pairs in publicly available data are sampled from a different policy than $p(y|x)$ . To address this, Liu et al. (2023) experiment with a variant of DPO, called DPO-sft,
278
+
279
+ in which a reward model is first trained on publicly available preference pairs and then used to annotate the samples generated from the base policy $p(y|x)$ .
280
+
281
+ We claim that BRAIN reduces to DPO-sft when we generate only 2 samples per input $x$ and assign the importance weight of the winner to 1. The last assumption is equivalent to replacing softmax in eq. (21) with an argmax. We formalize it in the following theorem:
282
+
283
+ Theorem 5.3. Let the proposal distribution $q'(y|x)$ in BRAIN be restricted to the prior $p(y|x)$ . When $n = 2$ , and the softmax is replaced by argmax in eq. (21), then the BRAIN objective reduces to DPO objective proposed by Rafailov et al.
284
+
285
+ Proof. We start with BRAIN objective defined in eq. (14) and insert our assumptions to arrive at DPO objective.
286
+
287
+ By substituting $n = 2$ and $q^{\prime}(y|x) = p(y|x)$ in R.H.S. of eq. (14), and using eq. (15), we get:
288
+
289
+ $$
290
+ \mathbb {E} _ {y _ {1}, y _ {2} \sim p (y | x)} \left[ \hat {\alpha} _ {y _ {1}} \log \frac {\hat {\alpha} _ {y _ {1}}}{\hat {\beta} _ {y _ {1}}} + \hat {\alpha} _ {y _ {2}} \log \frac {\hat {\alpha} _ {y _ {2}}}{\hat {\beta} _ {y _ {2}}} \right] \tag {23}
291
+ $$
292
+
293
+ Now, without loss of generality, assume that $r(x,y_1) > r(x,y_2)$ . Replacing softmax with argmax in eq. (21), we get $\hat{\alpha}_{y_1} = 1$ and $\hat{\alpha}_{y_2} = 0$ . Plug it in eq. (23) to get:
294
+
295
+ $$
296
+ - \mathbb {E} _ {y _ {1}, y _ {2} \sim p (y | x)} \log \hat {\beta} _ {y _ {1}}
297
+ $$
298
+
299
+ Now recall from eq. (12) that $\hat{\beta}_{y_1} = \beta_{y_1} / (\beta_{y_1} + \beta_{y_2})$ and $\beta_{y_i} = \frac{q_\theta(y_i|x)}{p(y_i|x)}$ . Replacing it in the above equation and rearranging the terms, we get:
300
+
301
+ $$
302
+ - \mathbb {E} _ {y _ {1}, y _ {2} \sim p (y | x)} \log \sigma \left(\log \frac {q _ {\theta} (y _ {1} | x)}{p (y _ {1} | x)} - \log \frac {q _ {\theta} (y _ {2} | x)}{p (y _ {2} | x)}\right)
303
+ $$
304
+
305
+ The above expression is exactly same as equation (7) in Rafailov et al..
306
+
307
+ ![](images/9a9aa94724a6648f629aead212edbfd23e20601ae8ab045104be96ceab993e55.jpg)
308
+
309
+ We also note that to extend DPO to multiple outputs, i.e., $n > 2$ , Rafailov et al. resorts to a more general Plackett-Luce preference model.
310
+
311
+ # 6. Experimental Setup
312
+
313
+ Tasks: We conduct experiments on two natural language generation tasks, viz., summarization, and multi-turn dialog. In the summarization task, we align CarperAI's summarization LM to a Bradley-Terry reward model. We train and evaluate using Reddit TL;DR dataset, in which input is a post on Reddit, and the aligned model should generate a high reward summary.
314
+
315
+ Table 1. Win-rate (in %age) ± 95% confidence-interval against the gold output on the test sets. Train RM corresponds to the reward model used during training, whereas for LLM eval., we prompt Mixtral-8x7B.
316
+
317
+ <table><tr><td colspan="5">AnthropicHH</td></tr><tr><td></td><td>DPO</td><td>DPO-sft</td><td>RSO</td><td>BRAIN</td></tr><tr><td>Train RM</td><td>54.60±1.37</td><td>87.37±0.91</td><td>84.59±0.99</td><td>95.40±0.57</td></tr><tr><td>LLM eval</td><td>67.02±1.29</td><td>66.68±1.29</td><td>67.22±1.29</td><td>74.36±1.20</td></tr><tr><td colspan="5">Reddit TL;DR</td></tr><tr><td>Train RM</td><td>86.72±0.82</td><td>90.86±0.70</td><td>91.24±0.68</td><td>95.21±0.52</td></tr><tr><td>LLM eval</td><td>60.26±1.18</td><td>60.55±1.18</td><td>60.41±1.18</td><td>64.74±1.16</td></tr></table>
318
+
319
+ In the multi-turn dialog task, we ensure that a open-ended chatbot's responses are Helpful and Harmless. We use QLoRA-tuned Llama-7b (Dettmers et al., 2023) as SFT model, and a fine-tuned GPT-J (Wang & Komatsuzaki, 2021) as the reward model. We train and evaluate using a subset of AntrophicHH (Bai et al., 2022) dataset. See appendix B.1 for hyperlinks to all the datasets and models described above.
320
+
321
+ Evaluation metrics: We use win-rate over gold responses and direct win-rate against the baseline responses to measure the performance of various techniques. Win-rate is defined as the fraction of test samples on which the generated response gets a higher reward than the gold response. We use two independent reward functions to compute the win-rate: (1) Train RM, which is the reward function used to align the SFT model, and (2) LLM eval, which follows LLM-as-a-judge (Zheng et al., 2023) and prompts a strong instruction following LLM, Mixtral-8x7B (Jiang et al., 2024), to compare the two outputs and declare a winner. The first metric captures the effectiveness of the alignment method in maximizing the specified reward, while a high win-rate using the LLM prompting ensures that the alignment method is not resorting to reward-hacking (Skalse et al., 2022).
322
+
323
+ We prompt GPT-4 (OpenAI et al., 2023) to directly compare BRAIN's responses with each of the baselines separately. See appendix B.3 for the specific instructions used for prompting GPT-4 and Mixtral-8x7B.
324
+
325
+ Training details: While DPO uses human-annotated data directly, we generate $n = 32$ samples per input prompt for the other models (DPO-sft, RSO, and BRAIN). The samples are organized in 16 pairs for DPO-sft and RSO, while for BRAIN, the 32 samples are grouped together. We use $\gamma = 1$ for BRAIN in all our experiments, unless otherwise stated, and average the log-probability of the tokens. We train each model for a total of 10,000 steps ( $e = 40$ and $k = 250$ in algorithm 1) with 4 prompts and 32 outputs per prompt in a batch $B$ . The model is evaluated after every 1,000 steps and the best model is selected based on the win rate against the gold response on the cross-validation set. Other training
326
+
327
+ Table 2. Head-to-head comparison of the BRAIN against the baselines using GPT-4.
328
+
329
+ <table><tr><td rowspan="2"></td><td colspan="3">AnthropicHH</td><td colspan="3">Reddit TL;DR</td></tr><tr><td>Win %</td><td>Tie %</td><td>Loss %</td><td>Win %</td><td>Tie %</td><td>Loss %</td></tr><tr><td>vs DPO</td><td>44.0</td><td>31.6</td><td>21.4</td><td>42.1</td><td>19.6</td><td>38.3</td></tr><tr><td>vs DPO-sft</td><td>45.4</td><td>34.4</td><td>20.2</td><td>45.2</td><td>18.9</td><td>35.9</td></tr><tr><td>vs RSO</td><td>44.2</td><td>35.5</td><td>20.3</td><td>45.1</td><td>17.6</td><td>37.3</td></tr></table>
330
+
331
+ details are given in Appendix B.2.
332
+
333
+ # 7. Experimental Results
334
+
335
+ Research Questions: Our experiments aim to assess BRAIN's performance in aligning an SFT model to a given reward function and compare it against various baselines. Specifically, we answer the following research questions:
336
+
337
+ 1. How does BRAIN compare to existing baselines?
338
+ 2. How does the KL-reward frontier of BRAIN compare with that of DPO?
339
+ 3. What is the role of self-normalized baseline subtraction in BRAIN?
340
+ 4. How to bridge the gap between DPO and BRAIN?
341
+ 5. How does varying the number of output samples per input affect BRAIN's performance?
342
+
343
+ # 7.1. Comparison with baselines
344
+
345
+ Table 1 compares the win-rate of BRAIN against our baselines - RSO, DPO, and DPO-sft. We observe that BRAIN consistently outperforms all the baselines, irrespective of the model used to compute win-rates. Specifically, when measured using the specified reward model, BRAIN achieves 8 and 4 pts better win-rate than the strongest baseline on AntrophicHH and TL;DR, respectively. Next, we observe that even though DPO-sft has a much better win-rate than DPO when computed using the specified reward function, their performance is the same when judged by an independent LLM, indicative of reward-hacking.
346
+
347
+ In Table 2, we summarize the results of head-to-head comparisons of BRAIN with each of the baselines judged by GPT-4 on a set of 500 examples from each of the dataset. Win % indicates the percentage of examples for which BRAIN was declared the winner compared to the baseline. We observe that BRAIN wins twice as many times as the baselines on AnthropicHH.
348
+
349
+ # 7.2. KL-reward frontier
350
+
351
+ Next, we compare the KL-reward frontier of BRAIN with that of DPO-sft by varying the value of $\gamma$ ( $\beta$ in the case of DPO-sft) and selecting multiple checkpoints for each $\beta/\gamma$ . For each checkpoint, we sample 1000 prompts and generate 8 outputs per prompt. For each output, we compute
352
+
353
+ ![](images/9722aa5dcb7587b129e0fc2d6c61965b8c09855673a4dfe44ffbcf97980b2dcf.jpg)
354
+ Figure 2. The KL-reward frontier of BRAIN and DPO-sft
355
+
356
+ the reward $r(x,y)$ and $\log q_{\theta}(y|x) - \log p(y|x)$ and average them over the outputs and the prompts. This gives us (KL, reward) for each checkpoint. We plot these values in Figure 2.
357
+
358
+ As can be observed from the plot, for the same KL divergence, BRAIN achieves a much higher reward than DPO-sft. Moreover, DPO-sft fails to achieve a reward as high as BRAIN no matter how much the beta value is decreased.
359
+
360
+ # 7.3. Role played by self-normalized baseline
361
+
362
+ Next, we demonstrate the crucial role that the self-normalized baseline plays in BRAIN.
363
+
364
+ Our first experiment is a toy experiment where the posterior/ target is defined to be the 1-D standard Gaussian distribution $\mathcal{N}(0,1)$ . The training policy $q_{\theta}$ is also Gaussian $\mathcal{N}(1,1)$ . We generate samples from the proposal distribution which is also chosen to be Gaussian $\mathcal{N}(\theta ,1)$ where $\theta$ is varied from 0 to 1. For each value of $\theta$ , we generate 8 samples from the proposal distribution to compute the GDC, $\mathrm{GDC + + }$ (Korbak et al., 2022; Khalifa et al., 2020b), and BRAIN gradient estimate. We repeat this experiment 2000 times and compute the variance across the different sets. The results are plotted in Figure 3.
365
+
366
+ <table><tr><td></td><td>BRAIn</td><td>w/o self-norm</td><td>w/o baseline</td></tr><tr><td>TL;DR</td><td>95.2</td><td>61.4</td><td>61.1</td></tr><tr><td>AnthropicHH</td><td>95.4</td><td>59.1</td><td>58.3</td></tr></table>
367
+
368
+ Table 3. Effect of self-normalized baseline on the performance of various models.
369
+
370
+ Next, we demonstrate the effect of self-normalized baseline on the performance of BRAIN on TL;DR and Anthropic datasets. Table 3 summarizes our observations about the role
371
+
372
+ ![](images/0e87802f19663e77c044e50b5cfd81a9b1451e6df394eb7e553efefaf069bf36.jpg)
373
+ Figure 3. Variance of GDC, GDC++ and BRAIN gradient estimates
374
+
375
+ Table 4. Win-rates (in %age) obtained by incrementally augmenting DPO-sft; DPO-sft+IW: replace argmax by softmax; DPO-sft+IW+n: take softmax over $n = 32$ outputs, instead of two outputs in 16 pairs
376
+
377
+ <table><tr><td></td><td>DPO-sft</td><td>DPO-sft +IW</td><td>DPO-sft +IW+n</td><td>BRAIN</td></tr><tr><td>Train RM</td><td>87.37±0.91</td><td>89.21±0.85</td><td>93.30±0.69</td><td>95.40±0.57</td></tr><tr><td>LLM eval</td><td>66.78±1.29</td><td>69.28±1.27</td><td>73.89±1.21</td><td>74.36±1.17</td></tr></table>
378
+
379
+ that self-normalization of baseline plays in performance. As can be observed, there is a drastic reduction in performance if self-normalization in the baseline is removed.
380
+
381
+ # 7.4. Bridging the gap between DPO-sft and BRAIN
382
+
383
+ In section 5.2, we show that under certain restrictions, BRAIN objective reduces to DPO-sft objective. In this section, we start with DPO-sft and relax these restrictions one at a time to demonstrate the impact of each restriction. First, we get rid of argmax and reintroduce softmax over rewards (eq. (21)) to compute self-normalized importance weights $\hat{\alpha}_{y_i}$ . This corresponds to the objective in eq. (23). We call this DPO-sft+IW. Next, we relax the assumption of $n = 2$ , and take softmax over $n = 32$ outputs instead of softmax over two samples in 16 pairs. We call it DPO-sft+IW+n. Finally, we relax the restriction of proposal distribution to be the prior distribution only and instead update our proposal periodically (algorithm 1) to arrive at BRAIN.
384
+
385
+ Table 4 compares the win-rate of the two intermediate models (DPO-sft+IW, and DPO-sft+IW+n) with DPO-sft and BRAIN over the AntropicHH dataset. We first observe that relaxing each restriction consistently improves both the win-rates. The biggest gain ( $\sim$ 4 pts) comes by relaxing the assumption of $n = 2$ and taking a softmax over all 32 outputs. This is expected as information contained in simultaneously comparing 32 outputs is potentially more than
386
+
387
+ ![](images/7c4a358923ed40043f690c96be88fcb563900a79ab2ba59333c7d9d5bfdd649a.jpg)
388
+ Figure 4. Plot of Win-rate Against Gold as a function of the Number of Samples per Prompt.
389
+
390
+ only 16 pairs.
391
+
392
+ # 7.5. Effect of the number of output samples
393
+
394
+ Next, we study the effect of varying the number of output samples $(n)$ per input prompt $x$ on the performance of BRAIN. We retrain DPO-sft and BRAIN on AntropicHH dataset for each $n\in \{2,4,8,16,32\}$ . As done earlier, we create $n / 2$ pairs from the $n$ samples while training DPO-sft. The win-rates computed by specified reward model (Train RM) for each $n$ are plotted in section 7.5. We observe that including more samples in BRAIN objective leads to improvement in performance till $n = 8$ after which it saturates, whereas the performance of DPO-sftimproves monotonically, albeit slowly.
395
+
396
+ # 8. Conclusion
397
+
398
+ In this paper, we propose an LLM alignment algorithm called BRAIN: Bayesian Reward-conditioned Amortized Inference. The primary novelty in BRAIN is the inclusion of a self-normalized baseline in the gradient estimate of distribution matching objectives for RL, that we refer to as BRAIN gradient estimate. Theoretically, the self-normalized baseline helps us to establish a connection between distribution matching methods and DPO, showing that DPO (DPO-sft, to be specific) is a special case of BRAIN. We further establish that the BRAIN gradient estimate is the gradient of a self-normalized version of KL divergence whose properties we intend to explore in future work. Additionally, we generalize the target distribution in PPO/DPO using Bayes' rule. The experimental results demonstrate the superiority of BRAIN over other RLHF methods.
399
+
400
+ # Impact Statement
401
+
402
+ 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.
403
+
404
+ # References
405
+
406
+ Azar, M. G., Guo, Z. D., Piot, B., Munos, R., Rowland, M., Valko, M., and Calandriello, D. A general theoretical paradigm to understand learning from human preferences. In International Conference on Artificial Intelligence and Statistics, pp. 4447-4455. PMLR, 2024.
407
+ Bai, Y., Jones, A., and et al., K. N. Training a helpful and harmless assistant with reinforcement learning from human feedback, 2022.
408
+ Chen, L., Lu, K., Rajeswaran, A., Lee, K., Grover, A., Laskin, M., Abbeel, P., Srinivas, A., and Mordatch, I. Decision transformer: Reinforcement learning via sequence modeling. Advances in neural information processing systems, 34:15084-15097, 2021.
409
+ Dettmers, T., Pagnoni, A., Holtzman, A., and Zettlemoyer, L. Qlora: Efficient finetuning of quantized llms. arXiv preprint arXiv:2305.14314, 2023.
410
+ Ethayarajh, K., Xu, W., Muennighoff, N., Jurafsky, D., and Kiela, D. Kto: Model alignment as prospect theoretic optimization. arXiv preprint arXiv:2402.01306, 2024.
411
+ Ficler, J. and Goldberg, Y. Controlling linguistic style aspects in neural language generation. In Brooke, J., Solorio, T., and Koppel, M. (eds.), Proceedings of the Workshop on Stylistic Variation, pp. 94-104, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/W17-4912. URL https://aclanthology.org/W17-4912.
412
+ Hong, J., Lee, N., and Thorne, J. Reference-free monolithic preference optimization with odds ratio. arXiv preprint arXiv:2403.07691, 2024.
413
+ Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., and Chen, W. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
414
+ Ivison, H., Wang, Y., Pyatkin, V., Lambert, N., Peters, M., Dasigi, P., Jang, J., Wadden, D., Smith, N. A., Beltagy, I., et al. Camels in a changing climate: Enhancing lm adaptation with tulu 2. arXiv preprint arXiv:2311.10702, 2023.
415
+ Jaques, N., Gu, S., Turner, R. E., and Eck, D. Tuning recurrent neural networks with reinforcement learning. 2017.
416
+
417
+ Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary, B., Bamford, C., Chaplot, D. S., de Las Casas, D., Hanna, E. B., Bressand, F., Lengyel, G., Bour, G., Lample, G., Lavaud, L. R., Saulnier, L., Lachaux, M., Stock, P., Subramanian, S., Yang, S., Antoniak, S., Scao, T. L., Gervet, T., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mixtral of experts. CoRR, abs/2401.04088, 2024. doi: 10.48550/ARXIV.2401.04088. URL https://doi.org/10.48550/arXiv.2401.04088.
418
+ Khalifa, M., Elsahar, H., and Dymetman, M. A distributional approach to controlled text generation. arXiv preprint arXiv:2012.11635, 2020a. URL https:// arxiv.org/pdf/2012.11635.
419
+ Khalifa, M., Elsahar, H., and Dymetman, M. A distributional approach to controlled text generation. In International Conference on Learning Representations, 2020b.
420
+ Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
421
+ Korbak, T., Elsahar, H., Kruszewski, G., and Dymetman, M. On reinforcement learning and distribution matching for fine-tuning language models with no catastrophic forgetting. Advances in Neural Information Processing Systems, 35:16203-16220, 2022.
422
+ Korbak, T., Shi, K., Chen, A., Bhalerao, R. V., Buckley, C., Phang, J., Bowman, S. R., and Perez, E. Pretraining language models with human preferences. In International Conference on Machine Learning, pp. 17506-17533. PMLR, 2023.
423
+ Levine, S. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018.
424
+ Liu, T., Zhao, Y., Joshi, R., Khalman, M., Saleh, M., Liu, P. J., and Liu, J. Statistical rejection sampling improves preference optimization. arXiv preprint arXiv:2309.06657, 2023.
425
+ Lu, X., Welleck, S., Hessel, J., Jiang, L., Qin, L., West, P., Ammanabrolu, P., and Choi, Y. Quark: Controllable text generation with reinforced unlearning. Advances in neural information processing systems, 35:27591-27609, 2022.
426
+ OpenAI, :, Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., et al. GPT-4 technical report, 2023.
427
+ Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744, 2022.
428
+
429
+ Owen, A. B. Monte Carlo theory, methods and examples. https://artowen.su/domains/mc/, 2013.
430
+ Parshakova, T., Andreoli, J., and Dymetman, M. Distributional reinforcement learning for energy-based sequential models. CoRR, abs/1912.08517, 2019. URL http://arxiv.org/abs/1912.08517.
431
+ Rafailov, R., Sharma, A., Mitchell, E., Ermon, S., Manning, C. D., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. arXiv preprint arXiv:2305.18290, 2023.
432
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
433
+ Skalse, J., Howe, N. H. R., Krasheninnikov, D., and Krueger, D. Defining and characterizing reward hacking. CoRR, abs/2209.13085, 2022. doi: 10.48550/ARXIV.2209.13085. URL https://doi.org/10.48550/arXiv.2209.13085.
434
+ Stiannon, N., Ouyang, L., Wu, J., Ziegler, D. M., Lowe, R., Voss, C., Radford, A., Amodei, D., and Christiano, P. F. Learning to summarize from human feedback. CoRR, abs/2009.01325, 2020. URL https://arxiv.org/abs/2009.01325.
435
+ Tokdar, S. T. and Kass, R. E. Importance sampling: a review. Wiley Interdisciplinary Reviews: Computational Statistics, 2(1):54-60, 2010.
436
+ Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., et al. Llama 2: Open foundation and finetuned chat models. arXiv preprint arXiv:2307.09288, 2023.
437
+ Tunstall, L., Beeching, E., Lambert, N., Rajani, N., Rasul, K., Belkada, Y., Huang, S., von Werra, L., Fourrier, C., Habib, N., et al. Zephyr: Direct distillation of lm alignment. arXiv preprint arXiv:2310.16944, 2023.
438
+ Volske, M., Potthast, M., Syed, S., and Stein, B. Tl;dr: Mining reddit to learn automatic summarization. In Wang, L., Cheung, J. C. K., Carenini, G., and Liu, F. (eds.), Proceedings of the Workshop on New Frontiers in Summarization, NFiS@EMNLP 2017, Copenhagen, Denmark, September 7, 2017, pp. 59-63. Association for Computational Linguistics, 2017. doi: 10.18653/V1/W17-4508. URL https://doi.org/10.18653/v1/w17-4508.
439
+ Wang, B. and Komatsuzaki, A. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoffolz/mesh-transformer-jax, May 2021.
440
+
441
+ Ye, J., Chen, X., Xu, N., Zu, C., Shao, Z., Liu, S., Cui, Y., Zhou, Z., Gong, C., Shen, Y., Zhou, J., Chen, S., Gui, T., Zhang, Q., and Huang, X. A comprehensive capability analysis of gpt-3 and gpt-3.5 series models, 2023.
442
+ Yuan, Z., Yuan, H., Tan, C., Wang, W., Huang, S., and Huang, F. RRHF: Rank responses to align language models with human feedback without tears. arXiv preprint arXiv:2304.05302, 2023.
443
+ Zhao, Y., Joshi, R., Liu, T., Khalman, M., Saleh, M., and Liu, P. J. SLCiC-HF: Sequence likelihood calibration with human feedback. arXiv preprint arXiv:2305.10425, 2023.
444
+ Zheng, L., Chiang, W., Sheng, Y., Zhuang, S., Wu, Z., Zhuang, Y., Lin, Z., Li, Z., Li, D., Xing, E. P., Zhang, H., Gonzalez, J. E., and Stoica, I. Judging llm-as-a-judge with mt-bench and chatbot arena. CoRR, abs/2306.05685, 2023. doi: 10.48550/ARXIV.2306.05685. URL https://doi.org/10.48550/arXiv.2306.05685.
445
+ Ziegler, D. M., Stiannon, N., Wu, J., Brown, T. B., Radford, A., Amodei, D., Christiano, P., and Irving, G. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593, 2019.
446
+
447
+ # A. Proof of Theorems
448
+
449
+ For the sake of completeness, we restate the definitions and the theorems here.
450
+
451
+ Definition 4.1. Let the proposal distribution $q'(y|x)$ , training policy $q_{\theta}(y|x)$ and posterior $p(y|x,G = 1)$ be as defined earlier. Furthermore, we assume that support $(p)\subseteq \mathrm{support}(q_{\theta})\subseteq \mathrm{support}(q')$ . For any $n$ outputs, $Y_{x} = (y_{1},\ldots ,y_{n})$ , let $\hat{\alpha}_{y_i}$ and $\hat{\beta}_{y_i}$ be the self-normalized importance sampling weights for the loss and the baseline, respectively (eqs. (6) and (12)). The self-normalized KL-divergence between the posterior and training policy for the given proposal distribution is defined as:
452
+
453
+ $$
454
+ \begin{array}{l} D _ {n} ^ {q ^ {\prime}} (p (y | x, G = 1) | | q _ {\theta} (y | x)) \\ = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \left[ D _ {K L} \left(\hat {\alpha} _ {Y _ {x}} \right\| \hat {\beta} _ {Y _ {x}} \right] \text {w h e r e} \tag{14} \\ \end{array}
455
+ $$
456
+
457
+ $$
458
+ D _ {K L} \left(\hat {\alpha} _ {Y _ {x}} \| \hat {\beta} _ {Y _ {x}}\right) = \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \log \frac {\hat {\alpha} _ {y _ {i}}}{\hat {\beta} _ {y _ {i}}} \tag {15}
459
+ $$
460
+
461
+ Theorem 4.2. The BRAIN gradient estimate defined in (13) is an unbiased estimator of the gradient (w.r.t. $\theta$ ) of negative self-normalized KL-divergence between the posterior $p(y|x, G = 1)$ and training policy $q_{\theta}(y|x)$ defined in (14). Here, the dependence of KL divergence on $\theta$ comes from $\hat{\beta}_{y_i}$ being a function of $q_{\theta}(y_i|x)$ .
462
+
463
+ Proof. For unbiasedness of the BRAIN gradient estimator, we need to show the following
464
+
465
+ $$
466
+ \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \sum_ {i = 1} ^ {n} \left(\hat {\alpha} _ {y _ {i}} - \hat {\beta} _ {y _ {i}}\right) \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x) = - \nabla_ {\theta} D _ {n} ^ {q ^ {\prime}} (p (y | x, G = 1) || q _ {\theta} (y | x)), \tag{24}
467
+ $$
468
+
469
+ where $\mathbf{y} = (y_{1},\ldots ,y_{n})$ is a sequence of $n$ outputs, the values of $\alpha$ and $\beta$ are as defined in (6) and (12) respectively. The superscripts in $\alpha$ and $\beta$ denote their explicit dependence on the output sequence.
470
+
471
+ To prove the above, we expand each negative KL-divergence term in the self-normalized KL-divergence in terms of the entropy of normalized $\alpha_{y_i}$ and the cross-entropy between self-normalized $\alpha_{y_i}$ and $\beta_{y_i}$ .
472
+
473
+ $$
474
+ - D _ {n} ^ {q ^ {\prime}} = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \left[ \mathcal {H} \left(\hat {\alpha} _ {y _ {i}}\right) + \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \log \hat {\beta} _ {y _ {i}} \right] \tag{25}
475
+ $$
476
+
477
+ Since the values $\alpha$ don't depend on $\theta$ , they are discarded during the gradient computation. Hence, the gradient can be written as
478
+
479
+ $$
480
+ - \nabla_ {\theta} D _ {n} ^ {q ^ {\prime}} = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \nabla_ {\theta} \left[ \log \hat {\beta} _ {y _ {i}} \right] \tag{26}
481
+ $$
482
+
483
+ Noting that $\hat{\beta}_{y_i} = \frac{\beta_{y_i}}{\sum_{j=1}^{n} \beta_{y_j}}$ , we split the logarithm and compute the gradient of each term separately.
484
+
485
+ $$
486
+ \begin{array}{l} - \nabla_ {\theta} D _ {n} ^ {q ^ {\prime}} = \mathbb {E} _ {y _ {i} \sim q ^ {\prime} (y | x)} \sum_ {1 \leq i \leq n} ^ {n} \hat {\alpha} _ {y _ {i}} \left[ \nabla_ {\theta} \log \beta_ {y _ {i}} - \nabla_ {\theta} \log \sum_ {j = 1} ^ {n} \beta_ {y _ {j}} \right] (27) \\ = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \sum_ {i = 1} ^ {n} \hat {\alpha} _ {y _ {i}} \left[ \nabla_ {\theta} \log \beta_ {y _ {i}} - \frac {\sum_ {j = 1} ^ {n} \nabla_ {\theta} \beta_ {y _ {j}}}{\sum_ {j = 1} ^ {n} \beta_ {y _ {j}}} \right] (28) \\ \end{array}
487
+ $$
488
+
489
+ Next, we note that $\nabla_{\theta}\beta_{y_i} = \beta_{y_i}\nabla_{\theta}\log \beta_{y_i}$ and
490
+
491
+ $$
492
+ \nabla_ {\theta} \log \beta_ {y _ {i}} = \nabla_ {\theta} \left[ \log q _ {\theta} \left(y _ {i} | x\right) - \log q ^ {\prime} \left(y _ {i} | x\right) \right] = \beta_ {y _ {i}} \nabla_ {\theta} \log q _ {\theta} \left(y _ {i} | x\right) \tag {29}
493
+ $$
494
+
495
+ Replacing these results back in equation (28), we get the desired result.
496
+
497
+ $$
498
+ \begin{array}{l} - \nabla_ {\theta} D _ {n} ^ {q ^ {\prime}} = \mathbb {E} _ {y _ {i} \sim q ^ {\prime} (y | x)} \sum_ {1 \leq i \leq n} ^ {n} \hat {\alpha} _ {y _ {i}} \left[ \nabla_ {\theta} \log q _ {\theta} \left(y _ {i} \mid x\right) - \frac {\sum_ {j = 1} ^ {n} \beta_ {y _ {j}} \nabla_ {\theta} \log q _ {\theta} \left(y _ {j} \mid x\right)}{\sum_ {j = 1} ^ {n} \beta_ {y _ {j}}} \right] (30) \\ = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \left[ \frac {\sum_ {i = 1} ^ {n} \alpha_ {y _ {i}} \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x)}{\sum_ {j = 1} ^ {n} \alpha_ {y _ {j}}} - \frac {\sum_ {i = 1} ^ {n} \beta_ {y _ {i}} \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x)}{\sum_ {j = 1} ^ {n} \beta_ {y _ {j}}} \right] (31) \\ = \mathbb {E} _ {\substack {y _ {i} \sim q ^ {\prime} (y | x) \\ 1 \leq i \leq n}} \sum_ {i = 1} ^ {n} \left[ \hat {\alpha} _ {y _ {i}} - \hat {\beta} _ {y _ {i}} \right] \nabla_ {\theta} \log q _ {\theta} (y _ {i} | x) (32) \\ \end{array}
499
+ $$
500
+
501
+ Theorem 4.3. The self-normalized KL-divergence defined in (14) reaches its minimum value of 0 if and only if the KL-divergence between the posterior and training policy also reaches 0. Also, $q_{\theta}(y|x) = p(y|x,G = 1)$ is the only minima of self-normalized KL-divergence defined in (14).
502
+
503
+ Proof. First, we will prove that $D_{KL} = 0 \Rightarrow D_n^{q'} = 0$ which is its minimum value. We note that the self-normalized KL-divergence is the weighted sum of KL-divergence between the normalized values of $\alpha$ and $\beta$ . Hence, from the property of KL-divergence, it can't be negative, that is, $D_n^{q'} \geq 0$ . Now, let's assume that $D_{KL}(p(y|x,G = 1)||q_\theta (y|x)) = 0$ . By the property of KL-divergence, this implies that $p(y|x,G = 1) = q_\theta (y|x)\forall y\in \mathcal{V}$ . Thus:
504
+
505
+ $$
506
+ \beta_ {y _ {i}} = \frac {q _ {\theta} (y _ {i} | x)}{q ^ {\prime} (y _ {i} | x)} = \frac {p (y _ {i} | x , G = 1)}{q ^ {\prime} (y _ {i} | x)} = \alpha_ {y _ {i}} \tag {33}
507
+ $$
508
+
509
+ Incorporating it in the definition of self-normalized KL divergence in (14), we get:
510
+
511
+ $$
512
+ D _ {n} ^ {q ^ {\prime}} (p (y | x, G = 1) \| q _ {\theta} (y | x)) = \mathbb {E} _ {\mathbf {y} \sim q ^ {\prime} (y | x)} \left[ D _ {K L} \left(\hat {\alpha} _ {y _ {i}} \right\| \hat {\alpha} _ {y _ {i}}) \right] = 0 \tag {34}
513
+ $$
514
+
515
+ Instead of proving the other direction, we provide a constructive proof of its contrapositive, that is, $D_{KL} \neq 0 \Rightarrow D_n^{q'} \neq 0$ . To see this, we note that $D_{KL} \neq 0$ implies the existence of at least one output, say $y_+$ , where the posterior and policy disagree. Without loss of generality, let's assume that $p(y_+|x, G = 1) > q_\theta(y_+|x)$ . Since the probabilities must up to 1, there must exist at least one output, say $y_-$ , for which $p(y_-|x, G = 1) < q_\theta(y_-|x)$ .
516
+
517
+ Since self-normalized KL-divergence $D_{n}^{q^{\prime}}$ has a KL-divergence $D_{KL}$ term for every sequence of length $n$ , we construct a sequence $\mathbf{y} = (y_{+}, y_{-}, \ldots, y_{-})$ . For such a sequence, all the values of $\alpha$ except the first one are equal. We note that the importance weight of the first output, that is $\alpha_{y_{+}} = \frac{p(y_{+}|x,G=1)}{q'(y_{+}|x)} > \frac{q_{\theta}(y_{+}|x)}{q'(y_{+}|x)} = \beta_{y_{+}}$ . Similarly, the second importance weight $\alpha_{y_{-}} = \frac{p(y_{-}|x,G=1)}{q'(y_{-}|x)} < \frac{q_{\theta}(y_{-}|x)}{q'(y_{-}|x)} = \beta_{y_{-}}$ . Combining these two results we get $\frac{\alpha_{y_{-}}}{\beta_{y_{-}}} < 1 < \frac{\alpha_{y_{+}}}{\beta_{y_{+}}}$ . This can further be written as $\frac{\alpha_{y_{-}}}{\alpha_{y_{+}}} < \frac{\beta_{y_{-}}}{\beta_{y_{+}}}$ .
518
+
519
+ Plugging in this result, the normalized values of $\alpha$ for the sequence are given by:
520
+
521
+ $$
522
+ \frac {\alpha_ {y _ {1}}}{\sum_ {j = 1} ^ {n} \alpha_ {y _ {j}}} = \frac {\alpha_ {y _ {1}}}{\alpha_ {y _ {+}} + (n - 1) \alpha_ {y _ {-}}} = \frac {1}{1 + (n - 1) \frac {\alpha_ {y _ {-}}}{\alpha_ {y _ {+}}}} > \frac {1}{1 + (n - 1) \frac {\beta_ {y _ {-}}}{\beta_ {y _ {+}}}} = \frac {\beta_ {y _ {+}}}{\beta_ {y _ {+}} + (n - 1) \beta_ {y _ {-}}} = \frac {\beta_ {y _ {1}}}{\sum_ {j = 1} ^ {n} \beta_ {y _ {j}}} \tag {35}
523
+ $$
524
+
525
+ Thus the KL-divergence term for this particular sequence, that is $D_{KL}\left(\hat{\alpha}_{y_i}||\hat{\beta}_{y_i}\right)$ , is strictly greater than 0. Since the support of proposal distribution includes the support of posterior and trainable policy, we get
526
+
527
+ $$
528
+ D _ {n} ^ {q ^ {\prime}} (p (y | x, G = 1) | | q _ {\theta} (y | x)) = \mathbb {E} _ {\mathbf {y} \sim q ^ {\prime} (y | x)} \left[ D _ {K L} \left(\hat {\alpha} _ {y _ {i}} \| \hat {\beta} _ {y _ {i}}\right) \right] > 0 \tag {36}
529
+ $$
530
+
531
+ Together with equation (34), this proves that $D_{KL} = 0 \Rightarrow D_n^{q'} = 0$
532
+
533
+ Proposition 5.1. For the Bradley-Terry preference model defined in eq. (17) and parameterized by eq. (18), the self-normalized importance-weights $\hat{\alpha}_{y_i} = \alpha_{y_i} / \sum_{j=1}^{n} \alpha_{y_j}$ have the following form:
534
+
535
+ $$
536
+ \frac {\exp \left(\frac {r (x , y _ {i})}{\gamma} + \log p \left(y _ {i} \mid x\right) - \log q ^ {\prime} \left(y _ {i} \mid x\right)\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {r (x , y _ {j})}{\gamma} + \log p \left(y _ {j} \mid x\right) - \log q ^ {\prime} \left(y _ {j} \mid x\right)\right)} \tag {20}
537
+ $$
538
+
539
+ In the special case where the proposal distribution $q'(y|x)$ is the same as the prior distribution $p(y|x)$ , the importance weights reduce to
540
+
541
+ $$
542
+ \hat {\alpha} _ {y _ {i}} = \frac {\exp \left(\frac {r (x , y _ {i})}{\gamma}\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {r (x , y _ {j})}{\gamma}\right)} \tag {21}
543
+ $$
544
+
545
+ Proof. The proof follows from the application of Bayes' rule and the parameterization of Bradley-Terry model given in (19).
546
+
547
+ $$
548
+ \begin{array}{l} \hat {\alpha} _ {y _ {i}} = \frac {p \left(y _ {i} \mid x , G = 1\right) / q ^ {\prime} \left(y _ {i} \mid x\right)}{\sum_ {j = 1} ^ {n} p \left(y _ {j} \mid x , G = 1\right) / q ^ {\prime} \left(y _ {j} \mid x\right)} (37) \\ = \frac {\frac {p \left(y _ {i} \mid x\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)} \times \frac {p (G = 1 \mid y _ {i} , x)}{p (G = 1 \mid x)}}{\sum_ {j = 1} ^ {n} \frac {p \left(y _ {j} \mid x\right)}{q ^ {\prime} \left(y _ {j} \mid x\right)} \times \frac {p (G = 1 \mid y _ {j} , x)}{p (G = 1 \mid x)}} (38) \\ = \frac {\frac {p \left(y _ {i} \mid x\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)} \times p \left(G = 1 \mid y _ {i} , x\right)}{\sum_ {j = 1} ^ {n} \frac {p \left(y _ {j} \mid x\right)}{q ^ {\prime} \left(y _ {j} \mid x\right)} \times p \left(G = 1 \mid y _ {j} , x\right)} (39) \\ = \frac {\frac {p \left(y _ {i} \mid x\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)}}{\sum_ {j = 1} ^ {n} \frac {p \left(y _ {j} \mid x\right)}{q ^ {\prime} \left(y _ {j} \mid x\right)} \times \frac {p (G = 1 \mid y _ {j} , x)}{p (G = 1 \mid y _ {i} , x)}} (40) \\ = \frac {\frac {p \left(y _ {i} \mid x\right)}{q ^ {\prime} \left(y _ {i} \mid x\right)}}{\sum_ {j = 1} ^ {n} \frac {p \left(y _ {j} \mid x\right)}{q ^ {\prime} \left(y _ {j} \mid x\right)} \times \exp \left(\frac {r \left(x , y _ {j}\right) - r \left(x , y _ {i}\right)}{\gamma}\right)} (41) \\ = \frac {\exp \left(\frac {r (x , y _ {i})}{\gamma} + \log p \left(y _ {i} \mid x\right) - \log q ^ {\prime} \left(y _ {i} \mid x\right)\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {r (x , y _ {j})}{\gamma} + \log p \left(y _ {j} \mid x\right) - \log q ^ {\prime} \left(y _ {j} \mid x\right)\right)} (42) \\ \end{array}
549
+ $$
550
+
551
+ Here (38) follows by applying Bayes rule (see (1)) while (41) follows from the Bradley-Terry formulation in (19). If we set $q'(y|x) = p(y|x)$ , we get a softmax over the rewards as desired.
552
+
553
+ Theorem 5.2. For a Bradley-Terry reward model, the posterior $p(y|x,G = 1)$ is same as the PPO optimal policy given by:
554
+
555
+ $$
556
+ p ^ {*} (y | x) = \frac {p (y | x) \exp \left(\frac {r (x , y)}{\gamma}\right)}{\left(\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) \exp \left(\frac {r (x , \bar {y})}{\gamma}\right)\right)} \tag {22}
557
+ $$
558
+
559
+ The above eqn. for PPO optimal policy is as shown in equation(4) in Rafailov et al. (2023). Note that the reference policy in DPO is same as the prior policy in our formulation.
560
+
561
+ Proof. We start with the definition of posterior in eq. (1), and use Bradley-Terry assumption to replace $p(G = 1|y, x)$ with a function of $r(x, y)$ .
562
+
563
+ In RHS of eq. (1), use total probability theorem to replace $p(G = 1|x)$ with $\sum_{\bar{y} \in \mathcal{Y}} p(\bar{y}|x)p(G = 1|\bar{y}, x)$ to get:
564
+
565
+ $$
566
+ p (y | x, G = 1) = \frac {p (y | x) p (G = 1 | y , x)}{\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) p (G = 1 | \bar {y} , x)}
567
+ $$
568
+
569
+ Next, move $p(y|x)p(G = 1|y,x)$ from the numerator to denominator:
570
+
571
+ $$
572
+ p (y | x, G = 1) = \frac {p (y | x)}{\left(\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) \frac {p (G = 1 | \bar {y} , x)}{p (G = 1 | y , x)}\right)}
573
+ $$
574
+
575
+ Now, use eq. (19) to replace $\frac{p(G = 1|\bar{y},x)}{p(G = 1|y,x)}$ in the denominator with $\exp \left(\frac{r(x,\bar{y}) - r(x,y)}{\gamma}\right)$ :
576
+
577
+ $$
578
+ p (y | x, G = 1) = \frac {p (y | x)}{\left(\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) \exp \left(\frac {r (x , \bar {y}) - r (x , y)}{\gamma}\right)\right)}
579
+ $$
580
+
581
+ Moving the common term $\exp \left(-\frac{r(x,y)}{\gamma}\right)$ from the denominator to numerator, we get:
582
+
583
+ $$
584
+ p (y | x, G = 1) = \frac {p (y | x) \exp \left(\frac {r (x , y)}{\gamma}\right)}{\left(\sum_ {\bar {y} \in \mathcal {Y}} p (\bar {y} | x) \exp \left(\frac {r (x , \bar {y})}{\gamma}\right)\right)}
585
+ $$
586
+
587
+ # B. Details of Experimental Setup
588
+
589
+ # B.1. Base models and datasets
590
+
591
+ In this section we provide links to all the publically available datasets and models used in our work.
592
+
593
+ We conduct experiments on two natural language generation tasks, viz., summarization, and multi-turn dialog. In the summarization task, we align CarperAI's summarization $\mathrm{LM}^3$ to a Bradley-Terry reward model<sup>4</sup>. The base/SFT model has been trained on post-summary pairs from the train set of Reddit TL;DR dataset<sup>5</sup>. The reward model used for summarization has been trained on human preferences collected by (Stiannon et al., 2020) on outputs generated from a different SFT model where the prompts come from the TL;DR dataset.
594
+
595
+ In the multi-turn dialog task, we ensure that a open-ended chatbot's responses are Helpful and Harmless. We use the Anthropic Helpful & Harmless dataset (Bai et al., 2022) for RLHF training. We use QLoRA-tuned Llama-7b $^6$ (Dettmers et al., 2023) as SFT model. It has been trained on the preferred/chosen responses of Anthropic HH dataset. A fine-tuned GPT-J $^7$ (Wang & Komatsuzaki, 2021) trained on a subset of the full Anthropic HH dataset is used as the reward model. We train and evaluate using a subset $^8$ of Antrophic HH (Bai et al., 2022) dataset.
596
+
597
+ # B.2. Other training details
598
+
599
+ All the models are trained using the PEFT $^{9}$ and Transformers $^{10}$ library. For Anthropic HH, we use QLoRA (Dettmers et al., 2023) for training BRAIN and the other baselines. In particular, we use the same QLoRA hyperparameters (rank=64, $\alpha = 16$ ) as used for supervised finetuning Llama-7B on Anthropic-HH dataset $^{11}$ . We use the Adam optimizer(Kingma & Ba, 2014) with a learning rate of $1e - 5$ , weight decay of 0.1 and $\beta_{1}$ and $\beta_{2}$ set to 0.9 and 0.95 respectively.
600
+
601
+ For summarization, we use LoRA(Hu et al., 2021) (rank=8, $\alpha = 32$ ). The optimizer, learning rate, weight decay and and $\beta$ values are the same as for Anthropic HH.
602
+
603
+ # B.3. Prompt for LLM-as-judge
604
+
605
+ In this section, we describe the prompts provided to the language models Mixtral-8x7B and GPT-4 for the purpose of comparing the gold standard outputs with the outputs generated by these models. Due to budget constraints, we evaluate only 500 test prompts using GPT-4. The tasks involve acting as an impartial judge in evaluating responses or summaries provided by AI assistants.
606
+
607
+ # B.3.1. PROMPT FOR ANTHROPIC HH
608
+
609
+ The prompt used for the Anthropic HH task is as follows:
610
+
611
+ "Please act as an impartial judge and evaluate the quality of the responses provided by the two AI assistants to the conversation displayed below. Your evaluation should consider correctness and helpfulness. You will be given a user conversation, assistant A's answer, and assistant B's answer. Your job is to evaluate which assistant's answer is better based on the user conversation so far. Begin your evaluation by comparing both assistants' answers with the user conversation so far. Identify and correct any mistakes. Avoid any position biases and ensure that the order in which the responses were presented does not influence your decision. Do not allow the length of the responses to influence your evaluation. Do not favor certain names of the assistants. Be as objective as possible. You should only evaluate the last utterance by both the assistants and not the full conversation. After providing your explanation, output your final verdict by strictly following this format: [[A]]if assistant A is better, [[B]]if assistant B is better, and [[C]]for a tie.
612
+
613
+ ```txt
614
+ {{Conversation}}
615
+ Assistant B {AssistantB}
616
+ Assistant A {AssistantA}
617
+ ```
618
+
619
+ # B.3.2. PROMPT FOR SUMMARIZATION
620
+
621
+ The prompt used for the Summarization task is outlined below:
622
+
623
+ "Please act as an impartial judge and evaluate the quality of the tldrs or summaries provided by the two AI assistants to the reddit post displayed below. Begin your evaluation by comparing both assistants' summaries with the reddit post so far. Do not allow the length of the summaries to influence your evaluation. After providing your explanation, output your final verdict by strictly following this format: [[A]]if assistant A is better, [[B]]if assistant B is better, and [[C]]for a tie.
624
+
625
+ ```txt
626
+ Reddit Post
627
+ {{Conversation}}
628
+ ```
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:197bc4caea22f9d18739e0b73678215f77e79b2786958bf04cc910f1603a0ac4
3
+ size 664663
2024/BRAIn_ Bayesian Reward-conditioned Amortized Inference for natural language generation from feedback/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/f2180f84-a70e-4dc1-a88f-4636a4a7e49a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4fd87259c44e8aca8cb0af0b3510361e498d96d609c275415628ced9b9191d9
3
+ size 2391385
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a62ff96465a03d01f3f5535133ebbd96880b8bb4e05ac34bae5f8f79a0e2a81
3
+ size 2387894
2024/BWS_ Best Window Selection Based on Sample Scores for Data Pruning across Broad Ranges/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/c044abfc-e9df-4ddc-a55b-74200f1c3cb6_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15feb82a2dd63e4f2ae38147e5c958bd64bf76fa30a987cbc52463ed6d2ba6b4
3
+ size 6375060
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/full.md ADDED
@@ -0,0 +1,493 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BadPart: Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks
2
+
3
+ Zhiyuan Cheng<sup>1</sup> Zhaoyi Liu<sup>2</sup> Tengda Guo<sup>2</sup> Shwei Feng<sup>1</sup> Dongfang Liu<sup>3</sup> Mingjie Tang<sup>2</sup> Xiangyu Zhang<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ Pixel-wise regression tasks (e.g., monocular depth estimation (MDE) and optical flow estimation (OFE)) have been widely involved in our daily life in applications like autonomous driving, augmented reality and video composition. Although certain applications are security-critical or bear societal significance, the adversarial robustness of such models are not sufficiently studied, especially in the black-box scenario. In this work, we introduce the first unified black-box adversarial patch attack framework against pixel-wise regression tasks, aiming to identify the vulnerabilities of these models under query-based black-box attacks. We propose a novel square-based adversarial patch optimization framework and employ probabilistic square sampling and score-based gradient estimation techniques to generate the patch effectively and efficiently, overcoming the scalability problem of previous black-box patch attacks. Our attack prototype, named BADPART, is evaluated on both MDE and OFE tasks, utilizing a total of 7 models. BADPART surpasses 3 baseline methods in terms of both attack performance and efficiency. We also apply BADPART on the Google online service for portrait depth estimation, causing $43.5\%$ relative distance error with 50K queries. State-of-the-art (SOTA) countermeasures cannot defend our attack effectively.
8
+
9
+ # 1. Introduction
10
+
11
+ Pixel-wise regression tasks represent a family of computer vision tasks that employ images as input and generate con
12
+
13
+ $^{1}$ Department of Computer Science, Purdue University, West Lafayette, USA $^{2}$ College of Computer Science, Sichuan University, Chengdu, China $^{3}$ Department of Computer Engineering, Rochester Institute of Technology, Rochester, USA. Correspondence to: Zhiyuan Cheng <cheng443@purdue.edu>, Xi-angyu Zhang <xyzhang@cs.purdue.edu>, Mingjie Tang <tangrock@gmail.com>.
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
+ ![](images/47f6d8f222211450dbd2f062a40d549f8a61c0f7377d67c6bd3621f61ed1a535.jpg)
18
+ Figure 1. Adversarial patch attack on pixel-wise regression tasks.
19
+
20
+ tinuous regression values for each pixel in the input image. Examples of such tasks include monocular depth estimation (MDE), optical flow estimation (OFE), surface normal estimation (SNE), among others. The evolution of deep learning techniques has led to the development of numerous DNN models that have demonstrated impressive performance on these tasks, thereby enabling a variety of downstream applications such as autonomous driving, augmented reality, video composition, and more. Given the extensive and security-sensitive nature of some of these applications, it is crucial to examine the adversarial robustness of these tasks.
21
+
22
+ Previous adversarial patch attacks on pixel-wise regression models (Cheng et al., 2022; 2023) have primarily been conducted in a white-box setting, where the attacker has complete knowledge of the target model and can use gradient-based optimization to create the patch and compromise the model. However, this white-box assumption is not always feasible. For instance, models used in autonomous vehicles are typically closed-source (Tesla). Moreover, some models are provided as an online service, preventing users from accessing their internals model structures (Google3DPortrait). In typical scenarios, black-box attacks are more realistic and could pose a greater threat to the security of these tasks. Existing black-box attack techniques are either based on training a substitute model or iteratively querying the model. In this study, we focus on the query-based approach as it reduces the cost of model training and only assumes that the attacker has access to the model output. This leads us to a pivotal inquiry: "can we craft an adversarial patch to compromise the pixel-wise regression model through iterative querying in a black-box manner?"
23
+
24
+ Answering the above question may bear direct relevance to applications of societal significance. For instance, in the realm of autonomous driving, attackers have been able to exploit the pixel-wise regression output of Tesla's depth estimation model through hacking (Lambert, 2021), and online services, such as Google Depth API (Google3DPortrait) and Clipdrop API (Clipdrop), readily provide access to pixelwise model outputs. The feasibility of such attacks within the context of autonomous driving would introduce a notable security concern. Meanwhile, on the other hand, the adversarial patch for online services could also act as a deterrent against unauthorized users who attempt to upload our photographs to those services for video composition.
25
+
26
+ To the best of our knowledge, we are the first to explore unified black-box patch attacks against pixel-wise regression tasks. Compared to classification tasks, pixel-wise regression tasks have denser (pixel-wise) query output and the resolution of input images is significantly higher. For example, the representative KITTI dataset (Uhrig et al., 2017) used in MDE and OFE tasks includes images with a resolution of $1242 \times 375$ , while most previous black-box patch attacks on classification models (Tao et al., 2023) use images from MINIST, CIFAR-10, GTSRB, etc., with a resolution less than $32 \times 32$ . The search space for a patch covering $1\%$ of the input images would expand exponentially as the resolution increases, hence the effectiveness and efficiency of prior methods are limited when adapted to our scenario.
27
+
28
+ To address this issue and enhance the scalability of blackbox patch generation, we leverage the domain knowledge of pixel-wise regression tasks and propose a novel square-based adversarial patch optimization framework. Specifically, in each iteration, we consider a small square area within the patch region to reduce the potential search space, then we introduce a batch of random noises on the square area to estimate the gradients of the region by evaluating the score of each noise in terms of attack performance. We sample the location of the square area probabilistically based on the pixel-wise error distribution, and propose novel score adjustment procedures for more precise gradient estimation. The source code is available at https://github.com/Bob-cheng/BadPart.
29
+
30
+ Figure 1 presents our attack performance. In summary, our contributions are as follows:
31
+
32
+ - We introduce the first unified black-box adversarial patch attack framework against pixel-wise regression tasks (e.g., monocular depth estimation and optical flow estimation).
33
+ - We devise a square-based universal adversarial patch generation approach, employing probabilistic square sampling and score-based gradient estimation, to facilitate scalable black-box patch optimization.
34
+ - We implement an attack prototype called BADPART (Black-box adversarial patch attack against pixel-wise
35
+
36
+ regression tasks). We evaluate the attack performance of BADPART on both MDE and OFE tasks, utilizing a total of 7 models that encompass both popular and SOTA ones. Compared with three baseline methods that employ varying black-box optimization strategies, BADPART surpasses them in terms of both attack performance and efficiency. We also apply BADPART to attack a Google online service for portrait depth estimation (Google3DPortrait), resulting in $43.5\%$ relative distance error with 50K queries.
37
+
38
+ # 2. Background and Related Work
39
+
40
+ Pixel-wise Regression Tasks. Pixel-wise regression tasks generate continuous values for each input pixel, differing from pixel-wise classification tasks like semantic segmentation (Wang et al., 2022; Liang et al., 2023; 2024; Liu et al., 2021), which assign a discrete class label to every pixel. Representative tasks of this type include monocular depth estimation (MDE) (Moon et al., 2019; Watson et al., 2019; Wang et al., 2023), optical flow estimation (OFE) (Teed & Deng, 2020; Ilg et al., 2017; Lu et al., 2023), and surface normal estimation (SNE) (Zeng et al., 2019; Lenssen et al., 2020; Bae et al., 2021). In MDE models, the output comprises the estimated pixel-wise distance between the 3D scenario and the camera capturing the input image, with each pixel corresponding to a distance estimation. OFE models use two consecutive image frames as input and output the estimated motion of pixels (the "optical flow") between the two frames. For each pixel in the first frame, a 2D vector is estimated, indicating its offset to the corresponding pixel in the second frame. SNE models output the estimated orientations of the surfaces in the input image, described with the "normal vectors" in 3D space that are perpendicular to the surface at the locations of pixels. Given that the first two tasks (MDE and OFE) have broader and more security-critical applications, such as autonomous driving (Karpathy, 2020), visual SLAM (Wimbauer et al., 2021), video composition (Liew et al., 2023), and augmented reality (Bang et al., 2017), our discussion primarily focuses on these two tasks. However, our proposed attack is a unified approach and can be readily applied to other pixel-wise regression tasks like SNE.
41
+
42
+ Black-box Adversarial Attacks. Existing black-box attacks can be broadly classified into two categories: substitute model-based attacks and query-based attacks. In the former, attackers construct a substitute model to execute white-box attacks and transfer the generated adversarial example to attack the victim model (Gao et al., 2020; Liu et al., 2016; He et al., 2021). To construct the substitute model, attackers employ the same training set as the victim model or reverse-engineer/synthesize a similar dataset. Many works propose innovative training approaches to further improve the transferability (Wu et al., 2020; Feng et al.,
43
+
44
+ 2022; Wang & He, 2021; Wang et al., 2021). In the latter category of attacks, known as query-based attacks, attackers directly optimize the adversarial example by iteratively querying the victim model. Most black-box attacks focus on classification tasks, and they can be further divided into two groups: hard-label attacks and soft-label attacks, depending on the query output that the attacker can access. Hard-label attacks (Chen et al., 2020; Li et al., 2020; Yan et al., 2020; Tao et al., 2023) assume that the attacker can only access the predicted label of the victim model, while soft-label attacks (Croce et al., 2022; Ilyas et al., 2018; Moon et al., 2019) assume the prediction score of each class is available. With iterative queries, some prior works optimize the adversarial noise via gradient estimation (Chen et al., 2019; Zhang et al., 2021; Tao et al., 2023), and some others rely on heuristic random search (Croce et al., 2022; Andriushchenko et al., 2020; Duan et al., 2021). Additionally, there are studies utilizing genetic algorithms to optimize the noise (Ilie et al., 2021; Alzantot et al., 2019). Our work also falls under the category of query-based black-box attacks. However, we are the first to target pixel-wise regression tasks. We confront the domain-specific obstacle of high-resolution patch optimization, given that the SOTA black-box patch attack (Tao et al., 2023) primarily concentrates on smaller patches and exhibits limited scalability in our scenario.
45
+
46
+ # 3. Problem Formalization
47
+
48
+ The objective of the attack is to generate an adversarial patch, denoted as $\mathbf{p}$ , for a black-box pixel-wise regression model $\mathcal{M}$ . The desired result is that, irrespective of the input image $\mathbf{x}$ , the attachment of the patch at location $\mathbf{q}$ on $\mathbf{x}$ will substantially degrade the model performance. Attackers can only query $\mathcal{M}$ for pixel-wise output. This black-box setting is highly practical as there are online services (Google3DPortrait; Clipdrop) that only allow users to upload custom images via API and return the depth estimation result. Additionally, in autonomous driving, attackers have shown to be able to reverse-engineer Tesla Autopilot to access the estimated depth map (Lambert, 2021). Formally, the optimization problem is expressed as follows:
49
+
50
+ $$
51
+ \max _ {\mathbf {p}} \operatorname {M e a n} \left(\mathcal {F} \left(\mathcal {M} \left([ \mathbf {x} ^ {\prime} ] _ {n}\right) - \mathcal {M} \left([ \mathbf {x} _ {\mathbf {0}} ^ {\prime} ] _ {n}\right)\right)\right) \tag {1}
52
+ $$
53
+
54
+ $$
55
+ \mathbf {s}. \mathbf {t}. \mathbf {p} \in [ 0, 1 ] ^ {3 \times h \times h}, \tag {2}
56
+ $$
57
+
58
+ $$
59
+ \text {w h e r e} [ \mathbf {x} ^ {\prime} ] _ {n} = \Lambda ([ \mathbf {x} ] _ {n}, \mathbf {p}, \mathbf {q}), \tag {3}
60
+ $$
61
+
62
+ $$
63
+ \left[ \mathbf {x} _ {\mathbf {0}} ^ {\prime} \right] _ {n} = \Lambda \left(\left[ \mathbf {x} \right] _ {n}, \mathbf {p} _ {\mathbf {0}}, \mathbf {q}\right), \tag {4}
64
+ $$
65
+
66
+ $$
67
+ \mathcal {F}: \mathbb {R} ^ {n \times d \times H \times W} \rightarrow \mathbb {R} ^ {H \times W} \tag {5}
68
+ $$
69
+
70
+ $$
71
+ \mathbf {x} \in [ 0, 1 ] ^ {3 \times H \times W}, \mathbf {p} _ {0} = \{0 \} ^ {3 \times h \times h}, \tag {6}
72
+ $$
73
+
74
+ $$
75
+ \mathbf {q} \in \{(i, j) | i = \frac {h}{2} \dots H - \frac {h}{2}, j = \frac {h}{2} \dots W - \frac {h}{2} \}. \tag {7}
76
+ $$
77
+
78
+ Here, $H$ and $W$ denote the height and width of the input image $\mathbf{x}$ , $h$ the size of the patch $\mathbf{p}$ , $n$ the number of images
79
+
80
+ ![](images/4adb2c233044897787765fe8e66d2de320f8948535574663366bc455fa4a20a3.jpg)
81
+ Figure 2. Overview of BADPART.
82
+
83
+ in the test set and $\mathbf{q}$ the coordinates of the patch's center in $\mathbf{x}$ . We use $\Lambda (\mathbf{a_1},\mathbf{a_2},\mathbf{a_3})$ to denote the process of attaching $\mathbf{a_2}$ to $\mathbf{a_1}$ at location $\mathbf{a_3}$ , hence $[\mathbf{x}^{\prime}]_{n}$ in Equation 3 refers to the image set attached with adversarial patch $\mathbf{p}$ at location $\mathbf{q}$ , and $[\mathbf{x}_0^{\prime}]_{n}$ in Equation 4 denotes the corresponding images attached with a black patch $\mathbf{p}_0$ (not optimized) as reference. The output of model $\mathcal{M}$ has a dimension of $n\times d\times H\times W$ , where $d$ refers to the output channels for each image. For MDE models $d$ equals 1 as the output is the estimated distance for each pixel, and for OFE models $d$ equals 2 since the model outputs the estimated pixel-wise offset vector (two dimensions). $\mathcal{F}$ in Equation 5 denotes the function calculating the pixel-wise prediction error caused by the generated adversarial perturbation.
84
+
85
+ $$
86
+ \mathcal {F} (\mathbf {D}) [ i, j ] = \operatorname {M e a n} \left(\left\{\mathbf {D} [ k, 1, i, j ] \mid k = 1 \dots n \right\}\right) \tag {8}
87
+ $$
88
+
89
+ $$
90
+ \mathcal {F} (\mathbf {D}) [ i, j ] = \operatorname {M e a n} \left(\left\{\| \mathbf {D} [ k,: , i, j ] \| _ {2} \mid k = 1 \dots n \right\}\right) \tag {9}
91
+ $$
92
+
93
+ Our attack goals are to maximize the estimated pixel-wise distances for MDE models or the $l_{2}$ norm of offset vectors for OFE models, hence, let $\mathbf{D} = \mathcal{M}([\mathbf{x}']_n) - \mathcal{M}([\mathbf{x}_0']_n)$ , $\mathcal{F}$ is defined in Equation 8 for MDE models and in Equation 9 for OFE models. For simplicity, see Equation 10, we use $\mathcal{F}_e([\mathbf{x}']_n) \in \mathbb{R}^{H \times W}$ to denote the pixel-wise error caused by adversarial images $[\mathbf{x}']_n$ in the following text.
94
+
95
+ $$
96
+ \mathcal {F} _ {e} \left(\left[ \mathbf {x} ^ {\prime} \right] _ {n}\right) \equiv \mathcal {F} \left(\mathcal {M} \left(\left[ \mathbf {x} ^ {\prime} \right] _ {n}\right) - \mathcal {M} \left(\left[ \mathbf {x} _ {0} ^ {\prime} \right] _ {n}\right)\right) \tag {10}
97
+ $$
98
+
99
+ # 4. Methods
100
+
101
+ In this section, we first introduce our proposed square-based adversarial patch generation framework, as detailed in §4.1 and explicated in Alg. 1. We then examine the two main components of the framework: the probabilistic square sampling, which is elucidated in §4.2 and Alg. 2, and the score-based gradient estimation, presented in §4.3 and Alg. 3.
102
+
103
+ # 4.1. Square-based Patch Generation Framework
104
+
105
+ The principal concept underlying our approach involves the iterative optimization of a square-shaped sub-area in the patch region, while altering the location and size of the target square area dynamically. Figure 2 illustrates the overview of the attack framework. The rectangles in teal $(\mathbf{p}^{(i)})$ on the left of Figure 2 denote the patch region at different optimization stages, and the small squares in orange $(s_i)$ refer to the sampled sub-areas to optimize. Steps 1, 7 and 8 denote the selection of the square areas, and steps 2-6 present the procedure of optimizing a selected square. These selection and optimization are carried out alternately. The strategy of selecting a square area within the broader patch region serves to effectively constrain the large search space inherent to the entire patch. It is inspired from SquareAttack (Andriushchenko et al., 2020) which attacks classification models via random search and leverages square areas as the perturbation units. The rationale for favoring a square shape is that modern image-processing models predominantly utilize convolutional layers for feature extraction. The filter kernels within these layers are inherently square-shaped, thereby making the square setting as the most efficient (Andriushchenko et al., 2020). Unlike SquareAttack, BADPART iteratively updates each square area using novel gradient estimation rather than a single-step trial. This refinement transforms our approach into a more precise optimization process rather than random search, thereby strengthening the attack's effectiveness. Furthermore, we focus on pixel-wise regression tasks and utilize the domain knowledge of pixel error distribution to probabilistically select square locations, significantly boosting the efficiency.
106
+
107
+ Alg. 1 describes the proposed universal adversarial patch generation framework. To begin with, we initialize the patch region with vertical strips, where the color of each stripe is sampled uniformly at random from $\{0,1\}^3$ (see $\mathbf{p}^{(0)}$ in Figure 2 and line 4 in Alg. 1). Then we attach the patch to the validation images at location $\mathbf{q}$ , and record the overall error $\omega^*$ as the initialized best attack performance caused by the perturbations (lines 5-6). After initialization, we start the iterations of square sampling. In each iteration, we first calculate the pixel-wise error map $\mathbf{M}$ caused by the latest patch on validation images (lines 9-10), then, in lines 11-12, we call the probabilistic square sampling algorithm (Alg. 2 explained in §4.2) with $\mathbf{M}$ and the iteration index as input, getting the sampled square area (step ① in Figure 2). Next, we start optimizing the square area. In each round of optimization, we first estimate the gradients of the square area on a random training image (lines 15-16). Details of the score-based gradient estimation (steps ②-⑤ in Figure 2) will be explained in §4.3 and Alg. 3. Then we update the square area with Adam optimizer using the estimated gradients (step ⑥), and evaluate the attack performance $\omega$ of the latest patch (lines 17-19). We update the best performance $\omega^*$ to
108
+
109
+ Algorithm 1 Square-based patch generation framework
110
+ 1: Input: Pixel-wise Error Function \(\mathcal{F}_e\), Training Images \([\mathbf{x}^{\mathrm{t}}]_m\), Validation Images \([\mathbf{x}^{\mathrm{v}}]_n\), Patch Location q, Patch Size h.
111
+ 2: Output: The generated patch p.
112
+ 3: function BADPART(\(\mathcal{F}_e\), \([\mathbf{x}^{\mathrm{t}}]_m\), \([\mathbf{x}^{\mathrm{v}}]_n\), q, h)
113
+ 4: p ← Initialize a patch p ∈ [0, 1]^{3×h×h} with vertical strips.
114
+ 5: \([\mathbf{x}'^{\mathrm{v}}]_n \gets \Lambda([[\mathbf{x}^{\mathrm{v}}]_n, \mathbf{p}, \mathbf{q})\) {Attach patch p to \([\mathbf{x}^{\mathrm{v}}]_n}
115
+ 6: \(\omega^* \gets Mean(\mathcal{F}_e([\mathbf{x}'^{\mathrm{v}}]_n))\) {Record largest error as \(\omega^*\)}
116
+ 7: \(\epsilon \gets \alpha\) {Initialize noise bound \(\epsilon\) as \(\alpha\)}
117
+ 8: for iter in 0...max_iters do
118
+ 9: \([\mathbf{x}'^{\mathrm{v}}]_n \gets \Lambda([\mathbf{x}^{\mathrm{v}}]_n, \mathbf{p}, \mathbf{q})\)
119
+ 10: M ← \(\mathcal{F}_e([\mathbf{x}'^{\mathrm{v}}]_n)\)
120
+ 11: z, e ← GETSQUAREAREA(iter, M, q, h) {Alg. 2}
121
+ 12: s ← p \([\mathbf{z}_c - \frac{e}{2}\dots\mathbf{z}_c + \frac{e}{2}, \mathbf{z}_r - \frac{e}{2}\dots\mathbf{z}_r + \frac{e}{2}]\)
122
+ 13: /\*\* Optimize the square area /\*\*/
123
+ 14: for step in 0...max_steps do
124
+ 15: x ← Randomly sample an image from \([\mathbf{x}^{\mathrm{t}}]_m\).
125
+ 16: g ← GETGRAD(\(\mathcal{F}_e\), x, p, q, z, e, \(\epsilon\)) {Alg. 3}
126
+ 17: s ← Optimizer(s, g)
127
+ 18: p ← \(\Lambda(\mathbf{p}, \mathbf{s}, \mathbf{z})\) {Attach s to p at location z}
128
+ 19: \(\omega \gets Mean(\mathcal{F}_e(\Lambda([\mathbf{x}'^{\mathrm{v}}]_n, \mathbf{p}, \mathbf{q})))\)
129
+ 20: if \(\omega > \omega^*\) then \(\omega^* \gets \omega\);
130
+ 21: if \(\omega^*\) is not updated for \(T_1\) steps then break loop;
131
+ 22: end for
132
+ 23: if \(\omega^*\) is not updated for \(T_2\) iterations then \(\epsilon \gets \epsilon * \gamma\);
133
+ 24: end for
134
+ 25: end function
135
+
136
+ $\omega$ if $\omega$ is better and continue the next step of optimization on this square. If the best performance is not updated for $T_{1}$ steps, which indicates this square is sufficiently explored, we stop optimizing this square and continue the next iteration of square sampling and optimization (lines 20-21). Line 7 and 23 are noise bound-related, which will be explained in §4.3.
137
+
138
+ # 4.2. Probabilistic Square Sampling
139
+
140
+ The sampling algorithm is designed to enhance the probability of selecting locations within the patch region that are more vulnerable to adversarial perturbations. As indicated in (Cheng et al., 2022) and (Cheng et al., 2024), the identification of vulnerable areas on images is critical for improving attack performance. To ascertain these vulnerable areas in the beginning, we employ an initialization phase ( $K$ iterations), wherein we randomly sample the square location in a uniform manner. This period is denoted as $\mathbf{p}^{(1)}$ in Figure 2. After the initialization phase, the pixel-wise error map $\mathbf{M}$ caused by the latest patch is utilized as an indication of the vulnerable areas and we leverage this map to calculate the probability distribution of location sampling. Those areas with larger errors obtain higher probability. The background color of the patch $\mathbf{p}^{(1)}, \mathbf{p}^{(2)}$ and $\mathbf{p}^{(3)}$ in Figure 2 illustrate the sampling probability distribution of square locations.
141
+
142
+ Alg. 2 describes the probabilistic square area sampling algorithm, whose output are the sampled square location in
143
+
144
+ Algorithm 2 Probabilistic square area sampling
145
+ 1: Input: Iteration Index iter, Pixel-wise Error Map M, Patch Location q, Patch Size h.
146
+ 2: Output: Square Location z, Square Size e.
147
+ 3: function GETSQUAREAREA(iter, M, q, h)
148
+ 4: e $\leftarrow$ SizeSche(iter) {> Use a pre-defined size schedule}
149
+ 5: if iter $\leq$ Initialization period $K$ then
150
+ 6: z $\leftarrow$ Sample a location index from $\{0\dots h\}^2$ uniformly.
151
+ 7: else
152
+ 8: /\*\*Error-based probabilistic sampling \*\*\*/
153
+ 9: M $\leftarrow$ Smooth error map M with kernel size $e\times e$
154
+ 10: $\mathbf{M}_{\mathbf{q},h}\gets \mathbf{M}\left[\mathbf{q}_c - \frac{h}{2}\dots \mathbf{q}_c + \frac{h}{2},\mathbf{q}_r - \frac{h}{2}\dots \mathbf{q}_r + \frac{h}{2}\right]$
155
+ 11: prob $\leftarrow$ Softmax(Mq,h/Max(Mq,h))
156
+ 12: z $\leftarrow$ Sample a location index from $\{0\dots h\}^2$ with the probability distribution prob.
157
+ 13: end if
158
+ 14: end function
159
+
160
+ the patch region and the square size. In accordance with SquareAttack, the square size is obtained from a predefined schedule regarding the iteration index (line 4), which is detailed in Appendix A. As the index escalates, the size diminishes, indicative of a transition from coarse to fine-grained optimization (see $\mathbf{s}_3$ after step ⑧ in Figure 2). The initialization phase of uniformly sampling lasts $K$ iterations (lines 5-6), after which we start error-based probabilistic sampling. We first smooth the pixel-wise error map $\mathbf{M}$ with a filter kernel that has the same size of the square, which is to avoid extreme values at certain locations (line 9). Then we crop out the patch region and normalize the smoothed error map to [0, 1] followed by applying the softmax function to transform the error map into the sampling probabilities for different locations (lines 10-11). At last, see step ⑦ or ⑧ in Figure 2, the square location ( $\mathbf{s}_2$ or $\mathbf{s}_3$ ) is sampled based on the probability distribution (line 12).
161
+
162
+ # 4.3. Score-based Gradient Estimation
163
+
164
+ In this section, we introduce the score-based square-area gradient estimation method. As shown on the right side of Figure 2, upon determination of the square area, we proceed to generate a batch of noise $[\delta]_b$ within the confines of the square. This noise is constrained by a small threshold $\epsilon$ , thereby facilitating the exploration of the adjacent high-dimensional space. Compared with the zeroth order optimization (Chen et al., 2017) that estimates the gradient pixel by pixel, our method is more efficient as the unit of gradient estimation is a square area. Values of the noise tensor are either $\epsilon$ or $-\epsilon$ as (Moon et al., 2019) has indicated that the optimal adversarial noise is mostly found on vertices of the bound. Subsequently, for each instance of noise, we utilize the alteration in attack performance, consequent to the application of the noise on the current square area, as the evaluative score $\Delta$ of the noise (see step ②. Nega
165
+
166
+ Algorithm 3 Score-based square-area gradient estimation
167
+ 1: Input: Pixel-wise Error Function \(\mathcal{F}_e\), Image \(\mathbf{x}\), Patch \(\mathbf{p}\), Patch Location \(\mathbf{q}\), Square Location \(\mathbf{z}\), Square Size \(e\), Noise Bound \(\epsilon\).
168
+ 2: Output: Estimated Gradient \(\mathbf{g}\).
169
+ 3: function GETGRAD(\(\mathcal{F}_e\), \(\mathbf{x}\), \(\mathbf{p}\), \(\mathbf{q}\), \(\mathbf{z}\), \(e\), \(\epsilon\))
170
+ 4: \(\mathbf{x}' \gets \Lambda(\mathbf{x}, \mathbf{p}, \mathbf{q})\) {> Get image with current patch attached}
171
+ 5: \(\mathbf{s} \gets \mathbf{p}\left[\mathbf{z}_c - \frac{e}{2}...\mathbf{z}_c + \frac{e}{2}, \mathbf{z}_r - \frac{e}{2}...\mathbf{z}_r + \frac{e}{2}\right]\)
172
+ 6: /\*\* Calculate noise scores ***/
173
+ 7: \([\delta]_b \gets\) Generate \(b\) random noise \(\delta \in \{-\epsilon, \epsilon\}^{3 \times e \times e}\).
174
+ 8: \([\hat{\mathbf{p}}]_b \gets \Lambda(\mathbf{p}, \mathbf{s} + [\delta]_b, \mathbf{z})\) {> Add \([\delta]_b\) to \(\mathbf{s}\) and attach to \(\mathbf{p}\)}
175
+ 9: \([\hat{\mathbf{x}}]_b \gets \Lambda(\mathbf{x}, [\hat{\mathbf{p}}]_b, \mathbf{q})\) {> Get images with noise set applied}
176
+ 10: \([\Delta]_b \gets 0\) {> Initialize score for each noise}
177
+ 11: for \(\hat{\mathbf{x}}_i\) in \([\hat{\mathbf{x}}]_b\) do
178
+ 12: \(\Delta_i \gets \text{Mean}(\mathcal{F}_e(\hat{\mathbf{x}}_i)) - \text{Mean}(\mathcal{F}_e(\mathbf{x}'))\)
179
+ 13: end for {> Update \([\Delta]_b}
180
+ 14: /\*\* Score Adjustment ***/
181
+ 15: \([\Delta]^+ \gets [\Delta]^+ / \max([\Delta]^+); [\Delta]^- \gets [\Delta]^- / |\min([\Delta]^-)|\)
182
+ 16: \([\Delta]^+ \gets [\Delta]^+ / \#([\Delta]^+); [\Delta]^- \gets [\Delta]^- / \#([\Delta]^-)\)
183
+ 17: g \(\gets\) Weighted sum of noise \([\delta]_b\) using weights \([\Delta]_b\).
184
+ 18: g \(\gets \sqrt{3 \cdot e \cdot e} \cdot g / \|g\|_2\) {> Return estimated gradient}
185
+ 19: end function
186
+
187
+ tive scores denote negative impact on attack performance). Since the scores could be very small and imbalanced among the positive and negative ones, we normalize the positive and negative scores by scaling them to [0,1] and [0,-1] respectively (step ⑧). Next, we conduct adaptive scaling to allocate greater weights to the side (positive or negative) with fewer elements (step ④). This procedure is inspired from (Tao et al., 2023), which subtracts the mean score from the positive and negative indicators. However, in our scenario of regression tasks, subtracting the mean score could potentially change the sign of scores, hence we opt to divide the positive (or negative) scores by the number of positive (or negative) elements for scaling purpose. Subsequently, we compute the weighted average of $[\delta]_b$ by employing the scaled scores $[\Delta]_b$ , followed by normalizing the output through dividing it by its $l_2$ -norm. This procedure yields the estimated gradients (step ⑤).
188
+
189
+ Details of the algorithm can be found in Alg. 3. Lines 4-5 attach the latest patch onto the input image, and crop out the square area, where $\mathbf{z}_c$ and $\mathbf{z}_{\mathbf{r}}$ denote the column and row index of the square center within the patch. Lines 7-9 generate the set of random noise, and apply them to the square area, creating candidate input images $[\hat{\mathbf{x}}]_b$ . Lines 10-13 calculate the scores $[\Delta]_b$ by comparing the attack performance of $[\hat{\mathbf{x}}]_b$ with the reference one $\mathbf{x}'$ . Subsequently, Lines 15-16 adjust the scores by normalization and adaptive scaling, and Lines 17-18 conduct the weighted average and normalization operations, achieving the final gradients. Note that, as shown in line 7 and 23 of Alg. 1, the threshold $\epsilon$ of the noise is initialized as $\alpha$ and will decay if the best attack performance $\omega^*$ is not updated for $T_{2}$ iterations of square selection. The decay factor $\gamma$ is set to 0.98 in our experiments.
190
+
191
+ Table 1. The mean error (depth estimation error (DEE, unit: meters) for MDE models and end point error (EPE, unit: pixels) for OFE models) caused by BADPART and other baseline methods on different target models. Larger values denote better attack performance.
192
+
193
+ <table><tr><td rowspan="2">Models</td><td colspan="4">57 × 57 Patch (1%)</td><td colspan="4">80 × 80 Patch (2%)</td><td colspan="5">100 × 100 Patch (3%)</td><td></td><td></td></tr><tr><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td><td>WB</td><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td><td>WB</td><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td><td>WB</td></tr><tr><td>Monodepth2</td><td>0.05</td><td>7.76</td><td>56.83</td><td>79.29</td><td>89.23</td><td>0.01</td><td>19.64</td><td>78.47</td><td>89.75</td><td>90.99</td><td>0.61</td><td>18.03</td><td>89.02</td><td>91.11</td><td>91.38</td></tr><tr><td>DepthHints</td><td>0.30</td><td>2.25</td><td>21.21</td><td>71.14</td><td>89.47</td><td>0.76</td><td>3.92</td><td>55.34</td><td>70.38</td><td>90.15</td><td>1.43</td><td>2.24</td><td>76.85</td><td>87.32</td><td>90.81</td></tr><tr><td>SQLDepth</td><td>0.03</td><td>0.06</td><td>28.63</td><td>48.74</td><td>55.09</td><td>0.43</td><td>0.16</td><td>39.89</td><td>54.14</td><td>61.05</td><td>0.30</td><td>0.45</td><td>48.66</td><td>54.51</td><td>61.91</td></tr><tr><td>PlaneDepth</td><td>0.61</td><td>0.83</td><td>4.07</td><td>48.22</td><td>90.11</td><td>1.71</td><td>1.07</td><td>7.67</td><td>46.85</td><td>90.24</td><td>1.84</td><td>1.47</td><td>26.58</td><td>80.07</td><td>82.62</td></tr><tr><td>FlowNetC</td><td>5.42</td><td>4.21</td><td>5.32</td><td>583.20</td><td>2403.32</td><td>4.08</td><td>3.55</td><td>447.60</td><td>1212.13</td><td>3585.12</td><td>5.15</td><td>4.43</td><td>640.30</td><td>1033.21</td><td>2345.54</td></tr><tr><td>FlowNet2</td><td>2.24</td><td>12.30</td><td>2.64</td><td>30.72</td><td>55.81</td><td>1.65</td><td>7.31</td><td>1.77</td><td>32.42</td><td>725.30</td><td>1.27</td><td>10.39</td><td>5.94</td><td>27.82</td><td>194.40</td></tr><tr><td>PWC-Net</td><td>1.93</td><td>2.04</td><td>2.35</td><td>4.87</td><td>53.68</td><td>1.73</td><td>1.90</td><td>1.66</td><td>5.26</td><td>149.30</td><td>1.48</td><td>1.53</td><td>1.44</td><td>5.32</td><td>55.31</td></tr></table>
194
+
195
+ * Bold texts denote the best attack performance among black-box methods. Abbreviations. GA: GenAttack (Alzantot et al., 2019), HB: HardBeat (Tao et al., 2023), P-RS: Patch-RS (Croce et al., 2022), WB: White-box Attack for reference.
196
+
197
+ # 5. Evaluation
198
+
199
+ In this section, we evaluate BADPART on 2 kinds of tasks including 7 subject models. We compare with 3 baseline black-box attack methods and a white-box one. A set of ablation studies are discussed and the source code is provided here: https://github.com/Bob-cheng/BadPart.
200
+
201
+ # 5.1. Experiment Setup
202
+
203
+ Tasks & Models. We evaluate BADPART on two pixelwise regression tasks of MDE and OFE. For MDE, we use Monodepth2 (Godard et al., 2019), DepthHints (Watson et al., 2019), SQLDepth (Wang et al., 2024) and PlaneDepth (Wang et al., 2023) as the target models. For OFE, we attack FlowNetC (Dosovitskiy et al., 2015), FlowNet2 (Ilg et al., 2017) and PWC-Net (Sun et al., 2018). These models are selected since they cover both the popular and SOTA models, and we attack the publicly available models with the highest input resolutions from their official repositories. MDE models were trained on the KITTI depth prediction dataset (Uhrig et al., 2017) and OFE models were trained on the KITTI flow 2015 (Menze et al., 2015).
204
+
205
+ Baselines & Metrics. There are no direct baselines available due to a lack of previous research on black-box attacks against pixel-wise regression tasks. Hence we adapt three black-box patch attacks on image classification to our scenario as baselines. These include Patch-RS (Croce et al., 2022), a SOTA soft-label attack that employs random search and is akin to the patch-attack variant of SquareAttack (Andriushchenko et al., 2020); HardBeat (Tao et al., 2023), a SOTA hard-label attack that estimates gradients; and GenAttack (Alzantot et al., 2019), a conventional approach using genetic algorithms. We also compare BADPART with the white-box attack as reference. Discussion on more prior attacks can be found in Appendix D. We employ the mean depth estimation error (DEE, unit: meters) for MDE models and the mean end point error (EPE, unit: pixels) for OFE models as metrics to denote attack performance (the higher the better), which are aligned with the metrics used in prior
206
+
207
+ white-box attacks on the two tasks (Cheng et al., 2022; Ranjan et al., 2019). They are calculated on the patched area and reflect the error caused by the generated adversarial noise.
208
+
209
+ Attack Settings. We use 100 scenes from KITTI flow dataset as our training set and another 5 scenes as the validation set during patch generation. (i.e., $m$ equals 100 and $n$ equals 5 in Alg. 1.) We evaluate the attack performance on a test set with 100 new scenes from the dataset, which covers different driving conditions (e.g., various road types, weathers and lighting). Each scene has two consecutive image frames since two images are required for the input of OFE models. For MDE models, we only feed the first frame. Detailed attack settings can be found in Appendix A, including hyper-parameter settings, devices, runtime overhead, etc.
210
+
211
+ # 5.2. Attack Performance
212
+
213
+ We compare the attack performance of BADPART with other baseline methods. We report the maximum attack performance of each method until convergence or after 1000K queries, whichever first. We also include the performance of white-box attacks as references. Three different patch sizes are evaluated and the patch locates at the center of the image. Table 1 reports the result. The first column denotes various pixel-wise regression models under attack, and the following columns represent attack performance of different methods and the white-box reference. As shown, BADPART obtains the best attack performance on all models under various patch sizes. The performance of BADPART is even close to the white-box attack reference on some models (e.g., Monodepth2, DepthHints and SQLDepth). Patch-RS has the second best attack performance while GenAttack performs the worse and has nearly no effect. Figure 3 presents qualitative examples of the attack performance of different methods on PlaneDepth and FlowNetC. As shown, the first column denotes the benign scene and the MDE and OFE output. The following columns show the $2\%$ adversarial patches generated by BADPART and baseline methods, as well as the model output. In the first row, when the patch generated by BADPART is applied, the depth estimation
214
+
215
+ ![](images/44a938de32a9fb2f06ae651780224bbe0865a9d8198d44c6e8c5828088d1a1e2.jpg)
216
+ Figure 3. Examples of the qualitative attack performance of BADPART and the baselines.
217
+
218
+ ![](images/937c9256e0fe612b34b4c8e40c145302a7bb6541e53a04583b2963b4ae85c316.jpg)
219
+ (a) Depthhints
220
+
221
+ ![](images/cbc00ad626369be06ea2aa4c236f6cf3fbd4cc22b5c2625a31f159824822085b.jpg)
222
+ (b) Planedepth
223
+
224
+ ![](images/13cfa80b6580d11ff2583c0f4b10645d5f42b3f292c0c8e16cb74b04071dfa16.jpg)
225
+ (c) FlowNetC
226
+
227
+ ![](images/0eb153a58a3c4a1532c5f6eea71b8211c26fbc42d6e62c3ddd56406cd72765d9.jpg)
228
+ (d) FlowNet2
229
+
230
+ of the patched area is significantly further than the actual distance (darker color denotes further distance estimation). In comparison, the patches generated by other methods cause less impact. In the second row, patches generated by BADPART and Patch-RS have degraded the OFE performance significantly, making the result unusable. More qualitative and quantitative results are in Appendix C.
231
+
232
+ # 5.3. Query Efficiency
233
+
234
+ In this section, we compare the query efficiency of BADPART with baseline methods on the two pixel-wise regression tasks. We use DepthHints and Planedepth as the target MDE models and FlowNetC and FlowNet2 as the target OFE models. We use $2\%$ patch size and report each method's attack performance under different query times. The maximum query times are set to 300K. Figure 4 shows the result. As shown, on DepthHints, Planedepth and FlowNetC, BADPART achieves the best attack performance at various query times from the beginning. On FlowNet2, although HardBeat has a good attack performance at first, the effect is not increased with more queries. BADPART surpasses HardBeat at around 120K queries and causes about 19.63 EPE. Figure 12 in Appendix shows more results with $1\%$ patch size. In conclusion, our method is more efficient in general as it delivers superior attack performance using fewer queries to the target model. This efficiency is attributable to the more precise gradient estimation within the strategically selected square areas in BADPART.
235
+
236
+ ![](images/527d41a35cb23f94b1933c23e29ca23c8cfd09a2a7e328c9faa6a5b0841e6a6e.jpg)
237
+ Figure 4. Comparison of query efficiency between BADPART and the baseline methods on four models (2% patch).
238
+ (a) Monodepth2
239
+ Figure 5. Ablation study on different number of trials $b$ .
240
+
241
+ ![](images/2dc19ba429a61ad73ddd29b83ea11c66df426f96df2d331bb4245617323f6522.jpg)
242
+ (b) FlowNet2
243
+
244
+ # 5.4. Ablation Studies
245
+
246
+ Number of Trials. In Alg. 3, we leverage $b$ random noises for gradient estimation. This number of trials balances the total query times and the accuracy of the estimated gradients. We evaluate BADPART utilizing different numbers of trials and report the attack performance on Monodepth2 and FlowNet2 under different query times. Results are presented in Figure 5. In the two subfigures, each line denotes a choice of the number of trials $b$ used in training, and the x-axis represents the number of queries and y-axis the corresponding attack performance. As shown, less trials (e.g., $b = 1$ ) could decrease the accuracy of gradient estimation, hence impacting the attack performance, while large trials (e.g., $b = 30$ ) would require more query times and degrade the efficiency. $b = 20$ achieves a good balance in our study and is utilized as the default settings.
247
+
248
+ Intra-square Threshold. The intra-square threshold $T_{1}$ in Alg. 1 (line 21) controls the tolerance for negative update
249
+
250
+ ![](images/d295df7917347a198c1befa70e4038dcfd4452029ae142b1d7d3c7957b385847.jpg)
251
+ (a) Monodepth2
252
+
253
+ ![](images/bce257be16419dcd8fff127c3ef33ab01c06c59363bf17941fb0ef30f356326e.jpg)
254
+ (b) FlowNet2
255
+
256
+ Table 2. Ablation study on different design choices.
257
+
258
+ <table><tr><td>SN</td><td>AS</td><td>PS</td><td>Monodepth2</td><td>FlowNet2</td></tr><tr><td></td><td></td><td></td><td>38.41</td><td>6.90</td></tr><tr><td></td><td></td><td>✓</td><td>54.88</td><td>15.19</td></tr><tr><td></td><td>✓</td><td></td><td>43.86</td><td>3.39</td></tr><tr><td>✓</td><td></td><td></td><td>41.96</td><td>8.75</td></tr><tr><td>✓</td><td>✓</td><td></td><td>52.28</td><td>4.89</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>60.46</td><td>17.13</td></tr></table>
259
+
260
+ * SN: Score Normalization, AS: Adaptive Scaling, PS: Probabilistic Sampling.
261
+
262
+ steps within the square area. Upon reaching this threshold, a different square location will be chosen. We have adjusted the threshold, ranging from 1 to 15, to evaluate the attack performance on Monodepth2 and FlowNet2 under various query times. Figure 6 presents the result. As shown, BADPART yields optimal performance on both models when $T_{1}$ is set to 1, and it is adopted as our default setting. Further ablation studies concerning the hyper-parameter $T_{2}$ and the locations of the patch can be found in Appendix B.
263
+
264
+ Design Choices. We also conduct ablation studies to investigate the impact of our design choices. As shown in Figure 2, our method incorporates innovative designs of probabilistic sampling (PS), score normalization (SN) and adaptive scaling (AS). We assess various combinations of these designs and report the attack performance on Monodepth2 and FlowNet2 with 300K query times. Results are shown in Table 2. As shown, the integration of all three design choices yielded the best attack performance for both models. When considering each design individually, PS makes the most significant contribution and delivers the second-best performance. The other two designs can also enhance the performance to some extent. In summary, each of our unique designs plays a vital role in BADPART, with PS providing the most significant boost to performance.
265
+
266
+ # 5.5. Attack Online Service
267
+
268
+ To evaluate the feasibility of BADPART in real-world applications, we conduct attacks on the Google API for portrait depth estimation (Google3DPortrait). Note that the model is not deployed by authors and we only query it for depth estimation. We utilize ten $256 \times 192$ portrait images as training set and generate a $31 \times 31$ patch using 50K queries to the
269
+
270
+ ![](images/d2fe5b3bb0ac35e0b56f724cec5ce812eb441e4f5f0e24b0bd95f96549ba44b7.jpg)
271
+ Figure 6. Ablation study on different intra-square threshold $T_{1}$ .
272
+ Figure 7. Attack Google MDE API (Google3DPortrait).
273
+
274
+ Table 3. Bypassing the query-based defense.
275
+
276
+ <table><tr><td rowspan="2">Query</td><td colspan="2">Monodepth2</td><td colspan="2">FlowNet2</td></tr><tr><td>DEE</td><td>Detection Rate</td><td>EPE</td><td>Detection Rate</td></tr><tr><td>50K</td><td>20.28</td><td>0%</td><td>1.93</td><td>0%</td></tr><tr><td>200K</td><td>36.87</td><td>0%</td><td>8.24</td><td>0%</td></tr><tr><td>400K</td><td>73.27</td><td>0%</td><td>19.06</td><td>0%</td></tr><tr><td>800K</td><td>88.87</td><td>0%</td><td>25.53</td><td>0%</td></tr></table>
277
+
278
+ API. Our attack goal is to minimize the estimated distance of the patched area on the portrait. BADPART has successfully reduced the mean depth estimation of the patched area by $43.5\%$ from $0.431\mathrm{cm}$ to $0.243\mathrm{cm}$ . Figure 7 shows qualitative results. This adversarial example is available in the code repository, which can be uploaded to (Google3DPortrait) for efficacy validation. The adversarial patch can also be employed for beneficial purposes, such as privacy protection. By attaching the patch to personal images before publishing, individuals can prevent unauthorized use of their photos in such video composition services.
279
+
280
+ # 5.6. Defensive Discussion
281
+
282
+ As pioneers in the exploration of black-box adversarial patch attacks against pixel-wise regression tasks, we find ourselves in uncharted territory with no existing defense techniques specifically tailored for this context. Nevertheless, there are defense strategies designed against black-box attacks on classification models. For example, certifiable defenses such as PatchCleanser (Xiang et al., 2022) employ a mask to traverse all input positions, monitoring output class mutations to identify the most suspicious position. Furthermore, universal adversarial patch detection methods (e.g., SentiNet (Chou et al., 2020)) depend on the input features responsible for the predicted class to locate the patch. However, their reliance on class output renders them unsuitable for direct application to the pixel-wise regression tasks. In contrast, query-based defense techniques, designed to detect malicious queries by black-box attacks, may be more applicable to our context. Blacklight (Li et al., 2022), a leading defense of this type, leverages the similarity among different query inputs to detect black-box attacks. Its primary strategy involves calculating the hash representation of each incoming query and identifying an adversarial query if the hash matches any previous one. Blacklight's efficacy is contingent on the similarity between two images in consecutive queries, which is a major feature of single-image black-box attacks (e.g., SquareAttack (Andriushchenko et al., 2020)).
283
+
284
+ Table 4. Universal attack performance with lower query budgets (2% patch size).
285
+
286
+ <table><tr><td>Query</td><td>Monodepth2 (DEE: Meters)</td><td>FlowNet2 (EPE: Pixels)</td></tr><tr><td>1K</td><td>1.923</td><td>2.050</td></tr><tr><td>5K</td><td>2.034</td><td>2.265</td></tr><tr><td>10K</td><td>2.392</td><td>2.272</td></tr><tr><td>20K</td><td>5.518</td><td>2.621</td></tr><tr><td>30K</td><td>12.299</td><td>2.851</td></tr></table>
287
+
288
+ However, BADPART is a universal adversarial patch attack that does not depend on sample similarity, and the randomness in different samples could potentially enhance the universal effectiveness of the generated patch. Hence we add random noise on each attack sample to by-pass the defense. Additionally, the high resolution of our input images further diminishes the efficiency and efficacy of such a defense. To assess the defensive performance of Blacklight on BADPART, we have incorporated it in our framework and evaluated its detection rate for varying amounts of queries. The results are presented in Table 3. As shown, for both MDE and OFE tasks, the detection rate remains zero under 800K queries, while the attack performance is not affected and continues to increase with more queries. We discuss more prior defenses in Appendix D, and the limitations and our future work in Appendix F.
289
+
290
+ # 5.7. Discussion on Lower Query Budget
291
+
292
+ Our attack requires 50K queries to cause an average depth estimation error (DEE) of 19.43 meters on Monodepth2, which employs a U-Net architecture with two ResNet18s. This is comparable to the SOTA universal black-box attack (HardBeat (Tao et al., 2023)), which requires 50K queries to achieve over $80\%$ attack success rate on CIFAR-10 using a ResNet18 classifier. Other patch attacks requiring a smaller number of queries are for classification models, not pixelwise regression models we are targeting, and they are not universal attacks. In particular, our scenario is characterized by the absence of class labels, precluding our ability to employ an image from the target class (e.g., an elephant) as a form of robust prior knowledge to initialize the patch on a source image (e.g., a clock), as did in DevoPatch (Chen et al., 2023). Additionally, we argue the one-time cost of 50K queries is affordable because it could be completed within 14 hours on the platform with a rate limit of 1 query per second (e.g., ClipDrop (Clipdrop)), and even faster on Google 3DPortrait API (Google3DPortrait) without rate limitations. Actually, it only takes us less than 4 hours to attack this real-world API with 50K queries.
293
+
294
+ Please note that our method is an universal attack (rather than single-image attack), which is more challenging and
295
+
296
+ Table 5. Single-image Attack performance with lower query budgets (2% patch size).
297
+
298
+ <table><tr><td>Query</td><td>Monodepth2 (DEE: Meters)</td><td>FlowNet2 (EPE: Pixels)</td></tr><tr><td>1K</td><td>3.200</td><td>2.063</td></tr><tr><td>5K</td><td>6.101</td><td>7.548</td></tr><tr><td>10K</td><td>9.060</td><td>13.141</td></tr><tr><td>20K</td><td>13.295</td><td>30.102</td></tr><tr><td>30K</td><td>24.235</td><td>41.562</td></tr></table>
299
+
300
+ practical. Although the patch generation process could require more queries, it is a one-time effort and the generated patch can attack arbitrary unseen images without further queries. As stated in the Attack Settings of Section 5.1, the attack performance of patches in our experiments is evaluated on an unseen test set, and Figure 11 shows the qualitative results, demonstrating the universal effectiveness of our patches across various scenes.
301
+
302
+ It is also worth mentioning that, unlike the classification tasks in which the attacks are either successful (i.e., output a wrong label) or unsuccessful (i.e., output the correct label), for regression models, the error caused by the attack (i.e., attack performance) increases continuously with the query times. That means, lower query budgets can still cause some amount of error. In table 4, we report the attack performance of our approach under lower query budgets. It is the same universal attack setting as our main experiments. As shown, using a lower query budget (e.g., $30\mathrm{K}$ ) could still cause noticeable errors on certain target models.
303
+
304
+ If the attacker aims on a single-image attack, he can easily adapt our method to such a scenario to reduce query times (just make the training set and the validation set only contain the target image). We conduct additional experiments to evaluate the attack performance of BadPart on a single image with different query budgets. Results are shown in Table 5. As shown, for both the MDE and OFE tasks, the errors caused by our single-image attack are already significant at 10K queries.
305
+
306
+ # 6. Conclusion
307
+
308
+ We propose BADPART, the first unified black-box adversarial patch attack against pixel-wise regression tasks, aiming at identifying vulnerabilities in visual regression models under query-based black-box attacks. BADPART utilizes square-based optimization, probabilistic square sampling and score-based gradient estimation, overcoming the scalability issues faced by previous black-box patch attacks. On 7 models across 2 typical pixel-wise regression tasks, our experiments compare BADPART with 3 baseline attack methods, validating the efficacy and efficiency of our method.
309
+
310
+ # Acknowledgements
311
+
312
+ We thank the anonymous reviewers for their constructive comments. We are grateful to the Center for AI Safety for providing computational resources. This research was supported, in part by IARPA TrojAI W911NF-19-S-0012, NSF 22422243, 1901242 and 1910300, ONR N000141712045, N00014-1410468 and N000141712947. Any opinions, findings, and conclusions in this paper are those of the authors only and do not necessarily reflect the views of our sponsors.
313
+
314
+ # Impact Statement
315
+
316
+ The unified adversarial patch attack that we proposed against pixel-wise regression models aims to disclose the vulnerabilities in such models under query-based black-box attacks. Our work highlights potential security risks in applications that rely on those models, such as autonomous driving, virtual reality, and video compositions. We hope to draw the attention of the related developers, and motivate the machine learning (ML) community to create more robust models or defense mechanisms against these types of attacks. This study around the robustness of models is aligned with many prior works/attacks in the ML community, and aims to advance the field of ML. Nevertheless, it is also worth mentioning that our technique can be used for benign purposes, such as protecting privacy, as we discussed in §5.5.
317
+
318
+ # References
319
+
320
+ Alzantot, M., Sharma, Y., Chakraborty, S., Zhang, H., Hsieh, C.-J., and Srivastava, M. B. Genattack: Practical black-box attacks with gradient-free optimization. In Proceedings of the genetic and evolutionary computation conference, pp. 1111-1119, 2019.
321
+ Andriushchenko, M., Croce, F., Flammarion, N., and Hein, M. Square attack: a query-efficient black-box adversarial attack via random search. In ECCV, 2020.
322
+ Bae, G., Budvytis, I., and Cipolla, R. Estimating and exploiting the aleatoric uncertainty in surface normal estimation. In ICCV, 2021.
323
+ Bang, J., Lee, D., Kim, Y., and Lee, H. Camera pose estimation using optical flow and orb descriptor in slam-based mobile ar game. In 2017 International Conference on Platform Technology and Service (PlatCon), pp. 1-4. IEEE, 2017.
324
+ Chen, J., Jordan, M. I., and Wainwright, M. J. Hop-skipjumpattack: A query-efficient decision-based attack. In S&P, 2020.
325
+ Chen, P.-Y., Zhang, H., Sharma, Y., Yi, J., and Hsieh, C.-J. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute
326
+
327
+ models. In Proceedings of the 10th ACM workshop on artificial intelligence and security, pp. 15-26, 2017.
328
+ Chen, X., Liu, S., Xu, K., Li, X., Lin, X., Hong, M., and Cox, D. Zo-adamm: Zeroth-order adaptive momentum method for black-box optimization. NeurIPS, 2019.
329
+ Chen, Z., Li, B., Wu, S., Ding, S., and Zhang, W. Query-efficient decision-based black-box patch attack. IEEE Transactions on Information Forensics and Security, 2023.
330
+ Cheng, Z., Liang, J., Choi, H., Tao, G., Cao, Z., Liu, D., and Zhang, X. Physical attack on monocular depth estimation with optimal adversarial patches. In ECCV, 2022.
331
+ Cheng, Z., Liang, J. C., Tao, G., Liu, D., and Zhang, X. Adversarial training of self-supervised monocular depth estimation against physical-world attacks. In ICLR, 2023.
332
+ Cheng, Z., Choi, H., Feng, S., Liang, J. C., Tao, G., Liu, D., Zuzak, M., and Zhang, X. Fusion is not enough: Single modal attacks on fusion models for 3d object detection. In ICLR, 2024.
333
+ Choi, H., Cheng, Z., and Zhang, X. Rvplayer: Robotic vehicle forensics by replay with what-if reasoning. In NDSS, 2022.
334
+ Chou, E., Tramer, F., and Pellegrino, G. Sentinel: Detecting localized universal attacks against deep learning systems. In 2020 IEEE Security and Privacy Workshops (SPW), pp. 48-54. IEEE, 2020.
335
+ Clipdrop. Portrait Depth Estimation. https://clipdrop.co apis/docs/portrait-depth-estimation.
336
+ Croce, F., Andriushchenko, M., Singh, N. D., Flammarion, N., and Hein, M. Sparse-rs: a versatile framework for query-efficient sparse black-box adversarial attacks. In AAAI, 2022.
337
+ Dosovitskiy, A., Fischer, P., Ilg, E., Hausser, P., Hazirbas, C., Golkov, V., Van Der Smagt, P., Cremers, D., and Brox, T. Flownet: Learning optical flow with convolutional networks. In ICCV, 2015.
338
+ Duan, R., Mao, X., Qin, A. K., Chen, Y., Ye, S., He, Y., and Yang, Y. Adversarial laser beam: Effective physical-world attack to dnns in a blink. In CVPR, 2021.
339
+ Fawzi, A. and Frossard, P. Measuring the effect of nuisance variables on classifiers. In Proceedings of the British Machine Vision Conference (BMVC), pp. 137-1, 2016.
340
+ Feng, Y., Wu, B., Fan, Y., Liu, L., Li, Z., and Xia, S.-T. Boosting black-box attack with partially transferred conditional adversarial distribution. In CVPR, 2022.
341
+
342
+ Gao, L., Zhang, Q., Song, J., Liu, X., and Shen, H. T. Patchwise attack for fooling deep neural network. In ECCV, 2020.
343
+ Godard, C., Mac Aodha, O., Firman, M., and Brostow, G. J. Digging into self-supervised monocular depth estimation. In ICCV, 2019.
344
+ Google3DPortrait. 3D Portrait. https://storage.go ogleapis.com/tfjs-models/demos/3dphot o/index.html.
345
+ Hayes, J. On visible adversarial perturbations & digital watermarking. In CVPR Workshop, 2018.
346
+ He, Y., Meng, G., Chen, K., Hu, X., and He, J. {DRMI}: A dataset reduction technology based on mutual information for black-box attacks. In USENIX Security 21, 2021.
347
+ Ilg, E., Mayer, N., Saikia, T., Keuper, M., Dosovitskiy, A., and Brox, T. Flownet 2.0: Evolution of optical flow estimation with deep networks. In CVPR, 2017.
348
+ Ilie, A., Popescu, M., and Stefanescu, A. Evoba: An evolution strategy as a strong baseline for black-box adversarial attacks. In International Conference on Neural Information Processing, pp. 188-200. Springer, 2021.
349
+ Ilyas, A., Engstrom, L., Athalye, A., and Lin, J. Black-box adversarial attacks with limited queries and information. In ICML, 2018.
350
+ Jia, X., Wei, X., Cao, X., and Han, X. Adv-watermark: A novel watermark perturbation for adversarial examples. In ACM MM, 2020.
351
+ Karpathy, A. Tesla use per-pixel depth estimation with self-supervised learning, 2020. https://youtu.be/hx7BXih7zx8?t=1334.
352
+ Lambert, F. Hacker shows what Tesla Full Self-Driving's vision depth perception neural net can see, 2021. https://electrek.co/2021/07/07/hacker-tesla-full-self-drivings-vision-depth-perception-neural-net-can-see/.
353
+ Lenssen, J. E., Osendorfer, C., and Masci, J. Deep iterative surface normal estimation. In CVPR, 2020.
354
+ Levine, A. and Feizi, S. (de) randomized smoothing for certifiable defense against patch attacks. NeurIPS, 2020.
355
+ Li, H., Xu, X., Zhang, X., Yang, S., and Li, B. Qeba: Query-efficient boundary-based blackbox attack. In CVPR, 2020.
356
+ Li, H., Shan, S., Wenger, E., Zhang, J., Zheng, H., and Zhao, B. Y. Blacklight: Scalable defense for neural networks against {Query-Based} {Black-Box} attacks. In USENIX Security, 2022.
357
+
358
+ Liang, J., Zhou, T., Liu, D., and Wang, W. Clustseg: Clustering for universal segmentation. ICML, 2023.
359
+ Liang, J., Cui, Y., Wang, Q., Geng, T., Wang, W., and Liu, D. Clusterfomer: Clustering as a universal visual learner. NeurIPS, 2024.
360
+ Liew, J. H., Yan, H., Zhang, J., Xu, Z., and Feng, J. Mag- icedit: High-fidelity and temporally coherent video editing. In arXiv, 2023.
361
+ Liu, D., Cui, Y., Tan, W., and Chen, Y. Sg-net: Spatial granularity network for one-stage video instance segmentation. In CVPR, 2021.
362
+ Liu, Y., Chen, X., Liu, C., and Song, D. Delving into transferable adversarial examples and black-box attacks. In ICLR, 2016.
363
+ Lu, Y., Wang, Q., Ma, S., Geng, T., Chen, Y. V., Chen, H., and Liu, D. Transflow: Transformer as flow learner. In CVPR, 2023.
364
+ Menze, M., Heipke, C., and Geiger, A. Joint 3d estimation of vehicles and scene flow. In ISPRS Workshop on Image Sequence Analysis (ISA), 2015.
365
+ Moon, S., An, G., and Song, H. O. Parsimonious black-box adversarial attacks via efficient combinatorial optimization. In ICML, 2019.
366
+ Naseer, M., Khan, S., and Porikli, F. Local gradients smoothing: Defense against localized adversarial attacks. In WACV, 2019.
367
+ Ranjan, A., Janai, J., Geiger, A., and Black, M. J. Attacking optical flow. In ICCV, 2019.
368
+ 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.
369
+ Tao, G., An, S., Cheng, S., Shen, G., and Zhang, X. Hard-label black-box universal adversarial patch attack. In USENIX Security, 2023.
370
+ Teed, Z. and Deng, J. Raft: Recurrent all-pairs field transforms for optical flow. In ECCV, 2020.
371
+ Tesla. Tesla Autopilot. https://www.tesla.com/ autopilot.
372
+ Uhrig, J., Schneider, N., Schneider, L., Franke, U., Brox, T., and Geiger, A. Sparsity invariant cnns. In International Conference on 3D Vision (3DV), 2017.
373
+ Wang, R., Yu, Z., and Gao, S. Planedepth: Self-supervised depth estimation via orthogonal planes. In CVPR, 2023.
374
+
375
+ Wang, W., Liang, J., and Liu, D. Learning equivariant segmentation with instance-unique querying. NeurIPS, 2022.
376
+ Wang, X. and He, K. Enhancing the transferability of adversarial attacks through variance tuning. In CVPR, 2021.
377
+ Wang, Y., Liang, Y., Xu, H., Jiao, S., and Yu, H. Sqdepth: Generalizable self-supervised fine-structured monocular depth estimation. In AAAI, 2024.
378
+ Wang, Z., Guo, H., Zhang, Z., Liu, W., Qin, Z., and Ren, K. Feature importance-aware transferable adversarial attacks. In ICCV, 2021.
379
+ Watson, J., Firman, M., Brostow, G. J., and Turmukhambetov, D. Self-supervised monocular depth hints. In ICCV, 2019.
380
+ Wimbauer, F., Yang, N., Von Stumberg, L., Zeller, N., and Cremers, D. Monorec: Semi-supervised dense reconstruction in dynamic environments from a single moving camera. In CVPR, 2021.
381
+ Wu, D., Wang, Y., Xia, S.-T., Bailey, J., and Ma, X. Skip connections matter: On the transferability of adversarial examples generated with resnets. In ICLR, 2020.
382
+ Xiang, C., Mahloujifar, S., and Mittal, P. {PatchCleanser}: Certifiably robust defense against adversarial patches for any image classifier. In USEnIX Security, 2022.
383
+ Yan, Z., Guo, Y., Liang, J., and Zhang, C. Policy-driven attack: learning to query for hard-label black-box adversarial examples. In ICLR, 2020.
384
+ Yang, C., Kortylewski, A., Xie, C., Cao, Y., and Yuille, A. Patchattack: A black-box texture-based attack with reinforcement learning. In ECCV, 2020.
385
+ Zeng, J., Tong, Y., Huang, Y., Yan, Q., Sun, W., Chen, J., and Wang, Y. Deep surface normal estimation with hierarchical rgb-d fusion. In CVPR, 2019.
386
+ Zhang, J., Li, L., Li, H., Zhang, X., Yang, S., and Li, B. Progressive-scale boundary blackbox attack via projective gradient estimation. In ICML, 2021.
387
+
388
+ # Appendix
389
+
390
+ # A. Experimental Details
391
+
392
+ Attack Settings. Adversarial patches are generated utilizing a single GPU (Nvidia RTX A6000) equipped with a memory capacity of 48G, in conjunction with an Intel Xeon Silver 4214R CPU. The resolution of input scenes from the KITTI dataset is resized to $384 \times 1280$ for Planedepth and $320 \times 1024$ for other models. We establish the initial square area as $2.5\%$ of the patch area, and the pre-defined square size schedule (Algorithm 2 line 4) is set at 100, 500, 1500, 3000, 5000, 10000 for a maximum of 10000 iterations. The square area is halved once the iteration index reaches the pre-defined steps. The initial noise bound $\alpha$ (Algorithm 1 line 7) and noise decay factor $\gamma$ (Algorithm 1 line 23) are set to 0.1 and 0.98 respectively. The initialization period $K$ (Algorithm 2 line 5) is 100 iterations. We adopt an Adam optimizer with the learning rate of 0.1, and set 0.5 for both $\beta_{1}$ and $\beta_{2}$ . The reference white-box attack in Table 1 also employs the same Adam optimizer, while the gradients for the patch region are calculated through back-propagation. Other hyper-parameters are discussed in the ablation studies, in which we use $b = 20$ , $T_{1} = 1$ and $T_{2} = 1$ as the default settings. We discuss the transferability of our approach to another dataset in Appendix E.
393
+
394
+ Runtime Overhead. Table 6 displays the time used to generate a valid universal adversarial patch after $300K$ queries for both MDE and OFE models. The patch size is $2\%$ of the input image. The first column displays the target model name. The second column denotes the attack performance and the last column reports the runtime overhead of the patch generation.
395
+
396
+ Table 6. Attack performance and runtime overhead at ${300}\mathrm{\;K}$ queries.
397
+
398
+ <table><tr><td>Models</td><td>DEE / EPE</td><td>Runtime</td></tr><tr><td>Monodepth2</td><td>74.71</td><td>0.5 h</td></tr><tr><td>DepthHints</td><td>38.54</td><td>0.5 h</td></tr><tr><td>Planeddepth</td><td>21.03</td><td>4 h</td></tr><tr><td>SQLdepth</td><td>41.62</td><td>4 h</td></tr><tr><td>FlowNetC</td><td>695.55</td><td>0.5 h</td></tr><tr><td>FlowNet2</td><td>19.63</td><td>1 h</td></tr><tr><td>PWC-Net</td><td>3.81</td><td>2 h</td></tr></table>
399
+
400
+ Table 7. Attack performance on different patch locations.
401
+
402
+ <table><tr><td>Query</td><td>DepthHints</td><td>FlowNetC</td></tr><tr><td>50K</td><td>2.85</td><td>4.96</td></tr><tr><td>200K</td><td>20.99</td><td>128.39</td></tr><tr><td>400K</td><td>33.15</td><td>315.30</td></tr><tr><td>800K</td><td>42.63</td><td>447.57</td></tr><tr><td>1000K</td><td>46.56</td><td>483.54</td></tr></table>
403
+
404
+ # B. Additional Ablation Studies
405
+
406
+ Inter-square Threshold. The inter-square threshold $T_{2}$ in Algorithm 1 (line 23) controls the tolerance for negative iterations of square location selection. Upon reaching this threshold, BADPART reduces the noise bound $\epsilon$ for those trials in gradient estimation. Figure 8 presents the results of our experimental ablations on this parameter. As shown, its influence on the attack performance is not substantial, except for a large value setting on FlowNet2 (e.g., $T_{2} = 15$ ). Consequently, we have set $T_{2}$ to 1 in our main experiments.
407
+
408
+ ![](images/05b75f989e2f607cd544da28235f88c6cd2994c12b1b05881ca334231db60015.jpg)
409
+ (a) Monodepth2
410
+ Figure 8. Ablation study on different inter-square threshold $T_{2}$ .
411
+
412
+ ![](images/462a3296beaa43ed10bf28269f4b59e5778372c570525db1f44274dd634e87f2.jpg)
413
+ (b) FlowNet2
414
+
415
+ Patch Locations. In consideration of different patch locations, BADPART can be easily extended to generate not only
416
+
417
+ ![](images/69ed089ac5ee222d9f28ce7b76cf74cbc8c2ce6a04824febc420f68755da1136.jpg)
418
+ Figure 9. Qualitative examples of the attack performance for different patch locations.
419
+
420
+ Table 8. More quantitative results of attack performance at ${300}\mathrm{\;K}$ query times.
421
+
422
+ <table><tr><td rowspan="2">Models</td><td colspan="4">57*57 Patch (1%)</td><td colspan="4">80*80 Patch (2%)</td><td colspan="4">100*100 Patch (3%)</td></tr><tr><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td><td>GA</td><td>HB</td><td>P-RS</td><td>Ours</td></tr><tr><td>Monodepth2</td><td>-0.03</td><td>3.62</td><td>36.29</td><td>20.37</td><td>-0.17</td><td>19.64</td><td>57.72</td><td>66.21</td><td>0.61</td><td>18.03</td><td>77.33</td><td>81.98</td></tr><tr><td>DepthHints</td><td>0.30</td><td>2.20</td><td>1.63</td><td>39.11</td><td>-0.76</td><td>3.50</td><td>5.65</td><td>38.54</td><td>-1.47</td><td>2.24</td><td>40.24</td><td>42.40</td></tr><tr><td>SQLDepth</td><td>-0.14</td><td>-0.02</td><td>3.89</td><td>36.28</td><td>-0.43</td><td>0.12</td><td>15.31</td><td>41.39</td><td>-0.57</td><td>0.45</td><td>8.17</td><td>42.31</td></tr><tr><td>PlaneDepth</td><td>-0.43</td><td>0.83</td><td>0.83</td><td>17.19</td><td>-1.75</td><td>1.07</td><td>0.99</td><td>21.03</td><td>-1.86</td><td>1.47</td><td>2.47</td><td>19.39</td></tr><tr><td>FlowNetC</td><td>5.42</td><td>3.70</td><td>5.24</td><td>463.30</td><td>3.66</td><td>3.62</td><td>347.10</td><td>695.50</td><td>4.58</td><td>4.43</td><td>304.70</td><td>455.60</td></tr><tr><td>FlowNet2</td><td>2.28</td><td>12.21</td><td>2.64</td><td>18.75</td><td>1.67</td><td>7.22</td><td>1.77</td><td>19.63</td><td>1.27</td><td>10.31</td><td>2.96</td><td>11.05</td></tr><tr><td>PWC-Net</td><td>1.93</td><td>2.07</td><td>2.35</td><td>3.69</td><td>1.73</td><td>1.90</td><td>1.66</td><td>3.81</td><td>1.43</td><td>1.53</td><td>1.44</td><td>2.96</td></tr></table>
423
+
424
+ a scene-independent but also location-independent adversarial patch. For every step in optimizing the square area of adversarial patch in Algorithm 1(line 14-22), we randomly attach the adversarial patch on $K$ different positions $\mathbf{q}_1, \dots, \mathbf{q}_k$ . For each position $\mathbf{q}_i$ , we get the estimated gradient $\mathbf{g}_i$ by Algorithm 3. The final gradient $\mathbf{g}$ is the average of $\mathbf{g}_1, \dots, \mathbf{g}_k$ . Then the current square area of adversarial patch is optimized by the estimated gradient $\mathbf{g}$ . In our experiment, we utilize DepthHints and FlowNetC as our target models and the number of patch positions $K$ is set to 3. During the training stage, we randomly sample 5 patch locations on the validation images $[\mathbf{x}^{\mathrm{v}}]_n$ . In testing, we evaluate the attack performance on 100 random patch locations in the test set. Other settings remain the same as the previous experiments. Table 7 shows the result. We report the attack performance on two models, DepthHints and FlowNetC, under various query times. The average DEE/EPE caused by the adversarial patch on 100 random positions continues growing with queries rising after 1000K queries. Some qualitative examples are shown in Figure 9, using the converged patch. Columns represent various scenes. Each row in two Figures denotes a input-output pair of the target MDE/OFE model. The first two rows belong to DepthHints while the last two rows belong to FlowNetC. We can see that the adversarial patch generated by BADPART leads to significant error universally across both varying scenes and patch locations, which suggests that the patch exhibits robust characteristics of scene and location invariance.
425
+
426
+ ![](images/4e2909c80aaa234ff58376a9ce954a6f99d36a130bdf84694eb703af6b64c5fc.jpg)
427
+ Figure 10. More qualitative examples of the attack performance of BADPART and the baseline methods on different models.
428
+
429
+ # C. More Qualitative and Quantitative Results
430
+
431
+ Figure 10 and Figure 11 show more qualitative results of our attack. Each row in the two Figures denotes a target model. The first four rows are MDE models and the last three rows are OFE models. The columns in Figure 10 denote different attack methods and the columns in Figure 11 represent various scenes. For MDE models, since the attack goal is to make the distance estimation as far as possible, darker colors in the estimated depth map for the patched area refer to better attack performance. For OFE models, since the adversarial patch is attached at the same position on the two input images, the ground-truth optical flow of the patched area should be zero (i.e., white color in the flow map). Hence, in the estimated flow map, stronger colors at the patched area represent better attack performance. The patches in Figure 10 are generated using 300K queries and they cover $2\%$ of the image size. Quantitative results are presented in Table 8 as well as other patch sizes. It is easy to learn from Figure 10 and Table 8 that BADPART has the best attack performance on various pixel-wise regression models. In addition, Figure 11 shows that the generated patch works universally across varying scenes.
432
+
433
+ ![](images/f36697b0476eb6ae347ea653b5b354f31953221468e0053278211e4208062940.jpg)
434
+
435
+ ![](images/f6447d07ceb9567c30348d73a0927efef6916be68fd8c0ba419fcddc3e2a4436.jpg)
436
+ Figure 11. Qualitative examples of the attack performance of BADPART on different models and scene images.
437
+ (a) Depthhints
438
+ Figure 12. Comparison of query efficiency between BADPART and the baseline methods on four models (1% patch).
439
+
440
+ ![](images/b9e4bb222a43fc794239a416faf3dba9018b04c9656ff767f831267d40b78624.jpg)
441
+ (b) Planedepth
442
+
443
+ ![](images/6e62481d612675f3ae063f9b94bb56890eb8d38eee1394640ed3ea7f7cdc56e3.jpg)
444
+ (c) FlowNetC
445
+
446
+ ![](images/0e5e1e2ffa5393fcd99af5129dcda6ae296652b8e90c074b9adedf053c227b32.jpg)
447
+ (d) FlowNet2
448
+
449
+ # D. Discussion on More Attacks and Defenses
450
+
451
+ Attacks. In our main experiments, we have endeavored to compare our method with the SOTA score-based (i.e., soft-label) attack, specifically Patch-RS (Croce et al., 2022), and decision-based (i.e., hard-label) attack, namely HardBeat (Tao et al.,
452
+
453
+ Table 9. Attack performance comparison with additional attack baselines (single-image).
454
+
455
+ <table><tr><td rowspan="2">Query</td><td colspan="3">Monodepth2</td><td colspan="3">FlowNet2</td></tr><tr><td>HPA</td><td>Adv-watermark</td><td>BadPart (ours)</td><td>HPA</td><td>Adv-watermark</td><td>BadPart (ours)</td></tr><tr><td>10K</td><td>1.376</td><td>2.178</td><td>9.060</td><td>3.024</td><td>4.551</td><td>13.141</td></tr><tr><td>30K</td><td>1.386</td><td>2.178</td><td>24.235</td><td>3.335</td><td>4.551</td><td>41.562</td></tr><tr><td>50K</td><td>1.409</td><td>2.178</td><td>50.953</td><td>3.542</td><td>4.553</td><td>53.663</td></tr><tr><td>80K</td><td>1.503</td><td>2.178</td><td>70.598</td><td>3.677</td><td>4.553</td><td>60.793</td></tr><tr><td>100K</td><td>1.598</td><td>2.178</td><td>76.890</td><td>3.828</td><td>4.554</td><td>67.954</td></tr></table>
456
+
457
+ 2023). Given the new challenges encountered in black-box patch attacks against pixel-wise regression models, we had to adapt these SOTA attacks which were originally designed for classification models, to ensure an equitable comparison. It is important to note, however, that not every method developed for classification models is amenable to adaptation for our scenario. This is, in part, due to the absence of class labels in our context, which are integral to some methods. For instance, PatchAttack (Yang et al., 2020) leverages pre-generated texture images for each class in ImageNet, which are imbued with distinctive class features capable of triggering the corresponding label, generated using a white-box surrogate model. Similarly, DevoPatch (Chen et al., 2023) utilizes an image from the target class (e.g., an elephant) as foundational prior knowledge to initiate the patch on a source image (e.g., a clock). The reliance on class labels in these methods renders them incompatible with our investigation of purely query-based black-box attacks in the realm of pixel-wise regression tasks.
458
+
459
+ HPA (Fawzi & Frossard, 2016) and Adv-watermark (Jia et al., 2020) are also designed for classification tasks. However, HPA (Fawzi & Frossard, 2016) primarily utilizes the classifier's output logits, which we can adapt to our context by using our regression outputs. Meanwhile, Adv-watermark (Jia et al., 2020) employs an evolutionary algorithm to optimize the positioning and transparency of watermarks that serve as adversarial patches. To evaluate the attack performance of HPA and Adv-watermark on pixel-wise regression tasks, we conducted additional experiments, and results are shown in Table 9. As shown, the errors caused by those attacks on both MDE and OFE tasks are limited, and additional queries do not significantly enhance their attack performance, suggesting low efficiency. The performance of Adv-watermark remains nearly static after initialization. In contrast, our approach proves to be substantially more effective and efficient.
460
+
461
+ It is also pertinent to mention that the above attacks are all single-image attacks, in which each image requires a unique patch pattern optimized specifically. However, we focus on the universal attack, in which the patch generation is a one-time effort and the generated patch can be applied to arbitrary unseen images and attack universally. This fundamental difference in problem setting also elucidates the impracticality of applying the aforementioned methods to our scenario.
462
+
463
+ Defenses. We have also further analyzed the mainstream defense methods against patch attacks and have ported the applicable defense algorithms to our scenario to test the effectiveness of our attack methods. The Local Gradient Smoothing (LGS) algorithm (Naseer et al., 2019) implements security defense through identifying the high-frequency patch areas and utilizing local gradient smoothing to degrade the patch's effectiveness. However, in our experiments, this method results in a high rate of false positive anomaly identification and smoothing on benign areas. Although the false positive smoothing may not affect the classification tasks, it severely affected the pixel-wise regression outputs of our subject models in areas that are incorrectly smoothed. Detailed results can be found in Table 10. The algorithm's parameters are set to the optimal configuration as per the paper. As shown, the defense affects, on average, $25.245\%$ of the total area in randomly selected benign images, leading to an average relative prediction error of $23.344\%$ across various pixel-wise regression models. This renders the defense impractical for real-world application.
464
+
465
+ Moreover, many defense methods against patch attacks for classification tasks are not applicable in our scenario of pixel-wise regression tasks. DW (Hayes, 2018) treats defense as a process similar to watermark removal targeted at patches. Although the guided back-propagation method mentioned in this article for constructing saliency maps of images might help in effectively identifying patch areas, the algorithm relies on the use of predicted labels, which do not exist in our scenario. RS (Levine & Feizi, 2020) defends against patch attacks on classification models effectively using statistical predictions on a small number of image pixels. However, this practice is based on the fact that classification models could still predict the right label using only a fraction of the image. In contrast, pixel-wise regression models cannot make accurate predictions on partial areas; they need to process the entire scene, which makes this defense strategy not applicable. Based on our analysis
466
+
467
+ Table 10. Model performance degradation on benign images caused by LGS (Naseer et al., 2019).
468
+
469
+ <table><tr><td>Models</td><td>Affected Portion (%)</td><td>Relative Error (%)</td></tr><tr><td>Monodepth2</td><td>27.335</td><td>16.698</td></tr><tr><td>DepthHints</td><td>25.944</td><td>17.010</td></tr><tr><td>PlaneDepth</td><td>31.781</td><td>15.738</td></tr><tr><td>SQLDepth</td><td>35.982</td><td>18.401</td></tr><tr><td>FlowNetC</td><td>19.037</td><td>29.740</td></tr><tr><td>FlowNet2</td><td>19.695</td><td>27.507</td></tr><tr><td>PWC-Net</td><td>16.939</td><td>38.316</td></tr><tr><td>Average</td><td>25.245</td><td>23.344</td></tr></table>
470
+
471
+ Table 11. Attack performance of patches generated using different dataset.
472
+
473
+ <table><tr><td rowspan="2">Model
474
+ Query \Generation Dataset</td><td colspan="2">Monodepth2</td><td colspan="2">FlowNetC</td></tr><tr><td>nuScenes</td><td>KITTI (ref)</td><td>nuScenes</td><td>KITTI (ref)</td></tr><tr><td>50K</td><td>28.568</td><td>19.439</td><td>149.397</td><td>165.549</td></tr><tr><td>100K</td><td>42.541</td><td>28.397</td><td>208.646</td><td>270.407</td></tr><tr><td>200K</td><td>65.092</td><td>45.208</td><td>313.976</td><td>492.197</td></tr><tr><td>300K</td><td>78.380</td><td>66.210</td><td>503.938</td><td>695.503</td></tr></table>
475
+
476
+ and experiments on defense algorithms against patch attacks, there currently exists no defense method against our method that can balance good defense effectiveness with small impact on the performance of benign samples. The protection of pixel-wise regression models against attacks remains a significant challenge.
477
+
478
+ # E. Transferability of the Dataset
479
+
480
+ The pre-training process in Algorithm 1 is different from model training and we do not require access to the model's training images. Our attack is the universal patch attack instead of single-image attack. It requires a one-time patch generation process (Algorithm 1), referred to as the "pre-training stage", then the generated patch can be applied to arbitrary unseen images to attack the target model. As stated in the Attack Settings of Section 5.1, the attack performance in our experiments is evaluated using an unseen test set (also customizable), and Figure 11 shows the qualitative results, demonstrating the universal effectiveness of our patches across various scenes. Therefore, although we call the patch generation process in Algorithm 1 as a "pre-training stage", the training and validation images used in this stage are customizable. We have also conducted additional experiments in which we use images from another public dataset, named nuScenes, as our training set for patch generation, to attack models trained on the KITTI dataset. Results are shown in Table 11. As shown, patches generated using the nuScenes dataset still achieve a good attack performance, on par with those generated using the KITTI dataset. This validates that access to the training images of the model is not a prerequisite.
481
+
482
+ Since our attack is dataset-independent and does not require access to the model's training set, as long as the subject model works on the input image, the generated patch can be effective. We have conducted additional experiments to validate the transferability of the patch generated on KITTI to nuScenes. We sample 20 images randomly from the nuScenes dataset as the test set, and report the attack performance for different models using patches generated with various numbers of queries. The result can be found in Table 12. As shown, the attack performance on images from the KITTI dataset is similar to the attack performance on the nuScenes dataset, which validates that our attack is dataset-agnostic.
483
+
484
+ # F. Limitations and Future Work
485
+
486
+ In this work, we have explored the black-box adversarial patch attack against pixel-wise regression models, which reveals the potential vulnerabilities in such models and their expanded applications. We have addressed the domain-specific challenge of high-resolution patch optimization, and our proposed method has shown an attack efficacy that surpasses that of various established benchmarks. It also appears to be robust against state-of-the-art black-box defense mechanisms. However,
487
+
488
+ Table 12. Attack performance of transferring the patch generated from KITTI to nuScenes dataset.
489
+
490
+ <table><tr><td rowspan="2">Model
491
+ Query \Test Dataset</td><td colspan="2">Monodepth2</td><td colspan="2">DepthHints</td><td colspan="2">FlowNetC</td></tr><tr><td>nuScenes</td><td>KITTI (ref)</td><td>nuScenes</td><td>KITTI (ref)</td><td>nuScenes</td><td>KITTI (ref)</td></tr><tr><td>50K</td><td>20.481</td><td>19.439</td><td>8.285</td><td>6.803</td><td>164.573</td><td>165.549</td></tr><tr><td>200K</td><td>48.919</td><td>45.208</td><td>36.136</td><td>30.86</td><td>495.177</td><td>492.197</td></tr><tr><td>400K</td><td>80.714</td><td>81.097</td><td>44.276</td><td>42.832</td><td>753.558</td><td>742.817</td></tr><tr><td>800K</td><td>85.945</td><td>89.321</td><td>66.031</td><td>60.678</td><td>1149.475</td><td>1132.284</td></tr></table>
492
+
493
+ it is important to acknowledge potential limitations of our study. Our focus was predominantly on digital-space attacks, wherein the perturbed pixels are utilized directly as input for the model. This approach aligns with the conventional methods employed in prior black-box attacks, as referenced in works such as (Andriushchenko et al., 2020; Croce et al., 2022; Tao et al., 2023), and is deemed practical within the threat model that encompasses attacks on online services. Nevertheless, the implications of physical-world attacks are arguably more profound, particularly in the context of autonomous driving. Physical-world attacks, such as those described in (Cheng et al., 2022; Choi et al., 2022), necessitate a more nuanced consideration of environmental factors, including but not limited to viewing angles, distances, lighting conditions, and printing qualities. The question of how to effectively execute query-based black-box patch attacks in a physical setting remains unresolved. It is this intriguing challenge that we aim to address in our future research endeavors. An additional constraint pertains to the dimensions of the adversarial patch. Should individuals seek to employ such patches for the purpose of privacy preservation, as discussed in §5.5, the current manifestation of the patch on portrait images may be conspicuously apparent. The generation of stealthy patches for pixel-wise regression tasks within a black-box context is an unresolved issue, and we earmark this as a topic for future investigation.
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:964e0700f8a2dbebf63b473897dbf91982240af3b97239858acb5470c53fd60b
3
+ size 1660661
2024/BadPart_ Unified Black-box Adversarial Patch Attacks against Pixel-wise Regression Tasks/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/36e32941-ddd1-4ff0-aa1e-90024fd0f30f_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8c0026097486107a4980c278edbefe4755511fcf321ae3b53b4f0c0f4c3ce25
3
+ size 3149813
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce08f62719c59ebe26eb3002841a23b6108941c77406286a183d36cdd43b0346
3
+ size 2133871
2024/Bagged Deep Image Prior for Recovering Images in the Presence of Speckle Noise/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/d8483e04-d1c4-4cc5-af91-0624c74037ff_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae8ad224e7c8d268b22dd3da6bf41a6dcb80703d6a3537cdd42594aac1ec77a8
3
+ size 4914007
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:556041af6e1892ea6867b973a4da87b00ea071bfe7fa2189e46bccf3bf3e2964
3
+ size 1464323
2024/Balanced Data, Imbalanced Spectra_ Unveiling Class Disparities with Spectral Imbalance/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balanced Resonate-and-Fire Neurons/3fd367c1-3c97-44d0-84b4-60f862bacf41_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8af44128f60d026e20f6d1043d6a4f949ea2d6e7d665f722224f5203925b573
3
+ size 4843333
2024/Balanced Resonate-and-Fire Neurons/full.md ADDED
@@ -0,0 +1,649 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Saya Higuchi<sup>1</sup> Sebastian Kairat<sup>1</sup> Sander M. Bohté<sup>2</sup> Sebastian Otte<sup>1</sup>
2
+
3
+ # Abstract
4
+
5
+ The resonate-and-fire (RF) neuron, introduced over two decades ago, is a simple, efficient, yet biologically plausible spiking neuron model, which can extract frequency patterns within the time domain due to its resonating membrane dynamics. However, previous RF formulations suffer from intrinsic shortcomings that limit effective learning and prevent exploiting the principled advantage of RF neurons. Here, we introduce the balanced RF (BRF) neuron, which alleviates some of the intrinsic limitations of vanilla RF neurons and demonstrates its effectiveness within recurrent spiking neural networks (RSNNs) on various sequence learning tasks. We show that networks of BRF neurons achieve overall higher task performance, produce only a fraction of the spikes, and require significantly fewer parameters as compared to modern RSNNs. Moreover, BRF-RSNN consistently provide much faster and more stable training convergence, even when bridging many hundreds of time steps during backpropagation through time (BPTT). These results underscore that our BRF-RSNN is a strong candidate for future large-scale RSNN architectures, further lines of research in SNN methodology, and more efficient hardware implementations.
6
+
7
+ # 1. Introduction
8
+
9
+ Artificial neural networks (ANNs) have become the main method for solving machine learning problems in recent years (Goodfellow et al., 2016; Wu & Feng, 2018; Abiodun et al., 2019). However, they require massive computation and energy, making them inefficient for large-scale
10
+
11
+ $^{1}$ Adaptive AI Lab, Institute of Robotics and Cognitive Systems University of Lübeck, Germany $^{2}$ Machine Learning Group, Centrum Wiskunde & Informatica (CWI)
12
+
13
+ Amsterdam, The Netherlands. Correspondence to: Saya Higuchi <saya.higuchi@student.uni-luebeck.de>, Sebastian Otte <sebastian.otte@uni-luebeck.de>.
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
+ real-world applications—particularly in the realm of edge computing—due to the deep non-linear continuous estimators to represent features of the data (Pfeiffer & Pfeil, 2018).
18
+
19
+ Spiking neural networks (SNNs) circumvent this drawback by processing information through the precise timing of action potentials, or spikes. SNNs can potentially be more efficient compared to ANNs due to their event-driven property, for which computation is only required when spikes are propagated in the system (Paugam-Moisy & Bohté, 2012). Furthermore, SNNs are self-recurrent, as the neurons have a dynamic internal state that modulates their activity over time, and are more biologically realistic than conventional ANNs. Some examples of spiking neurons with ascending biological plausibility include the leaky integrate-and-fire (LIF) neuron, the adaptive leaky integrate-and-fire (ALIF) neuron (Bellec et al., 2018), the Izhikevich neuron (Izhikevich, 2003), and the Hodgkin-Huxley (HH) neuron (Hodgkin & Huxley, 1952). While the HH model is too computationally expensive for practical application, it exhibits rich and complex membrane dynamics that simpler models lack.
20
+
21
+ One mode of dynamics gaining interest in ML applications in particular is the resonating behavior seen in oscillatory neurons. Subthreshold oscillations of the membrane potential have been observed in various mammalian nervous systems, including the neurons in the frontal cortex (Llinas et al., 1991), in the thalamus (Pedroarena & Llinas, 1997), and in layer II of the medial entorhinal cortex (Alonso & Llinas, 1989), which is crucial in spatial information processing (Doeller et al., 2010). The resonate-and-fire (RF) neuron proposed by Izhikevich (2001) models such damped or sustained subthreshold oscillations of biological neurons: the RF neuron fires when the frequency of the incoming spikes matches that of the neuron's damped oscillation. Incoming signals with higher frequency leads to more firing for a LIF neuron but less firing for an RF neuron with slow oscillation. As the RF neuron is similarly computationally efficient as the LIF neuron, it is a spiking neuron model potentially suitable for large-scale SNNs (Izhikevich, 2001).
22
+
23
+ Previous works showed RF neurons implemented in the Intel Loihi 2 (Davies et al., 2018), a neuromorphic processor, can be used to compute the short-time Fourier transform (STFT) of signals (Frady et al., 2022; Shrestha et al., 2023). Moreover, the RF neurons successfully converted raw data
24
+
25
+ signals to spike trains (Shaaban et al., 2024), and further input to SNNs with LIF neurons for detection and classification tasks (Hille et al., 2022; Lehmann et al., 2023). RF neurons have also been implemented in the framework of (feedforward) SNNs as harmonic oscillators for image classification tasks (AlKhamissi et al., 2021), as well as in optical flow estimation and audio classification tasks (Frady et al., 2022). Still, the performance of the RF models did not significantly exceed that of deep LIF SNNs (Frady et al., 2022) or LSTM cells (AlKhamissi et al., 2021), and these studies did not compare with state-of-art spiking neuron models, such as ALIF. Considering the strengths of the RF neuron, these results suggest that the full potential of the RF neuron has yet to be explored.
26
+
27
+ Recent methodological advances in training recurrent SNNs (RSNNs) have demonstrated their potential for effective time series learning, particularly in combination with BPTT (Bellec et al., 2018; Yin et al., 2021). Nonetheless, they do face a "convergence dilemma"—it requires usually up to many hundreds of epochs for RSNNs to converge properly (Yin et al., 2021; Fang et al., 2021; Zhang et al., 2023).
28
+
29
+ Here we propose a novel spiking neuron model—the balanced RF neuron—which overcomes both, the intrinsic limitations of vanilla RF neurons as well as shortcomings that arise during training of ALIF-RSNNs. As a result, our RF variants achieve not only comparable and higher task performance than the ALIF networks, but also remarkably fast and stable convergence, reaching $95\%$ of the mean final accuracy within the first five epochs with up to seven times less spikes than ALIF networks.
30
+
31
+ # 2. Resonate-and-Fire Neurons
32
+
33
+ The oscillatory behavior of the membrane potential in an RF neuron is formulated with two linear differential equations:
34
+
35
+ $$
36
+ \dot {x} = b x - \omega y + I \tag {1}
37
+ $$
38
+
39
+ $$
40
+ \dot {y} = \omega x + b y \tag {2}
41
+ $$
42
+
43
+ which is expressed as a single complex equation:
44
+
45
+ $$
46
+ \dot {u} = (b + i \omega) u + I \tag {3}
47
+ $$
48
+
49
+ with $u = (x + iy) \in \mathbb{C}$ and $I$ the injected current (Izhikevich, 2001). $\omega > 0$ is the angular frequency of the neuron, which describes how many radians the neuron progresses per second. $b < 0$ is the dampening factor that exponentially decays the oscillation. The smaller $b$ is, the faster the oscillation dampens to the resting state.
50
+
51
+ Izhikevich RF Neuron. We applied the Euler method (Atkinson, 1989) to Equation 3 with step size (time scale) $\delta$ :
52
+
53
+ $$
54
+ u (t) = u (t - \delta) + \delta ((b + i \omega) u (t - \delta) + I (t)) \tag {4}
55
+ $$
56
+
57
+ ![](images/eee54183069c8a6b0379c5651ce7ac0bea4a506e879e3eba6acddbcbaae44859.jpg)
58
+
59
+ ![](images/2efba4b07c8fdfdaa401061a755798e12c7ecb5f155f73508bf5d0e044c94d58.jpg)
60
+ Figure 1. Membrane dynamics of two RF neurons. The four excitatory input spikes are in phase with the neuron's angular frequency $\omega = 10$ . The inhibitory spike at half-phase enhances the sensitivity of the neuron to forthcoming excitatory input. Depending on its parameterization, the neuron exhibits divergence behavior (top) with $b = -0.3$ and $\delta = 0.01$ or convergence behavior (bottom) with $b = -1$ . $I(t) \in \mathbb{R}$ and $u_{1}(t), u_{2}(t) \in \mathbb{C}$ refer to the injected current and the membrane potential of the neuron, respectively.
61
+
62
+ which is used to simulate the RF neuron in Figure 1. It shows the oscillatory behavior when similar frequency-timed input is injected into an RF neuron with an angular frequency of $10\, \text{rad/s}$ and a dampening factor of -1.
63
+
64
+ Harmonic RF Neuron. In the harmonic RF (HRF) neuron, the membrane potential changes based on the dynamics of dampened harmonic oscillation (AlKhamissi et al., 2021). Instead of using a complex representation, the membrane potential is split into two states as follows:
65
+
66
+ $$
67
+ \dot {u} = - 2 b u - \omega^ {2} v + I \tag {5}
68
+ $$
69
+
70
+ $$
71
+ \dot {v} = u \tag {6}
72
+ $$
73
+
74
+ By applying Euler integration we get the equations for discrete time steps:
75
+
76
+ $$
77
+ \begin{array}{l} u (t) = u (t - \delta) + \delta (- 2 b u (t - \delta) \tag {7} \\ - \omega^ {2} v (t - \delta) + I (t)) \\ \end{array}
78
+ $$
79
+
80
+ $$
81
+ v (t) = v (t - \delta) + \delta u (t - \delta). \tag {8}
82
+ $$
83
+
84
+ Here, $b > 0$ is the dampening factor, and $\omega > 0$ is the angular frequency.
85
+
86
+ # 3. Balanced RF Models
87
+
88
+ Initial exploration of the RF neurons in RSNN with a random subset of 32 samples from the sequential MNIST
89
+
90
+ dataset (Deng, 2012) showed excessive spiking, divergent behavior, and the traditional hard and soft reset (Equation 23) hindering immediate resonance behavior.
91
+
92
+ Divergence is due to the approximation of the dynamic system in discrete steps and is dependent on the combination of $\omega$ , $b$ , and the discrete-time scale $\delta$ , as shown in Figure 1 (top). The membrane potential diverges and continuously produces spikes unrelated to the input signal, causing noise and artificial signals that disrupt the original frequencies, which may have hindered effective learning of the model.
93
+
94
+ Balanced Izhikevich RF Neuron. Considering the intrinsic limitations of the basic RF neuron, we introduce the balanced RF (BRF) neuron with a variation in the threshold, reset mechanism, and divergence boundary. To reduce continuous spiking of the neuron and induce spiking sparsity, a refractory period, referred to as $q(t)$ , is implemented in the threshold, increasing it after a neuron fires:
95
+
96
+ $$
97
+ \vartheta (t) = \vartheta_ {c} + q (t) \tag {9}
98
+ $$
99
+
100
+ $$
101
+ z (t) = \Theta (\operatorname {R e} (u (t)) - \vartheta (t)) \tag {10}
102
+ $$
103
+
104
+ with $\vartheta_{c}$ the constant threshold and $z(t)$ the output spiking. The real part of the Equation 3 was considered for the threshold mechanism, as it induces an immediate response. The refractory period decays exponentially with time:
105
+
106
+ $$
107
+ q (t) = \gamma q (t - \delta) + z (t - \delta) \tag {11}
108
+ $$
109
+
110
+ The default refractory period constant is $\gamma = 0.9$ .
111
+
112
+ Another limitation of the basic RF model was the traditional reset mechanism, which reduces the amplitude but disrupts the oscillation. Hence, we propose the smooth reset as an alternative that temporarily increases the dampening of the amplitude to decay faster after the neuron fires by means of integrating the refractory period into the dampening term:
113
+
114
+ $$
115
+ b (t) = b _ {c} - q (t) \tag {12}
116
+ $$
117
+
118
+ with $b_{c}$ the constant dampening factor.
119
+
120
+ The influence of implementing the refractory period and the smooth reset can be seen in Figure 2. The single RF neuron was simulated with $\omega = 10$ , $b = -1$ , and the input signal was frequency-timed. The combination of refractory period and smooth reset significantly reduced the number of spikes, while the output spikes effectively reflected the period of the angular frequency of the neuron. The effect of implementing both are highlighted in Figure 10 in Section A.8.
121
+
122
+ To alleviate the divergence problem, we propose to restrict the parameter space to a subspace below the divergence boundary—an analytically derived relation between $\delta$ , $b_{c}$ , and $\omega$ that ensures convergence. For an RF neuron to converge or show sustained oscillation, the magnitude of the
123
+
124
+ ![](images/e40557cc0eaf33ffb362d87deb1c40750dd2dd5887ab9c8c8015374f87b33a9e.jpg)
125
+ Figure 2. Membrane potential $u(t)$ and spiking response $z(t)$ of an RF neuron without refractory period (RP) or smooth reset (SR) (orange) compared to both (blue) for the given input signal $I(t)$ .
126
+
127
+ membrane potential decreases or stays constant with time given an incoming signal:
128
+
129
+ $$
130
+ | u (t) | \leq | u (t - \delta) | \tag {13}
131
+ $$
132
+
133
+ After spike onset the magnitude converges—but does not precisely become 0, $|u(t - \delta)| \neq 0$ , thus both side is divisible by $|u(t - \delta)|$
134
+
135
+ $$
136
+ \frac {| u (t) |}{| u (t - \delta) |} \leq 1 \tag {14}
137
+ $$
138
+
139
+ Furthermore, the explicit form of the subthreshold oscillatory behavior of the membrane potential after an incoming spike is derived in Section A.3 and given as:
140
+
141
+ $$
142
+ u (t) = \delta \left(1 + \delta \left(b _ {c} + i \omega\right)\right) ^ {\frac {t}{\delta} - 1} \tag {15}
143
+ $$
144
+
145
+ The refractory period and the reset are not considered in the derivation, as post-spiking behavior is irrelevant for modeling subthreshold behavior. The explicit form is further implemented into the inequality above and simplified:
146
+
147
+ $$
148
+ \left| 1 + \delta \left(b _ {c} + i \omega\right) \right| \leq 1
149
+ $$
150
+
151
+ $$
152
+ \Longleftrightarrow \sqrt {(1 + \delta b _ {c}) ^ {2} + (\delta \omega) ^ {2}} \leq 1
153
+ $$
154
+
155
+ Since the radicand is positive, both sides of the inequality can be squared:
156
+
157
+ $$
158
+ \Longrightarrow \left(1 + \delta b _ {c}\right) ^ {2} + (\delta \omega) ^ {2} - 1 \leq 0 \tag {16}
159
+ $$
160
+
161
+ The condition for the neuron to show damped oscillation is found by solving the quadratic inequality for $b_{c}$ , where $b_{c}$ is in the following range of the solutions given a constant $\omega$ :
162
+
163
+ $$
164
+ \frac {- 1 - \sqrt {1 - (\delta \omega) ^ {2}}}{\delta} < b _ {c} < \frac {- 1 + \sqrt {1 - (\delta \omega) ^ {2}}}{\delta} \tag {17}
165
+ $$
166
+
167
+ Furthermore, the neuron is a sustained oscillator if:
168
+
169
+ $$
170
+ b _ {c} = \frac {- 1 \pm \sqrt {1 - (\delta \omega) ^ {2}}}{\delta} \tag {18}
171
+ $$
172
+
173
+ which leads us to another condition of the neuron, since $b_{c} \in \mathbb{R}_{<0}$ and $\omega \in \mathbb{R}_{>0}$ :
174
+
175
+ $$
176
+ \sqrt {1 - (\delta \omega) ^ {2}} > 0 \Rightarrow \omega \leq \frac {1}{\delta} \tag {19}
177
+ $$
178
+
179
+ With a default $\delta = 0.01$ , the highest frequency that the neuron can resonate at is the frequency corresponding to an angular frequency of $100 rad / s$ . We define this angular frequency as the upper boundary $\omega_{ub}$ . The upper bound of $b_{c}$ that leads to sustained oscillation is implemented in this paper as $p(\omega)$ , also considered the divergence boundary:
180
+
181
+ $$
182
+ p (\omega) = \frac {- 1 + \sqrt {1 - (\delta \omega) ^ {2}}}{\delta} \tag {20}
183
+ $$
184
+
185
+ combined with a trainable b-offset $b' > 0$ to ensure flexibility and convergence: $b_{c} = p(\omega) - b'$ , which is constant throughout one sequence length. Figure 9 shows exemplary divergence boundaries for various $\delta$ values. By combining the derived dampening factor with the smooth reset, we present the final equation of $b(t)$ applied for optimization:
186
+
187
+ $$
188
+ b (t) = p (\omega) - b ^ {\prime} - q (t) \tag {21}
189
+ $$
190
+
191
+ Implementing the refractory period, smooth reset, and the divergence boundary leads to efficient learning and sparse spiking for all four datasets.
192
+
193
+ Balanced Harmonic RF Neuron. Similarly, we propose the balanced HRF (BHRF) neuron with the refractory period, smooth reset, and a tailored divergence boundary for $b$ depending on $\omega$ :
194
+
195
+ $$
196
+ p (\omega) = \frac {\omega^ {2}}{2 0 0} \tag {22}
197
+ $$
198
+
199
+ For $\delta = 0.01$ and $b_{c} = p(\omega)$ , the BHRF neuron shows sustained oscillation.
200
+
201
+ Frequency Response of the BRF Neuron. The frequency response plots shown in Figure 3 assess how well the RF neuron responds to specific frequencies. A peak on a frequency response plot indicates a high sensitivity of the neuron to the respective input signal frequency (details in Section A.4). The figure shows alignment of the response peak and $\omega$ of the RF neuron, demonstrating the resonance property to also be present in the discrete case. The slight offset of the response peak and $\omega$ of the RF neuron is an artifact of the numerical integration of the membrane dynamics' differential equation and disappears with decreasing the temporal step size $\delta$ .
202
+
203
+ The RF neuron can also be considered a narrow band pass filter, for which only a specific range of frequencies are filtered depending on its angular frequency $\omega$ . Combined with the discrete time scale $\delta$ and dampening parameter $b'$ , they determine how narrow and sensitive the band pass filter
204
+
205
+ ![](images/d8328e0763dae1dc541461b41eccf48d70a14e0abfa3e86cc1a3bacc90d09d41.jpg)
206
+ Figure 3. RF neuron frequency response plots for exemplary omega $\omega$ and b-offset $b^{\prime}$ combinations with $\delta = 0.001$ .
207
+
208
+ is. It should be noted that RF neurons are naturally sensitive to the lower order subharmonics of their angular frequency, that is (with decaying sensitivity) $\frac{1}{2}\omega$ , $\frac{1}{3}\omega$ , $\frac{1}{4}\omega$ and so forth.
209
+
210
+ We focused on the BRF neuron and the BHRF remained preliminary in its exploration, as the BRF responses were more sensitive to the input frequencies than BHRF responses shown in Figure 8.
211
+
212
+ # 4. Network Implementation
213
+
214
+ We implement the RF, BRF, and BHRF neurons within RSNNs and applied them to simulations with several benchmark datasets<sup>1</sup>. The essential formulations of the BRF and the BHRF neuron are summarized in Algorithm 1 and Algorithm 2, respectively. Note that for the algorithmic formulation we change the notation to time-discrete tensor operations and superscript the time index, whereas the transition from $t$ to $t + 1$ is considered as a time delay of $\delta$ .
215
+
216
+ We trained the networks with BPTT with the double-Gaussian function (Equation 39, Yin et al., 2021) as the surrogate gradient (Bellec et al., 2018; Neftci et al., 2019). Further details of the networks are described in Section A.6.
217
+
218
+ # Algorithm 1 BRF Forward Pass
219
+
220
+ $\begin{array}{rl} & {\overline{\mathbf{b}^t = p(\boldsymbol{\omega}) - \mathbf{b}' - \mathbf{q}^{t - 1}}}\\ & {\mathbf{u}^t = \mathbf{u}^{t - 1} + \delta ((\mathbf{b}^t +i\boldsymbol {\omega})\mathbf{u}^{t - 1} + \mathbf{x}^t)}\\ & {\pmb {\vartheta}^t = \vartheta_c + \mathbf{q}^{t - 1}}\\ & {\mathbf{z}^t = \Theta (\mathrm{Re}(\mathbf{u}^t) - \pmb {\vartheta}^t)}\\ & {\mathbf{q}^t = \gamma \mathbf{q}^{t - 1} + \mathbf{z}^t} \end{array}$
221
+
222
+ $\vartheta_{c} = 1, \gamma = 0.9$ , and $p(\omega) = \frac{-1 + \sqrt{1 - (\delta\omega)^2}}{\delta}$ (Re, $\Theta$ , $p$ are applied component-wise.)
223
+
224
+ ![](images/cfb09e5271131b9ad55f7bc96fd1dba01817e3dad3562fec3690d78b552fe9e2.jpg)
225
+
226
+ ![](images/11ddbae38c3032376d6ad524e2035248b19089c50d94ae4617d8072d5f3d6f7c.jpg)
227
+
228
+ ![](images/80c51c2c38f2bafe394ea4e83a4960ac7544977ed5214073daf60d97ae91eac6.jpg)
229
+
230
+ ![](images/77a72ed03ea323d2eacdc4d4f401d1e7ec06532a29ae253a115b0a734e557c10.jpg)
231
+ Sequential-MNIST sample
232
+ Figure 4. Overview of the datasets. Exa mily MNIST image and its corodng sequential and permuted reprehnsions. Common pixel row outlined in red on MNIST and S-MNIST sample. ECG sample after level cross encoding. SHD sample after preprocessing.
233
+
234
+ # 5. Experiments
235
+
236
+ The MNIST dataset consists of grayscale $28 \times 28$ pixel hand-written digit images for classification. The sequential-MNIST (S-MNIST), which converts the image to a sequence of $1 \times 784$ , is a prominent benchmark dataset that enable comparison between sequential models with 54,000 images for training, 6,000 for validation, and 10,000 for testing. In the permuted S-MNIST variant (PS-MNIST), the pixel positions were first permuted randomly and then input to the network sequentially.
237
+
238
+ Electrocardiogram (ECG) recordings of the heart are represented in voltage over time and consist of cyclic activity with six characteristic waveforms: P, PQ, QR, RS, ST, and TP. The QT database consisted of ECG recordings with pertime step labels classified by experts in the field (Laguna et al., 1997). There were 105 recordings, each recorded for
239
+
240
+ Algorithm 2 BHRF Forward Pass
241
+ ```latex
242
+ $\begin{array}{rl} & {\mathbf{b}^t = p(\pmb {\omega}) - \mathbf{b}' - \mathbf{q}^{t - 1}}\\ & {\mathbf{u}^t = \mathbf{u}^{t - 1} + \delta (-2\mathbf{b}^t\mathbf{u}^{t - 1} - \pmb {\omega}^2\mathbf{v}^{t - 1} + \mathbf{x}^t)}\\ & {\mathbf{v}^t = \mathbf{v}^{t - 1} + \delta \mathbf{u}^{t - 1}}\\ & {\pmb {\vartheta}^t = \vartheta_c + \mathbf{q}^{t - 1}}\\ & {\mathbf{z}^t = \Theta (\mathbf{u}^t -\pmb {\vartheta}^t)}\\ & {\mathbf{q}^t = \gamma \mathbf{q}^{t - 1} + \mathbf{z}^t}\\ & \\ & {\vartheta_c = 1,\gamma = 0.9,\mathrm{and}p(\pmb {\omega}) = \frac{\omega^2}{200}}\\ & {(\mathrm{Re},\Theta ,p\mathrm{are~applied~component - wise.})} \end{array}$
243
+ ```
244
+
245
+ 15 minutes with two electrodes. We left out 24 signals, as they were sudden death recordings without annotation. For the preprocessing shown in Figure 4, refer to Section A.7.
246
+
247
+ The Spiking Heidelberg dataset (SHD) is a benchmark audio-to-spike dataset specifically generated for SNNs (Cramer et al., 2020). It contains 10,420 recordings of spoken digits from 0 to 9 in English and German. The recordings were made with high fidelity and then converted into spike trains for 700 channels through a precise artificial inner ear model (Cramer et al., 2020). The spike trains were further processed with a discrete time scale of $4\mathrm{e} - 3\mathrm{s}$ to obtain sequence length of 250 with zero-padding. This preprocessing was conducted to make the dataset comparable to Yin et al. (2021). We used 7,341 sequences for training, 815 for validation, and 2,264 for inference.
248
+
249
+ # 6. Results
250
+
251
+ The results, the network architecture, the number of parameters, and the number of produced spikes between the best-performing BRF-, RF- and BHRF-RSNN and the baseline ALIF-RSNNs (see Section A.2) or other state-of-the-art (SoTa) models, are compared for each classification task in Table 1. The BRF- and BHRF-RSNN hyperparameters for each dataset are shown in Table 3 in Section A.12. The BHRF and BRF models outperformed the RSNN SoTa for four and three tasks respectively. Complementing accuracy, we also find much enhanced sparseness in the BRF and
252
+
253
+ Table 1. Results between vanilla RF, BRF, BHRF, ALIF (Yin et al., 2021), and other SoTa models: DCLS-Delays (DCLS-D) (Hammouamri et al., 2023) and RadLIF (Bittar & Garner, 2022) on various sequential classification tasks. Architecture represents the number of neurons in each layer. The average accuracy over five runs shown for the RF, BRF and BHRF models, excluding PS-MNIST BHRF. SOPs: average spike operations. *RSNN-SoTa ** SNN-SoTa
254
+
255
+ <table><tr><td>Task</td><td>Model</td><td>Architecture</td><td>No. params. (↓)</td><td>Test Acc. (↑)</td><td>SOPs (↓)</td><td>SOPs/step (↓)</td><td>SOP Ratio (↓)</td></tr><tr><td rowspan="4">S-MNIST</td><td>ALIF*</td><td>4,64, (256)2,10</td><td>156,126</td><td>98.7 %</td><td>70,810.8</td><td>90.32</td><td>1.00×</td></tr><tr><td>RF</td><td>1,256,10</td><td>68,874</td><td>98.0±0.4 %</td><td>29,034.8</td><td>37.03</td><td>0.41×</td></tr><tr><td>BRF</td><td>1,256,10</td><td>68,874</td><td>99.0±0.1 %</td><td>15,462.6</td><td>19.72</td><td>0.22×</td></tr><tr><td>BHRF</td><td>1,256,10</td><td>68,874</td><td>99.1±0.1 %</td><td>21,565.7</td><td>25.51</td><td>0.30×</td></tr><tr><td rowspan="4">PS-MNIST</td><td>ALIF*</td><td>4,64, (256)2,10</td><td>156,126</td><td>94.3 %</td><td>59,772.1</td><td>76.24</td><td>1.00×</td></tr><tr><td>RF</td><td>1,256,10</td><td>68,874</td><td>9.9±0.8 %</td><td>66,474.2</td><td>84.79</td><td>1.11×</td></tr><tr><td>BRF</td><td>1,256,10</td><td>68,874</td><td>95.0±0.2 %</td><td>27,839.7</td><td>35.51</td><td>0.46×</td></tr><tr><td>BHRF</td><td>1,256,10</td><td>68,874</td><td>95.2 %</td><td>24,564.2</td><td>33.33</td><td>0.41×</td></tr><tr><td rowspan="4">ECG</td><td>ALIF*</td><td>4,36,6</td><td>1,776</td><td>85.9 %</td><td>35,011.2</td><td>26.93</td><td>1.00×</td></tr><tr><td>RF</td><td>4,36,6</td><td>1,734</td><td>85.5±0.7 %</td><td>11981.9</td><td>9.22</td><td>0.34×</td></tr><tr><td>BRF</td><td>4,36,6</td><td>1,734</td><td>85.8±0.7 %</td><td>6,307.7</td><td>4.85</td><td>0.18×</td></tr><tr><td>BHRF</td><td>4,36,6</td><td>1,734</td><td>87.0±0.4 %</td><td>6,233.8</td><td>4.80</td><td>0.18×</td></tr><tr><td rowspan="6">SHD</td><td>DCLS-D**</td><td>700, (256)2,20</td><td>≈200,000</td><td>95.1±0.2 %</td><td>-</td><td>-</td><td>-</td></tr><tr><td>RadLIF*</td><td>700, (1024)3,20</td><td>3,893,288</td><td>94.62%</td><td>-</td><td>-</td><td>-</td></tr><tr><td>ALIF</td><td>700, (128)2,20</td><td>142,120</td><td>90.4 %</td><td>24,690.0</td><td>98.76</td><td>1.00×</td></tr><tr><td>RF</td><td>700,128,20</td><td>108,820</td><td>89.2±0.6 %</td><td>4750.2</td><td>19.00</td><td>0.19×</td></tr><tr><td>BRF</td><td>700,128,20</td><td>108,820</td><td>91.7±0.8 %</td><td>3,502.6</td><td>14.01</td><td>0.14×</td></tr><tr><td>BHRF</td><td>700,128,20</td><td>108,820</td><td>92.7±0.7 %</td><td>4,139.5</td><td>16.56</td><td>0.17×</td></tr></table>
256
+
257
+ BHRF networks while using substantially fewer parameters compared to the ALIF networks. Note that RF model shown in Table 1 did not include a reset. Adding either a hard or soft reset to the vanilla RF neuron dramatically affects its task performance as shown in Figure 11 in Section A.9.
258
+
259
+ We also compare the theoretical energy efficiency of the RF and ALIF models by computing their respective total spiking operations (SOPs) (see Equation 41) and SOPs per sequence step. As both measures were considerably smaller for the BRF and BHRF models, this implies they require less computation to achieve better or comparable performance. This may be due to the resonating spiking behavior of the neuron, needing fewer spikes to represent its frequency, as well as the refractory period and smooth reset that hinders continuous spiking. A particularly large difference was seen in the SHD task, where the BRF model spiked only $14\%$ of the ALIF model.
260
+
261
+ Compared to the standard RF model without reset, our balanced variants achieved significantly sparser activity while obtaining higher performance. Especially for the PS-MNIST, the standard RF model stayed at chance, while our balanced RF variations outperformed RSNN-SoTA. This is due to the damping factor and angular frequency combination leading to a highly diverging behavior. It especially affects the PS-MNIST dataset, as it requires a wider range of resonant frequencies to counter the increased randomness in the signal. For example, neurons with $\omega = 70$ rad/s and $b_{c} = -1$ leads to higher magnitude towards the end of the
262
+
263
+ sequence. Having many of such neurons causes the whole system to diverge and become unstable. On a different note, the performance of the BRF model depends on the initialization of the parameters and it generally under-performs when the angular frequencies are too far from the frequencies underlying the dataset.
264
+
265
+ Overall, we find that RSNNs comprised of either BRF and BHRF neurons exceeded performance for all classification tasks compared to the baseline ALIF-RSNN. Compared to standard RF neurons, the smooth reset, refractory period, and divergence boundary significantly improved the stability and efficiency of the RF parameters, possibly exploiting the model's resonant properties. We study this in detail below.
266
+
267
+ Convergence. The RF, BRF, and ALIF model learning curves are presented in Figure 5. We reduced the ALIF model to the same size and number of trainable parameters as the BRF model. For the S-MNIST and PS-MNIST tasks, the ALIF networks only learn effectively when the truncated BPTT (TBPTT) with truncation step 50 is applied. Nonetheless, the fully back-propagated BRF networks converge significantly faster than the TBPTT ALIF networks, also evident from the quantitative convergence results (Table 2).
268
+
269
+ A similar pattern of fast and stable convergence is observed for the ECG dataset and SHD. The convergence between RF and BRF for SHD and ECG are similar because the vanilla RF neurons resonate with lower frequencies, affected less
270
+
271
+ ![](images/5f98e5eec8023742a2251f7c2a3dc124ff119cfa2b66d57f3ad6c36e48bcf19a.jpg)
272
+
273
+ ![](images/bff06f12ad62cb44a6bde55385f001bc99ba8e4ac2d627c5bef4792d3a187cc6.jpg)
274
+
275
+ ![](images/0bebae288405beb5a057ab0c2b312ff80ef1451547dbaec0bce6f1cc1ef79db9.jpg)
276
+
277
+ ![](images/b450aa23dd65b19450610d26ef3d082b277c533653c459151636066a1f3c038c.jpg)
278
+
279
+ ![](images/1029547a6936ccef72ba4ac976c0d8921dd64021b3013c5e0484b3ae353d608b.jpg)
280
+ Figure 5. Top row: S-MNIST, PS-MNIST, ECG, and SHD learning curve between BRF, RF and ALIF model. Each curve averaged per epoch (solid line) with standard deviation (shaded area) over five runs. The dot on the accuracy curves depict the point at which $95\%$ of the final accuracy was reached. Bottom row: S-MNIST, PS-MNIST, ECG, and SHD initial and optimized BRF parameter combinations: angular frequency $\omega$ and b-offset $b'$ for all runs. Dashed line is the divergence boundary. RF models are simulated without reset. For convergence with traditional reset see Section A.9.
281
+
282
+ ![](images/90302611017614ca372a120220cbc78a27dbd4ffee3a613be3e89e28e9013fcb.jpg)
283
+
284
+ ![](images/460f707bf819e92093397cdec154dbb64c9082193b3b57db120466716813f3da.jpg)
285
+
286
+ ![](images/345dda7e46da8afa69477d1760d2f77cdc30309c690aa850fbdcc94ff44c397c.jpg)
287
+
288
+ Table 2. Quantitative convergence results. The average number of epochs after which $95\%$ , $98\%$ , and $100\%$ of the final test accuracy on the learning curve was reached, respectively.
289
+
290
+ <table><tr><td>Task</td><td>Model</td><td>95 % (↓)</td><td>98 % (↓)</td><td>100 % (↓)</td></tr><tr><td rowspan="4">S-MNIST</td><td>ALIF</td><td>105</td><td>162</td><td>276</td></tr><tr><td>RF</td><td>134</td><td>172</td><td>263</td></tr><tr><td>BRF</td><td>3</td><td>29</td><td>246</td></tr><tr><td>BHRF</td><td>5</td><td>12</td><td>119</td></tr><tr><td rowspan="3">PS-MNIST</td><td>ALIF</td><td>143</td><td>200</td><td>265</td></tr><tr><td>BRF</td><td>10</td><td>39</td><td>282</td></tr><tr><td>BHRF</td><td>6</td><td>19</td><td>123</td></tr><tr><td rowspan="4">ECG</td><td>ALIF</td><td>51</td><td>157</td><td>282</td></tr><tr><td>RF</td><td>8</td><td>29</td><td>112</td></tr><tr><td>BRF</td><td>6</td><td>32</td><td>75</td></tr><tr><td>BHRF</td><td>15</td><td>38</td><td>109</td></tr><tr><td rowspan="4">SHD</td><td>ALIF</td><td>14</td><td>15</td><td>16</td></tr><tr><td>RF</td><td>2</td><td>4</td><td>5</td></tr><tr><td>BRF</td><td>2</td><td>3</td><td>7</td></tr><tr><td>BHRF</td><td>3</td><td>5</td><td>8</td></tr></table>
291
+
292
+ by diverging behavior. Note that the RF model shown in Figure 5 did not include a reset. Adding either soft or hard reset leads to slower and more unstable learning, as shown in Figure 11 in Section A.9. Figure 5 highlights the variation in training of RF networks depending on the dataset, which is alleviated by the BRF network.
293
+
294
+ While numerically large, the learning rates of the (B)RF-RSNNs led to stable and fast convergence for most datasets. This is in contrast to standard SNNs where large learning rates lead to poor performance. Here, the double-Gaussian surrogate gradient function (Yin et al., 2021) we used may have contributed by ensuring gradient flow even for neurons far from firing. Combined with the high learning rate, this may have enabled non-spiking neurons to effectively shift their angular frequencies.
295
+
296
+ The ECG task was learned most effectively for the BRF and BHRF networks with a small batch size and high learning rate. A smaller batch size can better capture detailed variations within the dataset, notably the timing of the input spikes, which may have been important for per-step wave classification.
297
+
298
+ Ongoing investigations (Higuchi et al., 2024) suggest that the shape of the error landscape may be a major contributor to the fast and stable convergence of the BRF model (see Figure 13 in Section A.11).
299
+
300
+ Parameter analysis. We also compared the trainable BRF parameters $\omega$ and $b^{\prime}$ between the initial and trained networks to obtain an intuition of the functioning of the neuron, as shown in Figure 5. We see that optimization substantially shifted the parameters, demonstrating that the gradients in the B(H)RF networks were effectively propagated.
301
+
302
+ ![](images/a679842a0c5578070cc9f5466b0b08c7cdb3ede4a1ed94e17a98033e97528db6.jpg)
303
+ Figure 6. Raster plot of network activity for an SHD sample with label 10 after training. The BRF neurons are sorted by their angular frequency. Black dots denote output spikes.
304
+
305
+ For the S-MNIST task, plotting $\omega - b_{c}$ (Figure 5) shows clusters around $\omega$ values of 18 to 28 rad/s and around $\omega$ of 40 rad/s with a wide range of $b_{c}$ . The dampening factor close to zero indicates near-sustained oscillation behavior, preserving resonance amplitude for an extended duration. The clustered variety in $b_{c}$ values suggests that short- and long-term memory are essential for effective learning of the S-MNIST task in B(H)RF networks. Additionally, the distribution of $\omega$ for S-MNIST task showed a bimodal distribution with the highest peak at 23.3 to 25.3 rad/s and the second peak at 40.8 to 42.8 rad/s.
306
+
307
+ The MNIST digits all contain some form of diagonal line with a width of 3 to 6 pixels, most prominently observed in digit 1. When converted into a sequence row-by-row, the lines are distributed among the sequence with a periodic signal of about 25 pixels. Considering the pixels as discrete time steps of $\delta = 0.01$ , the theoretical period T frequently observed in the signal is $T = 0.25s$ . Thus, the most frequent theoretical angular frequency $\omega^{\prime}$ underlying the signal is around $\omega^{\prime} = 2\pi /0.25s = 25.13rad / s$ which is close to the most frequently learned angular frequencies of the BRF neuron. This simple calculation thus suggests that the BRF neurons were able to learn meaningful frequencies that underlie the S-MNIST dataset. For the PS-MNIST, we see more spread of $\omega$ and $b_{c}$ parameters, as the specific characteristic frequency structure from S-MNIST is essentially obscured by the permutation.
308
+
309
+ Inspecting spike train ECG samples (Figure 4), we observe distinguishable periodic spikes with 300 time step intervals, corresponding to a theoretical angular frequency of $\omega' = 2.09 rad / s$ , and indeed a cluster at about $2 rad / s$ is present in the $\omega - b_{c}$ plot. The theoretical and optimized angular frequencies align, demonstrating learning of the dynamical signal by the network.
310
+
311
+ Weight Sparsity. We explored the effect of pruning recurrent weights in an ablation study for the S-MNIST and
312
+
313
+ ![](images/4059443591dfa2f891cf8489f31667965a005312cdcf723ebcd691f2ee34340e.jpg)
314
+ Figure 7. Test accuracy over pruning probability for (a) S-MNIST and (b) PS-MNIST. 1.0 pruning indicate no recurrent weights.
315
+
316
+ ![](images/a7cbafa1e72ae763014fc4ea9240913199914030210fb8c21ed3307e54695faf.jpg)
317
+
318
+ PS-MNIST tasks between comparable BRF and ALIF networks, as detailed in Table 3 and results are shown in Figure 7. While the BRF neuron provides consistent performance throughout pruning, the ALIF model performs poorly when lacking recurrent weights. This demonstrates that explicit recurrences are not necessary for the BRF networks with resonating properties to learn reasonably well, while these connections are crucial for the ALIF networks. Moreover, the BRF networks' accuracy has a smaller standard deviation throughout compared to the ALIF networks, also showing that the BRF network performance is not affected by the specific pruned weights as much as the ALIF networks.
319
+
320
+ # 7. Discussion
321
+
322
+ The results from our BRF-RSNN implementation lead to considerable insight into the workings of the RF neurons. Importantly, the learning curve and parameter analyses of the datasets show that the BRF networks learn meaningful parameters by favorably tuning the resonating behavior, modeling the complex dynamics not yet observed in largescale simulations. We observe favorable oscillatory behavior of the membrane potential and increasing frequency of periodic spikes with higher angular frequency in the raster plot for all datasets. For SHD, output spikes are present towards the end of the sequence, even with the zero padding of the input signal. As most signals are still periodic, it suggests controlled oscillation and spiking that maintains relevant frequencies until the end of the sequence.
323
+
324
+ Note that we conducted the experiments without biases for all RF models to investigate how many spikes are needed to keep the network dynamics alive and to solve the tasks. As a result, a few of the BRF neurons in the network learned to fire consistently throughout the sequence as seen in Figure 6 and thus effectively "imitated" a bias injecting constant current into the network. In contrast, ALIF networks need explicit biases to perform well. The BRF networks are thus
325
+
326
+ more flexible in modeling behavior that cannot be learned by the integrator neurons alone.
327
+
328
+ The neurons learn their own favored frequencies and, consequently, focus on individual time scales. This can be loosely seen as a homeostatic regulatory process maximizing local information gain in the realms of distributed, collective task solving within the recurrent networks.
329
+
330
+ Further exploration of the post-trained models against various noise types and numerical quantization (Stromatias et al., 2015; Park et al., 2021), shows consistently high robustness of the BRF networks compared to the ALIF networks, detailed in Section A.10, Figure 12. The BRF networks are slightly more robust than the RF networks for some noise variants, despite the constant low SOP of the BRF networks. Hardware implementations are prone to such noises (Stromatias et al., 2015), which suggests the BRF neurons to be suitable for hardware applications. We further aim to realize inference with these neurons on Loihi 2, which provides support for RF neuron variations (Davies et al., 2018; Shrestha et al., 2023).
331
+
332
+ Concerning the network dimension, we found that adding additional resonator neurons into the single hidden layer beyond a certain capacity did not significantly improve the performance further.
333
+
334
+ One drawback of our BRF- and BHRF-RSNNs is the difficulty in finding an optimal initial parameterization of the angular frequencies and the dampening factor offset, since both determine the models' performance. The analyses of the parameters suggest the possibility of applying the Fourier transform on the datasets a-priori to approximate the range of angular frequencies the BRF neurons require to optimally learn the data.
335
+
336
+ It should be noted that the computational complexity of BRF-RSNNs is similar to single-layered ALIF models. However, due to the faster convergence the training can be stopped much earlier, which effectively results in a drastically reduced training time. Implementation-wise, another speed-up can be achieved by using forward gradient injection (Otte, 2024) for modeling the surrogate gradient functions in combination with automatic model optimization routines such as TorchScript in PyTorch (some results are presented in Section A.13).
337
+
338
+ # 8. Conclusion
339
+
340
+ We introduced BRF- and BHRF-RSNNs as a principled resonating spiking neuron model that solves the training difficulties encountered for networks comprised of standard RF neurons while demonstrating the effectiveness of internal resonating state as a form of long-term memory. Our BRF- and BHRF-RSNNs with smaller network architectures and
341
+
342
+ sparser spiking outperformed deep baseline models. The learning curves showed that the BRF networks converged much faster than the ALIF networks. Furthermore, the stable convergence hints at good reproducibility of the BRF model's performance. The BRF parameter analyses indicate the network to learn frequencies underlying the input signals and showed resilience against sparser recurrent connectivity compared to the ALIF network.
343
+
344
+ Possible future research may be to scale up the simulations to much larger and more complex problems, such as the CIFAR (Krizhevsky & Hinton, 2009) or the Google Speech Command dataset (Warden, 2018). It is of particular interest to apply the BRF model to raw audio processing tasks, because of its ability to extract periodic pattern within the time domain.
345
+
346
+ Another line of research could be to combine BRF neurons with online learning approaches, such as e-prop (Bellec et al., 2020), which would broaden its range of applications due to memory efficiency and faster processing of longer sequences. Additionally, trainable refractory period decays for flexible adaptive thresholding could be introduced, as well as trainable simulated variable time constants to foster multi-temporal resolution processing.
347
+
348
+ This study marks an initial exploration to investigate the working of stable resonating neurons in the context of recurrent spiking neural network. Our models show comparable results and/or exceeds the state-of-the-art for RSNNs. We see many possible approaches to extending our work, as we kept the implementation to its simplest form. The presented work thus provides a foundation for further research of possible BRF-RSNN variants.
349
+
350
+ # Acknowledgements
351
+
352
+ A part of the experiments were conducted using the ML Cloud infrastructure of the Machine Learning Cluster of Excellence (EXC number 2064/1 - Project number 390727645) at the University of Tübingen.
353
+
354
+ Sebastian Otte was supported by a Feodor Lynen fellowship of the Alexander von Humboldt Foundation.
355
+
356
+ # Impact Statement
357
+
358
+ The aim of this work is to advance the field of machine learning, with a specific focus on spiking neural networks (SNNs) to augment the effectiveness and energy efficiency of AI systems, making them more sustainable. It is worth noting that, like most developments in machine learning research, our work may have various societal consequences but none of which we think needs special consideration here.
359
+
360
+ # References
361
+
362
+ Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016.
363
+ Abiodun, O. I., Jantan, A., Omolara, A. E., Dada, K. V., Umar, A. M., Linus, O. U., Arshad, H., Kazaure, A. A., Gana, U., and Kiru, M. U. Comprehensive review of artificial neural network applications to pattern recognition. IEEE access, 7:158820-158846, 2019.
364
+ AlKhamissi, B., ElNokrashy, M., and Bernal-Casas, D. Deep spiking neural networks with resonate-and-fire neurons. arXiv preprint arXiv:2109.08234, 2021.
365
+ Alonso, A. and Llinás, R. R. Subthreshold na+-dependent theta-like rhythmicity in stellate cells of entorhinal cortex layer ii. Nature, 342(6246):175-177, 1989.
366
+ Atkinson, K. E. An introduction to numerical analysis, john wiley and sons. New York, 19781, 1989.
367
+ Bellec, G., Salaj, D., Subramoney, A., Legenstein, R., and Maass, W. Long short-term memory and learning-to-learn in networks of spiking neurons. Advances in neural information processing systems, 31, 2018.
368
+ Bellec, G., Scherr, F., Subramoney, A., Hajek, E., Salaj, D., Legenstein, R., and Maass, W. A solution to the learning dilemma for recurrent networks of spiking neurons. Nature communications, 11(1):3625, 2020.
369
+ Bittar, A. and Garner, P. N. A surrogate gradient spiking baseline for speech command recognition. Frontiers in Neuroscience, 16:865897, 2022.
370
+ Cramer, B., Stradmann, Y., Schemmel, J., and Zenke, F. The heidelberg spiking data sets for the systematic evaluation of spiking neural networks. IEEE Transactions on Neural Networks and Learning Systems, 33(7):2744-2757, 2020.
371
+ Davies, M., Srinivasa, N., Lin, T.-H., Chinya, G., Cao, Y., Choday, S. H., Dimou, G., Joshi, P., Imam, N., Jain, S., et al. Loihi: A neuromorphic manycore processor with on-chip learning. *Ieee Micro*, 38(1):82-99, 2018.
372
+ Deng, L. The mnist database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141-142, 2012.
373
+ Doeller, C. F., Barry, C., and Burgess, N. Evidence for grid cells in a human memory network. Nature, 463(7281): 657-661, 2010.
374
+
375
+ Fang, W., Yu, Z., Chen, Y., Masquelier, T., Huang, T., and Tian, Y. Incorporating learnable membrane time constant to enhance learning of spiking neural networks. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 2641-2651, 2021. doi: 10.1109/ICCV48922.2021.00266.
376
+ Frady, E. P., Sanborn, S., Shrestha, S. B., Rubin, D. B. D., Orchard, G., Sommer, F. T., and Davies, M. Efficient neuromorphic signal processing with resonator neurons. Journal of Signal Processing Systems, 94(10):917-927, 2022.
377
+ Goodfellow, I., Bengio, Y., and Courville, A. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org.
378
+ Hammouamri, I., Khalfaoui-Hassani, I., and Masquelier, T. Learning delays in spiking neural networks using dilated convolutions with learnable spacings. arXiv preprint arXiv:2306.17670, 2023.
379
+ Higuchi, S., Bohte, S. M., and Otte, S. Understanding the convergence in balanced resonate-and-fire neurons, 2024. arXiv preprint arXiv:2406.00389.
380
+ Hille, J., Auge, D., Grassmann, C., and Knoll, A. Resonate-and-fire neurons for radar interference detection. In Proceedings of the International Conference on Neuromorphic Systems 2022, pp. 1-4, 2022.
381
+ Hinton, G., Srivastava, N., and Swersky, K. Neural networks for machine learning lecture 6a overview of mini-batch gradient descent. Cited on, 14(8):2, 2012.
382
+ Hodgkin, A. L. and Huxley, A. F. A quantitative description of membrane current and its application to conduction and excitation in nerve. The Journal of physiology, 117 (4):500, 1952.
383
+ Izhikevich, E. M. Resonate-and-fire neurons. Neural networks, 14(6-7):883-894, 2001.
384
+ Izhikevich, E. M. Simple model of spiking neurons. IEEE Transactions on neural networks, 14(6):1569-1572, 2003.
385
+ Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
386
+ Krizhevsky, A. and Hinton, G. Learning multiple layers of features from tiny images, 2009.
387
+ Laguna, P., Mark, R., Goldberger, A., and Moody, G. A database for evaluation of algorithms for measurement of qt and other waveform intervals in the ecg. Computers in Cardiology, 24(1):673-676, 1997.
388
+
389
+ Lehmann, H. M., Hille, J., Grassmann, C., and Issakov, V. Direct signal encoding with analog resonate-and-fire neurons. IEEE Access, 2023.
390
+ Li, H., Xu, Z., Taylor, G., Studer, C., and Goldstein, T. Visualizing the loss landscape of neural nets. Advances in neural information processing systems, 31, 2018.
391
+ Liu, L., Jiang, H., He, P., Chen, W., Liu, X., Gao, J., and Han, J. On the variance of the adaptive learning rate and beyond. In Proceedings of the Eighth International Conference on Learning Representations (ICLR 2020), April 2020.
392
+ Llinas, R. R., Grace, A. A., and Yarom, Y. In vitro neurons in mammalian cortical layer 4 exhibit intrinsic oscillatory activity in the 10-to 50-hz frequency range. Proceedings of the National Academy of Sciences, 88(3):897-901, 1991.
393
+ Lu, L., Shin, Y., Su, Y., and Karniadakis, G. E. Dying relu and initialization: Theory and numerical examples. arXiv preprint arXiv:1903.06733, 2019.
394
+ Neftci, E. O., Mostafa, H., and Zenke, F. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient-based optimization to spiking neural networks. IEEE Signal Processing Magazine, 36(6):51-63, 2019.
395
+ Otte, S. Flexible and efficient surrogate gradient modeling with forward gradient injection, 2024. arXiv preprint arXiv:2406.00177.
396
+ Park, S., Lee, D., and Yoon, S. Noise-robust deep spiking neural networks with temporal information. In 2021 58th ACM/IEEE Design Automation Conference (DAC), pp. 373-378. IEEE, 2021.
397
+ Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., DeVito, Z., Lin, Z., Desmaison, A., Antiga, L., and Lerer, A. Automatic differentiation in pytorch. In NIPS-W, 2017.
398
+ Paugam-Moisy, H. and Bohté, S. M. Computing with spiking neuron networks. Handbook of natural computing, 1: 1-47, 2012.
399
+ Pedroarena, C. and Llinás, R. Dendritic calcium conductances generate high-frequency oscillation in thalamocortical neurons. Proceedings of the National Academy of Sciences, 94(2):724-728, 1997.
400
+ Pfeiffer, M. and Pfeil, T. Deep learning with spiking neurons: Opportunities and challenges. Frontiers in neuroscience, 12:774, 2018.
401
+ Shaaban, A., Chaabouni, Z., Strobel, M., Furtner, W., Weigel, R., and Lurz, F. Resonate-and-fire spiking neurons for hand gesture label refinement. In 2024 IEEE
402
+
403
+ Topical Conference on Wireless Sensors and Sensor Networks (WiSNeT), pp. 53-56. IEEE, 2024.
404
+ Shrestha, S. B., Timcheck, J., Frady, P., Campos-Macias, L., and Davies, M. Efficient video and audio processing with loihi 2. arXiv preprint arXiv:2310.03251, 2023.
405
+ Stromatias, E., Neil, D., Pfeiffer, M., Galluppi, F., Furber, S. B., and Liu, S.-C. Robustness of spiking deep belief networks to noise and reduced bit precision of neuro-inspired hardware platforms. Frontiers in neuroscience, 9:141542, 2015.
406
+ Warden, P. Speech commands: A dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209, 2018.
407
+ Wu, Y.-c. and Feng, J.-w. Development and application of artificial neural network. Wireless Personal Communications, 102:1645-1656, 2018.
408
+ Yin, B., Corradi, F., and Bohté, S. M. Accurate and efficient time-domain classification with adaptive spiking recurrent neural networks. Nature Machine Intelligence, 3(10): 905-913, 2021.
409
+ Zhang, S., Yang, Q., Ma, C., Wu, J., Li, H., and Tan, K. C. Long short-term memory with two-compartment spiking neuron. arXiv preprint arXiv:2307.07231, 2023.
410
+
411
+ # A. Appendix
412
+
413
+ # A.1. Traditional soft and hard reset
414
+
415
+ The traditional soft and hard reset mechanisms were formulated respectively:
416
+
417
+ $$
418
+ u (t) = u ^ {\prime} (t) - (1 + i) z (t) \vartheta \tag {23}
419
+ $$
420
+
421
+ $$
422
+ u (t) = [ 1 - (1 + i) z (t) ] u ^ {\prime} (t) \tag {24}
423
+ $$
424
+
425
+ for which $u^{\prime}(t)$ represents the membrane potential before reset.
426
+
427
+ # A.2. Baseline ALIF neuron
428
+
429
+ The formulation of the baseline ALIF neuron (Yin et al., 2021) is as follows with $\vartheta = 0.01$ and $\beta = 1.8$ :
430
+
431
+ $$
432
+ \vartheta^ {t} = \vartheta + \beta a (t) \tag {25}
433
+ $$
434
+
435
+ $$
436
+ a (t) = \rho a (t - \delta) + (1 - \rho) z (t - \delta) \tag {26}
437
+ $$
438
+
439
+ $$
440
+ u ^ {\prime} (t) = \alpha u (t - \delta) + (1 - \alpha) I (t) \tag {27}
441
+ $$
442
+
443
+ $$
444
+ z (t) = \Theta \left(u ^ {\prime} (t) - \vartheta^ {t}\right) \tag {28}
445
+ $$
446
+
447
+ $$
448
+ u (t) = u ^ {\prime} (t) - z (t) \vartheta^ {t} \tag {29}
449
+ $$
450
+
451
+ where $\rho = e^{-\frac{\delta}{\tau_a}} \in (0,1)$ is the adaptive threshold decay constant, $\tau_{a}$ the time constant and $\alpha = e^{-\frac{\delta}{\tau_m}} \in (0,1)$ the membrane potential decay constant. $a(t)$ is the accumulative activity of the spiking behavior of the neuron. The membrane potential $u(t)$ is soft reset with the adaptive threshold $\vartheta^t$ when the neuron fires $(z(t) = 1)$ .
452
+
453
+ # A.3. Explicit form of the Izhikevich RF neuron
454
+
455
+ We can reform the membrane equation to $u(t) = (1 + \delta (b + i\omega))u(t - \delta) + \delta I(t)$ . Consider discrete time step $\delta$ with $t = 0, \delta, 2\delta, 3\delta, ,T\delta$ . Assume a spike injected only at $t = \delta$ with $I(\delta) = 1$ and initial membrane potential $u(0) = 0$ , then:
456
+
457
+ $$
458
+ u (\delta) = \delta \tag {30}
459
+ $$
460
+
461
+ $$
462
+ u (2 \delta) = \delta (1 + \delta (b + i \omega)) \tag {31}
463
+ $$
464
+
465
+ $$
466
+ u (3 \delta) = (1 + \delta (b + i \omega)) (\delta (1 + \delta (b + i \omega))) \tag {32}
467
+ $$
468
+
469
+ $$
470
+ = \delta (1 + \delta (b + i \omega)) ^ {2} \tag {33}
471
+ $$
472
+
473
+ $$
474
+ u (4 \delta) = (1 + \delta (b + i \omega)) (\delta (1 + \delta (b + i \omega)) ^ {2}) \tag {34}
475
+ $$
476
+
477
+ $$
478
+ = \delta (1 + \delta (b + i \omega)) ^ {3} \tag {35}
479
+ $$
480
+
481
+ $$
482
+ \dots \tag {36}
483
+ $$
484
+
485
+ $$
486
+ u (t) = \delta (1 + \delta (b + i \omega)) ^ {\frac {t}{\delta} - 1} \tag {37}
487
+ $$
488
+
489
+ # A.4. Frequency response plot generation
490
+
491
+ The subthreshold responses were explored with randomly chosen angular frequency $\omega \in [0,100)$ and $b^{\prime}\in (0,10)$ for the RF neurons. Spiking input signals with frequencies relative to the angular frequencies of $\{0.1,0.2\dots ,100\}$ were input to the neurons over 20 seconds with a discrete-time scale of $\delta = 0.001$ . The positive spikes were input in-phase of the period corresponding to the angular frequency:
492
+
493
+ $$
494
+ T = \frac {2 \pi}{\text {a n g u l a r f r e q u e n c y}} \tag {38}
495
+ $$
496
+
497
+ The mean absolute magnitude of the membrane potential over the whole sequence was calculated and plotted to get the response of the neuron per tested frequency signal. Similarly conducted for the HRF neurons.
498
+
499
+ ![](images/d7227d7c78ee53a069fabcb8cf6324c288c20bab99b4bf3fa6eb5c573c702f41.jpg)
500
+ Figure 8. HRF neuron frequency response plots for exemplary omega $\omega$ and b-offset $b^{\prime}$ combinations with $\delta = 0.001$ .
501
+
502
+ # A.5. Divergence Boundary
503
+
504
+ The discrete-time scale $\delta$ has a large impact on the divergence behavior. Figure below shows the curve of divergence boundary for time scales above and below the default $\delta = 0.01$ . The membrane potential converges if the combination of $\omega$ and $b_{c}$ is below the line. When considering the $\omega$ range of 0 to $100\mathrm{rad / s}$ , the slope of the sustained oscillation curve becomes flatter with smaller $\delta$ . The more precise the oscillation is modeled, the less likely the system will diverge. Indeed, the discrete approximation of the continuous differential equation becomes more precise by computing smaller time scales.
505
+
506
+ ![](images/9a5e22a45d3e9342e4e66116a1420162e860172ddbd01d23f64d9ff5f2a447ca.jpg)
507
+ Figure 9. Divergence boundary depending on $\delta \in \{0.002,\dots ,0.02\}$
508
+
509
+ # A.6. Experimental Setup
510
+
511
+ The fully recurrent RF-RSNN with $m$ input, $h$ hidden BRF or BHRF, and $C$ leaky integrator (LI) output neurons was computed using PyTorch (Paszke et al., 2017). The backpropagation through time (BPTT) algorithm with minibatch size $B$ was used with the Adam (Kingma & Ba, 2014), RAdam (Liu et al., 2020), or the RMSprop (Hinton et al., 2012) depending on the network and task. The input from the current sequence step $\mathbf{x}^t \in \mathbb{M}_{B \times m}$ and the output spiking of the recurrent hidden neurons from the previous time step $\mathbf{z}^{t-1} \in \mathbb{M}_{B \times h}$ were combined by implementing a fully connected linear layer. This combined signal $\mathbf{x}^t \in \mathbb{M}^{B \times h}$ corresponded to the familiar injected current $I(t)$ but was written in matrix form to represent all hidden neurons in the minibatch. Although not explicit in the Algorithms, $\mathbf{w}_{\mathrm{in,rec}} \in \mathbb{M}_{h \times (m + h)}$ and $\mathbf{w}_{\mathrm{out}} \in \mathbb{M}_{C \times h}$ represent the strength of the connections between the input-to-hidden, hidden-to-hidden, and hidden-to-output neurons,
512
+
513
+ which were optimized. No biases were trained or used in the network. The B(H)RF neurons with $\omega$ and $\mathbf{b}^{\prime}\in \mathbb{R}^{h}$ were updated over the time sequence of $B$ data samples with $\mathbf{u}^t,(\mathbf{v}^t),\mathbf{b}^t,\mathbf{q}^t,\pmb {\vartheta}^t\in \mathbb{M}_{B\times h}$ . The LI membrane potential time decay constant $\tau_{m,out}\in \mathbb{R}_{>0}^{C}$ was also learned. The negative log-likelihood (NLL) or the cross-entropy (CE) loss was implemented as our criterion depending on the simulations.
514
+
515
+ For the ALIF implementation, the adaptive threshold time decay constant $\tau_{a} \in \mathbb{R}_{>0}^{h}$ is additionally learned with the membrane potential time decay constant $\tau_{m} \in \mathbb{R}_{>0}^{h}$ .
516
+
517
+ In the case of average sequence loss with NLL, the logarithmic softmax function was computed for all output neurons per time step $\hat{\mathbf{y}}^t = \log (\mathrm{softmax}(\mathbf{u}_{out}^t))$ , which was further propagated into the loss function: $\mathcal{L}^t = \mathrm{criterion}(\hat{\mathbf{y}}^t,\mathbf{y}^t) = \frac{1}{B}\sum_{c = 1}^{C} - y_c^t\hat{y}_c^t$ where $\mathbf{y}^t\in \mathbb{M}_{B\times C}$ is the target label at time step $t$ represented as one-hot vectors. The mean loss was computed as $\mathcal{L} = \frac{1}{T}\sum_{t = 1}^{T}\mathcal{L}^t$ with sequence length T. In the case of label-last loss, only the loss from the last time step was propagated backwards.
518
+
519
+ The backward pass of the BPTT algorithm was internally computed with the automatic differentiation engine in PyTorch (Paszke et al., 2017). For the non-differentiable Heaviside function in the B(H)RF and ALIF neurons, the multi-Gaussian function (Yin et al., 2021) was manually implemented as the surrogate gradient (Neftci et al., 2019):
520
+
521
+ $$
522
+ \frac {\partial \Theta}{\partial u} = _ {d e f} (1 + h) g (u, \vartheta , \sigma) - 2 h g (u, \vartheta , s \sigma) \tag {39}
523
+ $$
524
+
525
+ with
526
+
527
+ $$
528
+ g (x, \mu , \sigma) = e ^ {- \frac {1}{2} \left(\frac {x - \mu}{\sigma}\right) ^ {2}} \tag {40}
529
+ $$
530
+
531
+ with $h = 0.15$ , $s = 6$ , $\sigma = 0.5$ similar to Yin et al. (2021). The negative gradient values were motivated by the leaky rectified and exponential linear unit that prevented the "dying-ReLU" problem (Lu et al., 2019). With these values, the multi-Gaussian surrogate gradient function promoted the neurons to spike despite an initial low membrane potential, which contributed to effective learning.
532
+
533
+ The best model was the model saved with the highest average test loss over the first five runs by early stopping on the validation loss. The loss and accuracy of the train, validation, and test set were logged into Tensorboard (Abadi et al., 2016) for analysis of the learning pattern. After obtaining the best model, the spiking operations (SOPs) were computed based on the five saved models by taking the total number of output spikes over the whole dataset $z_{sum}$ with respect to the number of data samples $N$ :
534
+
535
+ $$
536
+ \mathrm {S O P s} = \frac {z _ {\text {s u m}}}{N} \tag {41}
537
+ $$
538
+
539
+ The results were compared with the baseline ALIF-RSNN.
540
+
541
+ For simulating the models and performing the experiments, we used multiple systems with different deep learning accelerators including NVIDIA GeForce RTX 2060, NVIDIA GeForce RTX 2080 Ti, NVIDIA GeForce RTX 3090, and NVIDIA A100, with PyTorch 2.0.1 on Python 3.10.4 and CUDA 11.7.
542
+
543
+ # A.7. ECG-QT database preprocessing
544
+
545
+ The preprocessed QT data were extracted from Yin et al. (2021) to gain comparable results. The original sequences were segmented into smaller intervals, each containing $1300\mathrm{ms}$ of the recordings. Then, the two ECG signals were normalized and encoded into two separate spike trains via level-cross encoding. The positive gradients above and negative gradients below the threshold led to spikes with the threshold $L = 0.3$ :
546
+
547
+ $$
548
+ s _ {+} = \left\{ \begin{array}{l l} 1 & \text {i f} x _ {t} - x _ {t - 1} \geq L \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {42}
549
+ $$
550
+
551
+ $$
552
+ s _ {-} = \left\{ \begin{array}{l l} 1 & \text {i f} x _ {t} - x _ {t - 1} \leq - L \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {43}
553
+ $$
554
+
555
+ The target labels were segmented correspondingly and predicted for each time step. Figure 4 color: blue, red, green, cyan, olive and purple corresponds to the label: P, PQ, QR, RS, ST. Five hundred fifty-seven segments were used for training, 61 for validation, and 141 for testing.
556
+
557
+ # A.8. Effect of refractory period and smooth reset
558
+
559
+ Refractory period (RP) and smooth reset (SmR) both result in reduced spiking operations, with their effects varying depending on the dataset. The SOP of the BRF neuron consistently yields the lowest SOP. It suggests the flexibility of the BRF neuron to learn various types of data efficiently, compared to the RF neuron. ECG optimized with RP spikes less than with SmR, whereas SHD spikes more with SmR; however even more efficient in both cases is the BRF with the combination of RP and SmR. PS-MNIST diverges with: no reset, RP, SmR, and combination of RP and SmR. Thus, it shows significantly high SOP for these variants. It also highlights the stability brought out by the divergence boundary (DB). S-MNIST trained with RP results in unstable performance and SOP.
560
+
561
+ ![](images/d3bce774e5a10e829ba23683f98fb394c34fc9b97b630af0e247b4a374e53ebc.jpg)
562
+
563
+ ![](images/91ccba7a5fa7100969dc42c4b131e731ac222183a8f8664ac6b8ad0e2bd3458f.jpg)
564
+
565
+ ![](images/42876905bdd58eb25e865e0c11336abc2cdd6a1fa4eb9b8841fdadd0d3a9fb71.jpg)
566
+ Figure 10. SOP result in RF networks with divergence boundary (DB), refractory period (RP), and smooth reset (SmR). Mean SOP over 5 runs plotted with standard deviation. DB, RP & SmR denote the complete BRF neuron.
567
+
568
+ ![](images/bb18c5cc0b9500a009e2d09da09448ce534db3baf80a9457040860e753aa2951.jpg)
569
+
570
+ # A.9. Reset variation and performance
571
+
572
+ To explore the impact of the standard reset mechanisms (mentioned in Section A.1) on the resonator network, RF models with smooth, soft, and hard reset are optimized for ECG and SHD, as shown in Figure 11. Note that the traditional reset mechanisms applied to S-MNIST and PS-MNIST failed to converge. The figures show performance drop and slower convergence with the soft and hard reset, presumably due to the altered phase of the oscillation and the difficulty in continuous resonant spiking, as spikes may occur with twice the period of the original signal. Further facilitated by the result without reset, in which the convergences are on-par with the BRF neurons where the phase itself is preserved. As mentioned in the main text, the system did not diverge for the RF without reset for ECG and SHD in particular, due to the small angular frequencies leading to smaller error accumulation over time.
573
+
574
+ # A.10. Noise robustness
575
+
576
+ Noise robustness of post-trained models are further investigated with the methods applied by Stromatias et al. (2015) and Park et al. (2021). Hardware implementations of SNNs pose limitations to the performance due to restricted precision or noise in the signal. Here, four different type of restrictions and noise are explored. Quantization reduces the bit precision
577
+
578
+ ![](images/0101d48b25386e2d819840173db5f036832f0979e2923dbf1d207c23fa1991c4.jpg)
579
+ Figure 11. Convergence comparison of ECG and SHD over RF reset mechanisms.
580
+
581
+ ![](images/4cb3405cc15812106292a3e972de975860a25deb75b8248eb2fded12ea3d17e2.jpg)
582
+
583
+ ![](images/721ba026780318c5c1d6709f4b83f0b2523fbcce24b2cece56d849904fe1115f.jpg)
584
+
585
+ ![](images/4e046209b9608dc4d8538d332b321f2432328c01ef7affcf86dc947afda04b98.jpg)
586
+
587
+ ![](images/cc35f1258e51d1dbdff8afe63d3074296cd300262dd68b2f59f1a6b1025d6924.jpg)
588
+
589
+ ![](images/c84bb732021acd346f3228dc0487f6e2088a1ccb79b79c0e14d048c0397e857e.jpg)
590
+ Figure 12. S-MNIST noise robustness studies conducted on saved best performing models. Solid line denote performance and dotted line the spiking operations (SOP) for each network.
591
+
592
+ ![](images/e65c315fa4fb22360dae4fe4a76b6bf7a66762dd23344b6b1ce73b5437a9182c.jpg)
593
+
594
+ ![](images/69f775dc2ebc0fd0a6a310ba545b56f49cbfc7d4429cc434f49bd53e18be6c57.jpg)
595
+
596
+ representation (Figure 12 top left). Noise in the input signal from the dataset are simulated with Gaussian noise with increasing standard deviation (Figure 12 top right). For spike deletion (Park et al., 2021) level, a percentage of the spikes are removed from the network at each sequence step (Figure 12 bottom left). Synaptic noise added Gaussian noise to the weights.
597
+
598
+ Overall the vanilla RF network without reset and the BRF network performed better when faced with various noise than the ALIF network. Especially for the noise introduced in the input, the RF and BRF network maintained their performance, while the ALIF network failed already with a small standard deviation in noise. For the BRF network, this is achieved despite the high spiking sparsity of the BRF network compared to the RF or ALIF network. The RF network is more robust against spike deletion than the BRF or ALIF network. This may be an effect of redundant spiking for the RF networks, which highlights a trade-off of spike deletion robustness and high spiking sparsity.
599
+
600
+ # A.11. Error landscape
601
+
602
+ BRF-RSNN landscape has smooth and convex-like structure, whereas landscape of RF- and especially, ALIF-RSNN, has a rough surface with a narrow valley. Such smooth landscape represent high generalization and straightforward optimization, accounting for the fast convergence.
603
+
604
+ We further found that the spectral radius of the membrane state transition mapping computed over one discrete time step results in unity or below by implementing the divergence boundary, thus effectively stabilizing the gradient and preserving its magnitude (Higuchi et al., 2024). This indicates that the divergence boundary contributes to fast and smooth learning.
605
+
606
+ ![](images/6945542ee216337798ba72c04c6be9109a58a116aac548fe9bfdb4767b39065f.jpg)
607
+
608
+ ![](images/b298033247ba85b4d0eb99418da5158b5859acb6154f3642f7412ee426059eaa.jpg)
609
+
610
+ ![](images/8fd3d1e5b3e626f99cf2905f3e8d05315dac1d773771fa24c3e98be4ac90e0cf.jpg)
611
+
612
+ ![](images/8689125d2d73511ea847b27decff24595e91173e431c55cd25bd8b72a217b36f.jpg)
613
+ Figure 13. Error landscape plots for RF, BRF, and ALIF network on the S-MNIST dataset adopted from Higuchi et al. (2024). Top: error surface plots. x and y axis correspond to $\alpha$ and $\beta$ , i.e. parameter deviations, and the z axis to $f(\alpha, \beta)$ , i.e. error (Li et al., 2018). Bottom: error contour plots. Note that the value range and corresponding coloring differ between the diagrams to enhance visualization.
614
+
615
+ ![](images/6971a5e0f68b95eca9d690f8f63559d7731bb5b6d7556199a32e4bc944080853.jpg)
616
+
617
+ ![](images/a0a3432cc8c0e01a0f4fd26932d77cdb2bf28575533dfdf0f9508cac0fc0a90f.jpg)
618
+
619
+ # A.12. Hyperparameters
620
+
621
+ Table 3. Hyperparameters applied for the best-performing BRF, HBRF, and ALIF model with label-last loss (S-MNIST) and average sequence loss (PS-MNIST, ECG, SHD) and truncation step of 50 for TBPTT (in pruning). Same hyperparameters applied for BRF- and RF-BPTT models, where $b = b'$ for RF-RSNN.
622
+
623
+ <table><tr><td rowspan="2">S-MNIST</td><td colspan="2">BRF-RSNN</td><td>BHRF-RSNN</td><td colspan="2">ALIF-RSNN</td></tr><tr><td>BPTT</td><td>TBPTT</td><td>BPTT</td><td>BPTT</td><td>TBPTT</td></tr><tr><td>Network</td><td colspan="2">1 + 256 (fully recurrent) + 10</td><td>1 + 256 (fully recurrent) + 10</td><td colspan="2">1 + 256 (fully recurrent) + 10</td></tr><tr><td>Learning rate (Lr)</td><td>0.1</td><td>0.006</td><td>0.1</td><td colspan="2">0.001</td></tr><tr><td>Loss function</td><td colspan="2">NLL</td><td>CE</td><td colspan="2">NLL</td></tr><tr><td>Minibatch size</td><td colspan="2">256</td><td>256</td><td colspan="2">256</td></tr><tr><td>Lr scheduling</td><td colspan="2">LinearLR</td><td>LinearLR</td><td colspan="2">LinearLR</td></tr><tr><td>Optimizer</td><td colspan="2">Adam</td><td>RAdam</td><td colspan="2">Adam</td></tr><tr><td>Epochs</td><td colspan="2">300</td><td>400</td><td colspan="2">300</td></tr><tr><td>Parameter</td><td colspan="2">ω: U(15,50), b&#x27;: U(0.1,1),</td><td>ω: U(15,35), b&#x27;: U(0.1,1),</td><td colspan="2">τm: N(20,5), τa: N(200,50),</td></tr><tr><td>initialization</td><td colspan="2">τm,out: N(20,5)</td><td>α: Sigmoid(N(0,0.1))</td><td colspan="2">τm,out: N(20,5)</td></tr></table>
624
+
625
+ <table><tr><td rowspan="2">PS-MNIST</td><td colspan="2">BRF-RSNN</td><td colspan="2">BHRF-RSNN</td><td colspan="2">ALIF-RSNN</td></tr><tr><td>BPTT</td><td>TBPTT</td><td>BPTT</td><td>BPTT</td><td>TBPTT</td><td>TBPTT</td></tr><tr><td>Network</td><td colspan="2">1 + 256 (fully recurrent) + 10</td><td colspan="2">1 + 256 (fully recurrent) + 10</td><td colspan="2">1 + 256 (fully recurrent) + 10</td></tr><tr><td>Learning rate (Lr)</td><td>0.1</td><td>0.006</td><td colspan="2">0.1</td><td colspan="2">0.001</td></tr><tr><td>Loss function</td><td colspan="2">NLL</td><td colspan="2">NLL</td><td colspan="2">NLL</td></tr><tr><td>Minibatch size</td><td colspan="2">256</td><td colspan="2">256</td><td colspan="2">256</td></tr><tr><td>Lr scheduling</td><td colspan="2">LinearLR</td><td colspan="2">LinearLR</td><td colspan="2">LinearLR</td></tr><tr><td>Optimizer</td><td colspan="2">Adam</td><td colspan="2">RAdam</td><td colspan="2">Adam</td></tr><tr><td>Epochs</td><td colspan="2">300</td><td colspan="2">200</td><td colspan="2">300</td></tr><tr><td>Parameter</td><td colspan="2">ω: U(15,85), b&#x27;: U(0.1,1),</td><td colspan="2">ω: U(10,50), b&#x27;: U(1,6),</td><td colspan="2">τm: N(20,5), τa: N(200,50),</td></tr><tr><td>initialization</td><td colspan="2">τm,out: N(20,1)</td><td colspan="2">α: Sigmoid(N(0,0.1))</td><td colspan="2">τm,out: N(20,5)</td></tr></table>
626
+
627
+ <table><tr><td>ECG-QT</td><td>BRF-RSNN</td><td>BHRF-RSNN</td><td>ALIF-RSNN</td></tr><tr><td>Network</td><td>4 + 36 (fully recurrent) + 6</td><td>4 + 36 (fully recurrent) + 6</td><td>4 + 36 (fully recurrent) + 6</td></tr><tr><td>Learning rate (Lr)</td><td>0.1</td><td>0.3</td><td>0.05</td></tr><tr><td>Loss function</td><td>NLL</td><td>NLL</td><td>NLL</td></tr><tr><td>Minibatch size</td><td>16</td><td>4</td><td>64</td></tr><tr><td>Lr scheduling</td><td>LinearLR</td><td>LinearLR</td><td>LinearLR</td></tr><tr><td>Optimizer</td><td>Adam</td><td>RAdam</td><td>Adam</td></tr><tr><td>Epochs</td><td>400</td><td>300</td><td>400</td></tr><tr><td>Parameter</td><td>ω: U(3,5), b&#x27;: U(0.1,1),</td><td>ω: U(7,11), b&#x27;: U(0.1,1),</td><td>τm: N(20,0.5), τa: N(7,0.2),</td></tr><tr><td>initialization</td><td>τm,out: N(20,1)</td><td>α: Sigmoid(N(0,0.1))</td><td>τm,out: N(20,0.5)</td></tr><tr><td>Sub-seq. length</td><td>0</td><td>0</td><td>10</td></tr></table>
628
+
629
+ <table><tr><td>SHD</td><td>BRF-RSNN</td><td>BHRF-RSNN</td><td>ALIF-RSNN</td></tr><tr><td>Network</td><td>700 + 128 (fully recurrent) + 20</td><td>700 + 128 (fully recurrent) + 20</td><td>700 + 128 (fully recurrent) + 20</td></tr><tr><td>Learning rate (Lr)</td><td>0.075</td><td>0.1</td><td>0.075</td></tr><tr><td>Loss function</td><td>NLL</td><td>NLL</td><td>NLL</td></tr><tr><td>Minibatch size</td><td>32</td><td>32</td><td>32</td></tr><tr><td>Lr scheduling</td><td>LinearLR</td><td>LinearLR</td><td>LinearLR</td></tr><tr><td>Optimizer</td><td>Adam</td><td>RMSprop</td><td>Adam</td></tr><tr><td>Epochs</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Parameter</td><td>ω: U(5,10), b&#x27;: U(2,3),</td><td>ω: U(3,10), b&#x27;: U(0.1,1),</td><td>τm: N(20,5), τa: N(150,10),</td></tr><tr><td>initialization</td><td>τm,out: N(20,5)</td><td>α: Sigmoid(N(0,0.1))</td><td>τm,out: N(20,5)</td></tr><tr><td>Sub-seq. length</td><td>0</td><td>0</td><td>10</td></tr></table>
630
+
631
+ Due to the BHRF-RSNN being in the preliminary phase of its exploration, we initially used the sigmoid function for the leaky integrator decay constant $\alpha$ , as it ensured the decay to be in the range of 0 and 1.
632
+
633
+ # A.13. Learning speed-up with forward gradient injection (FGI) and TorchScript
634
+
635
+ As a further exploration, we apply forward gradient injection (FGI) from Otte (2024) for modeling the surrogate gradient functions. Let $x$ be a computation node, $f$ a non-differentiable function (e.g. step function), $g'$ a function that we want to use as derivative for $f$ , and $\mathrm{sg}$ the stop gradient operator. Instead of overriding the backward() method, we can just write:
636
+
637
+ $$
638
+ h = x \cdot \operatorname {s g} \left(g ^ {\prime} (x)\right) \tag {44}
639
+ $$
640
+
641
+ $$
642
+ y = h - \operatorname {s g} (h) + \operatorname {s g} (f (x)) \tag {45}
643
+ $$
644
+
645
+ With FGI + TorchScript we achieve speed-ups by a factor of more than two for all dataset as shown in Table 4, while maintaining performance.
646
+
647
+ Table 4. BRF-RSNN training speed up with model optimization methods over standard backward() baseline.
648
+
649
+ <table><tr><td rowspan="2">Optimization</td><td rowspan="2">Gradient</td><td colspan="2">S-MNIST</td><td colspan="2">PS-MNIST</td><td colspan="2">ECG</td><td colspan="2">SHD</td></tr><tr><td>Time (hrs)</td><td>Ratio</td><td>Time (hrs)</td><td>Ratio</td><td>Time (hrs)</td><td>Ratio</td><td>Time (min)</td><td>Ratio</td></tr><tr><td>-</td><td>backward()</td><td>23.8</td><td>1×</td><td>31.0</td><td>1×</td><td>8.5</td><td>1×</td><td>40.9</td><td>1×</td></tr><tr><td>TorchScript</td><td>backward()</td><td>11.3</td><td>2.1×</td><td>13.8</td><td>2.2×</td><td>4.1</td><td>2.1×</td><td>16.4</td><td>2.5×</td></tr><tr><td>TorchScript</td><td>FGI</td><td>10.2</td><td>2.3×</td><td>12.8</td><td>2.4×</td><td>3.5</td><td>2.4×</td><td>14.0</td><td>2.9×</td></tr></table>
2024/Balanced Resonate-and-Fire Neurons/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7abebdbb44053074e7c4be928917b40fd296aa679e98197e860c50a6d62bfaed
3
+ size 1362784
2024/Balanced Resonate-and-Fire Neurons/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/eb4ee431-aab9-4d44-a63c-5ba1f9693017_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36ac0667c00bae7d18946691ab588524f55b51c35fb73f23cf452b07b0345b2b
3
+ size 3070735
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fe5fa045c4787022816e8a13fe1149ae5cf30cfbecc0bdfddb89f03c69c9147
3
+ size 1631731
2024/Balancing Feature Similarity and Label Variability for Optimal Size-Aware One-shot Subset Selection/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Balancing Similarity and Complementarity for Federated Learning/bf4c3903-5f1d-45b7-afe1-c76b4feec649_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f09dc0587634eca0b895a95d4ae74b07f5cb29f92d87c1d131f3ab19029b35c7
3
+ size 4430587
2024/Balancing Similarity and Complementarity for Federated Learning/full.md ADDED
@@ -0,0 +1,617 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Balancing Similarity and Complementarity for Federated Learning
2
+
3
+ Kunda Yan $^{*1}$ Sen Cui $^{*1}$ Abudukelimu Wuerkaixi $^{1}$ Jingfeng Zhang $^{2,3}$ Bo Han $^{4,3}$ Gang Niu $^{3}$ Masashi Sugiyama $^{†35}$ Changshui Zhang
4
+
5
+ # Abstract
6
+
7
+ In mobile and IoT systems, Federated Learning (FL) is increasingly important for effectively using data while maintaining user privacy. One key challenge in FL is managing statistical heterogeneity, such as non-i.i.d. data, arising from numerous clients and diverse data sources. This requires strategic cooperation, often with clients having similar characteristics. However, we are interested in a fundamental question: does achieving optimal cooperation necessarily entail cooperating with the most similar clients? Typically, significant model performance improvements are often realized not by partnering with the most similar models, but through leveraging complementary data. Our theoretical and empirical analyses suggest that optimal cooperation is achieved by enhancing complementarity in feature distribution while restricting the disparity in the correlation between features and targets. Accordingly, we introduce a novel framework, FedSaC, which balances similarity and complementarity in FL cooperation. Our framework aims to approximate an optimal cooperation network for each client by optimizing a weighted sum of model similarity and feature complementarity. The strength of FedSaC lies in its adaptability to various levels of data heterogeneity and multimodal scenarios. Our comprehensive unimodal and multimodal experiments demonstrate that FedSaC markedly surpasses other state-of-the-art FL methods.
8
+
9
+ *Equal contribution †Corresponding authors 1 Institute for Artificial Intelligence, Tsinghua University (THUAI), Beijing National Research Center for Information Science and Technology (BN-Rist), Department of Automation, Tsinghua University, Beijing, P.R.China 2The University of Auckland 3RIKEN 4Hong Kong Baptist University 5The University of Tokyo. Correspondence to: Masashi Sugiyama <sugi@k.u-tokyo.ac.jp>, Changshui Zhang <zcs@mail.tsinghua.edu.cn>.
10
+
11
+ Proceedings of the $41^{st}$ International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024. Copyright 2024 by the author(s).
12
+
13
+ # 1. Introduction
14
+
15
+ Federated Learning (FL) (McMahan et al., 2017), emerging as a pivotal paradigm in machine learning, is increasingly acclaimed for facilitating collaborative training across diverse clients while ensuring data confidentiality. However, FL still encounters significant challenges, chiefly statistical heterogeneity - the occurrence of non-i.i.d. data across diverse local clients, as explored in prior research. (Cui et al., 2022; Qu et al., 2022; Karimireddy et al., 2020; Li et al., 2023). In real-world scenarios with data from heterogeneous user bases, models often face performance decline due to local data distribution variances (Kairouz et al., 2021; Li et al., 2022; Huang et al., 2022).
16
+
17
+ In the context of multimodal learning, statistical heterogeneity is notably pronounced (Chen & Zhang, 2020; Zheng et al., 2023). Variations in dimensionality, quality, and reliability among diverse data sources exacerbate heterogeneity within each client's modalities and magnify distribution discrepancies between clients. Such significant heterogeneity complicates achieving consistent and efficient learning in the FL framework (Yu et al., 2023; Lin et al., 2023).
18
+
19
+ In response to this challenge, a promising direction involves the identification of optimal collaborators predicated on model similarity metrics (Baek et al., 2023; Sattler et al., 2021; Ye et al., 2023). For example, IFCA (Baek et al., 2023) clusters cooperative clients based on the similarity of their model parameters, whereas CFL (Sattler et al., 2021) employs gradient similarity for the same purpose. pFedGraph (Ye et al., 2023) constructs a cooperation graph guided by an intuitive notion that clients with greater similarity should collaborate more intensively. These methods collectively emphasize the importance of model similarity in strategic collaboration.
20
+
21
+ However, we raise a fundamental question: does achieving optimal cooperation necessarily entail cooperating with the most similar clients? Theoretically, similarity oriented from collaboration is conservative, such that it could potentially result in unproductive cooperation. For example, under the assumption of two completely identical clients or models, cooperation between them would yield no information gain for either party, despite their maximal similarity. Interestingly, the fundamental precondition for model enhancement
22
+
23
+ ![](images/1646f3fa9cb61f85a156956b36286f47a19fad9fec5e6d10bbfed66390746c41.jpg)
24
+ Figure 1. Illustration of the role of data complementarity on personalized federated learning cooperation. The figure presents the experimental results how increasing data complementarity between two clients influences average accuracy post-cooperation and model similarity. Three scenarios are presented, showcasing distinct levels of complementarity for local data distributions. The findings underscore the benefits of complementarity, revealing that a balance of similarity and complementarity enhances cooperative benefits in a federated learning framework.
25
+
26
+ through collaboration is complementarity, not similarity.
27
+
28
+ Inspired by this intuition, we design experiments to explore the underlying mechanism. As an illustration in FL, we exemplify cooperation between two clients through model parameter aggregation. During the cooperation, we incrementally enhance the disparity in their data distributions to promote complementarity. Our investigation explores the alterations in the average accuracy and model similarity with the increase of data complementarity. As depicted in Figure 1, cooperation between the two clients with the highest model similarity does not yield the maximum gains, while cooperation between clients when the data exhibits moderate complementarity is more advantageous, even if their models are not the most similar. Additionally, excessive data complementarity might indicate significant discrepancies in data distributions, rendering the cooperation less effective. The experimental results demonstrate the indispensability of complementarity in the cooperation of FL. Therefore, an intriguing question emerges: how can we deduce the cooperation gain network among clients by simultaneously considering similarity and complementarity, thereby facilitating more optimal model cooperative learning?
29
+
30
+ We present an answer to this question grounded in a thorough analysis of statistical heterogeneity. Briefly, suppose we use $p_i(x,y) = p_i(x)p_i(y|x)$ to denote the joint distribution of the feature $x$ and label $y$ in the $i^{th}$ client. By controlling one of the distributions, it is observed that varied $p(y|x)$ signals the presence of a concept shift among clients. A substantial concept shift can detrimentally affect model learning. On the other hand, the limited nature of data within each client makes it challenging to precisely characterize the true local distribution. Hence, varied $p(x)$ which indicates the presence of a covariate shift could be beneficial, potentially providing more information gain. Experiments in Figure 1 also explain that a moderate covariate shift could
31
+
32
+ introduce complementarity in model learning, leading to enhanced performance. Consequently, we argue that allowing moderate variations in the marginal distribution $p(x)$ while ensuring consistency in the conditional distribution $p(y|x)$ presents a more effective cooperation than merely relying on singular model similarity metrics in previous research.
33
+
34
+ Within the aforementioned analysis, we propose a novel cooperation framework by balancing Similarity and Complementarity, named FedSac. Specifically, we introduce a cooperation network where each node signifies a client and edges reflect cooperation strength. This network is dynamically optimized, balancing model similarity with feature complementarity. The edge weights denote this balance, ensuring that clients not only collaborate with similar models but also leverage complementary feature insights. We applied the cooperation network to a FL framework, dividing it into two processes: server-side and client-side, achieving personalized interactive cooperation under privacy protection conditions. Leveraging the refined approach, our FedSac adeptly accommodates various levels of data heterogeneity and multi-modal scenarios, and effectively identifies the optimal collaborators for each client.
35
+
36
+ Our experiments validate the efficacy of FedSaC, demonstrating its ability to consider both similarity and complementarity in cooperation while maintaining a balance. Thanks to this property of FedSaC, it outperforms 12 unimodal and 4 multimodal baselines across various benchmark datasets. Consequently, we conclude that complementarity is indeed beneficial in FL cooperation, rather than solely focusing on similarity.
37
+
38
+ We summarize our contributions as follows:
39
+
40
+ - We challenge a widely accepted notion that model similarity can be a robust metric for determining the potential benefits of cooperative model learning. We argue
41
+
42
+ that achieving optimal cooperation necessitates a dual consideration of similarity and complementarity.
43
+
44
+ - We propose a novel collaboration framework, FedSaC, which infers the cooperation by optimizing a constrained objective. The objective quantifies a balanced similarity and complementarity between local clients.
45
+ - We demonstrate through extensive experiments that FedSaC exhibits superior performance in addressing data heterogeneity in FL, surpassing other state-of-the-art FL methods in both unimodal and multimodal scenarios. Code is accessible at https://github.com/yankd22/FedSaC/.
46
+
47
+ # 2. Related Work
48
+
49
+ # 2.1. Federated Learning and Statistical Heterogeneity
50
+
51
+ Federated learning (McMahan et al., 2017) has become a key focus in the machine learning field for its practical applications, but it also presents several challenges, including communication efficiency (Konečný et al., 2016), privacy concerns (Agarwal et al., 2018; Mothukuri et al., 2021), and statistical heterogeneity (Karimireddy et al., 2020; Cui et al., 2022; Qu et al., 2022), and they have been the topic of multiple research efforts (Mohri et al., 2019). Recently, a wealth of work has been proposed to handle statistical heterogeneity. For example, (Mohri et al., 2019) seek a balanced model performance distribution by maximizing the model performance on any arbitrary target distribution. (Li et al., 2021a) develop MOON that corrects local training by maximizing the similarity between local and global models. Some clustering-based FL methods (Wu et al., 2021; Baek et al., 2023) also attempt to utilize model similarity to cluster similar clients in order to mitigate the impact of statistical heterogeneity. A fundamental question arises "whether a high degree of model similarity invariably leads to more effective collaboration"?
52
+
53
+ # 2.2. Personalized Federated Learning
54
+
55
+ A global model (e.g., FedAvg (McMahan et al., 2017)) could harm certain clients when there are severe distribution discrepancies (Deng et al., 2020), and this stimulates the study of personalized federated learning (Qu et al., 2023; Qin et al., 2023; Zhu et al., 2023). One line of work focused on a better balance between global and local training. For example, there are researches (Dinh et al., 2020; Li et al., 2020; Karimireddy et al., 2020) proposing to stabilize local training by regulating the deviation from the global model over the parameter space. Another line of research aims to achieve a more fine-grained cooperation via collaboratively learning with similar clients. For example, (Ghosh et al., 2022) proposed to cluster the collaborative clients according to their model parameter similarity, and learn a personalized model for each cluster. (Ye et al., 2023) specify who to
56
+
57
+ collaborate at what intensity level for each client according to model similarity. While the current trend in personalized federated learning heavily relies on similarity metrics, we suggest that a balanced focus on both similarity and complementarity can more accurately optimize collaboration benefits.
58
+
59
+ # 2.3. Federated Multimodal Learning
60
+
61
+ Considering the diverse data modalities in real life, there are a few research investigating the tasks of federated multimodal learning, i.e., collaboratively learning models on distributed sources containing multimodal data (Xiong et al., 2022; Zhao et al., 2021). In particular, Xiong et al. propose a co-attention mechanism(Xiong et al., 2022) to fuse different modalities. (Yu et al., 2023) design a regularization technique to restrict global-local discrepancy by contrastive learning. (Zhao et al., 2022) enhanced the challenge for multimodal clients with unlabeled local data using a semisupervised framework. Our approach optimizes a weighted sum of model similarity and feature complementarity for automatic weight allocation to clients. Given the higher statistical heterogeneity in multimodal data compared to unimodal data, global models, as currently developed, struggle with conflicting client dependencies. Therefore, our focus is on developing personalized models for multimodal tasks to address data heterogeneity effectively.
62
+
63
+ # 3. Problem Setup
64
+
65
+ The problem to be solved in this paper is formally defined in this section. Specifically, we introduce the objective of federated learning, and through analyzing the statistical heterogeneity, demonstrate the feasibility and significance of balancing similarity and complementarity in FL.
66
+
67
+ # 3.1. Notations
68
+
69
+ Suppose there are $N$ clients in a federated network, each client owns a private dataset $D^{i}$ with $n^i$ data samples, where $i = 1,\dots ,N$ . We define the relative size of each dataset $D^{i}$ as $p^i = n^i /\sum_jn^j$ . The dataset $D^{i} = \{X^{i},Y^{i}\}$ consists of the input space $X^{i}$ and output space $Y^{i}$ . A data point is denoted by $\{x,y\}$ , with $x$ signifying either a unimodal or a multimodal feature. The input space and the output space are shared across all clients.
70
+
71
+ Federated Learning. In FL scenario, each client collaboratively refines a predictive model using local data and collective knowledge to optimally predict label $y$ . FedAvg (McMahan et al., 2017), as an exemplar method introduced by McMahan et al., learns a global model $\pmb{\theta}^g$ for all clients by minimizing the empirical risk over the samples from all clients, i.e.,
72
+
73
+ $$
74
+ \min _ {\boldsymbol {\theta} ^ {g} \in \boldsymbol {\Theta}} \sum_ {i = 1} ^ {N} p ^ {i} \mathcal {L} _ {i} \left(\boldsymbol {\theta} ^ {g}; D ^ {i}\right), \tag {1}
75
+ $$
76
+
77
+ where $\Theta$ is the hypothesis space and $\mathcal{L}_i$ denotes the loss objective of each clients. From Eq.1, FedAvg presumes that i.i.d. data from different clients converge to a shared joint distribution $p(x,y)$ , indicating statistical homogeneity across diverse data points.
78
+
79
+ # 3.2. Statistical Heterogeneity
80
+
81
+ In practical scenarios, the i.i.d assumption in FedAvg is largely unrealistic. There could be noticeable distinctive traits in local datasets across different clients stemming from diverse environments and contexts in which clients gather data (Mohri et al., 2019). Existing research reveals that such statistical heterogeneity may result in under-performance of global models (Qu et al., 2022). In the given context, the concept of personalized federated learning is introduced as a potential solution to mitigate the statistical heterogeneity issues by facilitating selective cooperation (Li et al., 2021b; Lin et al., 2022; Ye et al., 2023). Existing works assume that clients derive more benefit from collaborating with peers who possess similar characteristics, thereby implying a diminished level of cooperation where dissimilarities exist. This allows each client to utilize information more akin to their local distribution. However, we pose a fundamental question: is cooperation with similar peers truly optimal?
82
+
83
+ We endeavor to delve deeply into statistical heterogeneity to provide an unexpected answer. Suppose we use $p(x, y)$ to denote the joint distribution of features and labels, the nature of statistical heterogeneity lies in the disparate joint distributions across various clients, i.e., $p(x^{k_1}, y^{k_1}) \neq p(x^{k_2}, y^{k_2})$ , where $k_1 \neq k_2$ . The joint distribution $p(x, y)$ can be decomposed as $p(x, y) = p(x)p(y|x)$ , thus allowing statistical heterogeneity to be represented as
84
+
85
+ $$
86
+ p \left(x ^ {k _ {1}}\right) p \left(y ^ {k _ {1}} \mid x ^ {k _ {1}}\right) \neq p \left(x ^ {k _ {2}}\right) p \left(y ^ {k _ {2}} \mid x ^ {k _ {2}}\right), \tag {2}
87
+ $$
88
+
89
+ where $k_{1} \neq k_{2}$ . Within this formulation, we recall the following definition.
90
+
91
+ Definition 3.1. Here is the definition of two distribution shifts.
92
+
93
+ (1) Covariant shift (Peng et al., 2020; Gan et al., 2021): The distribution of input features $p(x)$ exhibits disparities among different clients, while the conditional distribution $p(y|x)$ is shared.
94
+ (2) Concept shift (Jothimurugesan et al., 2023; Canonaco et al., 2021): The relationship between input features and output labels $p(y|x)$ alterations among different clients, even if the distribution of input features $p(x)$ remains constant.
95
+
96
+ # 3.3. Optimal Cooperation
97
+
98
+ To effectively mitigate the challenges of statistical heterogeneity in federated learning, previous research has predominantly focused on employing a similarity metric to facilitate client cooperation. This approach, as highlighted in studies
99
+
100
+ such as (Li et al., 2021b; Sattler et al., 2021; Ye et al., 2023), emphasizes maximizing similarity to address concept shift, which is indeed a crucial aspect of aligning learning models across diverse clients.
101
+
102
+ Maximizing similarity is justifiable for addressing concept shift. Specifically, when two clients exhibit similar conditional distributions $p(y|x)$ , it signifies a shared correlation or mapping between input features and output labels. Such a correlation is instrumental in fostering a more coherent alignment and synthesis of the learned models or knowledge, thereby enhancing the overall effectiveness of the federated learning process. However, in the case of covariant shift, where there is a variation in input features across clients, this strategy may not yield the same level of effectiveness.
103
+
104
+ Moderate covariant shift is beneficial for cooperation in federated learning, as exhibited in Figure 1. In the context of federated learning, local clients, limited by their specific data subsets, often present an incomplete representation of the broader data distribution. Therefore, clients are inclined to engage in cooperation to surmount the limitations posed by their individual data paucity. When there is minimal covariate shift between two clients, overlapping input features can limit the model's capacity to absorb diverse information. This constraint impedes the detection of underlying data patterns, hindering collaborative efforts. Thus, we suggest that a client should collaborate with peers whose input features exhibit moderate variations. Such strategic collaborations harness complementary data, enhancing the model's predictive accuracy and generalization potential.
105
+
106
+ Given the aforementioned analysis, it becomes apparent that reliance on similarity metrics as a collaborative criterion is suboptimal in the presence of covariate shift. It would be more judicious to permit moderate variations in $p(x)$ while maintaining similarity in the conditional distribution $p(y|x)$ .
107
+
108
+ # 4. Our Method: Balancing Similarity and Complementarity
109
+
110
+ In this section, we detail the construction of a cooperation network, designed to identify optimal collaborators for each client within FL framework. Section 4.1 introduces our cooperation network, and Section 4.2 discusses the global optimization process, balancing similarity and complementarity. In Section 4.3, we provide specific methods for computing similarity and complementarity under privacy protection, and further decompose the global optimization into server-side and client-side to fit FL architecture.
111
+
112
+ # 4.1. Cooperation Network
113
+
114
+ Contrary to prior personalized FL works, we argue that merely targeting similar clients is not always optimal, as
115
+
116
+ ![](images/905f8e59d812a289e9a1642fb1ff041b099aea1874881db3ebc0ae6040381b1d.jpg)
117
+ Figure 2. Illustration of our FedSaC approach. Local clients train models by minimizing empirical risk, incorporating a regularization term based on the distance to the aggregated model. Post-training, models are distilled via SVD to capture the representative subspace, which, alongside model parameters, is sent to the server. The server constructs a cooperation network, balancing similarity and complementarity among clients, to aggregate models. These aggregated models are then disseminated to clients for the subsequent training iteration.
118
+
119
+ diverse feature distributions can yield more insights for robust generalization. Hence, our goal of cooperation among federated clients is to achieve a balance: seeking data with a similar conditional distribution while ensuring a complementary marginal distribution.
120
+
121
+ To measure this balance, we introduce two metrics: similarity, targeting minimal concept shifts within similar conditional distributions, and complementarity, addressing moderate covariate shifts for diverse marginal distributions. Informed by this rationale as discussed in Section 3.2, we advocate that clients should collaborate with others who share similar $p(y|x)$ but different $p(x)$ . Such a balanced collaboration ensures that clients not only access shared knowledge but also harness complementary insights from different data angles, ultimately boosting learning outcomes.
122
+
123
+ From a global perspective, the cooperation strength of a client is influenced by other clients. Inspired by (Ye et al., 2023), we construct a cooperation network shown in Figure 2 which balances similarity and complementarity among clients while collaborating. This network comprises $N$ nodes, each representing a client. The adjacency matrix of the network is denoted as $\mathbf{W} \in \mathbb{R}^{N \times N}$ , where the element $\mathbf{W}_{ij}$ indicates the cooperation strength between the $i^{th}$ and $j^{th}$ clients in federated learning. We establish a global objective encompassing both similarity and complementarity to determine the optimal weights in the adjacency matrix,
124
+
125
+ which identifies the optimal collaborators for each client.
126
+
127
+ # 4.2. Optimization with Similarity and Complementarity
128
+
129
+ In practice, client data distributions are inaccessible. To bypass the privacy constraint, we utilize local models as surrogates for estimating data distributions. We capture the local data distribution of clients as the sampling distribution for their marginal distribution $p(x)$ . For the conditional distribution $p(y|x)$ , intuitively, the personalized model parameters, after local training, can capture the mapping from the marginal distribution $p(x)$ to the label distribution $p(y)$ . Hence, we consider the local-trained parameters as approximate surrogates for the conditional distribution $p(y|x)$ . We present a global optimization equation, as articulated in Equation 3, which aims to refine the local personalized model parameters $\{\pmb{\theta}^i\}$ for each client and the network adjacency matrix $W$ . The term $\mathcal{L}_i(\sum_{j=1}^{N} W_{ij} \pmb{\theta}^j; D^i)$ denotes the empirical risk on the local dataset of the $i^{th}$ client, following the weighted aggregation of model parameters across multiple clients. $\mathcal{C}$ denotes the complementarity of marginal distributions between two clients, while $S$ denotes the similarity in model parameters between them. The hyperparameters $\alpha$ and $\beta$ are introduced to adjust the prominence of complementarity and similarity, ensuring a balanced emphasis on both during optimization.
130
+
131
+ $$
132
+ \begin{array}{l} \min _ {\{\boldsymbol {\theta} ^ {i} \}, \boldsymbol {W}} \sum_ {i = 1} ^ {N} p ^ {i} \left(\mathcal {L} _ {i} \left(\sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} \boldsymbol {\theta} ^ {j}; D ^ {i}\right) + \alpha \sum_ {j = 1} ^ {N} \mathcal {C} \left(\boldsymbol {W} _ {i j}; D ^ {i}; D ^ {j}\right) \right. \\ \left. - \beta \sum_ {j = 1} ^ {N} S \left(\boldsymbol {W} _ {i j}; \boldsymbol {\theta} ^ {i}; \boldsymbol {\theta} ^ {j}\right)\right) \\ \end{array}
133
+ $$
134
+
135
+ $$
136
+ \text {s . t .} \quad \sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} = 1, \forall i; \quad \boldsymbol {W} _ {i j} \geq 0, \forall i, j \tag {3}
137
+ $$
138
+
139
+ The optimization equation minimizes the empirical risk on local data while balancing the similarity and complementarity among clients. The two constraints ensure the normalization and non-negativity of each client's cooperation weight. Compared to previous methods, our cooperation network approach flexibly determines the cooperation strength among clients. By considering variations in marginal distributions across different clients, it more effectively captures distributional differences, leading to enhanced model performance.
140
+
141
+ # 4.3. FedSaC: Balancing Similarity and Complementarity
142
+
143
+ In practical FL architectures, each client is restricted to its local dataset and model. Model aggregation, as well as the computation of complementarity and similarity, require coordination with a central server. Given this structure, we initially introduce the metric of similarity and complementarity under privacy constraints. Subsequently, we partition the global optimization equation into two stages, optimiz-
144
+
145
+ ing separately at the server side and the client side. The aforementioned process is illustrated in Figure 2.
146
+
147
+ # Algorithm 1 FedSac
148
+
149
+ Input: Total communication round $T$ , client number $N$ , initial local model $\{\pmb{\theta}_{(0)}^i\}$ , initial cooperation network $\pmb{W}_{(0)}$ ;
150
+
151
+ 1: for each round $t = 0,\dots,T - 1$ do
152
+ 2: Client Side
153
+ 3: for client $i = 1, \dots, N$ in parallel do
154
+ 4: Receive aggregated model $\tilde{\pmb{\theta}}_{(t)}^{i}$ sent from server;
155
+ 5: Update local model $\pmb{\theta}_{(t)}^{i}\gets \tilde{\pmb{\theta}}_{(t)}^{i}$
156
+ 6: Minimize local loss defined in Eq.9;
157
+ 7: Extract representative subspace $U_{k(t)}^{i}$ by Eq.5;
158
+ 8: Send $\pmb{\theta}_{(t)}^{i}$ and $U_{k(t)}^{i}$ to server;
159
+ 9: end for
160
+ 10: Server Side
161
+ 11: Calculate similarity $S$ for each pair of clients as Eq.4;
162
+ 12: Calculate complementarity $\mathcal{C}$ for each pair of clients as Eq.6 and Eq.7;
163
+ 13: Update $\mathbf{W}_{(t)}$ by optimization Eq.8;
164
+ 14: Aggregate model $\tilde{\pmb{\theta}}_{(t + 1)}^{\iota}\gets \sum_{j}\pmb{W}_{ij(t)}\pmb{\theta}_{(t)}^{j};$
165
+ 15: end for
166
+ 16: Output: the learned personalized models $\left\{\pmb{\theta}_{(T)}^{i}\right\}$ .
167
+
168
+ # 4.3.1. THE METRIC OF SIMILARITY AND COMPLEMENTARITY
169
+
170
+ Similarity Metric. Following conventional practices, we use model parameters as proxies and adopt the cosine distance between the local models of the $i^{th}$ and $j^{th}$ clients as our similarity metric, denoted as,
171
+
172
+ $$
173
+ \mathcal {S} \left(\boldsymbol {W} _ {i j}; \boldsymbol {\theta} ^ {i}; \boldsymbol {\theta} ^ {j}\right) = \boldsymbol {W} _ {i j} \frac {\boldsymbol {\theta} ^ {i} \cdot \boldsymbol {\theta} ^ {j}}{\| \boldsymbol {\theta} ^ {i} \| \cdot \| \boldsymbol {\theta} ^ {j} \|}. \tag {4}
174
+ $$
175
+
176
+ Complementarity Metric. In light of the privacy principles inherent to FL, we use an indirect method to capture data complementarity. For a given local dataset $D^{i}$ at client $i$ , the local model $\theta^{i}$ extracts the feature matrix $X^{i}$ . Applying singular value decomposition(SVD) on $X^{i}$ yields:
177
+
178
+ $$
179
+ \boldsymbol {X} ^ {i} = \boldsymbol {U} ^ {i} \boldsymbol {\Sigma} ^ {i} \left(\boldsymbol {V} ^ {i}\right) ^ {T}, \tag {5}
180
+ $$
181
+
182
+ where $\pmb{U}^{i}$ contains the singular vectors of $\pmb{X}^{i}$ , capturing the direction in the feature space. For our purposes, we consider the first $k$ columns of $\pmb{U}^{i}$ , denoted $U_{k}^{i}$ , as the representative subspace for client $i$ .
183
+
184
+ To gauge the complementarity between clients $i$ and $j$ , we utilize the principal angles between their respective subspaces. The $l^{th}$ principal angle $\cos \phi_l$ between the two is given by:
185
+
186
+ $$
187
+ \cos \phi_ {l} = \max _ {u \in \boldsymbol {U} _ {k} ^ {i}, v \in \boldsymbol {U} _ {k} ^ {j}} u ^ {T} v, \tag {6}
188
+ $$
189
+
190
+ where $l = 1, \ldots, k$ . These angles offer a quantifiable measure of the complementarity between the two datasets. A small principal angle suggests a high similarity between the subspaces, while an angle close to $\pi/2$ implies that the subspaces are nearly orthogonal, indicating significant divergence in their feature spaces.
191
+
192
+ By averaging these angles, we obtain complementarity as:
193
+
194
+ $$
195
+ \mathcal {C} \left(\boldsymbol {W} _ {i j}; D ^ {i}; D ^ {j}\right) = \boldsymbol {W} _ {i j} \cos \left(\frac {1}{k} \cdot \sum_ {l} \phi_ {l}\right). \tag {7}
196
+ $$
197
+
198
+ # 4.3.2. FEDSAC IN FL ARCHITECTURE
199
+
200
+ Server Side. On the server side, we compute the similarity and complementarity based on the model parameters $\{\theta^i\}$ and the subspace representation $\{U_k^i\}$ received from the local client. Subsequently, we derive the adjacency matrix $W$ through optimization equations. In FL scenario, as the empirical loss of local clients is elusive, we utilize the relative dataset size $p_i$ as a surrogate measure. Clients with larger datasets are considered more reliable collaborators and should thus be assigned greater cooperative weight. Given these considerations, the optimization equation on the server side is defined as:
201
+
202
+ $$
203
+ \min _ {\boldsymbol {W} _ {i *}} \sum_ {j = 1} ^ {N} \left(\left(\boldsymbol {W} _ {i j} - p ^ {j}\right) ^ {2} + \alpha \mathcal {C} \left(\boldsymbol {W} _ {i j}; D ^ {i}; D ^ {j}\right) - \beta \mathcal {S} \left(\boldsymbol {W} _ {i j}; \boldsymbol {\theta} ^ {i}; \boldsymbol {\theta} ^ {j}\right)\right)
204
+ $$
205
+
206
+ $$
207
+ \sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} = 1, \forall i; \quad \boldsymbol {W} _ {i j} \geq 0, \forall i, j \tag {8}
208
+ $$
209
+
210
+ Using the cooperation network $\mathbf{W}$ , we derive the aggregated model $\tilde{\boldsymbol{\theta}}^i = \sum_j\boldsymbol{W}_{ij}\boldsymbol{\theta}^j$ for each client.
211
+
212
+ Client Side. On each client side, our objective is to minimize the local empirical risk while preventing overfitting of the aggregated model on the local dataset. We replace the current local model with the aggregated model received from the server $\theta^i\gets \tilde{\theta}^i$ , and further refine this local model. For the $i^{th}$ client, the optimization equation is defined as:
213
+
214
+ $$
215
+ \arg \min _ {\boldsymbol {\theta} ^ {i}} \mathcal {L} _ {i} \left(\boldsymbol {\theta} ^ {i}; D ^ {i}\right) - \lambda \cos \left(\boldsymbol {\theta} ^ {i}, \tilde {\boldsymbol {\theta}} ^ {i}\right), \tag {9}
216
+ $$
217
+
218
+ where $\cos (\pmb{\theta}^i, \tilde{\pmb{\theta}}^i)$ ensures that the locally optimized model does not deviate excessively from the aggregated model, and $\lambda$ represents the regularization hyperparameter. The optimized model then serves as the current local model for participation in the subsequent optimization round.
219
+
220
+ # 4.3.3. COMPUTATIONAL COMPLEXITY ANALYSIS
221
+
222
+ Our approach incurs additional time overhead compared to classical federated learning methods, aiming to provide informative feedback for client collaboration to obtain more suitable personalized models. This extra time expenditure
223
+
224
+ primarily stems from three aspects: computing the similarity metric $S$ , computing the complementarity metric $\mathcal{C}$ , and solving the optimization equation. Here, we analyze the computational complexity and demonstrate that this overhead is acceptable.
225
+
226
+ The computational complexity of the similarity measure $S$ is proportional to the model parameters, approximately equivalent to one inference time. For the complementarity measure $\mathcal{C}$ , the feature matrix $X$ is inferred. In cases of large local sample volumes, random sampling can approximate the local data distribution for effective computation. Assuming random sampling of $m$ samples with feature dimension $d$ , the resulting feature matrix $X \in \mathbb{R}^{m \times d}$ is processed. The complexity of extracting the representative subspace using SVD is $O(md^2)$ , which is almost negligible compared to the duration of model training.
227
+
228
+ The subsequent step involves solving the optimization equation. Notably, each row of the adjacency matrix $W$ in Equation 8 is independent, allowing for the independent computation of cooperation weights for each client with others. The optimization equation is simplified as follows:
229
+
230
+ $$
231
+ \begin{array}{l} \min _ {\boldsymbol {W} _ {i *}} \sum_ {j = 1} ^ {N} \left(\boldsymbol {W} _ {i j} ^ {2} - 2 p ^ {j} \boldsymbol {W} _ {i j} + (p ^ {j}) ^ {2} + \alpha \boldsymbol {W} _ {i j} \cos \left(\frac {1}{k} \sum_ {l} \phi_ {l}\right) \right. \\ \left. - \beta \boldsymbol {W} _ {i j} \frac {\boldsymbol {\theta} ^ {i} \cdot \boldsymbol {\theta} ^ {j}}{\| \boldsymbol {\theta} ^ {i} \| \cdot \| \boldsymbol {\theta} ^ {j} \|}\right) \\ \end{array}
232
+ $$
233
+
234
+ $$
235
+ \sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} = 1, \forall i; \quad \boldsymbol {W} _ {i j} \geq 0, \forall i, j \tag {10}
236
+ $$
237
+
238
+ The objective of the optimization equation simplifies to $\sum_{j=1}^{N} (\boldsymbol{W}_{ij}^2 + \phi_{ij} \boldsymbol{W}_{ij})$ , forming a quadratic optimization function. This function is convex due to its compliance with the convex set inequality constraint $\boldsymbol{W}_{ij} \geq 0, \forall i, j$ and the affine transformation equality constraint $\sum_{j=1}^{N} \boldsymbol{W}_{ij} = 1, \forall i$ . Therefore, this optimization problem is a convex optimization problem, solvable using convex optimization solvers, which can rapidly find the unique optimal solution.
239
+
240
+ # 5. Experiments
241
+
242
+ # 5.1. Unimodal Experiments Setup
243
+
244
+ Datasets and Data Heterogeneity. Following the predominant experimental setup in personalized federated learning, we evaluate our proposed FedSac on two image classification datasets: CIFAR-10 and CIFAR-100 (Krizhevsky et al., 2009). For each dataset, we implement four partitions with different heterogeneous levels into $K$ clients (Ye et al., 2023). 1) Homogeneous partition, where each client is imbued with data samples under a uniform probability schema. 2) Dirichlet partition (Yurochkin et al., 2019), where the allocation ratio of data samples from each category is in
245
+
246
+ stantiated from $Dir_K(\alpha)$ . Notably, we define heterogeneity levels with $\alpha = 0.1$ (high) and $\alpha = 0.5$ (low). 3) Pathological partition, where each client is assigned with data exclusively from 2 categories for 10 classification datasets and 20 categories for 100 classification datasets.
247
+
248
+ Baselines. We compare our FedSac with 12 representative FL approaches including: 1) Local: Local training without information sharing. 2) FedAvg (McMahan et al., 2017) and 3) FedProx (Deng et al., 2020): Popular FL methods where local updates are centrally aggregated. 4) CFL (Sattler et al., 2021): Clustered FL for client group learning. 5) pFedMe (Fallah et al., 2020): Using regularized loss functions to decouple local and global models. 6) Ditto (Li et al., 2021b): Enhanced robustness and fairness by regularized optimization. 7) FedAMP (Huang et al., 2021): Pairwise collaboration between similar clients in FL. 8) FedRep (Collins et al., 2021): Shared data representation with local client heads. 9) pFedHN (Shamsian et al., 2021): Hypernetworks generate unique client models in personalized FL. 10) FedRoD (Chen & Chao, 2022): Decoupled framework balances generic and personalized predictors 11) kNNPer (Marfoq et al., 2021): Personalization via global embeddings and local kNN interpolation. 12)pFedGraph (Ye et al., 2023): Adaptive collaboration via learned graph.
249
+
250
+ # 5.2. Unimodal Experimental Results
251
+
252
+ Our experimental evaluations, conducted across various levels of heterogeneity on the CIFAR-10 and CIFAR-100 datasets, conclusively demonstrate the superior performance of our proposed model, FedSaC. Our analysis of the results presented in Table 1 leads to two primary insights:
253
+
254
+ Superiority Across Heterogeneity Levels. FedSaC consistently surpasses baseline models in various heterogeneity settings, highlighting its superior performance. Experiments show that our personalized method notably outperforms conventional techniques like FedAvg, especially in situations with statistical heterogeneity. Furthermore, FedSaC demonstrates significant or comparable enhancements over pFedGraph, a method based on similarity metrics. This comparison emphasizes the efficacy of our balanced approach to similarity and complementarity, a crucial aspect in federated learning for handling diverse data distributions.
255
+
256
+ Enhanced Performance under Strong Complementarity. FedSaC excels in scenarios with significant complementarity, such as those involving Dirichlet partitioning. These settings often feature imbalanced data distributions, posing challenges for local models with limited data categories. FedSaC's effective balance of similarity and complementarity addresses these challenges, enhancing data representation. In Dirichlet partitioning, it consistently surpasses pFedGraph, which relies on similarity metrics, improving accuracy by $3\%$ to $8\%$ . This alignment of empirical results
257
+
258
+ <table><tr><td rowspan="2">Dataset H-Level</td><td colspan="4">CIFAR-10</td><td colspan="4">CIFAR-100</td></tr><tr><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td></tr><tr><td>Local</td><td>54.81</td><td>72.72</td><td>83.83</td><td>91.07</td><td>16.13</td><td>30.63</td><td>47.68</td><td>49.42</td></tr><tr><td>FedAvg</td><td>67.12</td><td>63.61</td><td>62.92</td><td>66.19</td><td>31.10</td><td>30.66</td><td>27.78</td><td>26.23</td></tr><tr><td>FedProx</td><td>62.92</td><td>62.93</td><td>62.25</td><td>55.76</td><td>30.55</td><td>30.64</td><td>27.87</td><td>25.64</td></tr><tr><td>CFL</td><td>60.55</td><td>73.81</td><td>83.84</td><td>90.76</td><td>19.31</td><td>33.21</td><td>49.12</td><td>52.43</td></tr><tr><td>pFedMe</td><td>47.48</td><td>66.35</td><td>75.24</td><td>81.73</td><td>13.18</td><td>25.18</td><td>34.37</td><td>33.48</td></tr><tr><td>Ditto</td><td>65.35</td><td>75.98</td><td>83.78</td><td>89.41</td><td>29.41</td><td>39.73</td><td>50.33</td><td>50.54</td></tr><tr><td>FedAMP</td><td>45.49</td><td>64.29</td><td>75.49</td><td>86.90</td><td>10.07</td><td>22.66</td><td>31.04</td><td>37.50</td></tr><tr><td>FedRep</td><td>62.88</td><td>74.14</td><td>83.47</td><td>90.02</td><td>21.53</td><td>34.72</td><td>50.15</td><td>26.23</td></tr><tr><td>pFedHN</td><td>62.78</td><td>66.62</td><td>82.57</td><td>89.91</td><td>25.94</td><td>30.89</td><td>49.08</td><td>49.06</td></tr><tr><td>FedRoD</td><td>62.07</td><td>74.06</td><td>83.49</td><td>90.66</td><td>18.71</td><td>31.65</td><td>47.96</td><td>49.91</td></tr><tr><td>kNN-Per</td><td>67.01</td><td>63.05</td><td>70.05</td><td>79.09</td><td>31.04</td><td>30.95</td><td>25.84</td><td>24.70</td></tr><tr><td>pFedGraph</td><td>67.37</td><td>75.22</td><td>84.28</td><td>92.74</td><td>31.16</td><td>38.71</td><td>51.63</td><td>56.79</td></tr><tr><td>FedSaC</td><td>70.89</td><td>80.46</td><td>93.14</td><td>92.89</td><td>34.84</td><td>41.80</td><td>56.27</td><td>57.48</td></tr></table>
259
+
260
+ with our theoretical framework confirms the effectiveness and versatility of FedSaC in various federated learning contexts, especially with high data heterogeneity.
261
+
262
+ # 5.3. Unimodal Experiments with Larger Model
263
+
264
+ We prove the applicability of our method on larger models. We opted for ResNet18 over the simple CNN model, while maintaining the experimental setup as previously described. The experiments were conducted on the CIFAR-100 dataset, with the results shown in Table 2.
265
+
266
+ Table 1. Average accuracy of our unimodal FedSaC on CIFAR-10 and CIFAR-100 dataset
267
+
268
+ <table><tr><td rowspan="2">Dataset H-Level</td><td colspan="4">CIFAR-100 with ResNet18</td></tr><tr><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td></tr><tr><td>Local</td><td>23.69</td><td>39.19</td><td>57.45</td><td>61.19</td></tr><tr><td>FedAvg</td><td>40.50</td><td>39.85</td><td>37.15</td><td>34.90</td></tr><tr><td>FedProx</td><td>40.88</td><td>38.67</td><td>37.17</td><td>35.63</td></tr><tr><td>CFL</td><td>41.18</td><td>48.87</td><td>63.99</td><td>67.76</td></tr><tr><td>pFedMe</td><td>13.18</td><td>25.18</td><td>34.37</td><td>33.48</td></tr><tr><td>Ditto</td><td>40.52</td><td>51.07</td><td>63.03</td><td>66.71</td></tr><tr><td>FedAMP</td><td>9.28</td><td>20.46</td><td>34.59</td><td>33.74</td></tr><tr><td>FedRep</td><td>32.39</td><td>45.52</td><td>62.14</td><td>64.33</td></tr><tr><td>FedRoD</td><td>30.22</td><td>44.24</td><td>49.08</td><td>55.02</td></tr><tr><td>kNN-Per</td><td>41.32</td><td>40.38</td><td>39.35</td><td>41.16</td></tr><tr><td>pFedGraph</td><td>40.25</td><td>51.87</td><td>64.91</td><td>67.96</td></tr><tr><td>FedSaC</td><td>42.62</td><td>54.01</td><td>67.75</td><td>68.16</td></tr></table>
269
+
270
+ Table 2. Average accuracy of our FedSaC on the CIFAR-100 dataset with ResNet18 model
271
+
272
+ The results demonstrate that our FedSaC consistently outperforms the baseline models when using larger models. Notably, under the Dirichlet partition, which introduces appropriate data heterogeneity, our method significantly surpasses existing approaches. This aligns with our analysis, highlighting the complementary advantages of our approach. The experiment further supports the applicability of our method.
273
+
274
+ # 5.4. Multimodal Experiments Setup
275
+
276
+ Datasets and Baselines. In our multimodal experiments, we employ the CUB200-2011 (Welinder et al., 2010) multimodal dataset, which encompasses two modalities—images and text—to undertake the task of classifying 200 bird species. For multimodal baselines, we not only compare with local training but also extend unimodal methods FedAvg and $pFedGraph$ to the multimodal context, executing tasks separately within each modality. Additionally, we incorporate the multimodal federated learning method FedIoT (Zhao et al., 2022) for comparison. This method conducts unsupervised training on local clients and supervised aggregation on the server.
277
+
278
+ Multimodal Setup. Our proficient unimodal FedSac method has been expanded to multimodal experimentation. Unlike unimodal scenarios, the multimodal approach leverages inter-client complementarity to enhance personalized model performance and utilizes inter-modality complementarity to contribute additional information to the model. Therefore, we introduce a strategy for the fusion of multimodal information complementarity. The specific setup details will be presented in Appendix B.
279
+
280
+ # 5.5. Multimodal Experimental Results
281
+
282
+ The multimodal experimental results, as depicted in Table 3, demonstrate that our FedSaC method surpasses all baselines. It significantly outperforms FedIoT, a method tailored for multimodal federated learning, which validates the efficacy of FedSaC in handling complex multimodal data. Particularly in scenarios modeled by Dirichlet distributions, our method demonstrates a distinct advantage over other baselines, reflecting a consistent trend with our unimodal experiment outcomes. Notably, we observe a more pronounced improvement in the visual modality post-cooperation, suggesting that visual data may provide richer information that enhances the robustness of our FedSaC.
283
+
284
+ <table><tr><td rowspan="2">H-Level modal</td><td colspan="2">Homo</td><td colspan="2">Diri(low)</td><td colspan="2">Diri(high)</td><td colspan="2">Pathol</td></tr><tr><td>visual</td><td>textual</td><td>visual</td><td>textual</td><td>visual</td><td>textual</td><td>visual</td><td>textual</td></tr><tr><td>Local</td><td>9.42</td><td>9.65</td><td>18.45</td><td>17.01</td><td>28.46</td><td>24.44</td><td>19.81</td><td>17.12</td></tr><tr><td>FedAvg</td><td>20.13</td><td>16.97</td><td>19.81</td><td>16.48</td><td>21.41</td><td>16.01</td><td>19.80</td><td>16.65</td></tr><tr><td>FedIoT</td><td>19.96</td><td>17.24</td><td>19.92</td><td>17.45</td><td>20.04</td><td>17.23</td><td>19.69</td><td>16.95</td></tr><tr><td>pFedGraph</td><td>21.87</td><td>21.59</td><td>24.48</td><td>25.13</td><td>31.78</td><td>31.34</td><td>25.50</td><td>27.06</td></tr><tr><td>FedSaC</td><td>25.25</td><td>22.97</td><td>28.62</td><td>27.40</td><td>35.36</td><td>33.44</td><td>30.07</td><td>27.52</td></tr></table>
285
+
286
+ Table 3. Average accuracy of our multimodal FedSaC on CUB200-2011 dataset
287
+
288
+ ![](images/02d94b6e0316145446a979fa42e17f0f997bed0633dc5707727fbd3ac3ef9bad.jpg)
289
+ (a) Data Sim
290
+
291
+ ![](images/3f51897b4f0f5a0ea03f35234f990525a73931383919263da8337ab22bc29666.jpg)
292
+ (b) Model Sim
293
+
294
+ ![](images/60dd7a5eaadb69f83ab2072a7031ca597c535c2583cc283e12a8188161ce6f77.jpg)
295
+ (c) Feature Comp
296
+
297
+ ![](images/2c41ffa81f5251cc5ca3304189509f21a33f6e8a9ad527ba0ac7915ba744a05e.jpg)
298
+ (d) Sim Network
299
+
300
+ ![](images/eb56c7ec96316d60f95b20cfe6f2959367dd3cd8b107fab34f8fd1a041fc1071.jpg)
301
+ (e) Comp Network
302
+
303
+ ![](images/fa8c3c621cea1359fddf4b976bf0debb1e7e4a39d106c86a6080c93e3d584253.jpg)
304
+ (f) Bal Network
305
+ Figure 3. Visualization of FedSaC: local data, process matrices, and cooperation networks under three collaboration states
306
+
307
+ # 5.6. Visualization
308
+
309
+ In our FedSaC visualization, Figure 3 presents core matrices and cooperation networks. Figure 3(a) shows local data's cosine similarity, while Figures 3(b) and 3(c) display the model similarity and feature complementarity matrices, respectively. The comparison of Figures 3(a) and 3(c) demonstrates a complementary pattern, affirming our metric's effectiveness in capturing local data relationships under privacy constraints. Figures 3(d) to 3(f) depict cooperation networks under three collaboration scenarios: focusing on similarity, complementarity, and a balance of both.
310
+
311
+ It is observed that in the similarity-based network, clients predominantly maintain their own models, hindering cooperative effectiveness and information gain. In the complementarity network, clients almost completely abandon their initial states, which is disadvantageous for training. The balanced approach allows for probabilistic exploration while filtering out clients with excessively high heterogeneity, as indicated by the darker areas that also show inconsistency in the local data matrix. The visualization underscores our method's role in boosting FL collaboration efficiency.
312
+
313
+ # 5.7. Hyperparameter Discussion
314
+
315
+ In the Appendix D.1, we present the experimental results for hyperparameters. Here, we discuss the selection of hyperparameters.
316
+
317
+ Among the four hyperparameters discussed in our paper
318
+
319
+ $(\alpha, \beta, \lambda, k)$ , there's no need to fine-tune $\lambda$ and $k$ . As shown in Appendix D.1, as long as $\lambda$ and $k$ are within a reasonable range ( $\lambda = 5e^{-3} \sim 5e^{-2}$ , $k = 2 \sim 3$ ), results are stable across various scenarios. For $\alpha$ and $\beta$ , we search for well-performing values based on validation sets. As explored in Appendix B.1, $\alpha = 0.9$ and $\beta = 1.4$ are stable for most scenarios, including Homogeneity and Dirichlet partitions. For scenarios with high heterogeneity and low complementarity, such as the Pathological partition, adjusting to $\alpha = 0.5$ and $\beta = 1.6$ is suggested.
320
+
321
+ In most practical scenarios, tuning $\alpha$ and $\beta$ is unnecessary. Our recommended values of $\alpha = 0.9$ and $\beta = 1.4$ are generally effective. For data with excessive heterogeneity, reducing complementarity weight is advisable. To achieve optimal results, a portion of the dataset can be used as a validation set for hyperparameter search. This pre-usage process incurs minimal additional costs and is practical for large-scale applications.
322
+
323
+ # 5.8. More Discussion
324
+
325
+ Large-Scale Clients. In our experiments with a smaller scale of client data, we enhanced cooperation efficiency in large-scale client collaborations (e.g., with 50 or 100 clients) by randomly selecting a subset of clients in each iteration. The feasibility of this approach is demonstrated in Appendix D.2.
326
+
327
+ Communication Overhead. Despite the additional steps introduced for optimal cooperation, Appendix E provides run-time consumption within each phases and confirms that the extra computational cost is minimal compared to local training, and thus acceptable.
328
+
329
+ # 6. Conclusion
330
+
331
+ In this study, we investigate the complex dynamics of federated learning, mitigating the significant challenge of statistical heterogeneity. We shift the focus from model similarity to a balance between similarity and feature complementarity. Our framework, FedSaC, effectively constructs a cooperation network by optimizing this balance. Extensive experiments show FedSaC's superiority over current FL methods in various scenarios. This research challenges conventional approaches and contributes to developing more robust learning models for complex federated settings.
332
+
333
+ # Impact Statement
334
+
335
+ This study presents the FedSaC framework, offering a strategic approach to address statistical heterogeneity in Federated Learning. Academically, it introduces a novel perspective to FL, encouraging future research to explore the interplay of complementarity and similarity in model cooperation. Practically, this framework can be flexibly applied across various industries, facilitating more efficient and privacy-preserving data analysis models. Ethically, FedSaC aligns with the increasing demand for ethical data use and user privacy in technological advancements. Future work will further investigate the significance of balancing similarity and complementarity in multimodal architectures.
336
+
337
+ # Acknowledgements
338
+
339
+ This work is funded by the Natural Science Foundation of China(NSFC. No. 62176132). BH was supported by the NSFC General Program No. 62376235 and CCF-Baidu Open Fund. MS was supported by Institute for AI and Beyond, UTokyo and by a grant from Apple, Inc. Any views, opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and should not be interpreted as reflecting the views, policies or position, either expressed or implied, of Apple Inc.
340
+
341
+ # References
342
+
343
+ Agarwal, N., Suresh, A. T., Yu, F. X., Kumar, S., and McMahan, B. cpsgd: Communication-efficient and differentially-private distributed SGD. In Bengio, S., Wallach, H. M., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pp. 7575-7586, 2018.
344
+ Baek, J., Jeong, W., Jin, J., Yoon, J., and Hwang, S. J. Personalized subgraph federated learning. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp. 1396-1415. PMLR, 2023.
345
+ Canonaco, G., Bergamasco, A., Mongelluzzo, A., and Roveri, M. Adaptive federated learning in presence of concept drift. In International Joint Conference on Neural Networks, IJCNN 2021, Shenzhen, China, July 18-22, 2021, pp. 1-7. IEEE, 2021.
346
+ Chen, H. and Chao, W. On bridging generic and personalized federated learning for image classification. In The Tenth International Conference on Learning Represent
347
+
348
+ tations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net, 2022.
349
+ Chen, J. and Zhang, A. HGMF: heterogeneous graph-based fusion for multimodal data with incompleteness. In Gupta, R., Liu, Y., Tang, J., and Prakash, B. A. (eds.), KDD '20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA, USA, August 23-27, 2020, pp. 1295-1305. ACM, 2020.
350
+ Collins, L., Hassani, H., Mokhtari, A., and Shakkottai, S. Exploiting shared representations for personalized federated learning. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 2089-2099. PMLR, 2021.
351
+ Cui, S., Liang, J., Pan, W., Chen, K., Zhang, C., and Wang, F. Collaboration equilibrium in federated learning. In Zhang, A. and Rangwala, H. (eds.), KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pp. 241-251. ACM, 2022.
352
+ Deng, Y., Kamani, M. M., and Mahdavi, M. Adaptive personalized federated learning. CoRR, abs/2003.13461, 2020.
353
+ Dinh, C. T., Tran, N. H., and Nguyen, T. D. Personalized federated learning with moreau envelopes. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
354
+ Fallah, A., Mokhtari, A., and Ozdaglar, A. E. Personalized federated learning with theoretical guarantees: A model-agnostic meta-learning approach. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
355
+ Gan, S., Mathur, A., Isopoussu, A., Kawsar, F., Berthouze, N., and Lane, N. D. Fruda: Framework for distributed adversarial domain adaptation. CoRR, abs/2112.13381, 2021.
356
+ Ghosh, A., Chung, J., Yin, D., and Ramchandran, K. An efficient framework for clustered federated learning. IEEE Trans. Inf. Theory, 68(12):8076-8091, 2022.
357
+ Huang, W., Ye, M., and Du, B. Learn from others and be yourself in heterogeneous federated learning. In
358
+
359
+ IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, June 18-24, 2022, pp. 10133-10143. IEEE, 2022.
360
+ 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 Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pp. 7865-7873. AAAI Press, 2021.
361
+ Jothimurugesan, E., Hsieh, K., Wang, J., Joshi, G., and Gibbons, P. B. Federated learning under distributed concept drift. In Ruiz, F. J. R., Dy, J. G., and van de Meent, J. (eds.), International Conference on Artificial Intelligence and Statistics, 25-27 April 2023, Palau de Congressos, Valencia, Spain, volume 206 of Proceedings of Machine Learning Research, pp. 5834-5853. PMLR, 2023.
362
+ Kairouz, P., McMahan, H. B., Avent, B., Bellet, A., Dennis, M., Bhagoji, A. N., Bonawitz, K. A., Charles, Z., Cormode, G., Cummings, R., D'Oliveira, R. G. L., Eichner, H., Rouayheb, S. E., Evans, D., Gardner, J., Garrett, Z., Gascon, A., Ghazi, B., Gibbons, P. B., Gruteser, M., Harchaoui, Z., He, C., He, L., Huo, Z., Hutchinson, B., Hsu, J., Jaggi, M., Javidi, T., Joshi, G., Khodak, M., Konecny, J., Korolova, A., Koushanfar, F., Koyejo, S., Lepoint, T., Liu, Y., Mittal, P., Mohri, M., Nock, R., Ozgur, A., Pagh, R., Qi, H., Ramage, D., Raskar, R., Raykova, M., Song, D., Song, W., Stich, S. U., Sun, Z., Suresh, A. T., Tramér, F., Vepakomma, P., Wang, J., Xiong, L., Xu, Z., Yang, Q., Yu, F. X., Yu, H., and Zhao, S. Advances and open problems in federated learning. Found. Trends Mach. Learn., 14(1-2):1-210, 2021.
363
+ Karimireddy, S. P., Kale, S., Mohri, M., Reddi, S. J., Stich, S. U., and Suresh, A. T. SCAFFOLD: stochastic controlled averaging for federated learning. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pp. 5132-5143. PMLR, 2020.
364
+ Konečný, J., McMahan, H. B., Yu, F. X., Richtárik, P., Suresh, A. T., and Bacon, D. Federated learning: Strategies for improving communication efficiency. CoRR, abs/1610.05492, 2016.
365
+ Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009.
366
+ Li, B., Schmidt, M. N., Alström, T. S., and Stich, S. U. On the effectiveness of partial variance reduction in federated learning with heterogeneous data. In IEEE/CVF Conference on Computer Vision and Pattern Recognition,
367
+
368
+ CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 3964-3973. IEEE, 2023.
369
+ Li, Q., He, B., and Song, D. Model-contrastive federated learning. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pp. 10713-10722. Computer Vision Foundation / IEEE, 2021a.
370
+ Li, Q., Diao, Y., Chen, Q., and He, B. Federated learning on non-iid data silos: An experimental study. In 38th IEEE International Conference on Data Engineering, ICDE 2022, Kuala Lumpur, Malaysia, May 9-12, 2022, pp. 965-978. IEEE, 2022.
371
+ Li, T., Sahu, A. K., Zaheer, M., Sanjabi, M., Talwalkar, A., and Smith, V. Federated optimization in heterogeneous networks. In Dhillon, I. S., Papailiopoulos, D. S., and Sze, V. (eds.), Proceedings of Machine Learning and Systems 2020, MLSys 2020, Austin, TX, USA, March 2-4, 2020. mlsys.org, 2020.
372
+ Li, T., Hu, S., Beirami, A., and Smith, V. Ditto: Fair and robust federated learning through personalization. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 6357-6368. PMLR, 2021b.
373
+ Lin, S., Han, Y., Li, X., and Zhang, Z. Personalized federated learning towards communication efficiency, robustness and fairness. In NeurIPS, 2022.
374
+ Lin, Y., Gao, Y., Gong, M., Zhang, S., Zhang, Y., and Li, Z. Federated learning on multimodal data: A comprehensive survey. Mach. Intell. Res., 20(4):539-553, 2023.
375
+ Marfoq, O., Neglia, G., Kameni, L., and Vidal, R. Personalized federated learning through local memorization. CoRR, abs/2111.09360, 2021.
376
+ McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. Communication-efficient learning of deep networks from decentralized data. In Singh, A. and Zhu, X. J. (eds.), Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, AISTATS 2017, 20-22 April 2017, Fort Lauderdale, FL, USA, volume 54 of Proceedings of Machine Learning Research, pp. 1273-1282. PMLR, 2017.
377
+ Miao, J. and Ben-Israel, A. On principal angles between subspaces in rn. Linear algebra and its applications, 171: 81-98, 1992.
378
+ Mohri, M., Sivek, G., and Suresh, A. T. Agnostic federated learning. In Chaudhuri, K. and Salakhutdinov, R. (eds.),
379
+
380
+ Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pp. 4615-4625. PMLR, 2019.
381
+ Mothukuri, V., Parizi, R. M., Pouriyeh, S., Huang, Y., Dehghantanha, A., and Srivastava, G. A survey on security and privacy of federated learning. Future Gener. Comput. Syst., 115:619-640, 2021.
382
+ Peng, X., Huang, Z., Zhu, Y., and Saenko, K. Federated adversarial domain adaptation. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
383
+ Qin, Z., Yang, L., Wang, Q., Han, Y., and Hu, Q. Reliable and interpretable personalized federated learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 20422-20431. IEEE, 2023.
384
+ Qu, L., Zhou, Y., Liang, P. P., Xia, Y., Wang, F., Adeli, E., Fei-Fei, L., and Rubin, D. L. Rethinking architecture design for tackling data heterogeneity in federated learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, June 18-24, 2022, pp. 10051-10061. IEEE, 2022.
385
+ Qu, Z., Li, X., Han, X., Duan, R., Shen, C., and Chen, L. How to prevent the poor performance clients for personalized federated learning? In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 12167-12176. IEEE, 2023.
386
+ Rajkumar, K., Goswami, A., Lakshmanan, K., and Gupta, R. Comment on "federated learning with differential privacy: Algorithms and performance analysis". IEEE Trans. Inf. Forensics Secur., 17:3922-3924, 2022.
387
+ Sattler, F., Müller, K., and Samek, W. Clustered federated learning: Model-agnostic distributed multitask optimization under privacy constraints. IEEE Trans. Neural Networks Learn. Syst., 32(8):3710-3722, 2021.
388
+ Shamsian, A., Navon, A., Fetaya, E., and Chechik, G. Personalized federated learning using hypernetworks. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 9489-9502. PMLR, 2021.
389
+ Welinder, P., Branson, S., Mita, T., Wah, C., Schroff, F., Belongie, S., and Perona, P. Caltech-ucsd birds 200. 2010.
390
+
391
+ Wu, C., Wu, F., Cao, Y., Huang, Y., and Xie, X. Fedgnn: Federated graph neural network for privacy-preserving recommendation. CoRR, abs/2102.04925, 2021.
392
+ Xiong, B., Yang, X., Qi, F., and Xu, C. A unified framework for multi-modal federated learning. Neurocomputing, 480:110-118, 2022.
393
+ Ye, R., Ni, Z., Wu, F., Chen, S., and Wang, Y. Personalized federated learning with inferred collaboration graphs. In Krause, A., Brunskill, E., Cho, K., Engelhardt, B., Sabato, S., and Scarlett, J. (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp. 39801-39817. PMLR, 2023.
394
+ Yu, Q., Liu, Y., Wang, Y., Xu, K., and Liu, J. Multimodal federated learning via contrastive representation ensemble. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023.
395
+ Yurochkin, M., Agarwal, M., Ghosh, S., Greenewald, K. H., Hoang, T. N., and Khazaeni, Y. Bayesian nonparametric federated learning of neural networks. In Chaudhuri, K. and Salakhutdinov, R. (eds.), Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pp. 7252-7261. PMLR, 2019.
396
+ Zhao, Y., Barnaghi, P. M., and Haddadi, H. Multimodal federated learning. CoRR, abs/2109.04833, 2021.
397
+ Zhao, Y., Barnaghi, P. M., and Haddadi, H. Multimodal federated learning on IoT data. In Seventh IEEE/ACM International Conference on Internet-of-Things Design and Implementation, IoTDI 2022, Milano, Italy, May 4-6, 2022, pp. 43-54. IEEE, 2022.
398
+ Zheng, T., Li, A., Chen, Z., Wang, H., and Luo, J. Autofed: Heterogeneity-aware federated multimodal learning for robust autonomous driving. In Costa-Pérez, X., Widmer, J., Perino, D., Giustiniano, D., Al-Hassanieh, H., Asadi, A., and Cox, L. P. (eds.), Proceedings of the 29th Annual International Conference on Mobile Computing and Networking, ACM MobiCom 2023, Madrid, Spain, October 2-6, 2023, pp. 15:1-15:15. ACM, 2023.
399
+ Zhu, J., Ma, X., and Blaschko, M. B. Confidence-aware personalized federated learning via variational expectation maximization. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 24542-24551. IEEE, 2023.
400
+
401
+ # A. Discussions about FedSac.
402
+
403
+ # A.1. FedSac Optimization
404
+
405
+ Global Optimization. In our research, the overarching optimization equation is presented as Equation 3, which is fundamentally grounded in the optimization objective of FedAvg (McMahan et al., 2017). The equation is expressed as follows:
406
+
407
+ $$
408
+ \min _ {\left\{\boldsymbol {\theta} ^ {i} \right\}} \sum_ {i = 1} ^ {N} p ^ {i} \mathcal {L} \left(\boldsymbol {\theta} ^ {g}; D ^ {i}\right), \tag {11}
409
+ $$
410
+
411
+ This equation is restructured to align with our targeted optimization goals. The global model $\theta_{g}$ can be represented as a weighted aggregation of local models, with the weights corresponding to the relative sizes of each client's dataset. The revised formulation is presented thusly:
412
+
413
+ $$
414
+ \min _ {\left. \boldsymbol {\theta} ^ {i} \right\rbrace , \boldsymbol {W}} \sum_ {i = 1} ^ {N} p ^ {i} \mathcal {L} _ {i} \left(\sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} \boldsymbol {\theta} ^ {j}; D ^ {i}\right) \tag {12}
415
+ $$
416
+
417
+ $$
418
+ \text {s . t .} \quad \boldsymbol {W} _ {i j} = p ^ {j}, \forall i, j; \quad \sum_ {j = 1} ^ {N} \boldsymbol {W} _ {i j} = 1, \forall i; \quad \boldsymbol {W} _ {i j} \geq 0, \forall i, j
419
+ $$
420
+
421
+ Further to this, we introduced two additional regularization terms to balance similarity and complementarity. $\mathcal{C}$ objective reduces cooperation intensity between clients with similar datasets, while $S$ objective increases it for clients with similar model parameters.
422
+
423
+ Server-Client Optimization. Within the federated learning framework, Equation 3 poses practical challenges, as clients should not directly receive models from other clients. Consequently, transferring models to a centralized server becomes essential. At the server side, we aim to estimate the first term of Equation 3, namely the empirical loss of local models. In line with our optimization objectives, which are aligned with FedAvg, we adopt a FedAvg-inspired approach. Here, we approximate the empirical loss using the relative sizes of the datasets, operating under the premise that clients with larger local datasets are more suitable for collaboration. This concept has been validated for its rationality (Ye et al., 2023) in federated learning scenarios.
424
+
425
+ # A.2. The Metric of Similarity and Complementarity
426
+
427
+ Similarity Metric. In the realm of federated learning, utilizing model parameters to gauge client similarity is a prevalent approach (Ye et al., 2023; Huang et al., 2021). Aligning with the approach in (Ye et al., 2023), we utilize cosine distance of model parameters for similarity assessment.
428
+
429
+ Complementarity Metric. Considering the privacy concerns in federated learning, direct computation of distances using local datasets is not feasible. Instead, we draw upon the principle angle method, a technique that measures distances between subspaces (Miao & Ben-Israel, 1992). This adapted approach relies on limited, non-sensitive information to determine the degree of similarity between clients.
430
+
431
+ The principle angle method offers a geometric perspective for measuring the distance between subspaces. Specifically, when dealing with two subspaces, $V$ and $W$ , the method determines the angles $\theta_{1}, \theta_{2}, \dots, \theta_{k}$ between them. Here, $k$ represents the number of dimensions in the smaller of the two subspaces. The calculation of the $i^{th}$ principal angle is as described in Equation 6. This implies that the cosine of the largest principal angle corresponds to the largest singular value of the matrix product $V^T W$ .
432
+
433
+ $$
434
+ \cos \theta_ {i} = \frac {< x _ {i} , y _ {i} >}{\| x _ {i} \| \cdot \| y _ {i} \|} = \max _ {x _ {i} \in \mathbf {V}, y _ {i} \in \mathbf {W}} \frac {< x _ {i} , y _ {i} >}{\| x _ {i} \| \cdot \| y _ {i} \|.} \tag {13}
435
+ $$
436
+
437
+ The principal angle method provides a clear geometric perspective on how similar or different two subspaces are. By measuring the angles between the subspaces, it offers a more intuitive understanding of their relationship.
438
+
439
+ In our method, we harness the principal angle method to effectively represent the local data distributions of clients as model output features. This is achieved through SVD, where we select the leading $k$ principal component vectors to represent each
440
+
441
+ client's data in a subspace. This approach maps varied client datasets to a common feature space and ensures privacy by using only a few principal components, which are insufficient to reconstruct the original data. The technique aligns data from different clients effectively while maintaining privacy in federated learning.
442
+
443
+ # B. Experiments and Implementation Details
444
+
445
+ # B.1. Unimodal Implementation Details
446
+
447
+ Basic Setup. Adhering to the training setting presented in (Ye et al., 2023), we partition the dataset across 10 local clients. Each client utilizes a simple CNN classifier consisting of 2 convolutional layers, 2 subsequent fully-connected layers and a final classification layer. Notably, the representation dimension prior to the classification layer is set at 84, which will be utilized for extracting the representative subspace to compute the complementarity. In the FL training phase, we execute 50 communication rounds. Each round consists of local training iterations that vary depending on the dataset: 200 iterations for CIFAR-10 and 400 iterations for CIFAR-100. Training employs the SGD optimizer with an initial learning rate 0.01 and a batch size 64.
448
+
449
+ Hyperparameter Setup. We have set key hyperparameters for optimal performance. We use three eigenvectors $(k = 3)$ for our representative subspace. The regularization hyperparameter $\lambda$ is set at 1. Additionally, the hyperparameters $\alpha$ and $\beta$ control the degree of complementarity and similarity in our optimization equation. In experiments, we consider two scenarios based on client dataset characteristics. For datasets with complementarity, $\alpha = 0.9$ and $\beta = 1.4$ balance similarity and complementarity for enhanced performance. In contrast, for datasets lacking complementarity, such as in the Pathological partition, we reduce complementarity by setting $\alpha = 0.5$ and $\beta = 1.6$ . The first setting is generally applied unless low complementarity among clients is known, in which case the second setting is used. To facilitate convergence, we use the initial settings for the first $70\%$ of communication rounds, then set $\alpha = 0$ in the remaining rounds.
450
+
451
+ # B.2. Multimodal Implementation Setup
452
+
453
+ In our setup, we distribute the CUB200-2011 dataset among clients, with an equal split between image and text modalities. Each client possesses distinct feature extraction networks and uniform classification networks to fulfill the classification task. Within the same modality, we employ the unimodal FedSaC method to facilitate cooperation among clients. For cross-modality cooperation, structural differences in feature extraction layers necessitate restricting collaborative efforts to the classification layer. Given the inherent complementarity between different modalities, we focus on the similarity within the classification layers during cooperation. The cooperation weights for the classification layers are derived by excluding the complementarity term $\mathcal{C}$ from the optimization 8. These weights are used to aggregate the classification layers at the server side, enabling the effective fusion of cross-modal information.
454
+
455
+ # B.3. Multimodal Implementation Details
456
+
457
+ We allocate the CUB200-2011 dataset across 8 clients, with 4 handling image data and the others processing text data. For image modality clients, we employ a CNN architecture with four convolutional layers and a single classification layer. Text clients, on the other hand, utilize a TextCNN network consisting of five convolutional layers and a classification layer. The representation dimension is set at 256. The training involves 30 communication rounds, each comprising 200 iterations. We employ the Adam optimizer with an initial learning rate of 0.001. Throughout the training, we adopt a balanced setting for similarity and complementarity, with $\alpha = 0.7$ and $\beta = 1.2$ , keeping the rest of the setup consistent with the unimodal FedSac.
458
+
459
+ # B.4. DataSets
460
+
461
+ In our experiments, CIFAR-10, CIFAR-100 (Krizhevsky et al., 2009) and CUB200-2011 (Welinder et al., 2010) are all public dataset.
462
+
463
+ CIFAR-10 and CIFAR-100. The CIFAR-10 and CIFAR-100 datasets are key benchmarks in machine learning, each containing 60,000 32x32 color images. CIFAR-10 is categorized into 10 classes with 6,000 images per class, suitable for basic image recognition. CIFAR-100, offering a finer classification challenge, divides the same number of images across 100 classes, with 600 images per class. Both datasets, split into 50,000 training and 10,000 test images, are extensively used
464
+
465
+ ![](images/89c4186d3a691dbcb59bd25b58036877c6d3d0c13062dc6b1bd6db21674539f9.jpg)
466
+ Figure 4. Illustration of the level of heterogeneity under four distinct partitioning schemes.
467
+
468
+ ![](images/bfc8739c5936cd106d83b91013e0532b1d3398d66df7aa6a970a5d1f27b7b902.jpg)
469
+
470
+ ![](images/394399b19f093b037538ac2f6a93846ff6bb9480a26a4b244c10f93d7afc822f.jpg)
471
+
472
+ ![](images/14c490e474c44ed2c463924a81e8622c20a3587a8931fb3249b59faa012320c3.jpg)
473
+
474
+ for evaluating image classification algorithms.
475
+
476
+ CUB200-2011. The CUB200-2011 dataset is specifically tailored for fine-grained visual categorization tasks, focusing on bird species identification. It consists of 11,788 images of 200 bird species, with both training and testing sets. Each species comes with a set of images that offer varying poses and backgrounds, providing a comprehensive dataset for advanced image recognition tasks. CUB200-2011 is particularly useful for research in areas requiring detailed visual discrimination, such as in distinguishing between closely related species.
477
+
478
+ Heterogeneity Partition. In our study, we employ the CIFAR-10 dataset and select two clients to illustrate the level of heterogeneity under four distinct partitioning schemes, shown as 4.
479
+
480
+ # B.5. Baselines
481
+
482
+ FedAvg (McMahan et al., 2017) streamlines the training of deep networks from decentralized data in federated learning. It enables multiple clients to collaboratively train a shared model while maintaining data privacy and reducing communication overhead. Suitable for scenarios where central data collection is impractical due to privacy concerns, like in IoT and healthcare applications.
483
+
484
+ FedProx (Li et al., 2020) specifically tackles system and statistical heterogeneity in federated networks. It introduces a proximal term to the optimization objective, enhancing stability and accuracy in networks with devices of varying capabilities. This modification leads to more robust convergence and improved accuracy in heterogeneous settings.
485
+
486
+ CFL (Sattler et al., 2021) is designed for large-scale peer-to-peer networks, optimizing federated learning by aggregating local model updates in a hierarchical manner. It ensures communication efficiency and data privacy through secure and authenticated encryption techniques. CFL stands out for its significant improvement in communication and computational efficiency, while robustly maintaining data integrity and privacy.
487
+
488
+ pFedMe (Dinh et al., 2020) introduces a personalized federated learning algorithm using Moreau envelopes as clients' regularized loss functions, allowing for the decoupling of personalized model optimization from global model learning. pFedMe is effective in handling statistical diversity among clients, leading to state-of-the-art convergence rates and superior empirical performance compared to traditional FedAvg and Per-FedAvg algorithms.
489
+
490
+ Ditto (Li et al., 2021b) is a framework that enhances federated learning by simultaneously achieving fairness and robustness through personalization. It addresses the challenges of statistical heterogeneity in networks, using a simple yet scalable technique that improves accuracy, fairness, and robustness. Ditto is particularly effective against training-time data and model poisoning attacks and reduces performance disparities across devices.
491
+
492
+ FedAMP (Huang et al., 2021) This method employs federated attentive message passing to facilitate collaborations among
493
+
494
+ clients with similar non-iid data, establishing convergence for both convex and non-convex models. FedAMP emphasizes pairwise collaborations between clients with similar data, overcoming the bottleneck of one global model trying to fit all clients in personalized cross-silo federated learning scenarios.
495
+
496
+ FedRep (Collins et al., 2021) utilizes a shared data representation across clients while allowing unique local heads for each client. This approach harnesses local updates concerning low-dimensional parameters, enabling efficient learning in heterogeneous data environments. By focusing on linear convergence and sample complexity, FedRep demonstrates improved performance over alternative personalized federated learning methods, especially in federated settings with non-iid data.
497
+
498
+ pFedHN (Shamsian et al., 2021) introduces a personalized federated learning approach using hypernetworks. This method trains a central hypernetwork to generate unique personal models for each client, effectively sharing parameters across clients. It excels in handling data disparities among clients, reducing communication costs, and generalizing better to new clients with varying distributions and computational resources.
499
+
500
+ FedRoD (Chen & Chao, 2022) simultaneously addresses generic and personalized learning objectives. It employs a two-loss, two-predictor system, decoupling the tasks of generic model training and personalized adaptation. The framework uses a class-balanced loss for the generic predictor and an empirical risk-based approach for the personalized predictor, facilitating robustness to non-identical class distributions and enabling zero-shot adaptation and effective fine-tuning for new clients.
501
+
502
+ kNN-Per (Marfoq et al., 2021) introduces local memorization using k-nearest neighbors in federated learning, enhancing the model's ability to personalize based on individual device data. This method stands out in its use of local data patterns to inform the federated learning process.
503
+
504
+ pFedGraph (Ye et al., 2023) proposes the construction of inferred collaboration graphs among clients in federated learning. It dynamically computes these graphs based on the volume of data and model similarity at each client. This method strategically identifies similar clients for cooperation, effectively mitigating issues arising from data heterogeneity.
505
+
506
+ FedIoT (Zhao et al., 2022) proposes a multimodal federated learning framework for IoT data, utilizing autoencoders to process multimodal data from clients. It introduces a multimodal FedAvg algorithm to aggregate local models from diverse data sources, enhancing classification performance in semi-supervised scenarios with unimodal and multimodal clients.
507
+
508
+ # B.6. Computing Resources
509
+
510
+ Part of the experiments is conducted on a local server with Ubuntu 16.04 system. It has two physical CPU chips which are Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz with 20 cpu cores. The other experiments are conducted on a remote server. It has 8 GPUs which are GeForce RTX 3090.
511
+
512
+ # C. Privacy Discussion
513
+
514
+ Our FedSAC exhibits similar data privacy preservation compared with baselines, as it does not share any private data of the clients. During communication, only model parameters are allowed to be shared. Similar to baselines, the sharing of model parameters is intended to maintain data privacy. The representative subspaces are derived from local data feature statistics generated by the model, a method that does not reveal any privacy details of the original dataset. Our approach is also compatible with protective strategies like differential privacy (Rajkumar et al., 2022). Specifically, for representative subspaces, we primarily rely on calculating their principal angles. Therefore, we could apply methods such as random cropping and adding minor noise to ensure that the original data cannot be reconstructed.
515
+
516
+ # D. Supplementary Experiments
517
+
518
+ # D.1. Hyperparameters Experiments
519
+
520
+ The experimental analysis focused on evaluating the influence of hyperparameters, as illustrated in Figures 5 and 6.
521
+
522
+ Hyperparameter $\alpha$ . In Figure 5, the similarity hyperparameter, denoted as $\beta$ , is fixed at 1.4, hile the complementary hyperparameter, $\alpha$ , varied from 0.6 to 1.2. The results indicate that in data partitions characterized by complementarity,
523
+
524
+ ![](images/b59051af2c132e95e88beadc60b46626b8c1c1a0453a83b2da4ab31e4ea3da60.jpg)
525
+ Figure 5. Average accuracy curves of the four partitions under various hyperparameter $\alpha$ settings.
526
+
527
+ ![](images/1a16c3e40917d8810e3b820408485602bfe4d7384d6be2b475e1048f452f9702.jpg)
528
+
529
+ ![](images/8d899668cb1ee249b673642078a38a514237ba74197b0af814e709861fe16944.jpg)
530
+
531
+ ![](images/16ff20e54742eca75fa04bff6db7f809d99e3de6117d41818b348f5bde54832a.jpg)
532
+
533
+ ![](images/6867d14a25928f69918e56b1d20086ee527d65a9c363faa4d16c4b6e3bacd7c5.jpg)
534
+ Figure 6. Average accuracy curves of the four partitions under various hyperparameter $\beta$ settings.
535
+
536
+ ![](images/5b83c8e30fada870b5177093256d129fd26ab1fae15f742ef32ad1611cd10626.jpg)
537
+
538
+ ![](images/d3e91556f415f9d7159a7c7ec77f43d598bbf5bc63087bfb7d7f58e2e3d564a6.jpg)
539
+
540
+ ![](images/6283a163018e45c67675ede5f4d5f5e0f9ccb1ecdbdb3d0a03858ed2803b9d88.jpg)
541
+
542
+ a moderate increase in $\alpha$ enhances accuracy. However, in partitions with high heterogeneity, the influence of $\alpha$ on the outcomes exhibits fluctuations. Notably, the experimental results consistently outperform the baseline, irrespective of the variations in $\alpha$ .
543
+
544
+ Hyperparameter $\beta$ . Figure 6 presents the outcomes with $\alpha$ set at 0.9, examining the impact of changes in $\beta$ ranging from 0.2 to 1.6. It is observed that an optimal level of similarity substantially benefits the experimental results, which uniformly exceed the baseline performance.
545
+
546
+ Hyperparameter $\lambda$ . We employed the CIFAR100 dataset to assess the impact of the hyperparameter $\lambda$ , associated with regularization constraints in local training, as demonstrated in Table 4. The results indicate that setting $\lambda$ to either 0.01 or 0.1 yields favorable outcomes with minimal fluctuation.
547
+
548
+ Hyperparameter $k$ , the influence of the subspace dimensionality, represented by $k$ , on the experimental outcomes was examined, as detailed in Table 5. The findings suggest that $k = 3$ is an appropriate choice for obtaining the representative subspace.
549
+
550
+ <table><tr><td>λ</td><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td></tr><tr><td>0.005</td><td>32.21</td><td>39.95</td><td>55.79</td><td>56.68</td></tr><tr><td>0.01</td><td>32.95</td><td>39.90</td><td>55.91</td><td>57.48</td></tr><tr><td>0.05</td><td>32.62</td><td>39.60</td><td>55.81</td><td>56.47</td></tr><tr><td>0.1</td><td>32.91</td><td>39.73</td><td>56.04</td><td>56.86</td></tr><tr><td>0.2</td><td>32.82</td><td>39.77</td><td>55.53</td><td>56.52</td></tr></table>
551
+
552
+ Table 4. Average accuracy of the four partitions under various hyperparameter $\lambda$ settings.
553
+
554
+ <table><tr><td>k</td><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td></tr><tr><td>1</td><td>70.26</td><td>80.29</td><td>92.97</td><td>92.47</td></tr><tr><td>2</td><td>70.50</td><td>80.28</td><td>93.04</td><td>92.56</td></tr><tr><td>3</td><td>70.89</td><td>80.46</td><td>93.14</td><td>92.89</td></tr><tr><td>4</td><td>70.20</td><td>80.15</td><td>92.73</td><td>92.59</td></tr></table>
555
+
556
+ # D.2. Experiments in Large-Scale Client Cooperation
557
+
558
+ In our experiments, we primarily focused on scenarios with a limited number of clients, specifically 8-10 clients. In situations involving a large number of clients, while the computational time overhead may not significantly impact our performance – a topic we will delve into in the following section – the cooperation among numerous clients could affect the convergence and stability of the collaboration. Therefore, for cooperation with a large client base, we incorporated an additional process to control the number of collaborators.
559
+
560
+ Specifically, in large-scale client cooperation, we randomly select k clients (k=10 in application) for collaboration before each iteration. This approach ensures convergence while enhancing cooperation efficiency. Table 7 presents the results in cooperation networks with 50 and 100 clients, incorporating this step. The results confirm the effectiveness of such collaborative efforts.
561
+
562
+ Table 5. Average accuracy of the four partitions under various hyperparameter $k$ settings.
563
+
564
+ <table><tr><td>Modal</td><td>Client Num</td><td>Homo</td><td>Diri(low)</td><td>Diri(high)</td><td>Pathol</td></tr><tr><td rowspan="2">Local</td><td>50</td><td>8.63</td><td>22.45</td><td>45.36</td><td>33.33</td></tr><tr><td>100</td><td>6.87</td><td>18.19</td><td>40.62</td><td>27.78</td></tr><tr><td rowspan="2">FedSaC</td><td>50</td><td>18.81</td><td>24.03</td><td>45.78</td><td>35.40</td></tr><tr><td>100</td><td>11.90</td><td>19.11</td><td>40.75</td><td>28.51</td></tr></table>
565
+
566
+ Below, we also present the additional computational overhead incurred when not employing random selection in large-scale client cooperation. In real-world scenarios, local training on clients occurs simultaneously; hence, in our analysis, we do not consider an increase in local training duration with the number of clients. The following table shows how the server-side additional overhead increases with the number of clients.
567
+
568
+ Table 6. Large-scale client cooperation
569
+
570
+ <table><tr><td>Client Num</td><td>Server-Side Overhead</td><td>Optimization</td><td>Model Aggregation</td></tr><tr><td>10</td><td>4.40s</td><td>0.21s</td><td>4.19s</td></tr><tr><td>20</td><td>14.93s</td><td>6.10s</td><td>8.83s</td></tr><tr><td>50</td><td>56.56s</td><td>24.84s</td><td>31.72s</td></tr><tr><td>100</td><td>269.42s</td><td>118.70s</td><td>140.72s</td></tr></table>
571
+
572
+ Table 7. Server-side additional overhead for large-scale clients cooperation
573
+
574
+ Assuming the number of clients is $n$ , the computational overhead on the server side increases approximately at a rate of $n^2$ with increasing clients. Within this overhead, the optimization process costs less than model aggregation. Therefore, the cost of the optimization process we introduce is acceptable in large-scale client cooperation, without significantly disrupting the original training process.
575
+
576
+ # E. Computational Cost and Complexity Analysis
577
+
578
+ As analyzed in Section 4.3.3, our method indeed introduces additional steps to extract information, yet the costs are acceptable and significantly less than that of local training, for the following reasons.
579
+
580
+ 1. Assuming the cost of one inference takes $\tau$ , our method shows the complexity of similarity metric is similar to the model's parameter count, roughly equal to an inference time of $\tau$ .
581
+ 2. Complementarity metric involves obtaining the feature matrix $X$ through model inference on the local dataset. For datasets with large sample sizes, random sampling can be used to approximate the local data distribution. Assuming the
582
+
583
+ sample size for random sampling is $m$ with feature dimension $d$ , the cost of acquiring the feature matrix $X \in \mathbb{R}^{m \times d}$ is $m\tau$ .
584
+
585
+ 3. Next, the feature matrix $X$ is dimensionally reduced via the SVD method to obtain a representative subspace. This process involves computing $X^T X$ and its eigenvalue decomposition, with a time complexity of $O(md^2)$ . In practice, this computational cost is significantly lower than that of extracting the feature matrix.
586
+ 4. Appendix E demonstrates that the solution for the optimal adjacency matrix $W$ in Eq.8 is a convex optimization problem, conforming to a quadratic programming problem. By employing the interior point method, this problem can be transformed into polynomial-level complexity. The computational cost in our experiments is approximately equivalent to one inference time $\tau$ .
587
+
588
+ The table below details the specific run-time consumption at each phase in our experiments, demonstrating that the overhead of our additional steps is significantly less than that of local training. Our method enhances collaborative approaches without imposing excessive burdens.
589
+
590
+ <table><tr><td>Phases</td><td>Run-time Consumption</td></tr><tr><td>Local Training</td><td>21.21s</td></tr><tr><td>Similarity Metric</td><td>0.05s</td></tr><tr><td>Complementarity Metric</td><td>1.62s</td></tr><tr><td>Complementarity Metric (Inference)</td><td>1.53s</td></tr><tr><td>Complementarity Metric (SVD)</td><td>0.09s</td></tr><tr><td>Optimization Equation</td><td>0.06s</td></tr></table>
591
+
592
+ Table 8. Run-time consumption of across different phases.
593
+
594
+ We tested the runtime of each additional phase in our experiments on our platform and compared it with the training duration of a single client in one local training round, given ten clients, as shown in Table 8. The results indicate that the time required for similarity metric and solving the optimization equation is negligible compared to local training duration. Although the complementarity metric phase, which involves an inference process, does take some time, it is still significantly less than the local training duration. Therefore, the additional cost of cooperation is acceptable. As a result, FedSAC does not introduce substantial additional computational and communication costs, making its computational overhead comparable to existing baselines.
595
+
596
+ # F. Convergence Analysis
597
+
598
+ The introduction of complementarity in our FedSaC approach does not lead to convergence issues. As depicted in Figure 7, we illustrate the accuracy progression over communication rounds on the CIFAR-100 dataset under a Diri(low) partition. It is observed that the accuracy of the FedSaC method steadily rises and gradually converges. Unlike local training, which may lead to overfitting and a subsequent decline in accuracy due to excessive training, our method effectively circumvents the overfitting problem. In contrast to other baselines that converge prematurely and potentially get trapped in local optima, our approach consistently explores better solutions, achieving optimal performance before ultimately converging.
599
+
600
+ # G. Additional visualization
601
+
602
+ To illustrate the advantages of balancing similarity and complementarity more clearly, we present an visualization involving four clients.
603
+
604
+ We distribute data from four categories, 1, 2, 3 and 4, among these four clients as follows: client1: (1, 2); client2: (1, 3); client3: (2, 3); client4: (1, 4). The numbers in parentheses represent the categories, with each category having an equal amount of data. Below, we present the adjacency matrix $W$ generated by four different cooperations.
605
+
606
+ $$
607
+ W (\alpha = 0, \beta = 1. 4) = \left( \begin{array}{l l l l} 0. 6 8 4 & 0. 1 3 7 & 0. 0 1 1 & 0. 1 6 8 \\ 0. 0 4 8 & 0. 5 9 6 & 0. 2 4 0 & 0. 1 1 7 \\ 0. 0 0 3 & 0. 3 2 0 & 0. 6 7 6 & 0. 0 0 0 \\ 0. 1 4 9 & 0. 1 8 6 & 0. 0 0 0 & 0. 6 6 5 \end{array} \right) \quad W (\alpha = 0. 9, \beta = 0) = \left( \begin{array}{l l l l} 0. 0 4 3 & 0. 3 4 4 & 0. 2 8 5 & 0. 3 2 8 \\ 0. 3 2 0 & 0. 0 2 0 & 0. 3 2 9 & 0. 3 3 1 \\ 0. 2 6 0 & 0. 3 2 8 & 0. 0 1 8 & 0. 3 9 5 \\ 0. 2 9 2 & 0. 3 1 8 & 0. 3 8 4 & 0. 0 0 7 \end{array} \right)
608
+ $$
609
+
610
+ ![](images/663ce3618dac96d3f8ccea4d73af37fef66dd7e8ff6e7dc8da903debf3e04cba.jpg)
611
+ Figure 7. Illustration of the accuracy progression over communication rounds on the CIFAR-100 dataset under a Diri(low) partition.
612
+
613
+ $$
614
+ W (\alpha = 0. 9, \beta = 1. 4) = \left( \begin{array}{c c c c} 0. 4 7 8 & 0. 2 3 0 & 0. 0 4 7 & 0. 2 4 6 \\ 0. 1 1 8 & 0. 3 6 5 & 0. 3 1 9 & 0. 1 9 7 \\ 0. 0 2 4 & 0. 4 0 9 & 0. 4 5 5 & 0. 1 1 1 \\ 0. 2 0 4 & 0. 2 6 8 & 0. 0 9 2 & 0. 4 3 6 \end{array} \right) \quad W (\alpha = 0. 5, \beta = 1. 6) = \left( \begin{array}{c c c c} 0. 6 3 0 & 0. 1 7 2 & 0. 0 0 0 & 0. 1 9 8 \\ 0. 0 5 8 & 0. 5 1 7 & 0. 2 8 2 & 0. 1 4 2 \\ 0. 0 0 0 & 0. 3 8 2 & 0. 6 1 6 & 0. 0 0 2 \\ 0. 1 7 1 & 0. 2 2 8 & 0. 0 0 0 & 0. 6 0 2 \end{array} \right)
615
+ $$
616
+
617
+ The results align with our expectations and affirm the advantages of our method. When relying solely on similarity, with $\alpha = 0, \beta = 1.4$ , clients seldom cooperate with others, preferring to retain their local models as much as possible. Conversely, when depending solely on complementarity with $\alpha = 0.9, \beta = 0$ , clients tend to discard the recently learned local models, which is impractical. Achieving a balance between similarity and complementarity with $\alpha = 0.9, \beta = 1.4$ leads to a more ideal state of collaboration, where local clients not only increase cooperation with complementary clients but also maintain lower collaboration weights with those of excessive heterogeneity. The setting $\alpha = 0.5, \beta = 1.6$ offers another solution for scenarios where there is high heterogeneity among clients.
2024/Balancing Similarity and Complementarity for Federated Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a61dfb8199333aa82555d9d458a9e954850ff41b2c912aa937e84b8579aab4d
3
+ size 804462
2024/Balancing Similarity and Complementarity for Federated Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Barrier Algorithms for Constrained Non-Convex Optimization/980db8ed-3d0a-452d-9db6-34115c4de8fb_content_list.json ADDED
The diff for this file is too large to render. See raw diff