Chelsea707 commited on
Commit
94bddfc
·
verified ·
1 Parent(s): f39d6c0

Add Batch 438874b4-d71d-4d7c-ab78-fe35b1b02039 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. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_content_list.json +0 -0
  3. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_model.json +0 -0
  4. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_origin.pdf +3 -0
  5. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/full.md +561 -0
  6. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/images.zip +3 -0
  7. 2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/layout.json +0 -0
  8. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_content_list.json +0 -0
  9. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_model.json +0 -0
  10. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_origin.pdf +3 -0
  11. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/full.md +0 -0
  12. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/images.zip +3 -0
  13. 2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/layout.json +0 -0
  14. 2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_content_list.json +0 -0
  15. 2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_model.json +0 -0
  16. 2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_origin.pdf +3 -0
  17. 2025/Independence Tests for Language Models/full.md +0 -0
  18. 2025/Independence Tests for Language Models/images.zip +3 -0
  19. 2025/Independence Tests for Language Models/layout.json +0 -0
  20. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_content_list.json +0 -0
  21. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_model.json +0 -0
  22. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_origin.pdf +3 -0
  23. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/full.md +555 -0
  24. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/images.zip +3 -0
  25. 2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/layout.json +0 -0
  26. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_content_list.json +0 -0
  27. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_model.json +0 -0
  28. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_origin.pdf +3 -0
  29. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/full.md +0 -0
  30. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/images.zip +3 -0
  31. 2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/layout.json +0 -0
  32. 2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_content_list.json +0 -0
  33. 2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_model.json +0 -0
  34. 2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_origin.pdf +3 -0
  35. 2025/Inductive Moment Matching/full.md +0 -0
  36. 2025/Inductive Moment Matching/images.zip +3 -0
  37. 2025/Inductive Moment Matching/layout.json +0 -0
  38. 2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_content_list.json +0 -0
  39. 2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_model.json +0 -0
  40. 2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_origin.pdf +3 -0
  41. 2025/InfAlign_ Inference-aware language model alignment/full.md +0 -0
  42. 2025/InfAlign_ Inference-aware language model alignment/images.zip +3 -0
  43. 2025/InfAlign_ Inference-aware language model alignment/layout.json +0 -0
  44. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_content_list.json +0 -0
  45. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_model.json +0 -0
  46. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_origin.pdf +3 -0
  47. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/full.md +640 -0
  48. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/images.zip +3 -0
  49. 2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/layout.json +0 -0
  50. 2025/Inference-Time Decomposition of Activations (ITDA)_ A Scalable Approach to Interpreting Large Language Models/ef60912f-6196-4b98-b5db-a2169cde22b8_content_list.json +0 -0
.gitattributes CHANGED
@@ -1513,3 +1513,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
1513
  2025/In-Context[[:space:]]Linear[[:space:]]Regression[[:space:]]Demystified_[[:space:]]Training[[:space:]]Dynamics[[:space:]]and[[:space:]]Mechanistic[[:space:]]Interpretability[[:space:]]of[[:space:]]Multi-Head[[:space:]]Softmax[[:space:]]Attention/7e5cf209-f89e-496f-8921-73ca1f5502a6_origin.pdf filter=lfs diff=lfs merge=lfs -text
1514
  2025/In-Context[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]From[[:space:]]Suboptimal[[:space:]]Historical[[:space:]]Data/05176635-47dd-4bac-875f-cd93f856f177_origin.pdf filter=lfs diff=lfs merge=lfs -text
1515
  2025/Incentivize[[:space:]]without[[:space:]]Bonus_[[:space:]]Provably[[:space:]]Efficient[[:space:]]Model-based[[:space:]]Online[[:space:]]Multi-agent[[:space:]]RL[[:space:]]for[[:space:]]Markov[[:space:]]Games/1a9304a7-a7dd-4928-ae0b-70bd0875e438_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1513
  2025/In-Context[[:space:]]Linear[[:space:]]Regression[[:space:]]Demystified_[[:space:]]Training[[:space:]]Dynamics[[:space:]]and[[:space:]]Mechanistic[[:space:]]Interpretability[[:space:]]of[[:space:]]Multi-Head[[:space:]]Softmax[[:space:]]Attention/7e5cf209-f89e-496f-8921-73ca1f5502a6_origin.pdf filter=lfs diff=lfs merge=lfs -text
1514
  2025/In-Context[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]From[[:space:]]Suboptimal[[:space:]]Historical[[:space:]]Data/05176635-47dd-4bac-875f-cd93f856f177_origin.pdf filter=lfs diff=lfs merge=lfs -text
1515
  2025/Incentivize[[:space:]]without[[:space:]]Bonus_[[:space:]]Provably[[:space:]]Efficient[[:space:]]Model-based[[:space:]]Online[[:space:]]Multi-agent[[:space:]]RL[[:space:]]for[[:space:]]Markov[[:space:]]Games/1a9304a7-a7dd-4928-ae0b-70bd0875e438_origin.pdf filter=lfs diff=lfs merge=lfs -text
1516
+ 2025/Incorporating[[:space:]]Arbitrary[[:space:]]Matrix[[:space:]]Group[[:space:]]Equivariance[[:space:]]into[[:space:]]KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_origin.pdf filter=lfs diff=lfs merge=lfs -text
1517
+ 2025/Incremental[[:space:]]Gradient[[:space:]]Descent[[:space:]]with[[:space:]]Small[[:space:]]Epoch[[:space:]]Counts[[:space:]]is[[:space:]]Surprisingly[[:space:]]Slow[[:space:]]on[[:space:]]Ill-Conditioned[[:space:]]Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_origin.pdf filter=lfs diff=lfs merge=lfs -text
1518
+ 2025/Independence[[:space:]]Tests[[:space:]]for[[:space:]]Language[[:space:]]Models/e4b2dc9a-720f-42da-a026-122dbf194312_origin.pdf filter=lfs diff=lfs merge=lfs -text
1519
+ 2025/Inducing,[[:space:]]Detecting[[:space:]]and[[:space:]]Characterising[[:space:]]Neural[[:space:]]Modules_[[:space:]]A[[:space:]]Pipeline[[:space:]]for[[:space:]]Functional[[:space:]]Interpretability[[:space:]]in[[:space:]]Reinforcement[[:space:]]Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_origin.pdf filter=lfs diff=lfs merge=lfs -text
1520
+ 2025/Inductive[[:space:]]Gradient[[:space:]]Adjustment[[:space:]]for[[:space:]]Spectral[[:space:]]Bias[[:space:]]in[[:space:]]Implicit[[:space:]]Neural[[:space:]]Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_origin.pdf filter=lfs diff=lfs merge=lfs -text
1521
+ 2025/Inductive[[:space:]]Moment[[:space:]]Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1522
+ 2025/InfAlign_[[:space:]]Inference-aware[[:space:]]language[[:space:]]model[[:space:]]alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_origin.pdf filter=lfs diff=lfs merge=lfs -text
1523
+ 2025/Inference-Time[[:space:]]Alignment[[:space:]]of[[:space:]]Diffusion[[:space:]]Models[[:space:]]with[[:space:]]Direct[[:space:]]Noise[[:space:]]Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_origin.pdf filter=lfs diff=lfs merge=lfs -text
1524
+ 2025/Inference-Time[[:space:]]Decomposition[[:space:]]of[[:space:]]Activations[[:space:]](ITDA)_[[:space:]]A[[:space:]]Scalable[[:space:]]Approach[[:space:]]to[[:space:]]Interpreting[[:space:]]Large[[:space:]]Language[[:space:]]Models/ef60912f-6196-4b98-b5db-a2169cde22b8_origin.pdf filter=lfs diff=lfs merge=lfs -text
1525
+ 2025/Info-Coevolution_[[:space:]]An[[:space:]]Efficient[[:space:]]Framework[[:space:]]for[[:space:]]Data[[:space:]]Model[[:space:]]Coevolution/d0f2aa9c-8f36-4a15-9fd0-d6c26ccfe3c5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1526
+ 2025/InfoCons_[[:space:]]Identifying[[:space:]]Interpretable[[:space:]]Critical[[:space:]]Concepts[[:space:]]in[[:space:]]Point[[:space:]]Clouds[[:space:]]via[[:space:]]Information[[:space:]]Theory/161b7477-0119-4727-97d5-f908c23b5bf7_origin.pdf filter=lfs diff=lfs merge=lfs -text
1527
+ 2025/InfoSAM_[[:space:]]Fine-Tuning[[:space:]]the[[:space:]]Segment[[:space:]]Anything[[:space:]]Model[[:space:]]from[[:space:]]An[[:space:]]Information-Theoretic[[:space:]]Perspective/66dba5e5-f825-477c-ae39-3d5fb7bc48e8_origin.pdf filter=lfs diff=lfs merge=lfs -text
1528
+ 2025/InfoSEM_[[:space:]]A[[:space:]]Deep[[:space:]]Generative[[:space:]]Model[[:space:]]with[[:space:]]Informative[[:space:]]Priors[[:space:]]for[[:space:]]Gene[[:space:]]Regulatory[[:space:]]Network[[:space:]]Inference/d32a18e3-ccff-4691-a487-87ef59cea600_origin.pdf filter=lfs diff=lfs merge=lfs -text
1529
+ 2025/Information[[:space:]]Bottleneck-guided[[:space:]]MLPs[[:space:]]for[[:space:]]Robust[[:space:]]Spatial-temporal[[:space:]]Forecasting/933c007e-b0a3-4386-b4a1-4f7c15029db8_origin.pdf filter=lfs diff=lfs merge=lfs -text
1530
+ 2025/Instance[[:space:]]Correlation[[:space:]]Graph-based[[:space:]]Naive[[:space:]]Bayes/e94c0630-e05b-4130-b2f4-85c28bd0e263_origin.pdf filter=lfs diff=lfs merge=lfs -text
1531
+ 2025/Instance-Optimal[[:space:]]Pure[[:space:]]Exploration[[:space:]]for[[:space:]]Linear[[:space:]]Bandits[[:space:]]on[[:space:]]Continuous[[:space:]]Arms/d42b84ec-8181-4ceb-8e7d-550e466832bb_origin.pdf filter=lfs diff=lfs merge=lfs -text
1532
+ 2025/Instruct2See_[[:space:]]Learning[[:space:]]to[[:space:]]Remove[[:space:]]Any[[:space:]]Obstructions[[:space:]]Across[[:space:]]Distributions/a9ddc9bd-42e3-41c9-af39-70b013d415bb_origin.pdf filter=lfs diff=lfs merge=lfs -text
1533
+ 2025/Instruction-Following[[:space:]]Pruning[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/f0fd3791-a91d-41e8-904f-70fbf376a14a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1534
+ 2025/IntLoRA_[[:space:]]Integral[[:space:]]Low-rank[[:space:]]Adaptation[[:space:]]of[[:space:]]Quantized[[:space:]]Diffusion[[:space:]]Models/92db0df1-3349-41ec-bcfd-c37d7cf9dbd0_origin.pdf filter=lfs diff=lfs merge=lfs -text
1535
+ 2025/Integer[[:space:]]Programming[[:space:]]for[[:space:]]Generalized[[:space:]]Causal[[:space:]]Bootstrap[[:space:]]Designs/5e3b274c-5157-40ed-8a84-7b4457ef9943_origin.pdf filter=lfs diff=lfs merge=lfs -text
1536
+ 2025/Integrating[[:space:]]Intermediate[[:space:]]Layer[[:space:]]Optimization[[:space:]]and[[:space:]]Projected[[:space:]]Gradient[[:space:]]Descent[[:space:]]for[[:space:]]Solving[[:space:]]Inverse[[:space:]]Problems[[:space:]]with[[:space:]]Diffusion[[:space:]]Models/65a80260-6428-4e66-b86c-71c4cd937174_origin.pdf filter=lfs diff=lfs merge=lfs -text
1537
+ 2025/Integration-free[[:space:]]Kernels[[:space:]]for[[:space:]]Equivariant[[:space:]]Gaussian[[:space:]]Process[[:space:]]Modelling/43129c70-b9b8-4fa3-a3b6-601839102eb5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1538
+ 2025/Interaction-Aware[[:space:]]Gaussian[[:space:]]Weighting[[:space:]]for[[:space:]]Clustered[[:space:]]Federated[[:space:]]Learning/b3fb28ef-3172-4a0e-9fdf-783051f788d7_origin.pdf filter=lfs diff=lfs merge=lfs -text
1539
+ 2025/Interchangeable[[:space:]]Token[[:space:]]Embeddings[[:space:]]for[[:space:]]Extendable[[:space:]]Vocabulary[[:space:]]and[[:space:]]Alpha-Equivalence/256f84fa-1b76-4cb8-bbc7-43d10279a1a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
1540
+ 2025/Internal[[:space:]]Causal[[:space:]]Mechanisms[[:space:]]Robustly[[:space:]]Predict[[:space:]]Language[[:space:]]Model[[:space:]]Out-of-Distribution[[:space:]]Behaviors/880fa7e5-e05a-4803-aa0c-2a1c64739baf_origin.pdf filter=lfs diff=lfs merge=lfs -text
1541
+ 2025/Interpolating[[:space:]]Neural[[:space:]]Network-Tensor[[:space:]]Decomposition[[:space:]](INN-TD)_[[:space:]]a[[:space:]]scalable[[:space:]]and[[:space:]]interpretable[[:space:]]approach[[:space:]]for[[:space:]]large-scale[[:space:]]physics-based[[:space:]]problems/02510ad7-5ccc-4358-b046-08032c4164a2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1542
+ 2025/Interpreting[[:space:]]CLIP[[:space:]]with[[:space:]]Hierarchical[[:space:]]Sparse[[:space:]]Autoencoders/f1899953-6b39-442f-a471-b5d84845ab8f_origin.pdf filter=lfs diff=lfs merge=lfs -text
1543
+ 2025/Interpreting[[:space:]]the[[:space:]]Repeated[[:space:]]Token[[:space:]]Phenomenon[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/2c705f40-1486-416f-9049-fa871fe5dc64_origin.pdf filter=lfs diff=lfs merge=lfs -text
1544
+ 2025/Intersectional[[:space:]]Fairness[[:space:]]in[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Large[[:space:]]State[[:space:]]and[[:space:]]Constraint[[:space:]]Spaces/6be87ba5-7d16-45ff-9394-e4d828020667_origin.pdf filter=lfs diff=lfs merge=lfs -text
1545
+ 2025/Introducing[[:space:]]3D[[:space:]]Representation[[:space:]]for[[:space:]]Dense[[:space:]]Volume-to-Volume[[:space:]]Translation[[:space:]]via[[:space:]]Score[[:space:]]Fusion/095b4e61-da34-417a-b99e-ad80b680942d_origin.pdf filter=lfs diff=lfs merge=lfs -text
1546
+ 2025/Invariance[[:space:]]Makes[[:space:]]LLM[[:space:]]Unlearning[[:space:]]Resilient[[:space:]]Even[[:space:]]to[[:space:]]Unanticipated[[:space:]]Downstream[[:space:]]Fine-Tuning/75e012f3-fe70-4fe0-b7f2-71bf975533a5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1547
+ 2025/Invariant[[:space:]]Deep[[:space:]]Uplift[[:space:]]Modeling[[:space:]]for[[:space:]]Incentive[[:space:]]Assignment[[:space:]]in[[:space:]]Online[[:space:]]Marketing[[:space:]]via[[:space:]]Probability[[:space:]]of[[:space:]]Necessity[[:space:]]and[[:space:]]Sufficiency/3e2073c9-b1f7-4809-984b-4ab5b4d2e20b_origin.pdf filter=lfs diff=lfs merge=lfs -text
1548
+ 2025/Inverse[[:space:]]Bridge[[:space:]]Matching[[:space:]]Distillation/8fccc2fe-f636-4a4c-b17e-a77e25547c51_origin.pdf filter=lfs diff=lfs merge=lfs -text
1549
+ 2025/Inverse[[:space:]]Flow[[:space:]]and[[:space:]]Consistency[[:space:]]Models/634363ed-c5d7-46d1-b571-eebfecf2ee33_origin.pdf filter=lfs diff=lfs merge=lfs -text
1550
+ 2025/Inverse[[:space:]]Optimization[[:space:]]via[[:space:]]Learning[[:space:]]Feasible[[:space:]]Regions/81283382-4770-4200-9d1d-f2e6715cfb9e_origin.pdf filter=lfs diff=lfs merge=lfs -text
1551
+ 2025/Inverse[[:space:]]Problem[[:space:]]Sampling[[:space:]]in[[:space:]]Latent[[:space:]]Space[[:space:]]Using[[:space:]]Sequential[[:space:]]Monte[[:space:]]Carlo/da073e84-0aa3-4852-aa65-36cc7cc5f3d1_origin.pdf filter=lfs diff=lfs merge=lfs -text
1552
+ 2025/Inverse[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Switching[[:space:]]Rewards[[:space:]]and[[:space:]]History[[:space:]]Dependency[[:space:]]for[[:space:]]Characterizing[[:space:]]Animal[[:space:]]Behaviors/f3e42765-15c2-4b4b-9b40-96ecadee9284_origin.pdf filter=lfs diff=lfs merge=lfs -text
1553
+ 2025/Inverse[[:space:]]problems[[:space:]]with[[:space:]]experiment-guided[[:space:]]AlphaFold/cfebc074-6c33-45df-a204-c3a39a84af09_origin.pdf filter=lfs diff=lfs merge=lfs -text
1554
+ 2025/Investigating[[:space:]]Non-Transitivity[[:space:]]in[[:space:]]LLM-as-a-Judge/f4efd4f6-d670-47b3-ba03-f8a764d8f8b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1555
+ 2025/Investigating[[:space:]]the[[:space:]]Overlooked[[:space:]]Hessian[[:space:]]Structure_[[:space:]]From[[:space:]]CNNs[[:space:]]to[[:space:]]LLMs/565f0b97-7d07-4da0-962d-627f300daa80_origin.pdf filter=lfs diff=lfs merge=lfs -text
1556
+ 2025/Is[[:space:]]Best-of-N[[:space:]]the[[:space:]]Best[[:space:]]of[[:space:]]Them_[[:space:]]Coverage,[[:space:]]Scaling,[[:space:]]and[[:space:]]Optimality[[:space:]]in[[:space:]]Inference-Time[[:space:]]Alignment/9bbb5872-9e29-4a86-81fc-62a53cb6a49a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1557
+ 2025/Is[[:space:]]Complex[[:space:]]Query[[:space:]]Answering[[:space:]]Really[[:space:]]Complex_/275b03ab-970e-4004-8d4c-0f4be286d555_origin.pdf filter=lfs diff=lfs merge=lfs -text
1558
+ 2025/Is[[:space:]]Noise[[:space:]]Conditioning[[:space:]]Necessary[[:space:]]for[[:space:]]Denoising[[:space:]]Generative[[:space:]]Models_/1cf5f2d3-a5d6-479f-a12a-50516f8fd77a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1559
+ 2025/Is[[:space:]]Your[[:space:]]Model[[:space:]]Fairly[[:space:]]Certain_[[:space:]]Uncertainty-Aware[[:space:]]Fairness[[:space:]]Evaluation[[:space:]]for[[:space:]]LLMs/4a7be3e8-cf2a-4422-aa34-6cc6888da538_origin.pdf filter=lfs diff=lfs merge=lfs -text
1560
+ 2025/Isolated[[:space:]]Causal[[:space:]]Effects[[:space:]]of[[:space:]]Natural[[:space:]]Language/58134660-d80b-4b23-becc-cfd499f070b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1561
+ 2025/Iterative[[:space:]]Vectors_[[:space:]]In-Context[[:space:]]Gradient[[:space:]]Steering[[:space:]]without[[:space:]]Backpropagation/f872fc87-c2d6-4bef-bf03-2de862993113_origin.pdf filter=lfs diff=lfs merge=lfs -text
1562
+ 2025/It’s[[:space:]]My[[:space:]]Data[[:space:]]Too_[[:space:]]Private[[:space:]]ML[[:space:]]for[[:space:]]Datasets[[:space:]]with[[:space:]]Multi-User[[:space:]]Training[[:space:]]Examples/411ad622-90cc-43d4-aa57-4cc81e44ec2d_origin.pdf filter=lfs diff=lfs merge=lfs -text
1563
+ 2025/Jacobian[[:space:]]Sparse[[:space:]]Autoencoders_[[:space:]]Sparsify[[:space:]]Computations,[[:space:]]Not[[:space:]]Just[[:space:]]Activations/4c4617aa-f85e-4156-837b-335230c845c9_origin.pdf filter=lfs diff=lfs merge=lfs -text
1564
+ 2025/Janus_[[:space:]]Dual-Server[[:space:]]Multi-Round[[:space:]]Secure[[:space:]]Aggregation[[:space:]]with[[:space:]]Verifiability[[:space:]]for[[:space:]]Federated[[:space:]]Learning/9b69a8d3-c4cf-4003-808e-82b9491cc029_origin.pdf filter=lfs diff=lfs merge=lfs -text
1565
+ 2025/Joint[[:space:]]Learning[[:space:]]of[[:space:]]Energy-based[[:space:]]Models[[:space:]]and[[:space:]]their[[:space:]]Partition[[:space:]]Function/630d811f-5078-4cd6-b9c5-607a1df92566_origin.pdf filter=lfs diff=lfs merge=lfs -text
1566
+ 2025/Joint[[:space:]]Localization[[:space:]]and[[:space:]]Activation[[:space:]]Editing[[:space:]]for[[:space:]]Low-Resource[[:space:]]Fine-Tuning/f3492afb-088d-408a-9e03-aa5e483ccd04_origin.pdf filter=lfs diff=lfs merge=lfs -text
1567
+ 2025/Joint[[:space:]]Metric[[:space:]]Space[[:space:]]Embedding[[:space:]]by[[:space:]]Unbalanced[[:space:]]Optimal[[:space:]]Transport[[:space:]]with[[:space:]]Gromov–Wasserstein[[:space:]]Marginal[[:space:]]Penalization/1f19bde0-bcdc-4622-b117-16e00a58b1b3_origin.pdf filter=lfs diff=lfs merge=lfs -text
1568
+ 2025/Joint[[:space:]]MoE[[:space:]]Scaling[[:space:]]Laws_[[:space:]]Mixture[[:space:]]of[[:space:]]Experts[[:space:]]Can[[:space:]]Be[[:space:]]Memory[[:space:]]Efficient/98925fda-b590-4fa3-aa00-b5812a53fe91_origin.pdf filter=lfs diff=lfs merge=lfs -text
1569
+ 2025/Joker_[[:space:]]Joint[[:space:]]Optimization[[:space:]]Framework[[:space:]]for[[:space:]]Lightweight[[:space:]]Kernel[[:space:]]Machines/09c61f52-2402-42eb-a390-89f7a0c3c98a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1570
+ 2025/Just[[:space:]]Enough[[:space:]]Shifts_[[:space:]]Mitigating[[:space:]]Over-Refusal[[:space:]]in[[:space:]]Aligned[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Targeted[[:space:]]Representation[[:space:]]Fine-Tuning/9f540215-fd99-4277-a72d-402a98ce72ba_origin.pdf filter=lfs diff=lfs merge=lfs -text
1571
+ 2025/K$^2$IE_[[:space:]]Kernel[[:space:]]Method-based[[:space:]]Kernel[[:space:]]Intensity[[:space:]]Estimators[[:space:]]for[[:space:]]Inhomogeneous[[:space:]]Poisson[[:space:]]Processes/a75fec03-e364-4447-a793-81271a2f87c3_origin.pdf filter=lfs diff=lfs merge=lfs -text
1572
+ 2025/KABB_[[:space:]]Knowledge-Aware[[:space:]]Bayesian[[:space:]]Bandits[[:space:]]for[[:space:]]Dynamic[[:space:]]Expert[[:space:]]Coordination[[:space:]]in[[:space:]]Multi-Agent[[:space:]]Systems/7e05c1cc-2b17-4625-9ed5-57fcae72d089_origin.pdf filter=lfs diff=lfs merge=lfs -text
1573
+ 2025/KAN-AD_[[:space:]]Time[[:space:]]Series[[:space:]]Anomaly[[:space:]]Detection[[:space:]]with[[:space:]]Kolmogorov–Arnold[[:space:]]Networks/d6c8cbe7-d1dd-4564-bdf0-0f44a6208667_origin.pdf filter=lfs diff=lfs merge=lfs -text
1574
+ 2025/KBQA-o1_[[:space:]]Agentic[[:space:]]Knowledge[[:space:]]Base[[:space:]]Question[[:space:]]Answering[[:space:]]with[[:space:]]Monte[[:space:]]Carlo[[:space:]]Tree[[:space:]]Search/ca9384d6-4272-40af-945d-235799585137_origin.pdf filter=lfs diff=lfs merge=lfs -text
1575
+ 2025/KEA_[[:space:]]Keeping[[:space:]]Exploration[[:space:]]Alive[[:space:]]by[[:space:]]Proactively[[:space:]]Coordinating[[:space:]]Exploration[[:space:]]Strategies/0bb695b8-8452-4706-bf7a-ed3c4348edcf_origin.pdf filter=lfs diff=lfs merge=lfs -text
1576
+ 2025/KGMark_[[:space:]]A[[:space:]]Diffusion[[:space:]]Watermark[[:space:]]for[[:space:]]Knowledge[[:space:]]Graphs/af3ff221-ba66-4bc1-9a57-2d22c98b61dc_origin.pdf filter=lfs diff=lfs merge=lfs -text
1577
+ 2025/KIND_[[:space:]]Knowledge[[:space:]]Integration[[:space:]]and[[:space:]]Diversion[[:space:]]for[[:space:]]Training[[:space:]]Decomposable[[:space:]]Models/c5f70d2d-3131-4f90-9c90-20f26011ac04_origin.pdf filter=lfs diff=lfs merge=lfs -text
1578
+ 2025/KV[[:space:]]Shifting[[:space:]]Attention[[:space:]]Enhances[[:space:]]Language[[:space:]]Modeling/cc4e4412-c350-4849-9c00-8e5dea8850bc_origin.pdf filter=lfs diff=lfs merge=lfs -text
1579
+ 2025/KVTuner_[[:space:]]Sensitivity-Aware[[:space:]]Layer-Wise[[:space:]]Mixed-Precision[[:space:]]KV[[:space:]]Cache[[:space:]]Quantization[[:space:]]for[[:space:]]Efficient[[:space:]]and[[:space:]]Nearly[[:space:]]Lossless[[:space:]]LLM[[:space:]]Inference/0d0c4af8-6da1-4424-951c-3b0d5a3144f2_origin.pdf filter=lfs diff=lfs merge=lfs -text
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/fa7dbe15-021a-4349-b65f-ddfe12faaf6d_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abf67b4e197ee42720761779c8962bf32460dd2a6101ecf39f7287d4f009724f
3
+ size 1775210
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/full.md ADDED
@@ -0,0 +1,561 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Incorporating Arbitrary Matrix Group Equivariance into KANs
2
+
3
+ Lexiang Hu<sup>1</sup> Yisen Wang<sup>12</sup> Zhouchen Lin<sup>123</sup>
4
+
5
+ # Abstract
6
+
7
+ Kolmogorov-Arnold Networks (KANs) have seen great success in scientific domains thanks to spline activation functions, becoming an alternative to Multi-Layer Perceptrons (MLPs). However, spline functions may not respect symmetry in tasks, which is crucial prior knowledge in machine learning. In this paper, we propose Equivariant Kolmogorov-Arnold Networks (EKAN), a method for incorporating arbitrary matrix group equivariance into KANs, aiming to broaden their applicability to more fields. We first construct gated spline basis functions, which form the EKAN layer together with equivariant linear weights, and then define a lift layer to align the input space of EKAN with the feature space of the dataset, thereby building the entire EKAN architecture. Compared with baseline models, EKAN achieves higher accuracy with smaller datasets or fewer parameters on symmetry-related tasks, such as particle scattering and the three-body problem, often reducing test MSE by several orders of magnitude. Even in non-symbolic formula scenarios, such as top quark tagging with three jet constituents, EKAN achieves comparable results with state-of-the-art equivariant architectures using fewer than $40\%$ of the parameters, while KANs do not outperform MLPs as expected. Code and data are available at https://github.com/hulx2002/EKAN.
8
+
9
+ # 1. Introduction
10
+
11
+ Kolmogorov-Arnold Networks (KANs) (Liu et al., 2024b;a) are a novel type of neural network inspired by the Kolmogorov-Arnold representation theorem (Tikhomirov,
12
+
13
+ $^{1}$ State Key Lab of General AI, School of Intelligence Science and Technology, Peking University $^{2}$ Institute for Artificial Intelligence, Peking University $^{3}$ Pazhou Laboratory (Huangpu), Guangzhou, Guangdong, China. Correspondence to: Zhouchen Lin <zlin@pku.edu.cn>.
14
+
15
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
16
+
17
+ 1991; Braun & Griebel, 2009), which offers an alternative to Multi-Layer Perceptrons (MLPs) (Haykin, 1998; Cybenko, 1989; Hornik et al., 1989). Unlike MLPs, which utilize fixed activation functions on nodes, KANs employ learnable activation functions on edges, replacing the linear weight parameters entirely with univariate functions parameterized as splines (De Boor, 1978). On the other hand, each layer of KANs can be viewed as spline basis functions followed by a linear layer (Dhiman, 2024). This architecture allows KANs to achieve better accuracy in symbolic formula representation tasks compared with MLPs, particularly in function fitting and scientific applications. Subsequent works based on KANs have demonstrated superior performance in other areas, such as sequential data (Vaca-Rubio et al., 2024; Genet & Inzirillo, 2024b;a; Xu et al., 2024), graph data (Bresson et al., 2024; De Carlo et al., 2024; Kiamari et al., 2024; Zhang & Zhang, 2024), image data (Cheon, 2024b;a; Azam & Akhtar, 2024; Li et al., 2024a; Seydi, 2024; Bodner et al., 2024), and so on.
18
+
19
+ However, KANs themselves perform poorly on nonsymbolic formula representation tasks (Yu et al., 2024). One reason for this is that splines struggle to respect data type and symmetry, both of which play important roles in machine learning. Many recent works utilize symmetry in data to design network architectures, achieving better efficiency and generalization on specific tasks. For example, Convolutional Neural Networks (CNNs) (LeCun et al., 1989) and Group equivariant Convolutional Neural Networks (GCNNs) (Cohen & Welling, 2016) leverage translational and rotational symmetries in image data, while DeepSets (Zaheer et al., 2017) and equivariant graph networks (Maron et al., 2019; Keriven & Peyre, 2019; Satorras et al., 2021) exploit the permutation symmetry in set and graph data. Equivariant Multi-Layer Perceptrons (EMLP) (Finzi et al., 2021) propose a general method that allows MLPs to be equivariant with respect to arbitrary matrix groups for specific data types, thereby unifying the aforementioned specialized network architectures.
20
+
21
+ Inspired by these equivariant architectures, we propose Equivariant Kolmogorov-Arnold Networks (EKAN), which embed matrix group equivariance into KANs. By specifying the data type and symmetry, EKAN can serve as a general framework for applying KANs to various areas. In Section 2, we introduce the preliminary knowledge of group theory. In
22
+
23
+ Section 3, we summarize related works. In Section 4, we construct a layer of EKAN. We add gate scalars to the input and output space of each layer, and define gated spline basis functions between the input and post-activation space. To ensure equivariance when linearly combining gated basis functions, we construct the equivariant constraint and solve for the equivariant linear weights. In Section 5, we build the entire EKAN architecture. We insert a lift layer before the first layer and discard the gate scalars from the output of the final layer, so that the input and output space of EKAN can be consistent with the original dataset. In Section 6, we evaluate EKAN on tasks with known symmetries. We show that EKAN can achieve higher accuracy than baseline models with smaller datasets or fewer parameters. In Section 7, we conclude this work. In Figure 1, we compare the architectures of KANs and EKAN.
24
+
25
+ ![](images/b7625b13d4f1b71cb36ab9f0abd63aacf06197a07aa0a82afcdede649e840277.jpg)
26
+ Figure 1. Comparison of the architectures of Kolmogorov-Arnold Networks (KANs) and Equivariant Kolmogorov-Arnold Networks (EKAN).
27
+
28
+ In summary, our contributions are as follows: (1) We propose EKAN, an architecture that makes KANs equivariant to matrix groups. To our knowledge, EKAN is the first attempt to combine equivariance with KANs, and we expect that it can serve as a general framework to broaden the applicability of KANs to more areas. (2) We specify the space structures of the EKAN Layer and define gated spline basis functions. We theoretically prove that gated basis functions can ensure equivariance between the gated input space and the post-activation space. Then, we insert a lift layer to preprocess the raw input feature, which aligns the input space of EKAN with the feature space of the dataset. (3) Experiments on tasks with matrix group equivariance, such as particle scattering and the three-body problem, demonstrate that EKAN often significantly outperforms baseline models, even with smaller datasets or fewer parameters. In the task of non-symbolic formula representation, where KANs are not proficient, such as top quark tagging with three jet constituents, EKAN can still achieve comparable results with state-of-the-art equivariant architectures while using fewer than $40\%$ of the parameters.
29
+
30
+ # 2. Background
31
+
32
+ Before presenting related works and our method, we first introduce some preliminary knowledge of group theory.
33
+
34
+ Groups and generators. The matrix group $\widetilde{G}$ is a subgroup of the general linear group $\operatorname{GL}(n)$ , which consists of $n \times n$ invertible matrices. Each group element $g \in \widetilde{G}$ can be decomposed into a continuous and a finite component $g = g_1 g_2$ . We can obtain the continuous component $g_1$ from a Lie algebra element $A \in \mathfrak{g}$ through the exponential map $\exp: \mathfrak{g} \to \widetilde{G}$ , i.e., $g_1 = \exp(A) = \sum_{k=0}^{\infty} \frac{A^k}{k!}$ . Representing the space where the Lie algebra resides as a basis $\{A_i\}_{i=1}^D$ , we have $g_1 = \exp\left(\sum_{i=1}^D \alpha_i A_i\right)$ . On the other hand, the finite component $g_2$ can be generated by a set of group elements $\{h_i\}_{i=1}^M$ and their inverses $h_{-k} = h_k^{-1}$ , formally speaking $g_2 = \prod_{i=1}^N h_{k_i}$ . Overall, we can express the matrix group element as:
35
+
36
+ $$
37
+ g = \exp \left(\sum_ {i = 1} ^ {D} \alpha_ {i} A _ {i}\right) \prod_ {i = 1} ^ {N} h _ {k _ {i}}, \tag {1}
38
+ $$
39
+
40
+ where $\{A_i\}_{i=1}^D$ are called infinitesimal generators and $\{h_i\}_{i=1}^M$ are called discrete generators. We introduce common matrix groups and their generators in Appendix A.
41
+
42
+ Group representations. The group representation $\rho_V: \widetilde{G} \to \mathrm{GL}(m)$ maps group elements to $m \times m$ invertible matrices, which describes how group elements act on the vector space $V = \mathbb{R}^m$ through linear transformations. For $g_1, g_2 \in \widetilde{G}$ it satisfies $\rho_V(g_1g_2) = \rho_V(g_1)\rho_V(g_2)$ . Similarly, the Lie algebra representation is defined as $\mathrm{d}\rho_V: \mathfrak{g} \to \mathfrak{gl}(m)$ , and for $A_1, A_2 \in \mathfrak{g}$ , we have $\mathrm{d}\rho_V(A_1 + A_2) = \mathrm{d}\rho_V(A_1) + \mathrm{d}\rho_V(A_2)$ . We can relate the Lie group representation to the Lie algebra representation through the exponential map. Specifically, for $A \in \mathfrak{g}$ , $\rho_V(\exp(A)) = \exp(\mathrm{d}\rho_V(A))$ holds. Then, combining with Equation (1), the matrix group representation can be written as:
43
+
44
+ $$
45
+ \rho_ {V} (g) = \exp \left(\sum_ {i = 1} ^ {D} \alpha_ {i} \mathrm {d} \rho_ {V} \left(A _ {i}\right)\right) \prod_ {i = 1} ^ {N} \rho_ {V} \left(h _ {k _ {i}}\right). \tag {2}
46
+ $$
47
+
48
+ We can construct the complex vector space from the base vector space using the dual $(\ast)$ , direct sum $(\oplus)$ , and tensor product $(\otimes)$ operations. To give a concrete example, let $V_{1}$ and $V_{2}$ be base vector spaces. The multi-channel vector space, matrix space and parameter space of the linear mapping $V_{1} \to V_{2}$ can be represented as $V_{1} \oplus V_{2}, V_{1} \otimes V_{2}$ , and $V_{2} \otimes V_{1}^{*}$ , respectively. In general, given a matrix group $\widetilde{G}$ , we can normalize a vector space $U$ into a polynomial-like form with respect to the base vector space $V$ of $\widetilde{G}$ (the space where the group representation is the identity mapping $\rho_V(g) = g$ ; intuitively, the transformation matrix is
49
+
50
+ the matrix group element itself):
51
+
52
+ $$
53
+ U = \bigoplus_ {a = 1} ^ {A} T \left(p _ {a}, q _ {a}\right) = \bigoplus_ {a = 1} ^ {A} V ^ {p _ {a}} \otimes \left(V ^ {*}\right) ^ {q _ {a}}, \tag {3}
54
+ $$
55
+
56
+ where $V^{p_a} = \underbrace{V\otimes V\otimes\cdots\otimes V}_{p_a}$ and $(V^{*})^{q_{a}} =$
57
+
58
+ $\underbrace{V^{*}\otimes V^{*}\otimes\cdots\otimes V^{*}}_{q_a}$ Its group representation and Lie alge
59
+
60
+ bra representation can be generated by the following rules:
61
+
62
+ $$
63
+ \left\{ \begin{array}{l} \rho_ {V ^ {*}} (g) = \rho_ {V} \left(g ^ {- 1}\right) ^ {\top}, \\ \rho_ {V _ {1} \oplus V _ {2}} (g) = \rho_ {V _ {1}} (g) \oplus \rho_ {V _ {2}} (g), \\ \rho_ {V _ {1} \otimes V _ {2}} (g) = \rho_ {V _ {1}} (g) \otimes \rho_ {V _ {2}} (g), \\ \mathrm {d} \rho_ {V ^ {*}} (A) = - \mathrm {d} \rho_ {V} (A) ^ {\top}, \\ \mathrm {d} \rho_ {V _ {1} \oplus V _ {2}} (A) = \mathrm {d} \rho_ {V _ {1}} (A) \oplus \mathrm {d} \rho_ {V _ {2}} (A), \\ \mathrm {d} \rho_ {V _ {1} \otimes V _ {2}} (A) = \mathrm {d} \rho_ {V _ {1}} (A) \boxplus \mathrm {d} \rho_ {V _ {2}} (A), \end{array} \right. \tag {4}
64
+ $$
65
+
66
+ where $\oplus$ is the direct sum, $\otimes$ is the Kronecker product, and $\boxplus$ is the Kronecker sum. We provide concrete examples of the space structure in Appendix B to help readers understand it intuitively.
67
+
68
+ Equivariance and invariance. The symmetry can be divided into equivariance and invariance, meaning that when a transformation is applied to the input space, the output space either transforms in the same way or remains unchanged. Formally, given a group $\widetilde{G}$ , a function $f: U_i \to U_o$ is equivariant if:
69
+
70
+ $$
71
+ \forall g \in \widetilde {G}, v _ {i} \in U _ {i}: \quad \rho_ {o} (g) f (v _ {i}) = f \left(\rho_ {i} (g) v _ {i}\right), \tag {5}
72
+ $$
73
+
74
+ where $\rho_{i}$ and $\rho_{o}$ are group representations of $U_{i}$ and $U_{o}$ , respectively. Specifically, when $\rho_{o}(g) = I$ , the function $f$ is invariant.
75
+
76
+ # 3. Related Works
77
+
78
+ Equivariant networks. Equivariant networks have gained significant attention in recent years due to their ability to respect and leverage symmetries in data. GCNNs (Cohen & Welling, 2016) embed discrete group equivariance into traditional CNNs through group convolutions. Steerable CNNs (Cohen & Welling, 2017) introduce steerable filters, which provide a more flexible and efficient way to achieve equivariance compared with GCNNs. Subsequently, SFCNNs (Weiler et al., 2018b) and E(2)-equivariant steerable CNNs (Weiler & Cesa, 2019) extend GCNNs and steerable CNNs to continuous group equivariance, while 3D Steerable CNNs (Weiler et al., 2018a) extend these models to 3D volumetric data. On the other hand, some works use partial differential operators (PDOs) to construct equivariant networks (Shen et al., 2020; 2021; 2022; He et al., 2022; Li et al., 2024b; 2025). Furthermore, equivariant self-supervised learning
79
+
80
+ (Wang et al., 2020; Dangovski et al., 2022; Lee et al., 2022; Garrido et al., 2023; Gupta et al., 2024) has also achieved outstanding results. Based on these theoretical frameworks, equivariant networks are widely applied in various fields, such as mathematics (Zhao et al., 2023), physics (Wang et al., 2021; Hu et al., 2025), biochemistry (Bekkers et al., 2018; Winkels & Cohen, 2019; Graham et al., 2020), and others. EMLP (Finzi et al., 2021) embeds matrix group equivariance into MLPs layerwise, which we discuss in detail in Appendix C.
81
+
82
+ Kolmogorov-Arnold Networks (KANs). KANs (Liu et al., 2024b;a) place learnable activation functions on the edges and then sum them to obtain the output nodes, replacing the fixed activation functions applied to the output nodes of linear layers in MLPs. Formally, the $l$ -th KAN layer can be expressed as:
83
+
84
+ $$
85
+ x _ {l + 1, j} = \sum_ {i = 1} ^ {n _ {l}} \phi_ {l, j, i} \left(x _ {l, i}\right), \quad j = 1, \dots , n _ {l + 1}, \tag {6}
86
+ $$
87
+
88
+ where $n_l$ is the number of nodes in the $l$ -th layer, $x_{l,i}$ is the value of the $i$ -th node in the $l$ -th layer, and $\phi_{l,j,i}$ is the activation function that connects $x_{l,i}$ to $x_{l+1,j}$ . In practice, $\phi_{l,j,i}$ consists of a spline function and a silu function. The spline basis functions are determined by grids, which are updated based on the input samples. Then we can write the post-activation of $\phi_{l,j,i}$ as $\phi_{l,j,i}(x_{l,i}) = \sum_{b=0}^{G+k-1} w_{l,j,i,b} B_{l,i,b}(x_{l,i}) + w_{l,j,i,G+k} \mathrm{silu}(x_{l,i})$ , where $G, k,$ and $B_{l,i,b}$ represent the number of grid intervals, the order, and the $b$ -th basis function of splines at node $x_{l,j}$ , respectively. Therefore, the KAN layer can be viewed as spline basis functions $B_{l,i,b}$ and a silu function, followed by a linear layer with $w_{l,j,i,b}$ as parameters (Dhiman, 2024):
89
+
90
+ $$
91
+ \begin{array}{l} x _ {l + 1, j} = \sum_ {i = 1} ^ {n _ {l}} \left[ \sum_ {b = 0} ^ {G + k - 1} w _ {l, j, i, b} B _ {l, i, b} \left(x _ {l, i}\right) \right. \\ \left. + w _ {l, j, i, G + k} \operatorname {s i l u} \left(x _ {l, i}\right) \right], \quad j = 1, \dots , n _ {l + 1}. \tag {7} \\ \end{array}
92
+ $$
93
+
94
+ # 4. EKAN Layer
95
+
96
+ In this section, we construct the EKAN layer, which is equivariant with respect to the matrix group $\widetilde{G}$ . First, we define the space structures and explain their relationships. Then, we introduce gated basis functions and equivariant linear weights, which together form a layer of EKAN. We summarize the space structures and network architecture of the EKAN layer in Figure 2.
97
+
98
+ # 4.1. Space Structures
99
+
100
+ A key aspect of equivariant networks is how group elements act on the feature space. Therefore, unlike conventional
101
+
102
+ ![](images/018a5f6c73ee6d203936d5d5a48e06d0cc5877da2fb1359c1df226a3cd32b3cf.jpg)
103
+ Figure 2. (Left) The space structures of the EKAN layer and their relationships. (Right) The architecture of the EKAN layer, which consists of gated basis functions and equivariant linear weights.
104
+
105
+ networks, which only focus on the dimensions of the feature space, equivariant networks need to further clarify the structure of the feature space. For example, for the group SO(2), two feature spaces $U_{1} = V \oplus V = \mathbb{R}^{2} \oplus \mathbb{R}^{2}$ and $U_{2} = V \otimes V = \mathbb{R}^{2} \otimes \mathbb{R}^{2}$ have different group representations $\rho_{U_1}$ and $\rho_{U_2}$ , but conventional networks treat them as the same space $U = \mathbb{R}^4$ .
106
+
107
+ We specify the input space and the output space of EKAN layer as $U_{i}$ and $U_{o}$ , respectively. Their structures can be normalized into the form of Equation (3). In particular, for ease of later discussion, we extract the scalar space terms $T_{0} = T(0,0)$ and rewrite them as:
108
+
109
+ $$
110
+ \left\{ \begin{array}{l} U _ {i} = c _ {i} T _ {0} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} T \left(p _ {i, a}, q _ {i, a}\right) \right], \\ U _ {o} = c _ {o} T _ {0} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {o}} T \left(p _ {o, a}, q _ {o, a}\right) \right], \end{array} \right. \tag {8}
111
+ $$
112
+
113
+ where $p_{i,a}, q_{i,a}, p_{o,a}, q_{o,a}, c_i, c_o, A_i, A_o \in \mathbb{N}, p_{i,a} + q_{i,a} > 0, p_{o,a} + q_{o,a} > 0$ , and $cT_0 = \underbrace{T_0 \oplus T_0 \oplus \cdots \oplus T_0}_{c}$ .
114
+
115
+ We have to emphasize that the actual input/output feature does not lie within $U_{i} / U_{o}$ . To align with gated basis functions, we add a gate scalar $T_{0}$ to each non-scalar term $T(p_{i,a},q_{i,a}) / T(p_{o,a},q_{o,a})$ in $U_{i} / U_{o}$ to obtain the actual input/output space. The mechanism behind this approach will be discussed in detail in Section 4.2. We denote this actual input/output space as the gated input/output space $U_{gi} / U_{go}$ :
116
+
117
+ $$
118
+ \left\{ \begin{array}{l} U _ {g i} = c _ {i} T _ {0} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} T \left(p _ {i, a}, q _ {i, a}\right) \right] \oplus A _ {i} T _ {0}, \\ U _ {g o} = c _ {o} T _ {0} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {o}} T \left(p _ {o, a}, q _ {o, a}\right) \right] \oplus A _ {o} T _ {0}. \end{array} \right. \tag {9}
119
+ $$
120
+
121
+ As shown in Equation (7), we split the KAN layer into basis functions and linear weights. From this perspective, we correspondingly construct gated basis functions and equivariant linear weights to form the EKAN layer. We refer to the space where the activation values reside after gated basis functions and before equivariant linear weights as the post-activation space $U_{m}$ . The structure of $U_{m}$ depends on $U_{i}$ , which we will elaborate on in Section 4.2.
122
+
123
+ We summarize the aforementioned space structures and their relationships in Figure 2 (Left). The user first specifies the input space $U_{i}$ and the output space $U_{o}$ for the EKAN layer. Then the gated input space $U_{gi}$ and the post-activation space $U_{m}$ are calculated based on $U_{i}$ , and the gated output space $U_{go}$ is calculated based on $U_{o}$ . The actual input feature in $U_{gi}$ passes through gated basis functions to obtain the activation value in $U_{m}$ , which then passes through equivariant linear weights to obtain the actual output feature in $U_{go}$ .
124
+
125
+ # 4.2. Gated Basis Functions
126
+
127
+ Since spline basis functions are nonlinear and have relatively complex iterative forms, directly solving the equivariance constraint in Equation (5) is quite challenging. Recently, gating mechanisms have been widely used in various areas, not only in language models to improve performance (Dauphin et al., 2017; Shazeer, 2020; Gu & Dao, 2023) but also in the design of equivariant networks (Weiler et al., 2018a; Finzi et al., 2021). Inspired by this, we propose gated basis functions to make the basis functions in KANs (spline basis functions and the silu function) equivariant. Suppose that the input feature $v_{gi} \in U_{gi}$ can be decomposed according to the space structure shown in Equation (9):
128
+
129
+ $$
130
+ v _ {g i} = \left(\bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a}\right) \oplus \left(\bigoplus_ {a = 1} ^ {A _ {i}} v _ {i, a}\right) \oplus \left(\bigoplus_ {a = 1} ^ {A _ {i}} s _ {i, a} ^ {\prime}\right), \tag {10}
131
+ $$
132
+
133
+ where $s_{i,a}, s_{i,a}' \in T_0$ and $v_{i,a} \in T(p_{i,a}, q_{i,a})$ . For the non-scalar term $v_{i,a}$ , we apply the basis functions to the corresponding gate scalar $s_{i,a}'$ and then multiply the result by $v_{i,a}$ . For the scalar term $s_{i,a}$ , we consider it as its own gate scalar, which is equivalent to applying basis functions element-wise to $s_{i,a}$ . Formalizing the above content, the post-activation value $v_m \in U_m$ can be written as:
134
+
135
+ $$
136
+ v _ {m} = \bigoplus_ {b = 0} ^ {G + k} v _ {m, b}, \tag {11}
137
+ $$
138
+
139
+ where
140
+
141
+ $$
142
+ v _ {m, b} = \left\{ \begin{array}{c} {\left[ \bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a} B _ {b} \left(s _ {i, a}\right) \right] \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} v _ {i, a} B _ {b} \left(s _ {i, a} ^ {\prime}\right) \right],} \\ b < G + k, \\ {\left[ \bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a} \mathrm {s i l u} \left(s _ {i, a}\right) \right] \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} v _ {i, a} \mathrm {s i l u} \left(s _ {i, a} ^ {\prime}\right) \right],} \\ b = G + k. \end{array} \right. \tag {12}
143
+ $$
144
+
145
+ Note that $v_{m,b} \in c_i T_0 \oplus \left[ \bigoplus_{a=1}^{A_i} T(p_{i,a}, q_{i,a}) \right] = U_i$ . Therefore, we obtain the structure of the post-activation space $U_m$ :
146
+
147
+ $$
148
+ U _ {m} = (G + k + 1) U _ {i}. \tag {13}
149
+ $$
150
+
151
+ The following theorem guarantees the equivariance between the gated input space and the post-activation space (see Appendix D for proof).
152
+
153
+ Theorem 4.1. Given a matrix group $\widetilde{G}$ , the gated input space $U_{gi}$ and the post-activation space $U_{m}$ can be expressed in the forms of Equations (9) and (13), respectively. The function $f: U_{gi} \to U_{m}$ is defined by Equations (10) to (12), that is, $v_{m} = f(v_{gi})$ . Then, $f$ is equivariant:
154
+
155
+ $$
156
+ \forall g \in \widetilde {G}, v _ {g i} \in U _ {g i}: \quad \rho_ {m} (g) f \left(v _ {g i}\right) = f \left(\rho_ {g i} (g) v _ {g i}\right), \tag {14}
157
+ $$
158
+
159
+ where $\rho_{gi}$ and $\rho_{m}$ are group representations of $U_{gi}$ and $U_{m}$ , respectively.
160
+
161
+ # 4.3. Equivariant Linear Weights
162
+
163
+ The output feature $v_{go} \in U_{go}$ is obtained by a linear combination of the post-activation value $v_{m} \in U_{m}$ . Let $U_{i} = \mathbb{R}^{d_{i}}$ and $U_{go} = \mathbb{R}^{d_{go}}$ , then Equation (13) indicates that $U_{m} = \mathbb{R}^{(G + k + 1)d_{i}}$ . The linear weight matrix $W \in \mathbb{R}^{d_{go} \times (G + k + 1)d_{i}}$ can be partitioned as $W = [W_{0}W_{1}\dots W_{G + k}]$ , where $W_{b} \in \mathbb{R}^{d_{go} \times d_{i}}$ . Combining with Equation (11), we have:
164
+
165
+ $$
166
+ v _ {g o} = W v _ {m} = \sum_ {b = 0} ^ {G + k} W _ {b} v _ {m, b}. \tag {15}
167
+ $$
168
+
169
+ To ensure the equivariance between the post-activation space and the gated output space, we obtain:
170
+
171
+ $$
172
+ \forall g \in \widetilde {G}, v _ {m} \in U _ {m}: \quad \rho_ {g o} (g) W v _ {m} = W \rho_ {m} (g) v _ {m}, \tag {16}
173
+ $$
174
+
175
+ where $\rho_{go}$ is the group representation of $U_{go}$ . Using the structure of $U_{m}$ shown in Equation (13) and applying the rules from Equation (4), we can derive that $\rho_{m}(g) = \bigoplus_{b=0}^{G+k} \rho_{i}(g)$ , where $\rho_{i}$ is the group representation of $U_{i}$ . Therefore, from Equation (11), we have $\rho_{m}(g)v_{m} = \bigoplus_{b=0}^{G+k} \rho_{i}(g)v_{m,b}$ . Then Equation (16) can be written as:
176
+
177
+ $$
178
+ \begin{array}{l} \forall g \in \widetilde {G}, \{v _ {m, b} \} _ {b = 0} ^ {G + k} \in U _ {i}: \\ \sum_ {b = 0} ^ {G + k} \rho_ {g o} (g) W _ {b} v _ {m, b} = \sum_ {b = 0} ^ {G + k} W _ {b} \rho_ {i} (g) v _ {m, b}. \tag {17} \\ \end{array}
179
+ $$
180
+
181
+ The coefficients of each term in $\{v_{m,b}\}_{b = 0}^{G + k}$ are equal:
182
+
183
+ $$
184
+ \forall g \in \widetilde {G}, b \in \{0, 1, \dots , G + k \}: \quad \rho_ {g o} (g) W _ {b} = W _ {b} \rho_ {i} (g). \tag {18}
185
+ $$
186
+
187
+ Flattening the linear weight blocks $\{W_{b}\}_{b = 0}^{G + k}$ into vectors, we obtain:
188
+
189
+ $$
190
+ \forall g \in \widetilde {G}, b \in \{0, 1, \dots , G + k \}:
191
+ $$
192
+
193
+ $$
194
+ \rho_ {g o, i} (g) \operatorname {v e c} \left(W _ {b}\right) = \operatorname {v e c} \left(W _ {b}\right), \tag {19}
195
+ $$
196
+
197
+ where $\rho_{go,i} = \rho_{go}\otimes \rho_i^*$ is the group representation of $U_{go}\otimes U_i^*$ . We use the same method as EMLP (Finzi et al., 2021) to solve for the equivariant basis $Q$ and equivariant projector $P = QQ^{\top}$ of $\operatorname{vec}(W_b)$ . Similar to the transition from Equation (27) to Equation (28) (in Appendix C), we decompose the group representation $\rho_{go,i}(g)$ into discrete and infinitesimal generators to obtain the following constraint:
198
+
199
+ $$
200
+ \forall b \in \{0, 1, \dots , G + k \}:
201
+ $$
202
+
203
+ $$
204
+ C \operatorname {v e c} \left(W _ {b}\right) = \left[ \begin{array}{c} \mathrm {d} \rho_ {g o, i} \left(A _ {1}\right) \\ \vdots \\ \mathrm {d} \rho_ {g o, i} \left(A _ {D}\right) \\ \rho_ {g o, i} \left(h _ {1}\right) - I \\ \vdots \\ \rho_ {g o, i} \left(h _ {M}\right) - I \end{array} \right] \operatorname {v e c} \left(W _ {b}\right) = 0. \tag {20}
205
+ $$
206
+
207
+ Note that the equivariant linear weight blocks $\{W_b\}_{b=0}^{G+k}$ lie in the same subspace, which corresponds to the nullspace of the coefficient matrix $C$ . We can obtain it via SVD.
208
+
209
+ We summarize the architecture of the EKAN layer in Figure 2 (Right). In this example, the EKAN layer is equivariant with respect to a 2-dimensional matrix group $\widetilde{G}$ (such as the SO(2) group). The user specifies the input space $U_{i} = T_{0} \oplus T_{1}$ (where we abbreviate $T(p,0) = V^{p}$ as $T_{p}$ ), which represents a scalar space and a vector space, and specifies the output space $U_{o} = T_{2}$ , which represents a matrix space. Then, the gated input space $U_{gi} = T_{0} \oplus T_{1} \oplus T_{0}$ and the gated output space $U_{go} = T_{2} \oplus T_{0}$ each add a gate scalar to the vector space $T_{1}$ and the matrix space $T_{2}$ . The basis functions are applied to the gate scalars of $T_{0}$ (itself) and $T_{1}$ , which are then multiplied by the original terms to obtain the post-activation space $U_{m} = 3U_{i}$ . The linear weights $W \in \mathbb{R}^{5 \times 9}$ between $U_{m}$ and $U_{go}$ are within the subspace determined by Equation (20) to ensure equivariance. Similar to KANs (Liu et al., 2024b), EKAN updates grids based on the input activations, which we discuss in detail in Appendix E.
210
+
211
+ # 5. EKAN Architecture
212
+
213
+ In this section, we construct the entire EKAN architecture. The main body of EKAN is composed of stacked EKAN layers. The output space of the $l$ -th layer serves as the input
214
+
215
+ ![](images/d5e0ba2efbe512c658ec31b6d6634b938570a52a987cb9c93ddca723b61dfc79.jpg)
216
+ Figure 3. (Left) The space structures of EKAN and their relationships. (Right) The EKAN architecture, which consists of a lift layer and stacked EKAN layers.
217
+
218
+ space of the $(l + 1)$ -th layer, which we refer to as the latent space $U_{l}$ . For the dataset, we usually know its data type, or in other words, how group elements act on it. To embed this prior knowledge into EKAN, we set the input space of the first layer as the feature space of the dataset $U_{i}$ and the output space of the final layer as the label space of the dataset $U_{o}$ .
219
+
220
+ However, the actual input/output features of the EKAN layer stack lie in $U_{gi} / U_{go}$ . Therefore, we need to add extensions to align the network with the dataset. First, the gate scalars of the actual output feature are directly dropped to obtain the final output label of EKAN, which resides in $U_{o}$ . Then, we add a lift layer before the first layer to preprocess the raw input feature of EKAN, which is essentially an equivariant linear layer between $U_{i}$ and $U_{gi}$ (see Section 4.3).
221
+
222
+ We summarize the space structures and network architecture of EKAN in Figure 3. The space structures of EKAN can be analogous to the dimensions of a conventional network. The user specifies the latent space $U_{l}$ of EKAN, which corresponds to specifying the hidden dimension in a conventional network. The input space $U_{i}$ and the output space $U_{o}$ are determined by the dataset, similar to how the input and output dimensions are defined in a conventional network. In the concrete example, the feature space and label space of the dataset are $U_{i} = T_{0} \oplus T_{1}$ and $U_{o} = T_{2}$ , respectively. After passing through the lift layer, a new gate scalar is added to the raw input feature for $T_{1}$ , resulting in the actual input feature $U_{gi} = T_{0} \oplus T_{1} \oplus T_{0}$ for the first EKAN layer. The gate scalar in the actual output space $U_{go} = T_{2} \oplus T_{0}$ of the last EKAN layer is dropped to obtain the final output label.
223
+
224
+ # 6. Experiments
225
+
226
+ In this section, we evaluate the performance of EKAN on regression and classification tasks with known symmetries. Compared with general models such as MLPs, KANs, and
227
+
228
+ equivariant architectures like EMLP (Finzi et al., 2021) and CGENN (Ruhe et al., 2023), EKAN achieves lower test loss and higher test accuracy with smaller datasets or fewer parameters. Additionally, for all trained models in this section, we evaluate their equivariant errors in Appendix F.
229
+
230
+ # 6.1. Particle Scattering
231
+
232
+ In electron-muon scattering, we can observe the four-momenta of the incoming electron, incoming muon, outgoing electron, and outgoing muon, denoted as $q^{\mu}, p^{\mu}, \tilde{q}^{\mu}, \tilde{p}^{\mu} \in \mathbb{R}^{4}$ , respectively. We aim to predict the matrix element, which is proportional to the cross-section (Finzi et al., 2021): $|\mathcal{M}|^{2} \propto [p^{\mu} \tilde{p}^{\nu} - (p^{\alpha} \tilde{p}_{\alpha} - p^{\alpha} p_{\alpha}) g^{\mu \nu}] [q_{\mu} \tilde{q}_{\nu} - (q^{\alpha} \tilde{q}_{\alpha} - q^{\alpha} q_{\alpha}) g_{\mu \nu}]$ . According to Einstein's summation convention, in a monomial, if an index appears once as a superscript and once as a subscript, it indicates summation over that index. The metric tensor is given by $g_{\mu \nu} = g^{\mu \nu} = \mathrm{diag}(1, -1, -1, -1)$ , and $a_{\mu} = g_{\mu \nu} a^{\nu} = (a^{0}, -a^{1}, -a^{2}, -a^{3})$ . The matrix element is invariant under Lorentz transformations. In other words, this task exhibits O(1,3) invariance (see Appendix A.2 for more details), with the feature space $U_{i} = 4T_{1}$ and the label space $U_{o} = T_{0}$ . The data generation process for particle scattering is entirely consistent with that in EMLP (Finzi et al., 2021).
233
+
234
+ We embed the group $\mathrm{O}(1,3)$ and its subgroups $\mathrm{SO}^{+}(1,3)$ and $\mathrm{SO}(1,3)$ equivariance into EKAN. Models are evaluated on synthetic datasets with different training set sizes, which are generated by sampling $q^{\mu}, p^{\mu}, \tilde{q}^{\mu}, \tilde{p}^{\mu} \sim \mathcal{N}(0, \frac{1}{4^2})$ . Both EKAN and KAN have the depth of $L = 2$ , the spline order of $k = 3$ , and grid intervals of $G = 3$ . Although the lift layer increases the parameter overhead, we set the width of the middle layer in EKAN to $n_1 = 1000$ (shape as [16, 1000, 1], and the software will automatically calculate the appropriate feature space structure based on the user-specified dimension), and set the width of the mid
235
+
236
+ Table 1. Test MSE of different models on the particle scattering dataset with different training set sizes. We present the results in the format of mean ± std.
237
+
238
+ <table><tr><td rowspan="2">Models</td><td colspan="5">Training set size</td></tr><tr><td>102</td><td>102.5</td><td>103</td><td>103.5</td><td>104</td></tr><tr><td>MLP</td><td>(7.33 ± 0.01) × 10-1</td><td>(6.97 ± 0.09) × 10-1</td><td>(3.64 ± 0.30) × 10-1</td><td>(5.04 ± 0.37) × 10-2</td><td>(1.66 ± 0.07) × 10-2</td></tr><tr><td>MLP + augmentation</td><td>(1.90 ± 0.22) × 10-1</td><td>(3.97 ± 0.52) × 10-2</td><td>(1.25 ± 0.08) × 10-2</td><td>(1.08 ± 0.03) × 10-2</td><td>(1.34 ± 0.22) × 10-2</td></tr><tr><td>EMLP-SO+(1,3)</td><td>(1.27 ± 0.35) × 10-2</td><td>(2.21 ± 0.56) × 10-3</td><td>(3.30 ± 0.86) × 10-4</td><td>(2.24 ± 0.55) × 10-4</td><td>(1.99 ± 0.33) × 10-4</td></tr><tr><td>EMLP-SO(1,3)</td><td>(1.47 ± 0.91) × 10-2</td><td>(2.58 ± 0.25) × 10-3</td><td>(3.69 ± 1.25) × 10-4</td><td>(2.73 ± 0.30) × 10-4</td><td>(2.12 ± 0.15) × 10-4</td></tr><tr><td>EMLP-O(1,3)</td><td>(8.88 ± 2.51) × 10-3</td><td>(1.95 ± 0.18) × 10-3</td><td>(3.30 ± 0.43) × 10-4</td><td>(2.66 ± 0.66) × 10-4</td><td>(2.64 ± 0.28) × 10-4</td></tr><tr><td>KAN</td><td>(6.70 ± 1.35) × 10-1</td><td>(6.16 ± 1.18) × 10-1</td><td>(3.46 ± 0.15) × 10-1</td><td>(1.21 ± 0.07) × 10-1</td><td>(2.57 ± 0.08) × 10-2</td></tr><tr><td>KAN + augmentation</td><td>(5.98 ± 0.67) × 10-1</td><td>(4.72 ± 1.52) × 10-1</td><td>(9.07 ± 2.36) × 10-2</td><td>(5.61 ± 0.70) × 10-2</td><td>(1.58 ± 0.06) × 10-1</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>(6.86 ± 6.28) × 10-3</td><td>(1.85 ± 1.75) × 10-3</td><td>(2.01 ± 1.93) × 10-5</td><td>(1.93 ± 1.11) × 10-5</td><td>(4.29 ± 3.38) × 10-6</td></tr><tr><td>EKAN-SO(1,3) (Ours)</td><td>(6.86 ± 6.27) × 10-3</td><td>(1.85 ± 1.75) × 10-3</td><td>(2.06 ± 1.88) × 10-5</td><td>(2.17 ± 1.51) × 10-5</td><td>(3.85 ± 2.77) × 10-6</td></tr><tr><td>EKAN-O(1,3) (Ours)</td><td>(7.77 ± 5.85) × 10-3</td><td>(1.64 ± 1.87) × 10-3</td><td>(2.85 ± 3.09) × 10-5</td><td>(7.31 ± 4.15) × 10-6</td><td>(3.81 ± 2.83) × 10-6</td></tr></table>
239
+
240
+ Table 2. Test MSE of different models with different numbers of parameters on the three-body problem dataset. We present the results in the format of mean ± std.
241
+
242
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">104.5</td><td rowspan="2">104.75</td><td colspan="3">Number of parameters</td></tr><tr><td>105</td><td>105.25</td><td>105.5</td></tr><tr><td>MLP</td><td>(4.84 ± 0.19) × 10-3</td><td>(4.70 ± 0.30) × 10-3</td><td>(4.60 ± 0.12) × 10-3</td><td>(4.17 ± 0.24) × 10-3</td><td>(4.24 ± 0.27) × 10-3</td></tr><tr><td>MLP + augmentation</td><td>(9.43 ± 0.88) × 10-3</td><td>(9.65 ± 0.54) × 10-3</td><td>(1.01 ± 0.09) × 10-2</td><td>(9.89 ± 0.65) × 10-3</td><td>(9.91 ± 0.46) × 10-3</td></tr><tr><td>EMLP-SO(2)</td><td>(2.28 ± 1.17) × 10-3</td><td>(6.87 ± 5.29) × 10-3</td><td>(3.55 ± 1.59) × 10-3</td><td>(2.01 ± 1.09) × 10-3</td><td>(5.34 ± 3.78) × 10-3</td></tr><tr><td>EMLP-O(2)</td><td>(7.72 ± 8.71) × 10-3</td><td>(1.18 ± 0.22) × 10-3</td><td>(1.42 ± 1.86) × 10-2</td><td>(7.37 ± 7.60) × 10-3</td><td>(1.37 ± 0.07) × 10-3</td></tr><tr><td>KAN</td><td>(4.32 ± 3.08) × 10-1</td><td>(2.21 ± 0.65) × 10-2</td><td>(1.18 ± 0.18) × 10-2</td><td>(1.23 ± 0.34) × 10-2</td><td>(9.15 ± 1.76) × 10-3</td></tr><tr><td>KAN + augmentation</td><td>(7.94 ± 0.15) × 10-3</td><td>(7.15 ± 0.24) × 10-3</td><td>(6.91 ± 0.34) × 10-3</td><td>(6.88 ± 0.06) × 10-3</td><td>(6.76 ± 0.12) × 10-3</td></tr><tr><td>EKAN-SO(2) (Ours)</td><td>(1.12 ± 0.13) × 10-3</td><td>(7.06 ± 0.65) × 10-4</td><td>(6.09 ± 0.27) × 10-4</td><td>(4.26 ± 0.19) × 10-4</td><td>(4.84 ± 0.68) × 10-4</td></tr><tr><td>EKAN-O(2) (Ours)</td><td>(1.48 ± 0.37) × 10-3</td><td>(1.12 ± 0.24) × 10-3</td><td>(7.91 ± 0.52) × 10-4</td><td>(6.06 ± 0.36) × 10-4</td><td>(6.02 ± 0.88) × 10-4</td></tr></table>
243
+
244
+ dle layer in KAN to $n_1 = 3840$ (shape as [16, 3840, 1]) to keep the parameter count similar. Both EMLP and MLP have the depth of $L = 4$ and the middle layer width of $n_1 = n_2 = n_3 = 384$ (shape as [16, 384, 384, 384, 1]). In these settings, EKAN (435k) has fewer parameters than EMLP (450k) and KAN (461k). We provide more implementation details in Appendix G.1.
245
+
246
+ We repeat experiments with three different random seeds and report the mean $\pm$ std of the test MSE in Table 1. The results of EMLP and MLP come from the original paper (Finzi et al., 2021) under the same settings. Although EMLP performs better than non-equivariant models, our EKAN with different group equivariance further surpasses it comprehensively, especially showing an orders-of-magnitude advantage on large datasets (training set size $\geq 10^{3}$ ). Moreover, our EKAN with just $10^{3}$ training samples achieves approximately $10\%$ of the test MSE of EMLP with $10^{4}$ training samples.
247
+
248
+ # 6.2. Three-Body Problem
249
+
250
+ The study of the three-body problem on a plane (Greydanus et al., 2019) focuses on the motion of three particles, with their center of mass at the origin, under the influence of gravity. Their trajectories are chaotic and cannot be described by
251
+
252
+ an analytical solution. Specifically, we observe the motion states of three particles over the past four time steps, denoted as $\{q_{i1}, p_{i1}, q_{i2}, p_{i2}, q_{i3}, p_{i3}\}_{i=t-4}^{t-1}$ , and predict their motion states at time $t$ , denoted as $\{q_{t1}, p_{t1}, q_{t2}, p_{t2}, q_{t3}, p_{t3}\}$ . Here, $q_{ij} \in \mathbb{R}^2$ and $p_{ij} \in \mathbb{R}^2$ indicate the position and momentum coordinates of the $j$ -th particle at time $i$ , respectively. The dataset contains 30k training samples and 30k test samples. When the input motion states are simultaneously rotated by a certain angle or reflected along a specific axis, the output motion states should undergo the same transformation. Therefore, this task has O(2) equivariance (see Appendix A.1 for more details), with the feature space $U_i = 4 \times 6T_1 = 24T_1$ and the label space $U_o = 6T_1$ . The dataset for the three-body problem comes from HNN (Greydanus et al., 2019), and we note that they predict the motion trajectories of three particles, differing from the setup in CGENN (Ruhe et al., 2023), which addresses an $N$ -body problem involving five particles.
253
+
254
+ We embed the group $\mathrm{O}(2)$ and its subgroup $\mathrm{SO}(2)$ equivariance into EKAN and EMLP. Both EKAN and KAN have the depth of $L = 2$ , the spline order of $k = 3$ , and grid intervals of $G = 3$ , while both EMLP and MLP have the depth of $L = 4$ . The number of parameters is controlled by adjusting the middle layer width $N$ for comparison (the shape of EKAN and KAN is [48, N, 12], while the shape of
255
+
256
+ Table 3. Test accuracy (%) of different models on the top quark tagging dataset ( $n_{comp} = 3$ ) with different training set sizes. We present the results in the format of mean ± std.
257
+
258
+ <table><tr><td rowspan="2">Models</td><td colspan="5">Training set size</td><td rowspan="2">Parameters</td></tr><tr><td>102</td><td>102.5</td><td>103</td><td>103.5</td><td>104</td></tr><tr><td>MLP</td><td>52.96 ± 0.21</td><td>54.31 ± 0.48</td><td>57.47 ± 0.32</td><td>62.72 ± 0.60</td><td>69.30 ± 1.03</td><td rowspan="2">83K</td></tr><tr><td>MLP + augmentation</td><td>52.72 ± 0.35</td><td>60.16 ± 0.41</td><td>61.29 ± 1.66</td><td>58.71 ± 1.37</td><td>59.45 ± 1.90</td></tr><tr><td>EMLP-SO+(1,3)</td><td>65.48 ± 1.21</td><td>72.59 ± 0.84</td><td>74.40 ± 0.26</td><td>76.34 ± 0.14</td><td>77.10 ± 0.02</td><td rowspan="3">133K</td></tr><tr><td>EMLP-SO(1,3)</td><td>61.86 ± 5.92</td><td>73.09 ± 0.92</td><td>74.37 ± 0.17</td><td>76.46 ± 0.12</td><td>77.12 ± 0.04</td></tr><tr><td>EMLP-O(1,3)</td><td>62.66 ± 7.35</td><td>73.65 ± 1.01</td><td>74.22 ± 0.53</td><td>76.26 ± 0.05</td><td>77.12 ± 0.04</td></tr><tr><td>KAN</td><td>49.89 ± 0.39</td><td>49.91 ± 0.43</td><td>49.89 ± 0.37</td><td>50.00 ± 0.02</td><td>49.84 ± 0.25</td><td rowspan="2">35K</td></tr><tr><td>KAN + augmentation</td><td>49.83 ± 0.28</td><td>50.09 ± 0.09</td><td>49.73 ± 0.40</td><td>50.02 ± 0.01</td><td>50.27 ± 0.67</td></tr><tr><td>CGENN</td><td>62.63 ± 2.24</td><td>68.74 ± 0.77</td><td>70.29 ± 1.29</td><td>75.10 ± 0.47</td><td>77.05 ± 0.03</td><td>85K</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>71.92 ± 0.88</td><td>73.98 ± 0.39</td><td>76.15 ± 0.11</td><td>76.69 ± 0.08</td><td>76.93 ± 0.02</td><td rowspan="3">34K</td></tr><tr><td>EKAN-SO(1,3) (Ours)</td><td>70.49 ± 2.85</td><td>73.96 ± 0.37</td><td>76.15 ± 0.11</td><td>76.69 ± 0.08</td><td>76.93 ± 0.02</td></tr><tr><td>EKAN-O(1,3) (Ours)</td><td>71.68 ± 1.21</td><td>73.95 ± 0.36</td><td>76.15 ± 0.11</td><td>76.69 ± 0.07</td><td>76.93 ± 0.03</td></tr></table>
259
+
260
+ EMLP and MLP is [48, N, N, N, 12]). More implementation details can be found in Appendix G.2.
261
+
262
+ The mean $\pm$ std of the test MSE over three runs with different random seeds are reported in Table 2. Our EKAN-SO(2) and EKAN-O(2) consistently outperform baseline models with the same number of parameters, often by orders of magnitude. Notably, our EKAN with $10^{4.5}$ parameters achieves comparable or even lower test MSE than baseline models with $10^{5.5}$ parameters, saving $90\%$ of the parameter overhead.
263
+
264
+ # 6.3. Top Quark Tagging
265
+
266
+ The research on top quark tagging (Kasiekzka et al., 2019) involves classifying hadronic tops from the QCD background. In particle collision experiments, top quark decays or other events produce several jet constituents. We observe the four-momenta $p_1^\mu, p_2^\mu, p_3^\mu \in \mathbb{R}^4$ of the three jet constituents with the highest transverse momentum $p_T$ , and predict the event label (1 for top, 0 for QCD). The category of the event will not change when all jet constituents undergo the same Lorentz transformation. Consequently, this task possesses O(1, 3) invariance (see Appendix A.2 for more details), with the feature space $U_i = 3T_1$ and the label space $U_o = T_0$ . The top quark tagging dataset is sourced from Kasiekzka et al. (2019), and we assume that only the $n_{comp} = 3$ jet constituents with the highest transverse momentum $p_T$ are observed, which differs from the setup in CGENN (Ruhe et al., 2023) and LorentzNet (Gong et al., 2022), where all $n_{comp} = 200$ jet constituents are available.
267
+
268
+ Similar to particle scattering, we embed the group $\mathrm{O}(1,3)$ and its subgroups $\mathrm{SO}^{+}(1,3)$ and $\mathrm{SO}(1,3)$ equivariance into EKAN and EMLP. Furthermore, we embed $\mathrm{O}(1,3)$ equivariance into CGENN (Ruhe et al., 2023). We sample training
269
+
270
+ sets of different sizes from the original dataset for evaluation. Both EKAN and KAN have the depth of $L = 2$ , the spline order of $k = 3$ , and grid intervals of $G = 3$ . We set the width of the middle layer in EKAN to $n_1 = 200$ (shape as [12, 200, 1]) and the width of the middle layer in KAN to $n_1 = 384$ (shape as [12, 384, 1]) to control the number of parameters. Both MLP, EMLP and CGENN have the depth of $L = 4$ and the middle layer width $n_1 = n_2 = n_3 = 200$ (shape as [12, 200, 200, 200, 1]). We apply the sigmoid function to the model's output and use BCE as the loss function for binary classification. More implementation details are provided in Appendix G.3.
271
+
272
+ We report the mean $\pm$ std of the test accuracy over three runs with different random seeds, as well as the number of parameters of the models in Table 3. Since we have not observed all the jet constituents, the relationship between the labels and input features cannot be accurately expressed as an explicit function. In this case of non-symbolic formula representation, KAN cannot achieve higher accuracy with fewer parameters than MLP as expected. On the other hand, our EKAN achieves comparable results with EMLP and CGENN using fewer than $40\%$ of the parameters, improving test accuracy by $0.23\% \sim 6.44\%$ on small datasets (training set size $< 10^{4}$ ), while decreasing by $0.19\%$ on large datasets (training set size $= 10^{4}$ ).
273
+
274
+ # 7. Conclusion
275
+
276
+ To our knowledge, this work is the first attempt to combine equivariance and KANs. We view the KAN layer as a combination of spline functions and linear weights, and accordingly define the (gated) input space, post-activation space, and (gated) output space of the EKAN layer. Gated basis functions ensure the equivariance between the gated
277
+
278
+ input space and the post-activation space, while equivariant linear weights guarantee the equivariance between the post-activation space and the gated output space. The prior work has demonstrated that "EMLP > MLP" on tasks with symmetries and "KAN > MLP" on symbolic formula representation tasks. Our experimental results further indicate that on symbolic formula representation tasks with symmetries, "EKAN > EMLP" and "EKAN > KAN". Moreover, on non-symbolic formula representation tasks with symmetries, although it may be that "KAN < MLP", we show that "EKAN > EMLP". We expect that EKAN can become a general framework for applying KANs to more fields, such as computer vision and natural language processing, just as EMLP unifies classic works like CNNs and DeepSets.
279
+
280
+ # 8. Limitations
281
+
282
+ One limitation of our approach is that the use of gating mechanisms can reduce the expressive power of EKAN, as discussed in Appendix D of EMLP (Finzi et al., 2021). However, due to the inherently complex structure of KANs (which involve intricate B-spline formulations), introducing symmetries into KANs is challenging. Therefore, for the sake of simplicity and clarity, we opt to incorporate gated non-linearities in a hierarchical manner. We anticipate that future improvements could enhance the expressive power and flexibility of EKAN.
283
+
284
+ Another limitation is that when data is sufficient, the advantages of EKAN diminish compared with baselines. We provide additional experimental results in Appendix H to illustrate this point. This implies that EKAN enhances generalization on small data but does not unlock the upper limit of expressive power.
285
+
286
+ # Acknowledgements
287
+
288
+ Z. Lin was supported by National Key R&D Program of China (2022ZD0160300) and the NSF China (No. 62276004).
289
+
290
+ # Impact Statement
291
+
292
+ 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.
293
+
294
+ # References
295
+
296
+ Azam, B. and Akhtar, N. Suitability of KANs for computer vision: A preliminary investigation. arXiv preprint arXiv:2406.09087, 2024.
297
+ Bekkers, E. J., Lafarge, M. W., Veta, M., Eppenhof, K. A.,
298
+
299
+ Pluim, J. P., and Duits, R. Roto-translation covariant convolutional networks for medical image analysis. In Medical Image Computing and Computer Assisted Intervention-MICCAI 2018: 21st International Conference, Granada, Spain, September 16-20, 2018, Proceedings, Part I, pp. 440-448. Springer, 2018.
300
+ Bodner, A. D., Tepsich, A. S., Spolski, J. N., and Pourteau, S. Convolutional Kolmogorov-Arnold networks. arXiv preprint arXiv:2406.13155, 2024.
301
+ Braun, J. and Griebel, M. On a constructive proof of Kolmogorov's superposition theorem. Constructive approximation, 30:653-675, 2009.
302
+ Bresson, R., Nikolentzos, G., Panagopoulos, G., Chatzianastasis, M., Pang, J., and Vazirgiannis, M. KAGNNs: Kolmogorov-Arnold networks meet graph learning. arXiv preprint arXiv:2406.18380, 2024.
303
+ Cheon, M. Demonstrating the efficacy of Kolmogorov-Arnold networks in vision tasks. arXiv preprint arXiv:2406.14916, 2024a.
304
+ Cheon, M. Kolmogorov-Arnold network for satellite image classification in remote sensing. arXiv preprint arXiv:2406.00600, 2024b.
305
+ Cohen, T. and Welling, M. Group equivariant convolutional networks. In International Conference on Machine Learning, pp. 2990-2999. PMLR, 2016.
306
+ Cohen, T. S. and Welling, M. Steerable CNNs. In International Conference on Learning Representations, 2017.
307
+ Cybenko, G. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303-314, 1989.
308
+ Dangovski, R., Jing, L., Loh, C., Han, S., Srivastava, A., Cheung, B., Agrawal, P., and Soljacic, M. Equivariant self-supervised learning: Encouraging equivariance in representations. In International Conference on Learning Representations, 2022.
309
+ Dauphin, Y. N., Fan, A., Auli, M., and Grangier, D. Language modeling with gated convolutional networks. In International Conference on Machine Learning, pp. 933-941. PMLR, 2017.
310
+ De Boor, C. A practical guide to splines, volume 27. Springer New York, 1978.
311
+ De Carlo, G., Mastropietro, A., and Anagnostopoulos, A. Kolmogorov-Arnold graph neural networks. arXiv preprint arXiv:2406.18354, 2024.
312
+ Dhiman, V. KAN: Kolmogorov-Arnold networks: A review. 2024.
313
+
314
+ Finzi, M., Welling, M., and Wilson, A. G. A practical method for constructing equivariant multilayer perceptrons for arbitrary matrix groups. In International Conference on Machine Learning, pp. 3318-3328. PMLR, 2021.
315
+ Garrido, Q., Najman, L., and Lecun, Y. Self-supervised learning of split invariant equivariant representations. In International Conference on Machine Learning, pp. 10975-10996. PMLR, 2023.
316
+ Genet, R. and Inzirillo, H. A temporal Kolmogorov-Arnold transformer for time series forecasting. arXiv preprint arXiv:2406.02486, 2024a.
317
+ Genet, R. and Inzirillo, H. TKAN: Temporal Kolmogorov-Arnold networks. arXiv preprint arXiv:2405.07344, 2024b.
318
+ Gong, S., Meng, Q., Zhang, J., Qu, H., Li, C., Qian, S., Du, W., Ma, Z.-M., and Liu, T.-Y. An efficient Lorentz equivariant graph neural network for jet tagging. Journal of High Energy Physics, 2022(7):1-22, 2022.
319
+ Graham, S., Epstein, D., and Rajpoot, N. Dense steerable filter CNNs for exploiting rotational symmetry in histology images. IEEE Transactions on Medical Imaging, 39 (12):4124-4136, 2020.
320
+ Greydanus, S., Dzamba, M., and Yosinski, J. Hamiltonian neural networks. Advances in Neural Information Processing Systems, 32, 2019.
321
+ Gu, A. and Dao, T. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
322
+ Gupta, S., Robinson, J., Lim, D., Villar, S., and Jegelka, S. Structuring representation geometry with rotationally equivariant contrastive learning. In The Twelfth International Conference on Learning Representations, 2024.
323
+ Haykin, S. Neural networks: a comprehensive foundation. Prentice Hall PTR, 1998.
324
+ He, L., Chen, Y., Shen, Z., Yang, Y., and Lin, Z. Neural ePDOs: Spatially adaptive equivariant partial differential operator based networks. In The Eleventh International Conference on Learning Representations, 2022.
325
+ Hornik, K., Stinchcombe, M., and White, H. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359-366, 1989.
326
+ Hu, L., Li, Y., and Lin, Z. Symmetry discovery for different data types. Neural Networks, pp. 107481, 2025.
327
+ Kasieczka, G., Plehn, T., Thompson, J., and Russel, M. Top quark tagging reference dataset. (No Title), 2019.
328
+
329
+ Keriven, N. and Peyre, G. Universal invariant and equivariant graph neural networks. Advances in Neural Information Processing Systems, 32, 2019.
330
+ Kiamari, M., Kiamari, M., and Krishnamachari, B. GKAN: Graph Kolmogorov-Arnold networks. arXiv preprint arXiv:2406.06470, 2024.
331
+ LeCun, Y., Boser, B., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W., and Jackel, L. D. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541-551, 1989.
332
+ Lee, J., Kim, B., and Cho, M. Self-supervised equivariant learning for oriented keypoint detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4847-4857, 2022.
333
+ Li, C., Liu, X., Li, W., Wang, C., Liu, H., and Yuan, Y. U-KAN makes strong backbone for medical image segmentation and generation. arXiv preprint arXiv:2406.02918, 2024a.
334
+ Li, Y., Qiu, Y., Chen, Y., He, L., and Lin, Z. Affine equivariant networks based on differential invariants. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5546-5556, 2024b.
335
+ Li, Y., Qiu, Y., Chen, Y., and Lin, Z. Affine steerable equivariant layer for canonicalization of neural networks. In The Thirteenth International Conference on Learning Representations, 2025.
336
+ Liu, Z., Ma, P., Wang, Y., Matusik, W., and Tegmark, M.
337
+ KAN 2.0: Kolmogorov-Arnold networks meet science. arXiv preprint arXiv:2408.10205, 2024a.
338
+ Liu, Z., Wang, Y., Vaidya, S., Ruehle, F., Halverson, J., Soljacic, M., Hou, T. Y., and Tegmark, M. KAN: Kolmogorov-Arnold networks. arXiv preprint arXiv:2404.19756, 2024b.
339
+ Maron, H., Ben-Hamu, H., Shamir, N., and Lipman, Y. Invariant and equivariant graph networks. In International Conference on Learning Representations, 2019.
340
+ Ruhe, D., Brandstetter, J., and Forre, P. Clifford group equivariant neural networks. Advances in Neural Information Processing Systems, 36:62922-62990, 2023.
341
+ Satorras, V. G., Hoogeboom, E., and Welling, M. E(n) equivariant graph neural networks. In International Conference on Machine Learning, pp. 9323-9332. PMLR, 2021.
342
+ Seydi, S. T. Unveiling the power of wavelets: A wavelet-based Kolmogorov-Arnold network for hyperspectral image classification. arXiv preprint arXiv:2406.07869, 2024.
343
+
344
+ Shazeer, N. GLU variants improve transformer. arXiv preprint arXiv:2002.05202, 2020.
345
+ Shen, Z., He, L., Lin, Z., and Ma, J. PDO-eConvs: Partial differential operator based equivariant convolutions. In International Conference on Machine Learning, pp. 8697-8706. PMLR, 2020.
346
+ Shen, Z., Shen, T., Lin, Z., and Ma, J. PDO-eS2CNNs: Partial differential operator based equivariant spherical CNNs. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 9585-9593, 2021.
347
+ Shen, Z., Hong, T., She, Q., Ma, J., and Lin, Z. PDOs3DCNNs: Partial differential operator based steerable 3D CNNs. In International Conference on Machine Learning, pp. 19827-19846. PMLR, 2022.
348
+ Tikhomirov, V. On the representation of continuous functions of several variables as superpositions of continuous functions of a smaller number of variables. In Selected Works of AN Kolmogorov, pp. 378-382. Springer, 1991.
349
+ Vaca-Rubio, C. J., Blanco, L., Pereira, R., and Caus, M. Kolmogorov-Arnold networks (KANs) for time series analysis. arXiv preprint arXiv:2405.08790, 2024.
350
+ Wang, R., Walters, R., and Yu, R. Incorporating symmetry into deep dynamics models for improved generalization. In International Conference on Learning Representations, 2021.
351
+ Wang, Y., Zhang, J., Kan, M., Shan, S., and Chen, X. Self-supervised equivariant attention mechanism for weakly supervised semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12275-12284, 2020.
352
+ Weiler, M. and Cesa, G. General E(2)-equivariant steerable CNNs. Advances in Neural Information Processing Systems, 32, 2019.
353
+ Weiler, M., Geiger, M., Welling, M., Boomsma, W., and Cohen, T. S. 3D steerable CNNs: Learning rotationally equivariant features in volumetric data. Advances in Neural Information Processing Systems, 31, 2018a.
354
+ Weiler, M., Hamprecht, F. A., and Storath, M. Learning steerable filters for rotation equivariant CNNs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 849-858, 2018b.
355
+ Winkels, M. and Cohen, T. S. Pulmonary nodule detection in CT scans with equivariant CNNs. Medical image analysis, 55:15-26, 2019.
356
+ Xie, X., Zhou, P., Li, H., Lin, Z., and Yan, S. Adan: Adaptive Nesterov momentum algorithm for faster optimizing
357
+
358
+ deep models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.
359
+ Xu, K., Chen, L., and Wang, S. Kolmogorov-Arnold networks for time series: Bridging predictive power and interpretability. arXiv preprint arXiv:2406.02496, 2024.
360
+ Yu, R., Yu, W., and Wang, X. KAN or MLP: A fairer comparison. arXiv preprint arXiv:2407.16674, 2024.
361
+ Zaheer, M., Kottur, S., Ravanbakhsh, S., Poczos, B., Salakhutdinov, R. R., and Smola, A. J. Deep sets. Advances in Neural Information Processing Systems, 30, 2017.
362
+ Zhang, F. and Zhang, X. GraphKAN: Enhancing feature extraction with graph Kolmogorov Arnold networks. arXiv preprint arXiv:2406.13597, 2024.
363
+ Zhao, L., Zhu, X., Kong, L., Walters, R., and Wong, L. L. Integrating symmetry into differentiable planning with steerable convolutions. In The Eleventh International Conference on Learning Representations, 2023.
364
+
365
+ # A. Common Matrix Groups and Their Generators
366
+
367
+ # A.1. Groups SO(2) and O(2)
368
+
369
+ The group $\mathrm{SO}(2)$ represents rotation transformations in two-dimensional space. Its group elements can be expressed as:
370
+
371
+ $$
372
+ R (\theta) = \left[ \begin{array}{c c} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{array} \right]. \tag {21}
373
+ $$
374
+
375
+ It corresponds to an infinitesimal generator:
376
+
377
+ $$
378
+ A _ {1} = \left[ \begin{array}{c c} 0 & - 1 \\ 1 & 0 \end{array} \right]. \tag {22}
379
+ $$
380
+
381
+ Then we can obtain the group elements through the exponential map $R(\theta) = \exp (\theta A_1)$ .
382
+
383
+ The group $\mathrm{O}(2)$ represents orthogonal transformations in two-dimensional space, including rotations and reflections. Based on the group $\mathrm{SO}(2)$ , it has an additional discrete generator:
384
+
385
+ $$
386
+ h _ {1} = \left[ \begin{array}{c c} 1 & 0 \\ 0 & - 1 \end{array} \right]. \tag {23}
387
+ $$
388
+
389
+ # A.2. Groups $\mathrm{SO}^{+}(1,3),\mathrm{SO}(1,3)$ , and $\mathrm{O}(1,3)$
390
+
391
+ The group $\mathrm{SO}^{+}(1,3)$ represents Lorentz transformations that preserve both orientation and the direction of time. It includes six infinitesimal generators:
392
+
393
+ $$
394
+ \left\{ \begin{array}{l} A _ {1} = \left[ \begin{array}{c c c c} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right], A _ {2} = \left[ \begin{array}{c c c c} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right], A _ {3} = \left[ \begin{array}{c c c c} 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{array} \right], \\ A _ {4} = \left[ \begin{array}{c c c c} 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & - 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right], A _ {5} = \left[ \begin{array}{c c c c} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & - 1 & 0 & 0 \end{array} \right], A _ {6} = \left[ \begin{array}{c c c c} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & - 1 & 0 \end{array} \right], \end{array} \right. \tag {24}
395
+ $$
396
+
397
+ where $A_{1}, A_{2}, A_{3}$ correspond to Lorentz boosts, and $A_{4}, A_{5}, A_{6}$ correspond to spatial rotations.
398
+
399
+ The group $\mathrm{SO}(1,3)$ represents Lorentz transformations that preserve orientation. Based on the group $\mathrm{SO}^{+}(1,3)$ , it has an additional discrete generator:
400
+
401
+ $$
402
+ h _ {1} = \left[ \begin{array}{c c c c} - 1 & 0 & 0 & 0 \\ 0 & - 1 & 0 & 0 \\ 0 & 0 & - 1 & 0 \\ 0 & 0 & 0 & - 1 \end{array} \right], \tag {25}
403
+ $$
404
+
405
+ which corresponds to orientation reversal.
406
+
407
+ The group $\mathrm{O}(1,3)$ represents all Lorentz transformations. Based on the group $\mathrm{SO}(1,3)$ , it has an additional discrete generator:
408
+
409
+ $$
410
+ h _ {2} = \left[ \begin{array}{c c c c} - 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right], \tag {26}
411
+ $$
412
+
413
+ which corresponds to time reversal.
414
+
415
+ # B. Concrete Examples of Space Structure
416
+
417
+ First, let's intuitively understand the dual $(\ast)$ , direct sum $(\oplus)$ , and tensor product $(\otimes)$ operations. Consider two vector spaces $X = \mathbb{R}^2, Y = \mathbb{R}^3$ , and vectors $x = (x_1, x_2) \in X, y = (y_1, y_2, y_3) \in Y$ . Then, all $x \oplus y = (x_1, x_2, y_1, y_2, y_3)$ form the
418
+
419
+ space $X\oplus Y = \mathbb{R}^5$ , all $x\otimes y = (x_{1}y,x_{2}y) = (x_{1}y_{1},x_{1}y_{2},x_{1}y_{3},x_{2}y_{1},x_{2}y_{2},x_{2}y_{3})$ form the space $X\otimes Y = \mathbb{R}^6$ , and all the coefficients $\operatorname {vec}(W)$ of the linear maps $Wx = y$ form the space $Y\otimes X^{*} = \mathbb{R}^{6}$
420
+
421
+ Then, if we define how the group transformation acts on $X, Y$ , the form of its action on these composite spaces can naturally be derived. Equation (4) provides the derivation rules. This paper assumes the group to be a matrix group. If a group element $g \in G$ acts on a vector $x \in X$ in the form of its corresponding linear transformation $gx$ , then we call $X$ the base vector space of $G$ .
422
+
423
+ We have defined the "addition" and "multiplication" between spaces. Thus, for the base vector space $V$ of a group $G$ , any complex space structure can be organized into the form of a "polynomial" with respect to $V$ , which is the origin of Equation (3). Note that Equation (3) simultaneously defines $T(p,q) = V^p \otimes (V^*)^q$ . We abbreviate $T(p,0)$ as $T_p$ .
424
+
425
+ In the vast majority of scenarios, the feature space of a dataset takes simple forms such as vector stacking $cT_{1} = cV$ or matrices $T_{2} = V \otimes V$ , while complex spaces like $T(p,q)$ rarely appear. However, the latent spaces between equivariant layers can be highly intricate (e.g., they may have 384 dimensions), and their decomposition forms with respect to the base vector space $V$ often involve $T(p,q)$ (the decomposition is automatically handled by the software based on dimensionality, as described in Section 6). The practical implication is that, according to the rules of Equation (4), we define how group transformations operate on the latent spaces.
426
+
427
+ It is not correct that any (continuous, real, finite-dimensional) representation $U$ of a matrix group can be written as in Equation (3). It can be shown (in the case of a compact Lie group for example) that $U$ is a subrepresentation of the direct sum on the right hand side. However, it is worth noting that, for the vast majority of practical applications, considering input/output representations of this form should suffice.
428
+
429
+ # C. Equivariant Multi-Layer Perceptrons (EMLP)
430
+
431
+ EMLP (Finzi et al., 2021) embeds matrix group equivariance into MLPs layerwise. Given the input space $U_{i}$ and output space $U_{o}$ , the linear weight matrix $W\in U_{o}\otimes U_{i}^{*}$ should satisfy Equation (5), i.e., $\forall g\in \widetilde{G},v_{i}\in U_{i}:\rho_{o}(g)Wv_{i} = W\rho_{i}(g)v_{i}$ . So the coefficients of each term in $v_{i}$ are equal $\forall g\in \widetilde{G}:\rho_o(g)W = W\rho_i(g)$ . Flattening the linear weight matrix $W$ into a vector, we have $\forall g\in \widetilde{G}:\left[\rho_o(g)\otimes \rho_i(g^{-1})^\top \right]\operatorname {vec}(W) = \operatorname {vec}(W)$ . Combined with Equation (4), the linear weight matrix $W$ is invariant in the space $U_{o}\otimes U_{i}^{*}$ :
432
+
433
+ $$
434
+ \forall g \in \widetilde {G}: \quad \rho_ {o, i} (g) \operatorname {v e c} (W) = \operatorname {v e c} (W), \tag {27}
435
+ $$
436
+
437
+ where $\rho_{o,i} = \rho_o\otimes \rho_i^*$ is the group representation of $U_{o}\otimes U_{i}^{*}$ . Decomposing the group representation $\rho_{o,i}(g)$ into discrete and infinitesimal generators as shown in Equation (2), Equation (27) is equivalent to the following constraint:
438
+
439
+ $$
440
+ C \operatorname {v e c} (W) = \left[ \begin{array}{c} \mathrm {d} \rho_ {o, i} \left(A _ {1}\right) \\ \vdots \\ \mathrm {d} \rho_ {o, i} \left(A _ {D}\right) \\ \rho_ {o, i} \left(h _ {1}\right) - I \\ \vdots \\ \rho_ {o, i} \left(h _ {M}\right) - I \end{array} \right] \operatorname {v e c} (W) = 0. \tag {28}
441
+ $$
442
+
443
+ By performing singular value decomposition (SVD) on the coefficient matrix $C$ , we can obtain its nullspace, which corresponds to the subspace where the equivariant linear weights reside.
444
+
445
+ # D. Proof of Theorem 4.1
446
+
447
+ Theorem 4.1. Given a matrix group $\widetilde{G}$ , the gated input space $U_{gi}$ and the post-activation space $U_{m}$ can be expressed in the forms of Equations (9) and (13), respectively. The function $f: U_{gi} \to U_{m}$ is defined by Equations (10) to (12), that is, $v_{m} = f(v_{gi})$ . Then, $f$ is equivariant:
448
+
449
+ $$
450
+ \forall g \in \widetilde {G}, v _ {g i} \in U _ {g i}: \quad \rho_ {m} (g) f \left(v _ {g i}\right) = f \left(\rho_ {g i} (g) v _ {g i}\right), \tag {14}
451
+ $$
452
+
453
+ where $\rho_{gi}$ and $\rho_{m}$ are group representations of $U_{gi}$ and $U_{m}$ , respectively.
454
+
455
+ Proof. Let $v_{m,b} = f_b(v_{gi})$ , then Equation (11) can be written as:
456
+
457
+ $$
458
+ f \left(v _ {g i}\right) = \bigoplus_ {b = 0} ^ {G + k} f _ {b} \left(v _ {g i}\right). \tag {29}
459
+ $$
460
+
461
+ Using the structure of $U_{m}$ shown in Equation (13) and applying the rules from Equation (4), we can derive the group representation of $U_{m}$ :
462
+
463
+ $$
464
+ \rho_ {m} (g) = \bigoplus_ {b = 0} ^ {G + k} \rho_ {i} (g), \tag {30}
465
+ $$
466
+
467
+ where $\rho_{i}$ is the group representation of $U_{i}$ . Combining Equations (29) and (30), we have:
468
+
469
+ $$
470
+ \rho_ {m} (g) f \left(v _ {g i}\right) = \bigoplus_ {b = 0} ^ {G + k} \rho_ {i} (g) f _ {b} \left(v _ {g i}\right). \tag {31}
471
+ $$
472
+
473
+ Note that the group transformation in the scalar space $T_0$ is the identity transformation, then we can obtain the group representation of $U_{gi}$ from Equation (9):
474
+
475
+ $$
476
+ \rho_ {g i} (g) = I _ {c _ {i}} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} \rho_ {i, a} (g) \right] \oplus I _ {A _ {i}}, \tag {32}
477
+ $$
478
+
479
+ where $\rho_{i,a}$ is the group representation of $T(p_{i,a},q_{i,a})$ . Therefore, applying the group transformation to $v_{gi}$ in Equation (10) results in:
480
+
481
+ $$
482
+ \rho_ {g i} (g) v _ {g i} = \left(\bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a}\right) \oplus \left(\bigoplus_ {a = 1} ^ {A _ {i}} \rho_ {i, a} (g) v _ {i, a}\right) \oplus \left(\bigoplus_ {a = 1} ^ {A _ {i}} s _ {i, a} ^ {\prime}\right). \tag {33}
483
+ $$
484
+
485
+ Substitute Equation (33) into Equation (12):
486
+
487
+ $$
488
+ f _ {b} \left(\rho_ {g i} (g) v _ {g i}\right) = \left\{ \begin{array}{l} {\left[ \bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a} B _ {b} \left(s _ {i, a}\right) \right] \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} \rho_ {i, a} (g) v _ {i, a} B _ {b} \left(s _ {i, a} ^ {\prime}\right) \right], \quad b < G + k,} \\ {\left[ \bigoplus_ {a = 1} ^ {c _ {i}} s _ {i, a} \mathrm {s i l u} \left(s _ {i, a}\right) \right] \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} \rho_ {i, a} (g) v _ {i, a} \mathrm {s i l u} \left(s _ {i, a} ^ {\prime}\right) \right], \quad b = G + k.} \end{array} \right. \tag {34}
489
+ $$
490
+
491
+ Similar to Equation (32), we can derive the group representation of $U_{i}$ from Equation (8):
492
+
493
+ $$
494
+ \rho_ {i} (g) = I _ {c _ {i}} \oplus \left[ \bigoplus_ {a = 1} ^ {A _ {i}} \rho_ {i, a} (g) \right]. \tag {35}
495
+ $$
496
+
497
+ Note that the right-hand side of Equation (34) is the result of applying $\rho_{i}(g)$ to $f_{b}(v_{gi})$ , which means:
498
+
499
+ $$
500
+ f _ {b} \left(\rho_ {g i} (g) v _ {g i}\right) = \rho_ {i} (g) f _ {b} \left(v _ {g i}\right). \tag {36}
501
+ $$
502
+
503
+ Substitute Equation (36) into Equation (29):
504
+
505
+ $$
506
+ f \left(\rho_ {g i} (g) v _ {g i}\right) = \bigoplus_ {b = 0} ^ {G + k} \rho_ {i} (g) f _ {b} \left(v _ {g i}\right). \tag {37}
507
+ $$
508
+
509
+ Combining Equations (31) and (37), Equation (14) is proven.
510
+
511
+ # E. Grid Update
512
+
513
+ Similar to KANs (Liu et al., 2024b), EKAN updates grids based on the input activations. At the same time, the linear weights should also be updated in order to keep the output features unchanged. Let the post-activation values of the grids before and after the update be denoted as $V_{m}, V_{m}^{\prime} \in \mathbb{R}^{N \times (G + k + 1)d_{i}}$ , where $N$ is the number of samples. We first project the linear weight blocks into the equivariant subspace as $\mathrm{vec}(\widetilde{W}_{b}) = P\mathrm{vec}(W_{b})$ and compute the output activations $V_{go} = V_{m}\widetilde{W}^{\top} = \sum_{b = 0}^{G + k}V_{m,b}\widetilde{W}_{b}^{\top}$ , where $P$ is the equivariant projector obtained from Equation (20). Then, the updated equivariant linear weights $\widetilde{W}^{\prime}$ should satisfy $V_{go} = V_{m}^{\prime}\widetilde{W}^{\prime \top}$ , and we have $\widetilde{W}^{\prime} = V_{go}^{\top}(V_{m}^{\prime \top})^{\dagger}$ . We finally restore the updated linear weight blocks $\mathrm{vec}(W_b') = P^\dagger \mathrm{vec}(\widetilde{W}_b')$ .
514
+
515
+ # F. Equivariant Error Evaluation
516
+
517
+ For all trained models $f_{\theta}$ in Section 6, we use $\mathcal{L}_{equi} = \mathbb{E}_{x,g}\| \rho_o(g)f_\theta (x) - f_\theta (\rho_i(g)x)\| ^2$ to evaluate their equivariant errors. The experimental results are presented in Tables 4 to 6, which indicate that our EKAN and EMLP can structurally guarantee strict equivariance, whereas non-equivariant models cannot. For particle scattering, the results of EMLP and MLP are sourced from the original paper (Finzi et al., 2021), so we do not present their equivariant errors here.
518
+
519
+ Table 4. Equivariant error of different models on the particle scattering dataset with different training set sizes. We present the results in the format of mean ± std.
520
+
521
+ <table><tr><td rowspan="2">Models</td><td colspan="5">Training set size</td></tr><tr><td>102</td><td>102.5</td><td>103</td><td>103.5</td><td>104</td></tr><tr><td>KAN</td><td>(3.14 ± 0.08) × 10-1</td><td>1.02 ± 0.69</td><td>(4.88 ± 2.02) × 10-1</td><td>(6.90 ± 3.25) × 10-1</td><td>(1.64 ± 0.41) × 10-1</td></tr><tr><td>KAN + augmentation</td><td>(2.78 ± 0.30) × 10-1</td><td>(8.81 ± 8.41) × 10-1</td><td>(1.08 ± 0.55) × 10-1</td><td>(1.32 ± 0.52) × 10-1</td><td>(2.36 ± 0.17) × 10-1</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>(6.13 ± 1.76) × 10-14</td><td>(9.32 ± 2.75) × 10-14</td><td>(7.48 ± 1.61) × 10-14</td><td>(8.33 ± 0.69) × 10-14</td><td>(6.57 ± 0.06) × 10-14</td></tr><tr><td>EKAN-SO(1,3) (Ours)</td><td>(1.13 ± 0.78) × 10-13</td><td>(7.64 ± 1.67) × 10-14</td><td>(6.86 ± 0.11) × 10-14</td><td>(7.98 ± 0.45) × 10-14</td><td>(6.62 ± 0.89) × 10-14</td></tr><tr><td>EKAN-O(1,3) (Ours)</td><td>(5.67 ± 0.87) × 10-14</td><td>(7.95 ± 2.67) × 10-14</td><td>(5.88 ± 0.81) × 10-14</td><td>(9.00 ± 0.63) × 10-14</td><td>(8.43 ± 0.18) × 10-14</td></tr></table>
522
+
523
+ Table 5. Equivariant error of different models with different numbers of parameters on the three-body problem dataset. We present the results in the format of mean ± std.
524
+
525
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">104.5</td><td rowspan="2">104.75</td><td colspan="3">Number of parameters</td></tr><tr><td>105</td><td>105.25</td><td>105.5</td></tr><tr><td>MLP</td><td>(1.44 ± 0.13) × 10-3</td><td>(1.51 ± 0.14) × 10-3</td><td>(1.54 ± 0.03) × 10-3</td><td>(1.33 ± 0.17) × 10-3</td><td>(1.33 ± 0.10) × 10-3</td></tr><tr><td>MLP + augmentation</td><td>(3.16 ± 0.32) × 10-3</td><td>(3.47 ± 0.24) × 10-3</td><td>(3.43 ± 0.24) × 10-3</td><td>(3.35 ± 0.16) × 10-3</td><td>(3.32 ± 0.26) × 10-3</td></tr><tr><td>EMLP-SO(2)</td><td>(2.80 ± 2.18) × 10-13</td><td>(1.57 ± 1.39) × 10-13</td><td>(2.17 ± 0.37) × 10-14</td><td>(2.99 ± 2.51) × 10-14</td><td>(1.87 ± 0.61) × 10-14</td></tr><tr><td>EMLP-O(2)</td><td>(7.87 ± 6.26) × 10-13</td><td>(1.87 ± 1.32) × 10-12</td><td>(3.22 ± 4.53) × 10-11</td><td>(1.46 ± 2.03) × 10-12</td><td>(7.23 ± 6.13) × 10-14</td></tr><tr><td>KAN</td><td>(3.00 ± 2.28) × 10-1</td><td>(1.21 ± 0.26) × 10-2</td><td>(5.90 ± 0.78) × 10-3</td><td>(5.93 ± 1.45) × 10-3</td><td>(4.03 ± 0.81) × 10-3</td></tr><tr><td>KAN + augmentation</td><td>(2.78 ± 0.10) × 10-3</td><td>(2.49 ± 0.11) × 10-3</td><td>(2.37 ± 0.11) × 10-3</td><td>(2.35 ± 0.11) × 10-3</td><td>(2.29 ± 0.08) × 10-3</td></tr><tr><td>EKAN-SO(2) (Ours)</td><td>(3.80 ± 3.84) × 10-13</td><td>(3.02 ± 3.05) × 10-13</td><td>(9.66 ± 5.85) × 10-14</td><td>(3.33 ± 1.47) × 10-14</td><td>(3.31 ± 1.31) × 10-14</td></tr><tr><td>EKAN-O(2) (Ours)</td><td>(9.79 ± 6.13) × 10-13</td><td>(1.46 ± 1.30) × 10-13</td><td>(2.99 ± 2.77) × 10-13</td><td>(1.75 ± 1.55) × 10-13</td><td>(7.62 ± 4.91) × 10-14</td></tr></table>
526
+
527
+ Table 6. Equivariant error of different models on the top quark tagging dataset ( $n_{comp} = 3$ ) with different training set sizes. We present the results in the format of mean $\pm$ std.
528
+
529
+ <table><tr><td rowspan="2">Models</td><td colspan="5">Training set size</td></tr><tr><td>102</td><td>102.5</td><td>103</td><td>103.5</td><td>104</td></tr><tr><td>MLP</td><td>(4.94 ± 0.40) × 10-1</td><td>(4.00 ± 0.17) × 10-1</td><td>(3.73 ± 0.05) × 10-1</td><td>(3.24 ± 0.11) × 10-1</td><td>(1.87 ± 0.03) × 10-1</td></tr><tr><td>MLP + augmentation</td><td>(4.73 ± 0.28) × 10-1</td><td>(2.15 ± 0.12) × 10-1</td><td>(1.90 ± 0.55) × 10-1</td><td>(3.73 ± 0.39) × 10-1</td><td>(3.40 ± 0.63) × 10-1</td></tr><tr><td>EMLP-SO+(1,3)</td><td>(2.92 ± 2.30) × 10-6</td><td>(1.09 ± 0.84) × 10-7</td><td>(3.88 ± 1.44) × 10-9</td><td>(3.54 ± 2.47) × 10-9</td><td>(1.65 ± 2.11) × 10-8</td></tr><tr><td>EMLP-SO(1,3)</td><td>(6.81 ± 8.20) × 10-7</td><td>(1.36 ± 1.82) × 10-7</td><td>(5.49 ± 2.92) × 10-9</td><td>(2.69 ± 1.48) × 10-9</td><td>(1.71 ± 0.36) × 10-9</td></tr><tr><td>EMLP-O(1,3)</td><td>(2.41 ± 1.68) × 10-7</td><td>(1.86 ± 1.80) × 10-7</td><td>(6.20 ± 0.59) × 10-9</td><td>(1.14 ± 1.36) × 10-8</td><td>(1.26 ± 0.28) × 10-9</td></tr><tr><td>KAN</td><td>(1.36 ± 1.78) × 10-1</td><td>(1.35 ± 1.77) × 10-1</td><td>(1.34 ± 1.77) × 10-1</td><td>(9.90 ± 14.00) × 10-5</td><td>(1.27 ± 1.79) × 10-1</td></tr><tr><td>KAN + augmentation</td><td>(1.20 ± 1.61) × 10-1</td><td>(2.10 ± 2.97) × 10-3</td><td>(1.10 ± 1.51) × 10-1</td><td>(1.52 ± 2.15) × 10-4</td><td>(1.44 ± 1.78) × 10-1</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>(3.41 ± 2.99) × 10-7</td><td>(1.66 ± 0.85) × 10-8</td><td>(1.62 ± 0.51) × 10-9</td><td>(1.65 ± 1.01) × 10-9</td><td>(1.64 ± 1.53) × 10-9</td></tr><tr><td>EKAN-SO(1,3) (Ours)</td><td>(3.10 ± 1.81) × 10-7</td><td>(1.09 ± 0.60) × 10-8</td><td>(1.11 ± 0.41) × 10-9</td><td>(1.13 ± 0.70) × 10-9</td><td>(1.14 ± 1.10) × 10-9</td></tr><tr><td>EKAN-O(1,3) (Ours)</td><td>(3.14 ± 2.32) × 10-7</td><td>(1.46 ± 0.79) × 10-8</td><td>(1.50 ± 0.46) × 10-9</td><td>(1.50 ± 0.92) × 10-9</td><td>(1.54 ± 1.50) × 10-9</td></tr></table>
530
+
531
+ # G. Implementation Details
532
+
533
+ # G.1. Particle Scattering
534
+
535
+ In particle scattering, we generate training sets of different sizes, and the corresponding test sets have the same sizes as the training sets. We train EKAN using the Adan optimizer (Xie et al., 2024) with the learning rate of $3 \times 10^{-3}$ and the batch size of 500. For datasets with the training set size $< 1000$ , we set the number of epochs to 7000, while for datasets with the training set size $\geq 1000$ , we set the number of epochs to 15000, which is sufficient for the MSE loss to converge to the
536
+
537
+ minimum. We perform this experiment on a single-core NVIDIA GeForce RTX 3090 GPU with available memory of 24576 MiB.
538
+
539
+ # G.2. Three-Body Problem
540
+
541
+ In the three-body problem, we control the number of parameters by adjusting the middle layer width $N$ of the model. We list the correspondence between the model's shape and the number of parameters in Table 7. We train all models using the Adan optimizer (Xie et al., 2024) with the learning rate of $3 \times 10^{-3}$ , the batch size of 500, and for 5000 epochs. The grids of EKAN and KAN are updated every 5 epochs and stop updating at the 50th epoch. We perform this experiment on a single-core NVIDIA GeForce RTX 3090 GPU with available memory of 24576 MiB.
542
+
543
+ Table 7. The correspondence between the model's shape and the number of parameters.
544
+
545
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">104.5</td><td rowspan="2">104.75</td><td colspan="3">Number of parameters</td></tr><tr><td>105</td><td>105.25</td><td>105.5</td></tr><tr><td>MLP</td><td>[48, 111, 111, 111, 12]</td><td>[48, 153, 153, 153, 12]</td><td>[48, 209, 209, 209, 12]</td><td>[48, 283, 283, 283, 12]</td><td>[48, 383, 383, 383, 12]</td></tr><tr><td>EMLP</td><td>[48, 84, 84, 84, 12]</td><td>[48, 110, 110, 110, 12]</td><td>[48, 147, 147, 147, 12]</td><td>[48, 214, 214, 214, 12]</td><td>[48, 281, 281, 281, 12]</td></tr><tr><td>KAN</td><td>[48, 76, 12]</td><td>[48, 134, 12]</td><td>[48, 238, 12]</td><td>[48, 423, 12]</td><td>[48, 752, 12]</td></tr><tr><td>EKAN (Ours)</td><td>[48, 45, 12]</td><td>[48, 88, 12]</td><td>[48, 151, 12]</td><td>[48, 262, 12]</td><td>[48, 457, 12]</td></tr></table>
546
+
547
+ # G.3. Top Quark Tagging
548
+
549
+ In top quark tagging, we train all models using the Adan optimizer (Xie et al., 2024) with the learning rate of $3 \times 10^{-3}$ and the batch size of 500. For datasets with the training set size $\leq 1000$ , we set the number of epochs to 1000, while for datasets with the training set size $>1000$ , we set the number of epochs to 2000, which is sufficient for the BCE loss to converge to the minimum. The grids of EKAN and KAN are updated every 5 epochs and stop updating at the 50th epoch. We perform this experiment on a single-core NVIDIA GeForce RTX 3090 GPU with available memory of 24576 MiB.
550
+
551
+ # H. Additional Experiments
552
+
553
+ For top quark tagging, we increase the number of observed jet components for further comparison. We present the results using the $\mathrm{SO}^{+}(1,3)$ -equivariant network as a representative, while the results of $\mathrm{SO}(1,3)$ and $\mathrm{O}(1,3)$ -equivariant networks are very similar. We set the number of jet components to $n_{comp} = 10$ and $n_{comp} = 20$ respectively, and the experimental results are shown in Tables 8 and 9. Together with Table 3 in Section 6, we note that all models exhibit significant improvements in accuracy as the observed information increases. When $n_{comp}$ is larger, our EKAN achieves comparable results to the baselines, but it does not show superior performance. This suggests that EKAN may only have advantages in scenarios with insufficient observation information (as shown in Table 3), benefiting from its stronger generalization capability.
554
+
555
+ Table 8. Test accuracy (\%) of different models on the top quark tagging dataset ( $n_{comp} = 10$ ) with different training set sizes. We present the results in the format of mean ± std.
556
+
557
+ <table><tr><td rowspan="2">Models</td><td colspan="5">Training set size</td></tr><tr><td>102</td><td>102.5</td><td>103</td><td>103.5</td><td>104</td></tr><tr><td>EMLP-SO+(1,3)</td><td>78.95 ± 2.24</td><td>81.52 ± 0.48</td><td>81.18 ± 0.42</td><td>82.50 ± 0.30</td><td>85.03 ± 0.04</td></tr><tr><td>CGENN</td><td>71.82 ± 3.28</td><td>80.35 ± 0.57</td><td>79.85 ± 1.01</td><td>81.56 ± 0.23</td><td>84.17 ± 0.76</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>78.57 ± 0.63</td><td>79.77 ± 0.78</td><td>82.90 ± 0.61</td><td>84.83 ± 0.19</td><td>87.14 ± 0.03</td></tr></table>
558
+
559
+ Table 9. Test accuracy (%) of different models on the top quark tagging dataset ( $n_{comp} = 20$ ) with different training set sizes. We present the results in the format of mean ± std.
560
+
561
+ <table><tr><td>Models</td><td>102</td><td>102.5</td><td>Training set size 103</td><td>103.5</td><td>104</td></tr><tr><td>EMLP-SO+(1,3)</td><td>83.71 ± 0.49</td><td>83.57 ± 0.69</td><td>83.14 ± 0.35</td><td>85.00 ± 0.35</td><td>86.81 ± 0.14</td></tr><tr><td>CGENN</td><td>76.24 ± 1.28</td><td>82.34 ± 0.80</td><td>81.85 ± 0.40</td><td>84.67 ± 0.87</td><td>86.76 ± 0.50</td></tr><tr><td>EKAN-SO+(1,3) (Ours)</td><td>80.36 ± 1.99</td><td>81.25 ± 0.70</td><td>82.89 ± 1.18</td><td>86.21 ± 0.21</td><td>89.30 ± 0.12</td></tr></table>
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccf46d82f6b7b918b8ab8f26b27ca4e37b43b30ea318ce449e05e86e901d4421
3
+ size 1081331
2025/Incorporating Arbitrary Matrix Group Equivariance into KANs/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/feb8ab08-76a1-436c-8918-999bffcf3ff0_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c7f82c3c86747e6da4e1f8236df9d9ff0b66ef6765e2e2ed37521b09970003f
3
+ size 963843
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61bee2ad9d2a0ea0fb6d7968c01f36c61fe5561baf2d1bf9567fd33d1ea115bb
3
+ size 2707087
2025/Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Independence Tests for Language Models/e4b2dc9a-720f-42da-a026-122dbf194312_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c87f3fecc9da5b83755c99a404cfadbda94f30c2c8abd03a261bc41c4ca1ea81
3
+ size 4656439
2025/Independence Tests for Language Models/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Independence Tests for Language Models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72ac40416519a1cf70d293d15a881f55403cde8a7381634e3d45c87fa4a3734f
3
+ size 1612547
2025/Independence Tests for Language Models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/f994690d-be73-4ed6-90d5-a2e27f325e33_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c97d74c4d3f56f7b0217b87b1ef113d5774c2e2be3cdced8d589857ec1aa62d4
3
+ size 17839626
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/full.md ADDED
@@ -0,0 +1,555 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inducing, Detecting and Characterising Neural Modules: A Pipeline for Functional Interpretability in Reinforcement Learning
2
+
3
+ Anna Soligo<sup>1</sup> Pietro Ferraro<sup>1</sup> David Boyle<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ Interpretability is crucial for ensuring RL systems align with human values. However, it remains challenging to achieve in complex decision making domains. Existing methods frequently attempt interpretability at the level of fundamental model units, such as neurons or decision nodes: an approach which scales poorly to large models. Here, we instead propose an approach to interpretability at the level of functional modularity. We show how encouraging sparsity and locality in network weights leads to the emergence of functional modules in RL policy networks. To detect these modules, we develop an extended Louvain algorithm which uses a novel 'correlation alignment' metric to overcome the limitations of standard network analysis techniques when applied to neural network architectures. Applying these methods to 2D and 3D MiniGrid environments reveals the consistent emergence of distinct navigational modules for different axes, and we further demonstrate how these functions can be validated through direct interventions on network weights prior to inference.
8
+
9
+ # 1. Introduction
10
+
11
+ Reinforcement learning (RL) has emerged as a powerful approach to improve performance in complex decision-making domains. Learning policies directly from interactions can offer improved flexibility and performance, whilst avoiding challenges faced by classical model based control approaches (Song et al., 2023). The growing body of RL research is demonstrating its potential to positively impact diverse real-world domains, from battery manufacturing (Lu et al., 2020) to the design of medical treatment regimes (Coronato et al., 2020), applications which directly impact critical issues such as climate-change and human-health.
12
+
13
+ <sup>1</sup>Imperial College London. Correspondence to: Anna Soligo <anna.soligo18@imperial.ac.uk>.
14
+
15
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
16
+
17
+ However, this breadth of impacts also raises wide-ranging concerns related to topics of safety, reliability and bias, among others. It is thus crucial that the behaviour of RL agents can be properly characterised to the extent that it can be reasonably verified that their impacts align with human values. As reflected in the EU's AI ethics guidelines: systems should allow for human oversight, accountability and transparency (European Commission & High-Level Expert Group on AI, 2019).
18
+
19
+ Currently, there remain fundamental challenges to achieving this, and RL systems rarely afford sufficient interpretability. One factor is the ambiguity regarding what constitutes a suitable 'explanation' of a model. Lipton (2016) considers two parallel concepts: 'simulatability', the ease with which a human can predict a model's output from its input and explanation, and 'decomposability', the extent to which constituent components of a model are themselves interpretable. Doshi-Velez & Kim (2017) reiterate this with the concept of 'cognitive chunks', emphasising the need for model explanations to be tractable to human interpreters.
20
+
21
+ More concretely, interpretability can be considered in terms of the affordances it provides. In some cases, interpretability enables formal verification of safety-relevant capabilities (Bastani et al., 2018). However, in complex, incompletely-defined scenarios, it can instead offer insights which enable downstream safety-relevant tasks, such as system auditing or direct interventions to reduce undesirable behaviours (Kohler et al., 2024; Delfosse et al., 2024).
22
+
23
+ When scaling these affordances to complex domains, interpretability at the level of neurons, or other fundamental model units, becomes problematic: both due to their sheer quantity and because individual neurons are rarely semantically meaningful in isolation (Elhage et al., 2022). We address this challenge by taking a modular approach to interpretability. Modularity is fundamental in diverse biological architectures, including physical structures of the brain (Gazzaniga et al., 2018). Similarly, human-decision making can be considered as decomposable into modular processes (Eppe et al., 2022), suggesting that modularity may offer a natural framework for enhancing human understanding of complex systems.
24
+
25
+ Motivated by this, we demonstrate how training modifications can encourage the emergence of functional modules within RL policy networks. We further propose methods to detect these modules and characterise their behaviour. In doing so, we aim to establish a suitable level of abstraction for aligning model interpretations with our internal decision making frameworks.
26
+
27
+ # 1.1. Contributions
28
+
29
+ Considering interpretability at the level of functional modules, our work makes the following contributions<sup>1</sup>:
30
+
31
+ - We extend recent algorithms for encouraging locality in neural networks (Margalit et al., 2024; Liu et al., 2023; Achterberg et al., 2023) to an RL context, demonstrating that penalizing non-local weights facilitates the emergence of functional modules within policy networks (Section 4.2). These modules offer a scalable unit for decomposing decision making, moving beyond interpretability at the level of neurons.
32
+ - We propose an extended Louvain algorithm for community detection which addresses the limitations of conventional community detection methods when applied to neural networks (Section 3.5). We thus demonstrate the ability to automatically identify functionally cohesive neural modules (Section 4.3) in a manner which enables the scaling of module based interpretability to complex networks.
33
+ - Utilising this approach to module detection, we demonstrate how targeted modifications of network parameters prior to inference can be used to characterise module behaviour, offering an empirical understanding of their functionality (Section 4.6).
34
+
35
+ # 2. Background
36
+
37
+ Following (Glanois et al., 2024), and to avoid confusion arising from the inconsistent use of terms in the literature, we denote interpretability as the extent to which a model's inner workings can be examined and understood. We distinguish this from explainability, which we define as an external understanding of model behaviour generally arising from post hoc attempts at explaining input-output relations. Interpretability and explainability present two approaches to obtaining information which can be used to form explanations for model-behaviour. Specifically, this work takes a direct interpretability approach, learning an inherently more interpretable model architecture.
38
+
39
+ Structural modularity, a property well-studied in network analysis, is characterised by the presence of communities
40
+
41
+ of nodes with denser intra-community connections than inter-community ones. Detection of these communities is an NP-hard problem (Fortunato, 2010), and a multitude of methods have been developed to avoid the brute force approach, including hierarchical clustering, non-negative matrix factorisation (Lee & Seung, 2000), and the Louvain algorithm (Blondel et al., 2008). For the purpose of interpretability, we are further interested in functional modularity: the presence of components which show a level of independence and specialisation in their function (Fodor, 1985; Sternberg, 2011).
42
+
43
+ Functional modularity in the brain arises alongside its 'small-world' architecture: a combination of high clustering and short path length hypothesised to have evolved partially to satisfy spatial and energy constraints (Margalit et al., 2024). Recent works have investigated applying analogous constraints to neural networks. Liu et al. (2023); Achterberg et al. (2023); Margalit et al. (2024) demonstrate that penalising parameter 'connection length' in neural networks can lead to clustering and improved interpretability of network visualisations. We primarily build on the brain-inspired modular training approach proposed by Liu et al. (2023). We extend the concept of distance weighted regularisation to the RL context and further propose methods to extract and characterise functionally relevant modules from these regularised networks, enabling scalable interpretability in a decision making context.
44
+
45
+ # 3. Methods
46
+
47
+ # 3.1. Spatially Aware Regularisation
48
+
49
+ Regularisation approaches encourage sparsity by penalising the magnitude of model parameters. Following (Liu et al., 2023; Achterberg et al., 2023), we extend this to encourage local connectivity by projecting the neural network into Euclidean space and scaling weight penalties by the 'distance' between the neurons they connect.
50
+
51
+ For a network with $L$ weight layers, we denote neuron layers $\mathbf{N}_l$ for $l\in 0,\dots L$ , and weight matrices $\mathbf{W}_l$ for $l\in 0,\dots L - 1$ . Each $\mathbf{W}_l\in \mathbb{R}^{n_l\times n_{l + 1}}$ connects adjacent neuron layers, where $w_{l}^{ij}$ links the $i^{th}$ neuron in $\mathbf{N}_l$ to the $j^{th}$ neuron in $\mathbf{N}_{l + 1}$ . Each neuron, $n_l^i$ , is assigned a 2D coordinate. To preserve their sequential nature, neurons within each layer $\mathbf{N}_l$ share a fixed y-coordinate $y_{l}^{i}\coloneqq l$ . Initial x-coordinates are uniformly spaced as $x_{l}^{i} = \frac{i}{n_{l}}$ .
52
+
53
+ Standard L1 regularisation, $\sum_{i}^{N}|w_{i}|$ , promotes sparsity by penalising the sum of absolute weight values. However, this scales linearly with weight magnitude, such that two weights of size $x$ incur the same penalty as a single weight of $2x$ . We thus introduce a logarithmic sparsity loss, $\sum_{i}^{N}\log (|w_{i}| + 1)$ which provides a greater sparsity incentive by incurring a penalty which scales with $(x + 1)^{k}$ rather than $kx$ . We
54
+
55
+ provide further explanation and analysis in Appendix A. Scaling sparsity by distance gives the 'connection cost' loss:
56
+
57
+ $$
58
+ L _ {c c} = \lambda_ {c c} \sum_ {l = 1} ^ {L} \sum_ {i = 1} ^ {n _ {l - 1}} \sum_ {j = 1} ^ {n _ {l}} \log \left(\left(d _ {i j} - d _ {s}\right) \left| w _ {l} ^ {i j} \right| + 1\right) \tag {1}
59
+ $$
60
+
61
+ where
62
+
63
+ $$
64
+ d _ {i, j} = \sqrt {(x _ {j} - x _ {i}) ^ {2} + (y _ {i} + y _ {j}) ^ {2}}
65
+ $$
66
+
67
+ $\lambda_{cc}$ is the regularisation scaling factor, and $d_{s}$ adjusts the relative impacts of weight 'length' and magnitude.
68
+
69
+ # 3.2. Neuron Relocation
70
+
71
+ To further minimise $L_{cc}$ , neurons are periodically relocated during training, following (Liu et al., 2023). Within each layer, neurons are ranked by their weighted degree $w(n) = \sum |w_{in}| + \sum |w_{out}|$ . The top $k$ neurons are optimised within their layer by exchanging their position with the alternative neuron position which leads to the greatest reduction in $L_{cc}$ , as detailed in Algorithm 1. This has the effect of changing the relative 'cost' of weights, such that weights with a greater impact on performance can be retained with a lower relative connection cost. We discuss this further in Appendix E.2.
72
+
73
+ Algorithm 1 Neuron Position Optimization
74
+ 1: Every $T_{swap}$ training steps:
75
+ 2: for each layer $l$ in $[1, L]$ do
76
+ 3: Calculate weighted degrees: $w(n) = \sum |w_{in}| + \sum |w_{out}|$ for all $n \in N_l$
77
+ 4: Select top $k$ neurons with highest $w(n)$
78
+ 5: for each candidate neuron $n_l^c$ do
79
+ 6: Compute baseline cost $L_{cc}^0$ using Equation 1
80
+ 7: $L_{cc}^{best} \gets L_{cc}^0$ , $n_l^{best} \gets \text{None}$
81
+ 8: for each neuron $n_l^i$ in layer $l$ do
82
+ 9: Calculate $L_{cc}^i$ after swapping positions of $n_l^c$ and $n_l^i$
83
+ 10: if $L_{cc}^i < L_{cc}^{best}$ then
84
+ 11: $L_{cc}^{best} \gets L_{cc}^i$ , $n_l^{best} \gets n_l^i$
85
+ 12: end if
86
+ 13: end for
87
+ 14: if $n_l^{best}$ is not None then
88
+ 15: Swap positions of $n_l^c$ and $n_l^{best}$
89
+ 16: end if
90
+ 17: end for
91
+ 18: end for
92
+
93
+ # 3.3. Structural Modularity in Networks
94
+
95
+ In network analysis, structural modularity is quantified by comparing the strength of intra-community links with their expected strength in a random 'null model', such that high modularity indicates stronger connectivity within a set of defined modules than would occur by chance (Clauset et al., 2004). Given the network partition $P = \{C_1, C_2, \ldots, C_k\}$
96
+
97
+ where the community of node $n^i$ is denoted $C(n^i) \in P$ , modularity $Q$ is defined as:
98
+
99
+ $$
100
+ Q = \frac {1}{2 m} \sum_ {i j \in P} \left(A _ {i j} - \frac {k _ {i} k _ {j}}{2 m}\right) \delta \left(c _ {i}, c _ {j}\right) \tag {2}
101
+ $$
102
+
103
+ where $m = \sum_{lij} w_l^{ij}$ is the sum of all edge weights, $A$ is the network adjacency matrix, $k_i$ is the weighted degree of node $i$ and the binary $\delta(c_i, c_j)$ is a binary variable which equals 1 if nodes $i, j$ share a community. The null model $\frac{k_i k_j}{2m}$ models random connectivity given node orders and acts as the non-modular baseline. This equation forms the basis of the heuristic Louvain algorithm (Blondel et al., 2008), which optimises $P$ to maximise $Q$ through hierarchical local node reassignments.
104
+
105
+ We take the Louvain algorithm as a baseline partitioning approach due to its efficiency $(O(n\log (n)))$ , automatic detection of community number, and relative simplicity. However application to neural networks reveals limitations arising from the differences between NNs and traditional networks. Primarily, the high fan-out connectivity of input features and constrained layer-wise connectivity in MLPs results in Louvain partitions which fail to span sufficient weight layers and violate the directionality of NN information processing. We further discuss and provide of this in Appendix B.
106
+
107
+ # 3.4. Modularity in Feed-forward Neural Networks
108
+
109
+ To address these challenges, we propose two metrics to quantify neural network modularity while accounting for their architecture and the specific utility of modularity for interpretability. Firstly, we consider module isolation. High isolation implies minimal inter-module connectivity, resulting in stricter decomposability and enabling more independent module analysis. For a single module, we define isolation $I(C)$ as:
110
+
111
+ $$
112
+ \mathrm {I} (C) = \frac {\mathbf {W} _ {\text {i n t}}}{\mathbf {W} _ {\text {i n t}} + \mathbf {W} _ {\text {e x t}}} \tag {3}
113
+ $$
114
+
115
+ where $\mathbf{W}_{\mathrm{int}} = \sum_{i,j\in C}|w^{ij}|\mathbf{W}_{\mathrm{ext}} = \sum_{i\in C,j\notin C}|w^{ij}| + \sum_{i\notin C,j\in C}|w^{ij}|$ represents the sum of intra- and intercommunity weights respectively. We extend this to the isolation of a network partition $P$ ..
116
+
117
+ $$
118
+ \mathrm {I} (P) = \left\{ \begin{array}{l l} 0 & \text {i f} | P | = 1 \\ \frac {1}{| P |} \sum_ {C \in P} \mathrm {I} (C) & \text {o t h e r w i s e} \end{array} \right. \tag {4}
119
+ $$
120
+
121
+ Secondly, we consider the alignment between structural and functional modularity by considering correlations between neuron activations. Neuronal correlations have been used to study functional architectures of biological neural networks (Cohen & Kohn, 2011), as well as similarities between artificial neurons (Li et al., 2016). We calculate the Pearson
122
+
123
+ correlation coefficients $r^{ij}$ between each pair of neurons $i, j$ , based on their activations $n^i(t)$ and $n^j(t)$ over $T$ samples.
124
+
125
+ $$
126
+ r ^ {i j} = \frac {\sum_ {t = 1} ^ {T} \left(n ^ {i} (t) - \bar {n} ^ {i}\right) \left(n ^ {j} (t) - \bar {n} ^ {j}\right)}{\sqrt {\sum_ {t = 1} ^ {T} \left(n ^ {i} (t) - \bar {n} ^ {i}\right) ^ {2}} \sqrt {\sum_ {t = 1} ^ {T} \left(n ^ {j} (t) - \bar {n} ^ {j}\right) ^ {2}}} \tag {5}
127
+ $$
128
+
129
+ These correlation values form the adjacency matrix of a functional network graph, $G_{F}$ , in which, unlike the weight-based structural network graph, $G_{S}$ , connections are not constrained to adjacent layers. Given two Louvain partitions, $P_{F} = \{F_{1}, F_{2}, \dots, F_{m}\}$ and $P_{S} = \{S_{1}, S_{2}, \dots, S_{n}\}$ , of these graphs, the Adjusted Rand Index (ARI) quantifies their similarity and thus the 'correlation alignment' of $P_{S}$ :
130
+
131
+ $$
132
+ A R I \left(P _ {F}, P _ {S}\right) = \frac {2 \sum_ {i j} \binom {n _ {i j}} {2} - \left[ \sum_ {i} \binom {s _ {i}} {2} \sum_ {j} \binom {f _ {j}} {2} \right]}{\sum_ {i} \binom {s _ {i}} {2} + \sum_ {j} \binom {f _ {j}} {2} - 2 \sum_ {i j} \binom {n _ {i j}} {2}} \tag {6}
133
+ $$
134
+
135
+ where $n_{ij}$ is the number of nodes shared between modules $i$ of $P_F$ and $j$ of $P_S$ , and $f_i$ and $s_j$ are the total numbers of nodes in modules $i$ and $j$ respectively.
136
+
137
+ # 3.5. Detecting Modules in Neural Networks
138
+
139
+ Utilising these isolation and correlation alignment metrics, we propose a 'fine-tuning' stage which improves the initial Louvain partition $P_{S}$ by iteratively merging modules to maximise the structural and functional modularity of the resulting partition. As detailed in Algorithm 2, functional and structural partitions, $P_{F}$ and $P_{S}$ , are initialised using an 'internal' variation of the Louvain algorithm. This excludes input layer nodes in the initial partitioning, then subsequently assigns them to the community to which they are most strongly connected, mitigating the challenges the input layer poses to module detection. $P_{S}$ is evaluated according to its modularity score $M = I(P_{S}) + ARI(P_{S},P_{F})$ , and adjacent modules are merged in the manner that maximises $M$ , until no further improvement is obtained.
140
+
141
+ # 4. Experiments
142
+
143
+ We evaluate the proposed methods with respect to 4 main research questions. These examine the ability to induce (RQ1), detect (RQ2) and interpret (RQ4) modularity, while considering auxiliary impact on model performance (RQ3).
144
+
145
+ RQ1. Does spatially aware regularization lead to the emergence of modular structures in RL policy networks?
146
+ RQ2. Can emergent modular structures be detected using the proposed extended Louvain algorithm?
147
+ RQ3. What is the quantitative relationship between RL policy modularity and performance?
148
+ RQ4. Do detected network modules correspond to
149
+
150
+ # Algorithm 2 Interpretability Fine-tuning of MLP Modules
151
+
152
+ 1: Initialize $P_{S, \text{current}}$ and $P_F$ using the Louvain algorithm
153
+ 2: In each of $P_{S, \text{current}}$ and $P_F$ , assign each input neuron $n_0^i$ to the community to which it is most strongly connected.
154
+ 3: Calculate initial modularity score $M = I(P_{S, \text{current}}) + ARI(P_{S, \text{current}}, P_F)$
155
+ 4: repeat
156
+ 5: for each pair $(P_i, P_j)$ of adjacent modules do
157
+ 6: Calculate $M_{ij}$ for merged modules
158
+ 7: end for
159
+ 8: if $\max(M_{ij}) > M$ then
160
+ 9: Update $\bar{P}_{S, \text{current}}$ with best merge
161
+ 10: $M\gets \max (M_{ij})$
162
+ 11: end if
163
+ 12: until $\max (M_{ij}) < M$
164
+
165
+ ![](images/47ec7ae32b2f5cc393b8df0bceee0b9cf46a3495c702af4148ea89e2fc96af5c.jpg)
166
+ Figure 1: The Dynamic Obstacles (DO) and Go to Key (G2K) Environments.
167
+
168
+ ![](images/f8a7525600c49bdcb39b472637b77bb57acf3611f65004618c0e5b876da9d8b8.jpg)
169
+
170
+ interpretable and functionally relevant components?
171
+
172
+ # 4.1. Experimental Setup
173
+
174
+ Experiments are conducted in three Minigrid environments (Chevalier-Boisvert et al., 2023; Pignatelli et al., 2024), shown in Figure 1: Go-to-key (G2K), where an agent must navigate to one of two keys in a 4x4 grid; dynamic obstacles (DO), where an agent must reach a goal in a 4x4 grid whilst avoiding three moving obstacles; and 3D dynamic obstacles (3D-DO), which extends dynamic obstacles to a 3x3x2 grid. These are encoded into a symbolic observation of entity coordinates relative to the agent. The action space consists of left, right, up, down, and, in the 3D case, forward, backward steps. Following Pignatelli et al. (2024), a Markov reward function offers a sparse reward of 1 when the target is reached and 0 otherwise. The reported returns thus represent both the mean episode return and the success rate. Episodes terminate on goal completion, collision with obstacles, reaching the incorrect key, or exceeding the 100 step limit.
175
+
176
+ We train all policies using Proximal Policy Optimisation (Schulman et al., 2017) due to its stability and simplicity. The actor and critic networks are implemented as MLPs with two hidden layers of 32 neurons and hyperparameters (Table 1) optimised via grid search. We focus on decision making interpretability, and apply distance weighted regularisation to the actor network. The regularisation coefficient
177
+
178
+ ![](images/bcb489a153fcecb93ed305cd33e338a7e638231bdb1828202821c385eba24153.jpg)
179
+ Figure 2: Distance weighted regularisation induces the emergence of visual modularity. As $\lambda_{cc}$ is increased, increasingly isolated modular structures are observed in the policy networks of the DO (top), 3DO (middle) and G2K (bottom) environments. A moderate decrease in mean return is also observed, as annotated below each network plot.
180
+
181
+ $\lambda_{cc}$ is increased linearly from 0 to its target value between 20 and $30\%$ of training steps. Agents are trained for 4M environment frames, pruned by removing weights and neurons with magnitudes below $1\%$ of the maximum values and orders in their respective layers, then fine-tuned without $L_{cc}$ regularization for 2M frames. This regularization schedule and two-stage training methodology yields improved returns and modularity metrics, as detailed in Appendix C. The PPO agent and environment are implemented in JAX (Bradbury et al., 2018) and trained using a NVIDIA RTX 4090 GPU.
182
+
183
+ # 4.2. Emergence of Visual Modularity (RQ1)
184
+
185
+ Structural modularity emerges as the strength of distance weighted regularisation is increased. As shown in Figure 2, module independence initially emerges in the second and third weight layers, while feature sharing persists in the first. Across all environments, neuron relocation causes the input features and output actions to reorder in a manner that reflects their relevance. Figure 3 shows how feature x, y and z coordinates align vertically with the actions controlling movements on the x, y and z axes respectively. In the DO and 3D-DO environments, modules become fully independent at high $\lambda_{cc}$ values, and networks increasingly prioritise goal features over obstacles. Conversely, the target key ID in the Go to Key task remains used by both navigational modules at all $\lambda_{cc}$ values, reflecting its necessity to solve the task. Figure 4 shows the importance of both the connection cost loss and neuron relocation in inducing this modularity and we provide further ablation results isolating their impacts in Appendix E.
186
+
187
+ ![](images/d8dcacdaf5428ed33bc05eef849af400c8fbb9630f68483e9c23669a5e4495d4.jpg)
188
+ Figure 3: Neuron relocation causes input features and output actions align spatially by function. In the 3D-DO (left) and G2K (right) policy networks, object coordinates align spatially with the actions controlling movements along their corresponding axes.
189
+
190
+ # 4.3. Module Detection (RQ2)
191
+
192
+ We benchmark our proposed fine-tuned internal-Louvain approach against the standard Louvain algorithm, and further evaluate the isolated impacts of the fine-tuning and internal-Louvain modifications. Fine-tuning (FT) significantly increases the average isolation $(16.8\%)$ and correlation alignment $(33.7\%)$ of the detected modules across all $\lambda_{cc}$ values (as detailed in Appendix G). Initialising with the internal Louvain (FT Int.) increases isolation by a further $2.4\%$ but decreases correlation alignment by $1.6\%$ . Notably, this disparity in ARI between the FT and FT Int. methods predominantly arises from differences in the G2K results. While the FT method gives partition ARIs that reach a maximum value at $\lambda_{cc} = 0.11$ before decreasing, the FT Int. method gives a monotonically increasing ARI, which exceeds the FT. ARI for $\lambda_{cc} > 0.07$ . Figures 5 and 6 exemplify these improvements in performance at varying $\lambda_{cc}$ values.
193
+
194
+ The G2K networks retain feature sharing between modules
195
+
196
+ ![](images/698f2d419b42a7af69d2e5c341ce7c84e358dae9c44aee8db9ee7d02b4a97ff1.jpg)
197
+ Figure 4: The combination of distance weighted regularisation and neuron relocation results in the most modular networks. Ablating the distance weighting (left and second left) or the relocation (left and second right) does not achieve the same level of modularity. We provide further quantitative ablation results in Appendix E.2.
198
+
199
+ ![](images/3f8a002dfa7817fc0c7d3200267b9ff4c745967fc8a28f9cd8a8f895334ba166.jpg)
200
+
201
+ ![](images/a294c712d18fbf7325fbffd17f512d180dc46700a78defb4056660bdb8f3f669.jpg)
202
+
203
+ ![](images/b8d43610d33d8a1f5fe1958059b34babab7b9b7bd45c4bf260daa9ba79184260.jpg)
204
+
205
+ in highly regularised networks. This, as detailed in Section 3.3 and Appendix B, presents a failure case for the standard Louvain algorithm, whereby it fails to distinguish modules within the first layer, as can be seen in Figure 6. Since the correlation partitions are less clearly segregated in networks with higher connectivity, and occasionally exhibit this input layer failure, we deem ARI to be a less reliable indicator of modularity at lower $\lambda_{cc}$ values, and therefore adopt the fine-tuned internal method.
206
+
207
+ ![](images/a8079ae67c414b8c97e330d2412986fc11079a37407a8c2a2232da00f0ae2767.jpg)
208
+
209
+ ![](images/3ec759ef7f5e024fbe6fbdc791e98f93ba2957d8d07a365e563722298954a8b0.jpg)
210
+
211
+ ![](images/40d310531ca51e2614f643cc33445cd7f8ea408f1827badbf474450a57b66d05.jpg)
212
+ Figure 5: The modified Louvain algorithm is able to identify functional modules across multiple layers. Our fine-tuned internal Louvain method (right) successfully detects cohesive neural modules, whereas the standard Louvain (left) incorrectly subdivides modules in DO (top) and 3D-DO (bottom) policy networks due to limitations in handling MLP architectures.
213
+
214
+ ![](images/652e3ac217edc4dbba752261060db44ab967ae34e7fd4d83b2c77cd2e7723143.jpg)
215
+
216
+ # 4.4. Quantification of Modularity (RQ1, RQ3)
217
+
218
+ Applying the FT. Int. partitioning method, we find module isolation and correlation alignment increase with $\lambda_{cc}$ , as shown in Figure 7. The induced sparsity, does, however, impact negatively on return. As shown in Figure 8, we find this impact varies significantly by environment. At the point of module emergence, returns decrease by an average of $11.4\%$ and $12.5\%$ for DO and 3D-DO respectively ( $\lambda_{cc} \approx 0.02$ , 0.04), compared to just $0.8\%$ for G2K ( $\lambda_{cc} \approx 0.02$ ). We also find that implementing regularisation and neuron relocation results in an average training time increase of
219
+
220
+ $17\%$ , which, as detailed in Appendix D.1, is largely due to the regularisation component.
221
+
222
+ Despite this performance trade-off, we note that our regularisation approach offers an auxiliary benefit by yielding much smaller networks. At the 'modularity emergence' stage, our final DO, 3D-DO and G2K networks have $90.5\%$ , $96.5\%$ and $89\%$ fewer parameters, respectively, than those trained without regularisation. This offers a means of significantly reducing computational overhead during inference in addition to further potential interpretability benefits.
223
+
224
+ # 4.5. Functional Interpretability (RQ4)
225
+
226
+ While visualisation of network modules offers a level of insight into the structure of decision making, it relies on subjective assessment and lacks scalability. Consequently, we use targeted modification of parameters as an empirical means of interpreting module functionality.
227
+
228
+ For the example networks shown in Figure 9, we systematically modify module parameters in two ways: negative saturation, in which we replace all values with a large negative value of -50; and negation, where we reverse the sign on all parameters. The former aims to effectively disable a module, while the latter aims to perturb it. We evaluate the subsequent behavioural changes over 10,000 episodes, measuring the frequency of actions and their corresponding outcomes: success, failure, or continuation of the episode.
229
+
230
+ Foremost, we find that negatively saturating any individual module strongly inhibits actions along a specific axis. This validates that the detected structural modules correspond to axis specific navigation. Intervening on community 0 in Figure 9a, for example, reduces the frequency of forward/backward actions by $83\%$ , while intervening on community 0 in Figure 9b reduces the frequency of up/down actions by $95\%$ . These results replicate, with slightly reduced functional independence, in less regularised networks like Figure 9c, where community 0 intervention results in a $91\%$ decrease in up/down actions, while community 1 intervention results in a lesser $42\%$ decrease in left/right. Notably, while the overall success rate decreases when we saturate modules in the dynamic obstacles environments,
231
+
232
+ ![](images/17760b10e1a301271a5e15554aad6b31e85d362ee992b11888bf134ecf2bb6ee.jpg)
233
+ Figure 6: The internal Louvain and fine-tuning stage result in modules which are more isolated and better aligned with the activation-based network partition. Utilising the internal Louvain improves module assignment in the input layer, particular in the lesser-regularised example (top), while the fine-tuning stage reduces the subdivision of modules between layers.
234
+
235
+ ![](images/5de4a96a11a184938bacc1dce124680f9f65a0d85c21b0834ec946575305f3bf.jpg)
236
+ Relationship between $\lambda_{\mathrm{CC}}$ and Isolation
237
+ Figure 7: Increasing regularisation strength results in increased module isolation and correlation alignment (ARI). The mean and standard deviation $(\mathrm{n} = 10)$ of isolation (left) and ARI (right) increase with $\lambda_{cc}$ .
238
+
239
+ ![](images/2c30c82a0c22f69dd3cc7b1a7011ec8e96e4c8e4402bdcecad9f0ab92fa8313e.jpg)
240
+ Relationship between $\lambda_{\mathrm{CC}}$ and Adjusted Rand Index
241
+
242
+ ![](images/37110150f4ebea2a9067318a9a5a4b31abd7784984d74e5a4e5bc6d662684097.jpg)
243
+ Relationship between $\lambda_{\mathrm{CC}}$ and Return
244
+ Figure 8: The performance trade-offs observed with increased regularisation strengths vary across environments. The mean and standard deviation of return $(n = 10)$ shows varying levels of performance degradation as $\lambda_{cc}$ is increased in the three environments.
245
+
246
+ ![](images/35c38bb4aec742f740eba2ef7eb8cccd30d2f634d85ee6e5782e1e9a1f549156.jpg)
247
+ (a)
248
+
249
+ ![](images/ae837fa6219b3898aa7d3ae8459e0f425df383e73d370799ae63682f7ade441d.jpg)
250
+ (b)
251
+
252
+ ![](images/269b38113b00ca054affcefcbf4a9a2ba0f1da24ea6397ba06014b58805bfc82.jpg)
253
+ Figure 9: The detected modules specialise in navigation along a specific axes. Examples of partitioned policy networks for (a) 3DDO $(\lambda_{cc} = 0.06)$ , (b) G2K $(\lambda_{cc} = 0.12)$ , (b) G2K $(\lambda_{cc} = 0.02)$ , with the identified module functions described in the legends.
254
+
255
+ the proportion of actions resulting in failures does not increase. This shows that with the achieved level of functional independence, we can disable a module while retaining the decision-making ability of those remaining.
256
+
257
+ Compared to negative saturation, negation has a significantly stronger impact on return: rather than minimising actions along a given axes, the agent now acts incorrectly. For the 3D-DO network presented, we observe an average decrease
258
+
259
+ in return of $73\%$ when a module is negated compared to a decrease of only $36\%$ when a module is negatively saturated. This also reflects in the failure rate: when community 0 in Figure 9b is negatively saturated, we observe that the ratio of success to failure outcomes of up/down actions declines from 37:1 to 9:1. When it is instead negated, this drops to 1:103. Full intervention statistics are given in Appendix H.
260
+
261
+ # 4.6. Learning Robust Pong Polices
262
+
263
+ We additionally train a Pong policy using the same PPO training protocol as the MiniGrid experiments. Due to the simplicity of navigation in Pong, this learns a single sparse module rather than multiple modules as we observe in the Dynamic Obstacle and Go to Key tasks. However, we find that that distance weighted regularisation improves visual interpretability of the network, and enables identification of a flaw in the learnt policy. We find that the sparse Pong policy network retains strong connectivity to the opponents position, which is a consequence of the opponent's 'follow ball' policy and was previously observed by (Delfosse et al., 2024). This reliance means the agent is not robust to changes in opponent policy. We consequently retrain robust Pong policies by removing the opponent position from the observation space, and note only minor decreases in performance. We fully detail these results in Appendix F.
264
+
265
+ # 5. Related Work
266
+
267
+ Existing direct interpretability approaches frequently rely on making fundamental architectural changes in order to build policies from intrinsically interpretable units. Examples include representing policies with differentiable 'soft decision trees', (Silva et al., 2020), symbolic equations (Hein et al., 2017; Landajuela et al., 2021), or weighted combinations of logic rules (Jiang & Luo, 2019; Delfosse et al., 2023). Recent works have extended these frameworks to remove previous barriers to their adoption in RL, for example by enabling on-policy learning of decision trees (Marton et al., 2025), by combining interpretable policies with deep-neural policies to improve performance (Shindo et al., 2024), and by harnessing large language models to improve downstream human interpretability (Luo et al., 2024). However, these methods continue to face scalability challenges, becoming computationally prohibitive in complex scenarios even when indirect policy distillation frameworks are adopted (Glanois et al., 2024). Moreover, interpretability at the level of fundamental model units is rapidly compromised by scaling: a decision tree with an intractable number of nodes, for instance, may be no more interpretable than a network with an intractable number of neurons.
268
+
269
+ Tangentially, the field of mechanistic interpretability takes a bottom up approach to reverse-engineering neural networks, particularly large language models. This can involve the
270
+
271
+ identification of features (Templeton et al., 2024), concept representations (Zou et al., 2023) or computational 'circuits' (Wang et al., 2022). We share the behavioural focus of circuits work, but rather than attempting interpretability at the level of computations, we aim to characterise the roles of higher-level communities of neurons. Notably, recent work has partially automated the circuit-discovery process in transformers (Conmy et al., 2023). This, like our automated module detection, is motivated by the need to improve the scalability of interpretability techniques.
272
+
273
+ Modularity in RL is approached by hierarchical RL, particularly policy tree methods where decision making is decomposed into sub-policies (Pateria et al., 2021). These rely on predefined levels of decomposition, but can afford interpretability when discernible sub-behaviours, such as motor primitives (Merel et al., 2018), are explicitly learnt. More intentionally, Cloud et al. (2024) recently proposed to localise network computations through selectively masking parameter gradients. In contrast to our approach, this gradient-routing approach requires user-defined sets of parameters and data points to control the functional localisation process.
274
+
275
+ Prior work has explored applying biologically inspired connection constraints to neural networks. Achterberg et al. (2023) spatially embed an RNN and penalise connection length, demonstrating energy efficiency and clustering in a one-step inference task. Concurrently, Margalit et al. (2024) proposed to encourage local activation correlation in the training of network layers projected onto simulated cortical sheets. While these studies target the advancement of neuro-scientific understanding, Liu et al. (2023) aim to improve the interpretability of network visualisations. They demonstrate that length-relative weight penalisation reveals structure within regression and classification tasks such as learning mathematical formulae.
276
+
277
+ Community detection in graphs is a significant area of research with relevance to multiple disciplines, including computer science and biology (Fortunato, 2010). Although recent works adapt classical clustering approaches to specialised structures such as multiplex networks (Huang et al., 2021), the challenge of detecting communities within neural networks remains largely unexplored. Filan et al. (2021), study the extent to which non-regularised MLPs can be clustered, and Hod et al. (2022) extend this to determine whether such clusters are more 'coherent' than random sets of neurons. Both rely on spectral clustering (Shi & Malik, 2000), however, which is impractical for large neural networks due to its reliance on computing eigenvectors and predefining the number of communities.
278
+
279
+ # 6. Discussion
280
+
281
+ Interpretability. Our work addresses interpretability at the level of functional modules, targeting a level of abstraction that may offer a suitable balance of tractability and fidelity when scaled to large models. Given a model with emergent modules, we demonstrate how modular functionality can be systematically characterised through targeted weight interventions, enabled by our neural-network specific partitioning approach. We successfully identify module functions, but emphasize that this is a preliminary demonstration of module characterisation in simple environments. Other methods may offer improved insights, notably through activation rather than parameter modifications. This will become particularly relevant in complex architectures and applications, where we expect to achieve less module independence, and where preserving module output distributions will be necessary to preserve the downstream functionality.
282
+
283
+ As introduced in Section 1, interpretability can, in different contexts, enable both formal verification and safety auditing. While we primarily target the latter, due to its broader applicability at scale and given incomplete problem definitions, our sparse, modular approach could also advance formal verification. The extraction of relatively independent modules enables verification to be performed in isolation, reducing complexity and simplifying identification of failures.
284
+
285
+ Scalability. Scalability poses a fundamental challenge to interpretability, and we have aimed to address this at multiple levels. By preserving standard neural network architectures and training, we avoid the scaling limitations faced by white-box model approaches such as decision-tree or logic-based policies. By automating the classification of neurons into modules, we remove reliance on manual approaches to module detection. The subsequent characterisation of module functions through parameter modifications further automates the interpretability process, enabling scalability to complex models embedded in a higher dimensions than the two we consider in this work. Finally, by targeting decomposability at the level of functional modules rather than fundamental units such as neurons, we aim to maintain tractability as model complexity increases, thereby offering a level of simulatability that scales with network size.
286
+
287
+ Limitations and Future Work. The observed trade-off between interpretability and performance, while common among 'white-box' approaches, is undesirable and a barrier to the adoption of interpretable systems. The $\lambda_{cc}$ scaling factor offers a means of tailoring the level of interpretability based on specific requirements, but further investigation into mitigating the performance decline is warranted.
288
+
289
+ We offer a proof-of-concept in three environments, but demonstration in complex domains and agent architectures remains a key direction for future work. While we focus on
290
+
291
+ the RL context, motivated by the relevance of modularity in decision making, this modular approach could be applied more broadly. We also note that while we induce and detect a high level of modularity in our examples, a lower level of spatially aware regularisation may be useful to promote sparsity and functional localisation in a manner which would improve the performance of post-hoc interpretability and explainability approaches.
292
+
293
+ Currently, the lack of formal metrics for interpretability makes it challenging to comparatively evaluate the utility of different interpretability methods. While certain metrics, such as performance, can be objectively measured, the critical notions of interpretation accuracy and tractability still lack rigorous means of evaluation, and the formalisation of these metrics poses an important challenge for advancing interpretable AI. In their absence, we discuss performance, tractability and scope of our approach. Future work exploring specific, real-world use cases could examine how verification or user-studies could be used to validate the utility of this interpretability approach.
294
+
295
+ # 7. Conclusion
296
+
297
+ In this work, we have demonstrated how spatially aware regularisation induces the emergence of structural and functional modularity in the policy networks of RL agents. We develop a novel approach and metrics to quantify and detect modularity in neural networks, and leveraging this, automatically identify and characterise decision-making modules. By addressing interpretability at the level of functional modules rather than fundamental units, we offer a promising balance between fidelity and human tractability. Future work should explore the broad potential applicability of this approach within different model architectures and its scalability to complex, real-world domains.
298
+
299
+ # Acknowledgments
300
+
301
+ The authors thank the IOTA Foundation, Google and UKRI EPSRC [grant numbers EP/Y037421/1 and EP/X040518/1] for supporting this research.
302
+
303
+ # Impact Statement
304
+
305
+ This work advances the interpretability of deep reinforcement learning systems, with direct implications for the safe deployment of RL in real-world applications. The proposed methods could contribute to enhancing human oversight and verification of AI systems through increasing understanding of decision making processes. In addition to enhancing safety, this aligns with growing regulatory requirements and could help accelerate the adoption of RL in safety-critical domains.
306
+
307
+ # References
308
+
309
+ Achterberg, J., Akarca, D., Strouse, D. J., Duncan, J., and Astle, D. E. Spatially embedded recurrent neural networks reveal widespread links between structural and functional neuroscience findings. Nature Machine Intelligence, 5(12):1369-1381, Dec 2023. ISSN 2522-5839. doi: 10.1038/s42256-023-00748-9. URL https://doi.org/10.1038/s42256-023-00748-9.
310
+ Bastani, O., Pu, Y., and Solar-Lezama, A. Verifiable reinforcement learning via policy extraction. CoRR, abs/1805.08328, 2018. URL http://arxiv.org/abs/1805.08328.
311
+ Blondel, V. D., Guillaume, J.-L., Lambiotte, R., and Lefebvre, E. Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10):P10008, oct 2008. doi: 10.1088/1742-5468/2008/10/P10008. URL https://dx.doi.org/10.1088/1742-5468/2008/10/P10008.
312
+ Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
313
+ Chevalier-Boisvert, M., Dai, B., Towers, M., de Lazcano, R., Willems, L., Lahlou, S., Pal, S., Castro, P. S., and Terry, J. Minigrid & miniworld: Modular & customizable reinforcement learning environments for goal-oriented tasks. CoRR, abs/2306.13831, 2023.
314
+ Clauset, A., Newman, M. E. J., and Moore, C. Finding community structure in very large networks. Physical Review E, 70(6), December 2004. ISSN 1550-2376. doi: 10.1103/physreve.70.066111. URL http://dx.doi.org/10.1103/PhysRevE.70.066111.
315
+ Cloud, A., Goldman-Wetzler, J., Wybitul, E., Miller, J., and Turner, A. M. Gradient routing: Masking gradients to localize computation in neural networks, 2024. URL https://arxiv.org/abs/2410.04332.
316
+ Cohen, M. R. and Kohn, A. Measuring and interpreting neuronal correlations. Nature neuroscience, 14(7):811-819, 2011.
317
+ Conmy, A., Mavor-Parker, A. N., Lynch, A., Heimersheim, S., and Garriga-Alonso, A. Towards automated circuit discovery for mechanistic interpretability, 2023. URL https://arxiv.org/abs/2304.14997.
318
+ Coronato, A., Naeem, M., De Pietro, G., and Paragliola, G. Reinforcement learning for intelligent healthcare applications: A survey. Artificial Intelligence in Medicine, 109:101964, 2020. ISSN 0933-3657.
319
+
320
+ doi: https://doi.org/10.1016/j.artmed.2020.101964.
321
+ URL https://www.sciencedirect.com/science/article/pii/S093336572031229X.
322
+ Delfosse, Q., Shindo, H., Dhami, D., and Kersting, K. Interpretable and explainable logical policies via neurally guided symbolic abstraction, 2023. URL https://arxiv.org/abs/2306.01439.
323
+ Delfosse, Q., Sztwiertnia, S., Rothermel, M., Stammer, W., and Kersting, K. Interpretable concept bottlenecks to align reinforcement learning agents, 2024. URL https://arxiv.org/abs/2401.05821.
324
+ Doshi-Velez, F. and Kim, B. Towards a rigorous science of interpretable machine learning, 2017. arXiv:1702.08608.
325
+ Elhage, N., Hume, T., Olsson, C., Schiefer, N., Henighan, T., Kravec, S., Hatfield-Dodds, Z., Lasenby, R., Drain, D., Chen, C., Grosse, R., McCandlish, S., Kaplan, J., Amodei, D., Wattenberg, M., and Olah, C. Toy models of superposition. Transformer Circuits Thread, 2022. https://transformercircuits.pub/2022/toy_model/index.html.
326
+ Eppe, M., Gumbsch, C., Kerzel, M., Nguyen, P. D. H., Butz, M. V., and Wermter, S. Hierarchical principles of embodied reinforcement learning: A review, 2022. URL https://arxiv.org/abs/2012.10147. arXiv: 2012.10147.
327
+ European Commission and High-Level Expert Group on AI. Ethics guidelines for trustworthy ai, 2019. URL https://digital-strategy.ec.europa.eu/en/library/ethics-guidelines-trustworthy-ai.
328
+ Filan, D., Casper, S., Hod, S., Wild, C., Critch, A., and Russell, S. Clusterability in neural networks, 2021. URL https://arxiv.org/abs/2103.03386.
329
+ Fodor, J. A. Precis of the modularity of mind. Behavioral and Brain Sciences, 8(1):1-5, 1985. doi: 10.1017/S0140525X0001921X.
330
+ Fortunato, S. Community detection in graphs. Physics reports, 486(3-5):75-174, 2010.
331
+ Gazzaniga, M., Ivry, R., and Mangun, G. Cognitive Neuroscience: Fifth International Student Edition. International student edition. W.W. Norton, 2018. ISBN 9780393667813. URL https://books.google.co.uk/books?id=1mSbDwAAQBAJ.
332
+ Glanois, C., Weng, P., Zimmer, M., Li, D., Yang, T., Hao, J., and Liu, W. A survey on interpretable reinforcement learning. Machine Learning, 113(8):5847-5890, Aug 2024. ISSN 1573-0565. doi: 10.1007/
333
+
334
+ s10994-024-06543-w. URL https://doi.org/10. 1007/s10994-024-06543-w.
335
+ Hein, D., Udluft, S., and Runkler, T. A. Interpretable policies for reinforcement learning by genetic programming. CoRR, abs/1712.04170, 2017. URL http://arxiv.org/abs/1712.04170.
336
+ Hod, S., Casper, S., Filan, D., Wild, C., Critch, A., and Russell, S. Detecting modularity in deep neural networks, 2022. URL https://openreview.net/forum?id $\equiv$ tFQyjbOz34.
337
+ Huang, X., Chen, D., Ren, T., and Wang, D. A survey of community detection methods in multilayer networks. Data Mining and Knowledge Discovery, 35:1-45, 2021.
338
+ Jiang, Z. and Luo, S. Neural logic reinforcement learning. CoRR, abs/1904.10729, 2019. URL http://arxiv.org/abs/1904.10729.
339
+ Kohler, H., Delfosse, Q., Akhour, R., Kersting, K., and Preux, P. Interpretable and editable programmatic tree policies for reinforcement learning, 2024. URL https://arxiv.org/abs/2405.14956.
340
+ Landajuela, M., Petersen, B. K., Kim, S., Santiago, C. P., Glatt, R., Mundhenk, N., Pettit, J. F., and Faissol, D. Discovering symbolic policies with deep reinforcement learning. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 5979-5989. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/landajuela21a.html.
341
+ Lee, D. and Seung, H. S. Algorithms for non-negative matrix factorization. In Leen, T., Dietterich, T., and Tresp, V. (eds.), Advances in Neural Information Processing Systems, volume 13. MIT Press, 2000. URL https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf.
342
+ Li, Y., Yosinski, J., Clune, J., Lipson, H., and Hopcroft, J. Convergent learning: Do different neural networks learn the same representations?, 2016. URL https://arxiv.org/abs/1511.07543.
343
+ Lipton, Z. C. The mythos of model interpretability. CoRR, abs/1606.03490, 2016. URL http://arxiv.org/abs/1606.03490.
344
+ Liu, Z., Gan, E., and Tegmark, M. Seeing is believing: Brain-inspired modular training for mechanistic interpretability, 2023. URL https://arxiv.org/abs/2305.08746.arXiv:2305.08746.
345
+
346
+ Lu, R., Li, Y.-C., Li, Y., Jiang, J., and Ding, Y. Multi-agent deep reinforcement learning based demand response for discrete manufacturing systems energy management. Applied Energy, 276:115473, 2020. ISSN 0306-2619. doi: https://doi.org/10.1016/j.apenergy.2020.115473. URL https://www.sciencedirect.com/science/article/pii/S0306261920309855.
347
+ Luo, L., Zhang, G., Xu, H., Yang, Y., Fang, C., and Li, Q. End-to-end neuro-symbolic reinforcement learning with textual explanations, 2024. URL https://arxiv.org/abs/2403.12451.
348
+ Margalit, E., Lee, H., Finzi, D., DiCarlo, J. J., Grill-Spector, K., and Yamins, D. L. A unifying framework for functional organization in early and higher ventral visual cortex. Neuron, 112(14):2435-2451.e7, Jul 2024. ISSN 0896-6273. doi: 10.1016/j.neuron.2024.04.018. URL https://doi.org/10.1016/j.neuron.2024.04.018.
349
+ Marton, S., Grams, T., Vogt, F., Lüdtke, S., Bartelt, C., and Stuckenschmidt, H. Mitigating information loss in tree-based reinforcement learning via direct optimization, 2025. URL https://arxiv.org/abs/2408.08761.
350
+ Merel, J., Hasenclever, L., Galashov, A., Ahuja, A., Pham, V., Wayne, G., Teh, Y. W., and Heess, N. Neural probabilistic motor primitives for humanoid control. CoRR, abs/1811.11711, 2018. URL http://arxiv.org/abs/1811.11711.
351
+ Pateria, S., Subagdja, B., Tan, A.-h., and Quek, C. Hierarchical reinforcement learning: A comprehensive survey. ACM Comput. Surv., 54(5), June 2021. ISSN 0360-0300. doi: 10.1145/3453160. URL https://doi.org/10.1145/3453160.
352
+ Pignatelli, E., Liesen, J., Lange, R. T., Lu, C., Castro, P. S., and Toni, L. Navix: Scaling minigrid environments with jax, 2024. URL https://arxiv.org/abs/2407.19396. arXiv:2407.19396.
353
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms, 2017. URL https://arxiv.org/abs/1707.06347.arXiv:1707.06347.
354
+ Shi, J. and Malik, J. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888-905, 2000. doi: 10.1109/34.868688.
355
+ Shindo, H., Delfosse, Q., Dhami, D. S., and Kersting, K. Blendrl: A framework for merging symbolic and neural policy learning, 2024. URL https://arxiv.org/abs/2410.11689.
356
+
357
+ Silva, A., Killian, T., Rodriguez, I. D. J., Son, S.-H., and Gombolay, M. Optimization methods for interpretable differentiable decision trees in reinforcement learning, 2020. URL https://arxiv.org/abs/1903.09338.arXiv:1903.09338.
358
+ Song, Y., Romero, A., Müller, M., Koltun, V., and Scaramuzza, D. Reaching the limit in autonomous racing: Optimal control versus reinforcement learning. Science Robotics, 8(82), September 2023. ISSN 2470-9476. doi: 10.1126/scirobotics.adg1462. URL http://dx.doi.org/10.1126/scirobotics.adg1462.
359
+ Sternberg, S. Modular processes in mind and brain. Cognitive Neuropsychology, 28(3-4):156-208, 2011. doi: 10.1080/02643294.2011.557231. URL https://doi.org/10.1080/02643294.2011.557231. PMID: 22185235.
360
+ Templeton, A., Conerly, T., Marcus, J., Lindsey, J., Bricken, T., Chen, B., Pearce, A., Citro, C., Ameisen, E., Jones, A., Cunningham, H., Turner, N. L., McDougall, C., MacDiarmid, M., Freeman, C. D., Sumers, T. R., Rees, E., Batson, J., Jermyn, A., Carter, S., Olah, C., and Henighan, T. Scaling monoseismicity: Extracting interpretable features from claude 3 sonnet. Transformer Circuits Thread, 2024. URL https://transformer-circuits.pub/2024/scaling-monoseismicity/index.html.
361
+ Traag, V. A. Faster unfolding of communities: Speeding up the louvain algorithm. Physical Review E, 92(3):032801, 2015.
362
+ Wang, K., Variengien, A., Conmy, A., Shlegeris, B., and Steinhardt, J. Interpretability in the wild: a circuit for indirect object identification in gpt-2 small, 2022. URL https://arxiv.org/abs/2211.00593. arXiv: 2211.00593.
363
+ Zou, A., Phan, L., Chen, S., Campbell, J., Guo, P., Ren, R., Pan, A., Yin, X., Mazeika, M., Dombrowski, A.-K., Goel, S., Li, N., Byun, M. J., Wang, Z., Mallen, A., Basart, S., Koyejo, S., Song, D., Fredrikson, M., Kolter, J. Z., and Hendrycks, D. Representation engineering: A top-down approach to ai transparency, 2023. URL https://arxiv.org/abs/2310.01405. arXiv: 2310.01405.
364
+
365
+ # A. Sparsity Methods
366
+
367
+ The L1 norm $(\sum_{i}^{N}x_{i})$ is known to induce sparser solutions than the L2 norm $(\sqrt{(\sum_{i}^{N}x_{i}^{2})}$ due to its having constant gradients with respect to parameter magnitudes. In contrast the gradient of the L2 norm decreases with its magnitude, resulting in an optimisation landscape that preferentially reduces larger parameters rather than promoting sparsity through the elimination of near-zero parameters. However, while an L1 loss function does not directly discourage reducing near-zero parameters, nor does it favour it: the L1 norm optimises for minimal total parameter magnitude, rather than a low count of non-zero parameters, which is what we desire in a sparse model.
368
+
369
+ In contrast, our proposed log-based sparsity loss, $\sum_{i}^{N}\log (|x_{i}| + 1)$ , has a gradient $\frac{\partial}{\partial x_i} = \frac{1}{x_i + 1}$ . This scales inversely with parameter magnitude, thus explicitly promoting sparsity. We note an alternative formulation $exp(\sum_{i}^{N}\log (|x_{i}| + 1))$ , with gradient $\frac{\partial}{\partial x_i} = \prod_{j\neq i}^{N}x_j$ , which similarly directly encourages sparsity as a result of having relatively higher gradients for parameters whose magnitudes are low in the parameter distribution. We adopt the former due to its linear scaling with respect to number of parameters.
370
+
371
+ The comparative behaviour of these functions can also be intuitively understood by observing the gradients and value of the contour plots in Figure 10 when varying $x$ and $y$ .
372
+
373
+ ![](images/bfdd3a9e20edb90fd1eda41a9ffcd289c3e4d87337adf360555c30cb0db4c8a5.jpg)
374
+ Figure 10: Contour plots showing the results of L2, L1, log and exponential-log loss functions for two parameters.
375
+
376
+ In our work, we find that utilising the log rather than L1 based regularisation results in a preferable relationship between return and isolation, and between return and ARI, as shown in Figure 11.
377
+
378
+ ![](images/29bc2c37ce69a1e8c10cdf0bed06cba1fa7c18bcf2e7f8030fbf8a6695fcbee6.jpg)
379
+ Figure 11: The relationship between return and module isolation (left) and between return and ARI (right) for models trained with L1 and log based regularisation, showing that log based sparsity results in more isolated and functionally aligned modules.
380
+
381
+ ![](images/e29157c2e0f783e7caa57b4f7284e70fc4fa97c8613731f0f3e015876d89468d.jpg)
382
+
383
+ # B. Applying the Standard Louvain Algorithm to MLP networks
384
+
385
+ The constrained layer-wise connectivity of MLPs conflicts with the null-model assumption of a uniform connection probability between nodes. The Louvain equation (Equation 2) compares the magnitude of a network connection with its expected strength within a random network with the same node orders $\left(\frac{k_i k_j}{2m}\right)$ . Unlike the arbitrary sub-graphs observed in traditionally modular networks, neural modules form continuously across multiple adjacent layers, with connections only present between consecutive layers. They thus generally exhibit a lower connection density, leading to modules becoming subdivided. Additionally, neural network input layers frequently show high fan-out connectivity patterns where feature information is distributed to multiple downstream neurons. The resulting areas of high connectivity satisfy $Q$ optimization, despite spanning a single weight layer and violating the directionality of information processing in the network.
386
+
387
+ We illustrate these issues in Figure 12, which contrasts a classically modular network architecture with examples of modular MLP networks. While the Louvain algorithm performs well for the former, several 'failure cases' arise in the latter. The green modules exemplify the challenge of distinguishing modules when feature sharing and fan out connectivity occur in the input layer. Furthermore, few of the Louvain detected modules span the full depth of the network, despite it being visually apparent that the network modules do so, which results in the network modules being subdivided.
388
+
389
+ ![](images/dc9b2b26827ba0c59419d107761a3849004bf4e2ba0b11c58dcf85be86e9134c.jpg)
390
+ Figure 12: Examples of the clustering results of the Louvain algorithm when applied to a modular network without layer-wise structural constraints (left), and to modular MLPs. Note the modules (in green) which span multiple modules in the input layer, and the modules which fail to span the full module depth.
391
+
392
+ # C. Hyperparameter and Training Choices
393
+
394
+ Table 1: PPO Hyperparameters
395
+
396
+ <table><tr><td colspan="2">ARCHITECTURE</td></tr><tr><td>HIDDEN SIZE</td><td>32</td></tr><tr><td>NUMBER OF LAYERS</td><td>2</td></tr></table>
397
+
398
+ <table><tr><td colspan="2">TRAINING</td></tr><tr><td>PARALLEL ENVIRONMENTS</td><td>16</td></tr><tr><td>STEPS PER ENVIRONMENT</td><td>128</td></tr><tr><td>MINIBATCHES</td><td>8</td></tr><tr><td>EPOCHS</td><td>16</td></tr><tr><td>LEARNING RATE</td><td>5E-4</td></tr><tr><td>MAX GRADIENT NORM</td><td>0.5</td></tr><tr><td>GAE λ</td><td>0.99</td></tr><tr><td>CLIP ε</td><td>0.2</td></tr><tr><td>ENTROPY COEFFICIENT</td><td>0.01</td></tr><tr><td>VALUE FUNCTION COEFFICIENT</td><td>0.5</td></tr></table>
399
+
400
+ <table><tr><td colspan="2">REGULARISATION</td></tr><tr><td>ds(EQUATION 1)</td><td>0.95</td></tr><tr><td>K (SECTION 3.2)</td><td>10</td></tr><tr><td>RELOCATION INTERVAL (SECTION 3.2)</td><td>2</td></tr></table>
401
+
402
+ # C.1. Pruning and Fine-tuning
403
+
404
+ We prune our networks after $80\%$ of the training steps, and train for the remaining $20\%$ with $\lambda_{cc} = 0$ . Pruning involves setting all weights with a value below $1\%$ of the maximum absolute weight in their layer to 0, and removing all hidden-layer neurons with an order (total sum of incoming and outgoing weights) of less than $1\%$ of the maximum in their layer. Gradients for the removed parameters are masked at 0 for the remainder of training. The pruning fixes a sparse and modular architecture, and we find the fine-tuning with no regularisation improves performance (Figure 13), does not compromise the isolation the modules (Figure 15), and slightly increase their ARI (Figure 16). We select a $1\%$ pruning level because this does not result in a significantly reduced return compared to lower pruning levels, offers a higher level of resulting sparsity (Figure 14), and results in the modules with the highest ARI.
405
+
406
+ ![](images/81838bad471424a81a4a4b1f41eb830972fdbf785f91081f014fd14c5538d751.jpg)
407
+ Figure 13: The relationship between initial return (before pruning and fine-tuning) and post fine-tuning return for different pruning thresholds applied to DO networks with $\lambda_{cc} \in [0.005, 0.1]$ .
408
+
409
+ ![](images/45b888444a02081c813f1eece63eb4132543274a9e94e8612e0a63ee04923739.jpg)
410
+ Figure 14: The fraction of actor weights pruned and the fine-tuned return achieved with different pruning levels applied to networks with $\lambda_{cc} \in [0.005, 0.1]$ .
411
+
412
+ # C.2. Selecting $d_{s}$
413
+
414
+ As introduced in Section 3.1, the value of $d_{s}$ varies the relative significance of distance and weight in regularisation. Primarily, given the range of possible distances between neurons in adjacent layers $d_{s} \in [1, \sqrt{2}]$ , a value of $d_{s} = 1$ means that a weight connecting two vertically aligned neurons contributes 0 to the total connection cost. This is apparent in Figure 17, where networks with $d_{s} = 1$ have a high number of these 'vertical' weights. In contrast, as $d_{s}$ is decreased, we see an increasing number of distant connections in the network.
415
+
416
+ ![](images/2cd63578943e8bdadcb8c4a8b439868c5c7b94cbd9eaf92b84ff2057a4ca0695.jpg)
417
+ Figure 15: The relationship between fine-tuned return and isolation for different pruning levels. With a pruning level of 0, we do not set $\lambda_{cc} = 0$ for fine-tuning, as this allows all weights in the fully connected network to increase, compromising modularity.
418
+
419
+ ![](images/14b9cd2cd0265a833c7065216971fdef3b9fb1aa7b040fa17ad79daf98cc4144.jpg)
420
+ Figure 16: The relationship between fine-tuned return and ARI for different pruning levels.
421
+
422
+ ![](images/854af140222241eb44ceb604b731ee1ac8d0b4cbbfba782e45aeb5ca83df7111.jpg)
423
+ Figure 17: The impact of $d_{s}$ on the structure of the emergent modules (pre-pruning and fine-tuning). The networks shown have varying $\lambda_{cc}$ values, as the scale of the connection cost varies when $d_{s}$ is varied, but where selected to show networks with equivalent returns: top row $r \approx 0.75$ , and bottom row $r \approx 0.82$ .
424
+
425
+ We run all experiments in the main body of our work with $d_{s} = 0.95$ , which was selected by comparing the relation between return, isolation and ARI of networks at different values. The results are plotted in Figure 18 and show that higher $d_{s}$ values result in higher isolation. Despite their high isolation score, we find that the modules detected in $d_{s} = 1$ networks align poorly with the correlation partitions: the resulting ARI values do not exceed 0.3 and do not increase monotonically with regularisation. We find that $d_{s} = 0.9$ offers the greatest ARI relative to return, but the difference between 0.8, 0.9 and 0.95 is relatively minor, so we select $d_{s} = 0.95$ for its significantly higher isolation scores.
426
+
427
+ ![](images/f68323edb9f5f837c137f0236dd54fb5a0e2b0e1db3d36009c83bbe182651c67.jpg)
428
+ Figure 18: The impact of varying $d_{s}$ on the relationship between return and isolation (left) and between return and ARI (right) of the resulting networks' partitions.
429
+
430
+ ![](images/d64141e61bdb630c7858f2219a859032d943ed28afce570e0bb850ab282a220b.jpg)
431
+
432
+ # C.3. $\lambda_{cc}$ Scheduling
433
+
434
+ For the pruning fraction and $d_{s}$ , we select the $\lambda_{cc}$ schedule based on the resulting relationships between return and isolation, and return and ARI. We select a linear introduction of the regularisation loss between 20% and 30% of training steps due its high relative performance with respect to these metrics, as shown in Figure 19.
435
+
436
+ ![](images/bbed8179d79cae6cfafd8441d7e061b20af416921623213b9e848be177d94b63.jpg)
437
+ Figure 19: The impact of different introduction schedules for the CC loss on the relationship between return and isolation (left) and between return and ARI (right) of the resulting networks' partitions. A legend value of [x, y] indicates that $\lambda_{cc}$ was increased linearly between fractions x and y of the total training steps.
438
+
439
+ ![](images/a0f2acc1cf07484b3946a155d0a3b1c996a590a653c7856e088d391197ec2e20.jpg)
440
+
441
+ # D. Runtime Results
442
+
443
+ # D.1. Regularisation and Relocation
444
+
445
+ Figure 20 shows the average compilation and training times for 4M steps, comparing a vanilla PPO implementation with cases where distance weighted regularisation and neuron relocation are implemented in isolation and combined. We find an overall time increase in the combined case of $17\%$ , which is dominated by the introduction of the connection cost loss.
446
+
447
+ ![](images/206f575dc3829eaad74d909da271e093b641fcf92744a9e1c479155a3b24d0a8.jpg)
448
+ Figure 20: The average compilation and training times, for 4M training steps, of the Vanilla PPO implementation compared to PPO with neuron relocation, with distance weighted regularisation, and with both.
449
+
450
+ # D.2. The Extended Louvain Algorithm
451
+
452
+ The Louvain algorithm is commonly assumed to have a runtime complexity of $O(n \log(n))^{23}$ (Huang et al., 2021) where $n$ is the number of nodes. However, no definitive analysis of its time complexity has been performed, and other sources instead find a time complexity of $O(m)$ in the number of edges (Traag, 2015). We compare the duration of the Louvain method to our proposed adaptations, with the caveat that this evaluation is limited by the relatively small scale of networks examined.
453
+
454
+ We observe that for our networks, the standard Louvain time complexity appears to match the $O(m)$ assumption. As our internal version simply applies Louvain but with fewer nodes and edges, it follows that it also has a linearly increasing duration with $m$ , and this is what we observe in Figure 21. The figure further shows the duration of the fine-tuning stage, which also appears to be linear in $m$ . A larger sample of networks, including larger ones, would be necessary to rigorously demonstrate this, however.
455
+
456
+ The calculation of the activation correlation matrix dominates the duration of our extended Louvain, and the duration of this is itself dominated by the model inference over the 10,000 episodes for which we collect activations, as shown in Figure 21. We note that we parallelise these episodes using JAX, so inference over 10,000 episodes takes negligibly longer than over a fewer number of episodes, but at 10,000 we reach the memory constraints of the 24GB GPU. Duration appears to increase slightly as the network size increases, but with multiple outliers. Should activation collections or correlation computations become prohibitive in terms of memory or computation as we scale to larger models, a number of approaches could be taken to reduce the problem size. For example, we could take advantage of the localised nature of our modules, and separately collect and process activations for smaller network regions.
457
+
458
+ ![](images/c1eed93dd5355e9a38fc22808a790d4417e5475ec9c8ff82da327861f1e7f2c0.jpg)
459
+ Figure 21: The observed duration of the Louvain algorithm and of the isolated components of our extended version.
460
+
461
+ ![](images/581b573e6c8def6f7b4205e73bfa6052ee7d199735df6494fec950ca9e631e56.jpg)
462
+
463
+ # E. Emergence of Modularity
464
+
465
+ # E.1. Additional Modularity Examples
466
+
467
+ We show two further examples of modularity emergence for each environment in Figure 22, and further show these networks partitioned using the fine-tuned internal Louvain in Figure 23. We find that the navigational modules emerge consistently and with the same structure in the DO and 3D-DO tasks. In the G2K task, we observe two structures: one which closely resembles the DO modules, and one where an action becomes disconnected from the network (but can still be selected based on its relative logit value compared to the remaining actions). As shown in Figure 23, we are still able to separate X and Y navigational modules controlling the remaining three connected actions.
468
+
469
+ We also show, in Figure 24, the impact of continuing to increase $\lambda_{cc}$ beyond the emergence of fully isolated modules: the prioritisation of goal information increases till these are the only features considered, but at a certain threshold we observe a collapse in both sparsity and return.
470
+
471
+ ![](images/7943ab1ddbb8e0efc871f1b4457f1ea6804385c80e2f4033b9fdf2929baffc68.jpg)
472
+ Figure 22: The emergence of modularity with increasing $\lambda_{cc}$ across two seeds in each environments.
473
+
474
+ ![](images/6db343c2b251f6602fe9fadaf109a0dca9dd0535dc7714e51542b82e7bb14726.jpg)
475
+ Figure 23: The networks shown in Figure 22 partitioned using our fine-tuned internal Louvain approach. The ordering of detected modules varies between $\lambda_{cc}$ values due to randomness in the order in which the Louvain algorithm considers nodes.
476
+
477
+ ![](images/1ce14e17905cd73d35354cb57d577cbf46c49da12f434d6234186bf9b244304f.jpg)
478
+ Figure 24: The network structures and returns observed when continuing to increase $\lambda_{cc}$ above the range considered in the main text.
479
+
480
+ # E.2. Isolating the Impacts of Regularisation, Distance and Relocation
481
+
482
+ While the emergence of visually distinct modules is evidently reliant on local connectivity induced by the connection cost loss and neuron relocation, we here analyse how these protocols contribute to the non-visual modularity measures. We conduct ablation experiments comparing networks trained with and without distance weighting and neuron relocation across different regularization strengths, and show how this affects module isolation and correlation alignment (ARI) in relation to return (Figure 25).
483
+
484
+ Naturally, networks without regularization $(\lambda_{cc} = 0)$ have significantly less isolated modules than any regularized variant. We further find that both distance weighting and relocation increase isolation, but with a diminishing impact as regularisation increases. We expect this occurs because strong sparsity constraints force isolated pathways regardless of their locality. The alignment (ARI) between weight-based and correlation-based partitions shows a different pattern: distance weighting but not relocation increases ARI scores, but in a manner that increases as regularisation increases. Examining sparsity, shown in Figure 26, we observe that distance weighting reduces sparsity relative to return, but relocation compensates for this, particularly at high regularisation levels. This suggests that relocation enables important but initially distant weights to be preserved, allowing sparsity to be achieved in a manner that is less damaging for return.
485
+
486
+ Overall, these results indicate that both distance weighting and relocation contribute to structural modularity, while distance weighting is particularly important for aligning structural and functional modularity. Although these effects are dependant on the strength of regularisation, both are observed in the most useful regularisation ranges where modularity is observed, but the impact on return is still relatively low. Intuitively, the distance weighting encourages additional sparsity and thus isolation by encouraging computations to be distributed across few weights, since each weight beyond the first weight is necessarily longer and more expensive. The neuron relocation likely enables network to restructure in a manner that makes the weights with a greater performance impact shorter and thus less costly, promoting greater sparsity among less important weights (although weight is not a direct measure of importance it appears to be a relatively good proxy for it). This is particularly important given the connection cost scheduling: by the time sparsity is introduced, the network has already learnt effective computations which we wish to preserve. Further analysis will be required to fully understand and formalise how these impacts arise.
487
+
488
+ ![](images/9b54cf45c392eea905b3fea8f0bfec7f844232863c49238de27c49110a4a2b94.jpg)
489
+ Figure 25: The relationships between return and isolation (left) and between return and ARI (right) with the distance weighting and neuron weighting separately ablated, across a range of $\lambda_{cc}$ values([0.005, 0.1] where distance weighting is included and [0.0005, 0.01] otherwise, to achieve equivalent regularisation levels and returns). We include the mean values achieved with the Vanilla PPO case, which corresponds to $\lambda_{cc} = 0$ and no relocation for comparison.
490
+
491
+ ![](images/97b286d38910fd5e3a57f7b8c6e3041764d00ce5cb7e8c4ff5837397cad83e94.jpg)
492
+
493
+ ![](images/17e6f2e561aa1dbab3cc50702ca90415ff4eceb0023e2eead48399aad01e9a8d.jpg)
494
+ Figure 26: The relationships between return and sparsity, defined as the proportion of weights with a magnitude below $1\%$ of the maximum magnitude in their layer, for the ablation cases considered in Figure 25. The vanilla PPO case has a significantly lower mean sparsity of 0.028, so is not shown.
495
+
496
+ # F. Pong Results
497
+
498
+ In this section we demonstrate the utility of our approach on Pong. We show that the sparse training protocol learns a single sparse module, which enables identification of a flaw in learnt Pong policies, as previously identified by Delfosse et al. (2024).
499
+
500
+ We train an MLP policy network on a custom implementation of Pong in JAX, which we modify to return symbolic observations. The observation consists of the agent paddle y position, the opponent paddle y position, the x and y positions of the ball and the x and y velocities of the ball. The opponent adopts the standard 'follow ball' policy and the agent receives sparse rewards of -1 and 1 when the opponent and agents score points respectively. We fix the regularisation parameters $d_{s}$ , $k$ and the relocation intervals to use the same values as the Minigrid experiments, and conduct a small sweep over $\lambda_{cc}$ values. Full training parameters are shown in Table 2.
501
+
502
+ Table 2: PPO Hyperparameters
503
+
504
+ <table><tr><td colspan="2">ARCHITECTURE</td></tr><tr><td>HIDDEN SIZE</td><td>16</td></tr><tr><td>NUMBER OF LAYERS</td><td>2</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">TRAINING</td></tr><tr><td>PARALLEL ENVIRONMENTS</td><td>16</td></tr><tr><td>STEPS PER ENVIRONMENT</td><td>128</td></tr><tr><td>MINIBATCHES</td><td>8</td></tr><tr><td>EPOCHS</td><td>16</td></tr><tr><td>LEARNING RATE</td><td>1E-5</td></tr><tr><td>MAX GRADIENT NORM</td><td>0.1</td></tr><tr><td>GAE λ</td><td>0.99</td></tr><tr><td>CLIP ε</td><td>0.2</td></tr><tr><td>ENTROPY COEFFICIENT</td><td>0.01</td></tr><tr><td>VALUE FUNCTION COEFFICIENT</td><td>0.5</td></tr><tr><td>TRAIN STEPS</td><td>10 M</td></tr><tr><td>PRUNE FRACTION (APPENDIX C.1)</td><td>0.01</td></tr><tr><td>FINETUNE STEPS (APPENDIX C.1)</td><td>10M</td></tr></table>
505
+
506
+ <table><tr><td colspan="2">REGULARISATION</td></tr><tr><td>ds(EQUATION 1)</td><td>0.95</td></tr><tr><td>K (SECTION 3.2)</td><td>10</td></tr><tr><td>RELOCATION INTERVAL (SECTION 3.2)</td><td>2</td></tr><tr><td>λcc SCHEDULING (APPENDIX C.1)</td><td>0.4-0.41</td></tr></table>
507
+
508
+ Unlike in the Minigrid tasks, the Pong agent moves along a single axis. We thus observe a single module in the computational graph, which becomes increasingly sparse as $\lambda_{cc}$ is increased, as shown in Figure 27. We show the impact of regularisation on agent performance and the number of network parameters in Figure 28. Up to a $\lambda_{cc}$ of 0.05, we observe a negligible impact on agent performance, with all policies with $\lambda_{cc} = 0.045$ achieving a perfect average score of 21. Beyond this we observe variability between seeds and a significant deterioration in performance in some cases. As in the Minigrid experiments, the regularisation and pruning also significantly reduces the number of parameters in the network, and we find we can achieve a mean game score of 21 with just 37 parameters.
509
+
510
+ ![](images/a8b3485f01fd8191035c1fb370416034489dc0b18473887395fa05749218987a.jpg)
511
+ Figure 27: We observe sparsity increasing with $\lambda_{cc}$ in the Pong policy network. The simplicity of the task means a single module is learnt.
512
+
513
+ Delfosse et al. (2024) train Successive Concept Bottleneck Agents (SCBots) in the Pong environment and find a brittle reliance on the opponent position in the resulting policies. This is an artefact of the opponent policy, which attempts to keep
514
+
515
+ ![](images/c1dd76f822ce2e35b921ff6b6baac88d55f5d294d70c4aacb7cceb291c9a2ff5.jpg)
516
+ Figure 28: Left: The impact of $\lambda_{cc}$ regularisation on the mean player score at game end, with 21 indicating a $100\%$ win rate. Right: The impact of $\lambda_{cc}$ regularisation on the number of network parameters post pruning, where the baseline non-regularised network uses 435 parameters.
517
+
518
+ ![](images/22dc5b877e30c6c309022a6eddbec6fe388b1c9e757b59a2226a3411f388ccdd.jpg)
519
+
520
+ the paddle centre aligned with the centre of the ball. While this results in high performance in training, it is an example of proxy gaming and is undesirable: if the opponent policy changes, the agent loses the ability to perform its target task of returning the ball.
521
+
522
+ Based on this observation, we retrain a set of policies with the opponent position removed from the observation space. The results, shown in Figure 29, show an increase in score variability at lower $\lambda_{cc}$ values, but still demonstrate the ability to achieve an $100\%$ win rate up to a $\lambda_{cc} = 0.55$ . By necessity, this policy relies solely on agent and ball information and is thus robust to the more realistic scenario of a variable opponent policy.
523
+
524
+ ![](images/a6a615fa7bd834feb6cd4e5f834bb5ee85d255b9ebc99daa07a8a4d54944140c.jpg)
525
+ Figure 29: The impact of $\lambda_{cc}$ regularisation on the mean player score at game end, when the opponent position is removed from the observation space during training.
526
+
527
+ # G. Module Detection Method Data
528
+
529
+ Table 3: The Isolation and Functional Alignment (ARI) of actor network modules detected using the weights, correlation, internal, fine-tuned and fine-tuned internal versions of the Louvain algorithm. Results are averaged across 10 seeds in each of the DO, 3D-DO and G2K environment.
530
+
531
+ <table><tr><td colspan="6">ISOLATION</td></tr><tr><td>λcc</td><td>WLV.</td><td>CLV.</td><td>INT.</td><td>FT</td><td>FT INT.</td></tr><tr><td>0.01</td><td>0.525</td><td>0.434</td><td>0.575</td><td>0.742</td><td>0.775</td></tr><tr><td>0.03</td><td>0.671</td><td>0.667</td><td>0.770</td><td>0.836</td><td>0.899</td></tr><tr><td>0.05</td><td>0.699</td><td>0.669</td><td>0.741</td><td>0.866</td><td>0.924</td></tr><tr><td>0.07</td><td>0.729</td><td>0.657</td><td>0.760</td><td>0.904</td><td>0.945</td></tr><tr><td>0.09</td><td>0.778</td><td>0.671</td><td>0.787</td><td>0.937</td><td>0.943</td></tr><tr><td>0.11</td><td>0.795</td><td>0.711</td><td>0.812</td><td>0.943</td><td>0.940</td></tr><tr><td>0.13</td><td>0.787</td><td>0.728</td><td>0.795</td><td>0.950</td><td>0.949</td></tr><tr><td>0.15</td><td>0.803</td><td>0.708</td><td>0.822</td><td>0.953</td><td>0.949</td></tr></table>
532
+
533
+ <table><tr><td colspan="6">FUNCTIONAL ALIGNMENT (ARI)</td></tr><tr><td>λcc</td><td>WLV.</td><td>CLV.</td><td>INT.</td><td>FT</td><td>FT INT.</td></tr><tr><td>0.01</td><td>0.165</td><td>-</td><td>0.140</td><td>0.305</td><td>0.237</td></tr><tr><td>0.03</td><td>0.273</td><td>-</td><td>0.256</td><td>0.639</td><td>0.462</td></tr><tr><td>0.05</td><td>0.282</td><td>-</td><td>0.273</td><td>0.675</td><td>0.571</td></tr><tr><td>0.07</td><td>0.310</td><td>-</td><td>0.321</td><td>0.676</td><td>0.625</td></tr><tr><td>0.09</td><td>0.335</td><td>-</td><td>0.343</td><td>0.714</td><td>0.715</td></tr><tr><td>0.11</td><td>0.385</td><td>-</td><td>0.436</td><td>0.750</td><td>0.804</td></tr><tr><td>0.13</td><td>0.378</td><td>-</td><td>0.478</td><td>0.724</td><td>0.834</td></tr><tr><td>0.15</td><td>0.383</td><td>-</td><td>0.489</td><td>0.721</td><td>0.825</td></tr></table>
534
+
535
+ Table 4: The Isolation and Functional Alignment (ARI) of actor network modules detected using the weights, correlation, internal, fine-tuned and fine-tuned internal versions of the Louvain algorithm. Results are averaged across 10 seeds in the G2K environment only.
536
+
537
+ <table><tr><td colspan="6">ISOLATION</td></tr><tr><td>λcc</td><td>WLV.</td><td>CLV.</td><td>INT.</td><td>FT</td><td>FT INT.</td></tr><tr><td>0.01</td><td>0.398</td><td>0.423</td><td>0.420</td><td>0.592</td><td>0.656</td></tr><tr><td>0.03</td><td>0.508</td><td>0.549</td><td>0.535</td><td>0.744</td><td>0.754</td></tr><tr><td>0.05</td><td>0.556</td><td>0.517</td><td>0.579</td><td>0.750</td><td>0.764</td></tr><tr><td>0.07</td><td>0.577</td><td>0.517</td><td>0.622</td><td>0.760</td><td>0.812</td></tr><tr><td>0.09</td><td>0.625</td><td>0.508</td><td>0.624</td><td>0.781</td><td>0.800</td></tr><tr><td>0.11</td><td>0.648</td><td>0.541</td><td>0.683</td><td>0.800</td><td>0.791</td></tr><tr><td>0.13</td><td>0.698</td><td>0.607</td><td>0.712</td><td>0.824</td><td>0.821</td></tr><tr><td>0.15</td><td>0.707</td><td>0.539</td><td>0.762</td><td>0.837</td><td>0.820</td></tr></table>
538
+
539
+ <table><tr><td colspan="6">FUNCTIONAL ALIGNMENT (ARI)</td></tr><tr><td>λcc</td><td>WLV.</td><td>CLV.</td><td>INT.</td><td>FT</td><td>FT INT.</td></tr><tr><td>0.01</td><td>0.145</td><td>-</td><td>0.111</td><td>0.346</td><td>0.215</td></tr><tr><td>0.03</td><td>0.180</td><td>-</td><td>0.180</td><td>0.618</td><td>0.398</td></tr><tr><td>0.05</td><td>0.170</td><td>-</td><td>0.195</td><td>0.514</td><td>0.439</td></tr><tr><td>0.07</td><td>0.184</td><td>-</td><td>0.253</td><td>0.560</td><td>0.466</td></tr><tr><td>0.09</td><td>0.196</td><td>-</td><td>0.220</td><td>0.510</td><td>0.519</td></tr><tr><td>0.11</td><td>0.210</td><td>-</td><td>0.361</td><td>0.419</td><td>0.608</td></tr><tr><td>0.13</td><td>0.149</td><td>-</td><td>0.499</td><td>0.311</td><td>0.697</td></tr><tr><td>0.15</td><td>0.145</td><td>-</td><td>0.494</td><td>0.287</td><td>0.652</td></tr></table>
540
+
541
+ # H. Intervention Data
542
+
543
+ We present full action statistics for the networks interpreted in Section 4.6 showing the frequency of actions and their outcomes for the unmodified network, and for versions where modules are modified through negative saturation or negation. We bold the data corresponding to the axes the targeted community is associated with.
544
+
545
+ Table 5: Action Statistics for a 3D-DO network $\left( {{\lambda }_{cc} = {0.06}}\right.$ ,Figure 9a).
546
+
547
+ <table><tr><td></td><td>Directions</td><td>Freq.</td><td>Failure</td><td>Success</td><td>Continue</td></tr><tr><td rowspan="3">Initial Network Return = 0.77</td><td>up/down</td><td>21.33%</td><td>8.62%</td><td>29.67%</td><td>61.71%</td></tr><tr><td>left/right</td><td>42.55%</td><td>8.29%</td><td>21.70%</td><td>70.01%</td></tr><tr><td>fwd/bwd</td><td>36.12%</td><td>9.81%</td><td>37.48%</td><td>52.71%</td></tr><tr><td colspan="6">Negative Saturation</td></tr><tr><td>Community 0</td><td>up/down</td><td>40.74%</td><td>2.11%</td><td>1.20%</td><td>96.69%</td></tr><tr><td rowspan="2">Return = 0.40</td><td>left/right</td><td>52.92%</td><td>2.51%</td><td>1.23%</td><td>96.26%</td></tr><tr><td>fwd/bwd</td><td>6.34%</td><td>3.12%</td><td>6.80%</td><td>90.07%</td></tr><tr><td>Community 1</td><td>up/down</td><td>22.59%</td><td>3.47%</td><td>2.81%</td><td>93.73%</td></tr><tr><td rowspan="2">Return = 0.45</td><td>left/right</td><td>6.18%</td><td>5.72%</td><td>14.34%</td><td>79.94%</td></tr><tr><td>fwd/bwd</td><td>71.23%</td><td>3.49%</td><td>2.03%</td><td>94.48%</td></tr><tr><td>Community 2</td><td>up/down</td><td>6.02%</td><td>4.01%</td><td>15.16%</td><td>80.84%</td></tr><tr><td rowspan="2">Return = 0.53</td><td>left/right</td><td>22.91%</td><td>5.59%</td><td>6.37%</td><td>88.04%</td></tr><tr><td>fwd/bwd</td><td>71.07%</td><td>3.32%</td><td>2.82%</td><td>93.86%</td></tr><tr><td colspan="6">Negation</td></tr><tr><td>Community 0</td><td>up/down</td><td>5.16%</td><td>2.79%</td><td>1.60%</td><td>95.61%</td></tr><tr><td rowspan="2">Return = 0.14</td><td>left/right</td><td>11.14%</td><td>2.43%</td><td>1.12%</td><td>96.45%</td></tr><tr><td>fwd/bwd</td><td>83.70%</td><td>1.15%</td><td>0.02%</td><td>98.83%</td></tr><tr><td>Community 1</td><td>up/down</td><td>0.99%</td><td>10.03%</td><td>4.47%</td><td>85.50%</td></tr><tr><td rowspan="2">Return = 0.09</td><td>left/right</td><td>97.01%</td><td>1.11%</td><td>0.01%</td><td>98.88%</td></tr><tr><td>fwd/bwd</td><td>2.00%</td><td>12.36%</td><td>4.11%</td><td>83.53%</td></tr><tr><td>Community 2</td><td>up/down</td><td>89.59%</td><td>1.00%</td><td>0.01%</td><td>99.00%</td></tr><tr><td rowspan="2">Return = 0.39</td><td>left/right</td><td>3.53%</td><td>8.48%</td><td>13.27%</td><td>78.26%</td></tr><tr><td>fwd/bwd</td><td>6.87%</td><td>5.92%</td><td>8.15%</td><td>85.93%</td></tr></table>
548
+
549
+ Table 6: Action Statistics for a G2K network $\left( {{\lambda }_{cc} = {0.12}}\right.$ ,Figure 9b)
550
+
551
+ <table><tr><td></td><td>Directions</td><td>Freq.</td><td>Failure</td><td>Success</td><td>Continue</td></tr><tr><td rowspan="2">Initial Network Return = 0.94</td><td rowspan="2">up/down left/right</td><td>51.03%</td><td>1.16%</td><td>42.99%</td><td>55.85%</td></tr><tr><td>48.97%</td><td>3.57%</td><td>28.96%</td><td>67.47%</td></tr><tr><td colspan="6">Negative Saturation</td></tr><tr><td>Community 0</td><td>up/down</td><td>2.38%</td><td>1.38%</td><td>12.57%</td><td>86.05%</td></tr><tr><td>Return = 0.35</td><td>left/right</td><td>97.62%</td><td>1.18%</td><td>0.36%</td><td>98.46%</td></tr><tr><td>Community 1</td><td>up/down</td><td>97.05%</td><td>1.23%</td><td>0.41%</td><td>98.36%</td></tr><tr><td>Return = 0.39</td><td>left/right</td><td>2.95%</td><td>1.36%</td><td>13.64%</td><td>85.00%</td></tr><tr><td colspan="6">Negation</td></tr><tr><td>Community 0</td><td>up/down</td><td>98.64%</td><td>1.03%</td><td>0.01%</td><td>98.96%</td></tr><tr><td>Return = 0.14</td><td>left/right</td><td>1.36%</td><td>4.25%</td><td>12.22%</td><td>83.53%</td></tr><tr><td>Community 1</td><td>up/down</td><td>1.07%</td><td>7.79%</td><td>7.53%</td><td>84.68%</td></tr><tr><td>Return = 0.08</td><td>left/right</td><td>98.93%</td><td>1.06%</td><td>0.01%</td><td>98.93%</td></tr></table>
552
+
553
+ Table 7: Action Statistics for a G2K network $\left( {{\lambda }_{cc} = {0.02}\text{,Figure 9c}}\right)$
554
+
555
+ <table><tr><td></td><td>Directions</td><td>Freq.</td><td>Failure</td><td>Success</td><td>Continue</td></tr><tr><td>Initial Network</td><td>up/down</td><td>50.09%</td><td>0.21%</td><td>32.44%</td><td>67.34%</td></tr><tr><td>Return = 0.99</td><td>left/right</td><td>49.91%</td><td>0.41%</td><td>40.51%</td><td>59.07%</td></tr><tr><td colspan="6">Negative Saturation</td></tr><tr><td>Community 0</td><td>up/down</td><td>4.78%</td><td>2.56%</td><td>7.06%</td><td>90.38%</td></tr><tr><td>Return = 0.40</td><td>left/right</td><td>95.22%</td><td>1.36%</td><td>0.63%</td><td>98.00%</td></tr><tr><td>Community 1</td><td>up/down</td><td>72.00%</td><td>1.20%</td><td>0.30%</td><td>98.50%</td></tr><tr><td>Return = 0.16</td><td>left/right</td><td>28.00%</td><td>1.01%</td><td>0.01%</td><td>98.98%</td></tr><tr><td colspan="6">Negation</td></tr><tr><td>Community 0</td><td>up/down</td><td>78.39%</td><td>1.07%</td><td>0.57%</td><td>98.36%</td></tr><tr><td>Return = 0.57</td><td>left/right</td><td>21.61%</td><td>1.04%</td><td>4.47%</td><td>94.50%</td></tr><tr><td>Community 1</td><td>up/down</td><td>82.10%</td><td>1.46%</td><td>1.31%</td><td>97.23%</td></tr><tr><td>Return = 0.49</td><td>left/right</td><td>17.90%</td><td>3.35%</td><td>3.63%</td><td>93.02%</td></tr></table>
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e21d9fa3d1a29fd4da403d17680d6916329d63956e7d35b58958fa5800e721f3
3
+ size 2136009
2025/Inducing, Detecting and Characterising Neural Modules_ A Pipeline for Functional Interpretability in Reinforcement Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/841f12e7-99b9-4c3b-ad8d-0d58c970b961_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bb2a26f799f4e82df04d711723a5926859b0b62309f1cb543717b9e6dfe15e8
3
+ size 9508903
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdf76aeb01b2b4ea53aff01dce7927307856833f2f831d7ea3bb862c91adf5e9
3
+ size 3128047
2025/Inductive Gradient Adjustment for Spectral Bias in Implicit Neural Representations/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Moment Matching/929f3119-89a6-4939-9dff-b3cc5279fa5a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78994af57476b2d85919a139add703fbe9a06ec520147150b63d17cd582722f8
3
+ size 7638352
2025/Inductive Moment Matching/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inductive Moment Matching/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f10ed6984e7b07b3b7e4deae495f7815530c1038c32225d80774f5b684168a7c
3
+ size 3309031
2025/Inductive Moment Matching/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/InfAlign_ Inference-aware language model alignment/1c35563a-de63-47dd-9ad7-ef6ecfe5d47b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad112365dda88210d3017dc5cd8d1a2673d3cb92e6ea27f845730e904727c6d6
3
+ size 6757222
2025/InfAlign_ Inference-aware language model alignment/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/InfAlign_ Inference-aware language model alignment/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d882fa8e15a0df9b338a00029a783f6c53ad34d8c3ea2d45f6b5bf94732cbdf
3
+ size 1254449
2025/InfAlign_ Inference-aware language model alignment/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/86c5abf9-ef89-4028-a016-39df0c3a8597_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:319d829174a0331c3dc7aebbfa2c1869be69b6081e1c2d9ae8c2bb58ec8323ca
3
+ size 15705839
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/full.md ADDED
@@ -0,0 +1,640 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Inference-Time Alignment of Diffusion Models with Direct Noise Optimization
2
+
3
+ Zhiwei Tang $^{1,2}$ Jiangweizhi Peng $^{3}$ Jiasheng Tang $^{2,4}$ Mingyi Hong $^{3}$ Fan Wang $^{2,4}$ Tsung-Hui Chang $^{1,5}$
4
+
5
+ # Abstract
6
+
7
+ In this work, we focus on the alignment problem of diffusion models with a continuous reward function, which represents specific objectives for downstream tasks, such as increasing darkness or improving the aesthetics of images. The central goal of the alignment problem is to adjust the distribution learned by diffusion models such that the generated samples maximize the target reward function. We propose a novel alignment approach, named Direct Noise Optimization (DNO), that optimizes the injected noise during the sampling process of diffusion models. By design, DNO operates at inference-time, and thus is tuning-free and prompt-agnostic, with the alignment occurring in an online fashion during generation. We rigorously study the theoretical properties of DNO and also propose variants to deal with non-differentiable reward functions. Furthermore, we identify that naive implementation of DNO occasionally suffers from the out-of-distribution reward hacking problem, where optimized samples have high rewards but are no longer in the support of the pretrained distribution. To remedy this issue, we leverage classical high-dimensional statistics theory to an effective probability regularization technique. We conduct extensive experiments on several important reward functions and demonstrate that the proposed DNO approach can achieve state-of-the-art reward scores within a reasonable time budget for generation.
8
+
9
+ $^{1}$ School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen, China $^{2}$ DAMO Academy, Alibaba Group $^{3}$ Department of Electrical and Computer Engineering, University of Minnesota, USA $^{4}$ Hupan Lab, Zhejiang Province, China $^{5}$ Shenzhen Research Institute of Big Data. Correspondence to: Zhiwei Tang <zhiweitang1@link.cuhk.edu.cn>.
10
+
11
+ Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
12
+
13
+ # 1. Introduction
14
+
15
+ Diffusion models work by learning to reverse the process of diffusing the data distribution $p(x)$ into noise, which can be described by a stochastic differential equation (SDE) (Song et al., 2020b; Karras et al., 2022): $dx_{t} = f(t)x_{t}dt + g(t)dw_{t}$ , where $dw_{t}$ is the standard Wiener process, and $f(t)$ and $g(t)$ are the drift and diffusion coefficients, respectively. The reverse process relies on the score function $\epsilon (x_{t},t)\stackrel {\mathrm{def.}}{=}\nabla_{x}\log p_{t}(x)$ where $p_t$ denotes the p.d.f of noisy data $x_{t}$ and its closed-form can be expressed either as an ODE or as an SDE: (Song et al., 2020b):
16
+
17
+ $$
18
+ \text {O D E :} d x _ {t} = \left(f (t) x _ {t} - \frac {1}{2} g ^ {2} (t) \epsilon \left(x _ {t}, t\right)\right) d t, \tag {1}
19
+ $$
20
+
21
+ $$
22
+ \mathrm {S D E}: d x _ {t} = \left(f (t) x _ {t} - g ^ {2} (t) \epsilon \left(x _ {t}, t\right)\right) d t + g (t) d w _ {t}. \tag {2}
23
+ $$
24
+
25
+ With the capability to evaluate $\epsilon(x_{t}, t)$ , it becomes possible to generate samples from noise by numerically solving either the ODE (1) or the SDE (2). The training process, therefore, involves learning a parameterized surrogate $\epsilon_{\theta}(x_{t}, t)$ to approximate $\epsilon(x_{t}, t)$ , following a denoising score matching framework as described in (Song et al., 2020b; Karras et al., 2022). Despite the effectiveness of diffusion models in modeling continuous distributions, when deploying these generative models for specific tasks, it is not suitable to sample from the original learned distribution directly, because this distribution has not been aligned with the task-specific objective. For instance, in image generation, users may wish to produce images that are aesthetically pleasing rather than mediocre, or generate images with enhanced brightness, darkness, or compressibility. Recently, the alignment problem has drawn considerable interest in the context of diffusion models, as evidenced by a series of studies such as (Yuan et al., 2024; Song et al., 2023a; Dong et al., 2023; Prabhudesai et al., 2023; Black et al., 2023; Fan et al., 2023).
26
+
27
+ Alignment Problem for Diffusion Models. Given a diffusion model characterized by parameters $\theta$ and its associated distribution $p_{\theta}(x)$ , as well as a reward function $r(x)$ that can assign real-valued scores to generated samples, the central goal of the alignment problem is to adjust the distribution $p_{\theta}(x)$ such that the generated samples maximize the reward from $r(x)$ . In this work, we consider the reward functions
28
+
29
+ to be continuous but possibly non-differentiable. In the following sections, we will provide a comprehensive review of some well-established methods for aligning diffusion models.
30
+
31
+ # 1.1. Methods for Aligning Diffusion Models
32
+
33
+ # 1.1.1. ONLINE/OFFLINE RL METHODS
34
+
35
+ A common mathematical formulation in methods based on Reinforcement Learning (RL) is to maximize the expected reward while ensuring the resulting distribution does not deviate excessively from the original distribution. This can be expressed as the following KL-regularized optimization problem: $\max_p\mathbb{E}_{x\sim p(x)}[r(x)] - \lambda \mathrm{KL}(p||p_\theta)$ . Current RL-based methods can be categorized into online and offline methods based on the data used. In the online method, the algorithm has the capacity to query the reward function throughout the entire optimization process. Two notable online RL methods are DDPO (Black et al., 2023) and DPOK (Fan et al., 2023), which have been shown to improve downstream objectives such as aesthetics and compressibility. Alternatively, research has also delved into the offline RL optimization setting, where an explicit reward function is not accessible and only a fixed preference dataset is utilized. Noteworthy works in this category include Diffusion-DPO (Wallace et al., 2023a) and SPIN-Diffusion (Yuan et al., 2024).
36
+
37
+ # 1.1.2. DIRECT FINE-TUNING METHODS
38
+
39
+ Before delving into the formal description of this method, it is useful to revisit the sampling process of diffusion models, which also serves as the foundation for the rest of this work. Solving the ODE (1) or the SDE (2) typically involves discretizing the time steps into $T$ steps. By starting with the initial noise $x_{T} \sim \mathcal{N}(0, I)$ , the solution process for the ODE (1) can be viewed as a mapping that transforms the initial noise $x_{T}$ into less noisy data through the following process: $x_{t-1} = \mathrm{ODE\_solver}(x_{t})$ , for $t = T, \dots, 1$ . After $T$ steps, the output will be the generated sample $x_{0}$ . Similarly, solving the SDE (2) can be seen as a mapping that gradually converts both the initial noise $x_{T}$ and the entire extra random noise vectors $z_{T}, \dots, z_{1}$ into the generated sample $x_{0}$ , e.g., through the following process: $x_{t-1} = \mathrm{SDE\_solver}(x_{t}, z_{t})$ , for $t = T, \dots, 1$ , where $z_{t}$ is also drawn from standard Gaussian distribution.
40
+
41
+ Remark 1.1. Throughout this work, for simplicity, we adopt only the DDIM sampling algorithm (Song et al., 2020a) for our experiments, as it remains one of the most popular choices for diffusion sampling and, more importantly, supports both ODE-style and SDE-style sampling. To be self-contained, we summarize the notations and procedure of the DDIM sampling method in Appendix A.
42
+
43
+ Diffusion Sampling as a Noise-to-Sample Mapping. From the diffusion sampling process described above, we observe that the sampling process can be conceptualized as an end-to-end mapping $M_{\theta}(z)$ , which translates noise vectors $z$ , sampled from the standard Gaussian distribution, into generated samples. Here, the noise vectors $z$ serve as a unified abstraction for both the $x_{T}$ in the ODE-based sampling process and the $(x_{T}, \{z_{1}, \dots, z_{T}\})$ in the SDE-based sampling process. As we can see, the noise vector $z$ uniquely determines the generated sample from the diffusion models.
44
+
45
+ Two recent studies, AlignProp (Prabhudesai et al., 2023) and DRaFT (Clark et al., 2023), have proposed to directly fine-tune diffusion models using differentiable rewards. Specifically, their optimization objective is formulated as: $\max_{\theta} \mathbb{E}_{z \sim \mathcal{N}(0, I)}[r(M_{\theta}(z))]$ . Both the AlignProp (Prabhudesai et al., 2023) and DRaFT (Clark et al., 2023) methods utilize the ODE-type DDIM solver for the sampling process, specifically employing Algorithm 1 with $\eta = 0$ .
46
+
47
+ # 1.1.3. REWARD GRADIENT GUIDANCE
48
+
49
+ A recent work focusing on loss-guided diffusion models (LGD) (Song et al., 2023a) also examines the concept of aligning diffusion models with differentiable rewards. Unlike the methods mentioned previously, LGD is an Inference-Time alignment method, meaning it does not necessitate modifications to the pretrained model $\theta$ and only works by modifying the inference process. In essence, the core idea of LGD is that, during the sampling process for the ODE (1), it considers a modified version of the ODE by introducing a new term that guides the generation toward areas of higher reward. Specifically, the new ODE is: $dx_{t} = \left(f(t)x_{t} - \frac{1}{2} g^{2}(t)\epsilon (x_{t},t) + \nabla_{x_{t}}r(x_{0}(x_{t}))\right)dt,$ where $x_0(x_t)$ denotes the solution of this ODE starting from $x_{t}$ . However, the gradient term $\nabla_{x_t}r(x_0(x_t))$ is not readily available during generation. To address this, the authors suggest utilizing Monte Carlo estimation to approximate the gradient. Nevertheless, this estimation tends to be noisy and imprecise, leading to suboptimal performance, particularly with complex reward functions.
50
+
51
+ # 1.2. Comparing Existing Methods
52
+
53
+ Existing works can be generally categorized based on two criteria: whether it requires fine-tuning and whether the reward function needs to be differentiable.
54
+
55
+ Inference-Time or Tuning-based Methods. All RL-based methods and the direct fine-tuning method are tuning-based, meaning they necessitate adjustments to the network models $\theta$ . There are two main disadvantages associated with tuning-based methods. The first is that they require fine-tuning for new reward functions, a process that can consume considerable resources, especially when faced with extensive choices for reward functions. The second drawback
56
+
57
+ is that the fine-tuning process typically relies on a limited set of input prompts, which challenges the model to generalize to new and unseen prompts. In contrast, methods such as LGD (Song et al., 2023a) belong to the inference-time category. The main advantage of this approach is its elimination of the need for fine-tuning, allowing it to be flexibly applied in conjunction with any reward functions and input prompts. Further, inference-time methods require significantly fewer computing resources than tuning-based methods. However, the major drawback of inference-time methods is the substantial increase in the time required for the generation process.
58
+
59
+ Differentiable or Non-Differentiable Rewards. Current RL-based methods can work by utilizing solely the value or preference information of the reward functions, therefore they can still work even when the reward function is nondifferentiable. In contrast, the existing direct fine-tuning methods and LGD require the reward function to be differentiable. In practice, working with non-differentiable reward functions is important due to their prevalence. This non-differentiable property can arise from the simulation-based procedures used to compute the reward, or the reward function itself may be a black box.
60
+
61
+ # 1.3. Our Contributions
62
+
63
+ In this work, we focus on inference-time alignment of diffusion models, as we believe that flexibility with the choices of the reward functions, generalization on unseen prompts, and low computing requirements are critical for a broad range of real-world applications. Our primary goal is to design an inference-time alignment method that can match the performance of tuning-based methods by incurring a reasonable additional time cost, and is capable of handling both differentiable and non-differentiable objective functions. To this end, we focus on an under-explored technique for achieving inference-time alignment of diffusion models—Direct Noise Optimization (DNO). Specifically, we make the following contributions:
64
+
65
+ - We conduct a self-contained and comprehensive study for DNO, and demonstrate that noise optimization can be theoretically interpreted as sampling from an improved distribution.
66
+ - We identify out-of-distribution reward-hacking as a critical issue in DNO. To address this issue, we introduce a novel probability-regularized noise optimization method designed to ensure the generated samples remain within the support of pretrained distribution.
67
+ - By developing a novel and highly efficient hybrid gradient approximation strategy, we extend the DNO approach to handle non-differentiable reward functions effectively.
68
+
69
+ - Through the experiments on several important image reward functions, we demonstrate that our proposed method can achieve state-of-the-art scores in comparison to existing alignment methods, without any finetuning on the parameters of diffusion models.
70
+
71
+ # 2. Direct Noise Optimization
72
+
73
+ Given the noise-to-sample mapping $M_{\theta}$ described in Section 1.1.2, DNO can be mathematically formulated as follows:
74
+
75
+ $$
76
+ \max _ {z} r \left(M _ {\theta} (z)\right), \tag {3}
77
+ $$
78
+
79
+ with $z \sim \mathcal{N}(0, I)$ as the initial solution. As we will discuss in Section 3, the Gaussian distribution $\mathcal{N}(0, I)$ serves as an important prior on the optimization variables $z$ . By solving this optimization problem, we can obtain the optimized noise vectors, which are then used to generate high-reward samples. When the reward function $r(\cdot)$ is differentiable, gradient-based optimization methods can be applied to solve the problem efficiently. That is, the following step can be performed iteratively until convergence: $z_{\mathrm{new}} =$ optimizer_step $(z_{\mathrm{old}}, \nabla_z r(M_\theta(z_{\mathrm{old}})))$ , where the optimizer can be either vanilla gradient ascent or adaptive optimization algorithms like Adam (Kingma & Ba, 2014). When the gradient of reward function $r(\cdot)$ is not available, we can leverage techniques from zeroth order optimization (Nesterov & Spokoiny, 2017; Tang et al., 2024a) to estimate the ground-truth gradient $\nabla_z r(M_\theta(z_{\mathrm{old}}))$ , denoted as $\hat{g}(z_{\mathrm{old}})$ , and then apply similarly $z_{\mathrm{new}} =$ optimizer_step $(z_{\mathrm{old}}, \hat{g}(z_{\mathrm{old}}))$ . In Section 4, we provide a dedicated discussion on how to obtain a better estimator for $\hat{g}(z_{\mathrm{old}})$ when the reward function is non-differentiable.
80
+
81
+ Several recent studies have explored similar formulations to (3) across different applications. (Wallace et al., 2023b) investigates the optimization of latent vectors obtained through DDIM-inversion (Song et al., 2020a), aiming to enhance the CLIP score (Radford et al., 2021) and Aesthetic Score (Schuhmann et al., 2022b) of given images. (BenHamu et al., 2024) discusses optimizing the initial noise $x_{T}$ for the ODE process to address inverse problems, leveraging the diffusion model as a prior. (Novack et al., 2024) and (Karunratanakul et al., 2023) consider the optimization of initial noise $x_{T}$ for the ODE with the objective of improving downstream objectives in robotics and audio.
82
+
83
+ While similar methods of DNO has appeared in previous works, many of its technical details remain insufficiently explored. On one hand, there is a lack of a comprehensive framework concerning the design choices, theoretical understanding, and practical challenges associated with DNO for aligning diffusion models. On the other hand, the field has yet to systematically investigate whether DNO, as a
84
+
85
+ inference-time method for aligning diffusion models, can achieve competitive performance compared to tuning-based methods. In this work, we aim to conduct a thorough study on DNO. In the following two sections, we dive deep to understand the theoretical foundation of DNO and discuss a critical design choice ignored in previous works.
86
+
87
+ # 2.1. Understanding Direct Noise Optimization
88
+
89
+ In Appendix B.1, we present a simple example to visualize the process of DNO, where we observed that the distribution of the generated samples shifts toward a distribution on the local maxima of the reward function. Inspired by this example, we propose to view DNO as sampling from an improved distribution. To rigorously describe this evolving process, we define an operator function $g$ to represent a single gradient step, i.e., $g(z) \stackrel{\mathrm{def}}{=} z + \ell \cdot \nabla_{z} r \circ M_{\theta}(z)$ , where $\circ$ denotes the function composition operator and $\ell$ denotes the step size for gradient ascent. Additionally, we define the operator $g_{t}$ , which denotes applying the gradient ascent step for $t$ steps, i.e., $g_{t}(z) = g(g_{t-1}(z))$ with $g_{0}$ being the identity mapping. With these notations, we can now express the distribution after $t$ gradient steps as $p_{t}(x)$ , which is the distribution of $M_{\theta}(g_{t}(z))$ with $z \sim \mathcal{N}(0, I)$ . In the following theorem, we demonstrate that there is a rigorous improvement after every single gradient step, i.e., the distribution $p_{t+1}(x)$ is provably better than $p_{t}(x)$ in terms of expected reward.
90
+
91
+ Theorem 2.1. Assuming that $r \circ M_{\theta}$ is $L$ -smooth, namely, $\| \nabla r \circ M_{\theta}(z) - \nabla r \circ M_{\theta}(z') \| \leq L \| z - z' \|$ for any $z \neq z'$ , it holds true that
92
+
93
+ $$
94
+ \begin{array}{l} \mathbb {E} _ {x \sim p _ {t + 1} (x)} r (x) \geq \mathbb {E} _ {x \sim p _ {t} (x)} r (x) + \\ \left(\ell - \frac {\ell^ {2} L}{2}\right) \mathbb {E} _ {z _ {0} \sim N (0, I)} \left\| \nabla_ {z} r \circ M _ {\theta} (z) _ {| z = g _ {t} (z _ {0})} \right\| _ {2} ^ {2}. \tag {4} \\ \end{array}
95
+ $$
96
+
97
+ In Theorem 2.1, we rely on the smoothness assumption of the composite mapping $r \circ M_{\theta}$ . We note that this is a reasonable assumption in practice, as the noise-to-sample mapping in diffusion models has been observed to be smooth. For instance, see Figure 4 in (Tang et al., 2024a). As described in (4), provided that the step size $\ell$ is less than $\frac{2}{L}$ , the distribution $p_{t+1}(x)$ is strictly better than the previous distribution $p_t(x)$ in terms of expected reward, as long as the second term is non-zero. Based on this result, it is natural to ask: When does the distribution stop improving? Namely, when does the second term in (4) become zero. We provide a detailed discussion to answer this question and also the proof for Theorem 2.1 in Appendix C.
98
+
99
+ # 2.2. Optimizing ODE vs. Optimizing SDE
100
+
101
+ As previously introduced, there are two primary methods for sampling from pretrained diffusion models: one based on solving the ODE (1) and the other on solving the SDE (2). A critical difference lies in the fact that ODE sampling depends exclusively on the initial noise $x_{T}$ , whereas SDE sampling is additionally influenced by the noise $z_{t}$ added at every step of the generation process. It has been noted that existing works on noise optimization (Ben-Hamu et al., 2024; Novack et al., 2024; Karunratanakul et al., 2023) have mainly concentrated on optimizing the initial noise $x_{T}$ for the ODE sampler.
102
+
103
+ ![](images/16ace219852eaddbd5d4a3bb47c596211d6b693c59576f25a442e655d961c7c1.jpg)
104
+ Figure 1. ODE vs. SDE for optimization
105
+
106
+ ![](images/b6c57846b6321047a6046e698eed6fbda9b4132634702e7d459283b126981286.jpg)
107
+
108
+ Different from preceding studies, we explore the utilization of the SDE sampler for noise optimization. Specifically, we employ the DDIM with $\eta = 1$ (Song et al., 2020a) as the SDE sampler and propose to optimize both the added noise $z_{t}$ at every timestep and the initial noise $x_{T}$ . In this context, the dimensionality of the optimized noise significantly surpasses that of ODE sampler, typically $T \cdot d$ v.s. $d$ , where $d$ is the dimension for the learned distribution and $T$ is the number of discretization steps in the sampling process. With this higher dimension for optimization, we have empirically observed that optimizing the SDE-based generation process can be significantly faster than its ODE-based counterpart. This is illustrated in Figure 1, where we juxtapose the optimization speeds between the ODE (DDIM with $\eta = 0$ ) and SDE samplers using both the simple depicted in Figure 5 (Left) and optimizing for stable diffusion in alignment with the aesthetic reward (Right), a major experiment detailed in the subsequent section 5.2. In Appendix D, we also provide a theoretical justification for the better performance of DNO with SDE-Based Sampling.
109
+
110
+ # 3. OOD Reward-Hacking in DNO
111
+
112
+ It has been observed that when aligning generative models (e.g., including autoregressive language models or diffusion models) with reward functions, one can experience the so-called reward-hacking, i.e., the optimized samples yield high rewards but do not possess the desirable properties (Miao et al., 2024; Chen et al., 2024a). Generally, there are two different types of reward-hacking. In the first
113
+
114
+ type, the reward function admits some shortcuts, so the optimized samples score high rewards but remain barely distinguishable from the samples of the pretrained distribution. The second type is related to the generative model used – the optimized samples no longer fall within the support of the pretrained distribution after optimization. We denote this second type of reward-hacking as Out-Of-Distribution (OOD) Reward-Hacking. In this work, we will focus on this second type and reveal that OOD reward-hacking is a common issue in DNO. In Appendix B.2, we provide two visualized examples of the phenomenon of OOD Reward-Hacking using both a 2-dimensional diffusion model and an image diffusion model.
115
+
116
+ One of our key contributions in this work is to identify one critical cause of OOD reward-hacking in noise optimization. That is, the optimized noise vectors stray towards the low-probability regions of the high-dimensional standard Gaussian distribution; in other words, there is an extremely low chance of such noise vectors being sampled from the Gaussian distribution. As diffusion models are originally trained with Gaussian noise, when the noise vectors originate from these low-probability areas—such as vectors comprised entirely of zeros—the neural network within the diffusion models may incur significant approximation errors for these particular inputs. This error, in turn, leads to the generation of out-of-distribution samples. In the subsequent section, we introduce a novel method to measure the extent to which noise is part of the low-probability region by leveraging the classical concentration inequalities for high-dimensional Gaussian distributions.
117
+
118
+ # 3.1. Quantifying Low-Probability Region via Concentration Inequalities
119
+
120
+ High-dimensional Gaussian distributions possess several unique properties. For instance, it is known that the all-zero vector is the most probable in terms of the probability density function (p.d.f) of the standard Gaussian distribution. However, in practice, it is nearly impossible to obtain samples near the all-zero vector from a Gaussian distribution, as it resides within a low-probability region. In high-dimensional statistics, concentration inequalities are usually employed to describe these distinctive properties and delineate the low-probability regions of high-dimensional distributions. In the following lemma, we present two classical inequalities for the standard Gaussian distribution.
121
+
122
+ Lemma 3.1 ((Wainwright, 2019)). Consider that $z_{1}, \ldots, z_{m}$ follow a $k$ -dimensional standard Gaussian distribution. We have the following concentration inequalities for the mean and covariance: $\operatorname{Pr}\left[\left\| \frac{1}{m} \sum_{i=1}^{m} z_{i} \right\| > M\right] < p_{1}(M) \stackrel{\text{def.}}{=} \max \left\{2 e^{-\frac{mM^{2}}{2k}}, 1\right\}$ , $\operatorname{Pr}\left[\left\| \frac{1}{m} \sum_{i=1}^{m} z_{i} z_{i}^{\top} - I_{k} \right\| > M\right] <$
123
+
124
+ $$
125
+ p _ {2} (M) \stackrel {\text {d e f .}} {=} \max \left\{2 e ^ {- \frac {m \left(\max \left\{\sqrt {1 + M} - 1 - \sqrt {k / m} , 0 \right\}\right) ^ {2}}{2}}, 1 \right\}.
126
+ $$
127
+
128
+ In practice, to determine if an $n$ -dimensional vector $z$ lies within a low-probability region, we can factorize $n$ as $n = m \cdot k$ , and divide $z$ into $m$ subvectors: $z = [z_1^1, \dots, z_m^k]$ where $n = m \cdot k$ and $z_i = [z_i^1, \dots, z_i^k] \sim \mathcal{N}(0, I_k)$ . Then, we compute $M_1(z) = \left\| \frac{1}{m} \sum_{i=1}^{m} z_i \right\|$ and $M_2(z) = \left\| \frac{1}{m} \sum_{i=1}^{m} z_i z_i^\top - I_k \right\|$ . Finally, we can determine that $z$ lies in a low-probability region if both $p_1(M_1(z))$ and $p_2(M_2(z))$ are low.
129
+
130
+ Remark 3.2. According to (Wainwright, 2019), these two inequalities in Lemma 3.1 are tight when $m / k$ is large. On the other hand, $k = 1$ is not advisable, as it examines only the mean and variance of the noise vector, but not the covariance of different subvectors. In this work, we empirically found that $k = 2$ serves as a good default choice. In Appendix .7, we provide a more detailed analysis for choosing an appropriate $k$ .
131
+
132
+ An important point to note is that the standard Gaussian distribution is invariant to permutation, i.e., for any permutation matrix $\Pi$ , if $z$ follows a standard Gaussian distribution, the permuted vector $\Pi z$ will have the same probability behavior. With this insight, to increase the robustness of the probability measure $p_1$ and $p_2$ , a natural idea is to examine the probability of many permuted vectors. Specifically, given $q$ permutation matrices $\Pi_1, \ldots, \Pi_q$ , we define the following indicator metric, $P(z) \stackrel{\text{def.}}{=} \min \{p_1(M_1(\Pi_i z)), p_2(M_2(\Pi_i z)), i \in \{1, \ldots, q\}\}$ .
133
+
134
+ Interpretation of $P(z)$ . If the probability $P(z)$ is low, it implies that there exists a permutation matrix $\Pi_i$ such that the noise vector $\Pi_i z$ is in the low-probability region of the standard Gaussian distribution. Therefore, due to the permutation-invariant property, the noise vector $z$ is also less likely to be sampled from the standard Gaussian distribution. In practice, we utilize randomly generated permutation matrices and have found that setting $q = 100$ results in empirically good performance. In Appendix .5, we provide some visualized empirical evidence to show that $P(z)$ serves as a good indicator for determining if the generated samples are OOD.
135
+
136
+ # 3.2. Probability-Regularized Noise Optimization
137
+
138
+ With the insights discussed above, a natural idea for preventing OOD reward hacking is to regularize noise vectors to remain within the high-probability region of the Gaussian distribution. To achieve this, we propose the following Probability-Regularized Noise Optimization problem:
139
+
140
+ $$
141
+ \max _ {z} r (M _ {\theta} (z)) + \gamma \mathbb {E} _ {\Pi} \left[ p _ {1} (M _ {1} (\Pi z)) + p _ {2} (M _ {2} (\Pi z)) \right], \tag {5}
142
+ $$
143
+
144
+ where $\gamma$ is the coefficient used to control the regularization effect. In particular, for the regularization term, we use the expectation of the log probabilities over the permutation matrices, rather than the minimum probability $P(z)$ . This is because the expectation is smoother for optimization purposes.
145
+
146
+ # 4. Tackling Non-Differentiable Rewards
147
+
148
+ In the previous section, DNO method has been applied to optimize differentiable reward functions. However, in many applications the ground-truth gradient of the reward function is unavailable. Such non-differentiable properties can arise from various scenarios; here we present two representative cases. Firstly, the reward may be computed through simulation-based procedures, such as the JPEG-compressibility employed in DDPO (Black et al., 2023), which calculates the size of an image in bits after running a JPEG compression algorithm. Additionally, the reward function itself may be a black box provided through online API providers, as in the setting considered in (Sun et al., 2022). This scenario is common when the reward function is a large neural network model, like those in (Wang et al., 2024a; Lin et al., 2024), making it impossible to directly obtain the gradient for optimization. To address these scenarios, we explore adapting the noise optimization approach to handle the optimization of non-differentiable reward functions by estimating the gradient with function values. Specifically, we explore three methods under this setting.
149
+
150
+ Method 1. Concerning optimization with only function value, a major family of optimization approaches is zeroth-order optimization algorithms, including ZO-SGD (Nesterov & Spokoiny, 2017). This method treats the entire mapping $r \circ M_{\theta}(\cdot)$ as a black-box function and seeks to estimate the gradient of $r \circ M_{\theta}(\cdot)$ via function value queries.
151
+
152
+ Method 2. It is worth noting that for the mapping $r \circ M_{\theta}(\cdot)$ , only the gradient of the reward function $r(x)$ is not available, and we are still able to compute the gradient of $M_{\theta}(z)$ . Therefore, a straightforward idea is to adopt a hybrid gradient approach—only to estimate the gradient of $r$ , while using the ground truth gradient for $M_{\theta}(z)$ . Specifically, we denote that the initial noise is $z$ , and the generated sample is $x = M_{\theta}(z)$ . Firstly, we can estimate the gradient of $\nabla r(x)$ in a similar fashion with the ZO-SGD (Nesterov & Spokoiny, 2017):
153
+
154
+ $$
155
+ H _ {1} (x) = \mathbb {E} _ {\xi \sim \mathcal {N} (0, I)} \left[ \left(r (x + \mu \xi) - r (x)\right) \xi \right], \tag {6}
156
+ $$
157
+
158
+ where $\mu$ is the coefficient for perturbation, and $C_1$ is some constant. With the estimated gradient $H_{1}(x)$ for the reward function $r(x)$ , we can use the following estimated gradient $G_{1}(z)$ for optimization:
159
+
160
+ $$
161
+ G _ {1} (z) \stackrel {\text {d e f .}} {=} H _ {1} (x) \cdot \nabla_ {z} M _ {\theta} (z), \tag {7}
162
+ $$
163
+
164
+ where the main idea is to replace the ground truth $\nabla r(x)$ in the chain-rule of differentiating $r(M_{\theta}(z))$ . We refer this method as Hybrid-1 in the following sections.
165
+
166
+ Remark 4.1. As one can observe, the computation of (7) involves the Jacobian $\nabla_z M_\theta(z)$ . However, it is important to note that when we only require the vector-Jacobian product $H_1(x) \cdot \nabla_z M_\theta(z)$ , it is unnecessary to compute the full Jacobian $\nabla_z M_\theta(z)$ . In Appendix .6, we describe an elegant and efficient way to implement (7) using an auto-differentiation technique.
167
+
168
+ Method 3. There is a crucial drawback in the gradient estimator (6), that one needs to query the reward function $r(\cdot)$ with noisy input $x + \mu \xi$ . When the reward function is only defined on some manifold $\mathcal{M}$ , e.g., defined on the image manifold, rather than the whole space $\mathbb{R}^n$ , this can lead to severe problems, because, for some $x \in \mathcal{M}$ , the noisy sample $x + \mu \xi$ may no longer stay within $\mathcal{M}$ . To remedy this issue, we propose to perturb the sample through the latent noise, rather than directly in the sample space. Specifically, our proposed new gradient estimator for $\nabla r(x)$ is $H_2(x) =$ :
169
+
170
+ $$
171
+ \mathbb {E} _ {\xi} \left[ \left(r \left(M _ {\theta} (z + \mu \xi)\right) - r (x)\right) \left(M _ {\theta} (z + \mu \xi) - x\right) \right]. \tag {8}
172
+ $$
173
+
174
+ Following a similar proof in (Nesterov & Spokoiny, 2017), we can also show that $H_{2}(x) \approx C_{2} \nabla r(x)$ for some constants $C_{2}$ . As we can see, when computing the gradient (8), we ensure that we query the reward function $r(\cdot)$ with only samples that are within the manifold of the pretrained distribution. Similar to Hybrid-1, we can adopt a gradient estimator $G_{2}(z)$ with $H_{2}(x)$ :
175
+
176
+ $$
177
+ G _ {2} (z) \stackrel {\text {d e f .}} {=} H _ {2} (x) \cdot \nabla_ {z} M _ {\theta} (z). \tag {9}
178
+ $$
179
+
180
+ We refer this method (9) as Hybrid-2. As we will see in Section 5.3, this Hybrid-2 method is significantly faster than the other two in terms of optimization speed.
181
+
182
+ # 5. Experiments
183
+
184
+ In this section, we aim to demonstrate the effectiveness of the method proposed above. For all subsequent experiments, we utilize Stable Diffusion v1.5 (Rombach et al., 2022) as the base model for noise optimization. For each figure, we perform the optimization using 1,000 different random seeds and report the average value along with the standard
185
+
186
+ deviation (std) of the results. For comprehensive details regarding the implementation of our proposed methods, as well as information on hyperparameters, we refer readers to Appendices .6 and .7. Additionally, we provide examples to visualize the optimization process in Appendix B. For all the following experiments, unless explicitly stated otherwise, a single run of DNO is performed on a single A800 GPU.
187
+
188
+ # 5.1. Experiments on Image Brightness and Darkness Reward Functions
189
+
190
+ Experiment Design. In this section, we design an experiment to demonstrate the effectiveness of DNO as described in Section 2, and the probability regularization proposed in Section 3.2. We consider two settings: The first involves optimizing the brightness reward, which is the average value of all pixels—the higher this value, the brighter the image becomes—with the prompt "black [animal]", where the token [animal] is randomly selected from a list of animals. The second setting involves optimizing the darkness reward, defined as the negative of the brightness reward, with the prompt "white [animal]". The primary rationale behind designing such experiments is the inherent contradiction between the prompt and the reward, which makes it easier to trigger the OOD reward-hacking phenomenon. Moreover, it is straightforward to verify whether the generated samples are out-of-distribution by simply examining the color of the generated animals. In these experiments, we compare the noise optimization process with and without probability regularization to assess the capability of probability regularization in preventing the OOD reward-hacking phenomenon.
191
+
192
+ Importance of the Brightness and Darkness Reward Functions. While the primary purpose of using these two reward functions is to better examine the effectiveness of probability regularization, it is also important to highlight their practical utility. There is often a genuine need to generate images with extremely dark or bright backgrounds, which cannot be achieved by the base models through prompting alone, as reported in the notable research by (CrossLabs, 2023).
193
+
194
+ Measuring the Degree of OOD. As observed in this experiment, the reward function contradicts the input prompt, leading to an inconsistency between the generated samples and the prompt. Therefore, we utilize the CLIP Score (CS) (Radford et al., 2021), a commonly used metric for measuring the semantic similarity between images and text descriptions, to gauge the degree of OOD for the generated samples. A higher CS indicates that the sample is less likely to be out-of-distribution (OOD). In addition to the CS, we also use an MLLM-based score to measure the degree of OOD, specifically employing the Image-Text Matching (ITM) score from (Wang et al., 2024a) as the metric.
195
+
196
+ ![](images/fce1109dfa96204e8555b975b20a597e1d3ea307fb4e1d157e5c9f8a678241bf.jpg)
197
+ Figure 2. Comparison of DNO with and without probability regularization. Upper row: Optimizing for the brightness reward, i.e., the average value of all pixels in the images. Lower row: Optimizing for the darkness reward, i.e., the negative of the brightness reward. The x-axis refers to the number of gradient ascent steps during optimization.
198
+
199
+ Results. In Figure 2, we first observe that adding the regularization term leads to a mildly slower optimization process. However, the generated samples are much more consistent with the prompt throughout the entire optimization process, as reflected by the CS and ITM curves. The trajectory of $P(z)$ further corroborates that it is a good indicator of the OOD phenomenon, as it is positively associated with CS and ITM. We also provide visualized examples in Appendix B.3, which also confirm that the probability regularization proposed in Section 3.2 can effectively prevent the generated samples from becoming OOD.
200
+
201
+ Generating Images with Purely Bright/Dark Backgrounds. From the images in Figure 7 of Appendix B.3, we observe that DNO with regularization can lead to images with purely dark or bright backgrounds. It is worth noting that this is a remarkable result, as DNO requires no fine-tuning. Notably, as discussed in (CrossLabs, 2023), such an effect can only be achieved by fine-tuning the diffusion models using a technique called Offset-Noise.
202
+
203
+ # 5.2. Benchmarking on Three Human-Aligned Reward Functions
204
+
205
+ Setting. In this section, we investigate the performance of the proposed method using three common reward functions trained from human feedback data, specifically Aesthetic Score (Schuhmann et al., 2022b), HPS-v2 score (Wu et al., 2023), and PickScore (Kirstain et al., 2023), respectively. In this experiment, we also compare noise optimization with and without probability regularization. However, compared to the reward function used in the previous section, using these reward functions presents a lesser chance for the optimized image to be OOD. In this case, to measure the benefit of probability regularization in maintaining the quality of the generated sample, we consider using the other two reward functions as test metrics when optimizing one of them. For the prompt dataset, we follow (Clark et al., 2023; Black et al., 2023) to use a simple animals prompt dataset.
206
+
207
+ Results. Firstly, we observe that the effect of probability regularization is less pronounced than that in Section 5.1. This observation is also reflected by our proposed indicator $P(z)$ ; if no regularization is applied, the value of $P(z)$ in Figure 3 decreases much slower than that in Figure 2. Nonetheless, by adding the regularization term to noise optimization, we can stabilize the value of $P(z)$ throughout the optimization process and also improve the test metrics. For instance, when optimizing the aesthetic reward, the regularization has no significant effect on the optimization speed, while it prevents the test metrics, i.e., the HPS score and Pick Score, from decreasing throughout the process.
208
+
209
+ ![](images/155c4bc563675039a5d3aa717b1767a98e0173283f65a059401dca7de3fccde6.jpg)
210
+ Figure 3. Comparison of running DNO with three human-like reward functions, with and without regularization. When optimizing one reward function, the other two are used as test metrics. A, H, P are short for Aesthetic Score, HPS Score, and Pick Score, respectively. The name for each line comprises the used reward function and whether the regularization is used. For example, A + w/ reg means optimizing aesthetic score with regularization.
211
+
212
+ Comparison to Existing Alignment Methods. We summarize the performance of DNO with probability regularization from Figure 3 into Table 1 and compare it to the major existing alignment methods discussed in the introduction. As shown, the performance of DNO matches that of state-of-the-art tuning-based alignment methods without any fine-tuning on the network models, all within a reasonable time budget for generation. More importantly, we demonstrate that DNO provides an worthwhile trade-off between inference time and the reward of the generated samples. On one hand, another inference-time method, LGD (Song et al., 2023a), performs poorly with these complex reward functions, as it is impossible to estimate the gradient of the reward functions without a complete generation process. On the other hand, we also examined the most fundamental inference-time alignment algorithm, Best-of-N (BoN) Sampling, which generates N samples and selects the one with the highest reward. In this experiment, we fix the time budget for BoN to 10 minutes, and we observe that DNO outperforms it by a large margin, demonstrating that DNO presents a highly advantageous trade-off between inference time and reward.
213
+
214
+ Using Fewer Steps to Reduce Inference Time. In Figure 3, we show that our proposed DNO can achieve high reward values within approximately 3-5 minutes. While this already represents a highly advantageous performance, 3-5 minutes of optimization may still be prohibitively long in practice. However, we note that reducing the number of dif
215
+
216
+ fusion steps can significantly decrease optimization time. In Table 1, we fix the diffusion steps to 50, as this is the setting used by all other algorithms to ensure a fair comparison. In practice, 50 diffusion steps is a fairly long choice, and using 15-25 steps can still result in sufficiently good samples. Therefore, in Table 2, we present the performance of DNO with different numbers of denoising steps, fixing the time budget to 1 minute, as well as other hyperparameters like learning rate and regularization coefficient. As Table 2 shows, with 15 diffusion steps, DNO can achieve high reward values within 1 minute.
217
+
218
+ Finally, we would like to highlight that this alignment process can run with memory usage of less than 15GB, and thus can easily fit into just one consumer-level GPU. In contrast, current tuning-based methods require significantly more computing resources, typically 4-8 advanced GPUs like A100 (Black et al., 2023; Prabhudesai et al., 2023).
219
+
220
+ # 5.3. Optimization for Non-Differentiable Reward Functions
221
+
222
+ Setting. In this section, we aim to explore the three extensions proposed in Section 4 for handling non-differentiable reward functions. For Method 1, we use ZO-SGD (Nesterov & Spokoiny, 2017), and compare it with our proposed Hybrid-1 and Hybrid-2. We consider using two reward functions: The Jpeg Compressibility score, which is the file size of the image after compressing it using the JPEG algorithm. This reward function was also used in (Black et al., 2023) and is intrinsically non-differentiable. The second reward function is the Aesthetic Score used in the previous section. Unlike previous experiments, in this section we treat the Aesthetic Score as a non-differentiable reward function for optimization. The goal is to simulate a scenario where the neural network model of the Aesthetic Score can only be queried via an API provider that returns the score rather than its gradient. We compare the three methods in terms of optimization steps and the final score of the reward function. For ease of demonstration, we do not add the probability regularization term to the optimization process. Moreover, it is important to note that in these three methods, the major time expenditure comes from estimating the gradient with finite samples. For a fair comparison among these methods, we set the number of samples for estimating the gradient separately so that the total time spent estimating the gradient is the same for all three methods.
223
+
224
+ Results. The main results are visualized in Figure 4. For better visualization purposes, when plotting the line for ZOSGD, we compute and plot the current best reward instead of the current reward due to the extremely high variance. Initially, we observe that the Hybrid-2 method is significantly faster than the other two methods, and the final score is also higher for both reward functions used in this experi
225
+
226
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">SD v1.5
227
+ 2s</td><td colspan="2">LGD</td><td rowspan="2">SPIN
228
+ ~ 20h</td><td rowspan="2">DDPO
229
+ ~ 56h</td><td rowspan="2">AlignProp
230
+ ~ 12h</td><td colspan="3">DNO (This work)</td><td rowspan="2">BoN
231
+ 10 min</td></tr><tr><td>n=10</td><td>n=100</td><td>1 min</td><td>3 min</td><td>5 min</td></tr><tr><td>Aesthetic ↑</td><td>5.367</td><td>5.340</td><td>5.224</td><td>6.248</td><td>7.180</td><td>8.940</td><td>5.754</td><td>7.202</td><td>8.587</td><td>6.531</td></tr><tr><td>HPS ↑</td><td>0.278</td><td>0.276</td><td>0.271</td><td>0.276</td><td>0.287</td><td>0.330</td><td>0.285</td><td>0.303</td><td>0.324</td><td>0.298</td></tr><tr><td>PickScore ↑</td><td>21.11</td><td>21.01</td><td>21.09</td><td>22.00</td><td>/</td><td>/</td><td>21.25</td><td>23.17</td><td>25.13</td><td>22.09</td></tr></table>
232
+
233
+ Table 1. Performance comparison. For SD v1.5 and DNO, we annotate the generation time below the name. For LGD, we annotate the number of samples used for Monte Carlo approximation. For SPIN, DDPO, and AlignProp, we annotate the estimated time for fine-tuning. All time costs in the table are measured with respect to the GPU time on a single A800 GPU. Baselines: LGD (Song et al., 2023a), SPIN (Yuan et al., 2024), DDPO (Black et al., 2023), AlignProp (Prabhudesai et al., 2023), Best-of-N (BoN).
234
+
235
+ <table><tr><td>T</td><td>10</td><td>15</td><td>20</td><td>25</td><td>50</td></tr><tr><td>Aesthetic ↑</td><td>6.992</td><td>7.496</td><td>6.773</td><td>6.381</td><td>5.754</td></tr><tr><td>HPS ↑</td><td>0.342</td><td>0.341</td><td>0.306</td><td>0.293</td><td>0.285</td></tr><tr><td>PickScore ↑</td><td>23.98</td><td>24.82</td><td>23.69</td><td>23.02</td><td>21.25</td></tr></table>
236
+
237
+ Table 2. Running DNO with different numbers of diffusion steps $T$ , while fixing the time budget to 1 minute.
238
+
239
+ ![](images/75b6a050513ca271f511b53d31db47ed361693fb675ad7ef78090bf828722ce4.jpg)
240
+ Figure 4. Comparing three methods on two reward functions.
241
+
242
+ ment. Furthermore, in both scenarios, the ZO-SGD method exhibits the slowest optimization speed. Another interesting finding is the poor performance of Hybrid-1 in optimizing the Aesthetic Reward. This mainly occurs because the aesthetic reward function can only work with image inputs, which validates our initiative to propose the Hybrid-2 method in Section 4. Finally, when comparing the optimization of the aesthetic score in Figures 3 and 4, we can also note that using the true gradient results in substantially fewer steps than using the estimated gradient.
243
+
244
+ # 6. Conclusions
245
+
246
+ In this work, we present a comprehensive study on Direct Noise Optimization (DNO) for aligning diffusion generative models at inference-time. We introduce variants of DNO designed to efficiently address challenges such as out-of-distribution reward-hacking and the optimization of non-differentiable reward functions. More significantly, we demonstrate the exceptional efficacy of DNO, underscoring its capacity to rival tuning-based methods. The primary limitation of DNO lies in its integration with the sampling process of diffusion models, leading to a substantial increase in processing time compared to direct sampling. Nonetheless, we show that our approach is able to provide a reasonable performance for real-world systems.
247
+
248
+ less, we argue that the additional time cost, being within a reasonable and acceptable range, is a worthwhile tradeoff for attaining high-reward generated samples in a wide range of real-world applications. We anticipate DNO gaining greater attention in future research and applications due to its flexibility to accommodate any reward function—or even a combination of different reward functions—while demanding only modest computing resources, which positions it as an accessible tool for many practitioners.
249
+
250
+ # Acknowledgements
251
+
252
+ This work was supported by Alibaba Group through Alibaba Research Intern Program. The work was also supported by Shenzhen Science and Technology Program under Grant No. ZDSYS20230626091302006, and by Guangdong Provincial Key Laboratory of Big Data Computing.
253
+
254
+ # Impact Statement
255
+
256
+ This work focuses on alignment for diffusion models. As far as we can see, there is no foreseeable negative impact on the society.
257
+
258
+ # References
259
+
260
+ Bai, Y., Jones, A., Ndousse, K., Askell, A., Chen, A., Das-Sarma, N., Drain, D., Fort, S., Ganguli, D., Henighan, T., et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862, 2022.
261
+ Ben-Hamu, H., Puny, O., Gat, I., Karrer, B., Singer, U., and Lipman, Y. D-flow: Differentiating through flows for controlled generation. arXiv preprint arXiv:2402.14017, 2024.
262
+ Bertsekas, D. P. Nonlinear programming. Journal of the Operational Research Society, 48(3):334-334, 1997.
263
+ Black, K., Janner, M., Du, Y., Kostrikov, I., and Levine, S. Training diffusion models with reinforcement learning. arXiv preprint arXiv:2305.13301, 2023.
264
+ Chen, L., Zhu, C., Soselia, D., Chen, J., Zhou, T., Goldstein,
265
+
266
+ T., Huang, H., Shoeybi, M., and Catanzaro, B. Odin: Disentangled reward mitigates hacking in rlhf. arXiv preprint arXiv:2402.07319, 2024a.
267
+ Chen, W., Zhang, J., Wu, J., Wu, H., Xiao, X., and Lin, L. Id-aligner: Enhancing identity-preserving text-to-image generation with reward feedback learning, 2024b.
268
+ Clark, K., Vicol, P., Swersky, K., and Fleet, D. J. Directly fine-tuning diffusion models on differentiable rewards. arXiv preprint arXiv:2309.17400, 2023.
269
+ CrossLabs. Diffusion with offset noise. https://www.crosslabs.org/blog/ diffusion-with-offset-noise, 2023. January 30, 2023.
270
+ Deng, F., Wang, Q., Wei, W., Grundmann, M., and Hou, T. Prdp: Proximal reward difference prediction for large-scale reward finetuning of diffusion models. arXiv preprint arXiv:2402.08714, 2024.
271
+ Dhariwal, P. and Nichol, A. Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems, 34:8780-8794, 2021.
272
+ Dong, H., Xiong, W., Goyal, D., Pan, R., Diao, S., Zhang, J., Shum, K., and Zhang, T. Raft: Reward ranked finetuning for generative foundation model alignment. arXiv preprint arXiv:2304.06767, 2023.
273
+ Fan, Y., Watkins, O., Du, Y., Liu, H., Ryu, M., Boutilier, C., Abbeel, P., Ghavamzadeh, M., Lee, K., and Lee, K. Dpok: Reinforcement learning for fine-tuning text-to-image diffusion models, 2023.
274
+ Geng, Z., Pokle, A., and Kolter, J. Z. One-step diffusion distillation via deep equilibrium models. arXiv preprint arXiv:2401.08639, 2023.
275
+ Gulcehre, C., Paine, T. L., Srinivasan, S., Konyushkova, K., Weerts, L., Sharma, A., Siddhant, A., Ahern, A., Wang, M., Gu, C., Macherey, W., Doucet, A., First, O., and de Freitas, N. Reinforced self-training (rest) for language modeling, 2023.
276
+ Guo, Z., Wu, Y., Chen, Z., Chen, L., and He, Q. Pulid: Pure and lightning id customization via contrastive alignment, 2024.
277
+ Hao, Y., Chi, Z., Dong, L., and Wei, F. Optimizing prompts for text-to-image generation. arXiv preprint arXiv:2212.09611, 2022.
278
+ Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and Hochreiter, S. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
279
+
280
+ Ho, J. and Salimans, T. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022.
281
+ Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840-6851, 2020.
282
+ Ho, J., Chan, W., Sahara, C., Whang, J., Gao, R., Gritsenko, A., Kingma, D. P., Poole, B., Norouzi, M., Fleet, D. J., et al. Imagen video: High definition video generation with diffusion models. arXiv preprint arXiv:2210.02303, 2022.
283
+ Hu, J., Tao, L., Yang, J., and Zhou, C. Aligning language models with offline learning from human feedback, 2023.
284
+ Karras, T., Aittala, M., Aila, T., and Laine, S. Elucidating the design space of diffusion-based generative models. Advances in Neural Information Processing Systems, 35: 26565-26577, 2022.
285
+ Karunratanakul, K., Preechakul, K., Aksan, E., Beeler, T., Suwajanakorn, S., and Tang, S. Optimizing diffusion noise can serve as universal motion priors. arXiv preprint arXiv:2312.11994, 2023.
286
+ Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
287
+ Kirstain, Y., Polyak, A., Singer, U., Matiana, S., Penna, J., and Levy, O. Pick-a-pic: An open dataset of user preferences for text-to-image generation, 2023.
288
+ Korbak, T., Shi, K., Chen, A., Bhalerao, R., Buckley, C. L., Phang, J., Bowman, S. R., and Perez, E. Pretraining language models with human preferences, 2023.
289
+ Kynkänniemi, T., Karras, T., Laine, S., Lehtinen, J., and Aila, T. Improved precision and recall metric for assessing generative models, 2019.
290
+ Li, J., Li, D., Savarese, S., and Hoi, S. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models, 2023.
291
+ Lin, Z., Pathak, D., Li, B., Li, J., Xia, X., Neubig, G., Zhang, P., and Ramanan, D. Evaluating text-to-visual generation with image-to-text generation. arXiv preprint arXiv:2404.01291, 2024.
292
+ Liu, H., Sferrazza, C., and Abbeel, P. Languages are rewards: Hindsight finetuning using human feedback, 2023a. URL https://arxiv.org/abs/2302.02676.
293
+ Liu, X., Zhang, X., Ma, J., Peng, J., and Liu, Q. Instaflow: One step is enough for high-quality diffusion-based text-to-image generation. arXiv preprint arXiv:2309.06380, 2023b.
294
+
295
+ Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J. Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. arXiv preprint arXiv:2206.00927, 2022.
296
+ Meng, C., He, Y., Song, Y., Song, J., Wu, J., Zhu, J.-Y., and Ermon, S. SDEdit: Guided image synthesis and editing with stochastic differential equations. In International Conference on Learning Representations, 2022.
297
+ Meng, C., Rombach, R., Gao, R., Kingma, D., Ermon, S., Ho, J., and Salimans, T. On distillation of guided diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14297-14306, 2023.
298
+ Miao, Y., Zhang, S., Ding, L., Bao, R., Zhang, L., and Tao, D. Mitigating reward hacking via information-theoretic reward modeling. arXiv preprint arXiv:2402.09345, 2024.
299
+ Mudgal, S., Lee, J., Ganapathy, H., Li, Y., Wang, T., Huang, Y., Chen, Z., Cheng, H.-T., Collins, M., Strohman, T., Chen, J., Beutel, A., and Beirami, A. Controlled decoding from language models, 2023.
300
+ Nesterov, Y. and Spokoiny, V. Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527-566, 2017.
301
+ Novack, Z., McAuley, J., Berg-Kirkpatrick, T., and Bryan, N. J. Ditto: Diffusion inference-time t-optimization for music generation. arXiv preprint arXiv:2401.12179, 2024.
302
+ OpenAI. Chatgpt,https://openai.com/ blog/chatgpt/, 2022. URL https://openai.com/blog/chatgpt/.
303
+ Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C. L., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022.
304
+ Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019.
305
+ Peebles, W. and Xie, S. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4195-4205, 2023.
306
+ Podell, D., English, Z., Lacey, K., Blattmann, A., Dockhorn, T., Muller, J., Penna, J., and Rombach, R. SDXL: Improving latent diffusion models for high-resolution
307
+
308
+ image synthesis. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=di52zR8xgf.
309
+ Prabhudesai, M., Goyal, A., Pathak, D., and Fragkiadaki, K. Aligning text-to-image diffusion models with reward backpropagation, 2023.
310
+ Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
311
+ Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, B. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022.
312
+ Salimans, T. and Ho, J. Progressive distillation for fast sampling of diffusion models. arXiv preprint arXiv:2202.00512, 2022.
313
+ Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., and Chen, X. Improved techniques for training gans. Advances in neural information processing systems, 29, 2016.
314
+ Sauer, A., Lorenz, D., Blattmann, A., and Rombach, R. Adversarial diffusion distillation. arXiv preprint arXiv:2311.17042, 2023.
315
+ Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortsman, M., Schramowski, P., Kundurthy, S., Crowson, K., Schmidt, L., Kaczmarczyk, R., and Jitsev, J. Laion-5b: An open large-scale dataset for training next generation image-text models, 2022a.
316
+ Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortman, M., et al. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35: 25278-25294, 2022b.
317
+ Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a.
318
+ Song, J., Zhang, Q., Yin, H., Mardani, M., Liu, M.-Y., Kautz, J., Chen, Y., and Vahdat, A. Loss-guided diffusion models for plug-and-play controllable generation. In International Conference on Machine Learning, pp. 32483-32498. PMLR, 2023a.
319
+ Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling
320
+
321
+ through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020b.
322
+ Song, Y., Dhariwal, P., Chen, M., and Sutskever, I. Consistency models. arXiv preprint arXiv:2303.01469, 2023b.
323
+ Stiennon, N., Ouyang, L., Wu, J., Ziegler, D., Lowe, R., Voss, C., Radford, A., Amodei, D., and Christiano, P. F. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33: 3008-3021, 2020.
324
+ Sun, J., Fu, D., Hu, Y., Wang, S., Rassin, R., Juan, D.-C., Alon, D., Herrmann, C., van Steenkiste, S., Krishna, R., and Rashtchian, C. Dreamsync: Aligning text-to-image generation with image understanding feedback, 2023.
325
+ Sun, T., Shao, Y., Qian, H., Huang, X., and Qiu, X. Black-box tuning for language-model-as-a-service. In International Conference on Machine Learning, pp. 20841-20855. PMLR, 2022.
326
+ Tang, Z., Rybin, D., and Chang, T.-H. Zeroth-order optimization meets human feedback: Provable learning via ranking oracles. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=TVDUVpgu9s.
327
+ Tang, Z., Tang, J., Luo, H., Wang, F., and Chang, T.-H. Accelerating parallel sampling of diffusion models. arXiv preprint arXiv:2402.09970, 2024b.
328
+ Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Ferrer, C. C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M.-A., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. Llama 2: Open foundation and fine-tuned chat models, 2023.
329
+ Uehara, M., Zhao, Y., Black, K., Hajiramezanali, E., Scalia, G., Diamant, N. L., Tseng, A. M., Levine, S., and Biancalani, T. Feedback efficient online fine-tuning of diffusion models. arXiv preprint arXiv:2402.16359, 2024.
330
+ Wainwright, M. J. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge university press, 2019.
331
+
332
+ Wallace, B., Dang, M., Rafailov, R., Zhou, L., Lou, A., Purushwalkam, S., Ermon, S., Xiong, C., Joty, S., and Naik, N. Diffusion model alignment using direct preference optimization. arXiv preprint arXiv:2311.12908, 2023a.
333
+ Wallace, B., Gokul, A., Ermon, S., and Naik, N. End-to-end diffusion latent optimization improves classifier guidance. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7280-7290, 2023b.
334
+ Wang, G., Cheng, S., Zhan, X., Li, X., Song, S., and Liu, Y. Openchat: Advancing open-source language models with mixed-quality data, 2023a.
335
+ Wang, W., Mrini, K., Yang, L., Kumar, S., Tian, Y., Yan, X., and Wang, H. Finetuned multimodal language models are high-quality image-text data filters. 2024a.
336
+ Wang, W., Mrini, K., Yang, L., Kumar, S., Tian, Y., Yan, X., and Wang, H. Finetuned multimodal language models are high-quality image-text data filters. arXiv preprint arXiv:2403.02677, 2024b.
337
+ Wang, Z. J., Montoya, E., Munechika, D., Yang, H., Hoover, B., and Chau, D. H. Diffusiondb: A large-scale prompt gallery dataset for text-to-image generative models, 2023b.
338
+ Wu, X., Hao, Y., Sun, K., Chen, Y., Zhu, F., Zhao, R., and Li, H. Human preference score v2: A solid benchmark for evaluating human preferences of text-to-image synthesis, 2023.
339
+ Xing, Y., He, Y., Tian, Z., Wang, X., and Chen, Q. Seeing and hearing: Open-domain visual-audio generation with diffusion latent aligners. arXiv preprint arXiv:2402.17723, 2024.
340
+ Xu, J., Liu, X., Wu, Y., Tong, Y., Li, Q., Ding, M., Tang, J., and Dong, Y. Imagereward: Learning and evaluating human preferences for text-to-image generation, 2023.
341
+ Yang, L., Zhang, Z., Song, Y., Hong, S., Xu, R., Zhao, Y., Zhang, W., Cui, B., and Yang, M.-H. Diffusion models: A comprehensive survey of methods and applications. ACM Computing Surveys, 56(4):1-39, 2023.
342
+ Yuan, H., Huang, K., Ni, C., Chen, M., and Wang, M. Reward-directed conditional diffusion: Provable distribution estimation and reward improvement, 2023.
343
+ Yuan, H., Chen, Z., Ji, K., and Gu, Q. Self-play fine-tuning of diffusion models for text-to-image generation. arXiv preprint arXiv:2402.10210, 2024.
344
+ Zhang, S., Yang, X., Feng, Y., Qin, C., Chen, C.-C., Yu, N., Chen, Z., Wang, H., Savarese, S., Ermon, S., et al. Hive: Harnessing human feedback for instructional visual editing. arXiv preprint arXiv:2303.09618, 2023.
345
+
346
+ Zhao, W., Bai, L., Rao, Y., Zhou, J., and Lu, J. Unipc: A unified predictor-corrector framework for fast sampling of diffusion models. arXiv preprint arXiv:2302.04867, 2023.
347
+
348
+ # Appendix
349
+
350
+ # A. DDIM Sampling Algorithm
351
+
352
+ In Algorithm 1 described below, we summarize the sampling algorithm for diffusion models, DDIM (Song et al., 2020a), which is essentially the Euler method for solving ODEs/SDEs. The diffusion coefficients $\alpha_{1},\ldots ,\alpha_{T}$ in Algorithm 1 are computed using the coefficient functions $f(t)$ and $g(t)$ , with the detailed computation found in (Song et al., 2020b; Karras et al., 2022). The coefficient $\eta$ in DDIM determines whether we are solving the ODE or the SDE, with $\eta = 0$ corresponding to ODE and $\eta >0$ corresponding to SDE.
353
+
354
+ # Algorithm 1 DDIM Sampling Algorithm
355
+
356
+ Require: Discretization timesteps $T$ , diffusion coefficient $\alpha_{1},\dots,\alpha_{t}$ , initial noise $x_{T}\sim \mathcal{N}(0,I)$ , noise vectors $z_{1},\dots,z_{T}\sim \mathcal{N}(0,I)$ , coefficient $\eta \in [0,1]$ for balancing ODE and SDE, learned score network $\epsilon_{\theta}(\cdot ,\cdot)$ .
357
+
358
+ 1: for $t = T$ to 1 do
359
+ 2: Compute $\sigma_{t} = \eta \sqrt{(1 - \alpha_{t - 1}) / (1 - \alpha_{t})}\sqrt{1 - \alpha_{t} / \alpha_{t - 1}}$
360
+ 3: $x_{t - 1} = \sqrt{\alpha_{t - 1} / \alpha_t}\cdot x_t - \left(\sqrt{\alpha_{t - 1}(1 - \alpha_t) / \alpha_t} -\sqrt{1 - \alpha_{t - 1} - \sigma_t^2}\right)\epsilon_\theta (x_t,t) + \sigma_tz_t$
361
+ 4: end for
362
+
363
+ # B. Visualization
364
+
365
+ To assist the reader in understanding the optimization process of DNO and also to provide a qualitative evaluation, we offer several visualizations in this section.
366
+
367
+ # B.1.A SIMPLE EXAMPLE
368
+
369
+ In this section, we present a simple example to visualize the process of noise optimization. Specifically, we trained a toy diffusion model for generating uniform distribution on a ring with a radius between 0.8 and 1.2, and the initial distribution is visualized in Figure 5a, where each red point denotes a single sample drawn from the trained diffusion model. We then solve the noise optimization problem (3) with the reward function $r(x) = \sin(4\pi x[1]) + \sin(4\pi x[2]) - ((x[1] - 1)^2 - x[2]^2) / 5$ , a highly nonconvex function with many local maxima. To perform this optimization, we solve the DNO problem (3) using gradient ascent with the learning rate set to 0.01. In Figures 5b, 5c, and 5d, we visualize the optimized samples after 10, 50, and 100 gradient steps, respectively. We can observe that the distribution of the samples shifts toward a distribution on the local maxima of the reward function.
370
+
371
+ ![](images/bd6b45559d02304c01aab664bad086f86aa2c7460cffa040649c0b41632a064c.jpg)
372
+ (a) Initial
373
+
374
+ ![](images/a8730cfbdf261a0b676f94e3ea8244d2b396270e8695e45881c296e1caa5cffd.jpg)
375
+ (b) 10 steps
376
+
377
+ ![](images/be8241f536d45ed59e593d5e79773e24c7d5d32df4b8d64a54635f956e7a1363.jpg)
378
+ (c) 50 steps
379
+ Figure 5. Example 1: Evolution of the sample distribution of a toy diffusion model while running DNO to maximize a non-convex reward function.
380
+
381
+ ![](images/71d1092ce0821ccb4d37d0ecd05f38ac461e9cd51082456b3eac4d2ec6738be8.jpg)
382
+ (d) 100 steps
383
+
384
+ # B.2. SIMPLE EXAMPLES FOR OOD REWARD-HACKING
385
+
386
+ In this section, we present two examples using both a simple diffusion model from the Example 1 described above and the open-source image diffusion model SD v1.5 (Rombach et al., 2022). For the first example, we revisit the pretrained distribution displayed in Figure 5, modifying the reward function to $r(x) = -(x[1] - 1.4)^2 - (x[2] - 1.4)^2$ . Figure 6a exhibits the pretrained distribution of the diffusion models, where we note that every sample stays within the support. However, as illustrated in Figure 6b, after 1000 gradient steps of optimization for the reward function, all the generated samples become
387
+
388
+ out-of-distribution. In our second example, we examine optimization for the "brightness" reward—specifically, the average value of all pixels in an image—using SD v1.5 as the image diffusion model. We start with the prompt "black duck", with the initial image depicted in Figure 6c. After 50 gradient steps of optimization for the brightness reward, it becomes apparent that the generated samples diverge from the original prompt "black duck" and transform into a "white duck", as evidenced in Figure 6d. Ideally, in the absence of reward-hacking, the generated samples should always adhere to the "black duck" prompt while incorporating the overall brightness in the images.
389
+
390
+ ![](images/b10ca14cfca0c38cd382a2c739630bdc002f8d19b348b703a6372a5da546751d.jpg)
391
+ (a) Initial
392
+
393
+ ![](images/53ada4feff15f9cba527041a5dda59dba48bbcec6adac776b5f645c8cc7f3dfd.jpg)
394
+ (b) 1000 steps
395
+
396
+ ![](images/144079546855405877d3c70f4d0f5c46bfec8aa78a72244d78cbdc35cb3355d7.jpg)
397
+ (c) Black Duck
398
+ Figure 6. Examples of OOD Reward-Hacking
399
+
400
+ ![](images/4f456c7185f75002800ce29c45520e293fabe029f1c51921f87ad0893f8fa7bc.jpg)
401
+ (d) 50 steps
402
+
403
+ # B.3. COMPARING WITH AND WITHOUT REGULARIZATION
404
+
405
+ In this section, our objective is to demonstrate the impact of the probability regularization term on the optimization process through visual examples. Specifically, we present examples from three settings. The first two examples are derived from the experiments in Section 5.1, while the last example is from the experiment on optimizing the aesthetic score in Section 5.2.
406
+
407
+ The examples can be seen in Figure 7. As observed across all examples, the optimization process that integrates the regularization term consistently prevents the generated samples from falling into the category of being Out-Of-Distribution (OOD).
408
+
409
+ # B.4. QUALITATIVE EXAMPLES
410
+
411
+ In this section, we aim to provide additional visualized examples for our proposed method.
412
+
413
+ Firstly, in Figure 8, we present examples from the optimization of all three popular human-level reward functions discussed in Section 5.2. As can be observed, the optimization process indeed results in an increase in human preference throughout.
414
+
415
+ Furthermore, we also include examples from the experiments in Section 5.3, that is, optimizing JPEG Compressibility Score and Aesthetic Score using the Hybrid-2 method for non-differentiable optimization. These examples in Figure 9 effectively showcase the efficiency of Hybrid-2 in both estimating the gradient and optimizing.
416
+
417
+ We also present some non-cherry-picked examples of aligning Stable Diffusion XL (Podell et al., 2024) with DNO across four reward functions and four popular prompts from Reddit, see Figure 10. Note that this effect is achieved without fine-tuning the diffusion models. The experiment was conducted on a single A800 GPU., and also the setting for Figure 10. In these examples, we only use the base model of SDXL (Podell et al., 2024) as the image diffusion model. We adopt the DDIM sampler with 50 steps and $\eta = 1$ for generation, and optimize all the injected noise in the generation process, the same as most experiments in this work. The classifier-free guidance is set to 5.0. For each reward function, we adopt the same hyperparameters for the optimizer and regularization terms as the experiments in Section 5.1 and 5.2. From top to bottom in Figure 10, the used prompts are listed as follows:
418
+
419
+ 1. dark alley, night, moon Cinematic light, intricate detail, high detail, sharp focus, smooth, aesthetic, extremely detailed
420
+ 2. 1970s baseball player, hyperdetailed, soft light, sharp, best quality, masterpiece, realistic, Canon EOS R3, 20 megapixels.
421
+ 3. a rabbit, wildlife photography, photograph, high quality, wildlife, f 1.8, soft focus, 8k, national geographic, award - winning photograph by nick nichols.
422
+
423
+ ![](images/2626692a9a902403040d37967c7dc880e8815ede1284ddc8805d4a78f26ea561.jpg)
424
+ (c) Optimizing Aesthetic Score with and without probability regularization. Prompt: "yellow squirrel"
425
+ Figure 7. Examples of optimized samples with and without regularization
426
+
427
+ ![](images/43d0d9063f09a4b526ae1cbe9e4c0813374421737ac5e08315f5e7c9bc023c91.jpg)
428
+ (c) Optimizing PickScore with prompt "black lizard"
429
+ Figure 8. Representative examples of optimizing reward functions trained on human feedback data.
430
+
431
+ 4. A beef steak, depth of field, bokeh, soft light, by Yasmin Albatoul, Harry Fayt, centered, extremely detailed, Nikon D850, award winning photography
432
+
433
+ ![](images/5172e273dfd650eb9f1fe01898b259dcc2cab95d42af88c88871448992208419.jpg)
434
+ (a) Optimizing Jpeg Compressibility with Hybrid-2 gradient approximation. Upper: prompt "blue pig". Lower: prompt "yellow rabbit".
435
+
436
+ ![](images/b314bc8ff4392ef5551936db2290bf5b880491558c366da65e4915354f672fc7.jpg)
437
+ (b) Optimizing Aesthetic Score with Hybrid-2 gradient approximation. Upper: prompt "silver butterfly". Lower: prompt "yellow hedgehog".
438
+ Figure 9. Representative examples for non-differentiable optimization
439
+
440
+ # B.5. VISUALIZATION OF DNO
441
+
442
+ We provide a visual illustration in Figure 11 to describe the main procedure for DNO using the DDIM sampling procedure detailed in Algorithm 1. As shown, DNO, similar to LGD (Song et al., 2023a), operates at inference-time and does not require tuning the network parameter $\theta$ . However, it requires more time for generation compared to direct sampling, as the optimization is integrated with the sampling process, meaning the optimization is performed for each new sample generated. Despite this, as we will demonstrate in Section 5, the extra time needed for the DNO approach is a worthwhile trade-off for obtaining high-reward samples.
443
+
444
+ # C. Theoretical Results
445
+
446
+ Proof for Theorem 2.1. To leverage the $L$ -smoothness assumption, we need to state a classical lemma for smooth optimization.
447
+
448
+ ![](images/a3745e95d2fb27579c62e3088fa7b6577304cf6448bb31fcb85cf96113bd428e.jpg)
449
+ Figure 10. Running DNO with SDXL
450
+
451
+ Lemma .1 (Descent Lemma (Bertsekas, 1997)). For any $z_{1}$ and $z_{2}$ , we have
452
+
453
+ $$
454
+ r \circ M _ {\theta} (z _ {2}) \geq r \circ M _ {\theta} (z _ {1}) + \nabla r \circ M _ {\theta} (z _ {1}) \cdot (z _ {2} - z _ {1}) - \frac {L}{2} \| z _ {2} - z _ {1} \| _ {2} ^ {2}. \tag {10}
455
+ $$
456
+
457
+ Now for any $z$ and steps $t \geq 1$ , with the descent lemma, we have
458
+
459
+ $$
460
+ r \circ M _ {\theta} (g _ {t + 1} (z)) \geq r \circ M _ {\theta} (g _ {t} (z)) + \nabla r \circ M _ {\theta} (g _ {t} (z)) \cdot (g _ {t + 1} (z) - g _ {t} (z)) - \frac {L}{2} \| g _ {t + 1} (z) - g _ {t} (z) \| _ {2} ^ {2}.
461
+ $$
462
+
463
+ Notice that by the definition of $g_{t}$ we have
464
+
465
+ $$
466
+ \begin{array}{l} g _ {t + 1} (z) - g _ {t} (z) = g _ {t} (z) + \ell \nabla r \circ M _ {\theta} (g _ {t} (z)) - g _ {t} (z) \\ = \ell \nabla r \circ M _ {\theta} (g _ {t} (z)). \\ \end{array}
467
+ $$
468
+
469
+ Therefore, we have
470
+
471
+ $$
472
+ r \circ M _ {\theta} (g _ {t + 1} (z)) \geq r \circ M _ {\theta} (g _ {t} (z)) + \left(\ell - \frac {\ell^ {2} L}{2}\right) \| \nabla r \circ M _ {\theta} (g _ {t} (z)) \| _ {2} ^ {2}.
473
+ $$
474
+
475
+ Taking the expectation over $z\sim \mathcal{N}(0,I)$ we have
476
+
477
+ $$
478
+ \begin{array}{l} \mathbb {E} _ {z \sim \mathcal {N} (0, I)} \left[ r \circ M _ {\theta} (g _ {t + 1} (z)) \right] \geq \mathbb {E} _ {z \sim \mathcal {N} (0, I)} \left[ r \circ M _ {\theta} (g _ {t} (z)) \right] + \\ \left(\ell - \frac {\ell^ {2} L}{2}\right) \mathbb {E} _ {z \sim \mathcal {N} (0, I)} \left[ \| \nabla r \circ M _ {\theta} (g _ {t} (z)) \| _ {2} ^ {2} \right]. \\ \end{array}
479
+ $$
480
+
481
+ By using the change of variable formula for distribution, we can easily see that
482
+
483
+ $$
484
+ \mathbb {E} _ {x \sim p _ {t + 1} (x)} r (x) = \mathbb {E} _ {z \sim \mathcal {N} (0, I)} \left[ r \circ M _ {\theta} (g _ {t + 1} (z)) \right],
485
+ $$
486
+
487
+ and
488
+
489
+ $$
490
+ \mathbb {E} _ {x \sim p _ {t} (x)} r (x) = \mathbb {E} _ {z \sim \mathcal {N} (0, I)} \left[ r \circ M _ {\theta} (g _ {t} (z)) \right],
491
+ $$
492
+
493
+ Therefore, we conclude with
494
+
495
+ $$
496
+ \begin{array}{l} \mathbb {E} _ {x \sim p _ {t + 1} (x)} r (x) \geq \mathbb {E} _ {x \sim p _ {t} (x)} r (x) + \left(\ell - \frac {\ell^ {2} L}{2}\right) \mathbb {E} _ {z _ {0} \sim N (0, I)} \left\| \nabla_ {z} r \circ M _ {\theta} (z) _ {| z = g _ {t} (z _ {0})} \right\| _ {2} ^ {2} \tag {11} \\ \geq \mathbb {E} _ {x \sim p _ {t} (x)} r (x). \\ \end{array}
497
+ $$
498
+
499
+ ![](images/9815e5ab3c86fea692388038c594b6d965ef7c903da777238096cab55fabc467.jpg)
500
+
501
+ When Does the Distribution Stop Improving? As observed, the distribution ceases to improve when the second term in Equation (11) becomes zero. Initially, we note that the optimized distribution stops improving when $\mathbb{E}_{z_0\sim N(0,I)}\left\| \nabla_zr\circ M_\theta (z)_{|z = g_t(z_0)}\right\| _2^2 = 0$ . In statistical terms, this implies that $\nabla_zr\circ M_\theta (z)_{|z = g_t(z_0)}$ is a zero vector with probability one.
502
+
503
+ To discern the circumstances under which this zero vector occurs, let us assume that $z_0$ is some fixed noise vector and consider the scenario where
504
+
505
+ $$
506
+ \nabla_ {x} r (x) _ {| x = M _ {\theta} \left(g _ {t} \left(z _ {0}\right)\right)} \cdot \nabla_ {z} M _ {\theta} (z) _ {| z = g _ {t} \left(z _ {0}\right)} = \vec {0}, \tag {12}
507
+ $$
508
+
509
+ Here, we denote $G_{1}(z_{0}) = \nabla_{x}r(x)_{|x = M_{\theta}(g_{t}(z_{0}))}$ as the gradient of the reward functions on the generated sample, and $G_{2}(z_{0}) = \nabla_{z}M_{\theta}(z)_{|z = g_{t}(z_{0})}$ representing the Jacobian matrix of the noise-to-sample mapping. We categorize the situation in Equation (12) into three cases:
510
+
511
+ ![](images/d6cfc827880b7d863c93a64ac4bf634d973e4df56ae9c1aed3d64edb7da3019a.jpg)
512
+ Figure 11. Overview of the DNO procedure with the DDIM sampling algorithm: DNO seeks to optimize only those Gaussian noise vectors $\{x_{T},z_{1},z_{2}\dots,z_{T}\}$ to maximize the reward value of a single generated sample $x_0$ . To facilitate the gradient backpropagation from $x_0$ to $\{x_T,z_1,z_2\dots ,z_T\}$ , we leverage the technique of gradient checkpointing. It is worth noting that when using $\eta = 0$ for DDIM sampling, there is no need to compute the gradient for $z_{1},\ldots ,z_{T}$ , as the generated sample $x_0$ depends exclusively on $x_{T}$ . When computing the gradient from $r(x_0)$ to $x_0$ , we can use either ground-truth gradient $\nabla r$ or an estimated gradient $\widehat{\nabla r}$ , depending on whether the reward function $r(\cdot)$ is differentiable.
513
+
514
+ Type-I: $\| G_1(z_0)\| = 0$ and $\| G_2(z_0)\| >0$ . Here, the gradient of the reward function on the generated sample is zero, indicating that the generated sample has reached a stationary point (or local solution) of the reward function.
515
+
516
+ Type-II: $\| G_2(z_0) \| = 0$ and $\| G_1(z_0) \| > 0$ . This indicates that the Jacobian matrix of the noise-to-sample mapping is zero, which often suggests that the generated sample is at the boundary of the support of the distribution, as a zero Jacobian means that changes in the noise will not affect the generated sample.
517
+
518
+ Type-III: $\| G_1(z_0)\| >0$ and $\| G_{2}(z_{0})\| >0$ , but $\| G_1(z_0)\cdot G_2(z_0)| = 0$ . In this scenario, the gradient of the reward function on the generated sample is orthogonal to the Jacobian matrix of the noise-to-sample mapping.
519
+
520
+ In summary, the distribution will halt its improvement after the $t$ -th step if it almost surely holds that $z_0$ corresponds to a Type-I, Type-II, or Type-III noise vector.
521
+
522
+ We provide examples for the three scenarios, respectively, in the following figures. First, in Figure 12a, we display examples of Type-I and Type-II by reutilizing the experiment from Figure 5. To determine the type of the noise vector, we empirically compute $\| G_1(z_0)\|$ , $\| G_2(z_0)\|$ , and $\| G_1(z_0) \cdot G_2(z_0)\|$ for each noise vector.
523
+
524
+ To showcase an example of Type-III noise vectors, we introduce a new toy example illustrated in Figure 12b. Specifically, the ground-truth distribution learned by diffusion models is uniform across a horizontal line spanning from $(-1,0)$ to $(1,0)$ . The reward function is defined as $r(x,y) = y$ . It can be readily confirmed that, for every point on this line, the gradient of the reward function is orthogonal to the Jacobian matrix of the noise-to-sample mapping. Consequently, all points along the line segment $[(−1,0), (1,0)]$ qualify as Type-III noise vectors.
525
+
526
+ # D. Understanding the Faster Speed of DNO with SDE-Based Sampling.
527
+
528
+ Intuitively, the acceleration in optimization speed can be attributed to the finer-grained control over the generation process afforded by the SDE sampler compared to the ODE sampler. To formally state this intuition, we revisit the DDIM sampling algorithm in Algorithm 1. We consider the procedure of SDE-based sampling algorithm, DDIM with $\eta = 1$ , as defining the noise-to-sample mapping $M_{\theta}(x_T,z_1,\ldots ,z_T)$ . An important observation is that the ODE sampling
529
+
530
+ ![](images/f3ea7aafea32dec0c9886d0ab2e57308a980871403c4a4aff30caf97d0bffe78.jpg)
531
+ (a) Example 1
532
+
533
+ ![](images/8892966a6f5b710079617a08f33d78bc28e7506d7fbec09f7b604b470a8346de.jpg)
534
+ (b) Example 2
535
+
536
+ ![](images/f1896310a1e77779079a99956cf04d9e0b1e39a4bc3ead00fec7d554ff0a7d5b.jpg)
537
+ (a) Toy Example
538
+
539
+ ![](images/420be5963ca86e322275cffd9be2ef26a24c4662f09f3e963e66cb58fa087046.jpg)
540
+ Figure 12. Examples of generated samples with Type-I, Type-II and Type-III noise vectors in the toy examples.
541
+ (b) $P(z) = 0.36$
542
+
543
+ ![](images/c43ba8b9bbc826bd9418f3928f5ab4e0a7cfabcbbf095b659b2acdfb5f14fcda.jpg)
544
+ (c) $P(z) = 0.00$
545
+
546
+ ![](images/b4bf0aee540d54ef1fe3326d5b21f7414cf2bab6a7ff96c5afcf34841090f3ea.jpg)
547
+ (d) $P(z) = 0.02$
548
+
549
+ ![](images/5129fcf0cf9c64f7feee9bcd037b84585adec0551a820c4d62bbe2b973a571d2.jpg)
550
+ Figure 13. Examples of generated samples with corresponding values of $P(z)$ .
551
+ Figure 14. Trajectory of $P(z)$ on optimizing brightness reward.
552
+
553
+ ![](images/2b3e2b0a37e8ce1ce99a9369a23c11f50603a30207028394622da054afb4c384.jpg)
554
+ Figure 15. Trajectory of $P(z)$ on optimizing Aesthetic Score.
555
+
556
+ algorithm, DDIM with $\eta = 0$ , can also be expressed using the same $M_{\theta}(x_T,z_1,\ldots ,z_T)$ , with the distinction that the noise $z_{1},\ldots ,z_{T}$ becomes deterministic and dependent on $x_{T}$ , rather than sampled from a Gaussian distribution. Specifically, if we define the deterministic noise vectors as: $z_{t}^{\mathrm{ODE}}\stackrel {\mathrm{def.}}{=}\frac{\sqrt{1 - \alpha_{t - 1}} - \sqrt{1 - \alpha_{t - 1} - \sigma_t^2}}{\sigma_t}\epsilon_\theta (x_t,t)$ , for $t = 1,\dots ,T$ where $\sigma_t = \sqrt{(1 - \alpha_{t - 1} / (1 - \alpha_t)}\sqrt{1 - \alpha_t / \alpha_{t - 1}}$ , then the sampling process of DDIM with $\eta = 0$ can be expressed as $M_{\theta}(x_T,z_1^{\mathrm{ODE}},\ldots ,z_T^{\mathrm{ODE}})$ . In this context, the advantage of SDE-based sampling becomes evident:
557
+
558
+ $$
559
+ \max _ {x _ {T}, z _ {1}, \ldots , z _ {T}} r \left(M _ {\theta} (x _ {T}, z _ {1}, \ldots , z _ {T})\right) \geq \max _ {x _ {T}} r \left(M _ {\theta} (x _ {T}, z _ {1} ^ {\text {O D E}}, \ldots , z _ {T} ^ {\text {O D E}})\right),
560
+ $$
561
+
562
+ meaning that running DNO with SDE will yield better results, or at least as good as DNO with ODE for aligning diffusion models. Based on this conclusion, our work will focus on optimizing the SDE-based sampling (DDIM with $\eta = 1$ ) for the remainder of the study. Additionally, we fix the number of generation steps $T$ to 50 throughout this work for simplicity.
563
+
564
+ # .5. Empirical Investigation of $P(z)$
565
+
566
+ In this section, we provide several empirical evidence to demonstrate that $P(z)$ acts as an effective indicator for the out-of-distribution phenomenon.
567
+
568
+ Firstly, in Figure 13a, we revisit the examples from Figures 6a and 6b, coloring each sample based on the value of $P(z)$ . As depicted in Figure 13a, $P(z)$ proves to be an efficient metric to separate in-distribution samples from out-of-distribution samples; those in-distribution have high values for $P(z)$ , whereas those out-of-distribution exhibit values of $P(z)$ near zero.
569
+
570
+ Secondly, we manually construct several noise vectors that reside in the low-probability region of the standard Gaussian distribution. To establish a baseline comparison, we first draw one sample from the standard Gaussian distribution and use it to generate an image with Stable Diffusion v1.5 and the prompt "black duck". As can be seen, this leads to a normal image with $P(z)$ also within a reasonably large value. We then construct the low-probability vectors in two ways. The first one is to use all-zero vectors, which obviously reside in the low-probability zone of high-dimensional Gaussian distributions. The generated images with all-zero vectors are visualized in Figure 13c, showcasing that there is nothing discernible in the image while $P(z)$ approximates zero. The second method is to repeat parts of the noise vectors, such that the noise vectors exhibit high covariance in the elements. Specifically, we construct the repeated vectors by first generating an $n/4$ dimensional $z_0$ from the standard Gaussian distribution, and then constructing the noise vectors as $z = [z_0, z_0, z_0, z_0]$ , making $z$ an $n$ dimensional vector. The figure corresponding to these repeated vectors, shown in Figure 13d, once again results in a poor image, with $P(z)$ illustrating that the noise vectors also come from a low-probability region.
571
+
572
+ We further visualize the entire optimization trajectory for the examples in Figures 6c and 6d, i.e., optimizing the brightness reward for Stable Diffusion v1.5 with the prompt "black duck" in Figure 14. Specifically, from Figure 14 we can clearly see that the value of $P(z)$ gradually decreases, and the generated image also gradually diverges from the distribution associated with a black duck. Notably, at around 20 steps, the value of $P(z)$ becomes near-zero, and at the same time, the generated image more closely resembles a blue duck rather than the specified black duck.
573
+
574
+ Similarly, we visualize the optimization trajectory for optimizing the Aesthetic Score for SD v1.5 with the prompt "black duck". The results are in Figure 15. A clear conclusion is that in this case, it is less likely for the optimized samples to be out-of-distribution. This is mainly because the Aesthetic Score itself penalizes those OOD samples. It is noteworthy to observe that this insight is also captured by our proposed indicator $P(z)$ , because when comparing the trend of $P(z)$ in Figure 14 and Figure 15, we can see that optimizing the Aesthetic Score leads to a much less significant decrease in the $P(z)$ value.
575
+
576
+ # .6. Implementation Details
577
+
578
+ In this section, we discuss some implementation details of our proposed method, as well as clarify some omissions in the experimental section.
579
+
580
+ # .6.1. ALGORITHM IMPLEMENTATION
581
+
582
+ It is clear that to solve the direct noise optimization problem stated in Problem 3, differentiation of the noise-to-sample mapping $M_{\theta}$ is required. It is worth noting that this differentiation cannot be handled by standard auto-differentiation in PyTorch (Paszke et al., 2019), as it can lead to a memory explosion. A common technique to resolve this issue is gradient checkpointing, which has also been adopted by other related works on noise optimization (Wallace et al., 2023b; Novack et al., 2024; Karunratanakul et al., 2023).
583
+
584
+ Here, we describe an efficient method to implement our proposed hybrid gradient estimators detailed in Section 4, along with the optimization process, by utilizing the built-in auto-differentiation in PyTorch (Paszke et al., 2019). Specifically, suppose we wish to use $q$ samples to estimate the gradient in Equation (8); that is, we draw $q$ noise vectors for perturbation: $\xi_1, \ldots, \xi_q$ . We then generate the corresponding samples $x_i = M_\theta(z + \mu \xi_i)$ for $i = 1, \ldots, q$ . At this point, we should compute the estimated gradient of the reward functions in a non-differentiable mode as follows:
585
+
586
+ $$
587
+ \hat {H} _ {2} (x) = \frac {1}{q} \sum_ {i = 1} ^ {q} \left(r \left(M _ {\theta} \left(x _ {i}\right)\right) - r (x)\right) \left(x _ {i} - x\right). \tag {13}
588
+ $$
589
+
590
+ Finally, we can execute gradient backpropagation with the loss function,
591
+
592
+ $$
593
+ l o s s (z) = \langle \hat {H} _ {2} (x), M _ {\theta} (z) \rangle ,
594
+ $$
595
+
596
+ which produces the exact gradient estimator for $z$ .
597
+
598
+ # .6.2. EXPERIMENT DETAILS
599
+
600
+ In this section, our goal is to provide the experimental details that were omitted from Sections 5.1, 5.2, 5.3.
601
+
602
+ Details for Section 5.1. In this experiment, to solve the probability-regularized noise optimization problem as formulated in Equation (5), we employ the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.01. For optimization with regularization, we set the regularization coefficient $\gamma$ to 1. To compute the minibatch stochastic gradient for the regularization term in Equation (5), we set the batch size $b$ —the number of random permutations drawn at each step—to 100. For each optimization run, we utilize a single A800 GPU, with the total memory consumption being approximately 15 GB.
603
+
604
+ Details for Section 5.2. In this second set of experiments, we continue using the Adam optimizer with a learning rate of 0.01. For optimization with regularization, though, we reduce the regularization coefficient to $\gamma = 0.1$ because optimizing these human-like reward functions is less susceptible to the OOD reward-hacking issue, while maintaining the batch size for the permutation matrix $b$ at 100. Each optimization run also uses a single A800 GPU, but the total memory consumption is around 20 GB. Regarding the baselines in Table 1, we implemented LGD (Song et al., 2023a) ourselves, following the algorithm from their paper on these reward functions. For other baselines, we reuse the statistics presented in their corresponding papers.
605
+
606
+ Details for Section 5.3. In this section, the primary hyperparameters for the three tested algorithms are the perturbation coefficient $\mu$ and the number of samples $q$ used to approximate the gradient (as formulated in Equation (13)). Clearly, $q$ plays a crucial role in determining the running time of each algorithm. For an equitable comparison, we tune $q$ separately for each algorithm to achieve roughly the same time cost per gradient step. Specifically, we set $q$ values for ZO-SGD, Hybrid-1, and Hybrid-2 to 16, 8, and 4 respectively. For $\mu$ , we also adjust them individually for each algorithm, as they have varying
607
+
608
+ sensitivity to $\mu$ . Through trial and error, we select $\mu$ values of 0.01 for ZO-SGD and Hybrid-1, and 0.02 for Hybrid-2. Finally, for optimizing JPEG Compressibility, we use the Adam optimizer with a learning rate of 0.01, but for the Aesthetic Score experiment, we reduce the learning rate to 0.001, as we found that 0.01 can lead to divergence during optimization for the Aesthetic Score. Each optimization run continues to use a single A800 GPU.
609
+
610
+ # .7. Hyperparameters Analysis
611
+
612
+ In this section, we conduct a thorough analysis of the hyperparameters for the proposed method. Our objective is to offer a concise guideline for selecting the hyperparameters in the proposed method.
613
+
614
+ As discussed in Section 3.1, the concentration inequalities involve a hyperparameter $k$ , which represents the dimension of subvectors from the noise vectors $z$ that we aim to assess probabilistically. As noted in Remark 3.2, the dimension $k$ should be neither too large nor too small. Additionally, another critical hyperparameter is the number of permutation matrices $b$ employed to compute the stochastic gradient for the probability regularization in Equation (5). Furthermore, we aim to explore the impact of the regularization coefficient $\gamma$ in the probability regularization term.
615
+
616
+ To examine the effects of $k$ , $b$ , and $\gamma$ on mitigating the OOD (Out-Of-Distribution) reward-hacking problem, we revisit the experiment of optimizing darkness reward with the prompt "white animals" from Section 5.1. In Figure 16, we illustrate how these three hyperparameters influence both the reward and the consistency score (CS), across four different values.
617
+
618
+ Firstly, Figure 16a supports the notion that $k$ should be carefully chosen—not too large, yet not overly small. We observe that $k = 1$ underperforms compared to $k = 2$ and $k = 10$ , as selecting $k = 1$ fails to account for the covariance among noise vectors. Conversely, $k = 100$ proves to be a poor choice because it entails a smaller $m$ , potentially rendering the concentration inequalities detailed in Lemma 3.1 less precise.
619
+
620
+ Secondly, as demonstrated in Figure 16b, the number of permutation matrices $b$ seems to have a minor impact on the optimization process, provided $b$ is sufficiently large. Based on empirical evidence, $b = 100$ emerges as an optimal selection for the proposed method.
621
+
622
+ Lastly, the effects of $\gamma$ are depicted in Figure 16c. Adjusting the value of $\gamma$ clearly presents a trade-off between convergence speed and the propensity for OOD reward-hacking problems. Given this observation, we recommend empirically tuning the value of $\gamma$ for different reward functions and prompts using a limited number of samples and a few optimization steps.
623
+
624
+ ![](images/afc8db7422c36333c827aa7f0221d423616cf5b87f123400d553688bb4a94410.jpg)
625
+ (a) The effect of $k$
626
+
627
+ ![](images/9c6510fb635f8268975cf91340ba5b5fbf30b625901060857bc87c55a7ee1b69.jpg)
628
+
629
+ ![](images/51043a3bffaf024c579fdf7c6b9bb052fa982394c6f9b41daac4bf3ace8d5cbc.jpg)
630
+ (b) The effect of $b$
631
+
632
+ ![](images/cc8c816290891e582bcb986c9155153f5da59376d535732ccd01580386d01a6d.jpg)
633
+
634
+ ![](images/4b70a895b17f8fd302f5d93a2f2202d24bc0ecb5691c4e09c7eb68f3b7f8c86c.jpg)
635
+ Figure 16. Hyperparamet Analysis
636
+
637
+ ![](images/7b20d3d9e1576ab1c3dad63a6dbb8aebb14ea491e482d603c0ad58937232523f.jpg)
638
+ (c) The effect of $\gamma$
639
+
640
+ ![](images/223717517f7d611a049accfb58b08b87b876e1726cf8dc3d80c0ee076acc6365.jpg)
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cb32dd081c585d4eb858ec96c60a4eb3582f5b8aba11743edf477e0563ab5f3
3
+ size 1726789
2025/Inference-Time Alignment of Diffusion Models with Direct Noise Optimization/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/Inference-Time Decomposition of Activations (ITDA)_ A Scalable Approach to Interpreting Large Language Models/ef60912f-6196-4b98-b5db-a2169cde22b8_content_list.json ADDED
The diff for this file is too large to render. See raw diff