Chelsea707 commited on
Commit
f42ecb0
·
verified ·
1 Parent(s): e71190a

Add Batch d9152f03-d9c6-40ef-ae30-c29f86e8bdc5 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. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_content_list.json +0 -0
  3. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_model.json +0 -0
  4. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_origin.pdf +3 -0
  5. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/full.md +628 -0
  6. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/images.zip +3 -0
  7. 2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/layout.json +0 -0
  8. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_content_list.json +0 -0
  9. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_model.json +0 -0
  10. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_origin.pdf +3 -0
  11. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/full.md +481 -0
  12. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/images.zip +3 -0
  13. 2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/layout.json +0 -0
  14. 2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_content_list.json +0 -0
  15. 2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_model.json +0 -0
  16. 2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_origin.pdf +3 -0
  17. 2023/Efficient List-Decodable Regression using Batches/full.md +0 -0
  18. 2023/Efficient List-Decodable Regression using Batches/images.zip +3 -0
  19. 2023/Efficient List-Decodable Regression using Batches/layout.json +0 -0
  20. 2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_content_list.json +0 -0
  21. 2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_model.json +0 -0
  22. 2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_origin.pdf +3 -0
  23. 2023/Efficient Online Reinforcement Learning with Offline Data/full.md +518 -0
  24. 2023/Efficient Online Reinforcement Learning with Offline Data/images.zip +3 -0
  25. 2023/Efficient Online Reinforcement Learning with Offline Data/layout.json +0 -0
  26. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_content_list.json +0 -0
  27. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_model.json +0 -0
  28. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_origin.pdf +3 -0
  29. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/full.md +513 -0
  30. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/images.zip +3 -0
  31. 2023/Efficient Parametric Approximations of Neural Network Function Space Distance/layout.json +0 -0
  32. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_content_list.json +0 -0
  33. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_model.json +0 -0
  34. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_origin.pdf +3 -0
  35. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/full.md +0 -0
  36. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/images.zip +3 -0
  37. 2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/layout.json +0 -0
  38. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_content_list.json +0 -0
  39. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_model.json +0 -0
  40. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_origin.pdf +3 -0
  41. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/full.md +605 -0
  42. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/images.zip +3 -0
  43. 2023/Efficient Quantum Algorithms for Quantum Optimal Control/layout.json +0 -0
  44. 2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_content_list.json +0 -0
  45. 2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_model.json +0 -0
  46. 2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_origin.pdf +3 -0
  47. 2023/Efficient RL via Disentangled Environment and Agent Representations/full.md +516 -0
  48. 2023/Efficient RL via Disentangled Environment and Agent Representations/images.zip +3 -0
  49. 2023/Efficient RL via Disentangled Environment and Agent Representations/layout.json +0 -0
  50. 2023/Efficient Rate Optimal Regret for Adversarial Contextual MDPs Using Online Function Approximation/0060b436-ee1c-4a15-b426-2e1cfcc12983_content_list.json +0 -0
.gitattributes CHANGED
@@ -6475,3 +6475,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
6475
  2023/Efficient[[:space:]]Bound[[:space:]]of[[:space:]]Lipschitz[[:space:]]Constant[[:space:]]for[[:space:]]Convolutional[[:space:]]Layers[[:space:]]by[[:space:]]Gram[[:space:]]Iteration/37e5c2f9-71c2-4507-bb1e-a465f0a75543_origin.pdf filter=lfs diff=lfs merge=lfs -text
6476
  2023/Efficient[[:space:]]Exploration[[:space:]]via[[:space:]]Epistemic-Risk-Seeking[[:space:]]Policy[[:space:]]Optimization/72c1e68f-57f7-4897-bfc4-5caae6b24af6_origin.pdf filter=lfs diff=lfs merge=lfs -text
6477
  2023/Efficient[[:space:]]Graph[[:space:]]Field[[:space:]]Integrators[[:space:]]Meet[[:space:]]Point[[:space:]]Clouds/1fcdc518-bbd9-4da0-af67-eedde13381fe_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6475
  2023/Efficient[[:space:]]Bound[[:space:]]of[[:space:]]Lipschitz[[:space:]]Constant[[:space:]]for[[:space:]]Convolutional[[:space:]]Layers[[:space:]]by[[:space:]]Gram[[:space:]]Iteration/37e5c2f9-71c2-4507-bb1e-a465f0a75543_origin.pdf filter=lfs diff=lfs merge=lfs -text
6476
  2023/Efficient[[:space:]]Exploration[[:space:]]via[[:space:]]Epistemic-Risk-Seeking[[:space:]]Policy[[:space:]]Optimization/72c1e68f-57f7-4897-bfc4-5caae6b24af6_origin.pdf filter=lfs diff=lfs merge=lfs -text
6477
  2023/Efficient[[:space:]]Graph[[:space:]]Field[[:space:]]Integrators[[:space:]]Meet[[:space:]]Point[[:space:]]Clouds/1fcdc518-bbd9-4da0-af67-eedde13381fe_origin.pdf filter=lfs diff=lfs merge=lfs -text
6478
+ 2023/Efficient[[:space:]]Latency-Aware[[:space:]]CNN[[:space:]]Depth[[:space:]]Compression[[:space:]]via[[:space:]]Two-Stage[[:space:]]Dynamic[[:space:]]Programming/36753a02-c352-41b5-9742-dcb005bdfccb_origin.pdf filter=lfs diff=lfs merge=lfs -text
6479
+ 2023/Efficient[[:space:]]Learning[[:space:]]of[[:space:]]Mesh-Based[[:space:]]Physical[[:space:]]Simulation[[:space:]]with[[:space:]]Bi-Stride[[:space:]]Multi-Scale[[:space:]]Graph[[:space:]]Neural[[:space:]]Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_origin.pdf filter=lfs diff=lfs merge=lfs -text
6480
+ 2023/Efficient[[:space:]]List-Decodable[[:space:]]Regression[[:space:]]using[[:space:]]Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_origin.pdf filter=lfs diff=lfs merge=lfs -text
6481
+ 2023/Efficient[[:space:]]Online[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Offline[[:space:]]Data/994aad71-ba98-4d37-b64a-7c8f4f933862_origin.pdf filter=lfs diff=lfs merge=lfs -text
6482
+ 2023/Efficient[[:space:]]Parametric[[:space:]]Approximations[[:space:]]of[[:space:]]Neural[[:space:]]Network[[:space:]]Function[[:space:]]Space[[:space:]]Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_origin.pdf filter=lfs diff=lfs merge=lfs -text
6483
+ 2023/Efficient[[:space:]]Personalized[[:space:]]Federated[[:space:]]Learning[[:space:]]via[[:space:]]Sparse[[:space:]]Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_origin.pdf filter=lfs diff=lfs merge=lfs -text
6484
+ 2023/Efficient[[:space:]]Quantum[[:space:]]Algorithms[[:space:]]for[[:space:]]Quantum[[:space:]]Optimal[[:space:]]Control/bdb6a906-4286-4a91-b1a6-a5057640359b_origin.pdf filter=lfs diff=lfs merge=lfs -text
6485
+ 2023/Efficient[[:space:]]RL[[:space:]]via[[:space:]]Disentangled[[:space:]]Environment[[:space:]]and[[:space:]]Agent[[:space:]]Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_origin.pdf filter=lfs diff=lfs merge=lfs -text
6486
+ 2023/Efficient[[:space:]]Rate[[:space:]]Optimal[[:space:]]Regret[[:space:]]for[[:space:]]Adversarial[[:space:]]Contextual[[:space:]]MDPs[[:space:]]Using[[:space:]]Online[[:space:]]Function[[:space:]]Approximation/0060b436-ee1c-4a15-b426-2e1cfcc12983_origin.pdf filter=lfs diff=lfs merge=lfs -text
6487
+ 2023/Efficient[[:space:]]Self-supervised[[:space:]]Learning[[:space:]]with[[:space:]]Contextualized[[:space:]]Target[[:space:]]Representations[[:space:]]for[[:space:]]Vision,[[:space:]]Speech[[:space:]]and[[:space:]]Language/b8117f6c-04f4-43c2-b90f-d59c830a8c1a_origin.pdf filter=lfs diff=lfs merge=lfs -text
6488
+ 2023/Efficient[[:space:]]Sequence[[:space:]]Transduction[[:space:]]by[[:space:]]Jointly[[:space:]]Predicting[[:space:]]Tokens[[:space:]]and[[:space:]]Durations/8261f13e-0a02-42bc-8e76-33e14f936326_origin.pdf filter=lfs diff=lfs merge=lfs -text
6489
+ 2023/Efficient[[:space:]]Training[[:space:]]of[[:space:]]Language[[:space:]]Models[[:space:]]using[[:space:]]Few-Shot[[:space:]]Learning/2b95de6b-fe75-43a5-84d9-2418ba359158_origin.pdf filter=lfs diff=lfs merge=lfs -text
6490
+ 2023/Efficient[[:space:]]Transformed[[:space:]]Gaussian[[:space:]]Processes[[:space:]]for[[:space:]]Non-Stationary[[:space:]]Dependent[[:space:]]Multi-class[[:space:]]Classification/ce3ef56a-6e06-4398-a23b-1169a77f4052_origin.pdf filter=lfs diff=lfs merge=lfs -text
6491
+ 2023/Efficient[[:space:]]and[[:space:]]Degree-Guided[[:space:]]Graph[[:space:]]Generation[[:space:]]via[[:space:]]Discrete[[:space:]]Diffusion[[:space:]]Modeling/751a2593-47d9-4565-b995-629b3c767e5a_origin.pdf filter=lfs diff=lfs merge=lfs -text
6492
+ 2023/Efficient[[:space:]]and[[:space:]]Equivariant[[:space:]]Graph[[:space:]]Networks[[:space:]]for[[:space:]]Predicting[[:space:]]Quantum[[:space:]]Hamiltonian/2a38ae53-6574-48e7-9e19-d4e93ebabf27_origin.pdf filter=lfs diff=lfs merge=lfs -text
6493
+ 2023/Efficient[[:space:]]displacement[[:space:]]convex[[:space:]]optimization[[:space:]]with[[:space:]]particle[[:space:]]gradient[[:space:]]descent/5e2ffa01-2403-48fc-b46c-656f7504b159_origin.pdf filter=lfs diff=lfs merge=lfs -text
6494
+ 2023/Efficient[[:space:]]preconditioned[[:space:]]stochastic[[:space:]]gradient[[:space:]]descent[[:space:]]for[[:space:]]estimation[[:space:]]in[[:space:]]latent[[:space:]]variable[[:space:]]models/6a445b89-3d68-4e42-a9ee-af0109cc9e90_origin.pdf filter=lfs diff=lfs merge=lfs -text
6495
+ 2023/Efficiently[[:space:]]predicting[[:space:]]high[[:space:]]resolution[[:space:]]mass[[:space:]]spectra[[:space:]]with[[:space:]]graph[[:space:]]neural[[:space:]]networks/bd5c4511-7399-4eda-a80a-a4e3519f5316_origin.pdf filter=lfs diff=lfs merge=lfs -text
6496
+ 2023/Eliminating[[:space:]]Adversarial[[:space:]]Noise[[:space:]]via[[:space:]]Information[[:space:]]Discard[[:space:]]and[[:space:]]Robust[[:space:]]Representation[[:space:]]Restoration/004adf66-7872-400a-8e65-661084650382_origin.pdf filter=lfs diff=lfs merge=lfs -text
6497
+ 2023/Emergence[[:space:]]of[[:space:]]Adaptive[[:space:]]Circadian[[:space:]]Rhythms[[:space:]]in[[:space:]]Deep[[:space:]]Reinforcement[[:space:]]Learning/40225940-87f3-4b48-bc8a-4acd992fd10a_origin.pdf filter=lfs diff=lfs merge=lfs -text
6498
+ 2023/Emergence[[:space:]]of[[:space:]]Sparse[[:space:]]Representations[[:space:]]from[[:space:]]Noise/8bc9b9fc-1122-4976-b3e5-4058da8a4c7b_origin.pdf filter=lfs diff=lfs merge=lfs -text
6499
+ 2023/Emergent[[:space:]]Agentic[[:space:]]Transformer[[:space:]]from[[:space:]]Chain[[:space:]]of[[:space:]]Hindsight[[:space:]]Experience/f868616f-db5c-4b1c-af4f-a2ef7b9c8c94_origin.pdf filter=lfs diff=lfs merge=lfs -text
6500
+ 2023/Emergent[[:space:]]Asymmetry[[:space:]]of[[:space:]]Precision[[:space:]]and[[:space:]]Recall[[:space:]]for[[:space:]]Measuring[[:space:]]Fidelity[[:space:]]and[[:space:]]Diversity[[:space:]]of[[:space:]]Generative[[:space:]]Models[[:space:]]in[[:space:]]High[[:space:]]Dimensions/30a12922-8a90-4d4e-ba99-7ca115d99c06_origin.pdf filter=lfs diff=lfs merge=lfs -text
6501
+ 2023/Enabling[[:space:]]First-Order[[:space:]]Gradient-Based[[:space:]]Learning[[:space:]]for[[:space:]]Equilibrium[[:space:]]Computation[[:space:]]in[[:space:]]Markets/3b7c7313-0a90-400c-8e32-23cbe0b0e77f_origin.pdf filter=lfs diff=lfs merge=lfs -text
6502
+ 2023/End-to-End[[:space:]]Full-Atom[[:space:]]Antibody[[:space:]]Design/b1f9557f-0aeb-4a3f-b60c-8c8c297c270f_origin.pdf filter=lfs diff=lfs merge=lfs -text
6503
+ 2023/End-to-End[[:space:]]Learning[[:space:]]for[[:space:]]Stochastic[[:space:]]Optimization_[[:space:]]A[[:space:]]Bayesian[[:space:]]Perspective/be7394a5-2d86-4d60-ac32-2206a3e7d48f_origin.pdf filter=lfs diff=lfs merge=lfs -text
6504
+ 2023/End-to-End[[:space:]]Multi-Object[[:space:]]Detection[[:space:]]with[[:space:]]a[[:space:]]Regularized[[:space:]]Mixture[[:space:]]Model/6ad2952a-2c76-4fcc-8d7e-d588ccffece8_origin.pdf filter=lfs diff=lfs merge=lfs -text
6505
+ 2023/End-to-end[[:space:]]Differentiable[[:space:]]Clustering[[:space:]]with[[:space:]]Associative[[:space:]]Memories/92ffe8b3-3c4d-4704-8fa7-ac4aaf5f5e56_origin.pdf filter=lfs diff=lfs merge=lfs -text
6506
+ 2023/End-to-end[[:space:]]Training[[:space:]]of[[:space:]]Deep[[:space:]]Boltzmann[[:space:]]Machines[[:space:]]by[[:space:]]Unbiased[[:space:]]Contrastive[[:space:]]Divergence[[:space:]]with[[:space:]]Local[[:space:]]Mode[[:space:]]Initialization/a74ef88c-5238-41ab-9906-e0807e601c2c_origin.pdf filter=lfs diff=lfs merge=lfs -text
6507
+ 2023/Enforcing[[:space:]]Hard[[:space:]]Constraints[[:space:]]with[[:space:]]Soft[[:space:]]Barriers_[[:space:]]Safe[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]in[[:space:]]Unknown[[:space:]]Stochastic[[:space:]]Environments/be8b5052-31d0-4c0b-9db6-e17ca3e71e5f_origin.pdf filter=lfs diff=lfs merge=lfs -text
6508
+ 2023/Enhancing[[:space:]]Activity[[:space:]]Prediction[[:space:]]Models[[:space:]]in[[:space:]]Drug[[:space:]]Discovery[[:space:]]with[[:space:]]the[[:space:]]Ability[[:space:]]to[[:space:]]Understand[[:space:]]Human[[:space:]]Language/195fc0a2-86ef-4b43-bf6a-d1e1e11499a0_origin.pdf filter=lfs diff=lfs merge=lfs -text
6509
+ 2023/Entity[[:space:]]Divider[[:space:]]with[[:space:]]Language[[:space:]]Grounding[[:space:]]in[[:space:]]Multi-Agent[[:space:]]Reinforcement[[:space:]]Learning/429f8eb5-f1e1-47f3-9803-1bae95bdb36a_origin.pdf filter=lfs diff=lfs merge=lfs -text
6510
+ 2023/Entropy-driven[[:space:]]Unsupervised[[:space:]]Keypoint[[:space:]]Representation[[:space:]]Learning[[:space:]]in[[:space:]]Videos/eb3e296e-16a1-4fa3-81a9-2ab1f64844a7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6511
+ 2023/Equivariance[[:space:]]with[[:space:]]Learned[[:space:]]Canonicalization[[:space:]]Functions/d2ce9ed3-be4e-4f55-a2fe-60bbd0cd51e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
6512
+ 2023/Equivariant[[:space:]]Architectures[[:space:]]for[[:space:]]Learning[[:space:]]in[[:space:]]Deep[[:space:]]Weight[[:space:]]Spaces/c17dffd1-5ec1-4d75-a84a-52eced14961d_origin.pdf filter=lfs diff=lfs merge=lfs -text
6513
+ 2023/Equivariant[[:space:]]Polynomials[[:space:]]for[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/f617598b-b087-452d-ad3d-62a1bf402098_origin.pdf filter=lfs diff=lfs merge=lfs -text
6514
+ 2023/Escaping[[:space:]]saddle[[:space:]]points[[:space:]]in[[:space:]]zeroth-order[[:space:]]optimization_[[:space:]]the[[:space:]]power[[:space:]]of[[:space:]]two-point[[:space:]]estimators/c3737210-eaf4-44da-920d-2cb4c18ffe4b_origin.pdf filter=lfs diff=lfs merge=lfs -text
6515
+ 2023/Estimating[[:space:]]Causal[[:space:]]Effects[[:space:]]using[[:space:]]a[[:space:]]Multi-task[[:space:]]Deep[[:space:]]Ensemble/73686eb7-8c46-4887-9df8-8c9e52f838d6_origin.pdf filter=lfs diff=lfs merge=lfs -text
6516
+ 2023/Estimating[[:space:]]Heterogeneous[[:space:]]Treatment[[:space:]]Effects_[[:space:]]Mutual[[:space:]]Information[[:space:]]Bounds[[:space:]]and[[:space:]]Learning[[:space:]]Algorithms/3b5f044b-6e50-451a-8659-cb15e0e7a3ed_origin.pdf filter=lfs diff=lfs merge=lfs -text
6517
+ 2023/Estimating[[:space:]]Joint[[:space:]]Treatment[[:space:]]Effects[[:space:]]by[[:space:]]Combining[[:space:]]Multiple[[:space:]]Experiments/8a849d6a-3ee6-41b2-a889-3ebe2dacd2b7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6518
+ 2023/Estimating[[:space:]]Possible[[:space:]]Causal[[:space:]]Effects[[:space:]]with[[:space:]]Latent[[:space:]]Variables[[:space:]]via[[:space:]]Adjustment/b818b762-dac2-4f93-850d-98742a570220_origin.pdf filter=lfs diff=lfs merge=lfs -text
6519
+ 2023/Estimating[[:space:]]the[[:space:]]Contamination[[:space:]]Factor’s[[:space:]]Distribution[[:space:]]in[[:space:]]Unsupervised[[:space:]]Anomaly[[:space:]]Detection/7d26b2ad-e143-4146-8e58-e1eec22ab9c8_origin.pdf filter=lfs diff=lfs merge=lfs -text
6520
+ 2023/Estimation[[:space:]]Beyond[[:space:]]Data[[:space:]]Reweighting_[[:space:]]Kernel[[:space:]]Method[[:space:]]of[[:space:]]Moments/75329de4-7d16-4f0b-a2dc-f176a200d6f1_origin.pdf filter=lfs diff=lfs merge=lfs -text
6521
+ 2023/Evaluating[[:space:]]Self-Supervised[[:space:]]Learning[[:space:]]via[[:space:]]Risk[[:space:]]Decomposition/44045258-87ff-4289-9b89-3ddcbaaf44f4_origin.pdf filter=lfs diff=lfs merge=lfs -text
6522
+ 2023/Evaluating[[:space:]]Unsupervised[[:space:]]Denoising[[:space:]]Requires[[:space:]]Unsupervised[[:space:]]Metrics/396784e9-d506-4f5a-b9ef-9488f0964e75_origin.pdf filter=lfs diff=lfs merge=lfs -text
6523
+ 2023/Eventual[[:space:]]Discounting[[:space:]]Temporal[[:space:]]Logic[[:space:]]Counterfactual[[:space:]]Experience[[:space:]]Replay/7b4c4139-bb53-48d5-89d4-db3cf5b217a1_origin.pdf filter=lfs diff=lfs merge=lfs -text
6524
+ 2023/Everyone’s[[:space:]]Preference[[:space:]]Changes[[:space:]]Differently_[[:space:]]A[[:space:]]Weighted[[:space:]]Multi-Interest[[:space:]]Model[[:space:]]For[[:space:]]Retrieval/16f14949-6b89-40e6-b863-f63a1affa5af_origin.pdf filter=lfs diff=lfs merge=lfs -text
6525
+ 2023/Evidential[[:space:]]Interactive[[:space:]]Learning[[:space:]]for[[:space:]]Medical[[:space:]]Image[[:space:]]Captioning/4b38a439-795f-41d6-910c-a3d839586039_origin.pdf filter=lfs diff=lfs merge=lfs -text
6526
+ 2023/Evolving[[:space:]]Semantic[[:space:]]Prototype[[:space:]]Improves[[:space:]]Generative[[:space:]]Zero-Shot[[:space:]]Learning/643e4936-4c69-41de-9bae-3cc535a063cb_origin.pdf filter=lfs diff=lfs merge=lfs -text
6527
+ 2023/Ewald-based[[:space:]]Long-Range[[:space:]]Message[[:space:]]Passing[[:space:]]for[[:space:]]Molecular[[:space:]]Graphs/4f6b923d-130b-4743-8d28-ece3fc974204_origin.pdf filter=lfs diff=lfs merge=lfs -text
6528
+ 2023/Exact[[:space:]]Inference[[:space:]]in[[:space:]]High-order[[:space:]]Structured[[:space:]]Prediction/9fbb6eea-cb29-48e4-9bc4-46ba0a94827c_origin.pdf filter=lfs diff=lfs merge=lfs -text
6529
+ 2023/Existence[[:space:]]and[[:space:]]Estimation[[:space:]]of[[:space:]]Critical[[:space:]]Batch[[:space:]]Size[[:space:]]for[[:space:]]Training[[:space:]]Generative[[:space:]]Adversarial[[:space:]]Networks[[:space:]]with[[:space:]]Two[[:space:]]Time-Scale[[:space:]]Update[[:space:]]Rule/a6ddc989-fc08-4e63-abe5-663a30a4f38c_origin.pdf filter=lfs diff=lfs merge=lfs -text
6530
+ 2023/Expectation-Complete[[:space:]]Graph[[:space:]]Representations[[:space:]]with[[:space:]]Homomorphisms/c26dedef-444e-40c3-88ef-b04b22856e71_origin.pdf filter=lfs diff=lfs merge=lfs -text
6531
+ 2023/Expected[[:space:]]Gradients[[:space:]]of[[:space:]]Maxout[[:space:]]Networks[[:space:]]and[[:space:]]Consequences[[:space:]]to[[:space:]]Parameter[[:space:]]Initialization/a43aaa05-c317-4e2c-836d-a22632535931_origin.pdf filter=lfs diff=lfs merge=lfs -text
6532
+ 2023/Expertise[[:space:]]Trees[[:space:]]Resolve[[:space:]]Knowledge[[:space:]]Limitations[[:space:]]in[[:space:]]Collective[[:space:]]Decision-Making/f779cf6b-e150-4a9a-9770-d81d194e4261_origin.pdf filter=lfs diff=lfs merge=lfs -text
6533
+ 2023/Exphormer_[[:space:]]Sparse[[:space:]]Transformers[[:space:]]for[[:space:]]Graphs/ed0f0238-98b3-4636-af42-97217d192868_origin.pdf filter=lfs diff=lfs merge=lfs -text
6534
+ 2023/Explainability[[:space:]]as[[:space:]]statistical[[:space:]]inference/f03bad45-5c9e-4772-a29f-8a76103ac08c_origin.pdf filter=lfs diff=lfs merge=lfs -text
6535
+ 2023/Explainable[[:space:]]Data-Driven[[:space:]]Optimization_[[:space:]]From[[:space:]]Context[[:space:]]to[[:space:]]Decision[[:space:]]and[[:space:]]Back[[:space:]]Again/d870fcb4-6362-425b-98c2-5a75025aebe6_origin.pdf filter=lfs diff=lfs merge=lfs -text
6536
+ 2023/Explaining[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Shapley[[:space:]]Values/97fa19e1-3aab-4463-ac2c-36c83abf48cc_origin.pdf filter=lfs diff=lfs merge=lfs -text
6537
+ 2023/Explaining[[:space:]]the[[:space:]]effects[[:space:]]of[[:space:]]non-convergent[[:space:]]MCMC[[:space:]]in[[:space:]]the[[:space:]]training[[:space:]]of[[:space:]]Energy-Based[[:space:]]Models/653b5170-6bf5-44c4-bb04-d11f28f99050_origin.pdf filter=lfs diff=lfs merge=lfs -text
6538
+ 2023/Explore[[:space:]]and[[:space:]]Exploit[[:space:]]the[[:space:]]Diverse[[:space:]]Knowledge[[:space:]]in[[:space:]]Model[[:space:]]Zoo[[:space:]]for[[:space:]]Domain[[:space:]]Generalization/9ce1553d-16a2-413c-bc21-ff7f49d3080d_origin.pdf filter=lfs diff=lfs merge=lfs -text
6539
+ 2023/Exploring[[:space:]]Chemical[[:space:]]Space[[:space:]]with[[:space:]]Score-based[[:space:]]Out-of-distribution[[:space:]]Generation/a9e544f0-762c-4641-a74c-1a876fee6d22_origin.pdf filter=lfs diff=lfs merge=lfs -text
6540
+ 2023/Exploring[[:space:]]Model[[:space:]]Dynamics[[:space:]]for[[:space:]]Accumulative[[:space:]]Poisoning[[:space:]]Discovery/f617a689-63fb-415c-9a3b-34e92d56f1db_origin.pdf filter=lfs diff=lfs merge=lfs -text
6541
+ 2023/Exploring[[:space:]]the[[:space:]]Benefits[[:space:]]of[[:space:]]Training[[:space:]]Expert[[:space:]]Language[[:space:]]Models[[:space:]]over[[:space:]]Instruction[[:space:]]Tuning/36800a06-106d-44bd-ab24-6da3fa45d02e_origin.pdf filter=lfs diff=lfs merge=lfs -text
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/36753a02-c352-41b5-9742-dcb005bdfccb_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddc4d1b233e75d761b70b5fa876783e131e35c9355460f72d5927812b1632d3c
3
+ size 587325
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/full.md ADDED
@@ -0,0 +1,628 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming
2
+
3
+ Jinuk Kim $^{*12}$ Yeonwoo Jeong $^{*12}$ Deokjae Lee $^{12}$ Hyun Oh Song $^{12}$
4
+
5
+ # Abstract
6
+
7
+ Recent works on neural network pruning advocate that reducing the depth of the network is more effective in reducing run-time memory usage and accelerating inference latency than reducing the width of the network through channel pruning. In this regard, some recent works propose depth compression algorithms that merge convolution layers. However, the existing algorithms have a constricted search space and rely on human-engineered heuristics. In this paper, we propose a novel depth compression algorithm which targets general convolution operations. We propose a subset selection problem that replaces inefficient activation layers with identity functions and optimally merges consecutive convolution operations into shallow equivalent convolution operations for efficient end-to-end inference latency. Since the proposed subset selection problem is NP-hard, we formulate a surrogate optimization problem that can be solved exactly via two-stage dynamic programming within a few seconds. We evaluate our methods and baselines by TensorRT for a fair inference latency comparison. Our method outperforms the baseline method with higher accuracy and faster inference speed in MobileNetV2 on the ImageNet dataset. Specifically, we achieve $1.41 \times$ speed-up with $0.11\%$ p accuracy gain in MobileNetV2-1.0 on the ImageNet.
8
+
9
+ # 1. Introduction
10
+
11
+ Deep learning with Convolutional Neural Network (CNN) has achieved outstanding results in various fields such as image classification, object detection, image segmentation,
12
+
13
+ *Equal contribution 1 Department of Computer Science and Engineering, Seoul National University 2 Neural Processing Research Center. Correspondence to: Hyun Oh Song <hyunoh@snu.ac.kr>.
14
+
15
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
16
+
17
+ and generation (Tan & Le, 2019; Wang et al., 2021; Isensee et al., 2021; Rombach et al., 2022). However, the success of CNNs in such fields is accompanied by the challenge of increased complexity and inference latency. For real-world applications, accelerating the inference latency of CNNs is of great practical importance, especially when deploying the models on edge devices with limited resources.
18
+
19
+ To this end, a line of research called channel pruning has been introduced to remove unnecessary channels in CNNs to accelerate the wall-clock time in the edge device while preserving the performance of the CNNs (Wen et al., 2016; Tiwari et al., 2021; Shen et al., 2022). However, with the advancement of hardware technology for parallel computation, channel pruning which reduces the width of neural networks has become less effective than removing entire layers in terms of latency (Jordao et al., 2020; Chen & Zhao, 2018; Xu et al., 2020; Fu et al., 2022).
20
+
21
+ In contrast, layer pruning, which prunes entire layers, has been proposed to reduce the depth of neural networks. Layer pruning also significantly reduces the run-time memory usage and achieves effective speed-up in many edge devices compared to channel pruning (Xu et al., 2020). However, layer pruning is more aggressive than channel pruning in terms of reducing the number of parameters and FLOPs, thereby resulting in a more severe accuracy drop compared to channel pruning methods. Instead of naively removing an entire layer, Fu et al. (2022) present a depth compression algorithm called DepthShrinker which integrates layers by replacing inefficient consecutive depth-wise convolution and point-wise convolution with an efficient dense convolution operation in MobileNetV2 (Sandler et al., 2018). This compression algorithm results in depth reduction with low run-time memory usage and fast inference latency similar to layer pruning. However, the depth compression algorithm does not suffer from a commensurate accuracy drop.
22
+
23
+ Although DepthShrinker has shown promising results in reducing the depth of the network while preserving the performance, the method is limited to constricted search space as it only considers merging within the Inverted Residual Block (Fu et al., 2022; Sandler et al., 2018). Furthermore, the method relies on human-engineered heuristics for layer merging which is unlikely to scale to other architectures. To
24
+
25
+ ![](images/de8cb5fd1a82c86de18c2c6a7acd8ecdc516bccc0bdd958e15b7c9f33a684807.jpg)
26
+ Figure 1. Illustration of depth compression for a five-layer CNN, $\bigcirc_{l=1}^{5}\sigma_{l} \circ f_{\theta_{l}}$ . The original network is on the default setting when $A = S = \{1,2,3,4\}$ (above). When $A = \{3\}$ and $S = \{2,3\}$ , the activation layer not in $A$ is replaced with identity functions (middle). Then, the network is merged into the shallow network which functions identically (below).
27
+
28
+ this end, we introduce a novel optimization-based framework for general convolution merging framework that is not restricted to the design of the network and does not rely on manually designed heuristics. We formulate a depth compression optimization problem that replaces inefficient activation layers with identity functions and optimally merges consecutive convolution operations for optimal latency.
29
+
30
+ Our optimization problem is NP-Hard and its objective requires a prohibitively exhaustive training of the neural network. Thus, we formulate a surrogate optimization problem by approximating the objective as the linear sum of the accuracy change induced by each network block. The surrogate optimization problem can be exactly optimized via dynamic programming on a given network architecture with a given latency. Furthermore, we evaluate the latency of the network with TensorRT for a fair comparison (Vanholder, 2016). Our experiments show that the proposed method outperforms the baseline method in both the accuracy and the inference latency in MobileNetV2 on ImageNet dataset. We release the code at https://github.com/snu-mllab/Efficient-CNN-Depth-Compression.
31
+
32
+ # 2. Related Works
33
+
34
+ Channel Pruning Channel pruning originally aims to reduce computation FLOPs by removing less important channels (Li et al., 2017; He et al., 2019; 2018a; Liu et al., 2019; He et al., 2018b; You et al., 2019; Hu et al., 2016; Gao et al., 2021). Specifically, Aflalo et al. (2020) formulate a knapsack problem for channel pruning with an explicit FLOPs constraint. For practitioners, however, end-to-end inference wall-clock time is the most important metric. In light of this, Shen et al. (2022) build a latency lookup table and proposes a knapsack problem for channel pruning with a latency constraint.
35
+
36
+ Network Morphism Our work is partially inspired by network morphism which morphs a trained parent network into a child network that functions identically (Chen et al., 2016; Wei et al., 2016). Here, the child network is larger than the parent network and is finetuned after morphing. Instead, we aim to find the parent network where some activation layers are removed, thereby morphing the parent network into the child network which has a faster inference time and functions almost identically to the parent network.
37
+
38
+ Depth Reduction There are two lines of research that reduce the depth of neural networks: layer-pruning and depth compression. In layer pruning, Jordao et al. (2020) and Chen & Zhao (2018) evaluate the importance of layers by the amount of discriminative information in each feature map. In depth compression, DepthShrinker points out the inefficiency of depth-wise convolutions during inference in the edge device and proposes a depth compression algorithm that replaces inefficient consecutive depth-wise convolution and point-wise convolution inside the Inverted Residual Block with an efficient dense convolution (Fu et al., 2022; Howard et al., 2017; Sandler et al., 2018). We generalize depth compression space to cover any general convolution operations. Also, while DepthShrinker requires full training of the network during the search phase to identify the unnecessary activations, our method employs importance evaluation which can be efficiently computed in an embarrassingly parallel fashion. Furthermore, we propose a novel two-stage dynamic programming algorithm which simultaneously finds the optimal set of selected activation layers and the optimal set of layers to be merged in a few seconds.
39
+
40
+ TensorRT Choosing the appropriate implementation of the network to measure the inference latency is crucial for a fair comparison. For instance, a batch normalization (BN) module can be fused into the preceding convolution layer
41
+
42
+ without compromising accuracy and accelerating the inference latency. In this regard, we utilize TensorRT to optimize trained network architectures with various techniques such as BN fusion, precision calibration and dynamic memory management (Vanholder, 2016).
43
+
44
+ # 3. Preliminary
45
+
46
+ Consider a $L$ -layer CNN which consists of alternating convolution layer $f_{\theta_l}$ and activation layer $\sigma_l$ with the layer index $l \in [L]$ . Each convolution layer is parametrized by convolution kernel parameter $\theta_l \in \mathbb{R}^{C_{l-1} \times C_l \times K_l \times K_l}$ , where $C_{l-1}, C_l, K_l$ represent the number of input channels, the number of output channels, and the kernel size, respectively. The CNN can be represented as a composite function $\bigcirc_{l=1}^L \sigma_l \circ f_{\theta_l}: \mathbb{R}^{H_0 \times W_0 \times K_0 \times K_0} \to \mathbb{R}^{H_L \times W_L \times K_L \times K_L}$ , where $H_l, W_l$ are the height and width of $l$ -th feature map and $\bigcirc$ denotes an iterated function composition. We set the last activation layer $(\sigma_L)$ to identity function (id).
47
+
48
+ Note, any consecutive convolution operations can be replaced by an equivalent convolution operation with a larger kernel due to the associative property. We denote this process as merging. For example, consider two consecutive convolutional layers, $f_{\theta_1}$ and $f_{\theta_2}$ , applied to an input image $X$ (i.e. $f_{\theta_2}(f_{\theta_1}(X))$ ). This can also be computed using an equivalent merged convolutional layer $f_{\theta_2 \circledast \theta_1}$ where $\circledast$ denotes convolution with proper padding. Further merging details can be found in Appendix E.
49
+
50
+ # 4. Method
51
+
52
+ We first formulate an optimal subset selection problem for depth compression under a given latency constraint. Subsequently, we propose a surrogate objective for the objective in the optimal subset selection problem and formulate a corresponding surrogate optimization problem, which can be exactly solved via two-stage dynamic programming (DP).
53
+
54
+ # 4.1. Optimal Subset Selection Problem for Depth Compression
55
+
56
+ Any neighboring convolutional layers can be merged into an equivalent convolutional layer, often resulting in a latency speed-up from the depth compression of the CNN. In this regard, we aim to optimize the replacement of a subset of activation layers with id in order to reduce the latency of the resulting network while preserving its performance.
57
+
58
+ However, merging every consecutive series of convolutional layers into a single large layer may not be the optimal merge in terms of latency. In certain cases, it is possible that merging certain convolutional layers has a detrimental effect on the latency of a network. To illustrate, consider merging two consecutive $1 \times 1$ convolutional layers, with the first
59
+
60
+ layer having 100 input channels and 1 output channel and the second layer having 1 input channel and 100 output channels. Then the merged convolutional layer results in a $1 \times 1$ convolution with 100 input channels and 100 output channels. This merge significantly increases the latency of a merged convolutional layer, thereby canceling out any benefits gained from the depth compression.
61
+
62
+ To address this, we propose two ordered set variables, $A$ and $S$ to be simultaneously optimized. $A$ indicates the layer indices where the activation layer is kept intact and not replaced with an identity function, and $S$ indicates the layer indices where we do not merge. It is important to note that $S$ includes $A$ , since the activation layers that are not id can not be merged. Figure 1 illustrates how network is merged according to $S$ and $A$ . Our goal is to optimize for the ordered set $A$ and $S$ in order to reduce the latency of the resulting network while preserving its performance.
63
+
64
+ Thus, our objective can be formulated as follows:
65
+
66
+ $$
67
+ \underset {A \subseteq S \subseteq [ L - 1 ]} {\text {m a x i m i z e}} \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {l = 1} ^ {L} \left(\mathbb {1} _ {A} (l) \sigma_ {l} + (1 - \mathbb {1} _ {A} (l)) \mathrm {i d}\right) \circ f _ {\theta_ {l}}\right) \tag {1a}
68
+ $$
69
+
70
+ subject to
71
+
72
+ $$
73
+ T \left(\bigotimes_ {i = 1} ^ {| S | + 1} \left(\mathbb {1} _ {A} \left(s _ {i}\right) \sigma_ {s _ {i}} + (1 - \mathbb {1} _ {A} \left(s _ {i}\right)) \mathrm {i d}\right) \circ f _ {\hat {\theta} _ {i}}\right) < T _ {0} \tag {1b}
74
+ $$
75
+
76
+ $$
77
+ \hat {\theta} _ {i} = \bigotimes_ {l = s _ {i - 1} + 1} ^ {s _ {i}} \theta_ {l}, \forall i \in [ | S | + 1 ] \text {a n d} s _ {| S | + 1} = L, s _ {0} = 0,
78
+ $$
79
+
80
+ where $(s_i)_{i=1}^{|S|}$ denotes the elements of $S$ and $\mathrm{Acc}(\cdot)$ and $T(\cdot)$ denote the accuracy and latency of the network, respectively. The objective in Equation (1a) describes the accuracy of the network where the activation layer is replaced by id if the layer index is not in $A$ . The constraint in Equation (1b) describes the latency constraint of the network, which is merged according to $S$ . Note, the networks in Equation (1a) and Equation (1b) function identically.
81
+
82
+ We can simplify the constraint in Equation (1b) by expressing the total latency of the network as the sum of the latency of each merged convolution layer as each layer is sequentially connected. Additionally, we ignore the latency from each activation layer since the latency incurred by activation layers is negligible<sup>1</sup>. Then, the total latency of the merged network in the constraint can be simplified as follows:
83
+
84
+ $$
85
+ \begin{array}{l} T \left(\bigoplus_ {i = 1} ^ {| S | + 1} \left(\mathbb {1} _ {A} \left(s _ {i}\right) \sigma_ {l} + \left(1 - \mathbb {1} _ {A} \left(s _ {i}\right)\right) \mathrm {i d}\right) \circ f _ {\hat {\theta} _ {i}}\right) \\ \approx \sum_ {i = 1} ^ {| S | + 1} T \left((\mathbb {1} _ {A} (s _ {i}) \sigma_ {l} + (1 - \mathbb {1} _ {A} (s _ {i})) \mathrm {i d}) \circ f _ {\hat {\theta} _ {i}}\right) \approx \sum_ {i = 1} ^ {| S | + 1} T \left(f _ {\hat {\theta} _ {i}}\right). \\ \end{array}
86
+ $$
87
+
88
+ As a shorthand, we denote $T(f_{\theta'})$ where $\theta' = \bigotimes_{l=i+1}^{j} \theta_{l}$ as $T[i,j]$ . Note that $f_{\theta'}$ is the merged convolution operation equivalent to $\bigcirc_{l=i+1}^{j} f_{\theta_{l}}$ . Thus, the latency constraint, Equation (1b), can be compactly expressed as $\sum_{s_{i-1}, s_{i} \in \{0\} \cup S \cup \{L\}} T[s_{i-1}, s_{i}] < T_{0}$ .
89
+
90
+ # 4.2. Formulation with the Surrogate Objective
91
+
92
+ Directly optimizing Equation (1) requires training of the whole network for all combinations of $A$ and $S$ which is NP-hard. Therefore, we propose a surrogate objective for the objective in Equation (1a). Through this approach, Equation (1) can be reformulated into an optimal subset selection problem which can be exactly solved via DP.
93
+
94
+ The network in Equation (1a) can be equivalently represented as $\bigcirc_{j = 1}^{|A| + 1}\sigma_{a_j}\circ \left(\bigcirc_{l = a_{j - 1} + 1}^{a_j}f_{\theta_l}\right)$ where $a_0 = 0,a_{|A| + 1} = L$ , and $(a_{j})_{j = 1}^{|A|}$ denote the elements of $A$ in the ascending order. We can observe that $A$ partitions the network into contiguous network blocks, $\bigcirc_{l = a_{i - 1} + 1}^{a_i}f_{\theta_l}$ Therefore, Equation (1a) can be reformulated as the accuracy change from the original network as follows:
95
+
96
+ $$
97
+ \begin{array}{l} \underset {A \subseteq S \subseteq [ L - 1 ]} {\text {m a x i m i z e}} \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {j = 1} ^ {| A | + 1} \sigma_ {a _ {j}} \circ \left(\bigotimes_ {l = a _ {j - 1} + 1} ^ {a _ {j}} f _ {\theta_ {l}}\right)\right) \\ - \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {l = 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}}\right), \tag {2} \\ \end{array}
98
+ $$
99
+
100
+ where $\max_{\theta}\mathrm{Acc}\left(\bigcirc_{l = 1}^{L}\sigma_{l}\circ f_{\theta_{l}}\right)$ is the accuracy of the original network which is a constant.
101
+
102
+ Each contiguous block results in an accuracy change from the original network. However, the exact estimation of the accuracy change resulting from all possible combinations of contiguous network blocks remains impractical due to the exponential number of possible combinations of contiguous network blocks and the requirement of training the neural network for each one. Therefore, we propose the sum of the accuracy change caused by each contiguous network block, $\bigcirc_{l = a_{i - 1} + 1}^{a_i}f_{\theta_l}$ as a proxy for the accuracy change resulting from contiguous network blocks in Equation (2).
103
+
104
+ We denote $I[i,j]$ as the accuracy change when the activation layers between the $i + 1$ -th and $j$ -th layers in the original network are replaced with id. Concretely,
105
+
106
+ $$
107
+ \begin{array}{l} I [ i, j ] := \max _ {\theta} \operatorname {A c c} \left(\underbrace {\bigcap_ {l = j + 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}}} _ {j + 1 \text {t o} L \text {l a y e r s}} \circ \underbrace {\sigma_ {j} \circ \bigcap_ {l = i + 1} ^ {j} f _ {\theta_ {l}}} _ {i + 1 \text {t o} j \text {l a y e r s}} \circ \underbrace {\bigcap_ {l = 1} ^ {i} \sigma_ {l} \circ f _ {\theta_ {l}}} _ {1 \text {t o} i \text {l a y e r s}}\right) \\ - \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {l = 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}}\right). \tag {3} \\ \end{array}
108
+ $$
109
+
110
+ Note that computing $I[\cdot, \cdot]$ can be efficiently done in embarrassingly parallel fashion. We define the surrogate objective for Equation (1a) as $\sum_{a_{j-1}, a_j \in \{0\} \cup A \cup \{L\}} I[a_{j-1}, a_j]$ . Then the optimization problem in Equation (1) becomes
111
+
112
+ $$
113
+ \underset {A \subseteq S \subseteq [ L - 1 ]} {\text {m a x i m i z e}} \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A \cup \{L \}} I [ a _ {j - 1}, a _ {j} ] \tag {4}
114
+ $$
115
+
116
+ $$
117
+ \text{subject to}\quad \sum_{s_{i - 1},s_{i}\in \{0\} \cup S\cup \{L\}}T[s_{i - 1},s_{i}] < T_{0}.
118
+ $$
119
+
120
+ # 4.3. Optimization via Dynamic Programming
121
+
122
+ We first define an ordered set for the indices to be merged for the optimal inference time for the contiguous network block between $k + 1$ -th layer and $l$ -th layer as $S_{\mathrm{opt}}[k,l]$ and the optimal inference time as $T_{\mathrm{opt}}[k,l]$ . Concretely,
123
+
124
+ $$
125
+ T _ {\text {o p t}} [ k, l ] := \min _ {S \subseteq \{k + 1, \dots , l - 1 \}} \sum_ {s _ {i - 1}, s _ {i} \in \{k \} \cup S \cup \{l \}} T [ s _ {i - 1}, s _ {i} ] \tag {5a}
126
+ $$
127
+
128
+ $$
129
+ S _ {\text {o p t}} [ k, l ] := \underset {S \subseteq \{k + 1, \dots , l - 1 \}} {\operatorname {a r g m i n}} \sum_ {s _ {i - 1}, s _ {i} \in \{k \} \cup S \cup \{l \}} T \left[ s _ {i - 1}, s _ {i} \right]. \tag {5b}
130
+ $$
131
+
132
+ For the base case, $T_{\mathrm{opt}}[k,k] = 0$ and $S_{\mathrm{opt}}[k,k] = \emptyset$ . Then, $T_{\mathrm{opt}}[k,l]$ and $S_{\mathrm{opt}}[k,l]$ can be computed via dynamic programming algorithm as described in Algorithm 1.
133
+
134
+ We formulate a sub-optimization problem of Equation (4) with respect to an intermediate layer index, $l \leq L$ and a latency constraint, $t > T_{\mathrm{opt}}[0,l]$ :
135
+
136
+ $$
137
+ \underset {A \subseteq S \subseteq [ l - 1 ]} {\text {m a x i m i z e}} \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A \cup \{l \}} I [ a _ {j - 1}, a _ {j} ] \tag {6}
138
+ $$
139
+
140
+ $$
141
+ \text{subject to}\quad \sum_{s_{i - 1},s_{i}\in \{0\} \cup S\cup \{l\}}T[s_{i - 1},s_{i}] < t.
142
+ $$
143
+
144
+ Then, we define the optimal ordered sets $A$ and $S$ in the sub-optimization problem as $A[l,t]$ and $S[l,t]$ . Here, $A[l,t]$ indicates activation layers to keep until layer $l$ given the latency budget $t$ , and $S[l,t]$ indicates layers to merge until layer $l$ given the latency budget $t$ . Then, $A[L,T_0]$ and $S[L,T_0]$ represent the optimal set $A$ and $S$ of the surrogate optimization problem, Equation (4), respectively.
145
+
146
+ For the base case, we set $A[0,t] = S[0,t] = \emptyset$ . Then, we compute the ordered sets $A[l,t]$ and $S[l,t]$ according to the dynamic programming (DP) recurrence relation defined by
147
+
148
+ Algorithm 1 Finding Optimal Latency with DP
149
+ input $T,L$
150
+ Initialize $T_{\mathrm{opt}}[k,l]\gets 0,S_{\mathrm{opt}}[k,l]\gets \emptyset$ for $0\leq k\leq l\leq L$
151
+ for $l = 1$ to $L$ do
152
+ for $k = 0$ to $l - 1$ do
153
+ $m\gets \underset {k\leq m^{\prime} < l}{\mathrm{argmin}}(T_{\mathrm{opt}}[k,m^{\prime}] + T[m^{\prime},l])$ $T_{\mathrm{opt}}[k,l]\gets T_{\mathrm{opt}}[k,m] + T[m,l]$
154
+ if $m\notin \{k\}$ then
155
+ $S_{\mathrm{opt}}[k,l]\gets S_{\mathrm{opt}}[k,m]\cup \{m\}$
156
+ end if
157
+ end for
158
+ end for
159
+ output $T_{\mathrm{opt}},S_{\mathrm{opt}}$
160
+
161
+ $$
162
+ A [ l, t ] = A [ k, t - T _ {\mathrm {o p t}} [ k, l ] ] \cup \{k: k > 0 \} \tag {7a}
163
+ $$
164
+
165
+ $$
166
+ S [ l, t ] = S [ k, t - T _ {\text {o p t}} [ k, l ] ] \cup \{k: k > 0 \} \cup S _ {\text {o p t}} [ k, l ], \tag {7b}
167
+ $$
168
+
169
+ $$
170
+ k = \operatorname *{argmax}_{0\leq k^{\prime} < l}\sum_{\substack{a_{j - 1},a_{j}\in \{0\} \cup A[k^{\prime},l - T_{\mathrm{opt}}[k^{\prime},l]]\cup \{k^{\prime},l\}}}I[a_{j - 1},a_{j}]
171
+ $$
172
+
173
+ $$
174
+ \text {s u b j e c t} T _ {\mathrm {o p t}} [ 0, k ^ {\prime} ] + T _ {\mathrm {o p t}} [ k ^ {\prime}, l ] < t,
175
+ $$
176
+
177
+ where $k$ is the maximum element of $A[l,t]$ . Therefore, $A[l,t]$ is an empty set when $k = 0$ . Figure 2 illustrates DP computation example in detail.
178
+
179
+ The $j$ -th activation layer of our target network for depth compression is either the $j$ -th activation layer in the vanilla network $(\sigma_{j})$ or an identity function (id). Thus, if $\sigma_{j} = \mathrm{id}$ , the $j$ -th activation layer in the target network is inherently an identity function. For instance, in MobileNetV2, the identity function serves as the activation layer at the end of each Inverted Residual Block, and the corresponding activation layers in our target network are bound to be the identity functions (Sandler et al., 2018). On the other hand, non-linear activation layers at the end of the Inverted Residual Block can improve the performance of the networks compressed from MobileNetV2 (Fu et al., 2022). To this end, we incorporate the network blocks that have non-linear activation layers at the end of the Inverted Residual Block into the DP formulation. We provide a detailed explanation in Appendix B.1.
180
+
181
+ # 4.4. Theoretical Analysis
182
+
183
+ Proposition 4.1 shows that Equation (7) exactly computes $A[l, t]$ and $S[l, t]$ . The detailed procedure for implementing the DP recurrence relation can be found in Algorithm $2^2$ . At the start of Algorithm 2, we compute the ordered set for the indices to be merged for the optimal inference time for the
184
+
185
+ Algorithm 2 Solving the Surrogate Objective with DP
186
+ input $T_0,L,T,I$ Initialize $D[l,t]\gets 0,A[l,t]\gets \emptyset ,S[l,t]\gets \emptyset \quad \forall t,l$ $T_{\mathrm{opt}},S_{\mathrm{opt}}\gets \mathrm{Algorithm}1(T,L)$
187
+ for $l = 1$ to $L$ do
188
+ for $t = T_{\mathrm{opt}}[0,l] + 1$ to $T_0$ do
189
+ $k\gets \operatorname {argmax}_{0\leq k^{\prime} < l}(D[k^{\prime},t - T_{\mathrm{opt}}[k^{\prime},l]] + I(k^{\prime},l))$ subject to $T_{\mathrm{opt}}[0,k^{\prime}] + T_{\mathrm{opt}}[k^{\prime},l] < t$ $t_\mathrm{last}\gets T_\mathrm{opt}[k,l]$ $D[l,t]\gets D[k,t - t_\mathrm{last}] + I[k,l]$ $A[l,t]\gets A[k,t - t_\mathrm{last}]\cup \{k:k > 0\}$ $S[l,t]\gets S[k,t - t_\mathrm{last}]\cup \{k:k > 0\} \cup S_\mathrm{opt}[k,l]$
190
+ end for
191
+ end for
192
+ output $A[L,T_0],S[L,T_0]$
193
+
194
+ contiguous network block between $k + 1$ -th layer and $l$ -th layer and the optimal inference time at Algorithm 1 where the time complexity for the DP recurrences is $\mathcal{O}(L^3)$ . In Algorithm 2, the time complexity for the DP recurrences is $\mathcal{O}(L^2 T_0)$ , thus the total time complexity is $\mathcal{O}(L^3 + L^2 T_0)$ .
195
+
196
+ Proposition 4.1. $A[l, t]$ and $S[l, t]$ computed from the DP recurrence relations, Equation (7) are the optimal sets $A$ and $S$ of Equation (6), respectively.
197
+
198
+ Proof. Refer to Appendix A.
199
+
200
+ For a given set of the optimal indices where activation layers are not replaced with identity functions, $A[l,t]$ and the network replaced according to $A[l,t]$ , Proposition 4.2 shows that $S[l,t]$ is the optimal $S$ which merges the network into the optimal structure in terms of latency.
201
+
202
+ Proposition 4.2. $S[l, t]$ computed from the DP recurrence relations, Equation (7) is the optimal $S$ which minimizes the latency of the network when $A[l, t]$ is fixed. Concretely, $S[l, t]$ is the optimal $S$ of the optimization problem:
203
+
204
+ $$
205
+ \min _ {A [ l, t ] \subseteq S \subseteq [ l - 1 ]} \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \cup \{l \}} T \left[ s _ {i - 1}, s _ {i} \right]. \tag {8}
206
+ $$
207
+
208
+ Proof. Refer to Appendix A.
209
+
210
+ # 5. Experimental Results
211
+
212
+ We evaluate our method on various datasets and network architectures. We first introduce implementation details for the overall process in the experiments. Then, we present an evaluation of our method on various scales of networks and datasets to demonstrate its effectiveness. Furthermore, we conduct ablation studies on the search space of our proposed method and the ordered set $S$ .
213
+
214
+ ![](images/c7cda78b77be1d406a5ae74a54d3ee86650d762f2d0c619b809e020fb8403020.jpg)
215
+ Figure 2. Illustration of DP table construction based on the recurrence relation (Equation (7)). $D[3,21]$ is computed upon the solutions of the previous sub-problems $(D[0,1],D[1,7],D[2,10])$ .
216
+
217
+ # 5.1. Implementation Details
218
+
219
+ Measurement We first evaluate the latency of each contiguous network block, $T[i,j]$ , individually. The latency of the network is subject to the format which it is implemented on. We utilize TensorRT to convert the network into its optimal form and measure the latency for a fair comparison.
220
+
221
+ Then, we measure the change of the accuracy incurred by each contiguous network block, $I[i,j]$ , for Equation (3). As the number of possible contiguous network blocks is of the order of $N^2$ , where $N$ is the number of activations, we need to train $\mathcal{O}(N^2)$ networks to obtain the accuracy change of every contiguous network block. For efficiency, we approximate the first term in Equation (3) using the accuracy of the network trained for a few epochs after replacing the activation layers between the $i + 1$ -th and $j$ -th layers with identity functions. Specific details on evaluating the importance of each block and the methodologies used to normalize the importance values can be found in the Appendix B.
222
+
223
+ Dynamic Programming Given the latency of each contiguous network block, $T[i,j]$ , and the accuracy change caused by each contiguous network block, $I[i,j]$ , we can
224
+
225
+ solve Equation (4) for the time constraint $T_0$ with Algorithm 2. In Algorithm 2, we assume the time constraint $T_0$ and time index $t$ to be integers. In practice, we multiply every occurrence of $t$ and $T_0$ by a constant factor and round the multiplied values to integer.
226
+
227
+ Finetune and Merge After obtaining the optimal ordered sets $A$ and $S$ in Equation (4), we replace the activation layers not present in $A$ with identity functions. In order to exactly merge the network in the inference phase, it is necessary to ensure that sufficient padding is applied to the first convolution layers within the target contiguous network blocks to be merged. To this end, we reorder the zero padding according to the set $S$ first, then finetune the network until convergence. We detail this padding reordering technique in Appendix E.2<sup>3</sup>. At the test time, we merge the finetuned network following $S$ and evaluate the latency.
228
+
229
+ During finetuning, we follow the identical training protocol with the DepthShrinker for finetuning (Fu et al., 2022). In detail, we finetune the network for 180 epochs using cosine learning rate decay with the SGD optimizer. We further adopt label smoothing, random erasing and RandAugment following Fu et al. (2022), except in the case of MobileNetV2-1.0 on ImageNet where additional augmentation did not improve performance (Müller et al., 2019; Zhong et al., 2017; Cubuk et al., 2020).
230
+
231
+ Evaluation We employ RTX2080 Ti GPU when evaluating the latency of each contiguous network block. Then, we evaluate the end-to-end inference latency of merged architectures on various GPUs including TITAN Xp, RTX2080 Ti, RTX 3090, and Tesla V100. Also, we evaluate the inference latency of the networks in two distinct formats: 1) TensorRT exported model (FP32) and 2) PyTorch model (Vanholder, 2016; Paszke et al., 2017). To ensure a fair comparison, we fuse the batch normalization (BN) modules with the previous convolution layers when we measure latency in the PyTorch format, as the depth compression algorithm results in a different number of BN modules.
232
+
233
+ # 5.2. Depth Compression Results
234
+
235
+ We apply our depth compression method to the MobileNetV2 architecture on ImageNet-100 and ImageNet dataset, starting from the public pretrained weight (Sandler et al., 2018; Tian et al., 2020; Russakovsky et al., 2015).
236
+
237
+ # 5.2.1. IMAGENET-100
238
+
239
+ We first experiment with our depth compression method on the ImageNet-100 dataset, which is a subset of ImageNet consisting of 100 classes. We bring the list of the subclasses
240
+
241
+ Table 1. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 and MobileNetV2-1.4 on ImageNet-100 dataset. Compression methods use the latency information of RTX 2080 Ti and is measured on RTX 2080 Ti with batch size of 128. We report the average accuracy of the three runs of finetuning.
242
+
243
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.0</td><td>87.58</td><td>19.25</td><td>40.61</td></tr><tr><td>DS-A-1.0</td><td>87.58</td><td>14.74</td><td>27.59</td></tr><tr><td>Ours</td><td>87.69</td><td>12.53</td><td>23.02</td></tr><tr><td>DS-B-1.0</td><td>87.31</td><td>12.33</td><td>22.99</td></tr><tr><td>Ours</td><td>87.45</td><td>12.11</td><td>22.29</td></tr><tr><td>DS-C-1.0</td><td>85.92</td><td>11.20</td><td>20.76</td></tr><tr><td>Ours</td><td>86.73</td><td>11.14</td><td>20.62</td></tr><tr><td>DS-D-1.0</td><td>85.30</td><td>10.49</td><td>18.78</td></tr><tr><td>Ours</td><td>85.91</td><td>9.62</td><td>16.82</td></tr><tr><td>MBV2-1.4</td><td>88.88</td><td>29.94</td><td>61.68</td></tr><tr><td>DS-A-1.4</td><td>88.01</td><td>19.61</td><td>35.06</td></tr><tr><td>Ours</td><td>88.41</td><td>19.48</td><td>34.01</td></tr><tr><td>DS-B-1.4</td><td>86.99</td><td>19.21</td><td>31.63</td></tr><tr><td>Ours</td><td>87.58</td><td>18.22</td><td>30.77</td></tr><tr><td>DS-C-1.4</td><td>86.73</td><td>17.47</td><td>29.73</td></tr><tr><td>DS-D-1.4</td><td>86.05</td><td>17.50</td><td>27.99</td></tr><tr><td>Ours</td><td>87.18</td><td>16.26</td><td>27.42</td></tr><tr><td>DS-E-1.4</td><td>85.29</td><td>15.67</td><td>26.08</td></tr><tr><td>Ours</td><td>85.93</td><td>14.65</td><td>22.96</td></tr></table>
244
+
245
+ from Tian et al. (2020). The size of the image is preprocessed to $224 \times 224$ and the dataset contains approximately 1200 images per class. We apply our depth compression method to both MobileNetV2-1.0 and MobileNetV2-1.4 starting from the pretrained weight and compare it to the architectures proposed in DepthShrinker.
246
+
247
+ When implementing the DepthShrinker on the ImageNet-100 dataset, we bring the architectures in DepthShrinker and finetune from the pretrained weight after substituting the last classifier to match the number of classes (Fu et al., 2022). Then we measure the latency of the merged network.
248
+
249
+ Table 1 summarizes the depth compression results in MobileNetV2-1.0 and MobileNetV2-1.4. Our method consistently outperforms the baseline at every compression ratio in MobileNetV2-1.0 and MobileNetV2-1.4. In particular, we achieve $1.08 \times$ speedup in TensorRT compiled format with $1.13\%$ p higher accuracy compared to DS-D-1.4. Also, we achieve $1.18 \times$ speedup with $0.11\%$ p higher accuracy in TensorRT compiled format compared to DS-A-1.0.
250
+
251
+ Table 2. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 on ImageNet dataset. Compression methods use the latency information of RTX 2080 Ti and is measured on RTX 2080 Ti with batch size of 128. $\dagger$ denotes the accuracy of the pretrained weight used in DepthShrinker, and we use the same pretrained weight for a fair comparison.
252
+
253
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.0</td><td>72.89†</td><td>19.26</td><td>40.71</td></tr><tr><td>DS-A-1.0</td><td>72.37</td><td>14.82</td><td>27.53</td></tr><tr><td>Ours</td><td>72.83</td><td>13.67</td><td>25.09</td></tr><tr><td>DS-B-1.0</td><td>71.96</td><td>12.42</td><td>22.92</td></tr><tr><td>Ours</td><td>72.13</td><td>12.38</td><td>21.74</td></tr><tr><td>DS-C-1.0</td><td>70.87</td><td>11.28</td><td>20.77</td></tr><tr><td>Ours</td><td>71.44</td><td>10.90</td><td>19.75</td></tr><tr><td>DS-D-1.0</td><td>69.43</td><td>10.53</td><td>18.82</td></tr><tr><td>Ours</td><td>70.65</td><td>9.88</td><td>16.55</td></tr></table>
254
+
255
+ Additionally, we evaluate the wall-clock inference time on various GPU platforms other than RTX 2080 Ti. The comprehensive result of the latency on different GPUs can be found in Appendix C.2. Furthermore, we reproduce the full searching stage of DepthShrinker on top of the ImageNet-100 dataset and compare our method against the resulting architecture which we also provide the results in Appendix C.1.
256
+
257
+ # 5.2.2. IMAGENET
258
+
259
+ We apply our depth compression method to MobileNetV2-1.0 and MobileNetV2-1.4 on the full ImageNet dataset (Rusakovsky et al., 2015) and compare with the architectures proposed in DepthShrinker (Fu et al., 2022) $^{4}$ . Note that every method uses the latency information of the RTX 2080 Ti with TensorRT and is measured on different model formats and GPU platforms.
260
+
261
+ We use the same pretrained weight with DepthShrinker for a fair comparison and report the accuracy of it for the vanilla network. It is worth noting that this accuracy value differs from the one reported by Fu et al. (2022) because they reported the accuracy of the vanilla network from their baseline work instead of the pretrained weight they started from. We report the accuracy of the pretrained weight to precisely convey the effect of the compression methods.
262
+
263
+ Table 2 demonstrates that our method consistently outperforms the baseline in MobileNetV2-1.0 architecture on the ImageNet dataset. Specifically, our method attains $1.08 \times$
264
+
265
+ Table 3. Accuracy and latency of compressed architectures applied to MobileNetV2-1.4 on ImageNet dataset. Compression methods use the latency information of RTX 2080 Ti. The latency of the compressed network architecture is measured on TITAN Xp, RTX 2080 Ti, RTX 3090, and Tesla V100 with batch size of 128. $\dagger$ denotes the accuracy of the pretrained weight used in DepthShrinker, and we use the same pretrained weight for a fair comparison.
266
+
267
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Acc (%)</td><td colspan="4">TensorRT Latency (ms)</td><td>w/o TensorRT (ms)</td></tr><tr><td>TITAN Xp</td><td>RTX 2080 Ti</td><td>RTX 3090</td><td>Tesla V100</td><td>RTX 2080 Ti</td></tr><tr><td>MobileNetV2-1.4</td><td>76.28†</td><td>42.13</td><td>29.93</td><td>20.79</td><td>24.35</td><td>61.64</td></tr><tr><td>MBV2-1.4-DS-A</td><td>74.42</td><td>26.87</td><td>19.62</td><td>13.54</td><td>16.13</td><td>35.05</td></tr><tr><td>Ours</td><td>74.68</td><td>25.77</td><td>18.63</td><td>12.88</td><td>15.89</td><td>32.35</td></tr><tr><td>MBV2-1.4-DS-B</td><td>74.06</td><td>25.30</td><td>19.20</td><td>13.21</td><td>15.82</td><td>31.63</td></tr><tr><td>Ours</td><td>74.19</td><td>24.69</td><td>18.10</td><td>12.32</td><td>15.15</td><td>31.34</td></tr><tr><td>MBV2-1.4-DS-C</td><td>73.30</td><td>23.97</td><td>17.48</td><td>12.07</td><td>14.48</td><td>29.69</td></tr><tr><td>MBV2-1.4-DS-D</td><td>72.99</td><td>22.81</td><td>17.51</td><td>12.01</td><td>14.30</td><td>27.93</td></tr><tr><td>Ours</td><td>73.46</td><td>22.40</td><td>16.39</td><td>11.15</td><td>13.64</td><td>27.54</td></tr><tr><td>MBV2-1.4-DS-E</td><td>72.34</td><td>21.04</td><td>15.71</td><td>10.81</td><td>12.97</td><td>26.01</td></tr><tr><td>Ours</td><td>72.57</td><td>20.49</td><td>15.03</td><td>10.29</td><td>12.86</td><td>25.84</td></tr></table>
268
+
269
+ speedup with $0.46\%$ higher accuracy compared to DS-A-1.0. We present the comprehensive table including the latency on different GPUs in Appendix C.2.
270
+
271
+ Table 3 shows the result of applying our method to MobileNetV2-1.4. The result demonstrates that our method outperforms the baseline method in every compression ratio and across all model formats and GPU platforms. In particular, our method achieves $1.07 \times$ speedup in TensorRT compiled format with higher accuracy compared to MBV2-1.4-DS-C. Compared to the pretrained network, our compressed network achieves $1.61 \times$ speedup in TensorRT compiled format and $1.91 \times$ speedup without TensorRT with $1.60\%$ p accuracy drop.
272
+
273
+ We further present the results of applying knowledge distillation from the pretrained weight when we finetune the compressed networks. Table 4 shows that adopting the knowledge distillation technique further boosts the accuracy of the compressed networks. Specifically for MobileNetV2-1.0, our method achieves $1.41 \times$ speedup in TensorRT format and $1.62 \times$ speedup in PyTorch without losing accuracy from the pretrained weight.
274
+
275
+ # 5.3. Ablation Study on Ordered Set to be Merged
276
+
277
+ Recall the definition of $A$ and $S$ : $A$ indicates locations where the activation layer is not replaced with an identity function and $S$ indicates indices where we do not merge. The set $S$ always includes $A$ since the activation layers that are not id cannot be merged. One could argue that we can merge the layers with respect to $A$ , without separately computing the optimal merge pattern $S$ . In this ablation study, we compare the inference time of the merged network ac
278
+
279
+ Table 4. Accuracy and latency of compressed architectures applied to MobileNetV2 on ImageNet dataset adopting knowledge distillation technique. Compression methods use the latency information of RTX 2080 Ti and the latency is measured on RTX 2080 Ti with batch size of 128. $\dagger$ denotes the accuracy of the pretrained weight used in DepthShrinker, and we use the same pretrained weight for a fair comparison.
280
+
281
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.0</td><td>72.89†</td><td>19.26</td><td>40.71</td></tr><tr><td>DS-A-1.0</td><td>72.76</td><td>14.82</td><td>27.53</td></tr><tr><td>Ours</td><td>73.00</td><td>13.67</td><td>25.09</td></tr><tr><td>MBV2-1.4</td><td>76.28†</td><td>29.93</td><td>61.64</td></tr><tr><td>DS-A-1.4</td><td>75.08</td><td>19.62</td><td>35.05</td></tr><tr><td>Ours</td><td>75.16</td><td>18.80</td><td>32.78</td></tr></table>
282
+
283
+ cording to $A$ and $S$ . Figure 3 shows that the network merged according to $S$ is about $30\%$ faster than the network merged according to $A$ . This demonstrates that jointly optimizing over $A$ and $S$ simultaneously is crucial for optimal depth compression.
284
+
285
+ # 5.4. An Illustration of the Larger Search Space
286
+
287
+ The scope of the DepthShrinker is restricted to the cases where merging operation occurs within the Inverted Residual Block (Fu et al., 2022). On the other hand, our merging algorithm can handle any series of convolution operations and is agnostic to any specific block structure. For instance,
288
+
289
+ ![](images/69ced8b446635f29e8a94ee96ce6dffd976fe216253b87a515a349c93c135033.jpg)
290
+ Figure 3. Latency comparison between the network that is merged according to $A$ and the network that is merged according to $S$ for different time constraint $T_0$ . $A$ and $S$ are the optimal solutions of Equation (4) where $I[\cdot, \cdot]$ and $T[\cdot, \cdot]$ are evaluated for MobileNetV2-1.0 on ImageNet dataset.
291
+
292
+ our method finds the architecture that merges across the blocks, which DepthShrinker cannot find as shown in Figure 4. Our method allows us to merge more general series of layers enabling us to discover a more diverse kind of efficient structure.
293
+
294
+ # 6. Conclusion
295
+
296
+ We propose an efficient depth compression algorithm to reduce the depth of neural networks for the reduction in run-time memory usage and fast inference latency. Our compression target includes any general convolution operations, whereas existing methods are limited to consecutive depth-wise convolution and point-wise convolution within Inverted Residual Block. We propose a subset selection problem which replaces inefficient activation layers with identity functions and optimally merges consecutive convolution operations into shallow equivalent convolution operations for fast end-to-end inference latency. Since the optimal depth subset selection problem is NP-hard, we formulate a surrogate optimization problem which can be exactly solved via two-stage dynamic programming within a few seconds. We evaluate our methods and baselines by TensorRT for a fair inference latency comparison. Our method outperforms Depthshrinker with a higher accuracy and faster inference speed in MobileNetV2 on the ImageNet dataset. Specifically, we achieve $1.41 \times$ speed-up with $0.11\%$ p accuracy gain in MobileNetV2-1.0 on the ImageNet.
297
+
298
+ # Acknowledgements
299
+
300
+ This work was supported in part by Samsung Advanced Institute of Technology, Samsung Electronics Co., Ltd. (IO220810-01900-01), Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) ((SW STAR LAB) Development of deployable learning intelligence via self
301
+
302
+ ![](images/82f11a364d149ff27d2b7f1dd37678956b411a21831806f6945725fbe3a6d5d2.jpg)
303
+ Figure 4. Example of our method finding the network structure that DepthShrinker is unable to find. Our method has a larger search space since it can merge across the blocks while DepthShrinker only considers merging within the Inverted Residual Block. $I[\cdot, \cdot]$ and $T[\cdot, \cdot]$ are evaluated for MobileNetV2-1.4 on ImageNet.
304
+
305
+ sustainable and trustworthy machine learning). This material is based upon work supported by the Air Force Office of Scientific Research under award number FA2386-22-1-4010. Yeonwoo Jeong was supported by National Research Foundation of Korea Grant funded by the Korean Government (NRF-2019-Global Ph.D. Fellowship Program). Hyun Oh Song is the corresponding author.
306
+
307
+ # References
308
+
309
+ Aflalo, Y., Noy, A., Lin, M., Friedman, I., and Zelnik, L. Knapsack pruning with inner distillation. In arXiv:2002.08258, 2020.
310
+ Chen, S. and Zhao, Q. Shallowing deep networks: Layerwise pruning based on feature representations. IEEE transactions on pattern analysis and machine intelligence, 2018.
311
+ Chen, T., Goodfellow, I. J., and Shlens, J. Net2net: Accelerating learning via knowledge transfer. In ICLR, 2016.
312
+ Cubuk, E. D., Zoph, B., Shlens, J., and Le, Q. V. Randaugment: Practical automated data augmentation with a reduced search space. In CVPR Workshops, 2020.
313
+
314
+ Ding, X., Zhang, X., Ma, N., Han, J., Ding, G., and Sun, J. Repvgg: Making vgg-style convnets great again. In CVPR, 2021.
315
+ Fu, Y., Yang, H., Yuan, J., Li, M., Wan, C., Krishnamoorthi, R., Chandra, V., and Lin, Y. Depthshrinker: A new compression paradigm towards boosting real-hardware efficiency of compact neural networks. In ICML, 2022.
316
+ Gao, S., Huang, F., Cai, W., and Huang, H. Network pruning via performance maximization. In CVPR, 2021.
317
+ He, Y., Kang, G., Dong, X., Fu, Y., and Yang, Y. Soft filter pruning for accelerating deep convolutional neural networks. In *IJCAI*, 2018a.
318
+ He, Y., Lin, J., Liu, Z., Wang, H., Li, L.-J., and Han, S. Amc: Automl for model compression and acceleration on mobile devices. In ECCV, 2018b.
319
+ He, Y., Liu, P., Wang, Z., Hu, Z., and Yang, Y. Filter pruning via geometric median for deep convolutional neural networks acceleration. In CVPR, 2019.
320
+ Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., Andreetto, M., and Adam, H. Mobilenets: Efficient convolutional neural networks for mobile vision applications. In arXiv:1704.04861, 2017.
321
+ Hu, H., Peng, R., Tai, Y.-W., and Tang, C.-K. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. In arXiv:1607.03250, 2016.
322
+ Isensee, F., Jaeger, P. F., Kohl, S. A., Petersen, J., and Maier-Hein, K. H. nnu-net: a self-configuring method for deep learning-based biomedical image segmentation. Nature methods, 2021.
323
+ Jordao, A., Lie, M., and Schwartz, W. R. Discriminative layer pruning for convolutional neural networks. IEEE Journal of Selected Topics in Signal Processing, 2020.
324
+ Li, H., Kadav, A., Durdanovic, I., Samet, H., and Graf, H. P. Pruning filters for efficient convnets. In ICLR, 2017.
325
+ Liu, Z., Mu, H., Zhang, X., Guo, Z., Yang, X., Cheng, K., and Sun, J. Metapruning: Meta learning for automatic neural network channel pruning. In ICCV, 2019.
326
+ Liu, Z., Sun, M., Zhou, T., Huang, G., and Darrell, T. Rethinking the value of network pruning. In ICLR, 2019.
327
+ Müller, R., Kornblith, S., and Hinton, G. E. When does label smoothing help? In NeurIPS, 2019.
328
+ Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., DeVito, Z., Lin, Z., Desmaison, A., Antiga, L., and Lerer, A. Automatic differentiation in pytorch. In NIPS-W, 2017.
329
+
330
+ Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, B. High-resolution image synthesis with latent diffusion models. In CVPR, 2022.
331
+ Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., et al. Imagenet large scale visual recognition challenge. In IJCV, 2015.
332
+ Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and Chen, L.-C. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018.
333
+ Shen, M., Yin, H., Molchanov, P., Mao, L., Liu, J., and Alvarez, J. M. Structural pruning via latency-saliency knapsack. In NeurIPS, 2022.
334
+ Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
335
+ Tan, M. and Le, Q. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, 2019.
336
+ Tian, Y., Krishnan, D., and Isola, P. Contrastive multiview coding. In ECCV, 2020.
337
+ Tiwari, R., Bamba, U., Chavan, A., and Gupta, D. K. Chipnet: Budget-aware pruning with heaviside continuous approximations. In ICLR, 2021.
338
+ Vanholder, H. Efficient inference with tensors. In GTC, 2016.
339
+ Wang, W., Xie, E., Li, X., Fan, D.-P., Song, K., Liang, D., Lu, T., Luo, P., and Shao, L. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In ICCV, 2021.
340
+ Wei, T., Wang, C., Rui, Y., and Chen, C. W. Network morphism. In ICML, 2016.
341
+ Wen, W., Wu, C., Wang, Y., Chen, Y., and Li, H. Learning structured sparsity in deep neural networks. In NeurIPS, 2016.
342
+ Xu, P., Cao, J., Shang, F., Sun, W., and Li, P. Layer pruning via fusible residual convolutional block for deep neural networks. arXiv, 2020.
343
+ You, Z., Yan, K., Ye, J., Ma, M., and Wang, P. Gate decorator: Global filter pruning method for accelerating deep convolutional neural networks. In NeurIPS, 2019.
344
+ Zhong, Z., Zheng, L., Kang, G., Li, S., and Yang, Y. Random erasing data augmentation. In arXiv preprint arXiv:1708.04896, 2017.
345
+
346
+ # A. Proof
347
+
348
+ Proposition A.1. $A[l,t]$ , and $S[l,t]$ computed from the DP recurrence relations, Equation (7) are the optimal sets $A$ and $S$ of Equation (6), respectively.
349
+
350
+ Proof. For given $(l_0, t_0)$ , we suppose for all $l < l_0$ and $t < t_0$ , $(A[l, t], S[l, t])$ computed from the DP recurrence, Equation (7) are the optimal $(A, S)$ of Equation (6), respectively. When $(l, t) = (l_0, t_0)$ ,
351
+
352
+ $$
353
+ \begin{array}{l} \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S [ l _ {0}, t _ {0} ] \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S [ k _ {0}, t _ {0} - T _ {\mathrm {o p t}} [ k _ {0}, l _ {0} ] ] \cup \{k _ {0} \} \cup S _ {\mathrm {o p t}} [ k _ {0}, l _ {0} ] \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \quad (\text {b y}) \\ = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S [ k _ {0}, t _ {0} - T _ {\mathrm {o p t}} [ k _ {0}, l _ {0} ] ] \cup \{k _ {0} \}} T [ s _ {i - 1}, s _ {i} ] + \sum_ {s _ {i - 1}, s _ {i} \in \{k _ {0} \} \cup S _ {\mathrm {o p t}} [ k _ {0}, l _ {0} ] \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \\ = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \left[ k _ {0}, t _ {0} - T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right] \right] \cup \left\{k _ {0} \right\}} T \left[ s _ {i - 1}, s _ {i} \right] + T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right] \quad (\text {b y}) \\ < \left(t _ {0} - T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right]\right) + T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right] = t _ {0}, \\ \end{array}
354
+ $$
355
+
356
+ (by the optimality assumption for $k_{0} < l_{0}$ and $t_0 - T_{\mathrm{opt}}[k_0, , l_0] < t_0$ )
357
+
358
+ where
359
+
360
+ $$
361
+ k_{0} = \operatorname *{argmax}_{0\leq k^{\prime} < l}\sum_{\substack{a_{j - 1},a_{j}\in \{0\} \cup A[k^{\prime},t_{0} - T_{\mathrm{opt}}[k^{\prime},l_{0}]]\cup \{k^{\prime},l\}}}I[a_{j - 1},a_{j}]
362
+ $$
363
+
364
+ subject to $T_{\mathrm{opt}}[0, k'] + T_{\mathrm{opt}}[k', l] < t_0$ .
365
+
366
+ Assume that $(A[l_0, t_0], S[l_0, t_0])$ obtained using Equation (7) are not optimal $(A, S)$ and $(A^*, S^*)$ are the optimal $(A, S)$ of Equation (6) when $(l, t) = (l_0, t_0)$ . Then,
367
+
368
+ $$
369
+ \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A ^ {*} \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] > \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ l _ {0}, t _ {0} ] \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] \tag {9a}
370
+ $$
371
+
372
+ $$
373
+ \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S ^ {*} \cup \{l _ {0} \}} T \left[ s _ {i - 1}, s _ {i} \right] < t _ {0}, \tag {9b}
374
+ $$
375
+
376
+ where $A^{*}\subseteq S^{*}\subseteq [l_{0} - 1]$
377
+
378
+ $A^{*}$ is not an empty set due to Equation (9a) and
379
+
380
+ $$
381
+ \begin{array}{l} \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ l _ {0}, t _ {0} ] \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ k _ {0}, t _ {0} - T _ {\text {o p t}} [ k _ {0}, l _ {0} ] ] \cup \{k _ {0}, l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] \quad (\text {b y}) \\ \geq \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ 0, t _ {0} - T _ {\text {o p t}} [ 0, l _ {0} ] ] \cup \{0, l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] \quad (\text {b y}) \\ = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup \emptyset \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ]. \quad (\text {b y}) \\ \end{array}
382
+ $$
383
+
384
+ Then, let $k^*$ be the maximum value of set $A^*$ .
385
+
386
+ We define $A' = A^* \setminus \{k^*\}$ , $S_{<k^*}' = \{s \in S^* \mid s < k^*\}$ , and $S_{>k^*}' = \{s \in S^* \mid s > k^*\}$ . The upper bound of $T(S_{<k^*}', 0, k^*)$ is given as follows:
387
+
388
+ $$
389
+ \begin{array}{l} \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S _ {< k ^ {*}} ^ {\prime} \cup \{k ^ {*} \}} T [ s _ {i - 1}, s _ {i} ] = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S ^ {*} \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] - \sum_ {s _ {i - 1}, s _ {i} \in \{k ^ {*} \} \cup S _ {> k ^ {*}} ^ {\prime} \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \\ \leq \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S ^ {*} \cup \left\{l _ {0} \right\}} T \left[ s _ {i - 1}, s _ {i} \right] - T _ {\text {o p t}} \left[ k ^ {*}, l _ {0} \right] \quad (\text {b y}) \\ < t _ {0} - T _ {\text {o p t}} \left[ k ^ {*}, l _ {0} \right]. \quad \text {(b y E q u a t i o n (9 b))} \\ \end{array}
390
+ $$
391
+
392
+ Therefore, the optimality assumption of $A[k^{*}, t_{0} - T_{\mathrm{opt}}[k^{*}, l_{0}]]$ in Equation (6) leads to the inequality:
393
+
394
+ $$
395
+ \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A \left[ k ^ {*}, t _ {0} - T _ {\text {o p t}} \left[ k ^ {*} \right], l _ {0} \right] \cup \{k ^ {*} \}} I \left[ a _ {j - 1}, a _ {j} \right] \geq \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A ^ {\prime} \cup \{k ^ {*} \}} I \left[ a _ {j - 1}, a _ {j} \right]. \tag {10}
396
+ $$
397
+
398
+ Thus,
399
+
400
+ $$
401
+ \begin{array}{l} \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ l _ {0}, t _ {0} ] \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ k _ {0}, t _ {0} - T _ {\text {o p t}} [ k _ {0}, l _ {0} ] ] \cup \{k _ {0}, l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] \quad (\text {b y}) \\ \geq \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ k ^ {*}, t _ {0} - T _ {\text {o p t}} [ k ^ {*} \cdot l _ {0} ] ] \cup \{k ^ {*} \cdot l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] \quad (\text {b y}) \\ = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A [ k ^ {*}, t _ {0} - T _ {\mathrm {o p t}} [ k ^ {*}, l _ {0} ] ] \cup \{k ^ {*} \}} I [ a _ {j - 1}, a _ {j} ] + I [ k ^ {*}, l _ {0} ] \\ \geq \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A ^ {\prime} \cup \{k ^ {*} \}} I [ a _ {j - 1}, a _ {j} ] + I [ k ^ {*}, l _ {0} ] \quad (\text {b y}) \\ = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A ^ {\prime} \cup \{k ^ {*}, l _ {0} \}} I [ a _ {j - 1}, a _ {j} ] = \sum_ {a _ {j - 1}, a _ {j} \in \{0 \} \cup A ^ {*} \cup \{l _ {0} \}} I [ a _ {j - 1}, a _ {j} ]. \\ \end{array}
402
+ $$
403
+
404
+ This contradicts with Equation (9a). Therefore, our assumption that $(A[l_0,t_0],S[l_0,t_0])$ obtained using DP recurrence relation are not optimal $(A,S)$ of Equation (6) is false. Thus, $(A[l,t],S[l,t])$ are optimal $(A,S)$ of Equation (6).
405
+
406
+ Proposition A.2. $S[l, t]$ computed from the DP recurrence relations, Equation (7) is the optimal $S$ which minimizes the latency of the network when $A[l, t]$ is fixed. Concretely, $S[l, t]$ is the optimal $S$ of the optimization problem:
407
+
408
+ $$
409
+ \min _ {A [ l, t ] \subseteq S \subseteq [ l - 1 ]} \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \cup \{l \}} T \left[ s _ {i - 1}, s _ {i} \right]. \tag {11}
410
+ $$
411
+
412
+ Proof. When $l = 1$ , $S[l, t] = \emptyset$ which satisfies Equation (11) by Equation (7b). For given $(l_0, t_0)$ , we suppose for all $l < l_0$ and $t < t_0$ , Equation (11) is satisfied. Then, we assume that $S[l_0, t_0]$ obtained using Equation (7b) is not optimal $S$ and $S^*$ are the optimal $S$ of Equation (11) when $(l, t) = (l_0, t_0)$ . Then, $A[l_0, t_0] \subseteq S^*$ and
413
+
414
+ $$
415
+ \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \left[ l _ {0}, t _ {0} \right] \cup \{l _ {0} \}} T \left[ s _ {i - 1}, s _ {i} \right] > \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S ^ {*} \cup \{l _ {0} \}} T \left[ s _ {i - 1}, s _ {i} \right] \tag {12}
416
+ $$
417
+
418
+ We can divide two cases whether $A[l_0, t_0]$ is an empty set or not.
419
+
420
+ Case1: $A[l_0, t_0]$ is an empty set $S[l_0, t_0] = S_{\mathrm{opt}}[0, l_0]$ by Equation (7b). Then, $S_{\mathrm{opt}}[0, l_0]$ is the optimal $S$ of Equation (11) when $(l, t) = (l_0, t_0)$ which contradicts with our assumption that $S[l_0, t_0]$ is not optimal $S$ of Equation (11) when $(l, t) = (l_0, t_0)$ .
421
+
422
+ Case2: $A[l_0, t_0]$ is not an empty set Let $k_0$ be the maximum value of set $A[l_0, t_0]$ . Then, we define $A' = A[l_0, t_0] \setminus \{k_0\}$ , $S_{<k_0}' = \{s \in S^* \mid s < k_0\}$ , and $S_{>k_0}' = \{s \in S^* \mid s > k_0\}$ . By the definition, $A[k_0, t_0 - T_{\mathrm{opt}}[k_0, l_0]] \subseteq S_{<k_0}'$ . Then, by the optimality assumption for $k_0 < l_0$ and $t_0 - T_{\mathrm{opt}}[k_0, l_0] < t_0$ ,
423
+
424
+ $$
425
+ \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S _ {< k _ {0}} ^ {\prime} \cup \{k _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \geq \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \left[ k _ {0}, t _ {0} - T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right] \right] \cup \{k _ {0} \}} T [ s _ {i - 1}, s _ {i} ]. \tag {13}
426
+ $$
427
+
428
+ $$
429
+ \begin{array}{l} \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S ^ {*} \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S _ {< k _ {0}} ^ {\prime} \cup \{k _ {0} \}} T [ s _ {i - 1}, s _ {i} ] + \sum_ {s _ {i - 1}, s _ {i} \in \{k _ {0} \} \cup S _ {> k _ {0}} ^ {\prime} \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \\ \geq \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S \left[ k _ {0}, t _ {0} - T _ {\text {o p t}} \left[ k _ {0}, l _ {0} \right] \right] \cup \left\{k _ {0} \right\}} T \left[ s _ {i - 1}, s _ {i} \right] + \sum_ {s _ {i - 1}, s _ {i} \in \left\{k _ {0} \right\} \cup S _ {> k _ {0}} ^ {\prime} \cup \left\{l _ {0} \right\}} T \left[ s _ {i - 1}, s _ {i} \right] \tag {byEquation(13)} \\ \geq \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S [ k _ {0}, t _ {0} - T _ {\mathrm {o p t}} [ k _ {0}, l _ {0} ] ] \cup \{k _ {0} \}} T [ s _ {i - 1}, s _ {i} ] + \sum_ {s _ {i - 1}, s _ {i} \in \{k _ {0} \} \cup S _ {\mathrm {o p t}} \cup \{l _ {0} \}} T [ s _ {i - 1}, s _ {i} ] \quad (\text {b y}) \\ \geq \sum_{s_{i - 1},s_{i}\in \{0\} \cup S[k_{0},t_{0} - T_{\mathrm{opt}}[k_{0},l_{0}]]\cup \{k_{0}\} \cup S_{\mathrm{opt}}\cup \{l_{0}\}}T[s_{i - 1},s_{i}] \\ = \sum_ {s _ {i - 1}, s _ {i} \in \{0 \} \cup S [ l _ {0}, t _ {0} ] \cup \{l _ {0} \}} T \left[ s _ {i - 1}, s _ {i} \right]. \quad (\text {b y}) \\ \end{array}
430
+ $$
431
+
432
+ This contradicts with Equation (12). Therefore, our assumption that $S[l_0, t_0]$ obtained using DP recurrence relation is not optimal $S$ of Equation (11) when $(l, t) = (l_0, t_0)$ is false. Thus, $S[l, t]$ is optimal $S$ of Equation (11).
433
+
434
+ # B. Measuring the Importance
435
+
436
+ Algorithm 3 Finding Optimal Importance with DP
437
+ input I Initialize $I_{\mathrm{opt}}[k,l,a,b]\gets 0,B_{\mathrm{opt}}[k,l]\gets \emptyset \quad \forall k,l,a,b$ $I[k,l,0,b]\gets -\infty \quad \forall k,l,b,\sigma_k\neq \mathrm{id}.$ $I[k,l,a,0]\gets -\infty \quad \forall k,l,a,\sigma_l\neq \mathrm{id}$ $I[k,l,a,0]\gets -\infty \quad \forall k,l,a,\sigma_k = \sigma_l = \mathrm{id}$ for $l = 1$ to $L$ do for $k = 0$ to $l - 1$ do for $(a,b)$ in [(0,0),(0,1),(1,0),(1,1)] do $m\gets \operatorname {argmax}_{k\leq m^{\prime} < l}(I_{\mathrm{opt}}[k,m^{\prime},a,0] + I[m^{\prime},l,0,b])$ $I_{\mathrm{opt}}[k,l,a,b]\gets I_{\mathrm{opt}}[k,m^{\prime},a,0] + I[m^{\prime},l,0,b]$ if $m\notin \{k\}$ then $B_{\mathrm{opt}}[k,l]\gets B_{\mathrm{opt}}[k,m]\cup \{m\}$ end if end for end for end for output $I_{\mathrm{opt}},B_{\mathrm{opt}}$
438
+
439
+ Algorithm 4 Solving the Extended Surrogate Objective
440
+ input $T_0,L,T,I$ Initialize $D[l,t,a]\gets 0,A[l,t]\gets \emptyset ,S[l,t]\gets \emptyset \quad \forall l,t,a$ $T_{\mathrm{opt}},S_{\mathrm{opt}}\gets \mathrm{Al}$ orgthonm1 $(T,L)$ $I_{\mathrm{opt}},B_{\mathrm{opt}}\gets \mathrm{Al}$ ographom3 $(I)$
441
+ for $l = 1$ to $L$ do
442
+ for $t = T_{\mathrm{opt}}[0,l] + 1$ to $T_0$ do
443
+ for $a = 0$ to 1 do
444
+ $k,\alpha \leftarrow \operatorname {argmax}\left(D\left[k^{\prime},t - T_{\mathrm{opt}}\left[k^{\prime},l\right],\alpha^{\prime}\right] + I_{\mathrm{opt}}(k^{\prime},l,\alpha^{\prime},a)\right)$ $0\leq k^{\prime} < l$ $\alpha^\prime \in \{0,1\}$ subject to $T_{\mathrm{opt}}[0,k^{\prime}] + T_{\mathrm{opt}}[k^{\prime},l] < t$ $t_\mathrm{last}\gets T_\mathrm{opt}[k,l]$ $D[l,t,a]\gets D[k,t - t_\mathrm{last},\alpha ] + I_\mathrm{opt}[k,l,\alpha ,a]$ $A[l,t,a]\gets A[k,t - t_\mathrm{last},\alpha ]\cup \{k:k > 0\wedge \alpha = 1\}$ $S[l,t]\gets S[k,t - t_\mathrm{last}]\cup \{k:k > 0\} \cup S_\mathrm{opt}[k,l]$ $B[l,t]\gets B[k,t - t_\mathrm{last}]\cup \{k:k > 0\} \cup B_\mathrm{opt}[k,l]$
445
+ end for
446
+ end for
447
+ end for
448
+ $a_{\mathrm{last}}\gets \operatorname {argmax}(A[L,T_0,a])$ $a\in \{0,1\}$
449
+ output $A[L,T_0,a_{\mathrm{last}}],S[L,T_0],B[L,T_0]$
450
+
451
+ # B.1. Extension on the Importance
452
+
453
+ In Section 4, the $j$ -th activation layer of our target network for depth compression is either the $j$ -th activation layer in the vanilla network $(\sigma_{j})$ or an identity function (id). Thus, if $\sigma_{j} = \mathrm{id}$ , the $j$ -th activation layer in the target network is inherently an identity function. For instance, MobileNetV2 has an identity function as an activation layer at the end of each Inverted Residual Block and the corresponding activation layers in our target network are bound to be id (Sandler et al., 2018). On the other hand, non-linear activation layers at the end of the Inverted Residual Block can improve the performance of the networks compressed from MobileNetV2 (Fu et al., 2022). To this end, we extend the search space of our method by further introducing the network blocks that have a non-linear activation layer at these positions and incorporating them into the DP formulation.
454
+
455
+ Consider a network block from $i + 1$ -th layer to $j$ -th layer. We introduce discrete variables $d_{i}, d_{j} \in \{0,1\}$ to indicate whether the first and the last activation layer of the network block are identity functions or not, respectively. If $\sigma_{i}$ and $\sigma_{j}$ are not identity functions, then we limit $d_{i}$ and $d_{j}$ to 1, respectively. Then, we redefine the importance of the network block between $i + 1$ -th layer to $j$ -th layer as $I[i,j,d_i,d_j]$ .
456
+
457
+ Concretely, we redefine the importance as follows:
458
+
459
+ $$
460
+ \begin{array}{l} I\left[i,j,d_{i},d_{j}\right]:= \max_{\theta}\operatorname {Acc}\left(\bigoplus_{\substack{l = j + 1\\ j + 1\text{to} L\text{layers}}}^{L}\sigma_{l}\circ f_{\theta_{l}}\circ \underbrace{(d_{j}\sigma + (1 - d_{j})\mathrm{id}}_{j\text{-th activation}}\circ \bigoplus_{\substack{l = i + 1\\ i + 1\text{to} j\text{layers}}}^{j}f_{\theta_{l}}\circ \underbrace{(d_{i}\sigma + (1 - d_{i})\mathrm{id}}_{i\text{-th activation}}\circ \underbrace{f_{\theta_{i}}\circ\bigoplus_{l = 1}^{i - 1}\sigma_{l}\circ f_{\theta_{l}}}_{1\text{to} i\text{layers}}\right) \\ - \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {l = 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}}\right), \tag {14} \\ \end{array}
461
+ $$
462
+
463
+ where $\sigma$ is the activation layer that is not an identity function.
464
+
465
+ Due to the redefinition of importance, we propose an alternative surrogate for objective in Equation (1a) as follows:
466
+
467
+ $$
468
+ \mathcal {I} (A, B) := \sum_ {b _ {j - 1}, b _ {j} \in \{0 \} \cup B \cup \{L \}} I [ b _ {j - 1}, b _ {j}, \mathbb {1} _ {A} (b _ {j - 1}), \mathbb {1} _ {A} (b _ {j}) ], \tag {15}
469
+ $$
470
+
471
+ where $A \subseteq B \subseteq [L - 1]$ . $A$ denotes the positions of activations which are not identity functions and $B$ denotes the boundary points of the contiguous network blocks for objective approximation. Then, the objective extends to
472
+
473
+ $$
474
+ \underset {A \subseteq B, S \subseteq [ L - 1 ]} {\text {m a x i m i z e}} \sum_ {b _ {j - 1}, b _ {j} \in \{0 \} \cup B \cup \{L \}} I \left[ b _ {j - 1}, b _ {j}, \mathbb {1} _ {A} \left(b _ {j - 1}\right), \mathbb {1} _ {A} \left(b _ {j}\right) \right] \tag {16}
475
+ $$
476
+
477
+ $$
478
+ \text{subject to}\sum_{s_{i - 1},s_{i}\in \{0\} \cup S\cup \{L\}}T[s_{i - 1},s_{i}] < T_{0}.
479
+ $$
480
+
481
+ Note, Equation (16) can be exactly solved with DP algorithm analogously by Algorithm 4.
482
+
483
+ # B.2. Possible Combinations of Network Blocks
484
+
485
+ In MobileNetV2, we empirically observed that the network blocks with identity functions on both edges unnecessarily degrade the performance by excessively reducing the number of activation functions in the compressed network. To address this issue, we set the importance value of the network blocks to negative infinity if $\sigma_{i} = \sigma_{j} = \mathrm{id}$ , $d_{j} = 0$ and exclude them in the DP algorithm.
486
+
487
+ Furthermore, we only consider blocks that we can merge into a single layer; thus, the skip-connections in MobileNetV2 considerably reduce the number of possible blocks. We also avoid merging in scenarios where a convolutional layer with a kernel size larger than 1 follows the stride 2 convolutional layer since it leads to a significant increase in kernel size (Fu et al., 2022). In MobileNetV2, we have 171 different blocks to measure the latency $(T[i,j])$ and 315 different blocks to measure the importance $(I[i,j,d_i,d_j])$ .
488
+
489
+ # B.3. Evaluating and Normalizing the Importance
490
+
491
+ When we evaluate the importance value in Equation (14), we approximate the first term by substituting the activation layers within the block to identity functions and training the network for a few epochs from the pretrained weight. The second term is considered as the accuracy of the pretrained weight itself. In MobileNetV2, we approximate the first term in Equation (14) by training the deactivated network for a single epoch. If the block size is one (i.e., $k - l = 1$ ), we re-initialize the corresponding block and measure the accuracy drop after training it from the pretrained weight.
492
+
493
+ When we approximate the first term in Equation (14) with the accuracy attained after training it for a few epochs, we tend to calculate a lower importance value than the actual definition of the importance value. This effect is reflected independently for each block; thus, the more block we construct the network with, the more we underestimate the actual importance of the network. Therefore, it is crucial to normalize the importance values by adding an appropriate value to the importance of
494
+
495
+ each block to address this issue. To this end, we add the constant multiple of the average importance of the blocks of size one to normalize the importance of each block.
496
+
497
+ Concretely, we define the set $D$ as
498
+
499
+ $$
500
+ D = \left\{\operatorname {A c c} \left(\text {o n e - e p o c h} (f)\right) - \max _ {\theta} \operatorname {A c c} \left(\bigotimes_ {l = 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}}\right) \right|
501
+ $$
502
+
503
+ $$
504
+ f = \bigcup_ {l = i + 1} ^ {L} \sigma_ {l} \circ f _ {\theta_ {l}} \circ (d _ {i + 1} \sigma + (1 - d _ {i + 1}) \mathrm {i d}) \circ f _ {\theta^ {\prime}} \circ (d _ {i} \sigma + (1 - d _ {i}) \mathrm {i d}) \circ \bigcup_ {l = 1} ^ {i - 1} \sigma_ {l} \circ f _ {\theta_ {l}}
505
+ $$
506
+
507
+ $$
508
+ \left. \text {f o r} i \in [ L - 1 ], \theta^ {\prime} = \text {i n i t} (\theta_ {i}), \text {a n d} d _ {i}, d _ {i + 1} \in \{0, 1 \} \right\},
509
+ $$
510
+
511
+ where one-epoch $(\cdot)$ denotes the network trained for single epoch and init $(\cdot)$ denotes the initializing function. Then, we normalize the importance value by
512
+
513
+ $$
514
+ I [ l, k, a, b ] \leftarrow I [ l, k, a, b ] - \frac {\alpha}{| D |} \sum_ {\Delta \mathrm {a c c} \in D} \Delta \mathrm {a c c},
515
+ $$
516
+
517
+ where $\alpha$ is the hyperparameter.
518
+
519
+ # C. Additional Experiments
520
+
521
+ # C.1. Reproducing the Search Phase of DepthShrinker on ImageNet-100
522
+
523
+ We reproduce the search phase of DepthShrinker on top of the ImageNet-100 dataset and search the patterns that match the compression ratio in the original paper (Fu et al., 2022). In MobileNetV2-1.0, we sweep through the number of activated blocks among 12, 9, and 7 and denote them 'DS-AR-1.0', 'DS-BR-1.0', and 'DS-CR-1.0', respectively. In MobileNetV2-1.4, we sweep through the number of activated blocks among 11, 8, and 6 and name them 'DS-AR-1.4', 'DS-BR-1.4', and 'DS-CR-1.4', respectively. Table 5a and Table 5b summarize the results of comparing our method to the reproduced result of DepthShrinker for MobileNetV2-1.0 and MobileNetV2-1.4 on the ImageNet-100 dataset, respectively. Our method outperforms the baseline performance in TensorRT format regardless of the type of network and compression ratio.
524
+
525
+ # C.2. Inference Time Transfer Results on Different GPUs
526
+
527
+ In this section, we present the results of measuring the end-to-end inference time across different GPU devices. The compression of networks utilizes the latency information obtained from the RTX 2080 Ti GPU. We report the latency on
528
+
529
+ Table 5. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 and MobileNetV2-1.4 on ImageNet-100 dataset. Compression methods use the latency information of RTX 2080 Ti and the latency is measured on the RTX 2080 Ti with batch size of 128. We report the average accuracy of the three runs of finetuning.
530
+ (a) MobileNetV2-1.0
531
+
532
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.0</td><td>87.58</td><td>19.25</td><td>40.61</td></tr><tr><td>DS-AR-1.0</td><td>86.89</td><td>11.86</td><td>21.14</td></tr><tr><td>Ours</td><td>86.93</td><td>11.35</td><td>20.65</td></tr><tr><td>DS-BR-1.0</td><td>86.45</td><td>11.73</td><td>19.44</td></tr><tr><td>Ours</td><td>86.53</td><td>11.08</td><td>19.97</td></tr><tr><td>DS-CR-1.0</td><td>85.38</td><td>10.47</td><td>16.54</td></tr><tr><td>Ours</td><td>85.91</td><td>9.62</td><td>16.82</td></tr></table>
533
+
534
+ (b) MobileNetV2-1.4
535
+
536
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.4</td><td>88.88</td><td>29.94</td><td>61.68</td></tr><tr><td>DS-AR-1.4</td><td>87.57</td><td>19.55</td><td>34.58</td></tr><tr><td>Ours</td><td>88.05</td><td>19.31</td><td>33.08</td></tr><tr><td>DS-BR-1.4</td><td>86.23</td><td>18.22</td><td>28.77</td></tr><tr><td>Ours</td><td>87.18</td><td>16.26</td><td>27.42</td></tr><tr><td>DS-CR-1.4</td><td>84.85</td><td>17.21</td><td>26.07</td></tr><tr><td>Ours</td><td>85.93</td><td>14.65</td><td>22.96</td></tr></table>
537
+
538
+ Table 6. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 and MobileNetV2-1.4 on ImageNet-100 dataset. The latency of the compressed network architecture is measured on TITAN Xp, RTX 2080 Ti, RTX 3090, and Tesla V100 with batch size of 128. We report the average accuracy of the three runs of finetuning.
539
+ (a) MobileNetV2-1.0
540
+
541
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Acc (%)</td><td rowspan="2">TITAN Xp</td><td colspan="3">TensorRT Latency (ms)</td><td rowspan="2">w/o TensorRT (ms) RTX 2080 Ti</td></tr><tr><td>RTX 2080 Ti</td><td>RTX 3090</td><td>Tesla V100</td></tr><tr><td>MobileNetV2-1.0</td><td>87.58</td><td>26.98</td><td>19.25</td><td>13.31</td><td>15.49</td><td>40.61</td></tr><tr><td>MBV2-DS-A</td><td>87.58</td><td>19.92</td><td>14.74</td><td>9.70</td><td>11.71</td><td>27.59</td></tr><tr><td>Ours</td><td>87.69</td><td>17.90</td><td>12.53</td><td>8.74</td><td>10.22</td><td>23.02</td></tr><tr><td>MBV2-DS-B</td><td>87.31</td><td>18.02</td><td>12.33</td><td>8.73</td><td>10.03</td><td>22.99</td></tr><tr><td>Ours</td><td>87.45</td><td>16.93</td><td>12.11</td><td>8.43</td><td>9.93</td><td>22.29</td></tr><tr><td>MBV2-DS-C</td><td>85.92</td><td>15.59</td><td>11.20</td><td>7.84</td><td>9.08</td><td>20.76</td></tr><tr><td>Ours</td><td>86.73</td><td>15.27</td><td>11.14</td><td>7.77</td><td>9.18</td><td>20.62</td></tr><tr><td>MBV2-DS-D</td><td>85.30</td><td>14.38</td><td>10.49</td><td>7.27</td><td>8.56</td><td>18.78</td></tr><tr><td>Ours</td><td>85.91</td><td>13.45</td><td>9.62</td><td>6.71</td><td>8.06</td><td>16.82</td></tr></table>
542
+
543
+ (b) MobileNetV2-1.4
544
+
545
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Acc (%)</td><td rowspan="2">TITAN Xp</td><td colspan="3">TensorRT Latency (ms)</td><td rowspan="2">w/o TensorRT (ms) RTX 2080 Ti</td></tr><tr><td>RTX 2080 Ti</td><td>RTX 3090</td><td>Tesla V100</td></tr><tr><td>MobileNetV2-1.4</td><td>88.88</td><td>42.15</td><td>29.94</td><td>20.67</td><td>24.29</td><td>61.68</td></tr><tr><td>MBV2-1.4-DS-A</td><td>88.01</td><td>26.90</td><td>19.61</td><td>13.54</td><td>16.05</td><td>35.06</td></tr><tr><td>Ours</td><td>88.41</td><td>26.53</td><td>19.48</td><td>13.28</td><td>16.45</td><td>34.01</td></tr><tr><td>MBV2-1.4-DS-B</td><td>86.99</td><td>25.27</td><td>19.21</td><td>13.19</td><td>15.96</td><td>31.63</td></tr><tr><td>Ours</td><td>87.58</td><td>24.60</td><td>18.22</td><td>12.48</td><td>15.39</td><td>30.77</td></tr><tr><td>MBV2-1.4-DS-C</td><td>86.73</td><td>23.64</td><td>17.47</td><td>12.08</td><td>14.52</td><td>29.73</td></tr><tr><td>MBV2-1.4-DS-D</td><td>86.05</td><td>22.69</td><td>17.50</td><td>12.00</td><td>14.48</td><td>27.99</td></tr><tr><td>Ours</td><td>87.18</td><td>22.03</td><td>16.26</td><td>11.07</td><td>13.50</td><td>27.42</td></tr><tr><td>MBV2-1.4-DS-E</td><td>85.29</td><td>20.94</td><td>15.67</td><td>10.87</td><td>13.03</td><td>26.08</td></tr><tr><td>Ours</td><td>85.93</td><td>19.35</td><td>14.65</td><td>9.77</td><td>12.27</td><td>22.96</td></tr></table>
546
+
547
+ Table 7. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 on ImageNet dataset. The latency of the compressed network architecture is measured on TITAN Xp, RTX 2080 Ti, RTX 3090, and Tesla V100 with batch size of 128. $\dagger$ denotes the accuracy of the pretrained weight used in DepthShrinker, and we use the same pretrained weight for a fair comparison.
548
+
549
+ <table><tr><td rowspan="2">Network</td><td rowspan="2">Acc (%)</td><td colspan="4">TensorRT Latency (ms)</td><td>w/o TensorRT (ms)</td></tr><tr><td>TITAN Xp</td><td>RTX 2080 Ti</td><td>RTX 3090</td><td>Tesla V100</td><td>RTX 2080 Ti</td></tr><tr><td>MobileNetV2-1.0</td><td>72.89†</td><td>27.03</td><td>19.26</td><td>13.39</td><td>15.50</td><td>40.71</td></tr><tr><td>MBV2-DS-A</td><td>72.37</td><td>20.01</td><td>14.82</td><td>9.69</td><td>11.76</td><td>27.53</td></tr><tr><td>Ours</td><td>72.83</td><td>19.53</td><td>13.67</td><td>9.64</td><td>11.16</td><td>25.09</td></tr><tr><td>MBV2-DS-B</td><td>71.96</td><td>17.80</td><td>12.42</td><td>8.75</td><td>10.07</td><td>22.92</td></tr><tr><td>Ours</td><td>72.13</td><td>18.43</td><td>12.38</td><td>8.67</td><td>10.27</td><td>21.74</td></tr><tr><td>MBV2-DS-C</td><td>70.87</td><td>15.76</td><td>11.28</td><td>7.87</td><td>9.12</td><td>20.77</td></tr><tr><td>Ours</td><td>71.44</td><td>15.23</td><td>10.90</td><td>7.69</td><td>8.98</td><td>19.75</td></tr><tr><td>MBV2-DS-D</td><td>69.43</td><td>14.38</td><td>10.53</td><td>7.27</td><td>8.56</td><td>18.82</td></tr><tr><td>Ours</td><td>70.65</td><td>14.21</td><td>9.88</td><td>6.99</td><td>8.31</td><td>16.55</td></tr></table>
550
+
551
+ TITAN Xp, RTX 2080 Ti, RTX 3090, and Tesla V100. Table 6a and Table 6b summarize the accuracy and the latency of the networks compressed on the ImageNet-100 dataset. We further present the results of compressing MobileNetV2-1.0 on ImageNet dataset in Table 7. Our method outperforms the baseline in the majority of the settings.
552
+
553
+ # C.3. Comparison with Channel Pruning Baselines
554
+
555
+ In this section, we compare our depth compression method with the channel pruning baselines. We start from the same pretrained weight and finetune with the identical training protocol described in Section 5.1. In MobileNetV2-1.0, we compare with uniform $L^1$ pruning and AMC (He et al., 2018b). For the uniform $L^1$ pruning, we leave $75\%$ of the output channels based on $L^1$ -norm in the first convolution layer of each Inverted Residual Block and leave the other convolution layers in the block (Li et al., 2017; Liu et al., 2019). For AMC, we prune each convolutional layer according to the channel ratio of the AMC network (70% FLOPs). In MobileNetV2-1.4, we compare with uniform $L^1$ pruning and MetaPruning (Liu et al., 2019). For the uniform $L^1$ pruning, we leave $65\%$ of the output channels with the same protocol. For MetaPruning, we prune each convo
556
+
557
+ Table 8. Accuracy and latency of compressed architectures applied to MobileNetV2-1.0 and MobileNetV2-1.4 on ImageNet dataset. The latency is measured on RTX 2080 Ti with batch size of 128.
558
+
559
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>MBV2-1.0</td><td>72.89</td><td>19.26</td><td>40.71</td></tr><tr><td>Uniform L1</td><td>72.65</td><td>15.05</td><td>32.10</td></tr><tr><td>AMC (70% FLOPs)</td><td>72.01</td><td>14.40</td><td>30.81</td></tr><tr><td>Ours</td><td>72.83</td><td>13.67</td><td>25.09</td></tr><tr><td>MBV2-1.4</td><td>76.28</td><td>29.93</td><td>61.64</td></tr><tr><td>Uniform L1</td><td>74.80</td><td>20.86</td><td>42.25</td></tr><tr><td>Ours</td><td>75.16</td><td>19.76</td><td>35.07</td></tr><tr><td>MetaPruning-1.0×</td><td>73.69</td><td>21.75</td><td>38.70</td></tr><tr><td>Ours</td><td>74.68</td><td>18.63</td><td>32.35</td></tr></table>
560
+
561
+ lutional layer according to the channel ratio of the MetaPruning network (MetaPruning- $1.0\times$ ). It is worth noting that we finetune from a pretrained weight pruned based on the $L^1$ -norm in reproducing the MetaPruning, while the original method trains the network from scratch. We choose to reproduce this way since it leads to better accuracy. Table 8 demonstrates that our method outperforms the channel pruning baselines consistently.
562
+
563
+ # C.4. Depth Compression Results on VGG19 Network
564
+
565
+ In this section, we present the results of applying our depth compression method to the VGG19 network on the ImageNet dataset (Simonyan & Zisserman, 2015; Russakovsky et al., 2015). We compress the depth of the network utilizing the latency information of RTX 2080 Ti and measure the latency on the same RTX 2080 Ti. We finetune the network for 20 epochs using cosine learning rate decay with the SGD optimizer. As a result, we attain $1.44 \times$ speed-up without losing any accuracy.
566
+
567
+ # C.5. FLOPs and Run-time Memory Results
568
+
569
+ In this section, we report the FLOPs and the peak run-time memory usage of our compressed networks compared to the baseline method DepthShrinker (Fu et al., 2022). We present the results of applying compression methods to MobileNetV2-1.0 on the ImageNet dataset. We highlight that our method directly optimizes for the wall clock inference time and therefore did not optimize for the FLOPs. Although our method does not strictly have fewer FLOPs than the baseline method, our method outperforms the baseline in peak run-time memory, which is related to real-hardware efficiency. It is worth noting that the FLOPs values we report differ from the baseline works because we report the FLOPs at the test time after fusing the batch normalization layers into the convolutional layers (Fu et al., 2022; Sandler et al., 2018). Furthermore, DepthShrinker's official implementation omits to merge the first Inverted Residual Block in the 'DS-A-1.0' network; we measure the test time FLOPs
570
+
571
+ Table 9. Accuracy and latency of compressed architectures applied to VGG19 on ImageNet dataset. The latency is measured on RTX 2080 Ti with batch size of 64.
572
+
573
+ <table><tr><td>Network</td><td>Accuracy (%)</td><td>Latency (ms)</td></tr><tr><td>VGG19</td><td>74.24</td><td>131</td></tr><tr><td>Ours</td><td>74.99</td><td>111</td></tr><tr><td></td><td>74.33</td><td>91</td></tr><tr><td></td><td>73.00</td><td>84</td></tr></table>
574
+
575
+ Table 10. FLOPs and run-time memory usage of compressed architectures applied to MobileNetV2-1.0 on ImageNet dataset. Memory usage is measured with batch size of 128.
576
+
577
+ <table><tr><td>Network</td><td>Acc (%)</td><td>MFLOPs</td><td>Run-time Mem. (GB)</td></tr><tr><td>MBV2-1.0</td><td>72.89</td><td>302</td><td>6.88</td></tr><tr><td>DS-A-1.0</td><td>72.37</td><td>315</td><td>4.21</td></tr><tr><td>Ours</td><td>72.83</td><td>291</td><td>3.93</td></tr><tr><td>DS-B-1.0</td><td>71.96</td><td>258</td><td>3.63</td></tr><tr><td>Ours</td><td>72.13</td><td>282</td><td>3.35</td></tr><tr><td>DS-C-1.0</td><td>70.87</td><td>248</td><td>3.31</td></tr><tr><td>Ours</td><td>71.44</td><td>247</td><td>3.16</td></tr><tr><td>DS-D-1.0</td><td>69.43</td><td>243</td><td>2.95</td></tr><tr><td>Ours</td><td>70.65</td><td>247</td><td>2.55</td></tr></table>
578
+
579
+ after we merge it following their paper (Fu et al., 2022). We report the FLOPs at the test time because the objective of our method is to obtain an efficient network with low latency at the test time.
580
+
581
+ Table 13. Hyperparameters used in our method. We use $\alpha$ in normalizing the importance value and use ${T}_{0}$ as the constraint of Equation (1).
582
+
583
+ <table><tr><td>Dataset</td><td>Table (Network)</td><td>Acc (%)</td><td>α</td><td>T0</td><td>Dataset</td><td>Table (Network)</td><td>Acc (%)</td><td>α</td><td>T0</td></tr><tr><td rowspan="8">ImageNet-100</td><td rowspan="4">Table 1 (MBV2-1.0)</td><td>87.69</td><td>1.8</td><td>23.0</td><td rowspan="8">ImageNet</td><td rowspan="4">Table 2 (MBV2-1.0)</td><td>72.83</td><td>1.6</td><td>25.0</td></tr><tr><td>87.45</td><td>1.8</td><td>22.0</td><td>72.13</td><td>1.6</td><td>22.1</td></tr><tr><td>86.73</td><td>1.8</td><td>20.5</td><td>71.44</td><td>1.6</td><td>20.0</td></tr><tr><td>85.91</td><td>1.8</td><td>17.5</td><td>70.65</td><td>1.6</td><td>18.0</td></tr><tr><td rowspan="4">Table 1 (MBV2-1.4)</td><td>88.41</td><td>1.6</td><td>28.0</td><td rowspan="4">Table 3 (MBV2-1.4)</td><td>74.68</td><td>1.2</td><td>27.0</td></tr><tr><td>87.58</td><td>1.6</td><td>26.0</td><td>74.19</td><td>1.2</td><td>26.0</td></tr><tr><td>87.18</td><td>1.6</td><td>23.0</td><td>73.46</td><td>1.2</td><td>23.0</td></tr><tr><td>85.93</td><td>1.6</td><td>20.0</td><td>72.57</td><td>1.2</td><td>20.0</td></tr></table>
584
+
585
+ # C.6. Latency on CPU Device
586
+
587
+ In this section, we present the CPU latency of our compressed networks compared to the baseline method DepthShrinker (Fu et al., 2022). We present the results of applying compression methods to MobileNetV2-1.0 on the ImageNet dataset. We measure the latency on 5 Intel Xeon Gold 5220R CPU cores with batch size of 128. Our method attains higher accuracy with lower latency compared to DepthShrinker, regardless of the compression ratio. Specifically, our method attains $1.95 \times$ speed-up with $0.06\%$ p accuracy drop from the pretrained weight and attains $1.18 \times$ speed-up with higher accuracy compared to DS-A-1.0.
588
+
589
+ Table 11. Accuracy and CPU latency of compressed architectures applied to MobileNetV2-1.0 on ImageNet dataset. The latency is measured on 5 Intel Xeon Gold 5220R CPU cores with batch size of 128.
590
+
591
+ <table><tr><td>Network</td><td>Accuracy (%)</td><td>Latency (ms)</td></tr><tr><td>MBV2-1.0</td><td>72.89</td><td>1386</td></tr><tr><td>DS-A-1.0</td><td>72.37</td><td>837</td></tr><tr><td>Ours</td><td>72.83</td><td>710</td></tr><tr><td>DS-B-1.0</td><td>71.96</td><td>713</td></tr><tr><td>Ours</td><td>72.13</td><td>596</td></tr><tr><td>DS-C-1.0</td><td>70.87</td><td>644</td></tr><tr><td>Ours</td><td>71.44</td><td>566</td></tr><tr><td>DS-D-1.0</td><td>69.43</td><td>592</td></tr><tr><td>Ours</td><td>70.65</td><td>470</td></tr></table>
592
+
593
+ # C.7. Analysis on the Latency Reduction
594
+
595
+ After finetuning the network, two different factors can contribute to the reduction in latency at the test time. The first factor involves replacing the activation layer with the identity function, and the second is merging consecutive convolutional layers. We present the results of the latency reduction incurred by these two factors in Table 12. While removing activations partially contributes to a latency reduction without TensorRT, its impact becomes negligible in TensorRT format. This is because TensorRT fuses non-linear activation layers with the pre
596
+
597
+ Table 12. Analysis on the latency reduction from removing activation layers and merging convolutional layers. The latency is measured on RTX 2080 Ti with batch size of 128.
598
+
599
+ <table><tr><td>Network</td><td>Acc (%)</td><td>TensorRT Lat. (ms)</td><td>w/o TensorRT Lat. (ms)</td></tr><tr><td>Original</td><td>72.89</td><td>19.55</td><td>41.03</td></tr><tr><td>After removing activation</td><td>72.13</td><td>19.55</td><td>35.15</td></tr><tr><td>After merging convolution</td><td></td><td>12.52</td><td>21.88</td></tr><tr><td>After removing activation</td><td>70.65</td><td>19.55</td><td>33.69</td></tr><tr><td>After merging convolution</td><td></td><td>9.92</td><td>16.60</td></tr></table>
600
+
601
+ ceding convolutional layers (Vanholder, 2016). In the main paper, we optimize the inference time of the network in the TensorRT implementation and do not consider the latency of the activation layer in our formulation.
602
+
603
+ # D. Hyperparameters
604
+
605
+ In this section, we present the values of hyperparameters that can reproduce the results of our method in Table 13. Specifically, our method has two hyperparameters $\alpha$ and $T_0$ in optimizing the ordered set $A$ and $S$ . First hyperparameter $\alpha$ works in normalizing importance value of each block. Appendix B.3 describes the detailed process of normalizing the importance value of each block using the hyperparameter $\alpha$ . Second hyperparameter $T_0$ serves the inference time constraint when we solve the Equation (1).
606
+
607
+ During finetuning, we finetune the network for 180 epochs using cosine learning rate decay with the SGD optimizer and batch size of 256. For the networks compressed on the ImageNet-100 and the compressed MobileNetV2-1.4 on the ImageNet, we finetune using the base learning rate of 0.1, weight decay of 1e-5 and adopt the label smoothing, random erasing and RandAugment following the Fu et al. (2022) (Müller et al., 2019; Zhong et al., 2017; Cubuk et al., 2020). For the compressed MobileNetV2-1.0 on ImageNet dataset, we use the base learning rate of 0.05, weight decay of 1e-5 without adopting further improved augmentation techniques, since they did not improve the performance.
608
+
609
+ ![](images/d5952d098a54ea3da0d0edf3fc27cefdfa204c0cc5ec651aed52d014f8212f16.jpg)
610
+ Figure 5. Illustration comparing the output from two different types of padding applied to two consecutive $3 \times 3$ convolution operations with the output from a merged $5 \times 5$ convolution operation. The boundary of the output feature map obtained from applying zero padding of size 1 before each $3 \times 3$ convolution is distinct from that of the output feature map obtained from the merged $5 \times 5$ convolution. Conversely, if zero padding of size 2 is applied to the first $3 \times 3$ convolution, the output feature map is equivalent to the output feature map obtained from the merged $5 \times 5$ convolution.
611
+
612
+ ![](images/6383d5025f7c29dd7090687b0ca67454a2703ae69feb2af30603295368fb2271.jpg)
613
+
614
+ ![](images/8380470172f67ce4b1e0cf010f578930be5b666e18e1d71442b48a8351f21eac.jpg)
615
+
616
+ # E. Merging Convolutional Layers in Modern CNN
617
+
618
+ # E.1. Skip Addition
619
+
620
+ We address the details to apply the merging for the convolution operations in modern CNNs with skip addition and padding. Consider a skip addition, $f(x) + x$ where $f(\cdot)$ is a network block and $X$ is an input feature map. When $f(\cdot)$ is a single convolution operation, $f(x) + x$ can be replaced by an equivalent convolution operation (Ding et al., 2021). In light of this, our method fuses the skip addition into $f(\cdot)$ only if $f(x)$ is merged into a single convolution operation.
621
+
622
+ # E.2. Padding Reordering Technique
623
+
624
+ DepthShrinker's scope of merging convolution operations is restricted to cases where the kernel size of at least one of the convolution operations to be merged is 1 (Fu et al., 2022). To include more general cases of merging where the kernel size of both convolution operations is greater than 1, we need to address the details of padding. In this paper, we limit our considerations to zero padding for the exact merging and apply sufficient zero padding to prevent the computation disparities at the boundaries before and after merging.
625
+
626
+ Consider a feature map $X^{(l)}$ , upon which two consecutive $3 \times 3$ convolution operations, utilizing kernels $\theta_{l}$ and $\theta_{l+1}$ , are applied to produce an output feature map $X^{(l+2)}$ . The output generated by the first convolution operation utilizing kernel $\theta_{l}$ is denoted as $X^{(l+1)}$ . As shown in Figure 5, when zero padding of size 1 is applied prior to each of the $3 \times 3$ convolution operations, the boundary of the output resulting from the merged $5 \times 5$ convolution operation, utilizing kernel $\theta_{l+1} * \theta_{l}$ differs from that of $X^{(l+2)}$ . Insufficient zero padding results in a computation skip at the boundary of $X^{(l+1)}$ , which in turn leads to a discrepancy between the computation at the boundary of $X^{(l+2)}$ and the output feature map of the merged $5 \times 5$ convolution operation. Conversely, when zero padding of size 2 is applied prior to the first $3 \times 3$ convolution operation, the output feature map of the two consecutive $3 \times 3$ convolution operations is equivalent to the output feature map of the merged $5 \times 5$ convolution operation.
627
+
628
+ In light of this, after we optimize the optimal ordered set $A$ and $S$ , we fix the activation layers following $A$ and reorder the padding of the convolutional layers according to $S$ before the finetuning process. After finetuning, we merge the network at the test time without losing any accuracy.
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4baac7951e6a6e0a8bdba337c96f9e4a2a332e525528726db26b3bf73c90a5cc
3
+ size 1377873
2023/Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic Programming/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/aa194fb8-0f6f-4c14-a6cb-2c8dbadb36eb_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3272d61abb9e7be54a7ce3384ae58439424b83ea2f6f92ddb9f6b703ddd8448d
3
+ size 6631059
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/full.md ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network
2
+
3
+ Yadi Cao $^{1\dagger}$ Mengelei Chai $^{2\dagger}$ Minchen Li $^{3}$ Chenfanfu Jiang $^{3}$
4
+
5
+ # Abstract
6
+
7
+ Learning the physical simulation on large-scale meshes with flat Graph Neural Networks (GNNs) and stacking Message Passings (MPs) is challenging due to the scaling complexity w.r.t. the number of nodes and over-smoothing. There has been growing interest in the community to introduce multi-scale structures to GNNs for physical simulation. However, current state-of-the-art methods are limited by their reliance on the labor-intensive drawing of coarser meshes or building coarser levels based on spatial proximity, which can introduce wrong edges across geometry boundaries. Inspired by the bipartite graph determination, we propose a novel pooling strategy, bi-stride to tackle the aforementioned limitations. Bi-stride pools nodes on every other frontier of the breadth-first search (BFS), without the need for the manual drawing of coarser meshes and avoiding the wrong edges by spatial proximity. Additionally, it enables a one-MP scheme per level and nonparametrized pooling and unpooling by interpolations, resembling U-Nets, which significantly reduces computational costs. Experiments show that the proposed framework, BSMS-GNN, significantly outperforms existing methods in terms of both accuracy and computational efficiency in representative physical simulations.
8
+
9
+ # 1. Introduction
10
+
11
+ Simulating physical systems through numerically solving partial differential equations (PDEs) is a key area in science and engineering, with applications ranging from solid mechanics (Jiang et al., 2016; Li et al., 2020a), to fluid-
12
+
13
+ $^{1}$ Department of Computer Science, UCLA, Los Angeles, USA $^{2}$ AR Perception, Google, Los Angeles, USA $^{3}$ Department of Mathematics, UCLA, Los Angeles, USA. Correspondence to: Chenfanfu Jiang <cffjiangmath.ucla.edu>.
14
+
15
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
16
+
17
+ (Bridson, 2015; Cao & Li, 2018), aerodynamics (Cao et al., 2022), and heat transfer (Cao et al., 2019). However, traditional numerical solvers are often computationally expensive, particularly for time-sensitive applications such as iterative design optimization, where fast online inference is desired. In recent years, the machine learning community has shown great interest in improving efficiency or replacing traditional solvers with learned models. These works include both end-to-end frameworks (Grzeszczuk et al., 1998; Obiols-Sales et al., 2020) and those utilizing physics-informed losses (Raissi et al., 2019; Karniadakis et al., 2021; Sun et al., 2020). Many existing works apply convolutional neural networks (CNNs) (Fukushima & Miyake, 1982) to physical systems residing on two- or three-dimensional structured grids (Guo et al., 2016; Tompson et al., 2017; Kim et al., 2019; Fotiadis et al., 2020). However, the strict dependency on regular domain shapes makes it non-trivial to be applied on unstructured meshes. While it is possible to deform simple irregular domains into rectangular shapes to apply CNNs (Gao et al., 2021; Li et al., 2022a), the challenge remains for domains with complex topologies, which are common in practice.
18
+
19
+ As a result, the use of graph neural networks (GNNs) in physics-based simulations on unstructured meshes has gained significant attention in recent years (Battaglia et al., 2018; Sanchez-Gonzalez et al., 2018; Belbute-Peres et al., 2020; Pfaff et al., 2020; Sanchez-Gonzalez et al., 2020; Harsch & Riedelbauch, 2021; Gao et al., 2022). The naive GNN approach stacks multiple MPs to model information propagation throughout space. However, as the graph size increases, this approach faces two major challenges: (1) Complexity: as both the number of nodes to be processed and the MP iterations increase linearly, a quadratic complexity becomes inevitable for both the running time and memory usage of the computational graph (Fortunato et al., 2022). (2) Oversmoothing: the graph convolution can be seen as a low-pass filter that suppresses the higher-frequency signals (Chen et al., 2020; Li et al., 2020c). Then the stacked MPs iteratively project the information onto the eigenspace of the graph while all higher-frequency signals are smoothed out, making the training more difficult.
20
+
21
+ To address these limitations, researchers have begun intro
22
+
23
+ ![](images/effb548a9901070ecdc2bb8d9e1df64dd5cbf6f779ee1d97dfc56ba9e812bb95.jpg)
24
+ (a) learnable pooling
25
+
26
+ ![](images/a638a81efba60b53026a5c8c0e690d96ca27aa8b9aa355a59f640ff47a5cff0b.jpg)
27
+ (b) pooling by rasterization
28
+
29
+ ![](images/ad96234c2813381455bc1d779cfa1fba38b090e76a96747792f41fb44e53ee91.jpg)
30
+ (c) pooling by spatial proximity
31
+ Figure 1. Issues of existing multi-level GNNs. (a) A learnable pooling (Gao & Ji, 2019) may lead to loss of connectivity even after $2^{\text{nd}}$ -order enhancement. (b) A pooling by rasterization (Lino et al., 2021; 2022a,b) and (c) by spatial proximity (Liu et al., 2021; Fortunato et al., 2022) can lead to wrong connections across the boundaries at the coarser level.
32
+
33
+ ducing multi-scale GNNs (MS-GNNs) for physics-based simulation (Li et al., 2020c; Liu et al., 2021; Lino et al., 2021; Fortunato et al., 2022; Lino et al., 2022b;a). The multi-scale approach mitigates over-smoothing by building sub-level graphs at coarser resolutions, resulting in longer-range interactions and fewer MP iterations. The existing approaches for constructing the multi-scale structure include: utilizing spatial proximity to generate sub-level graphs at coarser levels (Lino et al., 2021; Liu et al., 2021; Lino et al., 2022a); applying Guillard's coarsening algorithm (Guillard, 1993) (Lino et al., 2022b); manually drawing coarser meshes for the original geometry (Liu et al., 2021; Fortunato et al., 2022); or randomly pooling nodes and applying factorization to the adjacency matrix (Li et al., 2020c). However, these solutions all have their limitations. For example, learnable or random pooling can introduce artificial partitions in the sub-level graphs (Fig. 1. (a)), even with adjacency enhancement, which impedes information exchange across partitions, spatial proximity can lead to wrong edges across the boundaries at coarser levels (Fig. 1. (b) and (c)); Guillard's algorithm only applies to 2D triangle meshes; and manually drawing tens of thousands of meshes is too labor-intensive. We observe that all these limitations originate from the unmatured operations: pooling and building graph connections at coarser levels. We desire to design operations that: 1) conserve the correct connections at coarser levels, 2) do not introduce edges that blur the boundaries, 3) are general for any mesh type, and 4) are automatic.
34
+
35
+ We tackle these challenges with two progressive contributions:
36
+
37
+ - First, we introduce a novel yet simple pooling strategy, bi-stride. Bi-stride is inspired by the bi-partition deter
38
+
39
+ mination in DAG (directed acyclic graph). It pools all nodes on every other BFS (breadth-first-search) frontier, such that a $2^{\mathrm{nd}}$ -powered adjacency enhancement $(A \leftarrow A^{2}$ , where $A$ is the adjacency matrix of the graph) conserves all the correct connectivity. Bi-stride solely uses the input mesh without the need for spatial proximity, is general for any mesh type, and is fully automatic.
40
+
41
+ - Second, bi-stride pooling conserves direct connections between pooled/un-pooled nodes; Utilizing this advantage, one MP suffices to exchange the information between pooled and unpooled nodes before moving into the adjacent level; We also design a non-parameterized aggregating and returning method, resembling the interpolation in U-Net, to handle the transition between adjacent levels. These simplifications significantly reduce the computational requirements compared to SO-TAs.
42
+
43
+ Together, these two contributions give birth to our Bi-Stride Multi-Scale GNN (BSMS-GNN), a novel framework representing a significant advancement in the field of learned mesh-based simulations, particularly for the deployment in real industrial applications where meshes are often complex in geometry and large in size.
44
+
45
+ # 2. Multi-Scale Building as Preprocessing
46
+
47
+ We first introduce the bi-stride pooling strategy, multi-scale building, and the corresponding data preprocessing. Note that all algorithms and preprocessing steps in this section are deterministic and done in one pass.
48
+
49
+ ![](images/9c34e33916ecb20295672d6dcfe1869f08d472980d6976e2915c8a3b1409a43a.jpg)
50
+ Figure 2. Example multi-level graphs produced by bi-stride pooling. Our datasets contain both Eulerian and Lagrangian systems. Many meshes are highly irregular and contain massive self-contact, challenging to build coarser-level connections by spatial proximity. Our bi-stride strategy only relies on topological information and is proven to be robust and reliable on arbitrary geometry.
51
+
52
+ # 2.1. Motivations
53
+
54
+ As summarized in Fig. 1. The pooling strategy can be categorized into two groups by either utilizing spatial proximity (Lino et al., 2021; 2022a) or purely relying on graph information (Gao & Ji, 2019; Li et al., 2020c). For complex geometry, it's preferred to avoid spatial proximity unless desired by the simulation cases (such as contact or interface interactions). The only benchmark that uses only graph information is GRAPHUNETS (Gao & Ji, 2019) with an obvious drawback: it's easy to lose the connectivity and artificially introduce partitions, even with adjacent matrix enhancement (Fig. 1 (a)).
55
+
56
+ For a more clear illustration, we first define the adjacency enhancement by the $K^{\mathrm{th}}$ -order matrix power as $A \gets A^K$ , where $A$ is the adjacency matrix of the graph. Geometrically, $A(i,j) = 1$ means the edge $(i,j)$ exists, and $A^K (i,j) = 1$ means that node $j$ is connected to node $i$ via at most $K$ hops. Given a pooling strategy $\mathbb{P}$ and the pooled nodes' indices $\mathcal{I}$ , we define a $K$ th-order outlier set as $\mathcal{O}_K$ , where the nodes in $\mathcal{O}_K$ are not connected to any pooled nodes even after $K^{\mathrm{th}}$ -order adjacency enhancement: $A^K (i,j) = 0, \forall i \in \mathcal{I}, \forall j \in \mathcal{O}_K$ .
57
+
58
+ We finally define that a pooling strategy $\mathrm{P}$ is $K^{\mathrm{th}}$ -order connection conservative (K-CC) if $\mathcal{O}_K$ is empty. Empirically, the larger $K$ in $K^{\mathrm{th}}$ -order adjacency enhancement is harmful to distinguish the node features: as $K$ increases, $A^{K}(i,j)$ (converted to boolean) approaches a matrix with all its entries equal to 1, representing a fully connected graph; then a single convolution will average all node features and make them indistinguishable. The most preferred, i.e. the smallest possible $K$ we seek is naturally 2. With such reason, Gao & Ji (2019) uses the smallest $2^{\mathrm{nd}}$ order enhancement to help
59
+
60
+ ![](images/381795029563b0bb0938eb01ab4696d8d46176c8d6381c049fc5f1556c4beb6f.jpg)
61
+ Figure 3. The similarity between Bi-partition and Bi-stride. The number in the circle means the depth of the frontiers of either topological sorting or BFS. The red-bounded circle (number 1) means the starting node, i.e. the seed.
62
+
63
+ conserve the connectivity. Nonetheless, there is no theoretical guarantee that a learnable pooling module is consistently 2-CC for any graph. These limitations motivate us to create a consistent 2-CC pooling strategy, as followed in Sec. 2.2.
64
+
65
+ # 2.2. Bi-Stride Pooling and Adjacency Enhancement
66
+
67
+ We draw the initial inspiration from the bi-partition determination algorithm (Asratian et al., 1998) in a directed acyclic graph (DAG). As shown in Fig. 3(a), after topological sorting, pooling on every other depth (yellow and green) generates a bi-partition where all edges reside between two partitions, and pooling either partition is obviously 2-CC. To resemble bi-partition determination on a mesh, which is not bi-partite due to cycles, we can conduct a breadth-first search (BFS) to compute the geodesic distances from a seed to all other nodes, and then stride and pool all nodes at every other BFS frontier (bi-stride). A bi-stride example is shown in Fig. 3(b), where the number in each vertex represents the geodesic distance to the seed (node 1 in the red circle) by BFS. This pooling is 2-CC by construction and conserves direct connections between pooled and unpooled
68
+
69
+ nodes. As a result, we avoid building edges by using spatial proximity or handling cumbersome corner cases such as cross-boundary connections while also using the smallest adjacency enhancement.
70
+
71
+ Seeding Heuristics We claim that there should exist some freedom as long as the seeding is balanced to a certain degree. For training datasets, we choose two deterministic seeding heuristics: 1) closest to the center of a cluster (CloseCenter) for INFLATINGFONT, and 2) the minimum average distance (MinAve) for all other cases, and we preprocess the multi-level building in one pass. One can consider the cheaper heuristic CloseCenter during the online inferring phase if an unseen geometry is encountered. The details of the algorithms can be found in Sec.A.7. The sensitivity study on choosing a different seeding heuristic in the test phase is presented in Sec.A.4.2.
72
+
73
+ Contact Edges For problems involving contacts, such as DEFORMINGPLATE (Fig. 2(c)) and INFLATING-FONT (Fig. 2(d)), the finest-level contact edges $\mathbf{A}^C$ are built dynamically by spatial proximity between nodes. Note the edge-building by the spatial proximity does not apply to the internal elastic mechanics, whose edge is defined by the mesh only. The enhancement of the contact edges should be handled properly for multi-scale GNN, which, to the best of our knowledge, has not been addressed in prior works. At any level $l$ , given adjacent matrices $\mathbf{A}_l$ obtained by the input mesh and the enhancement rule, and the contact edge $\mathbf{A}_l^C$ at this level, we first apply bi-stride pooling to select nodes $\mathcal{I}$ , then enhance $\mathbf{A}_{l + 1}$ and $\mathbf{A}_{l + 1}^C$ using the following rule, where $[\mathcal{I},\mathcal{I}]$ means striding on the matrix rows and columns:
74
+
75
+ $$
76
+ \begin{array}{c c}\boldsymbol {A} _ {l + 1} ^ {\prime} \leftarrow \boldsymbol {A} _ {l} \boldsymbol {A} _ {l},&\boldsymbol {A} _ {l + 1} \leftarrow \boldsymbol {A} _ {l + 1} ^ {\prime} [ \mathcal {I}, \mathcal {I} ],\\\mathcal {A} ^ {\prime G} \rightarrow \mathcal {A} ^ {\prime G} \mathcal {A}&\mathcal {A} ^ {\prime G} \rightarrow \mathcal {A} ^ {\prime G} [ \mathcal {I}, \mathcal {I} ].\end{array}\tag {1}
77
+ $$
78
+
79
+ $$
80
+ \boldsymbol {A} _ {l + 1} ^ {I C} \leftarrow \boldsymbol {A} _ {l} \boldsymbol {A} _ {l} ^ {C} \boldsymbol {A} _ {l}, \quad \boldsymbol {A} _ {l + 1} ^ {C} \leftarrow \boldsymbol {A} _ {l + 1} ^ {I C} [ \mathcal {I}, \mathcal {I} ].
81
+ $$
82
+
83
+ The enhancement of contact edges can be geometrically interpreted as contact edge $(i,j)$ should exist if $j$ is reachable from $i$ in 2 hops and at least one of them is a contact edge at the finer level. We prove in Sec. A.6 that bi-stride pooling with the enhancement in Eq. 1 also conserves all contact edges.
84
+
85
+ # 3. Bi-Stride Multi-Scale (BSMS)-GNN
86
+
87
+ Here we formally introduce BSMS-GNN, a hierarchical GNN where the multi-level structure has been determined by the input mesh and the preprocessing in Sec. 2.
88
+
89
+ # 3.1. Definitions
90
+
91
+ Figure. 4 presents the overall structure of BSMS-GNN. We consider the evolution of a physics-based system discretized on a mesh, which is converted to an bi-directed
92
+
93
+ graph $\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1)$ . Here, with subscript 1, $\mathcal{V}_1$ , and $\mathcal{E}_1$ label the nodal fields and the edges at the finest level (the input mesh), respectively. Specifically for edges, we define $\mathcal{E}_1 = \{\mathcal{E}_1^1, \dots, \mathcal{E}_1^S\}$ , where $\mathcal{E}_1^1$ is the edge set directly copied from the input mesh and $\{\mathcal{E}_1^k|_{k=2}^S\}$ are the optional problem-dependent edge sets. For example, both DEFORMINGPLATE (Fig. 2(c)) and INFLATINGFONT (Fig. 2(d)) benchmarks have a contact edge set $\mathcal{E}_1^2$ for the colliding vertices. We use $\{p, q\}$ , stacked vectors of $\{p_i, q_i\}$ of all nodes $i \in \mathcal{V}_1$ , to denote the input and output nodal fields, respectively. Given an input field $p^j$ at a time $t_j$ , one pass of BSMS-GNN returns the output field $q^{j+1}$ at time $t_{j+1} = t_j + \Delta t$ , where $\Delta t$ is a fixed time step size. The output $q$ can contain more physical fields than the input $p$ and must be able to derive the input for the next pass. The rollout refers to iteratively conducting BSMS-GNN from the initial state $p^0 \to q^1 \to p^1 \to \dots \to q^n$ and producing the temporal sequence output $\{q^1, q^2, \dots, q^n\}$ within the time range of $(t_0, t_0 + n\Delta t]$ , where $n$ is the total number of evaluations.
94
+
95
+ Message Passing In general, we follow the encode-process-decode fashion in MESHGRAPHNETS, where encoder and decoder only appear at the top level $\mathcal{G}_1$ , mapping the nodal input $p$ and output $q$ to/from the latent feature $\boldsymbol{v}$ , respectively (see Table A.1 for the domain-specific information). As for the processor, unlike (Fortunato et al., 2022), we observe that a single MP per level is sufficient for all experiments. We do not separately encode the edge offsets $\Delta x_{ij} = x_i - x_j$ , instead, simply preprocess this to the stacked sender/receiver latent as the input to calculate edge flow. For a problem involving $S$ edge sets, an MP pass at level $l$ is formulated as:
96
+
97
+ $$
98
+ \boldsymbol {e} _ {l, i j} ^ {s} \leftarrow \mathrm {f} _ {l} ^ {s} \left(\Delta \boldsymbol {x} _ {l, i j}, \boldsymbol {v} _ {l, i}, \boldsymbol {v} _ {l, j}\right), \quad s = 1, \dots , S,
99
+ $$
100
+
101
+ $$
102
+ \boldsymbol {v} _ {l, i} ^ {\prime} \leftarrow \boldsymbol {v} _ {l, i} + \mathrm {f} _ {l} ^ {V} \left(\boldsymbol {v} _ {l, i}, \sum_ {j} \boldsymbol {e} _ {l, i j} ^ {1}, \dots , \sum_ {j} \boldsymbol {e} _ {l, i j} ^ {S}\right), \tag {2}
103
+ $$
104
+
105
+ where $f$ is a MLP function, $e$ is the latent information flow through an edge, and $v$ is the latent node feature. Please refer to Sec. A.2 for the detailed architecture of the model.
106
+
107
+ # 3.2. Transition Between Levels
108
+
109
+ We handle information transition between two adjacent levels with non-parametrized downsampling and upsampling modules to reduce the overhead of the learnable transition modules between every pair of adjacent levels. Here we define downsampling as the sequence of pooling nodes and then aggregating the information from the neighbors to the coarser level, and upsampling as the sequence of unpooling and then returning the information of the pooled nodes to their neighbors at the finer level.
110
+
111
+ ![](images/41bfc3690fbd6b6c1cdf5894ad4ccd7234173881ffcfcb9cf23570d64a4550a0.jpg)
112
+ Figure 4. BSMS-GNN pipeline is trained with one-step supervision. $\mathcal{G}_1, \mathcal{G}_2, \dots, \mathcal{G}_d$ are graphs at different levels (fine to coarse). Encoder/decoder only connects the input/output fields with the latent fields at $\mathcal{G}_1$ . Latent nodal fields are updated by one MP at each level. The bi-stride pooling selects the pooled nodes for the adjacent coarser level, and the transition is conducted in a non-parameterized way.
113
+
114
+ ![](images/6b186ecc91bbdd79cd749f30882a2504aa04e9e9491b53bc6d2302b1ab5429f7.jpg)
115
+
116
+ ![](images/42d43c210bbca0803de131da5c7615763baf38e134cf5bcc868566c3d1d3d6f1.jpg)
117
+
118
+ ![](images/87de41d3c958b09d94a94e9ae1d49604429290701886b95f9523857f8473504b.jpg)
119
+ Figure 5. Schematic plot of transition between adjacent levels.
120
+
121
+ ![](images/d7aa7d618e2be21557b5efeb5e025a2dd790c697da6795061008354f06d47c52.jpg)
122
+
123
+ Downsampling Let $\mathbf{A}$ be the unweighted,boolean adjacency matrix. We initiate a nodal weight field $w$ , which is one on the finest level and will be aggregated during down-sampling. With the receiver $j$ and its sender $i$ , the formal procedure of downsampling is formulated as (Fig. 5):
124
+
125
+ - Normalize by row as in a standard graph convolution $\hat{A}_{ij} \gets A_{ij} / \sum_{j} A_{ij}$ , and then convolve the weight once $\hat{w}_{ij} \gets w_i \hat{A}_{ij}$ (Fig. 5(a));
126
+ - Calculate edge weights $C_{ij} \gets \hat{w}_{ij} / \sum_i \hat{w}_{ij}$ , where $C$ can be viewed as a contribution table with $C_{ij}$ as the share of weights in receiver $j$ contributed by sender $i$ (Fig. 5(b));
127
+
128
+ - Convolve the latent information by contribution table $\boldsymbol{v}_j \gets \sum_i \boldsymbol{v}_i C_{ij}$ , which is equivalent to equally splitting and sending the weighted information out from senders, and then conducting the weighted average on receivers (Fig. 5(c)).
129
+
130
+ Upsampling After unpooling, all nodes except pooled ones have zero information. A returning process, resembling transposed convolution in U-Net, can help distinguish the information between receivers. With the contribution table $C$ recording edge weights, a natural choice is $\boldsymbol{v}_i \gets \boldsymbol{v}_j C_{ij}^T$ (Fig. 5(d)).
131
+
132
+ # 4. Experiments
133
+
134
+ # 4.1. Experiment Setup
135
+
136
+ Datasets We adopt three representative public datasets from GraphMeshNets (Pfaff et al., 2020): 1) CYLINDER-FLOW: incompressible fluid around a cylinder; 2) AIRFOIL: compressible flow around an airfoil; and 3) DEFORMING-PLATE: deforming an elastic plate with an actuator. In addition, we create a new dataset, INFLATINGFONT, featuring the inflation of enclosed elastic surfaces (Fang et al., 2021). The example plots of them are plotted in Fig. 2. Compared to existing datasets, INFLATINGFONT has more complex geometric shapes, 2 to 8 times the number of nodes, and 70 times the number of contact edges. Hence it is very suitable for testing the capability of competing GNNs in terms of scalability and compatibility with complex geometries. More details are included in Sec. A.1.
137
+
138
+ Baselines On all datasets, we compare the computational complexity, training/inference time, and memory footprint of BSMS-GNN to baselines: 1) MESHGRAPH-NETS (Pfaff et al., 2020): the single-level GNN architecture of GraphMeshNets; 2) MS-GNN-GRID (Lino et al., 2021; 2022a;b): a representative work for those building the hierarchy with spatial proximity; and 3) GRAPHUNETS (Gao & Ji, 2019): a representative work for those using learnable modules for pooling. The reimplementation details can be found in Sec. A.2. We note again that methods such as (Liu et al., 2021; Fortunato et al., 2022) are not practical because they require manually drawing coarser meshes for every trajectory instance with CAE software. For all cases combined, this means manually drawing about 20,000 meshes.
139
+
140
+ Implementation We implement our framework with PyTorch (Paszke et al., 2019) and PyG (PyTorch Geometric) (Fey & Lenssen, 2019). We train the entire model by supervising the single-step $L_{2}$ loss between the ground truth and the nodal field output of the decoding module. More details, such as the network structures and hyperparameters are included in A.2. Our datasets and code are publicly available at https://github.com/Eydcao/BSMS-GNN.
141
+
142
+ MISCs The ablation study is conducted for the specific choice of our transition method in Sec. A.4. The ablation study concerning whether or not to use learnable pooling modules is not standalone listed but covered by comparing to GRAPHUNETS in full-scale experiments (details in Sec. 4.2).
143
+
144
+ # 4.2. Results and Discussions
145
+
146
+ By evaluating BSMS-GNN and other competitors on all the baselines (Sec. 4.1), we observe the following conclusions:
147
+
148
+ - We experimentally show the learnable pooling method is not applicable for the deployment of large-scale, complex geometries;
149
+ - We design a small-scale experiment where pooling by spatial proximity leads to wrong edge and inference;
150
+ - BSMS-GNN shows dominant advantages in significantly less memory footprint, training time to reach the desired accuracy, and the inference time;
151
+ - BSMS-GNN also reaches the highest accuracy, reducing the rollout RMSE approximately by half on INFLATINGFONT with the largest mesh size and the most complex geometries; we also zero-shoot the trained model on a teaser with approximately 7x more nodes with the same level of accuracy.
152
+
153
+ For conciseness, we plot the detailed results in Table. 1 and Table. 2 in Sec. A.3.
154
+
155
+ ![](images/5ed63bc174ed1b5c217da6ced550000d597db432c1bdeb2b2ea5e6a4432fd6be.jpg)
156
+ Figure 6. BSMS-GNN Comparison between pooling methods.
157
+
158
+ Unlike bi-stride pooling, which generalizes to any input graph, a learnable module leads to unfair pooling on unseen geometries, impeding the information exchange for unselected nodes. The inferred results show larger errors than bi-stride pooling.
159
+
160
+ Disadvantages of Learnable Pooling Compared to other competitors, GRAPHUNETS shows a significantly higher RMSE in both 1-step and global rollouts on all datasets, except for the AIRFOIL dataset, where the mesh is consistent across trajectories. To confirm varying mesh leads to poor inference with learnable pooling, we apply the trained GRAPHUNETS model to an unseen test trajectory of the DEFORMINGPLATE dataset. Fig 6 clearly reveals the unfair pooling distribution by the learnable module, which impedes information passing on coarser levels and results in poor inference. In comparison, bi-stride generates uniform pooling and accurate inference.
161
+
162
+ Additionally, GRAPHUNETS has to conduct the adjacency matrix multiplication in the forward pass, which results in a 2-40x increase in the training and inference times, particularly in larger datasets. In the largest INFLATINGFONT, one training epoch requires nearly 50 hours to complete, making the convergence of the model infeasible. Given its poor performance in both accuracy and efficiency, we conclude that GRAPHUNETS is not suitable for simulation cases with large-scale, complex geometries. By default, we will not specifically make comparisons to GRAPHUNETS in the following discussions.
163
+
164
+ Failure Cases for Spatial Proximity To illustrate the adversarial impact of wrongly constructed edges by spatial proximity, we design a simple 1-D steady-state heat transfer simulation on sticks (Figure 7 left), on which BSMS-GNN and MS-GNN-GRID are trained and evaluated. The training set consists of two mirrored instances, where one end of the stick is fixed at a certain temperature and the other end has a fixed heat flux, resulting in a linear temperature distribution. In the test set, we simply align two sticks in a head-to-tail configuration with a tiny space between them to prevent heat diffusion across the boundary. MS-GNN-GRID, utilizing spatial proximity, incorrectly constructs an edge between the two sticks. As a result, in half of the test cases, MS-GNN-GRID shows wrong results at the boundary due to the erroneous edge(Figure 7 right, leading two
165
+
166
+ ![](images/51fa8991a328a64dc707261352977a16664b1edb252a405b11f0b7d1dc0c3ac3.jpg)
167
+ Figure 7. Failure cases for MS-GNN-GRID. Left: the configuration of the simplest failure case for multi-level GNNs by spatial proximity: steady-state 1-D heat transfer. Right, leading two columns: two tests showing that even if trained to convergence, the erroneous edge across the boundary can still result in the wrong inference. Right, last two columns: the erroneous edge coincidentally does not affect the results due to the symmetry of the solution, and no heat will diffuse between two nodes with the same temperature.
168
+
169
+ ![](images/ab6a7028931aa7337cde18ce83826c9b6c68ea95922dfa048cfd3cea407fe1bd.jpg)
170
+
171
+ ![](images/62d40f93e43271f85a7b8daac7f0f84a713ab4ec6d0126fc936a7cdc3e365556.jpg)
172
+
173
+ ![](images/742ceedbd3d759da522d816d87f128813e3bcd919e8326e1892a82a7097a2dfd.jpg)
174
+
175
+ ![](images/88ab00400160cc5ad911bcfe62139dfd975521136d3e14b80765f654d2399ef3.jpg)
176
+
177
+ ![](images/c51f3cfb2fbbacd549b590fba60ddaaadf90359ace01f7b3e41b528ab9a5a127.jpg)
178
+
179
+ ![](images/7574d40434f2c232fcdfd17cae69c25562ed937e7b6825f1cd0ecc37ebdc8fe3.jpg)
180
+ (a) training time per epoch [hr]
181
+
182
+ ![](images/cb4a3c51ad0dd19e323559baf7dc99e72cac5781f6eefceee577c9dbf80d26d6.jpg)
183
+ (b) inference time per step [ms] vs. # nodes
184
+
185
+ ![](images/f6c91429ebc40dff9c73e8145c7e89c97e76c2cc179885c4dcec1d9b20250d89.jpg)
186
+ (c) memory footprint [GB] vs. batch size
187
+
188
+ ![](images/b004458f3fe230a61a5a2f80cbfa6ceb1775fb9c4a036702d091f4a3a974b418.jpg)
189
+ Figure 8. Performance comparison between BSMS-GNN, MS-GNN-GRID, and MESHGRAPHNETS. GRAPHUNETS is not included because of poor performance. Full results are plotted in Table. 1 and Table. 2 in Sec. A.3.
190
+
191
+ columns). Although only in simple cases, one can alleviate this issue by marking the two sticks as separate clusters and making inferences independently; a similar fix is unfeasible for connected, complex geometries. For instance, in a long, thin U-shaped tunnel, two nodes located on the parallel sides of the "U" are spatially close but geodesically distant, and hence should not be connected by an edge.
192
+
193
+ Accuracy and Generalization In terms of accuracy, our method has the smallest rollout RMSE for all cases except for the DEFORMINGPLATE dataset, where all three competitors have similar results. We assume the main reason is that the mesh size for DEFORMINGPLATE is too small, so the flat architecture does not show any disadvantage. In the largest and most complex dataset, INFLATINGFONT, our method achieves the highest accuracy, cutting down $40\%$ of the rollout RMSE compared to the competitors (Fig. 9. Left.). Additionally, our model demonstrates the ability to perform zero-shot inference on larger meshes than those in the training set, and still produce accurate global rollouts, even when the characters are written in a different language.
194
+
195
+ Performance Advantages of BSMS-GNN Our method has a simplified and lightweight model architecture, characterized by a reduced number of MPs at each level and the absence of learnable transition modules. This results in a significant reduction in memory footprint during training (in Fig.8. (c) and Table.2); BSMS-GNN consumes $43\% \sim 87\%$ memory in training as MS-GNN-GRID, $48\% \sim 53\%$ as MESHGRAPHNETS, and only $10\%$ as GRAPHUNETS. our method also uses the least memory during inference, except for the DEFORMINGPLATE dataset where the consumption is slightly higher (20MBs) than MESHGRAPHNETS.
196
+
197
+ Memory reduction also contributes to improved training efficiency, as it allows for larger batch sizes, more random sampling, and fewer times of data swapping between CPU and GPU. Combined, our method has the fastest unit training speed (per epoch) among all competitors (Fig.8. (a) and Table.1), where it consumes only $26\% \sim 58\%$ unit training time as that of MS-GNN-GRID and MESHGRAPHNETS.
198
+
199
+ In terms of inference time, our method exhibits similar performance to MS-GNN-GRID on smaller mesh size datasets (CYLINDERFLOW and DEFORMINGPLATE), both outperforming MESHGRAPHNETS. However, as the mesh size increases, BSMS-GNN surpasses MS-GNN-GRID, showing better scalability. In large mesh size cases (AIRFOIL and INFLATINGFONT), our method shows a $1.5 \times$ and $1.9 \times$ improvement over MS-GNN-GRID and MESHGRAPHNETS, respectively (Fig.8. (b) and Table.1).
200
+
201
+ Concerning the total training cost to reach a desired global rollout RMSE, we observe that all methods reach the target with a similar number of epochs. This is because that all these methods learn to resist rollout noise by seeing different, random noises at each epoch; enough noise patterns (proportional to epoch number) is the key for accurate rollout; as such, the total wall time is roughly proportional to the unit training time, given similar epoch numbers, making our method the most efficient.
202
+
203
+ Scaling Analysis By training and evaluating competing methods on INFLATINGFONT with varying resolutions (5K,15K,30K, and 45K), we observe that both BSMS-GNN and MS-GNN-GRID scale up with a near-linear
204
+
205
+ ![](images/0571ac258be363c6319a7d220fbd6d8086de8c03fab2149a10da7efe69023669.jpg)
206
+ Figure 9. Left: Comparing the rollout RMSE between BSMS-GNN and existing SOTAs on benchmarks INFLATINGFONT. Our framework reaches the highest accuracy, showing a stronger capability for complex, large geometries with massive contacts. Right: Our trained model can zero-shot infer on never-seen fonts, with about $7\mathrm{x}$ size in mesh size with the same accuracy.
207
+
208
+ ![](images/46d572ac9451647be82a3c1335022dfc2608f140f459b195ea53b8b33a6a46c2.jpg)
209
+
210
+ ![](images/41af320233bca3ad9caff4628454067456d14b351dd96309789454591712241b.jpg)
211
+ Figure 10. Scaling analysis. With the growing size of INFLATING-FONT, BSMS-GNN shows a progressive advantage over MESH-GRAPHNETS and MS-GNN-GRID.
212
+
213
+ ![](images/6715578159814afb80cc05ceadad14ce111aecea6f618e03c1a29aca30fb8708.jpg)
214
+
215
+ growing rate; still, our method is more efficient than MS-GNN-GRID as illustrated earlier(Fig. 10). We leave the details of scaling analysis in A.5.
216
+
217
+ # 5. Related Works
218
+
219
+ GNNs for Physics-Based Simulation The application of GNNs to physics-based simulation has first been applied to deformable solids and fluids (both represented by particles) (Sanchez-Gonzalez et al., 2018). A notable milestone in this field is MESHGRAPHNETS (Pfaff et al., 2020), which enables the general scheme for learning mesh-based simulations. Subsequently, several variants of MESHGRAPHNETS have been proposed: such as combining GNNs with Physics-Informed Neural Networks (PINNs) (Gao et al., 2022), making long-term predictions by combining the GraphAutoEncoder (GAE) and Transformer (Han et al., 2022), directly predicting the steady-states through the multi-layer readouts (Harsch & Riedelbauch, 2021), and accelerating the finer-level simulation by feeding the upsampled coarser results inferred by GNN (Belbute-Peres et al., 2020).
220
+
221
+ Multi-Scale GNNs Multi-scale GNNs (MS-GNNs) have been widely used in general graph-related tasks other than physics (Wu et al., 2020; Mesquita et al., 2020; Zhang et al., 2019). The GraphUNet(Gao & Ji, 2019) introduces the UNet structure into GNNs with a trainable scoring module for pooling, and a $2^{\mathrm{nd}}$ -powered adjacency enhancement to help conserve the connectivity. Several works have investigated the use of MS-GNNs for physics-based simulations, including the two- and multi-level GNNs(Fortunato et al.,
222
+
223
+ 2022; Liu et al., 2021), which rely on manually drawing coarse meshes. Works such as MS-GNN-GRID (Lino et al., 2021; 2022a) rely on spatial proximity to generate multi-level structures. Li et al. (2020c) adopts multi-level matrix factorization to generate the kernels at coarser levels. Lino et al. (2022b) utilizes Guillard's coarsening algorithm to build the coarse-level meshes, but only for 2-D triangle elements. Additionally, there are representative works that abandon the original mesh and build connections and hierarchies on point clouds, such as GNS (Sanchez-Gonzalez et al., 2020), PointNet (Qi et al., 2017a), PointNet++(Qi et al., 2017b), and GeodesicConv(Masci et al., 2015).
224
+
225
+ # 6. Conclusion, Limitations, and Future Work
226
+
227
+ The Bi-Stride Multi-Scale Graph Neural Network (BSMS-GNN) utilizes a novel pooling strategy that allows for the creation of an arbitrary-depth, multi-level graph neural network using the original mesh as the sole input. This approach eliminates the need for manually drawing coarser meshes and reduces the potential for wrong edges introduced by spatial proximity. Additionally, Bi-stride pooling enables a one-MP scheme and a non-parametric transition, resulting in a significant reduction in computational costs. Overall, BSMS-GNN improves the capability and generality of applying GNNs to large-scale physical simulations with complex geometries.
228
+
229
+ Further research following our path may include handling huge graphs through the combination of multi-level GNNs with batched and distributed training (Strönisch et al., 2023). Combining the neural operators (Li et al., 2020b;c), i.e. the ability to handle a wide range of PDE parameters, is also appealing. It would be interesting to combine BSMS-GNNs with Transformer (Han et al., 2022; Geneva & Zabaras, 2022; Li et al., 2022b) for stable roll-outs. Regarding more precise contact modeling, the point-point approach can be improved by face pairs (Allen et al., 2023). Finally, it is worth investigating strategies to score and prunes edges (Ding et al., 2006; Yu et al., 2014) at coarser levels.
230
+
231
+ # ACKNOWLEDGMENTS
232
+
233
+ Yadi Cao would like to thank Na Li for her remote support and companionship throughout his research and study. We thank Neil Shah, Tong Zhao, and Sergey Tulyakov for their invaluable discussions on general GNNs. Yadi Cao would like to acknowledge Dr. Shaowu Pan for the initial inspiration of this work. We extend our appreciation to our reviewers for their valuable feedback on this work and manuscript. This work has been supported in part by NSF CAREER 2153851, CCF-2153863, ECCS-2023780.
234
+
235
+ # References
236
+
237
+ Allen, K. R., Rubanova, Y., Lopez-Guevara, T., Whitney, W. F., Sanchez-Gonzalez, A., Battaglia, P., and Pfaff, T. Learning rigid dynamics with face interaction graph networks. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=J7Uh781A05p.
238
+ Asratian, A. S., Denley, T. M., and Häggkvist, R. Bipartite graphs and their applications, volume 131. Cambridge university press, 1998.
239
+ Battaglia, P. W., Hamrick, J. B., Bapst, V., Sanchez-Gonzalez, A., Zambaldi, V., Malinowski, M., Tacchetti, A., Raposo, D., Santoro, A., Faulkner, R., et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
240
+ Belbute-Peres, F. D. A., Economon, T., and Kolter, Z. Combining differentiable pde solvers and graph neural networks for fluid flow prediction. In international conference on machine learning, pp. 2402-2411. PMLR, 2020.
241
+ Bridson, R. Fluid simulation for computer graphics. AK Peters/CRC Press, 2015.
242
+ Cao, Y. and Li, R. A liquid plug moving in an annular pipe—flow analysis. Physics of Fluids, 30(9):093605, 2018.
243
+ Cao, Y., Gao, X., and Li, R. A liquid plug moving in an annular pipe-heat transfer analysis. International Journal of Heat and Mass Transfer, 139:1065-1076, 2019.
244
+ Cao, Y., Chen, Y., Li, M., Yang, Y., Zhang, X., Aanjaneya, M., and Jiang, C. An efficient b-spline lagrangian/eulerian method for compressible flow, shock waves, and fracturing solids. ACM Transactions on Graphics (TOG), 41(5):1-13, 2022.
245
+ Chen, D., Lin, Y., Li, W., Li, P., Zhou, J., and Sun, X. Measuring and relieving the over-smoothing problem for graph neural networks from the topological view. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 3438-3445, 2020.
246
+
247
+ Ding, C., He, X., Xiong, H., Peng, H., and Holbrook, S. R. Transitive closure and metric inequality of weighted graphs: detecting protein interaction modules using cliques. International journal of data mining and bioinformatics, 1(2):162-177, 2006.
248
+ Fang, Y., Li, M., Jiang, C., and Kaufman, D. M. Guaranteed globally injective 3d deformation processing. ACM Trans. Graph., 40(4):75-1, 2021.
249
+ Fey, M. and Lenssen, J. E. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
250
+ Fortunato, M., Pfaff, T., Wirnsberger, P., Pritzel, A., and Battaglia, P. Multiscale meshgraphnets. In ICML 2022 2nd AI for Science Workshop, 2022.
251
+ Fotiadis, S., Pignatelli, E., Valencia, M. L., Cantwell, C., Storkey, A., and Bharath, A. A. Comparing recurrent and convolutional neural networks for predicting wave propagation. arXiv preprint arXiv:2002.08981, 2020.
252
+ Fukushima, K. and Miyake, S. Neocognitron: A self-organizing neural network model for a mechanism of visual pattern recognition. In Competition and cooperation in neural nets, pp. 267-285. Springer, 1982.
253
+ Gao, H. and Ji, S. Graph u-nets. In international conference on machine learning, pp. 2083-2092. PMLR, 2019.
254
+ Gao, H., Sun, L., and Wang, J.-X. Phygeonet: Physics-informed geometry-adaptive convolutional neural networks for solving parameterized steady-state pdes on irregular domain. Journal of Computational Physics, 428: 110079, 2021.
255
+ Gao, H., Zahr, M. J., and Wang, J.-X. Physics-informed graph neural galerkin networks: A unified framework for solving pde-governed forward and inverse problems. Computer Methods in Applied Mechanics and Engineering, 390:114502, 2022.
256
+ Geneva, N. and Zabaras, N. Transformers for modeling physical systems. Neural Networks, 146:272-289, 2022.
257
+ Grzesczuk, R., Terzopoulos, D., and Hinton, G. Neuroanimator: Fast neural network emulation and control of physics-based models. In Proceedings of the 25th annual conference on Computer graphics and interactive techniques, pp. 9-20, 1998.
258
+ Guillard, H. Node-nested multi-grid method with Delaunay coarsening. PhD thesis, INRIA, 1993.
259
+ Guo, X., Li, W., and Iorio, F. Convolutional neural networks for steady flow approximation. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pp. 481-490, 2016.
260
+
261
+ Han, X., Gao, H., Pffaf, T., Wang, J.-X., and Liu, L.-P. Predicting physics in mesh-reduced space with temporal attention. arXiv preprint arXiv:2201.09113, 2022.
262
+ Harsch, L. and Riedelbauch, S. Direct prediction of steady-state flow fields in meshed domain with graph networks. arXiv preprint arXiv:2105.02575, 2021.
263
+ Jiang, C., Schroeder, C., Teran, J., Stomakhin, A., and Selle, A. The material point method for simulating continuum materials. In ACM SIGGRAPH 2016 Courses, pp. 1-52. 2016.
264
+ Karniadakis, G. E., Kevrekidis, I. G., Lu, L., Perdikaris, P., Wang, S., and Yang, L. Physics-informed machine learning. Nature Reviews Physics, 3(6):422-440, 2021.
265
+ Kim, B., Azevedo, V. C., Thuerey, N., Kim, T., Gross, M., and Solenthaler, B. Deep fluids: A generative network for parameterized fluid simulations. In Computer graphics forum, volume 38, pp. 59-70. Wiley Online Library, 2019.
266
+ Li, M., Ferguson, Z., Schneider, T., Langlois, T. R., Zorin, D., Panozzo, D., Jiang, C., and Kaufman, D. M. Incremental potential contact: intersection-and inversion-free, large-deformation dynamics. ACM Trans. Graph., 39(4): 49, 2020a.
267
+ Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A., and Anandkumar, A. Neural operator: Graph kernel network for partial differential equations. arXiv preprint arXiv:2003.03485, 2020b.
268
+ Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Stuart, A., Bhattacharya, K., and Anandkumar, A. Multipole graph neural operator for parametric partial differential equations. Advances in Neural Information Processing Systems, 33:6755-6766, 2020c.
269
+ Li, Z., Huang, D. Z., Liu, B., and Anandkumar, A. Fourier neural operator with learned deformations for pdes on general geometries. arXiv preprint arXiv:2207.05209, 2022a.
270
+ Li, Z., Meidani, K., and Farimani, A. B. Transformer for partial differential equations' operator learning. arXiv preprint arXiv:2205.13671, 2022b.
271
+ Lino, M., Cantwell, C., Bharath, A. A., and Fotiadis, S. Simulating continuum mechanics with multi-scale graph neural networks. arXiv preprint arXiv:2106.04900, 2021.
272
+ Lino, M., Fotiadis, S., Bharath, A. A., and Cantwell, C. Towards fast simulation of environmental fluid mechanics with multi-scale graph neural networks. arXiv preprint arXiv:2205.02637, 2022a.
273
+
274
+ Lino, M., Fotiadis, S., Bharath, A. A., and Cantwell, C. D. Multi-scale rotation-equivariant graph neural networks for unsteady eulerian fluid dynamics. Physics of Fluids, 34(8):087110, 2022b.
275
+ Liu, W., Yagoubi, M., and Schoenauer, M. Multi-resolution graph neural networks for pde approximation. In International Conference on Artificial Neural Networks, pp. 151-163. Springer, 2021.
276
+ Masci, J., Boscaini, D., Bronstein, M., and Vandergheynst, P. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the IEEE international conference on computer vision workshops, pp. 37-45, 2015.
277
+ Mesquita, D., Souza, A., and Kaski, S. Rethinking pooling in graph neural networks. Advances in Neural Information Processing Systems, 33:2220-2231, 2020.
278
+ Obiols-Sales, O., Vishnu, A., Malaya, N., and Chandramowliswharan, A. Cfdnet: A deep learning-based accelerator for fluid simulations. In Proceedings of the 34th ACM international conference on supercomputing, pp. 1-12, 2020.
279
+ Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pp. 8024-8035. Curran Associates, Inc., 2019.
280
+ Pfaff, T., Fortunato, M., Sanchez-Gonzalez, A., and Battaglia, P. W. Learning mesh-based simulation with graph networks. arXiv preprint arXiv:2010.03409, 2020.
281
+ Qi, C. R., Su, H., Mo, K., and Guibas, L. J. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 652-660, 2017a.
282
+ Qi, C. R., Yi, L., Su, H., and Guibas, L. J. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. Advances in neural information processing systems, 30, 2017b.
283
+ Raissi, M., Perdikaris, P., and Karniadakis, G. E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics, 378:686-707, 2019.
284
+ Sanchez-Gonzalez, A., Heess, N., Springenberg, J. T., Merel, J., Riedmiller, M., Hadsell, R., and Battaglia, P.
285
+
286
+ Graph networks as learnable physics engines for inference and control. In International Conference on Machine Learning, pp. 4470-4479. PMLR, 2018.
287
+ Sanchez-Gonzalez, A., Godwin, J., Pfaff, T., Ying, R., Leskovec, J., and Battaglia, P. Learning to simulate complex physics with graph networks. In International Conference on Machine Learning, pp. 8459-8468. PMLR, 2020.
288
+ Strönisch, S., Sander, M., Meyer, M., and Knüpfer, A. Multigpu approach for training of graph ml models on large cfd meshes. In AIAA SCITECH 2023 Forum, pp. 1203, 2023.
289
+ Sun, L., Gao, H., Pan, S., and Wang, J.-X. Surrogate modeling for fluid flows based on physics-constrained deep learning without simulation data. Computer Methods in Applied Mechanics and Engineering, 361:112732, 2020.
290
+ Tompson, J., Schlachter, K., Sprechmann, P., and Perlin, K. Accelerating eulerian fluid simulation with convolutional networks. In International Conference on Machine Learning, pp. 3424-3433. PMLR, 2017.
291
+ Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., and Philip, S. Y. A comprehensive survey on graph neural networks. IEEE transactions on neural networks and learning systems, 32(1):4-24, 2020.
292
+ Yu, Z., Xu, C., Meng, D., Hui, Z., Xiao, F., Liu, W., and Liu, J. Transitive distance clustering with k-means duality. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 987-994, 2014.
293
+ Zhang, Z., Bu, J., Ester, M., Zhang, J., Yao, C., Yu, Z., and Wang, C. Hierarchical graph pooling with structure learning. arXiv preprint arXiv:1911.05954, 2019.
294
+
295
+ # A. Appendix
296
+
297
+ # A.1. Dataset details
298
+
299
+ We adopt three existing test cases: Cylinder (Flow), Airfoil, and (Deforming) Plate from MESHGRAPHNETS. The Cylinder includes the transient incompressible flow field around a fixed cylinder at varying locations. The Airfoil includes the transient compressible flow field at varying Mach numbers around the airfoil with varying angles of attack (AOA). The Plate includes hyperelastic plates squeezed by moving obstacles. In addition to these three cases, our Font(INFLATINGFONT) case involves the quasi-static inflation of enclosed elastic surfaces (3D surface mesh) possibly with self-contact. We create the INFLATINGFONT cases using the open-source simulator (Fang et al., 2021), with the same material properties and inflation speed. The input geometries for INFLATINGFONT are $1,400 \times 2$ character matrices in Chinese. All the datasets are split into 1000 training, 200 validation, and 200 testing instances. In the following table, the second entries with superscript* in the average edge number column are for the contact edges:
300
+
301
+ <table><tr><td>Case</td><td>Ave # nodes</td><td>Ave # edges</td><td>Mesh type</td><td>Seed method</td><td># Levels</td><td># Steps</td></tr><tr><td>Cylinder</td><td>1886</td><td>5424</td><td>triangle, 2D</td><td>MinAve</td><td>7</td><td>600</td></tr><tr><td>Airfoil</td><td>5233</td><td>15449</td><td>triangle, 2D</td><td>MinAve</td><td>9</td><td>600</td></tr><tr><td>Plate</td><td>1271</td><td>4611, 94*</td><td>tetrahedron, 3D</td><td>MinAve</td><td>6</td><td>400</td></tr><tr><td>Font</td><td>13177</td><td>39481, 6716*</td><td>triangle, 3D</td><td>CloseCenter</td><td>6</td><td>100</td></tr></table>
302
+
303
+ Below we list the model configurations: 1) the offset inputs to prepend before the material edge processor $e_{ij}^{M}$ , and $e_{ij}^{W}$ , and 2) nodes $p_i$ , as well as the nodal outputs $q_i$ from the decoder for each experiment cases, where $X$ and $x$ stand for the material-space and world-space positions, $v$ is the velocity, $\rho$ is the density, $P$ is the absolute pressure, and the dot $\dot{a} = a_{t+1} - a_t$ stands for temporal change for a variable $a$ . All the variables involved are normalized to zero-mean and unit variance via pre-processing.
304
+
305
+ <table><tr><td>Case</td><td>Type</td><td>Offset inputs eMij</td><td>Offset inputs eWij</td><td>Inputs pi</td><td>Outputs qi</td></tr><tr><td>Cylinder</td><td>Eulerian</td><td>Xij, |Xij|</td><td>NA</td><td>vi, ni</td><td>vi</td></tr><tr><td>Airfoil</td><td>Eulerian</td><td>Xij, |Xij|</td><td>NA</td><td>ρi, vi, ni</td><td>ρi, ρi, Pi</td></tr><tr><td>Plate</td><td>Lagrangian</td><td>Xij, |Xij|, xi, |xi|</td><td>xi, ij|</td><td>x̂i, ni</td><td>x̂i</td></tr><tr><td>Font</td><td>Lagrangian</td><td>Xij, |Xij|, xi, |xi|</td><td>xi, ij|</td><td>ni</td><td>x̂i</td></tr></table>
306
+
307
+ As for time integration, Cylinder, Airfoil, and Plate inherited the first-order integration from MESHGRAPHNETS. For INFLATINGFONT, the first-order quasi-static integration (Fang et al., 2021) is used in the solver. Hence, we also adopt the first-order integration for INFLATINGFONT.
308
+
309
+ # A.2. Additional Model details
310
+
311
+ # A.2.1. BASIC MODULES AND ARCHITECTURES
312
+
313
+ The MLPs for the nodal encoder, the processor, and the nodal decoder are ReLU-activated two-hidden-layer MLPs with the hidden-layer and output size at 128, except for the nodal decoder whose output size matches the prediction $q$ . All MLPs have a residual connection. A LayerNorm normalizes all MLP outputs except for the nodal decoder.
314
+
315
+ # A.2.2. BASELINE: MESHGRAPHNETS
316
+
317
+ Our MESHGRAPHNETS implementation uses the same MLPs as above but with an additional module: the edge encoder. Also, the edge latent is updated and carried over throughout the end of multiple MPs. We use 15 times MP for all cases to keep it consistent with MESHGRAPHNETS.
318
+
319
+ # A.2.3. BASELINE: MS-GNN-GRID
320
+
321
+ Our re-implementation of MS-GNN-GRID uses the same MLPs as above but with four additional modules: the edge encoder at the finest level, the aggregation modules for nodes and edges at every level for the transitions, and the returning modules for nodes at every level. This method also requires assigning the regular grid nodes for each level. We assign these grid nodes by defining an initial grid resolution and an inflation rate between levels. As for the MP times at each level, we
322
+
323
+ follow Lino et al. (2022a) to use four at the top and bottom levels and two for the others.
324
+
325
+ <table><tr><td>Case</td><td># Levels</td><td>Initial grid dx</td><td>dx inflation</td><td>Level-wise # MPs</td></tr><tr><td>Cylinder</td><td>4</td><td>[5e-2, 5e-2]</td><td>2</td><td>[4, 2, 2, 4]</td></tr><tr><td>Airfoil</td><td>4</td><td>[4.5, 4.5]</td><td>2</td><td>[4, 2, 2, 4]</td></tr><tr><td>Plate</td><td>4</td><td>[4e-3, 4e-3, 4e-3]</td><td>2</td><td>[4, 2, 2, 4]</td></tr><tr><td>Font</td><td>4</td><td>[1.5e-2, 1.5e-2, 1e-3]</td><td>2</td><td>[4, 2, 2, 4]</td></tr></table>
326
+
327
+ # A.2.4. BASELINE: GRAPHUNETS
328
+
329
+ Our re-implementation of GRAPHUNETS uses the same number of levels as those of BSMS-GNN. Likewise, we make the following modifications to the original GRAPHUNETS: (1) We change the information passing from GCN to our message passing module for consistency and translational invariance. (2) GraphUNet was intended for tiny graphs (100 nodes) and used dense matrix multiplications. This design is not scalable as it can break the memory limit and slow down the training to take more than 30 days per epoch in our graph size (1500 to 15000 nodes). We thus optimize the operations such as matrix multiplication and aggregation with sparse implementations.
330
+
331
+ # A.2.5. NOISE AND BATCH NUMBER
332
+
333
+ For each of these benchmarks, we generated Gaussian noise with a specific scale and added it to the original trajectory at the beginning of every epoch. The purpose of noise injection was to mimic the effects of noise generated by the model, thereby improving the model's ability to correct its output when fed with noisy inputs. Furthermore, we carefully tuned the batch size under smaller subset experiments for each method to achieve optimal convergence rates.
334
+
335
+ <table><tr><td rowspan="2">Case</td><td colspan="4">Batch size</td><td rowspan="2">Noise scale</td></tr><tr><td>BSMS-GNN</td><td>MS-GNN-GRID</td><td>MESHGRAPHNETS</td><td>GRAPHUNETS</td></tr><tr><td>Cylinder</td><td>32</td><td>16</td><td>16</td><td>2</td><td>velocity: 2e-2</td></tr><tr><td>Airfoil</td><td>8</td><td>4</td><td>8</td><td>1</td><td>velocity: 2e-2, density: 1e1</td></tr><tr><td>Plate</td><td>8</td><td>2</td><td>2</td><td>1</td><td>pos: 3e-3</td></tr><tr><td>Font</td><td>2</td><td>1</td><td>1</td><td>1</td><td>pos: [5e-3, 5e-3, 3.33e-4]</td></tr></table>
336
+
337
+ # A.3. Detailed results
338
+
339
+ We plot the detailed measurements in Table. 1 and Table. 2. All experiments are conducted using a single Nvidia RTX 3090.
340
+
341
+ # A.4. Ablation study
342
+
343
+ # A.4.1. TRANSITION METHOD
344
+
345
+ While exploring the non-parametric transition solutions, we started with no transition because our method is adopted directly from GUN (Gao & Ji, 2019). The no-transition strategy produces low enough 1-step RMSE and visually correct rollouts for INFLATINGFONT. However, in the global rollouts of CYLINDERFLOW and AIRFOIL cases, we observed stripe patterns (Figure. 11 (c), column None) where the stripes are aligned with the edges at the coarser levels (Figure. 11 (d)). We suspect that this error results from the fact that the unpooled nodes all have zero information before MP, making them indistinguishable from the processor modules and exaggerating the difference between pooled and unpooled nodes over rollouts.
346
+
347
+ The no-transition strategy resembles no interpolation during the super-resolution phase of $\mathrm{CNN + UNet}$ . Naturally, we then tried a single step of graph convolution (without activation) to resemble the interpolation in regular grids. However, this turns out to over-smooth the features (Figure. 11 (e), column Graph Conv), and the information propagation was smeared out except for the area near the generator (in this case, near the cylinder).
348
+
349
+ We believe the over-smoothing issue arises from the ignorance of the irregularity of the mesh. Unlike CNN, where the fine nodes regularly lie at the center of coarser grids, irregular meshes have varying topology and element sizes. The element sizes are almost always smaller near the interface for higher precision in simulations; hence an unweighted graph convolution can smear the finer information near the cylinder and their adjacent neighbors during returning. The natural choice to account for the irregularity is to include reasonable nodal weights (such as the size). In the end, we arrive at the
350
+
351
+ Table 1. Detailed measurements of our method, MS-GNN-GRID, MESHGRAPHNETS, and GRAPHUNETS. BSMS-GNN consistently generates stable and competitive global rollouts with the smallest training cost. BSMS-GNN is also lightweight and has the fastest inference time. It is also free from the large RMSE due to poor pooling on unseen geometries where the learnable pooling module of GRAPHUNETS suffers. The 2nd column of entries in Infer time is the speed up compared to the numerical solver. The 2nd column of entries in Training cost is the epoch for achieving the converged model.
352
+
353
+ <table><tr><td>Measurements</td><td>Case</td><td>Our&#x27;s</td><td>(Lino et al., 2021)</td><td>(Pfaff et al., 2020)</td><td>(Gao &amp; Ji, 2019)</td></tr><tr><td rowspan="4">Training time/step [ms]</td><td>Cylinder</td><td>10.14</td><td>15.36</td><td>19.29</td><td>16.20</td></tr><tr><td>Airfoil</td><td>18.82</td><td>25.26</td><td>36.72</td><td>55.08</td></tr><tr><td>Plate</td><td>15.58</td><td>49.65</td><td>49.15</td><td>31.88</td></tr><tr><td>INFLATINGFONT</td><td>45.96</td><td>107.16</td><td>117.48</td><td>1,833.37</td></tr><tr><td rowspan="4">Infer time/step [ms]</td><td>Cylinder</td><td>6.75, 121x</td><td>6.18, 133x</td><td>14.50, 57x</td><td>24.30, 34x</td></tr><tr><td>Airfoil</td><td>8.64, 1275x</td><td>20.40, 540x</td><td>24.20, 455x</td><td>33.60, 328x</td></tr><tr><td>Plate</td><td>14.01, 207x</td><td>18.12, 160x</td><td>15.70, 184x</td><td>16.20, 179x</td></tr><tr><td>INFLATINGFONT</td><td>33.33, 210x</td><td>41.66, 168x</td><td>82.35, 85x</td><td>629.33, 11x</td></tr><tr><td rowspan="4">Training cost [hrs], Final epoch</td><td>Cylinder</td><td>21.41, 19</td><td>35.84, 21</td><td>64.30, 30</td><td>76.15, 39</td></tr><tr><td>Airfoil</td><td>122.33, 39</td><td>176.82, 42</td><td>275.40, 45</td><td>206.55, 37</td></tr><tr><td>Plate</td><td>56.07, 27</td><td>125.78, 19</td><td>176.94, 27</td><td>127.50, 30</td></tr><tr><td>INFLATINGFONT</td><td>2.68E+01, 21</td><td>5.66E+01, 19</td><td>6.20E+01, 19</td><td>NA</td></tr><tr><td rowspan="4">RMSE-1 [1e-2]</td><td>Cylinder</td><td>2.04E-01</td><td>2.20E-01</td><td>2.26E-01</td><td>8.09E-01</td></tr><tr><td>Airfoil</td><td>2.88E+01</td><td>2.68E+01</td><td>4.35E+01</td><td>2.93E+01</td></tr><tr><td>Plate</td><td>2.87E-02</td><td>2.20E-02</td><td>1.98E-02</td><td>2.03E-02</td></tr><tr><td>INFLATINGFONT</td><td>1.77E-02</td><td>1.87E-02</td><td>1.95E-02</td><td>NA</td></tr><tr><td rowspan="4">RMSE-50 [1e-2]</td><td>Cylinder</td><td>2.42</td><td>2.74</td><td>4.39</td><td>1.87E+01</td></tr><tr><td>Airfoil</td><td>1.10E+03</td><td>1.22E+03</td><td>1.66E+03</td><td>1.17E+03</td></tr><tr><td>Plate</td><td>3.18E-02</td><td>2.78E-02</td><td>2.88E-02</td><td>5.19E-02</td></tr><tr><td>INFLATINGFONT</td><td>1.08E-01</td><td>3.24E-01</td><td>1.78E-01</td><td>NA</td></tr><tr><td rowspan="4">RMSE-all [1e-2]</td><td>Cylinder</td><td>8.37</td><td>8.49</td><td>1.07E+01</td><td>1.65E+02</td></tr><tr><td>Airfoil</td><td>4.21E+03</td><td>5.56E+03</td><td>6.95E+03</td><td>6.11E+03</td></tr><tr><td>Plate</td><td>1.60E-01</td><td>1.48E-01</td><td>1.51E-01</td><td>5.46E-01</td></tr><tr><td>INFLATINGFONT</td><td>2.20E-01</td><td>3.78E-01</td><td>3.65E-01</td><td>NA</td></tr></table>
354
+
355
+ solution proposed in Sec. 3.2 by utilizing the nodal weights during aggregation and recording the shares of contribution for later returning. Our transition method works consistently for all experiment cases and produces the lowest RMSE for global rollouts (Figure. 11 (b)).
356
+
357
+ Comparing to alternative transition methods Additionally, we compare our transition methods to two alternatives extracted from previous works: (1) calculating the edge weights (kernel) for the information flow using the inverse of its length (node position offset), which we refer to as Pos-Kernel (Liu et al., 2021); and (2) the level-wise learnable transition modules implemented by additional MP, which we refer to as Learnable (Fortunato et al., 2022).
358
+
359
+ In addition to the high RMSE of None and Graph-Conv shown in Figure. 11, we can also observe that: (1) the training/infer time and RAM consumption for all non-parametric transitions (including None) are similar, which supports the statement that our transition method is light-weighted. (2) Learnable transition can reach slightly higher accuracy but at the price of $\sim 70\%$ more training/infer time and RAM. As mentioned in Sec. 4.2, higher training RAM can limit the batch number and increase the frequency of data communication between CPU and GPU, slowing down the training process even further when the scale goes up. (3) Pos-Kernel results in a slightly higher RMSE compared to our method, making it a competitive alternative in production.
360
+
361
+ # A.4.2. SENSITIVITY ANALYSIS ON SEEDING HEURISTICS
362
+
363
+ In this section, we investigated the impact of using different seeding heuristics during the training and testing phases on the sensitivity of a converged model. We deliberately altered the heuristics used on each benchmark and evaluated the RMSEs. The results showed that the inconsistency in seeding heuristics led to higher roll-outs compared to the results obtained when using consistent seeding, as shown in Table 4. Specifically, the roll-outs were $1.01\mathrm{x}$ to $2.04\mathrm{x}$ and $1.13\mathrm{x}$ to $2.21\mathrm{x}$ for random seeding and inverse seeding, respectively, with respect to consistent seeding. However, the RMSEs remained in the same magnitude, indicating that our method is not sensitive to the initial seeding. It should be also noted that this is not a practical issue, as the seeding can easily be kept consistent during different phases.
364
+
365
+ Table 2. Memory footprint under multi-batches, BSMS-GNN consistently cuts RAM consumption by approximately half in all cases in the training stage, and also has the smallest (except for DEFORMINGPLATE) inference RAM.
366
+
367
+ <table><tr><td rowspan="2">Case</td><td rowspan="2">Method</td><td colspan="6">Training RAM (GBs) with different Batch #</td><td rowspan="2">Infer RAM (GBs)</td></tr><tr><td>2</td><td>4</td><td>8</td><td>16</td><td>32</td><td>64</td></tr><tr><td rowspan="4">CYLINDERFLOW</td><td>Our&#x27;s</td><td>2.41</td><td>2.92</td><td>4.37</td><td>6.06</td><td>11.4</td><td>22.27</td><td>1.92</td></tr><tr><td>(Lino et al., 2021)</td><td>2.79</td><td>3.60</td><td>5.31</td><td>8.56</td><td>15.10</td><td>-</td><td>1.97</td></tr><tr><td>(Pfaff et al., 2020)</td><td>3.25</td><td>4.46</td><td>6.91</td><td>11.84</td><td>21.60</td><td>-</td><td>1.94</td></tr><tr><td>(Gao &amp; Ji, 2019)</td><td>23.33</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.18</td></tr><tr><td rowspan="4">AIRFOIL</td><td>Our&#x27;s</td><td>3.66</td><td>5.46</td><td>8.88</td><td>15.70</td><td>-</td><td>-</td><td>2.02</td></tr><tr><td>(Lino et al., 2021)</td><td>4.18</td><td>6.25</td><td>10.65</td><td>19.25</td><td>-</td><td>-</td><td>2.02</td></tr><tr><td>(Pfaff et al., 2020)</td><td>5.53</td><td>8.90</td><td>16.08</td><td>-</td><td>-</td><td>-</td><td>2.06</td></tr><tr><td>(Gao &amp; Ji, 2019)</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.67</td></tr><tr><td rowspan="4">DEFORMINGPLATE</td><td>Our&#x27;s</td><td>2.36</td><td>2.87</td><td>3.85</td><td>5.78</td><td>9.28</td><td>16.85</td><td>1.95</td></tr><tr><td>(Lino et al., 2021)</td><td>3.41</td><td>4.81</td><td>7.75</td><td>13.20</td><td>-</td><td>-</td><td>2.00</td></tr><tr><td>(Pfaff et al., 2020)</td><td>3.10</td><td>4.29</td><td>6.59</td><td>11.49</td><td>20.80</td><td>-</td><td>1.93</td></tr><tr><td>(Gao &amp; Ji, 2019)</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.18</td></tr><tr><td rowspan="4">INFLATINGFONT</td><td>Our&#x27;s</td><td>6.28</td><td>10.80</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.23</td></tr><tr><td>(Lino et al., 2021)</td><td>10.87</td><td>19.79</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.45</td></tr><tr><td>(Pfaff et al., 2020)</td><td>12.48</td><td>23.39</td><td>-</td><td>-</td><td>-</td><td>-</td><td>2.28</td></tr><tr><td>(Gao &amp; Ji, 2019)</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>4.51</td></tr></table>
368
+
369
+ Table 3. Detailed measurements of different transition methods. Ours and Pos-Kernel are the only two non-parametric transitions that are light-weighted and produce reliable rollouts compared to the expensive Learnable transition.
370
+
371
+ <table><tr><td>Measurements</td><td>Ours</td><td>None</td><td>Graph-Conv</td><td>Pos-Kernel</td><td>Learnable</td></tr><tr><td>Training time/step [ms]</td><td>10.14</td><td>9.30</td><td>10.07</td><td>10.06</td><td>17.75</td></tr><tr><td>Infer time/step [ms]</td><td>6.75</td><td>5.70</td><td>6.46</td><td>6.90</td><td>11.28</td></tr><tr><td>Training RAM [GBs]</td><td>11.041</td><td>11.041</td><td>11.041</td><td>11.041</td><td>18.033</td></tr><tr><td>Infer RAM [GBs]</td><td>1.923</td><td>1.923</td><td>1.923</td><td>1.923</td><td>1.931</td></tr><tr><td>RMSE-1 [1e-2]</td><td>2.85E-01</td><td>1.49E-01</td><td>3.41E-01</td><td>6.38E-01</td><td>4.70E-01</td></tr><tr><td>RMSE-50 [1e-2]</td><td>1.43E+01</td><td>2.05E+02</td><td>2.40E+02</td><td>1.77E+01</td><td>1.35E+01</td></tr><tr><td>RMSE-all [1e-2]</td><td>1.68E+01</td><td>2.59E+02</td><td>5.51E+02</td><td>2.01E+01</td><td>1.57E+01</td></tr></table>
372
+
373
+ # A.5. Details for scaling analysis on INFLATINGFONT
374
+
375
+ We generate the downscale and the upscale version of INFLATINGFONT with different average node numbers for the initial geometry, and then use the same settings to simulate the sequence. As reported in Fortunato et al. (2022), the low-resolution model suffers from converging to very small RMSE; hence we loosen the termination criteria by enlarging the target RMSE relative to the average edge length to prevent convergence failures. Similarly, the noise injection is also adjusted to be relative to the average edge length. Moreover, with a smaller number of nodes, the number of levels required to achieve the same bottom resolution also reduces. We make the corresponding adjustments to the levels of our model $d_{1}$ and that of the MS-GNN-GRID $d_{2}$ . The adjustments are plotted below.
376
+
377
+ # A.6. The Proof of conservation of contact edges
378
+
379
+ With Bi-stride pooling, our pooling conserves all the contact edges under the enhancement in Eq. 1. We assume the graph is undirected and unweighted, such that the adjacent matrix is a boolean matrix.
380
+
381
+ Formally speaking, given any contact edge $(i,j)$ at level $l$ (i.e. $\pmb{A}_{l}^{C}[i,j] = 1$ ) and a Bi-stride pooling $P$ which pools nodes $\mathcal{I}$ , there exists a contact edge $(i',j')$ that remains in the coarser level (i.e. $\pmb{A}_{l+1}'[i',j'] = 1$ , $i',j' \in \mathcal{I}$ ) and $i/i',j/j'$ are connected (i.e. $\pmb{A}_{l}[i,i'] = \pmb{A}_{l}[j,j'] = 1$ ). There are only four scenarios concerning the pooling nodes $\mathcal{I}$ and the contact edge nodes $i,j$ , under which the assertion always holds:
382
+
383
+ 1. Both $i,j$ are pooled, i.e. $i,j\in \mathcal{I}$ . Obviously $\pmb{A}_{l + 1}^{\prime C}[i',j'] = 1$ by letting $i^{\prime} = i,j^{\prime} = j$ .
384
+ 2. Only $i$ is pooled, $i \in \mathcal{I}, j \notin \mathcal{I}$ . Since we use Bi-stride pooling, $j$ can either be the seed at level 0 (Bi-stride can select either even or odd levels) that directly connects to all nodes at level 1, or must have at least one direct connection from the previous level. I.e., at least one neighbor of $j$ in the adjacent level is pooled, we let it be $j' \colon A_l[j, j'] = 1, j' \in \mathcal{I}$ .
385
+
386
+ Table 4. Sensitivity analysis of seeding heuristics on model performance. The "Random" heuristic refers to choosing a random seed for every cluster, while "Inverse w.r.t. Train" refers to choosing the inverse seeding heuristic compared to that used during the training phase. For example, if the MinAve heuristic was used during training, the CloseCenter heuristic was chosen during the testing phase.
387
+
388
+ <table><tr><td>Seeding @ Test</td><td>Ratio in RMSE</td><td>Cylinder</td><td>Airfoil</td><td>Plate</td><td>Font</td></tr><tr><td rowspan="3">Random</td><td>1-step</td><td>2.06</td><td>14.04</td><td>2.95</td><td>1.15</td></tr><tr><td>50-step</td><td>1.06</td><td>2.16</td><td>5.21</td><td>1.04</td></tr><tr><td>Rollout</td><td>1.01</td><td>2.04</td><td>1.53</td><td>1.04</td></tr><tr><td rowspan="3">Inverse w.r.t. Train</td><td>1-step</td><td>1.96</td><td>12.77</td><td>3.14</td><td>1.15</td></tr><tr><td>50-step</td><td>1.07</td><td>1.76</td><td>7.52</td><td>1.02</td></tr><tr><td>Rollout</td><td>1.13</td><td>2.21</td><td>1.46</td><td>1.06</td></tr></table>
389
+
390
+ Table 5. The adjustment for multi-scale parameters, the target RMSE and noise injection for scaling analysis.
391
+
392
+ <table><tr><td># Nodes</td><td>d1</td><td>d2</td><td>Initial grid dx</td><td>Target RMSE</td><td>Noise in pos</td></tr><tr><td>5k</td><td>4</td><td>2</td><td>[6e-2 6e-2 4e-3]</td><td>1.73e-4</td><td>[8.5e-3, 8.5e-3, 5.7e-4]</td></tr><tr><td>15k</td><td>6</td><td>4</td><td>[1.5e-2 1.5e-2 1e-3]</td><td>1e-4</td><td>[5e-3, 5e-3, 3.33e-4]</td></tr><tr><td>30k</td><td>7</td><td>5</td><td>[7.5e-3 7.5e-3 5e-4]</td><td>1e-4</td><td>[3.5e-3, 3.5e-3, 2.4e-4]</td></tr><tr><td>45k</td><td>7</td><td>5</td><td>[7.5e-3 7.5e-3 5e-4]</td><td>1e-4</td><td>[2.9e-3, 2.9e-3, 1.9e-4]</td></tr></table>
393
+
394
+ Then $\mathbf{A}_l^C\mathbf{A}_l[i,j'] \geq \mathbf{A}_l^C [i,j] * \mathbf{A}_l[j,j'] = 1$ , and $\mathbf{A}_l(\mathbf{A}_l^C\mathbf{A}_l)[i,j'] \geq \mathbf{A}_l[i,i] * (\mathbf{A}_l^C\mathbf{A}_l)[i,j'] = 1$ . Let $i' = i$ , then $\mathbf{A}_{l+1}^{C}[i',j'] = 1$ .
395
+
396
+ 3. Only $j$ is pooled, $i \notin \mathcal{I}, j \in \mathcal{I}$ . Similarly we have at least one $i'$ such that: $A_{l}[i', i] = 1, i' \in \mathcal{I}$ . Then $A_{l}A_{l}^{C}[i', j] \geq A_{l}[i', i] * A_{l}^{C}[i, j] = 1$ , and $(A_{l}A_{l}^{C})A_{l}[i', j] \geq (A_{l}A_{l}^{C})[i', j] * A_{l}[j, j] = 1$ . Let $j' = j$ , then $A_{l+1}'[i', j'] = 1$ .
397
+ 4. None of $i, j$ is pooled, $i, j \notin \mathcal{I}$ . We select one direct pooled neighbor for $i, j$ , respectively, that $\pmb{A}_l[i', i] = \pmb{A}_l[j, j'] = 1, i', j' \in \mathcal{I}$ . Then $\pmb{A}_l\pmb{A}_l^C[i', j] \geq \pmb{A}_l[i', i] * \pmb{A}_l^C[i, j] = 1$ , and $(\pmb{A}_l\pmb{A}_l^C)\pmb{A}_l[i', j'] \geq (\pmb{A}_l\pmb{A}_l^C)[i', j] * \pmb{A}_l[j, j'] = 1$ .
398
+
399
+ # A.7. Algorithms for the seeding heuristics
400
+
401
+ Here we elaborate our two seeding heuristics for the bi-stride pooling at every level: picking the seed that 1) is closest to the center of a cluster (CloseCenter), and 2) with the minimum average geodesic distance to its neighbors (MinAve). The complexity for MinAve is $O(N^2)$ as we need to conduct BFS for every node to find the one with the minimum average distance to neighbors. In our experiments, the quadratic cost of MinAve is tolerable for all cases but INFLATINGFONT.
402
+
403
+ Algorithm 1 MinAve: seeding by minimum average geodesic distance to neighbors
404
+ ```txt
405
+ Input: Unweighted, Bi-directional graph, $G = (N, E)$
406
+ {List of seeds in each clusters $L_s$ }
407
+ $L_c \gets \text{DetermineCluster}(G)$ $L_s \gets \emptyset$
408
+ {BFS(s) returns the list of distances to all other neighbors from s}
409
+ {if unreachable, the distance is set to infinity}
410
+ $D \gets \{ \text{BFS}(s) \text{ for } s \text{ in } N \}$
411
+ for idx in $L_c$ do
412
+ $D_c \gets D[\text{idx}, \text{idx}]$ $\bar{D}_c \gets \text{average}(D_c, \dim = 1)$ $s \gets \text{idx[argmin}(\bar{D}_c))$ $L_s$ .append(s)
413
+ end for
414
+ output $L_s$
415
+ ```
416
+
417
+ For INFLATINGFONT, the largest mesh has around 47K nodes, and the time for pre-processing with MinAve becomes intolerable. We switch to CloseCenter with the linear complexity.
418
+
419
+ For both heuristics, we search seeds in a per-cluster fashion to avoid the information from other clusters that could pollute
420
+
421
+ Algorithm 2 CloseCenter: seeding by minimum distance to the center of cluster
422
+ ```txt
423
+ Input: Unweighted, Bi-directional graph, $G = (N,E)$ ; Positions of the nodes, $X$
424
+ {List of seeds in each clusters $L_{s}$ }
425
+ $L_{c} \gets$ DetermineCluster( $G$ )
426
+ $L_{s} \gets \emptyset$
427
+ for idx in $L_{c}$ do
428
+ $\bar{X} \gets$ average(X[idx], dim = 0)
429
+ $\Delta X \gets X - \bar{X}$ $D \gets ||\Delta X||_2$ $s \gets$ idx[argmin(D)]
430
+ $L_{s}$ .append(s)
431
+ end for
432
+ output $L_{s}$
433
+ ```
434
+
435
+ the search result. For example, when determining the center of an isolated part of the input geometry, the positions of nodes from other clusters could pollute this process. The determination of clusters given in a graph is elaborated below.
436
+
437
+ Algorithm 3 DetermineCluster
438
+ ```txt
439
+ Input: Unweighted, Bi-directional graph, $G = (N,E)$ $\{R$ stands for remaining nodes that are not inside any cluster}
440
+ $R\gets N$ $L_{c}\gets \emptyset$
441
+ while $R\neq \emptyset$ do
442
+ $s\gets R.\mathrm{pop}(.)$
443
+ if $|R| = 0$ then
444
+ $L_{C}$ .append({c})
445
+ else
446
+ $D\gets \mathrm{BFS}(s)$ $C\gets \emptyset$ $R^{*}\gets \emptyset$
447
+ for n in $R$ do if $D[n] = \infty$ then $R^{*}$ .append(n) else C.append(n) end if
448
+ end for
449
+ $L_{C}$ .append(C) $R\gets R^{*}$
450
+ end if
451
+ end while
452
+ output $L_{c}$
453
+ ```
454
+
455
+ ![](images/46c55da5cf5849d81caa6792ab20deed0f576911ce46e5bf44739d6a4b63aef4.jpg)
456
+ (b) Global rollout error
457
+ (c) Visual comparison
458
+
459
+ ![](images/1467297d1d4073370a0757747a6de2c0a36279b45fffe031c14549aba78f3c2d.jpg)
460
+
461
+ ![](images/bb8636d541706b2fc4414f8c74753ebbb3d767a971de7ca826f09f61510e0bb5.jpg)
462
+
463
+ ![](images/cd4346cc12706ef5590034ea3f47d86b2c5f7374d3e4715cfc62b20b58fbf756.jpg)
464
+
465
+ ![](images/4718c72dbd9d4a408f619e34614730d00a1ba58f755bcff2a578f9dde7b4dc16.jpg)
466
+
467
+ ![](images/138e7b9e4620daa946a1562621ea3becf5414f498ffd0ac9268f7d3b5887dc30.jpg)
468
+ None
469
+ (d) Global rollout error distribution
470
+ Figure 11. (a) All three transition methods can reach the target training RMSE given 200 iterations. (b) However, our weighted graph aggregation+returning has the strongest resistance to the noise during the rollout. (c) The visual comparisons show that no transition produces mosaic-like patterns, while the graph convolution transition smeared out the information and ceased propagating downstream. (d) The global rollout error distribution of no transition (Left) shows the edge of the mosaic patterns look similar to the simulation mesh; The error of our transition (Right) travels with the generated vortices downstream and leaves the domain after step 200, which explains the RMSE drop in (b).
471
+
472
+ ![](images/8ce9f22c7a45ef778b8e8acd4351e0b653af4cb4dcac9068c2b1c084693c23d9.jpg)
473
+
474
+ ![](images/6232587ccfefd147d030ae8642835ce6907a9b43df18c66c679cce2408fd5e1a.jpg)
475
+
476
+ ![](images/4cfce89fb2a112097aa357773d43451df0386cf558c223a8ce939f8f2904c8d7.jpg)
477
+
478
+ ![](images/105d359e90f36a8f8e63a96b67c317fad56ee9fc33a26fb60606ecb5e0759602.jpg)
479
+
480
+ ![](images/a4d9b06817033ff989e1bc9da17f36f47e82bc16a0c5a3f8fd237fb6998bcd39.jpg)
481
+ Ours
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1fe9cdbf9dc222e53c4254766941e50a77b6b35ca1e7e2f573ede4fba3b0fe5
3
+ size 1068727
2023/Efficient Learning of Mesh-Based Physical Simulation with Bi-Stride Multi-Scale Graph Neural Network/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient List-Decodable Regression using Batches/3b0bee5f-53f7-49b2-998e-f3863ad33b14_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa015db01060c420ba849b4c26f75a159da53a5c42413f6aac0aa29e5ce56718
3
+ size 586009
2023/Efficient List-Decodable Regression using Batches/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient List-Decodable Regression using Batches/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0becd448fc237f32f042018811029f401d190c37308a35d42ccc4bf3e9b5d36
3
+ size 2297270
2023/Efficient List-Decodable Regression using Batches/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Online Reinforcement Learning with Offline Data/994aad71-ba98-4d37-b64a-7c8f4f933862_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46b6986ecfc2239b096f99a8c1924a10b8c7222c3b48458215028ca69a723f29
3
+ size 3653859
2023/Efficient Online Reinforcement Learning with Offline Data/full.md ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Efficient Online Reinforcement Learning with Offline Data
2
+
3
+ Philip J. Ball *1 Laura Smith *2 Ilya Kostrikov *2 Sergey Levine
4
+
5
+ # Abstract
6
+
7
+ Sample efficiency and exploration remain major challenges in online reinforcement learning (RL). A powerful approach that can be applied to address these issues is the inclusion of offline data, such as prior trajectories from a human expert or a sub-optimal exploration policy. Previous methods have relied on extensive modifications and additional complexity to ensure the effective use of this data. Instead, we ask: can we simply apply existing off-policy methods to leverage offline data when learning online? In this work, we demonstrate that the answer is yes; however, a set of minimal but important changes to existing off-policy RL algorithms are required to achieve reliable performance. We extensively ablate these design choices, demonstrating the key factors that most affect performance, and arrive at a set of recommendations that practitioners can readily apply, whether their data comprise a small number of expert demonstrations or large volumes of sub-optimal trajectories. We see that correct application of these simple recommendations can provide a $2.5 \times$ improvement over existing approaches across a diverse set of competitive benchmarks, with no additional computational overhead. We have released our code here: github.com/ikostrikov/rlpd.
8
+
9
+ # 1. Introduction
10
+
11
+ Deep reinforcement learning (RL) has achieved success in a number of complex domains, such as Atari (Mnih et al., 2015) and Go (Silver et al., 2016), as well as real-world applications like Chip Design (Mirhoseini et al., 2021) and Human Preference Alignment (Ouyang et al., 2022). In many of these settings, strong RL performance is predicated
12
+
13
+ *Equal contribution 1University of Oxford 2UC Berkeley. Correspondence to: Philip J. Ball <ball@robots.ox.ac.uk>, Laura Smith <smithlaura@berkeley.edu>, Ilya Kostrikov <kostrikov@berkeley.edu>.
14
+
15
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
16
+
17
+ ![](images/dd9a34a2bfbefa43ebee8b216962486f16b26d89580a0a151a24cd5301b11522.jpg)
18
+ Figure 1. Our approach, RLPD, extends standard off-policy RL and achieves reliable state-of-the-art online performance on a number of tasks using offline data. Here we show the difficult D4RL AntMaze domain (10 seeds, 1 std. shaded), averaged over all 6 tasks. We run RLPD for 300k steps due to early convergence.
19
+
20
+ on having large amounts of online interaction with an environment, which is usually made feasible through the use of simulators. In real-world problems, however, we are often confronted with scenarios where samples are expensive, and furthermore, rewards are sparse, often exacerbated by high dimensional state and action spaces.
21
+
22
+ One promising way to resolve this issue is via the inclusion of data generated by a previous policy or human expert when training deep RL algorithms (often referred to as offline data (Levine et al., 2020)), as evidenced theoretically (Wagenmaker & Pacchiano, 2022; Song et al., 2023) and in real-world examples by Cabi et al. (2019); Nair et al. (2020); Lu et al. (2021). This can alleviate challenges due to sample efficiency and exploration by providing the algorithm with an initial dataset to "kick-start" the learning process, either in the form of high-quality expert demonstrations, or even low-quality but high-coverage exploratory trajectories. This also provides us with an avenue to leverage large pre-collected datasets in order to learn useful policies.
23
+
24
+ Some prior work has focused on using this data through pretraining, while other approaches introduce constraints when training online to handle issues with distribution shift. However, each approach has its drawbacks, such as additional training time and hyperparameters, or limited improvement beyond the behavior policy respectively. Taking a step back, we note that standard off-policy algorithms should be able to take advantage of this offline data, and furthermore issues
25
+
26
+ with distribution shift should be alleviated in this setting, as we can explore the environment online. Thus far however, such methods have seen limited success in this problem setting. Therefore, in this work, we ask the following question: can we simply apply existing off-policy methods to leverage offline data when learning online, without offline RL pre-training or explicit imitation terms that privilege the prior offline data?
27
+
28
+ Through a set of thorough experiments on a collection of widely studied benchmarks, we show that the answer to this question is yes. However, naively applying existing online off-policy RL algorithms can result in comparatively poor performance, as we see in Figure 1 comparing 'SAC + Offline Data' with 'IQL + Finetuning'. Instead, a minimal set of key design choices must be taken into consideration to ensure their success. Concretely, we first introduce a remarkably simple approach to sampling the offline data, which we call "symmetric sampling", that performs well over a large variety of domains with no hyperparameter tuning. Then, we see that in complex settings (e.g., sparse reward, low volume of offline data, high dimensionality, etc.), it is vital that value functions are prevented from over-extrapolation. To this end, we provide a novel perspective on how Layer Normalization (Ba et al., 2016) implicitly prevents catastrophic value over-extrapolation, thereby greatly improving sample-efficiency and stability in many scenarios, while being a minimal modification to existing approaches. Then, to improve the rate at which the offline data are utilized, we incorporate and compare the latest advances in sample-efficient model-free RL, and find that large ensembles are remarkably effective across a variety of domains. Finally, we identify and provide evidence that key design choices in recent RL literature are in fact environment sensitive, showing the surprising result that environments which share similar properties in fact require entirely different choices, and recommend a workflow for practitioners to accelerate their application of our insights to new domains.
29
+
30
+ We demonstrate that our final approach, which we call RLPD (Reinforcement Learning with Prior Data) outperforms previously reported results, as we see in Figure 1, on many competitive domains, sometimes by $2.5 \times$ . Crucially, as our changes are minimal, we maintain the attractive properties of online algorithms, such as ease of implementation and computational efficiency. Furthermore, we see the generality of our approach, which achieves strong performance across a number of diverse offline datasets, from those containing limited expert demonstrations, through to data comprised of high-volume sub-optimal trajectories.
31
+
32
+ We believe that our insights are valuable to the community and practitioners. We show that online off-policy RL algorithms can be remarkably effective at learning with offline data. However, we show their reliable performance is pred
33
+
34
+ icated on several key design choices, namely the way the offline data are sampled, a crucial way of normalizing the critic update, and using large ensembles to improve sample efficiency. While the individual ingredients of RLPD are refreshingly simple modifications on existing RL components, we show that their combination delivers state-of-the-art performance on a number of popular online RL with offline data benchmarks, exceeds the performance of significantly more complex prior methods, and generalizes to a number of different types of offline data, whether it be expert demonstrations or sub-optimal trajectories. We have released RLPD here: github.com/ikostrikov/rlpd.
35
+
36
+ # 2. Related work
37
+
38
+ Offline RL pre-training. We note connections to offline RL (Ernst et al., 2005; Fujimoto et al., 2019; Levine et al., 2020); many prior works perform offline RL, followed by online fine-tuning (Hester et al., 2018; Kalashnikov et al., 2018; Nair et al., 2020; Lee et al., 2021; Kostrikov et al., 2022). Notably, Lee et al. (2021) also considers large ensembles and multiple gradient-step per timestep regimes when learning online. However, our approach uses a significantly simpler sampling mechanism with no hyperparameters and does not rely on costly offline pre-training, which introduces yet additional hyperparameters. We also emphasize that our normalized update is not an offline RL method—we do not perform any offline pre-training but run online RL from scratch with offline data included in a replay buffer.
39
+
40
+ Constraining to prior data. An alternative to the offline RL pre-training paradigm is to explicitly constrain the online agent updates such that it exhibits behavior that resembles the offline data (Levine & Koltun, 2013; Fox et al., 2016; Hester et al., 2018; Nair et al., 2018a; Rajeswaran et al., 2018; Rudner et al., 2021). Particularly relevant to our approach is work by Rajeswaran et al. (2018), which augments a policy gradient update with a weighted update that explicitly includes demonstration data. In contrast, we use a sample-efficient off-policy paradigm, and do not perform any pre-training. Also similar to our work is that by Nair et al. (2018a), who also use an off-policy algorithm with a fixed offline replay buffer. However, we do not restrict the policy using a behavior cloning term, and do not reset to demonstration states. Moreover, we note that these approaches generally require the offline data to be high quality (i.e., 'learning from demonstration data' (Asada & Hanafusa, 1979; Schaal, 1996)), while our approach is, importantly, agnostic to the quality of the data.
41
+
42
+ Unconstrained methods with prior data. Prior work has also considered ways of incorporating offline data without any constraints. Some methods focus on initializing a replay buffer with offline data (Večérík et al., 2017; Hester et al.,
43
+
44
+ 2018), while other works have utilized a balanced sampling strategy to handle online and offline data (Nair et al., 2018b; Kalashnikov et al., 2018; Hansen et al., 2022; Zhang et al., 2023). Most recently, Song et al. (2023) presented a theoretical analysis of such approaches, showing that balanced sampling is important both in theory and practice. In our experiments, we also show that balanced sampling helps online RL with offline data; however, directly using this approach on a range of benchmark tasks is insufficient, and other design decisions that we present are critical in achieving good performance across all tasks.
45
+
46
+ # 3. Preliminaries
47
+
48
+ We consider problems that can be formulated as a Markov Decision Process (MDP) (Bellman, 1957), described as a tuple $(\mathcal{S},\mathcal{A},\gamma ,p,r,d_0)$ where $\mathcal{S}$ is the state space, $\mathcal{A}$ is the action space and $\gamma \in (0,1)$ is the discount factor. The dynamics are governed by a transition function $p(s^{\prime}|s,a)$ ; there is a reward function $r(s,a)$ and initial state distribution $d_0(s)$ . The goal of RL is then to maximize the expected sum of discounted rewards: $\mathbb{E}_{\pi}[\sum_{t = 1}^{\infty}\gamma^{t}r(s_{t},a_{t})]$ .
49
+
50
+ In this work, we focus on RL while having access to offline datasets $\mathcal{D}$ (Levine et al., 2020), a collection of $(s,a,r,s^{\prime})$ tuples generated from a particular MDP. A key property of offline datasets is they usually do not provide complete state-action coverage, i.e., $\{s,a\in \mathcal{D}\}$ is a small subset of $S\times \mathcal{A}$ . Due to this lack of on-policy coverage, methods using function approximation may over-extrapolate values when learning on this data, leading to a pronounced effect on learning performance (Fujimoto et al., 2019).
51
+
52
+ # 4. Online RL with Offline Data
53
+
54
+ As outlined in Section 3, we consider the standard RL setting with the addition of a pre-collected dataset. In this work, we aim to design a general approach that is agnostic to the quality and quantity of this pre-collected data. For instance, this data could take the form of a handful of human demonstrations, or swathes of sub-optimal, exploratory data. Furthermore, we wish to make recommendations that are agnostic to the nature of the problem setting, such as whether the observations are state or pixel-based, or whether the rewards are sparse or dense.
55
+
56
+ To this end, we present an approach based on off-policy model-free RL, without pre-training or explicit constraints, which we call RLPD (Reinforcement Learning with Prior Data). As discussed in Section 4.5, we base our algorithm design on SAC (Haarnoja et al., 2018a;b), though in principle these design choices may improve other off-policy RL approaches. First, we propose a simple mechanism for incorporating the prior data. Then, we identify a pathology that exists when naively applying off-policy methods to this
57
+
58
+ ![](images/f3f47a4d9e487173b0bad1b9cfe29b531c567066817a8f3a539e4e94cc0b3521.jpg)
59
+ Figure 2. Using SAC with our symmetric sampling method can result in instabilities due to diverging Q-values; with LayerNorm in the critic this disappears, improving performance.
60
+
61
+ problem setting, and propose a simple and minimally invasive solution. After, we improve the rate the offline data are utilized by incorporating the latest approaches in sample-efficient RL. Finally, we highlight common design choices in recent deep RL that are in fact environment sensitive, and should be adjusted accordingly by practitioners.
62
+
63
+ # 4.1. Design Choice 1: A Simple and Efficient Strategy to Incorporate Offline Data
64
+
65
+ We start with a simple approach that incorporates prior data which adds no computational overhead, yet is agnostic to the nature of the offline data. We call this 'symmetric sampling', whereby for each batch we sample $50\%$ of the data from our replay buffer, and the remaining $50\%$ from the offline data buffer, resembling the scheme used by Ross & Bagnell (2012). As we will see in later sections, this sampling strategy is surprisingly effective across a variety of scenarios, and we extensively ablate various elements of this scheme (see Section 5.1). However, applying this approach to canonical off-policy methods, such as SAC (Haarnoja et al., 2018a), does not yield strong performance, as we see in Figure 1, and further design choices must be taken into consideration.
66
+
67
+ # 4.2. Design Choice 2: Layer Normalization Mitigates Catastrophic Overestimation
68
+
69
+ Standard off-policy RL algorithms query the learned Q-function for out-of-distribution (OOD) actions, which might not be defined during learning. Consequently, there can be significant overestimation of actual values due to the use of function approximation (Thrun & Schwartz, 1993). In practice, this phenomenon leads to training instabilities and possible divergence when the critic is trying the catch up with a constantly increasing value.
70
+
71
+ In particular, we find this to be the case when naively applying our symmetric sampling approach for complex tasks (see Figure 2). Critic divergence is a well-studied problem, particularly in the offline regime, where the policy cannot generate new experience. In our problem setting, however, we can sample from the environment. Therefore, instead of creating a mechanism that explicitly discourages OOD actions, which can be viewed as anti-exploration (Rezaei-far et al., 2022), we instead need to simply ensure that the
72
+
73
+ learned functions do not extrapolate in an unconstrained manner. To this end, we show that Layer Normalization (LayerNorm) (Ba et al., 2016) can bound the extrapolation of networks but, crucially, does not explicitly constrain the policy to remain close to the offline data. This in turn does not discourage the policy from exploring unknown and potentially valuable regions of the state-action space. In particular, we demonstrate that LayerNorm bounds the values and empirically prevents catastrophic value extrapolation. Concretely, consider a Q-function $Q$ parameterized by $\theta$ , $w$ , applying LayerNorm and intermediate representation $\psi_{\theta}(\cdot, \cdot)$ . For any $a$ and $s$ we can say:
74
+
75
+ $$
76
+ \begin{array}{l} \left\| Q _ {\theta , w} (s, a) \right\| = \left\| w ^ {T} \operatorname {r e l u} \left(\psi_ {\theta} (s, a)\right) \right\| \\ \leq \| w \| \| \operatorname {r e l u} (\psi_ {\theta} (s, a)) \| \leq \| w \| \| \psi (s, a) \| \\ \leq \| w \| \\ \end{array}
77
+ $$
78
+
79
+ Therefore, as a result of Layer Normalization, the Q-values are bounded by the norm of the weight layer, even for actions outside the dataset. Thus, the effect of erroneous action extrapolation is greatly mitigated, as their Q-values are unlikely to be significantly greater than those already seen in the data. Indeed, referring back to Figure 2, we see that introducing LayerNorm into the critic greatly improves performance through mitigating critic divergence.
80
+
81
+ To illustrate this, we generate a dataset with inputs $x$ distributed in a circle with radius 0.5 and labels $y = \|x\|$ . We study how a standard two-layer MLP with ReLU activations (common in deep RL) extrapolates outside of the data distribution, and the effect of adding LayerNorm. In Figure 3, the standard parameterization leads to unbounded extrapolation outside of the support, while LayerNorm bounds the values, greatly reducing the effect of uncontrolled extrapolation.
82
+
83
+ # 4.3. Design Choice 3: Sample Efficient RL
84
+
85
+ We now have an online approach leveraging offline data that also suppresses extreme value extrapolation, whilst maintaining the freedom of an unconstrained off-policy method. However, a benefit of offline and constrained approaches is that they have an explicit mechanism to efficiently incorporate prior data, such as through pre-training (Hester et al., 2018; Lee et al., 2021), or an auxiliary supervision term (Nair et al., 2018a; Rudner et al., 2021) respectively. In our case, the incorporation of prior data is implicit through the use of online Bellman backups over offline transitions. Therefore, it is imperative that these Bellman backups are performed as sample-efficiently as possible.
86
+
87
+ One way to achieve this is to increase the number of updates we perform per environment step (also referred to as update-to-data (UTD) ratio), allowing the offline data to be
88
+
89
+ ![](images/f50bfbcb90ec76ad0940d329f4f8d80bb8d282e5d55ec1445274f9f5a99a71ae.jpg)
90
+ Figure 3. We fit data (left) with a two-layer MLP without LayerNorm (center) and with LayerNorm (right). LayerNorm bounds the values and prevents catastrophic overestimation.
91
+
92
+ ![](images/f9edb0fcead3521c7eee096bf6ee2ca3727e94e927350d94f8043c603cba737d.jpg)
93
+
94
+ ![](images/2fa2ae38ce64e98ae8997d5f4ef479fb2ca97a2920787162c2e3d2acee989307.jpg)
95
+
96
+ come "backed-up" more quickly. However, as highlighted in recent literature in online RL, this can create issues in the optimization process and ironically reduce sample efficiency, due to statistical over-fitting (Li et al., 2022). To ameliorate this, prior work has suggested a number of regularization approaches, such as simple L2 normalization (Večerík et al., 2017), Dropout (Srivastava et al., 2014; Hiraoka et al., 2022) and random ensemble distillation (Chen et al., 2021). In this work, we settle on the latter approach of random ensemble distillation; we will demonstrate through ablations that this performs strongest, particularly on sparse reward tasks.
97
+
98
+ We also note that value over-fitting issues exist when performing TD-learning from images (Cetin et al., 2022). Therefore in these settings, we further include random shift augmentations (Kostrikov et al., 2021; Yarats et al., 2022).
99
+
100
+ # 4.4. Per-Environment Design Choices
101
+
102
+ Having highlighted the 3 key design choices for our approach that can be applied generally to all environments and offline datasets, we now to turn our attention to design choices that are commonly taken for granted, but can in fact be environment-sensitive. It is well documented that deep RL algorithms are sensitive to implementation details (Henderson et al., 2018; Engstrom et al., 2020; Andrychowicz et al., 2021; Furuta et al., 2021). As a result, many works in deep RL require per-environment hyperparameter tuning. Given the huge variety of tasks we consider in our experiments, we believe it is important to contribute to this discourse, and highlight that certain design choices, which are often simply inherited from previous implementations, should in fact be carefully reconsidered, and may explain why off-policy methods have not been competitive thus far on the problems we consider. We therefore take a view that, given the well-documented sensitivity of deep RL, it is important to demonstrate a critical path of design choices to consider when assessing new environments, and provide a workflow to simplify this process for practitioners.
103
+
104
+ Clipped Double Q-Learning (CDQ). Value-based methods combined with function approximation and stochastic optimization suffer from estimation uncertainty, which, in combination with the maximization objective of Q-learning, leads to value overestimation (van Hasselt et al., 2016) (as also discussed in Section 4.2). In order to mitigate this
105
+
106
+ issue, Fujimoto et al. (2018) introduce Clipped Double Q-Learning (CDQ) which involves taking a minimum of an ensemble of two Q-functions for computing TD-backups. They define the targets for updating the critics as follows:
107
+
108
+ $$
109
+ y = r (s, a) + \gamma \min _ {i = 1, 2} Q _ {\theta_ {i}} \left(s ^ {\prime}, a ^ {\prime}\right) \text {w h e r e} a ^ {\prime} \sim \pi (\cdot | s ^ {\prime}).
110
+ $$
111
+
112
+ However, this corresponds to fitting target Q-values that are 1 std. below the actual target values, and recent work (Moskovitz et al., 2021) suggests that this design choice may not be universally useful as it can be too conservative. Therefore, this is important to reconsider, especially outside of the domains for which it was originally designed, such as sparse reward tasks prevalent in our problem setting.
113
+
114
+ Maximum Entropy RL. MaxEnt RL augments the traditional return objective with an entropy term:
115
+
116
+ $$
117
+ \max _ {\pi} \mathbb {E} _ {s \sim \rho^ {\pi}, a \sim \pi} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} (r _ {t} + \alpha \mathcal {H} (\pi (a | s))) \right].
118
+ $$
119
+
120
+ This corresponds to maximizing the discounted reward and expected policy entropy at each time step. The motivation for these approaches is centered around robustness and exploration (i.e., maximize reward while behaving as randomly as possible). Approaches relying on this objective are empirically impressive (Haarnoja et al., 2018a;b; Chen et al., 2021; Hiraoka et al., 2022). We, therefore, believe this design choice is of interest in the context of online fine-tuning, where rewards are often sparse and require exploration.
121
+
122
+ Architecture. Network architecture can have a significant impact on deep RL performance, and the same architecture that can be optimal in one environment can be sub-optimal in another (Furuta et al., 2021). To simplify the search space, we consider the impact of having 2 or 3 layers in the actor and critic, which have been shown to affect performance, even on canonical tasks (Ball & Roberts, 2021).
123
+
124
+ # 4.5. RLPD: Approach Overview
125
+
126
+ Here we present pseudo-code for our approach, highlighting in Green elements that are important to our approach, and in Purple, environment-specific design choices.
127
+
128
+ The key factors of RLPD reside in lines 1 and 13 of Algorithm 1 with adopting LayerNorm, large ensembles, sample efficient learning and a symmetric sampling approach to incorporate online and offline data. For environment specific choices, we recommend the following as a starting point:
129
+
130
+ Line 3: Subset 2 critics
131
+ - Line 16: Remove entropy
132
+ - Line 1: Utilize a deeper 3 layer MLP
133
+
134
+ As a pragmatic workflow, we recommend ablating these Purple design choices first, and in the order stated above.
135
+
136
+ # Algorithm 1 Online RL with Offline Data (RLPD)
137
+
138
+ 1: Select LayerNorm, Large Ensemble Size $E$ , Gradient Steps $G$ , and architecture.
139
+ 2: Randomly initialize Critic $\theta_{i}$ (set targets $\theta_i' = \theta_i$ ) for $i = 1,2,\dots,E$ and Actor $\phi$ parameters. Select discount $\gamma$ , temperature $\alpha$ and critic EMA weight $\rho$ .
140
+ 3: Determine number of Critic targets to subset $Z \in \{1, 2\}$
141
+ 4: Initialize empty replay buffer $\mathcal{R}$
142
+ 5: Initialize buffer $\mathcal{D}$ with offline data
143
+ 6: while True do
144
+ 7: Receive initial observation state $s_0$
145
+ 8: for $t = 0$ , T do
146
+ 9: Take action $a_{t}\sim \pi_{\phi}(\cdot |s_{t})$
147
+ 0: Store transition $(s_t, a_t, r_t, s_{t+1})$ in $\mathcal{R}$
148
+ 11: for $g = 1,G$ do
149
+ 12: Sample minibatch $b_{R}$ of $\frac{N}{2}$ from $\mathcal{R}$
150
+ 13: Sample minibatch $b_{D}$ of $\frac{N}{2}$ from $\mathcal{D}$
151
+ 14: Combine $b_{R}$ and $b_{D}$ to form batch $b$ of size $N$
152
+ 15: Sample set $\mathcal{Z}$ of $Z$ indices from $\{1,2,\dots ,E\}$
153
+ 16: With $b$ , set
154
+
155
+ $$
156
+ y = r + \gamma \left(\min _ {i \in \mathcal {Z}} Q _ {\theta_ {i} ^ {\prime}} \left(s ^ {\prime}, \tilde {a} ^ {\prime}\right)\right), \quad \tilde {a} ^ {\prime} \sim \pi_ {\phi} (\cdot | s ^ {\prime})
157
+ $$
158
+
159
+ 17: Add entropy term $y = y + \gamma \alpha \log \pi_{\phi}(\tilde{a}'|s')$
160
+ 18: for $i = 1,E$ do
161
+ 19: Update $\theta_{i}$ minimizing loss:
162
+
163
+ $$
164
+ L = \frac {1}{N} \sum_ {i} (y - Q _ {\theta_ {i}} (s, a)) ^ {2}
165
+ $$
166
+
167
+ 20: end for
168
+ 21: Update target networks $\theta_{i}^{\prime}\gets \rho \theta_{i}^{\prime} + (1 - \rho)\theta_{i}$
169
+ 22: end for
170
+ 23: With $b$ , update $\phi$ maximizing objective:
171
+
172
+ $$
173
+ \frac {1}{E} \sum_ {i = 1} ^ {E} Q _ {\theta_ {i}} (s, \tilde {a}) - \alpha \log \pi_ {\phi} (\tilde {a} | s), \quad \tilde {a} \sim \pi_ {\phi} (\cdot | s)
174
+ $$
175
+
176
+ 24: end for
177
+ 25: end while
178
+
179
+ # 5. Experiments
180
+
181
+ We design our experiments to not only demonstrate the importance of our design choices, but also provide the insights that allow practitioners to quickly adapt RLPD to their problems. As such, we aim to answer the following questions:
182
+
183
+ 1. Is RLPD competitive with prior work despite using no pre-training nor having explicit constraints?
184
+ 2. Does RLPD transfer to pixel-based environments?
185
+ 3. Does LayerNorm mitigate value divergence?
186
+ 4. Does the proposed workflow around environment-specific design choices lead to reliable performance?
187
+
188
+ ![](images/46e09ca097df39c4a693f5133531709e5491e40921a24d12bb321a07faae944c.jpg)
189
+ Figure 4. RLPD exceeds prior state-of-the-art performance on a number of different popular benchmarks whilst being significantly simpler. Results are aggregated over 21 different environments (10 Seeds, 1 std. shaded). In each case, we compare to the prior best known work (IQL + Finetuning in Adroit and AntMaze, Off2On in Locomotion), and SACfD, a canonical off-policy approach using offline data.
190
+
191
+ ![](images/7db4e38c6a73fb5bb59c2a6c73eefc59650d20ea00dcfc83ec36c4e8a2e0a480.jpg)
192
+ Environment steps $(\times 10^{3})$
193
+
194
+ ![](images/68fe0e6ff6e944e2b10077d841c4f10ef730ec2af001c0f221c6a8bf823f4141.jpg)
195
+
196
+ For (1), we compare RLPD to those which have been designed to use offline data to accelerate online learning. For (2), we consider an additional suite of tasks to study RLPD's applicability to vision-based domains. Then, for (3) we perform analysis to demonstrate the importance of using LayerNorm. Lastly, for (4) we demonstrate our proposed workflow on the most challenging tasks (see Subsection 4.5).
197
+
198
+ # How does RLPD compare? We consider the following 21 tasks from established benchmarks:
199
+
200
+ - Sparse Adroit (Nair et al., 2020). These 3 dexterous manipulation tasks—pen-spinning, door-opening, ball relocation—are challenging, sparse-reward tasks. The offline data are multi-modal, with a small set of human demonstrations and a large set of trajectories from a behavior-cloned policy trained on this human data. We follow the rigorous evaluation criteria of Kostrikov et al. (2022), whereby performance is based on completion speed, rather than success rate. IQL + Finetuning represents the strongest prior work (Kostrikov et al., 2022).
201
+ - D4RL AntMaze (Fu et al., 2020). These 6 sparse reward tasks require an Ant agent to learn to walk and navigate through a maze to reach a goal. The offline data comprise only sub-optimal trajectories that can in principle be "stitched" together. Again, IQL + Fine-tuning represents the strongest prior work (Kostrikov et al., 2022).
202
+ - D4RL Locomotion (Fu et al., 2020). Lastly, we have 12 dense reward, locomotion tasks featuring offline data with varying levels of expertise. Off2On (Lee et al., 2021) has state-of-the-art performance on this suite of tasks.
203
+
204
+ For evaluation, we first include SACfD, a baseline studied in prior work (Večerík et al., 2017; Nair et al., 2020), which, similar to RLPD, is an off-policy approach that incorporates offline data during training. However, SACfD simply initializes the online replay buffer with the offline data. We implement this baseline using SAC without the additional design decisions discussed in subsection 4.5. Then, since there is no single prior method that achieves the best performance across all groups of tasks, we compare to the state-of-the-art method specific to each group (as listed above). We refer to this comparison in our plots as Prior SoTA. For all
205
+
206
+ experiments in this work, we report the mean and standard deviation across 10 seeds and aggregate the results across tasks within the three groups listed. For full detailed results broken down by task, see Appendix A, and for more environment details, see Appendix B.1.
207
+
208
+ We see that RLPD performs strongly, either matching or significantly exceeding the best known prior work on these challenging benchmarks (see Figure 4). We reiterate that we present results for RLPD and SACfD without doing any pre-training, unlike the Prior SoTA methods. So, while prior work (shown in blue) may achieve strong initial performance, the online improvement is more modest. On the other hand, our method reaches or surpasses this performance in the order of just 10k online samples. Notably, we outperform the best reported performance on the Sparse Adroit 'Door' task by $2.5 \times$ . Moreover, to our knowledge, our method is the first to effectively 'solve' all AntMaze tasks. Furthermore, we are able to do so in less than a third the time-step budget allocated to prior methods.
209
+
210
+ Does RLPD transfer to pixels? Here we consider the medium and expert locomotion tasks in V-D4RL (Lu et al., 2022), an offline dataset with only pixel observations. V-D4RL is particularly challenging as the behavior policies are state-based, which means the data is partially observable in pixel-space. This is most obvious in 'Humanoid Walk', where body parts are visually occluded, thus behavior cloning (BC) can struggle to achieve strong performance. For evaluation, as our method seeks to accelerate online learning with offline data, we focus on data-efficiency—we introduce a challenge that we call "10%DMC", which involves training policies using only $10\%$ of the total timesteps recommended by Yarats et al. (2022). As we use the medium and expert data, we include a BC baseline. To evaluate RLPD's ability to efficiently use offline data to boost online learning, we compare to a baseline approach that does not use the offline data. To isolate the effect of the utilization of offline data, we use the same architecture and policy optimizer as our method and label this baseline as Online in our plots. Then, to evaluate how this compares to the state-of-the-art sample-efficient RL method from pixels, we compare to DrQ-v2 (Yarats et al., 2022).
211
+
212
+ ![](images/3c3d5dd931d27a5c6ccb05d50fd5fd3b903bf6a7edcf675405016f61fe4e4d1b.jpg)
213
+ Figure 5. Our approach generalizes to vision-based domains, providing consistent improvements over existing approaches.
214
+
215
+ We see in Figure $5^{2}$ that RLPD provides consistent improvements over purely online approaches, and in many cases greatly improves over a BC baseline. We see through the difference in RLPD (dashed black and purple lines) and the Online baseline that RLPD effectively utilizes the offline data to bootstrap learning. This conclusion holds as we compare to the SoTA vision-based RL method (blue).
216
+
217
+ Lastly, we test increasing UTD to 10 on one of the tasks—Cheetah Run with Expert offline data. Figure 6 shows a remarkable improvement in performance when learning with the offline dataset. To our knowledge, this is the first demonstration of a high UTD approach improving model-free pixel-based continuous control.
218
+
219
+ ![](images/76cb22d4b8289db149c76028f6ce2184a833c13329d23fced00acd104a2d9dc4.jpg)
220
+ Figure 6. Increasing UTD with RLPD greatly improves sample efficiency from pixels.
221
+
222
+ # 5.1. RLPD Analysis and Ablation Study
223
+
224
+ Here, we address (3) and (4) by quantifying the effect of LayerNorm, and demonstrating the reliability of our proposed workflow (see Subsection 4.5).
225
+
226
+ Does LayerNorm mitigate value divergence? We now illustrate the importance of LayerNorm in mitigating catastrophic value divergence, and focus on tasks where overestimation is particularly prone. In Figure 7, we see LayerNorm is crucial for strong performance in the Adroit domain; excluding LayerNorm results in significantly higher variance across seeds and reduces mean performance.
227
+
228
+ To more clearly illustrate this effect, we construct a dataset of only the expert human demonstration data from the Adroit Sparse tasks (see "Expert Adroit Sparse Tasks" in Figure 7). This subset comprises just 22 of the 500 trajectories in the original dataset and is much more narrowly distributed by nature—representing a task with sparse rewards, limited demonstrations, and narrow offline data coverage—likely to exacerbate value divergence. Here we see a remarkable result: RLPD still exceeds prior work, despite significant restrictions in data. Moreover, removing LayerNorm now
229
+
230
+ ![](images/2fb0e82aa6683b4bdd671b621fe81f3282bcc76f59667e208f7b0afa6cadb4a1.jpg)
231
+ Figure 7. LayerNorm is crucial for strong performance, particularly when data are limited or narrowly distributed.
232
+
233
+ results in collapsed performance, with no progress made on any task. We further observe improvements in sample efficiency through the inclusion of LayerNorm in AntMaze and Humanoid Walk through reducing excessive extrapolation. Additional experiments and results are in Appendix A.
234
+
235
+ Design choice workflow. We now motivate our workflow in Section 4.5, demonstrating the importance of these design choices. We focus on the hardest tasks, namely 'Relocate' in Adroit Sparse, 'Large Diverse' in AntMaze, and 'Humanoid Expert' in V-D4RL, as we found these to be most sensitive. We provide full results on all tasks in Appendix A, noting that optimal decisions in the harder domains also produce optimal results in the easier domains.
236
+
237
+ ![](images/d99645aa103159917860ab9bd9a169201fa5a7ae6db3ece0c6fb297be0427569.jpg)
238
+ Figure 8. Our recommended starting design choices and workflow leads to strong performance on all tasks.
239
+
240
+ We see in Figure 8 that with the recommended environment-specific design choices provide strong performance; we see using entropy backups and smaller networks always results in worse performance. In 'AntMaze Large Diverse' however we see that with CDQ, performance deteriorates. Following our workflow, and ablating this by subsetsing 1 critic is crucial to recovering strong performance. The same applies to 'Humanoid Walk Expert', whereby we surprisingly see that CDQ is detrimental to performance, despite its popularity in recent implementations. We also show the surprising positive effect of larger ensembles in pixel-based tasks, with the standard 2 member critic ensemble performing worse than the 10 member ensemble we use by default in RLPD.
241
+
242
+ Lastly, we conduct additional ablations to understand the importance of the design choices that we propose for our method, showing that, though the individual design decisions are simple, they are vital for good performance.
243
+
244
+ Critic regularization. Here we examine the effects of critic regularization on performance. We compare 3 approaches: weight-decay $^{3}$ (Večerík et al., 2017), Dropout (Hiraoka et al., 2022) and ensembling (Chen et al., 2021). We choose a subset of the prior experiments to evaluate on from the AntMaze, Adroit, and Locomotion sections.
245
+
246
+ ![](images/78de2a4416e440b6156d9eed6b3ee428d91298ce48156e3c21cf3cd427f807ae.jpg)
247
+ Figure 9. In general, critic ensembling provides the best performance. Dropout performs worse in sparse reward tasks.
248
+
249
+ ![](images/bb59ebb678d93ce69becfeacda0e4f731f65fd735873920fa671c36752235d3b.jpg)
250
+
251
+ ![](images/c996a449ac48ef21cb6cd277bf1ec83836a20819bd94265ef061c1db7aa6116f.jpg)
252
+
253
+ In Figure 9, we see that ensembling is the strongest form of regularization. Notably, while Dropout performs well in the Locomotion domain 'walker2d-medium-v0', as affirmed by Hiraoka et al. (2022), it does not generalize to challenging sparse reward environments. We also see that weight-decay regularization is less performant in all domains.
254
+
255
+ Buffer initialization. In this section, we compare symmetric sampling with that of one which relies on initializing a replay buffer with offline data.
256
+
257
+ ![](images/dee755745e9ac223164843c6ffe9fb91dbcb19f71df4a5bd54f53217ec04ee91.jpg)
258
+ Figure 10. Symmetric sampling improves sample efficiency and reduces variance across seeds, and does not work by simply increasing the reward density in a batch.
259
+
260
+ First returning to the challenging Human Expert Demonstrations setting in Adroit, in Figure 10 we show two contrasting examples that demonstrate symmetric sampling effectively trades-off between replay and offline data. We observe that in the Pen environment, symmetric sampling clearly improves exploration by ensuring increasing reward
261
+
262
+ ![](images/e9603ccf9bad6cb07a87f9e0fb82e6af59b913755894bb3d21b7b1ea249b30e8.jpg)
263
+ Figure 11. Initializing the buffer with large amounts of data limits improvement.
264
+
265
+ density within mini-batches. In contrast, we see that although the buffer initialization approach explores just as well in the Door environment, symmetric sampling has the important effect of improving stability and decreases variance due to relying less on the higher-variance data generated by the online policy.
266
+
267
+ We now consider a situation whereby we have abundant suboptimal offline data, and see that again, our balanced sampling approach improves sample-efficiency. In Figure 11, initializing the buffer with high volumes of medium quality locomotion data gives initial improvement over online performance, but struggles asymptotically, likely due to a lack of on-policy data sampling, vital for online improvement. On the other hand, our symmetric sampling approach improves sample efficiency and matches asymptotic performance while reducing variance.
268
+
269
+ Sampling proportion sensitivity. We assess the sensitivity of our sampling approach away away from the "symmetric" ratio of $50\%$ online/offline.
270
+
271
+ ![](images/d997121315c930841dc671a8e714a4c9dbcccd95a8ec7726a71db604951f9d6a.jpg)
272
+ Figure 12. RLPD is not sensitive to replay proportion; $50\%$ offers the best compromise between variance, speed of convergence, and asymptotic performance.
273
+
274
+ ![](images/43df8a486014a75895faf00b8e5e16c2e771a63f1ea8e45b4b4a0667ac3cab1e.jpg)
275
+
276
+ ![](images/7b38a62415a8323f72628a66c252e24a5754caac52bcbec87797acc6c558933a.jpg)
277
+
278
+ As we see in Figure 12, RLPD is not very sensitive to sampling proportion. While sampling $25\%$ offline can marginally help asymptotic performance in 'walker2d-medium-v0', this comes at the expense of variance and sample efficiency in sparse reward tasks. We also affirm with our $100\%$ offline results that RLPD is not an offline method, and key to its success is how it controls for divergence without restricting exploration or behavior learning.
279
+
280
+ # 6. Conclusion
281
+
282
+ In this work, we show that off-policy approaches can be adapted to leverage offline data when training online. We see that with careful application of key design choices, RLPD can attain remarkably strong performance, and demonstrate this on a total of 30 different tasks. Concretely, we show that the unique combination of symmetric sampling, LayerNorm as a value extrapolation regularizer, and sample efficient learning is key to its success, resulting in our outperforming prior work by up to $2.5 \times$ on a large variety of competitive benchmarks. Moreover, our recommendations have negligible impact on computational efficiency compared to pure-online approaches, and are simple, allowing practi
283
+
284
+ tioners to easily incorporate the insights of this work into existing approaches. To further improve adoptability, we recommend and demonstrate a workflow for practitioners that improves performance on a wide variety of tasks, and thus demonstrate that certain canonical design choices should be reconsidered when applying off-policy methods. Finally, to facilitate future research, we have released the RLPD codebase here: github.com/ikostrikov/rlpd, which features highly optimized off-policy algorithms for proprioceptive and pixel-based tasks in a single codebase written in JAX (Bradbury et al., 2018).
285
+
286
+ # Acknowledgements
287
+
288
+ PJB is funded through the Willowgrove Foundation and the Les Woods Memorial Fund. This research was partly supported by the DARPA RACER program, ARO W911NF21-1-0097, the Office of Naval Research under N00014-21-1-2838 and N00014-19-12042. This research used the Savio computational cluster resource provided by the Berkeley Research Computing program at the University of California, Berkeley (supported by the UC Berkeley Chancellor, Vice Chancellor for Research, and Chief Information Officer).
289
+
290
+ # References
291
+
292
+ Andrychowicz, M., Raichuk, A., Stanczyk, P., Orsini, M., Girgin, S., Marinier, R., Hussenot, L., Geist, M., Pietquin, O., Michalski, M., Gelly, S., and Bachem, O. What matters for on-policy deep actor-critic methods? a largescale study. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=nIAxjsniDzg.
293
+ Asada, H. and Hanafusa, H. Playback control of force teachable robots. Transactions of the Society of Instrument and Control Engineers, 15(3):410-411, 1979. doi: 10.9746/sicetr1965.15.410.
294
+ Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization, 2016. URL https://arxiv.org/abs/1607.06450.
295
+ Ball, P. J. and Roberts, S. J. Offcon<sup>3</sup>: What is state of the art anyway?, 2021. URL https://arxiv.org/abs/2101.11331.
296
+ Bellman, R. A markovian decision process. Indiana Univ. Math. J., 6:679-684, 1957. ISSN 0022-2518.
297
+ 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.
298
+
299
+ Cabi, S., Colmenarejo, S. G., Novikov, A., Konyushkova, K., Reed, S. E., Jeong, R., Zolna, K., Aytar, Y., Budden, D., Vecerík, M., Sushkov, O. O., Barker, D., Scholz, J., Denil, M., de Freitas, N., and Wang, Z. Scaling data-driven robotics with reward sketching and batch reinforcement learning. Robotics: Science and Systems XVI, 2019.
300
+ Cetin, E., Ball, P. J., Roberts, S., and Celiktutan, O. Stabilizing off-policy deep reinforcement learning from pixels. In Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., and Sabato, S. (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pp. 2784-2810. PMLR, 17-23 Jul 2022. URL https://proceedings.mlr.press/v162/cetin22a.html.
301
+ Chen, X., Wang, C., Zhou, Z., and Ross, K. W. Randomized ensembled double q-learning: Learning fast without a model. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=AY8zfZm0tDd.
302
+ Engstrom, L., Ilyas, A., Santurkar, S., Tsipras, D., Janoos, F., Rudolph, L., and Madry, A. Implementation matters in deep rl: A case study on ppo and trpo. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=r1etN1rtPB.
303
+ Ernst, D., Geurts, P., and Wehenkel, L. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(18):503-556, 2005. URL http://jmlr.org/papers/v6/ernst05a.html.
304
+ Fox, R., Pakman, A., and Tishby, N. Taming the noise in reinforcement learning via soft updates. In 32nd Conference on Uncertainty in Artificial Intelligence (UAI), 2016.
305
+ Fu, J., Kumar, A., Nachum, O., Tucker, G., and Levine, S. D4rl: Datasets for deep data-driven reinforcement learning, 2020.
306
+ Fujimoto, S., van Hoof, H., and Meger, D. Addressing function approximation error in actor-critic methods. ArXiv, abs/1802.09477, 2018.
307
+ Fujimoto, S., Meger, D., and Precup, D. Off-policy deep reinforcement learning without exploration. In Chaudhuri, K. and Salakhutdinov, R. (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 2052-2062. PMLR, 09-15 Jun 2019. URL https://proceedings.mlr.press/v97/fujimoto19a.html.
308
+
309
+ Furuta, H., Kozuno, T., Matsushima, T., Matsuo, Y., and Gu, S. Co-adaptation of algorithmic and implementation innovations in inference-based deep reinforcement learning. In Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=vLyI_SoeAe.
310
+ Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. International Conference on Machine Learning (ICML), 2018a.
311
+ Haarnoja, T., Zhou, A., Hartikainen, K., Tucker, G., Ha, S., Tan, J., Kumar, V., Zhu, H., Gupta, A., Abbeel, P., and Levine, S. Soft actor-critic algorithms and applications, 2018b. URL https://arxiv.org/abs/1812.05905.
312
+ Hansen, N., Lin, Y., Su, H., Wang, X., Kumar, V., and Rajeswaran, A. Modem: Accelerating visual model-based reinforcement learning with demonstrations. arXiv preprint, 2022.
313
+ Henderson, P., Islam, R., Bachman, P., Pineau, J., Precup, D., and Meger, D. Deep reinforcement learning that matters. Proceedings of the AAAI Conference on Artificial Intelligence, 32(1), Apr. 2018. doi: 10.1609/aaai.v32i1.11694. URL https://ojs(aaai.org/index.php/AAAI/article/view/11694.
314
+ Hester, T., Vecerik, M., Pietquin, O., Lanctot, M., Schaul, T., Piot, B., Horgan, D., Quan, J., Sendonaris, A., Osband, I., Dulac-Arnold, G., Agapiou, J., Leibo, J., and Gruslys, A. Deep q-learning from demonstrations. Proceedings of the AAAI Conference on Artificial Intelligence, 32(1), Apr. 2018. doi: 10.1609/aaai.v32i1.11757. URL https://ojs.aaai.org/index.php/AAAI/article/view/11757.
315
+ Hiraoka, T., Imagawa, T., Hashimoto, T., Onishi, T., and Tsuruoka, Y. Dropout q-functions for doubly efficient reinforcement learning. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=xCVJMsPv3RT.
316
+ Kalashnikov, D., Irpan, A., Pastor, P., Ibarz, J., Herzog, A., Jang, E., Quillen, D., Holly, E., Kalakrishnan, M., Vanhoucke, V., and Levine, S. Scalable deep reinforcement learning for vision-based robotic manipulation. In Billard, A., Dragan, A., Peters, J., and Morimoto, J. (eds.), Proceedings of The 2nd Conference on Robot Learning, volume 87 of Proceedings of Machine Learning Research, pp. 651-673. PMLR, 29-31 Oct 2018. URL https://proceedings.mlr.press/v87/ kalashnikov18a.html.
317
+
318
+ Kostrikov, I., Yarats, D., and Fergus, R. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=GY6-6sTvGaf.
319
+ Kostrikov, I., Nair, A., and Levine, S. Offline reinforcement learning with implicit q-learning. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=68n2s9ZJWF8.
320
+ Lee, S., Seo, Y., Lee, K., Abbeel, P., and Shin, J. Offlineto-online reinforcement learning via balanced replay and pessimistic q-ensemble. In 5th Annual Conference on Robot Learning, 2021. URL https://openreview.net/forum?id=AlJXhEI6J5W.
321
+ Levine, S. and Koltun, V. Guided policy search. In Das-gupta, S. and McAllester, D. (eds.), Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pp. 1-9, Atlanta, Georgia, USA, 17-19 Jun 2013. PMLR. URL https://proceedings.mlr.press/v28/levine13.html.
322
+ Levine, S., Kumar, A., Tucker, G., and Fu, J. Offline reinforcement learning: Tutorial, review, and perspectives on open problems, 2020. URL https://arxiv.org/abs/2005.01643.
323
+ Li, Q., Kumar, A., Kostrikov, I., and Levine, S. Efficient deep reinforcement learning requires regulating statistical overfitting. In Deep Reinforcement Learning Workshop NeurIPS 2022, 2022. URL https://openreview.net/forum?id=Jwfa-oyQduy.
324
+ Lu, C., Ball, P. J., Rudner, T. G. J., Parker-Holder, J., Osborne, M. A., and Teh, Y. W. Challenges and opportunities in offline reinforcement learning from visual observations. In Workshop on Learning from Diverse, Offline Data, 2022. URL https://openreview.net/forum?id=bPOBIKaqLba.
325
+ Lu, Y., Hausman, K., Chebotar, Y., Yan, M., Jang, E., Herzog, A., Xiao, T., Irpan, A., Khansari, M., Kalashnikov, D., and Levine, S. Aw-opt: Learning robotic skills with imitation and reinforcement at scale. In 5th Annual Conference on Robot Learning, 2021.
326
+ Mirhoseini, A., Goldie, A., Yazgan, M., Jiang, J. W., Songhori, E. M., Wang, S., Lee, Y.-J., Johnson, E., Pathak, O., Nazi, A., Pak, J., Tong, A., Srinivasa, K., Hang, W., Tuncer, E., Le, Q. V., Laudon, J., Ho, R., Carpenter, R., and Dean, J. A graph placement methodology for fast chip design. Nature, 594 7862:207-212, 2021.
327
+
328
+ Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., King, H., Kumaran, D., Wierstra, D., Legg, S., and Hassabis, D. Human-level control through deep reinforcement learning. Nature, 518 (7540):529-533, February 2015. ISSN 00280836. URL http://dx.doi.org/10.1038/nature14236.
329
+ Moskovitz, T., Parker-Holder, J., Pacchiano, A., Arbel, M., and Jordan, M. Tactical optimism and pessimism for deep reinforcement learning. In Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 12849-12863. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper/2021/file/6abcc8f24321d1eb8c95855eab78ee95-Paper.pdf.
330
+ Nair, A., McGrew, B., Andrychowicz, M., Zaremba, W., and Abbeel, P. Overcoming exploration in reinforcement learning with demonstrations. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 6292-6299. IEEE Press, 2018a. doi: 10.1109/ICRA.2018.8463162. URL https://doi.org/10.1109/ICRA.2018.8463162.
331
+ Nair, A., McGrew, B., Andrychowicz, M., Zaremba, W., and Abbeel, P. Overcoming exploration in reinforcement learning with demonstrations. In 2018 IEEE international conference on robotics and automation (ICRA), pp. 6292-6299. IEEE, 2018b.
332
+ Nair, A., Gupta, A., Dalal, M., and Levine, S. AWAC: Accelerating online reinforcement learning with offline datasets. arXiv, June 2020.
333
+ Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Gray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P., Leike, J., and Lowe, R. Training language models to follow instructions with human feedback. In Oh, A. H., Agarwal, A., Belgrave, D., and Cho, K. (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=TG8KACxEON.
334
+ Rajeswaran, A., Kumar, V., Gupta, A., Vezzani, G., Schulman, J., Todorov, E., and Levine, S. Learning Complex Dexterous Manipulation with Deep Reinforcement Learning and Demonstrations. In Proceedings of Robotics: Science and Systems (RSS), 2018.
335
+ RezaEIFar, S., Dadashi, R., Vieillard, N., Hussenot, L., Bachem, O., Pietquin, O., and Geist, M. Offline reinforcement learning as anti-exploration. Proceedings
336
+
337
+ of the AAAI Conference on Artificial Intelligence, 36 (7):8106-8114, Jun. 2022. doi: 10.1609/aaai.v36i7.20783. URL https://ojs.aaai.org/index.php/AAAI/article/view/20783.
338
+ Ross, S. and Bagnell, J. A. Agnostic system identification for model-based reinforcement learning. In Proceedings of the 29th International Coference on International Conference on Machine Learning, ICML'12, pp. 1905-1912, Madison, WI, USA, 2012. Omnipress. ISBN 9781450312851.
339
+ Rudner, T. G. J., Lu, C., Osborne, M., Gal, Y., and Teh, Y. W. On pathologies in KL-regularized reinforcement learning from expert demonstrations. In Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=sS8rRmgAatA.
340
+ Schaal, S. Learning from demonstration. In Mozer, M., Jordan, M., and Petsche, T. (eds.), Advances in Neural Information Processing Systems, volume 9. MIT Press, 1996. URL https://proceedings.neurips.cc/paper/1996/file/68d13cf26c4b4f4f932e3eff990093ba-Paper.pdf.
341
+ Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L., van den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., Dieleman, S., Grewe, D., Nham, J., Kalchbrenner, N., Sutskever, I., Lillicrap, T., Leach, M., Kavukcuoglu, K., Graepel, T., and Hassabis, D. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484-489, January 2016. doi: 10.1038/nature16961.
342
+ Song, Y., Zhou, Y., Sekhari, A., Bagnell, D., Krishnamurthy, A., and Sun, W. Hybrid RL: Using both offline and online data can make RL efficient. In International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=yyBis80iUuU.
343
+ Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(56):1929-1958, 2014. URL http://jmlr.org/papers/v15/srivastava14a.html.
344
+ Thrun, S. and Schwartz, A. Issues in using function approximation for reinforcement learning. In Proceedings of 4th Connectionist Models Summer School. Erlbaum Associates, June 1993.
345
+ van Hasselt, H., Guez, A., and Silver, D. Deep reinforcement learning with double q-learning. Proceedings of the AAAI Conference on Artificial Intelligence, 30(1), Mar. 2016. doi: 10.1609/aaai.v30i1.
346
+
347
+ 10295. URL https://ojs.aaai.org/index.php/AAAI/article/view/10295.
348
+ Večerík, M., Hester, T., Scholz, J., Wang, F., Pietquin, O., Piot, B., Heess, N., Rothörl, T., Lampe, T., and Riedmiller, M. Leveraging demonstrations for deep reinforcement learning on robotics problems with sparse rewards. arXiv, July 2017.
349
+ Wagenmaker, A. and Pacchiano, A. Leveraging offline data in online reinforcement learning. arXiv preprint arXiv:2211.04974, 2022.
350
+ Yarats, D., Fergus, R., Lazaric, A., and Pinto, L. Mastering visual continuous control: Improved data-augmented reinforcement learning. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=__SJ-_yyes8.
351
+ Zhang, H., Xu, W., and Yu, H. Policy expansion for bridging offline-to-online reinforcement learning. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=-Y34L45JR6z.
352
+
353
+ # A. Detailed Experiments
354
+
355
+ # A.1. Sparse Adroit
356
+
357
+ Full Results Here we present the full results for Sparse Adroit, including LayerNorm and environment-specific design choice ablations.
358
+
359
+ ![](images/118144f82f73cedbe704ff4fcb90a2ef88e1f4dea5dad82d1fddab2756b3617c.jpg)
360
+ Figure 13. Full Adroit Results.
361
+
362
+ We see that LayerNorm greatly reduces variance on the Pen and Door environments, however slightly harms mean performance on Relocate. Taken together however, LayerNorm is still a vital ingredient for reliable performance on this domain.
363
+
364
+ # A.2.AntMaze
365
+
366
+ Full Results Here we present the full results for AntMaze, including LayerNorm and environment-specific design choice ablations.
367
+
368
+ ![](images/d3c622d5b89792d6134b2b184569f3416f7ff184607c65abefe7a91f61bab280.jpg)
369
+ Figure 14. Full AntMaze results
370
+
371
+ We see that our recommended design choices are vital for strong performance on the harder Large tasks, and furthermore see that using deeper 3-layer networks seems to help stability across all tasks. As we see, the best design choices on the Large environments are also optimal for the Umaze and Medium environments.
372
+
373
+ Gradient Steps per Environment Step Ablations We see LayerNorm is incredibly effective in a setting whereby we perform a single gradient update per time-step in Figure 15. This may be required for learning on real robots, where computational efficiency is important.
374
+
375
+ ![](images/86cfd02230de95f4d4a4fc4d0e0aee5bdb052288997d764c019a54a655b84173.jpg)
376
+
377
+ ![](images/756d0961e73936984899feb62b5ef1e5b73b180308452ceea4fda2c76ea410f6.jpg)
378
+
379
+ ![](images/4f4f0ecd9f162ffaca16cd9400165cc9dc1fc8674b6311bd2c505712932c5d3d.jpg)
380
+
381
+ ![](images/e4f3a1477b5703adf24db6f0e83355cc254689353ea0f6cef2f88d431647919c.jpg)
382
+ Environment steps $(\times 10^{3})$
383
+
384
+ ![](images/569f4f0db66e29649eaa17c6ed0f04636cb8daf1aade96c9f8dcb4c873a49765.jpg)
385
+ Figure 15. SAC with and without Layer Normalization.
386
+
387
+ ![](images/91df9f8adbdd8e0b78e677d92ca0defbc8e1d5cd86e6fdc9360825c046d56e3a.jpg)
388
+
389
+ In Figure 16, we see the impact of increasing the number of gradient steps per time-step. As we see, both sample efficiency stability improves greatly.
390
+
391
+ ![](images/5c62f3b4c96765a60b825cc01f2a1ba4bae1d2e5be04a635e6777d6c75ea968e.jpg)
392
+
393
+ ![](images/e42a423ef2eb5446739a6d8b3a35df1a803ffee01c244f2ea8eb5f1fa8c652a9.jpg)
394
+
395
+ ![](images/04023511ae711041d2373aaa57a3324716b5a1ea133d4d763eb3168de7c59681.jpg)
396
+
397
+ ![](images/75b833066ceab586b4d1a59b16f41ced5f4e85bef7bb6b30af0852e2bbf5acf9.jpg)
398
+ Figure 16. RLPD v.s. SAC + LN + Offline Data.
399
+
400
+ ![](images/8f62610396da18c145c354133a9191cc24f8eb90c5341d0c837601059b3b1657.jpg)
401
+ Environment steps $(\times 10^{3})$
402
+
403
+ ![](images/eb8a337f3761718b0a06e1237d3e15a2163258535dc67c8eb5103eeaddb15ed7.jpg)
404
+
405
+ Full IQL comparison Here we compare to IQL + Finetuning. We show pre-training gradient steps on IQL as negative indices in the x-axis. As we see in Figure 17, despite IQL learning a strong initialization, it struggles to improve beyond this. In comparison, RLPD is able to quickly match, then greatly exceed IQL.
406
+
407
+ ![](images/58174b35dd234b3fba189fc8c2bb0b017857321244c9b7d3e05318842bf858fb.jpg)
408
+
409
+ ![](images/2f6cef5dfd47486e4fd09324b047094fae23ea47772955697e87e692e8d91661.jpg)
410
+
411
+ ![](images/a53bcfcf17145c300ad80dc46485585b42d611bb61d1fb652d5d456e91fc1586.jpg)
412
+
413
+ ![](images/c95b61f667628c87e9b12891d3d9adaacfba6205baf14979b0c89f1e58fa4392.jpg)
414
+ Environment steps $(\times 10^{3})$
415
+
416
+ ![](images/4b11dda93239c19503c6d7993749a8720e2e27ee89736499d30b8a71a135cde0.jpg)
417
+ Figure 17. RLPD v.s. IQL + Finetuning. We show offline pre-training steps for IQL using negative indices.
418
+
419
+ ![](images/ef66a3085d4d91f228e003852bf00bab8ee93ea29f4b902677a27e0bee10b9c5.jpg)
420
+
421
+ # A.3. D4RL Locomotion
422
+
423
+ Full Results Here we present the full results for D4RL Locomotion, including LayerNorm and baselines. We emphasize that these tasks are not necessarily a good use case for online learning with offline datasets, as the tasks can be solved relatively quickly with purely online approaches, and there is no inherent difficulty regarding exploration.
424
+
425
+ ![](images/e3b0da3f63e814ea99f2596bb57bea70879a4eb5e04fc64d0f7bd8abb32b3148.jpg)
426
+ walker2d-random-v0
427
+
428
+ ![](images/453eb176b2d5a9ff606a68766fcc8ad14617400af239e0871ee0e967b28320d8.jpg)
429
+ walker2d-medium-replay-v0
430
+
431
+ ![](images/61b3ffca86d86a064e96d5a2440b207a54368578b11fc13181a642c0da87606b.jpg)
432
+ walker2d-medium-v0
433
+
434
+ ![](images/bf343a93195f92ac5adba30e5358a4b48b67c625276f41065ba30315ff416751.jpg)
435
+ hopper-medium-expert-v0
436
+
437
+ ![](images/fd7a092b221b113516652ea55445f714a6d78ae4adfe7face164a91c8bcce2ed.jpg)
438
+ halfcheetah-random-v0
439
+
440
+ ![](images/eeddb337f2b06ea264cdec55b99e9cc13bc5e4a11fff7ebd9a7599749d3b4dd7.jpg)
441
+ halfcheetah-medium-replay-v0
442
+
443
+ ![](images/9d015e187e0e0a7c7cdfe26254a5438724becaa53c9504c5f7001dfe58617419.jpg)
444
+
445
+ ![](images/0f013e256450d6fdb02db39f2cf62e39761cefba85a0e43d7af28cb9fd2bc514.jpg)
446
+ walker2d-medium-expert-v0
447
+
448
+ ![](images/377a70dc8adcd3a3d2fdc0aa340b461d5688bc51d9f81acc4512f8153cb39d90.jpg)
449
+ Figure 18. D4RL Ablations.
450
+
451
+ ![](images/054c351f416c678739f494ea41fb5267f31d4a1030e38cab1cf389ad917c3a1c.jpg)
452
+ Environment steps $(\times 10^{3})$
453
+
454
+ ![](images/8db5060f379dbcd6d7197234a837e5d65f97f9a85c897cc7c16e6b055e12c534.jpg)
455
+ halfcheetah-medium-v0
456
+
457
+ ![](images/7b6362bf401bf6ade6da1374a6b714831b624bd6afee9362f47615ae08db88d5.jpg)
458
+ halfcheetah-medium-expert-v0
459
+
460
+ The impact of LayerNorm is not so clear cut in Figure 18; this is to be expected as online approaches already achieve strong results in this domain. Notably, we see strong performance compared to baselines in the medium-expert domains.
461
+
462
+ ![](images/08b6a571ee062e96b95edbd5fc3fe4ff7ec5130ce911e0db2e0857f4e2eea876.jpg)
463
+ Figure 19. D4RL Ablation on Expert Data.
464
+
465
+ ![](images/cfc23709b2e92a8e1a447de7b97288e43cf340df418f6e3e75bad809abdcf66f.jpg)
466
+
467
+ ![](images/6c9b66890c7bcb764c145da32e2181be920ba70123880c0f745fe63b62217ab1.jpg)
468
+
469
+ We also test on the narrow Expert dataset, not tested by (Lee et al., 2021). In Figure 19 we see LayerNorm can marginally help both sample efficiency, and asymptotic performance.
470
+
471
+ # A.4. V-D4RL Locomotion
472
+
473
+ Full Results Here we present the full results for V-D4RL Locomotion, including LayerNorm and environment-specific design choice ablations.
474
+
475
+ ![](images/ad1552a686cc94b4a00b373bd37524967aad5451e0ba88ebed91fba8716b6f47.jpg)
476
+ Figure 20. VD4RL Ablations.
477
+
478
+ ![](images/1c7e780f7479935c171f6fc1244f5a1fc75e976afe5bc4deb3e95c75c8dbbd97.jpg)
479
+
480
+ ![](images/9f000b3fa32150d52ce3b0d4519b2d3d06a66866fbbc63e4378583a6620ebe98.jpg)
481
+
482
+ As we see, LayerNorm helps significantly in the Walker and Humanoid environments. We also see the positive impact of our recommended design choices in the complex Humanoid domain.
483
+
484
+ # B. Experimental Details
485
+
486
+ # B.1. Further Environment Details
487
+
488
+ ![](images/925cd9d548822d0a4d311447f9de9889ddb8c202a72246a48c3aa23239230fa4.jpg)
489
+ (a) The Sparse Adroit Domain. Pen, Door and Relocate tasks respectively.
490
+
491
+ ![](images/028cbaf101c1ee3501859f21b878581ce736ac6611136b2874e13c18bf6cf884.jpg)
492
+ (b) The AntMaze Domain. Umaze, Medium and Large tasks respectively.
493
+
494
+ ![](images/427b418349c32a73485f4b9564d75a277d62e8bcc0d21765ebd0d23e5f0ec692.jpg)
495
+ (c) The V-D4RL Domain. Walker Walk, Cheetah Run and Humanoid Walk respectively.
496
+ Figure 21. Visualizations of the environments we consider.
497
+
498
+ We provide further details about the key domains we evaluate on. In Figure 21 we provide visualizations of the environments.
499
+
500
+ Sparse Adroit In these tasks, reward is a binary variable that indicates whether the task has been completed successfully or not. In prior work (Nair et al., 2020; Rudner et al., 2021), it is common to see success rate used as the metric, which simply determines if the task has been completed in any time step. However Kostrikov et al. (2022) use a more challenging metric that involves speed of completion. Concretely, return is calculated as the percentage of the total timesteps in which the task is considered solved (note that there are no early terminations). For example, in the 'Pen' task, where the horizon is 100 timesteps, if a policy achieves a Normalized Score of 80, that means in 80 timesteps, the task is considered solved. This effectively means that the policy was able to solve the task in 20 timesteps. At each evaluation, we perform 100 trials.
501
+
502
+ D4RL: AntMaze In these tasks, reward is a binary variable that indicates whether the agent has reached the goal. Upon reaching the goal, the episode terminates. The normalized return is therefore the proportion of evaluation trials that were successful. We follow prior work, and perform 100 trials, and measure Normalized Return as the percentage of successful trials.
503
+
504
+ # B.2. Hyperparameters
505
+
506
+ Here we list the hyperparameters for RLPD in Table 1, and the environment-specific hyperparameters in Table 2.
507
+
508
+ Table 1. RLPD hyperparameters.
509
+
510
+ <table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Online batch size</td><td>128</td></tr><tr><td>Offline batch size</td><td>128</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Learning rate</td><td>3 × 10-4</td></tr><tr><td>Ensemble size (E)</td><td>10</td></tr><tr><td>Critic EMA weight (ρ)</td><td>0.005</td></tr><tr><td>Gradient Steps (State Based) (G or UTD)</td><td>20</td></tr><tr><td>Network Width</td><td>256 Units</td></tr><tr><td>Initial Entropy Temperature (α)</td><td>1.0</td></tr><tr><td>Target Entropy</td><td>- dim(A)/2</td></tr></table>
511
+
512
+ Pixel-Based Hyperparameters
513
+
514
+ <table><tr><td>Action repeat</td><td>2</td></tr><tr><td>Observation size</td><td>[64, 64]</td></tr><tr><td>Image shift amount</td><td>4</td></tr></table>
515
+
516
+ Table 2. Environment specific hyperparameters.
517
+
518
+ <table><tr><td>Environment</td><td>CDQ</td><td>Entropy Backups</td><td>MLP Architecture</td></tr><tr><td>Locomotion</td><td>True</td><td>True</td><td>2 Layer</td></tr><tr><td>AntMaze</td><td>False</td><td>False</td><td>3 Layer</td></tr><tr><td>Adroit</td><td>True</td><td>False</td><td>3 Layer</td></tr><tr><td>DMC (Pixels)</td><td>False</td><td>False</td><td>2 Layer</td></tr></table>
2023/Efficient Online Reinforcement Learning with Offline Data/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79b89178f5a37bddd445053d3adebeecce1c7437d5a750b15ed7b7e1b2566187
3
+ size 1097439
2023/Efficient Online Reinforcement Learning with Offline Data/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/53eceba2-1971-4ece-bad1-fc12ebe24fe3_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e5e91d7010c92c8ec2619a8a2323350699241ea73422ba478f2ff16e4b97c3c
3
+ size 824121
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/full.md ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Efficient Parametric Approximations of Neural Network Function Space Distance
2
+
3
+ Nikita Dhawan $^{12}$ Sicong Huang $^{12}$ Juhan Bae $^{12}$ Roger Grosse $^{123}$
4
+
5
+ # Abstract
6
+
7
+ It is often useful to compactly summarize important properties of model parameters and training data so that they can be used later without storing and/or iterating over the entire dataset. As a specific case, we consider estimating the Function Space Distance (FSD) over a training set, i.e. the average discrepancy between the outputs of two neural networks. We propose a Linearized Activation Function TRick (LAFTR) and derive an efficient approximation to FSD for ReLU neural networks. The key idea is to approximate the architecture as a linear network with stochastic gating. Despite requiring only one parameter per unit of the network, our approach outcompets other parametric approximations with larger memory requirements. Applied to continual learning, our parametric approximation is competitive with state-of-the-art nonparametric approximations, which require storing many training examples. Furthermore, we show its efficacy in estimating influence functions accurately and detecting unlabeled examples without expensive iterations over the entire dataset.
8
+
9
+ # 1. Introduction
10
+
11
+ As machine learning models are trained on increasingly large quantities of data or experience, it can be useful to compactly summarize information contained in a training set. In continual learning, an agent continues interacting with its environment over a long time period — longer than it is able to store explicitly. A natural goal is to avoid overwriting previously learned knowledge as it learns new tasks (Goodfellow et al., 2013) while controlling storage costs. Even in cases where it is possible to store the entire training set, a compact representation circumvents the need
12
+
13
+ <sup>1</sup>University of Toronto <sup>2</sup>Vector Institute <sup>3</sup>Anthropic. Correspondence to: Nikita Dhawan <nikita@cs.toronto.edu>.
14
+
15
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
16
+
17
+ for expensive iterative procedures over the full data.
18
+
19
+ We focus on the problem of estimating Function Space Distance (FSD) for neural networks: the amount by which the outputs of two networks differ, in expectation over the training distribution. Benjamin et al. (2018) observed that regularizing FSD over the previous task data is an effective way to prevent catastrophic forgetting. Other tasks such as influence estimation (Bae et al., 2022a), model editing (Mitchell et al., 2021), unlearning (Bourtoule et al., 2021) and second-order optimization (Amari, 1998; Bae et al., 2022b) have also been formulated in terms of FSD regularization or similar locality constraints.
20
+
21
+ Methods for summarizing the training data can be categorized as parametric or nonparametric. In the context of preventing catastrophic forgetting, parametric approaches typically store the parameters of a previously trained network, along with additional information about the importance of different directions in parameter space for preserving past knowledge. The canonical example is Elastic Weight Consolidation (Kirkpatrick et al., 2017, EWC), which uses a diagonal approximation to the Fisher information matrix. Nonparametric approaches explicitly store, in addition to network parameters, a collection (coreset) of training examples, often optimized directly to be the most important or memorable ones (Rudner et al., 2022; Pan et al., 2020; Titsias et al., 2019). Currently, the most effective approaches to prevent catastrophic forgetting are nonparametric due to the lack of sufficiently accurate parametric models. However, this advantage comes at the expense of high storage requirements.
22
+
23
+ In this paper, we formally formulate neural network FSD estimation and propose novel parametric approximations. To motivate our approach, notice that several parametric approximations, like EWC, can be interpreted as a second-order Taylor approximation to the FSD. This leads to a quadratic form involving the Fisher information matrix $\pmb{F}_{\theta}$ or some other metric matrix $G_{\theta}$ , where $\theta$ denotes the network parameters. Second-order approximations are practically useful because one can estimate $\pmb{F}_{\theta}$ or $G_{\theta}$ by sampling vectors from a distribution with these matrices as the covariance (Martens & Grosse, 2015). Then, tractable probabilistic models can be fit to these samples to approximate the
24
+
25
+ ![](images/fb6f88d1231ecf0ac4d0d2dd60f15c9407d205ea1262e51282a0af1322d2c8fb.jpg)
26
+ Figure 1. Comparison of FSD regularization on a 1-D regression task. (Left) Training sequentially on two tasks (blue yields $f_{1}$ , then yellow yields $f_{2}$ ) results in catastrophic forgetting. The LAFTR approximation more closely matches the true function $f_{2}$ than its NTK approximation does. (Right) BGLN retains performance on task 1 after training on task 2 more accurately than EWC and NTK.
27
+
28
+ ![](images/09a46550c0e0303fb731bdd93d655b5d10ebb5890f2d25591e8d3f8c34281adf.jpg)
29
+
30
+ corresponding distribution. Unfortunately, these tend to be inaccurate for continual learning compared to nonparametric approaches. We believe the culprit is the second-order Taylor approximation: we show in several examples that even the exact second-order Taylor approximation can perform poorly in terms of average classification accuracy and backward transfer in sequentially learned tasks. Since such an approximation can be interpreted as network linearization (Grosse, 2021), this finding is consistent with a recent line of results that find linearized approximations of neural networks to be an inaccurate model of their behavior (Seleznova & Kutyniok, 2022a;b; Hanin & Nica, 2019; Bai et al., 2020; Huang & Yau, 2020). In Section 2, we present this network linearization perspective of some existing approaches for regularization in function space.
31
+
32
+ Our method, based on a Linearized Activation Function TRick (LAFTR), does not make a second-order Taylor approximation in the parameter space, and hence is able to capture nonlinear interactions between parameters of the network. Specifically, it linearizes each step of the network's forward pass with respect to its inputs. In the case of ReLU networks, our approximation yields a linear network with stochastic gating, which we refer to as the Bernoulli Gated Linear Network (BGLN). We derive a stochastic and a deterministic estimate of FSD, both of which rely only on the first two moments of the data. This allows the application of our methods in different scenarios where stochasticity is or isn't desirable.
33
+
34
+ We evaluate our BGLN approximation in the contexts of continual learning and influence function estimation. Our method significantly outperforms previous parametric approximations despite being much more memory-efficient. For continual learning tasks, our method is competitive with nonparametric approaches. For influence function estimation tasks, it closely matches an oracle estimate of a network's loss after a data point is removed, but without having to iterate over the whole dataset.
35
+
36
+ The key contributions and findings of this work are:
37
+
38
+ - We introduce LAFTR, an idealized FSD approximation, which improves over parameter space linearization by capturing nonlinear interactions between weights in different layers.
39
+ - We propose the Bernoulli Gated Linear Network (BGLN), an efficient parametric FSD approximation for ReLU networks based on LAFTR which stores only aggregate statistics of the data and the activations.
40
+ - In continual learning, BGLN outcompetes state-of-the-art methods on sequential MNIST and CIFAR100 tasks, with significantly lower memory requirements than nonparametric methods.
41
+ - For influence function estimation, BGLN efficiently approximates the effect of removing a single data point without iterating over or storing the full dataset.
42
+
43
+ # 2. Background
44
+
45
+ Let $z = f(\mathbf{x}, \theta)$ denote the function computed by a neural network, which takes in inputs $\mathbf{x}$ and parameters $\theta$ . Consistent with prior works, we use FSD to refer to the expected output space distance<sup>1</sup> $\rho$ between the outputs of two neural networks (Benjamin et al., 2018; Grosse, 2021; Bae et al., 2022b) with respect to the training distribution, as defined in equation 1. When the population distribution is inaccessible, the empirical distribution is often used as a proxy:
46
+
47
+ $$
48
+ \begin{array}{l} D \left(\boldsymbol {\theta} _ {0}, \boldsymbol {\theta} _ {1}, p _ {\text {d a t a}}\right) = \mathbb {E} _ {\mathbf {x} \sim p _ {\text {d a t a}}} [ \rho (f (\mathbf {x}, \boldsymbol {\theta} _ {0}), f (\mathbf {x}, \boldsymbol {\theta} _ {1})) ] (1) \\ \approx \frac {1}{N} \sum_ {i = 1} ^ {N} \rho (f (\mathbf {x} ^ {(i)}, \boldsymbol {\theta} _ {0}), f (\mathbf {x} ^ {(i)}, \boldsymbol {\theta} _ {1})), (2) \\ \end{array}
49
+ $$
50
+
51
+ where $p_{\mathrm{data}}$ is the data-generating distribution. Constraining the FSD term has been successful in preventing catas
52
+
53
+ trophic forgetting (Benjamin et al., 2018), computing influence functions (Bae et al., 2022a), training teacher-student models (Hinton et al., 2015), and fine-tuning pre-trained networks (Jiang et al., 2019; Mitchell et al., 2021). Natural choices for $\rho$ are Euclidean distance for networks trained using mean-squared error (e.g. regression) and KL divergence for those trained with cross-entropy loss (e.g. classification).
54
+
55
+ Consider the continual learning setting as a motivating example. Common benchmarks (Normandin et al., 2021) involve sequentially learning tasks $t \in \{1, \dots, T\}$ , using loss function $\mathcal{L}$ and a penalty on the FSD between the parameters $\theta_i$ and the parameters $\{\theta_i\}$ fit to previous tasks. The penalty is computed over the previously seen data distribution $p_i$ and then scaled by a hyperparameter $\lambda_{\mathrm{FSD}}$ :
56
+
57
+ $$
58
+ \boldsymbol {\theta} _ {t} = \arg \min _ {\boldsymbol {\theta}} \mathcal {L} (\boldsymbol {\theta}) + \lambda_ {\mathrm {F S D}} \sum_ {i = 1} ^ {t - 1} D (\boldsymbol {\theta}, \boldsymbol {\theta} _ {i}, p _ {i}). \tag {3}
59
+ $$
60
+
61
+ Continuing with the notation in equation 2, one way to regularize the FSD is to store the training set and explicitly evaluate the network outputs using both $\theta_0$ and $\theta_{1}$ (perhaps on random mini-batches). However, this has the drawbacks of having to store and access the entire training set throughout training (precisely the thing continual learning research tries to avoid) and necessarily estimating FSD stochastically. Instead, we would like to compactly summarize information about the training set or distribution.
62
+
63
+ Many (but not all) practical FSD approximations are based on a second-order Taylor approximation:
64
+
65
+ $$
66
+ D \left(\boldsymbol {\theta} _ {0}, \boldsymbol {\theta} _ {1}, p _ {\text {d a t a}}\right) \approx \frac {1}{2} \left(\boldsymbol {\theta} _ {1} - \boldsymbol {\theta} _ {0}\right) ^ {\top} \boldsymbol {G} _ {\boldsymbol {\theta}} \left(\boldsymbol {\theta} _ {1} - \boldsymbol {\theta} _ {0}\right), \tag {4}
67
+ $$
68
+
69
+ where $G_{\theta} = \nabla_{\theta}^{2}D(\pmb{\theta}_{0},\pmb{\theta},p_{\mathrm{data}})$ is the corresponding Hessian. In the case where the network outputs parametrize a probability distribution and $\rho$ corresponds to KL divergence, $G_{\theta}$ reduces to the more familiar Fisher information matrix $F_{\theta} = \mathbb{E}_{\mathbf{x}\sim p_{\mathrm{data}},\mathbf{y}\sim P_{\mathbf{y}|\mathbf{x}}(\pmb{\theta})}[\nabla_{\pmb{\theta}}\log p(\mathbf{y}|\pmb{\theta},\mathbf{x})\nabla_{\pmb{\theta}}\log p(\mathbf{y}|\pmb{\theta},\mathbf{x})^{\top}]$ , where $P_{\mathbf{y}|\mathbf{x}}(\pmb{\theta})$ represents the model's predictive distribution over $\mathbf{y}$ . It is possible to sample random vectors in parameter space whose covariance is $G_{\theta}$ (Martens et al., 2012; Grosse & Martens, 2016; Grosse, 2021) and some parametric FSD approximations work by fitting simple statistical models to the resulting distribution. For instance, assuming all coordinates are independent gives a diagonal approximation (Kirkpatrick et al., 2017), and more fine-grained independence assumptions between network layers yield a Kronecker-factored approximation (Martens & Grosse, 2015; Ritter et al., 2018). In practice, instead of sampling vectors whose covariance is $G_{\theta}$ , many works use the empirical gradients during training, whose covariance is the empirical Fisher matrix. We caution the reader that the empirical Fisher matrix is less well motivated theoretically and can result in different behavior (Kunstner et al., 2019).
70
+
71
+ # 3. A Parametric Estimate with LAFTR
72
+
73
+ We introduce and apply LAFTR (Linearized Activation Function TRick) to linear ReLU networks and propose BGLN (Bernoulli Gated Linear Network) which approximates a given model architecture as a linear network with stochastic gating. While it is applicable to different architectures, we first explicitly derive our approximation for multilayer perceptrons (MLPs) with $L$ fully-connected layers and ReLU activation function $\phi$ . We also discuss its generalization to convolutional networks and empirically evaluate the same in Section 5.
74
+
75
+ For MLPs with inputs $\mathbf{x}$ drawn from $p_{\mathrm{data}}$ , layer $l$ weights and biases $(\boldsymbol{W}^{(l)}, \boldsymbol{b}^{(l)})$ , and outputs $\boldsymbol{z}$ , the computation of preactivations and activations at each layer is recursively defined as follows:
76
+
77
+ $$
78
+ \boldsymbol {s} ^ {(l)} = \boldsymbol {W} ^ {(l)} \boldsymbol {a} ^ {(l - 1)} + \boldsymbol {b} ^ {(l)}, \boldsymbol {a} ^ {(l)} = \phi (\boldsymbol {s} ^ {(l)}) \tag {5}
79
+ $$
80
+
81
+ with $\pmb{a}^{(0)} = \pmb{x}$ , and $s^{(L)} = z$ . We denote $z_0$ and $z_1$ to be samples of the output distribution obtained with parameters $\theta_0$ and $\theta_1$ , respectively.
82
+
83
+ # 3.1. Linearized Activation Function TRick
84
+
85
+ Given parameters $\theta_0$ and $\theta_{1}$ of two networks, we linearize each step of the forward pass around its value under $\theta_0$ . For an MLP that alternates between linear layers and nonlinear activation functions, the linear transformations are unmodified while the activation functions are replaced with a first-order Taylor approximation around their inputs. Hence, the network's computation becomes linear in $\mathbf{x}$ (but, importantly, remains nonlinear in $\theta$ ). Let $(W_{i}^{(l)}, b_{i}^{(l)})$ denote the weights and biases of layer $l$ in network $i$ .
86
+
87
+ $$
88
+ \boldsymbol {s} _ {0} ^ {(l)} = \boldsymbol {W} _ {0} ^ {(l)} \boldsymbol {a} _ {0} ^ {(l - 1)} + \boldsymbol {b} _ {0} ^ {(l)} \tag {6}
89
+ $$
90
+
91
+ $$
92
+ \boldsymbol {a} _ {0} ^ {(l)} = \phi \left(\boldsymbol {s} _ {0} ^ {(l)}\right) \tag {7}
93
+ $$
94
+
95
+ $$
96
+ \boldsymbol {s} _ {1} ^ {(l)} = \boldsymbol {W} _ {1} ^ {(l)} \boldsymbol {a} _ {1} ^ {(l - 1)} + \boldsymbol {b} _ {1} ^ {(l)} \tag {8}
97
+ $$
98
+
99
+ $$
100
+ \boldsymbol {a} _ {1} ^ {(l)} = \phi \left(\boldsymbol {s} _ {0} ^ {(l)}\right) + \phi^ {\prime} \left(\boldsymbol {s} _ {0} ^ {(l)}\right) \odot \left(\boldsymbol {s} _ {1} ^ {(l)} - \boldsymbol {s} _ {0} ^ {(l)}\right), \tag {9}
101
+ $$
102
+
103
+ where $\phi^{\prime}$ is the derivative of the activation function.
104
+
105
+ We define some additional notation for differences between preactivations and activations. For $\Delta \pmb{s}^{(l)} = \pmb{s}_1^{(l)} - \pmb{s}_0^{(l)}$ , $\Delta \pmb{a}^{(l)} = \pmb{a}_1^{(l)} - \pmb{a}_0^{(l)}$ , $\Delta \pmb{W}^{(l)} = \pmb{W}_1^{(l)} - \pmb{W}_0^{(l)}$ , and $\Delta \pmb{b}^{(l)} = \pmb{b}_1^{(l)} - \pmb{b}_0^{(l)}$ , we have the following formulae:
106
+
107
+ $$
108
+ \Delta \boldsymbol {s} ^ {(l)} = \Delta \boldsymbol {W} ^ {(l)} \boldsymbol {a} _ {0} ^ {(l - 1)} + \boldsymbol {W} _ {1} ^ {(l)} \Delta \boldsymbol {a} ^ {(l - 1)} + \Delta \boldsymbol {b} ^ {(l)} \tag {10}
109
+ $$
110
+
111
+ $$
112
+ \Delta \boldsymbol {a} ^ {(l)} = \phi^ {\prime} \left(\boldsymbol {s} _ {0} ^ {(l)}\right) \odot \Delta \boldsymbol {s} ^ {(l)}. \tag {11}
113
+ $$
114
+
115
+ Here, base cases are $\pmb{a}_0^{(0)} = \mathbf{x}$ and $\Delta \pmb{a}^{(0)} = 0$ . Written this way, the $\Delta$ terms at each step of computation rely linearly on corresponding terms from the immediately preceding
116
+
117
+ step, making LAFTR conducive to implementation via propagation of the base cases through the network. Observe that with $\mathbf{W}_0$ held fixed, the model parametrized using $\mathbf{W}_1$ is a linear network, i.e. the network's exact outputs are a linear function of its inputs.
118
+
119
+ There are two significant differences between LAFTR and parameter space linearization (referred to as NTK (Jacot et al., 2018) henceforth), which confer an advantage to the former. First, our linearization is with respect to inputs instead of parameters (Lee et al., 2019), hence capturing nonlinear interactions between the parameters in different layers. Second, the only computations that introduce linearization errors into our approximation are those involving activation functions; hence, our method is exact for linear networks, whereas NTK is only approximate. We note that linear networks are commonly used to model nonlinear training dynamics of neural networks (Saxe et al., 2013). Hence, we regard our weaker form of linearity as a significant advantage over Taylor approximations in parameter space. We note that LAFTR can be extended directly to other types of linear layer, such as convolution layers.
120
+
121
+ In the following two sections, we use the intuition above to motivate two probabilistic approximations which enable a memory-efficient implementation of this algorithm. One is to approximate preactivation signs and the other is for the input data distribution.
122
+
123
+ # 3.2. Bernoulli Gating
124
+
125
+ In the specific case of ReLU networks, observe that LAFTR depends on the training data only through the signs of preactivations, which we denote as a mask $\mathbf{m} = \mathbb{1}\{s > 0\}$ , since $\phi(s) = \mathbf{m} \odot s$ and $\phi'(s) \odot \Delta s = \mathbf{m} \odot \Delta s$ . Here, $\phi'$ is the derivative of the ReLU function, given by $\phi'(s) = \mathbb{1}\{s > 0\}$ . We approximate $\mathbf{m}$ as a vector of independent Bernoulli random variables and fit its mean vector $\pmb{\mu}$ using maximum likelihood estimation (i.e., computing the fraction of times the unit is activated). We can accordingly rewrite equations 7 and 11 as $a_0^{(l)} = \mathbf{m}^{(l)} \odot s_0^{(l)}$ and $\Delta a^{(l)} = \mathbf{m}^{(l)} \odot \Delta s^{(l)}$ , respectively, where $\odot$ denotes element-wise multiplication and $\mathbf{m}^{(l)} \sim \text{Ber}(\pmb{\mu}^{(l)})$ . For efficiency, we compute the activation statistics over the last epoch of training. We call this approximation the Bernoulli Gated Linear Network (BGLN).
126
+
127
+ Note that this gating technique is not specific only to MLPs. It can be implemented in ReLU convolutional networks by replacing activations with Bernoulli random variables.
128
+
129
+ # 3.3. Propagating Moments of the Activations
130
+
131
+ A key insight enabling efficient computation is that when the output distance $\rho$ is chosen to be (squared) Euclidean distance, the FSD depends only on the first and second
132
+
133
+ moments of the output difference $\Delta z\coloneqq z_1 - z_0$ ..
134
+
135
+ $$
136
+ \mathbb {E} \left[ \frac {1}{2} \| \Delta \boldsymbol {z} \| ^ {2} \right] = \frac {1}{2} \| \mathbb {E} [ \Delta \boldsymbol {z} ] \| ^ {2} + \frac {1}{2} t r (\operatorname {C o v} (\Delta \boldsymbol {z})). \tag {12}
137
+ $$
138
+
139
+ We compute these terms recursively by propagating the first two moments of $\pmb{a}_0^{(l)}$ and $\Delta \pmb{a}^{(l)}$ through the network. Using equations 10 and 11, we obtain the following equations for the first moments (see Appendix B for analogous equations for second moments):
140
+
141
+ $$
142
+ \mathbb {E} \left[ \boldsymbol {s} _ {0} ^ {(l)} \right] = \boldsymbol {W} _ {0} ^ {(l)} \mathbb {E} \left[ \boldsymbol {a} _ {0} ^ {(l - 1)} \right] + \boldsymbol {b} _ {0} ^ {(l)}
143
+ $$
144
+
145
+ $$
146
+ \mathbb {E} \left[ \boldsymbol {a} _ {0} ^ {(l)} \right] = \boldsymbol {\mu} ^ {(l)} \odot \mathbb {E} \left[ \boldsymbol {s} _ {0} ^ {(l)} \right]
147
+ $$
148
+
149
+ $$
150
+ \mathbb {E} [ \Delta \boldsymbol {s} ^ {(l)} ] = \Delta \boldsymbol {W} ^ {(l)} \mathbb {E} [ \boldsymbol {a} _ {0} ^ {(l - 1)} ] + \boldsymbol {W} _ {1} ^ {(l)} \mathbb {E} [ \Delta \boldsymbol {a} ^ {(l - 1)} ] + \Delta \boldsymbol {b} ^ {(l)}
151
+ $$
152
+
153
+ $$
154
+ \mathbb {E} \left[ \Delta \boldsymbol {a} ^ {(l)} \right] = \boldsymbol {\mu} ^ {(l)} \odot \mathbb {E} \left[ \Delta \boldsymbol {s} ^ {(l)} \right]
155
+ $$
156
+
157
+ Hence, LAFTR-based FSD approximation depends only on the first two moments of the data. This view leads to two insights: (1) we can store the first two moments of the data instead of a coreset and compute a deterministic FSD estimate and (2) we can approximate the data distribution as a multivariate Gaussian parameterized by its moments and compute an unbiased stochastic estimate of the LAFTR-based FSD by sampling from it.
158
+
159
+ # 3.4. BGLN-D and BGLN-S
160
+
161
+ The most straightforward way to use the BGLN approximation is to draw Monte Carlo samples of the random variables. When only the first and second moments matter, we are free to assume Gaussianity of the inputs. We denote this method BGLN-S (S for "stochastic"). This is sufficient in situations where FSD is used as a regularization term in stochastic gradient-based optimization (as we do in our continual learning experiments). In other situations, it is advantageous to have a deterministic computation; for instance, optimization with nonlinear conjugate gradient requires a deterministic objective. In the case of Euclidean distance as the output space metric, we can exactly compute the BGLN approximation by propagating the first and second moments of all random variables through the forward pass, as described in Section 3.3. We call this deterministic estimator BGLN-D. BGLN-S is outlined in Algorithm 1 and BGLN-D in Algorithm 2. We describe the analogous BGLN-S computations for convolutional networks in Appendix C.
162
+
163
+ We present the above algorithms such that they depend on storing the mean and covariance of the data. Note that storing moments of the data requires less memory than storing sufficient subsets of the data itself in several practical settings demonstrated in Table 4. We can further reduce the memory requirement by approximating the covariance matrix as a diagonal matrix, i.e., using only the variance of each dimension of the inputs. This is equivalent in cost to storing two data points per task. We empirically investigate
164
+
165
+ Algorithm 1 A stochastic version of BGLN (BGLN-S)
166
+ Require: $\mathbb{E}[\mathbf{x}]$ , $\operatorname{Cov}(\mathbf{x})$ , $\{\boldsymbol{W}, \boldsymbol{b}\}_{1}^{L}$ , $\{\boldsymbol{\mu}\}_{1}^{L-1}$
167
+ 1: $\mathbb{E}[a_0], \mathbb{E}[a_1] \gets \mathbb{E}[\mathbf{x}]$
168
+ 2: $\operatorname{Cov}(a_0)$ , $\operatorname{Cov}(a_1) \gets \operatorname{Cov}(\mathbf{x})$
169
+ 3: $a_0, a_1 \sim \mathcal{N}(\mathbb{E}[a_0], \operatorname{Cov}(a_0))$ {sample inputs}
170
+ 4: $\Delta a \gets 0$
171
+ 5: for $l \gets 1$ to $L-1$ do
172
+ 6: $\mathbf{m} \sim \text{Ber}(\boldsymbol{\mu}^{(l)})$ {sample Bernoullis}
173
+ 7: $s_0 \gets W_0^{(l)}a_0 + b_0^{(l)}$
174
+ 8: $\Delta s \gets \Delta W^{(l)}a_0 + W_1^{(l)}\Delta a + \Delta b^{(l)}$
175
+ 9: $a_0 \gets \mathbf{m} \odot s_0$ {stochastic gating}
176
+ 10: $\Delta a \gets \mathbf{m} \odot \Delta s$
177
+ 11: $s_1 \gets W_1^{(l)}a_1 + b_1$
178
+ 12: $a_1 \gets a_0 + \Delta a$ {linearized activations}
179
+ 13: end for
180
+ 14: $\Delta z \gets \Delta W^{(L)}a_0 + W_1^{(L)}\Delta a + \Delta b^{(L)}$
181
+ 15: return $\frac{1}{2}||\Delta z||^2$
182
+
183
+ the effect of this approximation on continual learning benchmarks. Furthermore, capturing the expected FSD over the training distribution in a single term, via a single forward pass, is far less computationally expensive than iterative alternatives.
184
+
185
+ # 3.5. Class-conditional Estimates
186
+
187
+ In the classification setting, it is also possible to extend BGLN to a more fine-grained, class-conditional approximation. In particular, we can fit a mixture model for our probabilistic approximations, with one component per class. In this case, each class has its own associated input moments and Bernoulli mean parameters. The lower memory cost of our method allows for this when number of classes is not too large. We refer to this variant as BGLN-CW. As expected, it boosts performance in our continual learning experiments at the expense of a slightly higher memory requirement, as shown in Tables 1, 2 and 3.
188
+
189
+ # 4. Related Works
190
+
191
+ Several works (Benjamin et al., 2018; Bernstein et al., 2020; Bae et al., 2022b) have highlighted the importance of measuring meaningful distances between neural networks. Benjamin et al. (2018) contrast training dynamics in parameter space and function space and observe that function space distances are often more useful than, and not always correlated with, parameter space distances. Bae et al. (2022b) propose an Amortized Proximal Optimization (APO) scheme that regularizes an FSD estimate to the previous iterate for second-order optimization. Natural gradient descent (Amari et al., 1995; Amari, 1998) can also be interpreted as a steepest descent method, using a second-order Taylor approxima
192
+
193
+ tion to the FSD (Pascanu & Bengio, 2014).
194
+
195
+ Parisi et al. (2019); De Lange et al. (2021); Ramasesh et al. (2020); Normandin et al. (2021) have reviewed and surveyed the challenge of catastrophic forgetting in continual learning, along with benchmarks and metrics to evaluate different methods. Parametric methods focus on different approximations to the weight space metric matrix, like diagonal (Kirkpatrick et al., 2017, EWC) or Kronecker-factored (Ritter et al., 2018, OSLA). As described in Section 2, we interpret these as second-order Taylor approximations to the FSD with further structured approximations to the Hessian. Several methods are motivated as approximations to a posterior Gaussian distribution in a Bayesian setting (Ebrahimi et al., 2019), for instance through a variational lower bound (Nguyen et al., 2017) or via Gaussian process inducing points (Kapoor et al., 2021). Non-parametric methods (Kapoor et al., 2021; Titsias et al., 2019; Pan et al., 2020; Rudner et al., 2022; Kirichenko et al., 2021) usually employ some form of experience replay of stored or optimized data points. Some of these methods (Pan et al., 2020) can also be related to the Neural Tangent Kernel (Jacot et al., 2018, NTK), or in other words, network linearization. Doan et al. (2021) directly study forgetting in continual learning in the infinite width NTK regime. Mirzadeh et al. (2022) further study the impact of network widths on forgetting.
196
+
197
+ In this paper, we also examine influence functions (Cook, 1979; Hampel, 1974) which is another application that involves the FSD between networks. Influence functions are a classical robust statistics technique that has since been used in machine learning (Koh & Liang, 2017). Bae et al. (2022a) formally study influence functions in neural networks and show that they approximate an objective called the proximal Bregman response function (PBRF). This approximation depends on a FSD term that is typically computed by iterating through the full training dataset.
198
+
199
+ # 5. Experiments
200
+
201
+ We empirically assess the effectiveness of LAFTR (our idealized method) and the BGLN (our practical algorithm) in approximating FSD as well as their usefulness for downstream tasks: continual learning and influence function estimation. The experiments investigate the following questions:
202
+
203
+ - Can LAFTR outperform NTK in approximating FSD?
204
+ - Does LAFTR improve performance and memory cost on continual learning benchmarks relative to existing methods?
205
+ - How do choice of output space metric $\rho$ , or the use of the Gaussian input and the Bernoulli activation approximations, impact empirical performance?
206
+ - Can the BGLN perform competitively with iteration-based influence function estimators without requiring
207
+
208
+ <table><tr><td>Method</td><td>Split MNIST</td><td>Permuted MNIST</td></tr><tr><td colspan="3">Nonparametric</td></tr><tr><td>VCL (coreset)</td><td>98.40</td><td>95.50</td></tr><tr><td>VAR-GP (coreset)</td><td>90.57 ± 1.06</td><td>97.20 ± 0.08</td></tr><tr><td>FROMP (coreset)</td><td>99.00 ± 0.04</td><td>94.90 ± 0.04</td></tr><tr><td>S-FSVI (coreset)</td><td>99.54 ± 0.04</td><td>95.76 ± 0.02</td></tr><tr><td>NTK (coreset)</td><td>99.50 ± 0.09</td><td>96.46 ± 0.11</td></tr><tr><td>BGLN-S (coreset)</td><td>99.50 ± 0.03</td><td>96.36 ± 0.13</td></tr><tr><td colspan="3">Parametric</td></tr><tr><td>EWC</td><td>63.10</td><td>84.00</td></tr><tr><td>OSLA</td><td>80.56</td><td>95.73</td></tr><tr><td>VCL</td><td>97.00</td><td>87.50 ± 0.61</td></tr><tr><td>BGLN-D</td><td>99.72 ± 0.03</td><td>96.03 ± 0.20</td></tr><tr><td>BGLN-D-CW</td><td>99.78 ± 0.02</td><td>96.85 ± 0.02</td></tr><tr><td>BGLN-S</td><td>99.64 ± 0.04</td><td>96.36 ± 0.12</td></tr><tr><td>BGLN-S-CW</td><td>99.77 ± 0.05</td><td>96.99 ± 0.07</td></tr><tr><td>BGLN-D-Var</td><td>99.64 ± 0.04</td><td>94.98 ± 0.18</td></tr><tr><td>BGLN-S-Var</td><td>99.50 ± 0.03</td><td>96.36 ± 0.13</td></tr></table>
209
+
210
+ Table 1. Average accuracies of nonparametric and parametric approaches on Split and Permuted MNIST datasets.
211
+
212
+ <table><tr><td>Method</td><td>Split MNIST</td><td>Permuted MNIST</td></tr><tr><td>FROMP</td><td>-0.50 ± 0.20</td><td>-1.00 ± 0.10</td></tr><tr><td>S-FSVI</td><td>-0.21 ± 0.06</td><td>-0.65 ± 0.21</td></tr><tr><td>BGLN-S</td><td>-0.04 ± 0.03</td><td>-0.41 ± 0.08</td></tr><tr><td>BGLN-D</td><td>-0.09 ± 0.04</td><td>-0.56 ± 0.04</td></tr><tr><td>BGLN-S-CW</td><td>-0.18 ± 0.06</td><td>-0.37 ± 0.14</td></tr><tr><td>BGLN-D-CW</td><td>-0.07 ± 0.07</td><td>-1.17 ± 0.07</td></tr></table>
213
+
214
+ Table 2. Backward transfer on Split and Permuted MNIST. Higher is better.
215
+
216
+ iteration over the dataset?
217
+
218
+ # 5.1. Comparing FSD Estimators
219
+
220
+ To conduct further empirical analysis of our methods' estimation and minimization of the true (empirical) FSD, we use tasks and models from standard continual learning settings which are prone to forgetting. These include Split MNIST, Permuted MNIST and Split CIFAR100 (Pan et al., 2020; Rudner et al., 2022). In addition to directly evaluating the continual learning performance, we also use a collection of networks trained in the course of this experiment (with varying hyperparameter settings) to directly evaluate the accuracy of the FSD estimates. Specifically, we vary the learning rate and the number of training iterations, and consider the set of trained networks that result; on each pair of these networks, we compare the FSD estimates against the true empirical FSD computed using the full training set.
221
+
222
+ Figure 2 (Left) shows that BGLN-S and BGLN-D consistently estimate the true FSD more accurately than NTK. Analogous analysis using CIFAR100 shows a similar trend in Figure 4. We can also measure how the true FSD changes when different FSD estimates are optimized during training, as in Figure 2 (Middle), where BGLN methods more effec
223
+
224
+ tively minimize true FSD as new task accuracy increases. Finally, we train networks of varying depths on CIFAR100 tasks and measure correlation (Spearman rank-order (Spearman, 1961) and Kendall's Tau (Kendall, 1938)) with true FSD. Figure 2 (Right) shows that LAFTR has a higher correlation using both metrics, and its advantage over NTK increases with network depth, and hence with a number of nonlinear interactions between parameters. This corroborates our intuition that LAFTR captures nonlinearities that NTK is unable to account for.
225
+
226
+ # 5.2. Continual Learning
227
+
228
+ Recall the formulation of continual learning in terms of FSD, as described in equation 3. We visualize our method's comparative performance on 1-D regression with two sequential tasks shown in Figure 1. More realistically, we test our methods on standard benchmarks used in prior works (Pan et al., 2020; Rudner et al., 2022), with standard architectures for a fair comparison. See Appendix E.2 for details on the datasets, architectures, and hyperparameters. We evaluate average final accuracy across tasks, backward transfer (Lopez-Paz & Ranzato, 2017) and memory cost.
229
+
230
+ Toy Regression. Figure 1 shows the functions learned by different methods when sequentially trained on two one-dimensional regression tasks. LAFTR gives a better approximation of the learned function than NTK. When used to regularize the network, BGLN retains good predictions on both tasks, while EWC and exact parameter space linearization (NTK) suffer catastrophic forgetting. We hypothesize that this difference in performance is due to important nonlinearities between network parameters that EWC and NTK approximations are unable to capture.
231
+
232
+ Split and Permuted MNIST. As shown in Tables 1 and 2, our LAFTR-based methods outperform other parametric methods (EWC, OSLA, and VCL) on Split and Permuted MNIST tasks and are competitive with the state-of-the-art (SOTA) nonparametric methods, in terms of average accuracy. Class-conditional approximations further boost performance and the diagonal approximation to input covariance (BGLN-S-Var, BGLN-D-Var) does not harm it significantly. With respect to the backward transfer, a more direct measure of forgetting, BGLN methods significantly outperform the SOTA. Finally, they are also amenable to successful adaptation to the nonparametric setting when a coreset is available for use in place of Gaussian samples.
233
+
234
+ Split CIFAR100. We consider the much more challenging Split CIFAR100 task to compare our method to existing approaches and tease apart the effects of our algorithmic choices and approximations. Table 3 summarizes these results and analytically compares the memory costs associated with each method (see Appendix E.1 for details). Coreset refers to a coreset of real inputs vs. Gaussian samples,
235
+
236
+ Efficient Parametric Approximations of Neural Network FSD
237
+
238
+ <table><tr><td>Method</td><td>ρ</td><td>Coreset</td><td>Bernoulli</td><td>CW</td><td>Average Accuracy ↑</td><td>Backward Transfer ↑</td><td>Memory Cost</td></tr><tr><td colspan="8">Nonparametric</td></tr><tr><td>VCL (coreset)</td><td></td><td>-</td><td></td><td></td><td>67.40 ± 0.60</td><td>-</td><td>2P + Nd</td></tr><tr><td>VAR-GP (coreset)</td><td></td><td>-</td><td></td><td></td><td>-</td><td>-</td><td>2P + Nd + C2N2</td></tr><tr><td>FROMP (coreset)</td><td></td><td>-</td><td></td><td></td><td>76.20 ± 0.20</td><td>-2.60 ± 0.90</td><td>2P + Nd + C2N2</td></tr><tr><td>S-FSVI (coreset)</td><td></td><td>-</td><td></td><td></td><td>77.60 ± 0.20</td><td>-2.50 ± 0.20</td><td>2P + Nd + C2N2</td></tr><tr><td>NTK (coreset)</td><td>KL</td><td></td><td>-</td><td></td><td>77.61 ± 0.20</td><td>-2.03 ± 0.04</td><td>2P + Nd</td></tr><tr><td>LAFTR (coreset)</td><td>KL</td><td>✓</td><td>X</td><td>X</td><td>78.33 ± 0.01</td><td>-0.73 ± 0.10</td><td>P + Nd</td></tr><tr><td>BGLN-S (coreset)</td><td>KL</td><td>✓</td><td>✓</td><td>X</td><td>73.27 ± 0.01</td><td>-4.99 ± 0.28</td><td>P + A + Nd</td></tr><tr><td>LAFTR (coreset)</td><td>Euclidean</td><td>✓</td><td>X</td><td>X</td><td>76.22 ± 0.01</td><td>-2.64 ± 0.40</td><td>P + Nd</td></tr><tr><td colspan="8">Parametric</td></tr><tr><td>EWC</td><td></td><td>-</td><td></td><td></td><td>71.60 ± 0.40</td><td>-</td><td>2P</td></tr><tr><td>OSLA</td><td></td><td>-</td><td></td><td></td><td>72.61</td><td>-</td><td>P + ∑l=1Lpl2</td></tr><tr><td>VCL</td><td></td><td>-</td><td></td><td></td><td>-</td><td>-</td><td>2P</td></tr><tr><td>LAFTR</td><td>KL</td><td>X</td><td>X</td><td>X</td><td>75.61 ± 0.01</td><td>-1.93 ± 0.59</td><td>P + d + d2</td></tr><tr><td>LAFTR-CW</td><td>KL</td><td>X</td><td>X</td><td>✓</td><td>76.22 ± 0.01</td><td>-1.45 ± 0.63</td><td>P + C(d + d2)</td></tr><tr><td>BGLN-S</td><td>KL</td><td>X</td><td>✓</td><td>X</td><td>72.37 ± 0.01</td><td>-8.20 ± 0.04</td><td>P + A + d + d2</td></tr><tr><td>BGLN-S-CW</td><td>KL</td><td>X</td><td>✓</td><td>✓</td><td>74.02 ± 0.01</td><td>-2.44 ± 0.15</td><td>P + C(A + d + d2)</td></tr><tr><td>LAFTR</td><td>Euclidean</td><td>X</td><td>X</td><td>X</td><td>75.51 ± 0.01</td><td>-3.12 ± 0.44</td><td>P + d + d2</td></tr><tr><td>BGLN-S</td><td>Euclidean</td><td>X</td><td>✓</td><td>X</td><td>74.29 ± 0.01</td><td>-5.49 ± 0.05</td><td>P + A + d + d2</td></tr><tr><td>BGLN-S-CW</td><td>Euclidean</td><td>X</td><td>✓</td><td>✓</td><td>77.78 ± 0.01</td><td>-1.75 ± 0.50</td><td>P + C(A + d + d2)</td></tr></table>
239
+
240
+ Table 3. Split CIFAR100: Average Accuracy and Backward Transfer. Notation for memory cost: $p_l = \#$ parameters in layer $l$ , $P = \#$ parameters $= \sum_{l=1}^{L} p_l$ , $A = \#$ activations $< P$ , $d =$ data dimension, $N =$ coreset size, $C = \#$ classes.
241
+
242
+ ![](images/402d2e758dfc2694721435c3c44cbf7193ac980c339c97a91e7738c2f86bc6ae.jpg)
243
+ Figure 2. Comparison of different FSD estimators. (Left) Compared to NTK, BGLN-S and BGLN-D consistently give closer FSD values to the true empirical FSD. (Middle) While training on task 2, FSD from the optimal task 1 parameters increases with task 2 accuracy. Optimizing BGLN-D and class-conditioned BGLN-D-CW effectively minimizes the true FSD. (Right) LAFTR has a higher correlation with true FSD than NTK, with a more significant advantage as network depth (and hence a number of nonlinear interactions) increases.
244
+
245
+ ![](images/fae8c32ae642b4463845b903faa919443d08eafb089c4e9fa40bbf0b923c434a.jpg)
246
+
247
+ ![](images/6055289b236377cc1a918656bf27350316870b9f77ca963472d900b0c1a49491.jpg)
248
+
249
+ Bernoulli refers to Bernoulli activations vs. simply passing preactivations through the ReLU function (termed LAFTR here) and CW refers to the class-conditional estimate. Our empirical analysis shows that given a random coreset of the same size as comparable methods, LAFTR outperforms the SOTA as well as the NTK baseline on average accuracy and backward transfer significantly. Other LAFTR and BGLN variants remain competitive with prior methods while incurring lower memory costs. We also observe that performance is hurt to some extent by the Gaussian and Bernoulli modeling assumptions, while it is improved by class-conditioning. We present a more fine-grained task-wise comparison of accuracies in Figure 5 and results on a longer task sequence in Table 10 of Appendix E.3.
250
+
251
+ Memory Gains. To demonstrate the memory gains for our LAFTR and LAFTR (coreset) methods in practical scenarios, we compute the percentage reduction in memory costs relative to those of typical nonparametric methods. Specifi-
252
+
253
+ cally, we fix the network architecture to be a convolutional network used for training Split CIFAR100, and select reasonable values of coreset size, number of classes per task and data dimension from a range encountered in practice. We then use equations in Table 3 to compute $100 \times \frac{B - L}{B}$ , where $B$ and $L$ are the memory costs of a nonparametric method and a LAFTR variant, respectively. As summarized in Table 4, the gains in memory complexity enjoyed by LAFTR methods increase as coreset size is increased, number of classes are increased or data dimension is decreased. Further results on Split CIFAR100 performance as amount of stored information (for example, coreset size) is varied are included in Appendix E.4.
254
+
255
+ # 5.3. Influence Function Estimation
256
+
257
+ To further assess BGLN's applicability to other settings involving FSD estimation and regularization, we consider influence function estimation (Cook, 1979; Hampel, 1974;
258
+
259
+ <table><tr><td>d
260
+ C</td><td>1000</td><td>2000</td><td>3000</td><td>N</td></tr><tr><td rowspan="2">10</td><td>66.27</td><td>24.08</td><td>-43.71</td><td>200</td></tr><tr><td>74.84</td><td>43.26</td><td>-7.60</td><td>250</td></tr><tr><td rowspan="2">20</td><td>87.86</td><td>72.15</td><td>46.33</td><td>200</td></tr><tr><td>91.81</td><td>81.18</td><td>63.68</td><td>250</td></tr><tr><td rowspan="2">50</td><td>97.78</td><td>94.87</td><td>90.03</td><td>200</td></tr><tr><td>98.57</td><td>96.69</td><td>93.56</td><td>250</td></tr></table>
261
+
262
+ <table><tr><td>C\d</td><td>1000</td><td>2000</td><td>3000</td><td>N</td></tr><tr><td rowspan="2">10</td><td>78.14</td><td>75.89</td><td>73.77</td><td>200</td></tr><tr><td>83.14</td><td>80.90</td><td>78.79</td><td>250</td></tr><tr><td rowspan="2">20</td><td>92.13</td><td>91.15</td><td>90.20</td><td>200</td></tr><tr><td>94.51</td><td>93.67</td><td>92.84</td><td>250</td></tr><tr><td rowspan="2">50</td><td>98.56</td><td>98.37</td><td>98.18</td><td>200</td></tr><tr><td>99.04</td><td>98.88</td><td>98.73</td><td>250</td></tr></table>
263
+
264
+ Table 4. Percentage reduction in memory cost of LAFTR (Left) and LAFTR (coreset) (Right) relative to typical nonparametric methods for a fixed network architecture and varying values of $C$ (number of classes), $d$ (data dimension) and $N$ (coreset size). Higher percentages are better. In both cases, gains in memory complexity increase as $N$ increases, $C$ increases or $d$ decreases.
265
+
266
+ <table><tr><td rowspan="2">Dataset</td><td colspan="2">EWC</td><td colspan="2">CG</td><td colspan="2">BGLN-D</td></tr><tr><td>P</td><td>S</td><td>P</td><td>S</td><td>P</td><td>S</td></tr><tr><td>Concrete</td><td>0.78</td><td>0.57</td><td>0.92</td><td>0.94</td><td>0.96</td><td>0.97</td></tr><tr><td>Energy</td><td>0.68</td><td>0.39</td><td>0.97</td><td>0.98</td><td>0.99</td><td>0.98</td></tr><tr><td>Housing</td><td>0.86</td><td>0.33</td><td>0.92</td><td>0.89</td><td>0.95</td><td>0.83</td></tr><tr><td>Kinetics</td><td>0.36</td><td>0.30</td><td>0.88</td><td>0.86</td><td>0.99</td><td>0.99</td></tr><tr><td>Wine</td><td>0.97</td><td>0.70</td><td>0.99</td><td>0.94</td><td>0.99</td><td>0.90</td></tr></table>
267
+
268
+ Table 5. Comparison of training loss differences computed by EWC, CG and BGLN-D. We show Pearson (P) and Spearman rank-order (S) correlations with the PBRF estimates.
269
+
270
+ Koh & Liang, 2017). Given parameters $\theta_0$ trained on dataset $\mathcal{D}_{\mathrm{train}}$ of size $N$ , influence functions approximate the parameters $\theta_{-}$ that would be obtained by training without a particular point $(x,y)\in \mathcal{D}_{\mathrm{train}}$ . The difference in loss between $\theta_0$ and $\theta_{-}$ is an indicator of the influence of $(x,y)$ on the trained network.
271
+
272
+ Bae et al. (2022a) show that influence functions in neural networks can be formulated as solving for the proximal Bregman response function (PBRF):
273
+
274
+ $$
275
+ \begin{array}{l} \boldsymbol {\theta} _ {-} = \underset {\boldsymbol {\theta} \in \mathbb {R} ^ {d}} {\arg \min } - \frac {1}{N} \mathcal {L} (f (\boldsymbol {x}, \boldsymbol {\theta}), \boldsymbol {y}) + D _ {B} (\boldsymbol {\theta}, \boldsymbol {\theta} _ {0}, p _ {\text {t r a i n}}) \\ + \frac {\lambda}{2} \| \boldsymbol {\theta} - \boldsymbol {\theta} _ {0} \| ^ {2}. \tag {13} \\ \end{array}
276
+ $$
277
+
278
+ Here, the first term maximizes the loss of the data point we are interested in removing. The second term is the Bregman divergence defined on network outputs and measures the FSD between $\theta$ and $\theta_0$ over training distribution $p_{\mathrm{train}}$ similar to the FSD term as defined in equation 1. For standard loss functions like squared error and cross-entropy, the Bregman divergence term is equivalent to the soft training error where the original targets are replaced with soft targets produced by $\theta_0$ . Finally, the last term is a proximity term with strength $\lambda > 0$ , which prevents large changes in weight space. Intuitively, the PBRF maximizes the loss of data we would like to remove while constraining the network in both function and weight space so that the predictions and losses of other training examples remain unaffected.
279
+
280
+ ![](images/b9e537229e6806c57ed83995f0933c3620a6391a328c92fb60f8dc69ecde3bba.jpg)
281
+ Figure 3. Effectiveness of BGLN in detecting mislabeled examples. BGLN can approximate the FSD term in the PBRF objective accurately and be used in applications involving influence functions without explicitly storing or iterating over the dataset.
282
+
283
+ Existing approaches for this optimization face two key challenges: (1) the entire training dataset must be stored and iterated over, requiring as many forward passes as there are mini-batches and (2) techniques like nonlinear Conjugate Gradient (CG) (Hager & Zhang, 2006) do not work well with the stochastic gradients produced by sampling batches of data. LAFTR enables estimating the PBRF (or FSD) by storing only the first two data moments, requires just a single forward pass to compute it and provides a deterministic function to optimize, implemented as BGLN-D.
284
+
285
+ Regression. We first train a MLP with two hidden layers and ReLU activations for 200 epochs on regression datasets from the UCI benchmark (Dua & Graff, 2017). Then, we randomly select 50 independent data points to be removed. For each removed point, we sample batches and use a Stochastic Gradient Descent (SGD) optimizer to minimize the PBRF objective and compute the difference in loss after removing that data point, commonly referred to as the self-influence score (Koh & Liang, 2017; Schioppa et al., 2022). Next, we follow the same procedure as above but approximate the FSD term in the PBRF objective with EWC, CG (Koh & Liang, 2017) and BGLN-D. Since the direct minimization of PBRF can be considered as the ground truth for influence estimation, we compare the alignment
286
+
287
+ of these methods' estimates with that of PBRF via Pearson correlation (Sedgwick, 2012) and Spearman rank-order correlation (Spearman, 1961). The results are shown in Table 5. Without having to iterate over or store the entire dataset, BGLN-D correlates with PBRF more strongly than EWC and CG (Koh & Liang, 2017), which can be seen as minimizing a linearized version of the PBRF objective.
288
+
289
+ Mislabeled Example Detection. Influence function estimators are commonly evaluated in terms of their ability to identify mislabeled examples. Intuitively, if some fraction of the training labels is corrupted, they would behave as outliers and have a more significant influence on the training loss (self-influence score). One approach to efficiently detect and correct these examples is to prioritize and examine training inputs with higher self-influence scores. Following the evaluation setup from Bae et al. (2022a), we use $10\%$ of the MNIST dataset and corrupt $10\%$ of it by assigning random labels to it. We train a two layer MLP with 1024 hidden units and ReLU activations using SGD with a batch size of 128. Then, we use EWC, CG and BGLN-D to approximate the FSD term in equation 13 and compute individual self-influence scores. We also compare these methods against a baseline of randomly sampling data points to check for corruption. The results are summarized in Figure 3. BGLN-D significantly outperforms the random baseline and EWC and closely matches the oracle PBRF and CG, while being much faster, cheaper and more memory-efficient.
290
+
291
+ # 6. Conclusions
292
+
293
+ In this work, we addressed the problem of compactly summarizing a model's predictions on a given dataset, and formulated it as approximating neural network FSD. We developed the Linearized Activation Function TRick as an improvement over network linearization in parameter space and proposed novel parametric methods, BGLN, to estimate FSD. Our methods capture nonlinearities between network parameters, are much more memory-efficient than prior works and are amenable to adaptation to the nonparametric setting when a coreset of data is available.
294
+
295
+ We empirically show that LAFTR-based estimates are highly correlated with the true FSD across several settings. In continual learning, our methods outcompete existing methods without storing any data samples. Further, in influence function estimation, they estimate influence-scores with high correlation and can efficiently detect mislabeled examples without expensive iteration over the whole dataset.
296
+
297
+ Extending the formulation of FSD approximation to other applications like model editing or unlearning are exciting research avenues. We hope that our work inspires methods to further enhance memory and computational efficiency in settings where estimating or constraining FSD is relevant.
298
+
299
+ # Acknowledgements
300
+
301
+ We would like to thank Florian Shkurti for useful discussions, Cem Anil for feedback on the draft, and Gerald Shen for assistance with the compute environment. Resources used in preparing this research were provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute (www/vectorinstitute.ai/partners).
302
+
303
+ # References
304
+
305
+ Amari, S. Natural gradient works efficiently in learning. Neural Comput., 10(2):251-276, 1998. doi: 10.1162/089976698300017746. URL https://doi.org/10.1162/089976698300017746.
306
+ Amari, S., Cichocki, A., and Yang, H. H. A new learning algorithm for blind signal separation. In Proceedings of the 8th International Conference on Neural Information Processing Systems, NIPS'95, pp. 757-763, Cambridge, MA, USA, 1995. MIT Press.
307
+ Bae, J., Ng, N., Lo, A., Ghassemi, M., and Grosse, R. B. If influence functions are the answer, then what is the question? Advances in Neural Information Processing Systems, 35:17953-17967, 2022a.
308
+ Bae, J., Vicol, P., HaoChen, J. Z., and Grosse, R. B. Amortized proximal optimization. Advances in Neural Information Processing Systems, 35:8982-8997, 2022b.
309
+ Bai, Y., Krause, B., Wang, H., Xiong, C., and Socher, R. Taylorized training: Towards better approximation of neural network training at finite width. arXiv preprint arXiv:2002.04010, 2020.
310
+ Benjamin, A. S., Rolnick, D., and Kording, K. Measuring and regularizing networks in function space. arXiv preprint arXiv:1805.08289, 2018.
311
+ Bernstein, J., Vahdat, A., Yue, Y., and Liu, M.-Y. On the distance between two neural networks and the stability of learning. Advances in Neural Information Processing Systems, 33:21370-21381, 2020.
312
+ Bourtoule, L., Chandrasekaran, V., Choquette-Choo, C. A., Jia, H., Travers, A., Zhang, B., Lie, D., and Papernot, N. Machine unlearning. In 2021 IEEE Symposium on Security and Privacy (SP), pp. 141-159. IEEE, 2021.
313
+ Cook, R. D. Influential observations in linear regression. Journal of the American Statistical Association, 74(365): 169-174, 1979.
314
+ De Lange, M., Aljundi, R., Masana, M., Parisot, S., Jia, X., Leonardis, A., Slabaugh, G., and Tuytelaars, T. A
315
+
316
+ continual learning survey: Defying forgetting in classification tasks. IEEE transactions on pattern analysis and machine intelligence, 44(7):3366-3385, 2021.
317
+ Deng, L. The mnist database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141-142, 2012.
318
+ Doan, T., Bennani, M. A., Mazoure, B., Rabusseau, G., and Alquier, P. A theoretical analysis of catastrophic forgetting through the ntk overlap matrix. In International Conference on Artificial Intelligence and Statistics, pp. 1072-1080. PMLR, 2021.
319
+ Dua, D. and Graff, C. UCI machine learning repository, 2017. URL http://archive.ics.uci.edu/ml.
320
+ Ebrahimi, S., Elhoseiny, M., Darrell, T., and Rohrbach, M. Uncertainty-guided continual learning with bayesian neural networks. arXiv preprint arXiv:1906.02425, 2019.
321
+ Goodfellow, I. J., Mirza, M., Xiao, D., Courville, A., and Bengio, Y. An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211, 2013.
322
+ Grosse, R. University of toronto CSC2541, topics in machine learning: Neural net training dynamics, chapter 4: Second-Order optimization. Lecture Notes, 2021. URL https://www.cs.toronto.edu/~rgrosse/courses/csc2541_2021/readings/L04_second_order.pdf.
323
+ Grosse, R. and Martens, J. A kronecker-factored approximate fisher matrix for convolution layers. In International Conference on Machine Learning, pp. 573-582. PMLR, 2016.
324
+ Hager, W. W. and Zhang, H. A survey of nonlinear conjugate gradient methods. Pacific journal of Optimization, 2(1): 35-58, 2006.
325
+ Hampel, F. R. The influence curve and its role in robust estimation. Journal of the American Statistical Association, 69(346):383-393, 1974. doi: 10.1080/01621459.1974.10482962. URL https://www.tandfonline.com/doi/abs/10.1080/01621459.1974.10482962.
326
+ Hanin, B. and Nica, M. Finite depth and width corrections to the neural tangent kernel. In International Conference on Learning Representations, 2019.
327
+ Hinton, G., Vinyals, O., Dean, J., et al. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2(7), 2015.
328
+
329
+ Huang, J. and Yau, H.-T. Dynamics of deep neural networks and neural tangent hierarchy. In International conference on machine learning, pp. 4542-4551. PMLR, 2020.
330
+ Jacot, A., Gabriel, F., and Hongler, C. Neural tangent kernel: Convergence and generalization in neural networks. Advances in neural information processing systems, 31, 2018.
331
+ Jiang, H., He, P., Chen, W., Liu, X., Gao, J., and Zhao, T. Smart: Robust and efficient fine-tuning for pre-trained natural language models through principled regularized optimization. arXiv preprint arXiv:1911.03437, 2019.
332
+ Kapoor, S., Karaletsos, T., and Bui, T. D. Variational autoregressive gaussian processes for continual learning. In International Conference on Machine Learning, pp. 5290-5300. PMLR, 2021.
333
+ Kendall, M. G. A new measure of rank correlation. Biometrika, 30(1/2):81-93, 1938. ISSN 00063444. URL http://www.jstor.org/stable/2332226.
334
+ Kirichenko, P., Farajtabar, M., Rao, D., Lakshminarayanan, B., Levine, N., Li, A., Hu, H., Wilson, A. G., and Pascanu, R. Task-agnostic continual learning with hybrid probabilistic models. arXiv preprint arXiv:2106.12772, 2021.
335
+ Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu, A. A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521-3526, 2017.
336
+ Koh, P. W. and Liang, P. Understanding black-box predictions via influence functions. In International conference on machine learning, pp. 1885-1894. PMLR, 2017.
337
+ Krizhevsky, A., Nair, V., and Hinton, G. CIFAR-10 (canadian institute for advanced research). a. URL http://www.cs.toronto.edu/~kriz/cifar.html.
338
+ Krizhevsky, A., Nair, V., and Hinton, G. CIFAR-100 (canadian institute for advanced research). b. URL http://www.cs.toronto.edu/~kriz/cifar.html.
339
+ Kunstner, F., Hennig, P., and Balles, L. Limitations of the empirical fisher approximation for natural gradient descent. Advances in neural information processing systems, 32, 2019.
340
+ Lee, J., Xiao, L., Schoenholz, S., Bahri, Y., Novak, R., Sohl-Dickstein, J., and Pennington, J. Wide neural networks of any depth evolve as linear models under gradient descent. Advances in neural information processing systems, 32, 2019.
341
+
342
+ Lopez-Paz, D. and Ranzato, M. Gradient episodic memory for continual learning. Advances in neural information processing systems, 30, 2017.
343
+ Martens, J. and Grosse, R. Optimizing neural networks with kronecker-factored approximate curvature. In International conference on machine learning, pp. 2408-2417. PMLR, 2015.
344
+ Martens, J., Sutskever, I., and Swersky, K. Estimating the hessian by back-propagating curvature. arXiv preprint arXiv:1206.6464, 2012.
345
+ Mirzadeh, S. I., Chaudhry, A., Yin, D., Hu, H., Pascanu, R., Gorur, D., and Farajtabar, M. Wide neural networks forget less catastrophically. In International Conference on Machine Learning, pp. 15699-15717. PMLR, 2022.
346
+ Mitchell, E., Lin, C., Bosselut, A., Finn, C., and Manning, C. D. Fast model editing at scale. arXiv preprint arXiv:2110.11309, 2021.
347
+ Nguyen, C. V., Li, Y., Bui, T. D., and Turner, R. E. Variational continual learning. arXiv preprint arXiv:1710.10628, 2017.
348
+ Normandin, F., Golemo, F., Ostapenko, O., Rodriguez, P., Riemer, M. D., Hurtado, J., Khetarpal, K., Zhao, D., Lindeborg, R., Lesort, T., et al. Sequoia: A software framework to unify continual learning research. arXiv preprint arXiv:2108.01005, 2021.
349
+ Pan, P., Swaroop, S., Immer, A., Eschenhagen, R., Turner, R., and Khan, M. E. E. Continual deep learning by functional regularisation of memorable past. Advances in Neural Information Processing Systems, 33:4453-4464, 2020.
350
+ Parisi, G. I., Kemker, R., Part, J. L., Kanan, C., and Wermter, S. Continual lifelong learning with neural networks: A review. Neural Netw., 113(C):54-71, may 2019. ISSN 0893-6080. doi: 10.1016/j.neunet.2019.01.012. URL https://doi.org/10.1016/j.neunet.2019.01.012.
351
+ Pascanu, R. and Bengio, Y. Revisiting natural gradient for deep networks. CoRR, abs/1301.3584, 2014.
352
+ Ramasesh, V. V., Dyer, E., and Raghu, M. Anatomy of catastrophic forgetting: Hidden representations and task semantics. arXiv preprint arXiv:2007.07400, 2020.
353
+ Ritter, H., Botev, A., and Barber, D. Online structured laplace approximations for overcoming catastrophic forgetting. Advances in Neural Information Processing Systems, 31, 2018.
354
+
355
+ Rudner, T. G., Smith, F. B., Feng, Q., Teh, Y. W., and Gal, Y. Continual learning via function-space variational inference.
356
+ Rudner, T. G. J., Smith, F. B., Feng, Q., Teh, Y. W., and Gal, Y. Continual Learning via Sequential Function-Space Variational Inference. In Proceedings of the 39th International Conference on Machine Learning, Proceedings of Machine Learning Research. PMLR, 2022.
357
+ Saxe, A. M., McClelland, J. L., and Ganguli, S. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
358
+ Schioppa, A., Zablotskaia, P., Vilar, D., and Sokolov, A. Scaling up influence functions. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 8179-8186, 2022.
359
+ Sedgwick, P. Pearson's correlation coefficient. Bmj, 345, 2012.
360
+ Seleznova, M. and Kutyniok, G. Analyzing finite neural networks: Can we trust neural tangent kernel theory? In Mathematical and Scientific Machine Learning, pp. 868-895. PMLR, 2022a.
361
+ Seleznova, M. and Kutyniok, G. Neural tangent kernel beyond the infinite-width limit: Effects of depth and initialization. arXiv preprint arXiv:2202.00553, 2022b.
362
+ Spearman, C. The proof and measurement of association between two things. 1961.
363
+ Titsias, M. K., Schwarz, J., Matthews, A. G. d. G., Pascanu, R., and Teh, Y. W. Functional regularisation for continual learning with gaussian processes. arXiv preprint arXiv:1901.11356, 2019.
364
+
365
+ # Appendix
366
+
367
+ # A. Notation
368
+
369
+ <table><tr><td>f</td><td>Function corresponding to a neural network</td></tr><tr><td>φ</td><td>ReLU activation function</td></tr><tr><td>φ&#x27;</td><td>Derivative of a function φ</td></tr><tr><td>sl</td><td>Preactivations at layer l</td></tr><tr><td>al = φ(sl)</td><td>Activations at layer l</td></tr><tr><td>x</td><td>Input data</td></tr><tr><td>y</td><td>Target data</td></tr><tr><td>x(i)</td><td>Input data point i</td></tr><tr><td>pdata</td><td>Data distribution from which x is sampled</td></tr><tr><td>d</td><td>Data dimension</td></tr><tr><td>N</td><td>Number of data points in a coreset</td></tr><tr><td>L</td><td>Number of layers in a network</td></tr><tr><td>C</td><td>Number of classes in a classification task</td></tr><tr><td>T</td><td>Number of tasks</td></tr><tr><td>θ</td><td>Parameters of a neural network</td></tr><tr><td>θt</td><td>Parameters obtained after training on task t</td></tr><tr><td>pl</td><td>Number of parameters in layer l</td></tr><tr><td>P</td><td>Total number of parameters in a network = ∑l=1Lpl</td></tr><tr><td>z = f(x; θ)</td><td>Prediction of the network f on x parameterized by θ</td></tr><tr><td>ρ</td><td>Output space distance, for instance Euclidean distance</td></tr><tr><td>D(θ0, θ1, pdata)</td><td>FSD between networks parameterized by θ0 and θ1 over data distribution pdata</td></tr><tr><td>Gθ</td><td>Weight space metric matrix</td></tr><tr><td>Fθ</td><td>Fisher information matrix</td></tr><tr><td>m</td><td>Mask vector or Bernoulli random variable</td></tr><tr><td>μ</td><td>Bernoulli mean parameter</td></tr></table>
370
+
371
+ # B. Recursion Equations for BGLN-D
372
+
373
+ We derive the deterministic version of our algorithm by taking expectations and covariances for the quantities in equations 6 to 11 (rewritten using Bernoulli variables). We use linearity of expectations and our Bernoulli modeling approximation. We also assume $\mathrm{Cov}(a_0, \Delta a)$ is close to 0 and ignore it in our computations. This assumption is tested empirically in our experiments and we find that it does not severely move the FSD estimate away from the true empirical FSD (see Figures 2 and 4). The complete steps for BGLN-D computations are given in Algorithm 2.
374
+
375
+ # C. Generalization to Convolutional Networks
376
+
377
+ The generalization of BGLN-S to convolutional networks involves passing the inputs sampled using the data moments through the network. In convolutional networks, ReLU activation is usually applied after the convolutional and the fully
378
+
379
+ Algorithm 2 BGLN-D
380
+ Require: $\mathbb{E}[\mathbf{x}],\mathrm{Cov}(\mathbf{x}),\{\pmb {W},\pmb {b}\}_{1}^{L},\{\pmb {\mu}\}_{1}^{L - 1}$ $\mathbb{E}[a_0],\mathbb{E}[a_1]\gets \mathbb{E}[x]$ $\operatorname {Cov}(a_0),\operatorname {Cov}(a_1)\gets \operatorname {Cov}(\mathbf{x})$ $\mathbb{E}[\Delta a],\mathrm{Cov}(\Delta a)\gets 0$
381
+ for $l\gets 1$ to $L - 1$ do $\begin{array}{r}\mathbb{E}[s_0]\leftarrow W_0^{(l)}\mathbb{E}[a_0] + b_0^{(l)}\\ \mathbb{E}[\Delta s]\leftarrow \Delta W^{(l)}\mathbb{E}[a_0] + W_1^{(l)}\mathbb{E}[\Delta a] + \Delta b^{(l)}\\ \mathbb{E}[a_0]\leftarrow \pmb{\mu}^{(l)}\odot \mathbb{E}[s_0]\\ \mathbb{E}[\Delta a]\leftarrow \pmb{\mu}^{(l)}\odot \mathbb{E}[\Delta s]\\ \operatorname {Cov}(s_0)\leftarrow W_0^{(l)}\operatorname {Cov}(a_0)W_0^{(l)T}\\ \operatorname {Cov}(\Delta s)\leftarrow \Delta W^{(l)}\operatorname {Cov}(a_0)\Delta W^{(l)T} + W_1^{(l)}\operatorname {Cov}(\Delta a)W_1^{(l)T}\\ \operatorname {Cov}(a_0)\leftarrow (\pmb{\mu}^{(l)}\pmb{\mu}^{(l)T})\odot \operatorname {Cov}(s_0)\\ \operatorname {Cov}(\Delta a)\leftarrow (\pmb{\mu}^{(l)}\pmb{\mu}^{(l)T})\odot \operatorname {Cov}(\Delta s) \end{array}$
382
+ end for
383
+ $\begin{array}{r}\mathbb{E}[\Delta z]\leftarrow \Delta W^{(L)}\mathbb{E}[a_0] + W_1^{(L)}\mathbb{E}[\Delta a] + \Delta b^{(L)}\\ \operatorname {Cov}(\Delta z)\leftarrow \Delta W^{(L)}\operatorname {Cov}(a_0)\Delta W^{(L)T} + W_1^{(L)}\operatorname {Cov}(\Delta a)W_1^{(L)T}\\ \operatorname {return}\frac{1}{2} ||\mathbb{E}[\Delta z]||^2 +\frac{1}{2} tr~(\operatorname {Cov}(\Delta z)) \end{array}$
384
+
385
+ connected layers. At each ReLU step, we use the Bernoulli mean parameters to sample activation signs and obtain the difference of activations, $\Delta a$ . Finally, the Euclidean distance (or KL divergence) between the final layer outputs leads to the stochastic estimate of the FSD. The complete procedure is shown in Algorithm 3.
386
+
387
+ # D. Comparing FSD Estimators
388
+
389
+ To directly compare the NTK approximation with the linearized activation function trick, we compute the estimated FSD between pairs of networks using these two kinds of linearization, when provided with the same information, and plot them against the true empirical FSD. Hence, both estimators are provided with the same coreset of datapoints. In the case of BGLN-S (coreset), activations are computed using this coreset directly instead of Bernoulli sampling. Figure 4 visualizes this comparison for networks trained using tasks in Split CIFAR100. BGLN-S estimates correlate better with the true FSD than NTK, hence corroborating our intuition about linearizing activation functions. To quantify this difference, we also measure the Spearman rank-order and Kendall's Tau correlation coefficients for each estimator with the true FSD. BGLN-S obtains values 96.36 and 79.19, respectively, outperforming NTK, which obtains 86.42 and 71.71, respectively.
390
+
391
+ # E. Continual Learning
392
+
393
+ # E.1. Memory Cost Analysis
394
+
395
+ We follow the notation in Table 6 to denote $p_l$ as the number of parameters in layer $l$ , $P = \sum_{l=1}^{L} p_l$ as the total number of parameters in the network, $A$ as the number of activations in the network (note that $A < P$ ), $d$ as the data dimension, $N$ as the number of samples in a coreset, and $C$ as the number of classes in the continual learning classification setting. We can now write analytic expressions for the memory cost incurred by the different methods considered in the continual learning experiments, as shown in Table 3. Below we arrive at these expressions for each task that the model is continually trained on.
396
+
397
+ Table 6. Memory cost notation.
398
+
399
+ <table><tr><td>pl</td><td># parameters in layer l</td></tr><tr><td>P</td><td># parameters = ∑l=1L pl</td></tr><tr><td>A</td><td># activations &lt; P</td></tr><tr><td>d</td><td>data dimension</td></tr><tr><td>N</td><td>coreset size</td></tr><tr><td>C</td><td># classes</td></tr></table>
400
+
401
+ - EWC: EWC requires storing one value for each parameter of the network and one value for each diagonal element of the $P \times P$ Fisher information matrix, resulting in a cost of $2P$ .
402
+ - OSLA: OSLA approximates the Fisher information matrix as a block diagonal matrix, storing $p_l^2$ elements for each block corresponding to layer $l$ . This gives a cost of $P + \sum_{l=1}^{L} p_l^2$ .
403
+
404
+ Algorithm 3 BGLN-S (Conv)
405
+ Require: $\mathbb{E}[\mathbf{x}],\mathrm{Cov}(\mathbf{x}),\{\mathrm{layer}\}_{1}^{L - 1},\{\mu \}_{1}^{L - 1}$
406
+ 1: $\mathbb{E}[a_0],\mathbb{E}[a_1]\gets \mathbb{E}[x]$
407
+ 2: $\operatorname {Cov}(a_0),\operatorname {Cov}(a_1)\gets \operatorname {Cov}(\mathbf{x})$
408
+ 3: $a_0,a_1\sim \mathcal{N}(\mathbb{E}[a_0],\mathrm{Cov}(a_0))$
409
+ 4: $\Delta a\gets 0$
410
+ 5: for $l\gets 1$ to $L - 1$ do
411
+ 6: if layer is Conv or FC then
412
+ 7: $s_0\gets$ layer $(a_{0},\mathrm{grad} = \mathrm{False})$
413
+ 8: $s_1\gets$ layer $(a_{1})$
414
+ 9: else if layer is ReLU then
415
+ 10: $\Delta s = s_1 - s_0$
416
+ 11: $\mathbf{m}\sim Ber(\mu^{(l)})$
417
+ 12: $\Delta a\gets \mathbf{m}\odot \Delta s$
418
+ 13: else
419
+ 14: $a_0\gets$ layer $(a_0)$
420
+ 15: $a_1\gets$ layer $(a_{1})$
421
+ 16: end if
422
+ 17: end for
423
+ 18: $\Delta z\gets s_1 - s_0$
424
+ 19: return $\frac{1}{2} ||\Delta z||^2$
425
+
426
+ ![](images/e88e8c3ce84b23e3a52b28cfed1184f8873ae7d02d5516cc652737afb177b599.jpg)
427
+ Figure 4. Estimating true FSD with LAFTR and NTK, given the same coreset of inputs, on networks trained using Split CIFAR100.
428
+
429
+ - VCL: VCL stores two pieces of information for the variational distribution for each parameter, one for the mean and one for the variance in the diagonal approximation, incurring a cost equal to $2P$ .
430
+ VCL (coreset): The "coreset" variant of VCL additionally stores $N$ datapoints, increasing the memory cost by $Nd$ .
431
+ VAR-GP, FROMP, S-FSVI: These methods all store two values per parameter, similar to VCL. Further, they require a coreset of datapoints and/or inducing points, as well as a $NC \times NC$ kernel matrix.
432
+ - NTK (coreset): The NTK approximation stores one value for each parameter of the network and one for the $P$ -dimensional Jacobian-vector product used to linearize the network. It further requires a coreset of $N$ datapoints,
433
+
434
+ result in a $2P + Nd$ cost.
435
+
436
+ - LAFTR: LAFTR methods store each parameter once and the first two moments of the data, incurring a cost of $P + d + d^2$ .
437
+ - LAFTR-CW: The classwise variants of LAFTR store separate data moments for each class, which scales those corresponding memory costs by C, i.e., $P + C(d + d^2)$ .
438
+ - LAFTR (coreset): The "coreset" ablation of LAFTR requires storing $N$ datapoints instead of the data moments, giving a $P + Nd$ cost.
439
+ - BGLN-S, BGLN-D: BGLN methods store each parameter once, a Bernoulli mean value for each activation and the first two moments of the data, incurring a cost of $P + A + d + d^2$ .
440
+ - BGLN-S-CW, BGLN-D-CW: The classwise variants of our methods store separate Bernoulli means and data moments for each class, which scales those corresponding memory costs by C, i.e., $P + C(A + d + d^2)$ .
441
+ - BGLN-S-Var, BGLN-D-Var: The "Var" variants of our methods make a diagonal approximation to the data covariance (second moment), hence storing only $d$ values for it. This further reduces memory cost to $P + A2d$ .
442
+ - BGLN-S (coreset): The "coreset" ablation of BGLN-S requires storing $N$ datapoints instead of the data moments, giving a $P + A + Nd$ cost.
443
+
444
+ # E.2. Experimental Details
445
+
446
+ Datasets. Split MNIST consists of five binary prediction tasks to classify non-overlapping pairs of MNIST digits (Deng, 2012). Permuted MNIST is a sequence of ten tasks to classify ten digits, with a different fixed random permutation applied to the pixels of all training images for each task. Finally, Split CIFAR100 consists of six ten-way classification tasks, with the first being CIFAR10 (Krizhevsky et al., a), and subsequent ones containing ten non-overlapping classes each from the CIFAR100 dataset (Krizhevsky et al., b).
447
+
448
+ Architectures. We use standard architectures used by existing methods for fair comparison. For regression and the MNIST experiments, we use a MLP with two fully connected layers and ReLU activation. For Split CIFAR100, we use a network with four convolutional layers, followed by two fully connected layers, and ReLU activation after each. For MNIST tasks, we compute the FSD with Euclidean output space metric between logits. For CIFAR100, we do the same between softmax outputs. Both Split MNIST and Split CIFAR100 models have a multiheaded final layer. Note that the VAR-GP method included in the results in Section 5 is specific only to singleheaded architectures and does not generalize to the multiheaded networks that our methods and all other comparable methods use.
449
+
450
+ Hyperparameters. We have performed a grid search over some key hyperparameters and used the ones that resulted in the best final average accuracy across all tasks. All hyperparameter search was done with random seed 42. We then took that best set of hyperparameters, repeated our experiments on seeds 20, 21, 22, and reported the average and standard deviation of our results.
451
+
452
+ For all nonparametric methods that store and use a coreset of datapoints, we use 40 points for MNIST datasets and 200 points for CIFAR 100, in accordance with standard protocol followed by comparable methods.
453
+
454
+ For the learning rate, we used 0.001 for all CL experiments except the BGLN-S method for Split MNIST and BGLN-D method for Permuted MNIST, where we used 0.0001 instead.
455
+
456
+ We used the same number of epochs on each CL task and the exact numbers are reported in Table 7. On the first task, all MNIST experiments used the same number of epochs as the subsequent CL tasks while CIFAR100 experiments used 200 epochs on the first task.
457
+
458
+ To compute the Bernoulli mean parameters for our stochastic gating implementation, we used simple averaging as the default, but also explored exponential moving averaging. While there was not much difference in performance, we report the momentum values that reproduce our results. All MNIST experiments had a momentum value of 1/batch_size. Note that this momentum value of 1/batch_size corresponds to simple moving average. For CIFAR100 experiments, we used 0.99 for BGLN-S (CW) and NTK, and 1/batch_size for BGLN-S.
459
+
460
+ Table 7. CL tasks training epochs used in CL experiments.
461
+
462
+ <table><tr><td>Method</td><td>Split MNIST</td><td>Permuted MNIST</td><td>Split CIFAR100</td></tr><tr><td>NTK (coreset)</td><td>15</td><td>5</td><td>80</td></tr><tr><td>BGLN-S</td><td>15</td><td>15</td><td>80</td></tr><tr><td>BGLN-D</td><td>15</td><td>15</td><td>-</td></tr><tr><td>BGLN-S-CW</td><td>15</td><td>15</td><td>50</td></tr><tr><td>BGLN-D-CW</td><td>15</td><td>15</td><td>-</td></tr></table>
463
+
464
+ Table 8. FSD scale used in CL experiments.
465
+
466
+ <table><tr><td>Method</td><td>Split MNIST</td><td>Permuted MNIST</td><td>Split CIFAR100</td></tr><tr><td>NTK (coreset)</td><td>1</td><td>1</td><td>0.005</td></tr><tr><td>BGLN-S</td><td>5</td><td>1</td><td>1</td></tr><tr><td>BGLN-D</td><td>0.1</td><td>0.005</td><td>-</td></tr><tr><td>BGLN-S-CW</td><td>2</td><td>1</td><td>10</td></tr><tr><td>BGLN-D-CW</td><td>0.1</td><td>0.005</td><td>-</td></tr></table>
467
+
468
+ Table 9. Batch size used in CL experiments.
469
+
470
+ <table><tr><td>Method</td><td>Split MNIST</td><td>Permuted MNIST</td><td>Split CIFAR100</td></tr><tr><td>NTK (coreset)</td><td>256</td><td>256</td><td>512</td></tr><tr><td>BGLN-S</td><td>32</td><td>128</td><td>512</td></tr><tr><td>BGLN-D</td><td>32</td><td>128</td><td>-</td></tr><tr><td>BGLN-S-CW</td><td>32</td><td>128</td><td>512</td></tr><tr><td>BGLN-D-CW</td><td>32</td><td>128</td><td>-</td></tr></table>
471
+
472
+ For each method and dataset, the scaling factor for FSD penalty, $\lambda_{\mathrm{FSD}}$ , is reported in Table 8. Similarly, batch size is reported in Table 9.
473
+
474
+ Evaluation Metrics. In addition to average accuracy over tasks, we measure the backward transfer metric. For $T$ tasks, let $R_{i,j}$ be the classification accuracy on task $t_j$ after training on task $t_i$ . Then, backward transfer is given by the following formula.
475
+
476
+ $$
477
+ \frac {1}{T - 1} \sum_ {i = 1} ^ {T - 1} R _ {T, i} - R _ {i, i}
478
+ $$
479
+
480
+ # E.3. Task-wise classification and task sequence length
481
+
482
+ We show in Figure 5 the task-wise accuracies on the Split CIFAR100 benchmark after training on all tasks is complete, for our methods (LAFTR, LAFTR (coreset) and BGLN-S-CW), NTK (coreset) and a nonparametric state-of-the-art method, FROMP. This draws a more fine-grained comparison and depicts the benefits of LAFTR for each task.
483
+
484
+ To evaluate learning long sequences of tasks, we test our method's performance on the extended, 11-task version of Split CIFAR100 (longer than the typical 6-task benchmark). The results for both versions of the task are shown in Table 10 for comparison.
485
+
486
+ We find that performance of our method is maintained even for longer sequences of tasks. In this case, training on more tasks continually with LAFTR actually yields higher average accuracy. As we may expect, we observe a small decrease in the backward transfer performance, which still outperforms existing nonparametric SOTA methods.
487
+
488
+ ![](images/9e5bd31f02ffc91a55192e66ca4545cd242a76fd8053b8878ed0e03048054fdd.jpg)
489
+ Figure 5. Comparison of task-wise accuracies on the Split CIFAR100 benchmark after training on all tasks is complete, for our methods, NTK and a nonparametric state-of-the-art method, FROMP.
490
+
491
+ Table 10. LAFTR (coreset) performance for different task sequence lengths.
492
+
493
+ <table><tr><td>Number of tasks</td><td>Average Accuracy</td><td>Backward Transfer</td></tr><tr><td>6</td><td>78.33 ± 0.01</td><td>-0.73 ± 0.10</td></tr><tr><td>11</td><td>78.75 ± 0.01</td><td>-1.59 ± 0.47</td></tr></table>
494
+
495
+ # E.4. Ablation of information stored
496
+
497
+ We present further results on the Split CIFAR100 task, with varying amounts of information stored and used in our method. Specifically, Table 11 summarizes the effect of coreset size on average accuracy and backward transfer for Split CIFAR100. It is also possible to generalize our class-conditional variant, which operates on $k = 10$ clusters, to different number of clusters. We can create clusters by grouping classes and storing the required statistics for each cluster separately. As shown in Table 12, $k = 1$ is sufficient to compete with existing nonparametric methods in this setting. As expected, as $k$ is increased and more dataset-level statistics are used, continual learning performance improves.
498
+
499
+ Table 11. Effect of coreset size on Split CIFAR100 performance.
500
+
501
+ <table><tr><td>Coreset Size</td><td>Average Accuracy</td><td>Backward Transfer</td></tr><tr><td>20</td><td>73.26 ± 0.01</td><td>-2.51 ± 0.43</td></tr><tr><td>50</td><td>75.63 ± 0.01</td><td>-2.08 ± 0.51</td></tr><tr><td>100</td><td>76.70 ± 0.01</td><td>-1.65 ± 0.09</td></tr><tr><td>200</td><td>78.33 ± 0.01</td><td>-0.73 ± 0.10</td></tr></table>
502
+
503
+ Table 12. Effect of number of classwise clusters on Split CIFAR100 performance.
504
+
505
+ <table><tr><td>k</td><td>Average Accuracy</td><td>Backward Transfer</td></tr><tr><td>1</td><td>75.61 ± 0.01</td><td>-1.93 ± 0.59</td></tr><tr><td>5</td><td>75.74 ± 0.01</td><td>-1.58 ± 0.50</td></tr><tr><td>10</td><td>76.22 ± 0.01</td><td>-1.45 ± 0.63</td></tr></table>
506
+
507
+ # F. Influence Function Estimation
508
+
509
+ # F.1. Experimental Details
510
+
511
+ We used Concrete, Energy, Housing, Kinetics, and Wine datasets from the UCI collection (Dua & Graff, 2017). For all datasets, we normalized the training dataset to have a mean of 0 and a standard deviation of 1. We used a 2-hidden layer MLP with 128 hidden units and the base network was trained for 200 epochs with SGD and a batch size of 128. We performed hyperparameter searches over the learning rate in the range $\{0.3, 0.1, 0.03, 0.01, 0.003, 0.001\}$ and selected the learning rate based on the validation loss.
512
+
513
+ For each random data point selected, we optimized the PBRF objective for additional 20 epochs from the base network. The FSD term was computed stochastically with a batch size of 128. Similarly, both EWC and BGLN were trained with the same configuration but with the corresponding approximation to the FSD term.
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee51ba66e6e7b35f13dfb22b0024854e3d10b87266ce94169caab9c8f2a20152
3
+ size 813066
2023/Efficient Parametric Approximations of Neural Network Function Space Distance/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/0abc923a-f5fd-4ed6-b1da-3344f9f0a041_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4e6b7ce4679973b9535fd163633f462242c793df6c3fc215ae4e9bb1b825853
3
+ size 3246989
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:082c57e2951ef67deab19537abf581a2265754a64362e9a817263e086c5603a1
3
+ size 993727
2023/Efficient Personalized Federated Learning via Sparse Model-Adaptation/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Quantum Algorithms for Quantum Optimal Control/bdb6a906-4286-4a91-b1a6-a5057640359b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8981c6183568150de208b583e37ba24a3f6fc5e11d9d97ee25f6f2360e2b63a
3
+ size 599317
2023/Efficient Quantum Algorithms for Quantum Optimal Control/full.md ADDED
@@ -0,0 +1,605 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Xiantao Li<sup>1</sup> Chunhao Wang<sup>2</sup>
2
+
3
+ # Abstract
4
+
5
+ In this paper, we present efficient quantum algorithms that are exponentially faster than classical algorithms for solving the quantum optimal control problem. This problem involves finding the control variable that maximizes a physical quantity at time $T$ , where the system is governed by a time-dependent Schrödinger equation. This type of control problem also has an intricate relation with machine learning. Our algorithms are based on a time-dependent Hamiltonian simulation method and a fast gradient-estimation algorithm. We also provide a comprehensive error analysis to quantify the total error from various steps, such as the finite-dimensional representation of the control function, the discretization of the Schrödinger equation, the numerical quadrature, and optimization. Our quantum algorithms require fault-tolerant quantum computers.
6
+
7
+ # 1. Introduction
8
+
9
+ Optimal control is an important application of machine learning and optimization. Meanwhile, it has been demonstrated in recent works that important insights on deep learning can be obtained by interpreting the process of training a deep neural network as a discretization of an optimal control problem (E et al., 2019; He et al., 2016). In recent decades, following the emergence of quantum computers, the optimal control of quantum systems has attracted considerable attention. This is because quantum properties are largely responsible for many of the recent developments in material science and chemical engineering, and such properties are best utilized with external controls. (Geppert et al., 2004; Datta, 2005; McCreery et al., 2013). Quantum optimal control (QOC) algorithms (Brif et al., 2010; Werschnik &
10
+
11
+ $^{1}$ Department of Mathematics, Pennsylvania State University, University Park, USA $^{2}$ Department of Computer Science and Engineering, Pennsylvania State University, University Park, USA. Correspondence to: Xiantao Li <xiantao.li@psu.edu>, Chunhao Wang <cwang@psu.edu>.
12
+
13
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
14
+
15
+ Gross, 2007), which uses first principle-based computer simulations to identify the desired control variable, has been an important route toward this direction. QOC problems have also emerged in recent quantum computing and quantum information technology. For example, QOC has recently been shown to have remarkable connections and applications to machine learning techniques using quantum circuits, including variational quantum algorithms (VQA) (Choquette et al., 2021; Yang et al., 2017), quantum neural networks (Larocca et al., 2021), and quantum approximate optimization algorithm (QAOA) (Farhi et al., 2014; Cerezo et al., 2021; Leng et al., 2022). QOC is treated as a particular machine learning application in (Banchi & Crooks, 2021). One specific application of QOC to quantum machine learning is the diagnostics of quantum barren plateau (Larocca et al., 2022). In addition, solving the optimal control problems for quantum systems is a critical step for implementing quantum computers.
16
+
17
+ The problem of controlling a quantum system can be formulated based on the time-dependent Schrödinger equation (TDSE),
18
+
19
+ $$
20
+ i \partial_ {t} | \psi \rangle = (H _ {0} - u (t) \mu) | \psi \rangle , | \psi (0) \rangle = | \psi_ {0} \rangle , \tag {1}
21
+ $$
22
+
23
+ with an external control variable $u(t)$ that enters the Hamiltonian through an operator $\mu$ . One example comes from electron transport, where $H_0 = -\frac{\nabla^2}{2} + V(x)$ and $\mu$ is the dipole operator. To keep our discussions focused on the quantum algorithms, we consider the case with a single control. The treatment of multiple control variables and non-unitary dynamics will be presented in separate works. We assume the copies of the initial state $|\psi_0\rangle$ are given for free, i.e., we have access to the unitary $U_{\psi_0}$ that prepares $|\psi_0\rangle$ as $U_{\psi_0}|0\rangle = |\psi_0\rangle$ .
24
+
25
+ The goal of QOC with time duration $T$ is to determine a control variable $u(t)$ for $t \in [0, T]$ , such that a physical quantity, represented by a Hermitian operator $O$ , is maximized in that
26
+
27
+ $$
28
+ \max _ {u (t)} J (u), \quad J (u) := \langle \psi (T) | O | \psi (T) \rangle - \alpha \int_ {0} ^ {T} | u (t) | ^ {2} \mathrm {d} t. \tag {2}
29
+ $$
30
+
31
+ Here $\alpha > 0$ can be regarded as a regularization parameter imposing a soft constraint on the magnitude of the control variable $u(t)$ . In the context of optimization, the
32
+
33
+ function $J(u)$ is the objective (fitness) function. Aside from the generalization to multiple control variables, another straightforward extension is to control signals with explicit parametric forms, e.g., a trigonometric expression $u(t) = \sum_{j} E_{j} \cos(\omega_{j} t) e^{-(t - t_{j})^{2} / \sigma_{j}}$ modulated by a Gaussian envelope, which can be written in an abstract form as $u(t) = F(t, \theta)$ with $\theta$ embodying all the parameters. Then the objective function in Equation (2) can be optimized over $\theta$ and the gradient can be trivially obtained using chain rule: $\partial J / \partial \theta = (\partial J / \partial u) \partial F / \partial \theta$ . By restricting the control variable $u(t)$ to square-integrable functions, the objective function is clearly upper bounded. In addition, it is lower semicontinuous, which then implies that a maximum exists (Ciaramella et al., 2015). But in practice, the function is often nonconvex and possesses multiple maxima.
34
+
35
+ In addition to the wide range of applications of QOC, there is a host of mathematical analysis and computational techniques based on classical algorithms (Castro et al., 2012; Werschnik & Gross, 2007; Eitan et al., 2011; Glaser et al., 2015; Ciaramella et al., 2015; Hellgren et al., 2013; D'Alessandro, 2000; 2008; Albertini & D'Alessandro, 2002). The present paper, however, will be concerned with computer simulations using quantum algorithms, where the $n$ -qubit Hamiltonian operator $H$ (resp. $\mu$ ) is represented as a $2^{n}$ -dimensional matrix $H \in \mathbb{C}^{2^{n} \times 2^{n}}$ (resp. $\mu \in \mathbb{C}^{2^{n} \times 2^{n}}$ ). In this paper, we assume the Hamiltonians $H$ , $\mu$ , and the observable $O$ are $d$ -sparse: there are at most $d$ nonzero entries in each row/column. In other words, these matrices are efficiently row/column computable. To access these matrices, we assume we have access to a procedure $\mathcal{P}_A$ for a matrix $A$ that can perform the following mapping:
36
+
37
+ $$
38
+ \left| i \right\rangle \left| 0 \right\rangle \mapsto \left| i \right\rangle \left| r _ {i, k} \right\rangle , \tag {3}
39
+ $$
40
+
41
+ where $r_{i,k}$ is the $k$ -th nonzero entry of the $i$ -th row of $A$ . In addition, $\mathcal{P}_A$ can also perform the following mapping:
42
+
43
+ $$
44
+ \left| i \right\rangle \left| j \right\rangle \left| 0 \right\rangle \mapsto \left| i \right\rangle \left| j \right\rangle \left| A (i, j) \right\rangle . \tag {4}
45
+ $$
46
+
47
+ Note that it is easy to adapt our algorithms to other more general input models, such as the block-encoding (Low & Chuang, 2019; Chakraborty et al., 2019).
48
+
49
+ With quantum access to these matrices, we aim to determine $u(t)$ for all $t$ such that the objective function defined in Equation (2) is maximized. However, due to the nonconvex landscape of the objective function, finding the global maximum is not realistic. Instead, we consider the notion of $\epsilon$ -second-order convergence condition (see Equation (12)) for the objective function. More specifically, we aim to solve the following problem.
50
+
51
+ Problem 1.1. Consider the $n$ -qubit QOC in Equation (2) for time duration $T$ . Assume $\| H_0\|$ , $\| O\|$ , $\| \mu \| \leq 1$ , and
52
+
53
+ $\alpha \geq 2 / T$ . Let $N$ be the number of time intervals and define $\delta \coloneqq T / N$ . Suppose $H_0, \mu$ and the observable $O$ are $d$ -sparse, and suppose we are given access to $U_{\psi_0}$ for preparing $|\psi_0\rangle$ . Given the sparse access $\mathcal{P}_{H_0}$ to $H_0, \mathcal{P}_\mu$ to $\mu$ , and $\mathcal{P}_O$ to $O$ , determine $\tilde{u}(t_j)$ ( $t_j = j\delta$ ) for all $j \in [N]$ such that $|\tilde{u}(t_j) - u(t_j)| \leq \epsilon$ , where $u(t)$ is an $\epsilon$ -second-order stationary point of $J(u)$ satisfying Equation (12).
54
+
55
+ The main challenge in solving Problem 1.1 is due to the repeated solution of TDSE in Equation (1), which becomes unfavorable for classical computers because the dimension grows exponentially. In addition, many optimization algorithms require the computation of the derivatives of the objective function with respect to the control variable $u(t)$ . A direct calculation of such derivatives of $J$ in Equation (2) also requires visiting the TDSE. The most well-known classical method for optimizing Equation (2) is due to Zhu and Rabitz (Zhu & Rabitz, 1998a). The idea is to regard the TDSE in Equation (1) as a constraint, which is incorporated into the objective function using a Lagrange multiplier. For this optimization problem, algorithms can be constructed by enforcing the first-order condition. Zhu and Rabitz (Zhu & Rabitz, 1998a) established the monotone convergence property of this algorithm. This approach is later extended to further improve the convergence properties (Maday & Turinici, 2003; Eitan et al., 2011; Ciaramella et al., 2015) including formulations based on the Liouville von Neumann equation.
56
+
57
+ Nevertheless, the complexity associated with one iteration of these classical algorithms has the scaling of $\mathcal{O}\bigl (\mathrm{poly}(2^n)T\bigr)$ , where $n$ is the number of system qubits and we did not include $\epsilon$ in the complexity. The exponential dependence on $n$ comes from the fact that at each time step, the wave functions have to be computed from previous time steps using an approximation of the unitary operator. Depending on the specific methods, this may involve matrix multiplications or solutions of a linear system of equations (Castro et al., 2004). The exponential scaling significantly limits the scope of the application, since $2^{n}$ is usually proportional to the domain size and the number of electrons.
58
+
59
+ Main Contributions. In this paper, we present efficient quantum algorithms for solving the quantum optimal control problem defined in Equation (2) that scale polynomially in $n$ — our quantum algorithms have exponential speedups compared with best known classical algorithms. One key contribution is a complexity analysis that takes into account various error contributions, including (i) the finite-dimensional approximation of $u(t)$ , (ii) the discretization of the objective function in Equation (2), (iii) the approximation of the wave function, and (iv) the optimization error. Such comprehensive overall estimates are extremely valuable to assess the resources needed for a specific QOC problem. We start
60
+
61
+ with the Hamiltonian simulation method for time-dependent problems (Berry et al., 2020) to access the objective function, thus enabling a quantum gradient estimation (Gilyén et al., 2019a) approach, so that a gradient-based optimization method can be applied. Although our approach is formulated for the TDSE, it can be readily generalized to other control problems where the dynamics is not Hamiltonian, e.g., ODEs implemented with quantum spectral method (Childs & Liu, 2019).
62
+
63
+ The following theorem summarizes our main result, where the $\tilde{\mathcal{O}}$ notation has omitted logarithmic factors.
64
+
65
+ Theorem 1.2 (Summarizing Theorem 3.9 and Theorem 4.1). Assume that $u(t) \in \mathbb{C}^2([0, T])$ . There exists a quantum algorithm that, with probability at least $2/3^2$ , solves Problem 1.1 using $\widetilde{\mathcal{O}}\left(\frac{dLT^2}{\epsilon^3}\right)$ queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ , and $\widetilde{\mathcal{O}}\left(\frac{dnLT^2}{\epsilon^3} + \frac{LT^{3/2}}{\epsilon^{5/2}}\right)$ additional 1- and 2-qubit gates.
66
+
67
+ Further, when the control variable $u(t)$ is smooth, the gate complexity becomes $\widetilde{\mathcal{O}}\left(\frac{dnLT^2}{\epsilon^3} + \frac{LT}{\epsilon^2}\right)$ . The Lipschitz constant $L$ can be bounded by Equation (14)
68
+
69
+ Although the smooth control variables does not improve the gate complexity asymptotically, it can reduce the number of gates in practical implementations. We also use Table 1 for a clear comparison of different smoothness assumptions on the control variable $u(t)$ .
70
+
71
+ <table><tr><td>Smoothness</td><td>Queries</td><td>Additional gates</td></tr><tr><td>Without smoothness</td><td>O(dLT2/ε3)</td><td>O(dnLT2/ε3 + LT3/2/ε5/2)</td></tr><tr><td>Smooth control</td><td>O(dLT2/ε3)</td><td>O(dnLT2/ε3 + LT/ε2)</td></tr></table>
72
+
73
+ Table 1. The query and gate complexities for solving Problem 1.1.
74
+
75
+ It is important to note that our algorithms require fault-tolerant quantum computers, and hence they are not suitable for near-term quantum devices.
76
+
77
+ Related work. To the authors' knowledge, the first attempt to solve the quantum control problem using quantum algorithms has been proposed by (Li et al., 2017). This approach requires a classical device to update the control variable $u(t)$ using a gradient-based method. More recently, Brif et al. (Brif et al., 2010) considered a specific application, where a molecular wave function is evolved under a laser pulse. The algorithm is also hybrid in nature, utilizing a classical device to update the control variable. The approach outputs the objective function, rather than the gradient, for the Nelder-Mead optimization method. None of the above-mentioned works uses the full power of quantum computation, includ
78
+
79
+ ing the state-of-the-art quantum algorithms for Hamiltonian simulation algorithms and gradient estimation. More importantly, precise query complexity that takes into account all levels of approximations is not provided, making it difficult to assess the applicability of the algorithms to specific quantum control problems in practice.
80
+
81
+ The QOC problems show great similarity with variational quantum algorithms (VQA) in general (Cerezo et al., 2021), except that in most VQAs, the unitary operations are associated with parameterized gates, rather than time-dependent Hamiltonians in QOC, where the smoothness of the control function also plays a role in the error. Several other algorithms have recently been proposed to help with the computation of the gradient in VQA (Crooks, 2019; Wierichs et al., 2022; Kyriienko & Elfving, 2021).
82
+
83
+ Very recently, Leng, Peng, Qiao, Lin, and Wu (Leng et al., 2022) proposed a differentiable programming framework for quantum computers to evaluate gradients of time-evolved states. One of their application is QOC. In their model, the control function $u(t)$ is fixed while leaving freedoms to the parameters of $u$ to be tuned. In contrast, we work on a more general control model and deal with the control function in real time directly. In addition, our work focuses on quantum algorithms on fault-tolerant quantum computers, and we use state-of-the-art techniques to improve the complexity.
84
+
85
+ Notation. We provide a brief introduction to quantum computation in Section 2.1. Here, we summarize the notations used in this paper. First of all, we should distinguish quantum states from a vector in the context of classical computation, although a quantum state is mathematically represented as a vector. In the context of quantum dynamics, we use the Dirac notation $|\cdot \rangle$ to represent quantum states. For vectors in the context of classical computation, e.g., the gradient vector and the control variable at multiple time steps, we use the bold font, e.g., $\pmb{u}$ . For a positive integer $k$ , we use $[k]$ to denote the set $\{1,\dots ,k\}$ . For a vector $\pmb{u}$ , we use the subscript with a normal font to denote its entries, i.e., $u_{1},\ldots ,u_{d}$ are the entries of $\pmb{u}$ . For a vector $\pmb{u}$ , we use $\| \pmb {u}\|$ to denote its Euclidean norm, i.e., $\| \pmb {u}\| = \sqrt{\sum_{j = 1}^{d}|u_{j}|^{2}}$ . We use $\| \pmb {u}\|_{\infty}$ to denote its maximum norm, i.e., $\| \pmb {u}\|_{\infty} = \max_{j}|u_{j}|$ .
86
+
87
+ In addition, we denote by $C^2[0,T]$ the class of twice continuously differential functions defined in $[0,T]$ . For a function $f$ , we use $\|f\|_2$ , or $\|f(t)\|_2$ to denote its $L_2$ norm. Namely, $\|f(t)\|_2 = \|f\|_2 = \int_0^T f(t)^2 \, \mathrm{d}t$ .
88
+
89
+ # 2. Preliminaries
90
+
91
+ To solve Problem 1.1, we need to deal with several levels of approximations, including a finite-dimensional representation of the function $u(t)$ , the time discretization of the TDSE in Equation (1), the approximation of the gradient
92
+
93
+ of $\langle \psi (T)|O|\psi (T)\rangle$ , and the optimization error. In this section, we first give a simplistic yet sufficient introduction to quantum computation. Then we analyze the error caused by the discretization of $u(t)$ , the discretization of the TDSE, and optimization in subsequent subsections.
94
+
95
+ # 2.1. A brief introduction to quantum computation
96
+
97
+ The most daunting obstacle for learning quantum computing is probably its notations. Once one is getting familiar with the Dirac notation, quantum computing can be understood as matrix-vector multiplications. For an $n$ -qubit state, we use a $2^{n}$ -dimensional complex (column) vector with unit Euclidean norm to mathematically describe it, and this vector is denoted, in the Dirac notation, by $|\psi \rangle$ . We use $\langle \psi |$ to denote the conjugate transpose of $|\psi \rangle$ , and then the inner product between two states can be conveniently written as $\langle \psi |\phi \rangle$ . When the symbol in the Dirac notation is a natural number, i.e., $|0\rangle, \ldots, |2^n - 1\rangle$ , we use such states to specifically denote the set of the standard basis of a $2^{n}$ -dimensional vector space, same as the basis vectors $e_0, \ldots, e_{2^n - 1}$ that we usually see in linear algebra textbooks. With respect to the standard basis, let $\alpha_0, \ldots, \alpha_{2^n - 1}$ be the entries of $|\psi \rangle$ , i.e., $|\psi \rangle = [\alpha_0, \ldots, \alpha_{2^n - 1}]^T$ . It can be conveniently written as a superposition, $|\psi \rangle = \alpha_0 |0\rangle + \dots + \alpha_{2^n - 1} |2^n - 1\rangle$ . When $|\psi \rangle$ is measured, with probability $|\alpha_j|^2$ , it will collapse to $|j\rangle$ . Note that a measurement is an irreversible process: a state cannot be restored once it collapses to some basis state.
98
+
99
+ The building blocks of quantum algorithms are 1- and 2-qubit gates: they are modeled as $2 \times 2$ (1-qubit), or $4 \times 4$ (2-qubit) unitary matrices. A network of quantum gates form a quantum circuit, which, acting on $n$ qubits, is mathematically represented as a $2^{n} \times 2^{n}$ unitary matrix. In essence, a quantum algorithm starts from an $n$ -qubit initial state $|0\rangle$ that is easy to prepare, and applies a quantum circuit, represented by $U$ , yielding the state $|\psi\rangle = U|0\rangle$ . Then a measurement is performed on $|\psi\rangle$ to obtain the desired outcomes. Readers may refer to (Nielsen & Chuang, 2010) for a thorough introduction to quantum computation.
100
+
101
+ # 2.2. Approximation Error of the Objective Function
102
+
103
+ We first represent the control variable $u(t)$ at finitely many time steps with the length of a time interval denoted by $\delta$ : Let $t_j = j\delta$ be discrete time steps, and $N = T / dt$ be the number of time steps. Then we represent $u(t)$ via piece-wise linear interpolation, denoted by $u_I(t)$ , given by,
104
+
105
+ $$
106
+ u _ {I} (t) = \sum_ {j = 0} ^ {N} u _ {j} b _ {j} (t), \tag {5}
107
+ $$
108
+
109
+ with $b_{j}(t)$ being the nodal basis functions (i.e., the hat functions) centered at time steps $t_j$ . The interpolating function can also be integrated directly, which leads to a quadrature
110
+
111
+ approximation for the integral in Equation (2). The error from these approximations follows the standard error bound, e.g., see (Kincaid et al., 2009).
112
+
113
+ Theorem 2.1 (Perturbation under $C^2$ assumption.). Assume that $u(t) \in C^2([0, T])$ , i.e., it is twice continuously differentiable, then the error from the piecewise-linear interpolation is bounded as follows,
114
+
115
+ $$
116
+ \left\| u (t) - u _ {I} (t) \right\| _ {2} \leq C \| u ^ {\prime \prime} (t) \| _ {2} \delta^ {2}. \tag {6}
117
+ $$
118
+
119
+ In addition, the integral of $u(t)^2$ can be approximated by a composite trapezoid rule, with weights denoted by $w_j$ ,
120
+
121
+ $$
122
+ \int_ {0} ^ {T} u (t) ^ {2} \mathrm {d} t = \delta \sum_ {j = 0} ^ {N} w _ {j} u \left(t _ {j}\right) ^ {2} + \mathcal {O} \left(T \delta^ {2}\right). \tag {7}
123
+ $$
124
+
125
+ The quadrature formula $(w_0 = w_N = 1/2$ and $w_1 = w_2 = \dots = w_{N-1} = 1)$ can be derived from the linear interpolation of $u(t)$ in each time interval by integrating the nodal functions directly. In addition, the error carries a prefactor that is proportional to the second-order derivatives of the integrand, which is bounded due to the assumption that $u(t) \in \mathbf{C}^2([0,T])$ .
126
+
127
+ With this representation of the control function, the problem is reduced to a finite-dimensional problem. We will use $\pmb{u}$ to represent the nodal values of the interpolation: $\pmb{u} = \{u_{j}\}_{j = 1}^{N}$ , with $u_{j}$ being the nodal value of $u(t)$ at $t_j$ . We will then write the corresponding objective function as $\widetilde{\mathcal{J}} (\pmb {u})$ , a function with $N$ variables. Namely,
128
+
129
+ $$
130
+ \widetilde {J} (\boldsymbol {u}) = \left\langle \psi_ {N} \right| O \left| \psi_ {N} \right\rangle - \alpha \delta \sum_ {j = 0} ^ {N} w _ {j} u _ {j} ^ {2}. \tag {8}
131
+ $$
132
+
133
+ Here we have also included the approximation of $|\psi (T)\rangle$ denoted by $\left|\psi_N\right\rangle$
134
+
135
+ Corollary 2.2. Assume that the wave function is approximated by $|\psi_N\rangle$ , with an error comparable to the quadrature error in Equation (7), i.e.,
136
+
137
+ $$
138
+ \left\| \left| \psi_ {N} \right\rangle - \left| \psi (T) \right\rangle \right\| = \mathcal {O} \left(T \delta^ {2}\right). \tag {9}
139
+ $$
140
+
141
+ Further assume that the maximum of $J[u]$ is achieved at some $u^{*}(t) \in \mathbb{C}^{2}([0,T])$ , and the maximum is not degenerate. Then for sufficiently small $\epsilon$ , by choosing,
142
+
143
+ $$
144
+ N = \mathcal {O} \left(\frac {T ^ {3 / 2}}{\epsilon^ {1 / 2}}\right), \tag {10}
145
+ $$
146
+
147
+ the approximate objective function $\widetilde{J} (\pmb {u})$ has a maximum $\pmb{u}^{*}$ ,for which the corresponding interpolant satisfies,
148
+
149
+ $$
150
+ \left\| u (t) - u _ {I} (t) \right\| _ {2} \leq \epsilon .
151
+ $$
152
+
153
+ Proof. This can be proved by using the continuous dependence of the wave function $|\psi(t)\rangle$ on the control variable $u(t)$ , e.g., see Proposition 4 of (Ciaramella et al., 2015). $\square$
154
+
155
+ # 2.3. Optimization method
156
+
157
+ A gradient-base algorithm updates the control variables using the gradient (Nesterov, 2018) to generate an approximating sequence $\{\pmb{u}^{(k)}\}_{k\geq 0}$ ,
158
+
159
+ $$
160
+ \boldsymbol {u} ^ {(k + 1)} = \boldsymbol {u} ^ {(k)} + \eta \left(\nabla J \left(\boldsymbol {u} ^ {(k)}\right) + \zeta_ {k}\right). \tag {11}
161
+ $$
162
+
163
+ Notice that the QOC in Equation (2) is customarily formulated as a maximization problem. Therefore, the algorithm updates the control variables along the gradient ascent direction. In addition, we considered the perturbed gradient method (Jin et al., 2021), which introduced a Gaussian noise $\zeta_{k}$ with mean zero and $\mathbb{E}[\zeta_k^2 ] = r^2$ for some $r > 0$ to help the solution with fulfilling an approximation second-order condition.
164
+
165
+ The convergence to the global maximum of a gradient-based algorithm requires certain convexity assumptions on $J$ , e.g., the star-convexity (Zhou et al., 2018), which, however, may not be easy to verify in practice. Alternatively, one can seek approximate optimality conditions. Jin et al. (Jin et al., 2021) introduced $\epsilon$ -first and second order conditions,
166
+
167
+ $$
168
+ \left\| \nabla J (\boldsymbol {u}) \right\| < \epsilon , \text {a n d} \quad \nabla^ {2} J (\boldsymbol {u}) \leq \sqrt {\rho \epsilon} I. \tag {12}
169
+ $$
170
+
171
+ Here $\rho$ is the Lipschitz constant of the Hessian. The following result, adapted from Theorem 4.1 of (Jin et al., 2021) (with $\sigma = \mathcal{O}(\epsilon^2)$ ) summarizes the complexity associated with optimization.
172
+
173
+ Theorem 2.3 (Adapted from Theorem 4.1 in (Jin et al., 2021)). Assume that the gradient $\nabla J$ is $L$ -Lipschitz and it can be estimated with an unbiased estimation of variance $\sigma^2 = \mathcal{O}(\epsilon^2)$ and that the learning rate is $\eta < \Theta \left(\frac{1}{L}\right)$ . With probability at least $1 - \delta$ , the optimization method defined in Equation (11) will visit an approximate stationary point that fulfills the first and second order conditions in Equation (12), at least once within the following number of iterations,
174
+
175
+ $$
176
+ k = \widetilde {\mathcal {O}} \left(\log \frac {1}{\delta} L \frac {J \left(\boldsymbol {u} ^ {*}\right) - J \left(\boldsymbol {u} ^ {(0)}\right)}{\epsilon^ {2}}\right). \tag {13}
177
+ $$
178
+
179
+ For the objective function in Equation (8), the Lipschitz constant can be estimated using the derivative bounds from Lemma 3.5,
180
+
181
+ $$
182
+ L \leq T \delta \| \mu \| ^ {2} + 2 \alpha \delta . \tag {14}
183
+ $$
184
+
185
+ Since we do not assume an upper bound on $\alpha$ , we will treat $L$ as a separate constant.
186
+
187
+ # 3. Quantum algorithm and complexity analysis
188
+
189
+ In order to access the objective function in Equation (2), a time discretization is needed to approximate the integral and the wave function $\psi(T)$ by numerical integrators, as alluded
190
+
191
+ to in the previous section. To begin with, we write $\widetilde{J}$ as two terms: $\widetilde{J} (\pmb {u}) = \widetilde{J}_1(\pmb {u}) + \widetilde{J}_2(\pmb {u})$ , where
192
+
193
+ $$
194
+ \widetilde {J} _ {1} (\boldsymbol {u}) := \left\langle \psi_ {N} \right| O \left| \psi_ {N} \right\rangle \quad \text {a n d} \tag {15}
195
+ $$
196
+
197
+ $$
198
+ \widetilde {J} _ {2} (\boldsymbol {u}) := \alpha \delta \sum_ {j = 1} ^ {N} w _ {j} u \left(t _ {j}\right) ^ {2}. \tag {16}
199
+ $$
200
+
201
+ Note the $\widetilde{J}_2$ is easy to compute on a classical computer. Thus we only focus on $\widetilde{J}_1$ , and use a quantum algorithm to speed up its calculation.
202
+
203
+ # 3.1. Obtaining the final state
204
+
205
+ To have quantum access to $\widetilde{J}_1$ , we need to efficiently prepare of $|\psi_N\rangle$ via a time-marching procedure, i.e.,
206
+
207
+ $$
208
+ \left| \psi_ {N} \right\rangle = V \left(t _ {N}, t _ {N - 1}\right) V \left(t _ {N - 1}, t _ {N - 2}\right) \dots V \left(t _ {1}, t _ {0}\right) \left| \psi_ {0} \right\rangle . \tag {17}
209
+ $$
210
+
211
+ Note that $t_N = T$ . At each step, the dynamics is evolved via an operator $V(t_j, t_{j-1})$ . For instance, in the Dyson series approach (Low & Wiebe, 2018; Kieferova et al., 2019), the operator $V$ can be constructed as follows,
212
+
213
+ $$
214
+ V \left(t _ {j + 1}, t _ {j}\right) =
215
+ $$
216
+
217
+ $$
218
+ \sum_ {k = 0} ^ {K} \frac {(- i \delta) ^ {k}}{M ^ {k} k !} \sum_ {j _ {1}, j _ {2}, \dots , j _ {k} = 0} ^ {M - 1} \mathcal {T} H \left(s _ {j _ {k}}\right) \dots H \left(s _ {j _ {1}}\right). \tag {18}
219
+ $$
220
+
221
+ Here the symbol $\mathcal{T}$ indicates that only those points where $s_{j_1} \leq s_{j_2} \leq \dots \leq s_{j_k}$ are collected. The points are selected to approximate the integrals in the Dyson series expansion (Berry et al., 2017). The complexity estimate was presented in Theorem 9 of (Low & Wiebe, 2018). We use a more efficient simulation algorithm by Berry, Childs, Su, Wang, and Wiebe (Berry et al., 2020) where the dependence on $T\max_t\|H(t)\|_{\max}$ has later been relaxed to an averaged $L_1$ norm in time.
222
+
223
+ Lemma 3.1 ((Berry et al., 2020)). Assume that $n$ -bit Hamiltonian $H(t)$ is $d$ -sparse for all $t \in [0, T]$ . The TDSE in Equation (1) can be simulation until time $T$ within error $\epsilon$ and failure probability $\mathcal{O}(\epsilon)$ using
224
+
225
+ $$
226
+ \mathcal {O} \left(d \int_ {0} ^ {T} d \tau \| H (\tau) \| _ {\max } \frac {\log \left(d H _ {\max } T / \epsilon\right)}{\log \log \left(d H _ {\max } T / \epsilon\right)}\right), \tag {19}
227
+ $$
228
+
229
+ queries to the oracle of $H(t)$ and $\widetilde{\mathcal{O}}(dn\int_0^T\mathrm{d}\tau \|H(\tau)\|_{\max})$ additional 1- and 2-qubit gates.
230
+
231
+ Once $|\psi_N\rangle$ from Equation (17) is prepared by Lemma 3.1, we can use it to estimate the gradient of $\widetilde{J}$ defined in Equation (8). We take advantage of quantum gradient estimation algorithms to estimate $\nabla \widetilde{J}$ . These algorithms require certain quantum access to the function. In particular, we define the two commonly used oracles, namely, the probability oracle and the phase oracle as follows.
232
+
233
+ Definition 3.2 (Probability oracle). Consider a function $f: \mathbb{R}^d \to [0,1]$ . The probability oracle for $f$ , denoted by $U_f$ , is a unitary defined as
234
+
235
+ $$
236
+ U _ {f} | \boldsymbol {x} \rangle | \mathbf {0} \rangle = \tag {20}
237
+ $$
238
+
239
+ $$
240
+ | \pmb {x} \rangle \left(\sqrt {f (\pmb {x})} | 1 \rangle | \phi_ {1} (\pmb {x}) \rangle + \sqrt {1 - f (\pmb {x})} | 0 \rangle | \phi_ {0} (\pmb {x}) \rangle\right),
241
+ $$
242
+
243
+ where $|\phi_1(\pmb {x})\rangle$ and $|\phi_0(\pmb {x})\rangle$ are arbitrary states.
244
+
245
+ Definition 3.3 (Phase oracle). Consider a function $f: \mathbb{R}^d \to \mathbb{R}$ . The phase oracle for $f$ , denoted by $O_f$ , is a unitary defined as
246
+
247
+ $$
248
+ O _ {f} | \mathbf {x} \rangle | \mathbf {0} \rangle = e ^ {i f (\mathbf {x})} | \mathbf {x} \rangle | \mathbf {0} \rangle . \tag {21}
249
+ $$
250
+
251
+ The following result from Theorem 14 of (Gilyén et al., 2019a) shows an efficient conversion from the probability oracle to the phase oracle.
252
+
253
+ Lemma 3.4. Consider a function $f:\mathbb{R}^d\to [0,1]$ . Let $U_{f}$ be the probability oracle for $f$ . Then, for any $\epsilon \in (0,1 / 3)$ , we can implement an $\epsilon$ -approximate of the phase oracle $O_{f}$ for $f$ , denoted by $\widetilde{O}_f$ , such that $\left\| \widetilde{O}_f|\psi \rangle |\pmb {x}\rangle -O_f|\psi \rangle |\pmb {x}\rangle \right\| \leq \epsilon$ , for all state $|\psi \rangle$ . This implementation uses $\mathcal{O}(\log (1 / \epsilon))$ invocations to $U_{f}$ and $U_{f}^{\dagger}$ and $\mathcal{O}(\log \log (1 / \epsilon))$ additional qubits.
254
+
255
+ We will show how to construct the required oracle for $\widetilde{J}_1$ given the circuit that prepares $|\psi_N\rangle$ in the proof of Theorem 3.9. Before that, let us focus on higher-order derivatives of $\widetilde{J}_1$ , which are crucial in quantum algorithms for estimating the gradient of $\widetilde{J}_1$ .
256
+
257
+ # 3.2. High-order derivatives of the objective function
258
+
259
+ In this subsection, we bound the magnitude of higher-order derivatives of $\widetilde{J}_1$ . In particular, we show the following lemma. The proof can be found in Appendix A.
260
+
261
+ Lemma 3.5. Let $\alpha = (\alpha_{1},\ldots ,\alpha_{k})\in [N + 1]^{k}$ be an index sequence<sup>3</sup>. The derivatives of the control function $\widetilde{J}_1$ with respect to the control variables satisfy:
262
+
263
+ $$
264
+ \left\| \frac {\partial^ {\alpha} \widetilde {J} _ {1}}{\partial u _ {\alpha_ {1}} u _ {\alpha_ {2}} \cdots u _ {\alpha_ {k}}} \right\| \leq (k + 1)! (\delta \| \mu \|) ^ {k}. \tag {22}
265
+ $$
266
+
267
+ # 3.3. Quantum gradient estimation
268
+
269
+ In this subsection, we show how to efficiently estimate the gradient of $\widetilde{J}_1$ . In the following, we state a quantum algorithm for estimating gradients due to Gilyén, Arunachalam, and Wiebe (Gilyén et al., 2019a), which is an extension Jordan's gradient estimation algorithm (Jordan, 2005). Note
270
+
271
+ # Algorithm 1 Quantum algorithm for solving QOC
272
+
273
+ Given $T > 0$ and $\epsilon > 0$ , set $N = \frac{T^{3/2}}{\epsilon^{1/2}}$ , and $k_{\max} = \mathcal{O}\left(\frac{L}{\epsilon^2}\right)$ where $L$ is bounded by Equation (14); set $u(t) = 0$ for $k = 1 : k_{\max}$ do
274
+
275
+ Use Lemmas 3.1 and 3.4 to construct the phase oracle for $\widetilde{J}_1(\boldsymbol{u})$
276
+
277
+ Use Lemma 3.7 to estimate $\pmb{g}^{(k)} \approx \nabla J(\pmb{u}^{(k)})$
278
+
279
+ Update control variable: $\pmb{u}^{(k + 1)} = \pmb{u}^{(k)} + \eta \pmb{g}^{(k)} + \eta \pmb{\zeta}_k$ and for
280
+
281
+ that there exists a nearly-optimal gradient estimation, i.e., Theorem 25 of (Gilyén et al., 2019a); however, this result does not directly apply to our setting since the derivatives, as characterized in Lemma 3.5, do not satisfy the bound $c^k k^{k/2}$ . To give a more efficient estimation algorithm than just relying on the bound on the Hessian, we use the following result based on a higher-order finite difference method.
282
+
283
+ Lemma 3.6 (Rephrased from Theorem 23 of (Gilyén et al., 2019a)). Suppose the access to $f:[-1,1]^N\to \mathbb{R}$ is given via a phase oracle $O_{f}$ . If $f$ is $(2m + 1)$ -times differentiable and for all $x\in [-1,1]^N$ it holds that
284
+
285
+ $$
286
+ \left| \partial_ {\boldsymbol {r}} ^ {2 m + 1} f (\boldsymbol {x}) \right| \leq B \quad \text {f o r} \boldsymbol {r} = \boldsymbol {x} / \| \boldsymbol {x} \|, \tag {23}
287
+ $$
288
+
289
+ then there exists a quantum algorithm that output an approximate gradient $\pmb{g}$ such that $\| \pmb {g} - \nabla f(\mathbf{0})\|_{\infty}\leq \epsilon$ with probability at least $1 - \rho$ using
290
+
291
+ $$
292
+ \widetilde {\mathcal {O}} \left(\frac {N ^ {1 / 2} B ^ {1 / (2 m)} N ^ {1 / (4 m)} \log (N / \rho)}{\epsilon^ {1 + 1 / (2 m)}}\right) \tag {24}
293
+ $$
294
+
295
+ queries to $O_{f}$ , and $\tilde{\mathcal{O}}(N)$ additional 1- and 2-qubit gates.
296
+
297
+ Based on Lemma 3.6, we have the following result, where the proof is postponed in Appendix B.
298
+
299
+ Lemma 3.7. Let $\widetilde{J}_1$ be defined as in Equation (15). Suppose we are given access to the phase oracle $O_{\widetilde{J}_1}$ for $\widetilde{J}_1$ . Then, there exists a quantum algorithm that outputs an approximate gradient $\pmb{g}$ such that $\left\| \pmb{g} - \nabla \widetilde{J}_1 \right\| \leq \epsilon$ with probability at least $1 - \rho$ using $\widetilde{\mathcal{O}}(T \log(N / \rho) / \epsilon)$ queries to $O_{\widetilde{J}_1}$ , and $\widetilde{\mathcal{O}}(N)$ additional 1- and 2-qubit gates.
300
+
301
+ # 3.4. Proof of the main theorem
302
+
303
+ We outline the combined algorithm in Algorithm 1. The bound on $k_{\mathrm{max}}$ follows from Equation (13).
304
+
305
+ Before proving the performance of Algorithm 1, we need to bound the $L_{1}$ norm $\int_0^T\mathrm{d}\tau \| H(t)\|_{\max}$ , which depends on the $L_{1}$ norm of control function. Although in general, no explicit formula is available for $u(t)$ , we can deduce some a priori bounds on $u(t)$ .
306
+
307
+ Lemma 3.8. Suppose that $\|O\| \leq 1$ , and $\alpha > \frac{2}{T}$ . Let $u^{(1)}, \ldots, u^{(k)}$ be a sequence of control variables obtained from each iteration of Algorithm 1. Let $u^{(1)}(t) = 0$ be the initial guess. Then for all $j \in [k]$ , the $L_{1}$ norms of the control functions satisfy $\int_0^T |u^{(1)}(t)| \mathrm{d}t \leq T$ .
308
+
309
+ Proof. First of all, note that $J(u^{(1)}) \geq -1$ . For all $j = 2, \ldots, k$ , we have $J(u^{(j)}) \geq J(u^{(1)}) \geq -1$ . Again using the fact that $\| O \| \leq 1$ , we find $\int_0^T |u^{(j)}(t)|^2 \mathrm{d}t \leq 2 / \alpha \leq T$ . Using Cauchy-Schwarz inequality, we have,
310
+
311
+ $$
312
+ \int_ {0} ^ {T} \left| u ^ {(j)} (t) \right| \mathrm {d} t \leq \left[ \int_ {0} ^ {T} \left| u ^ {(j)} (t) \right| ^ {2} \mathrm {d} t \right] ^ {\frac {1}{2}} T ^ {\frac {1}{2}} \leq T. \tag {25}
313
+ $$
314
+
315
+ ![](images/14ab4f5666ee19d8629f429a28d2cccebebddb9f1b83aced7a5689e6ddb7c81d.jpg)
316
+
317
+ The inequality $J(u^{(j)}) \geq J(u^{(1)})$ follows from a function ascent property in Equation (31), which as we will illustrate in the proof of Theorem 3.9, occurs with high probability. Because $\| H_0\|, \| \mu \| \leq 1$ , Lemma 3.8 implies that
318
+
319
+ $$
320
+ \int_ {0} ^ {T} \mathrm {d} \tau \| H (t) \| _ {\max } = \mathcal {O} (T). \tag {26}
321
+ $$
322
+
323
+ Now, we are ready to state the main result of this section.
324
+
325
+ Theorem 3.9. Assume that $u(t) \in \mathrm{C}^2([0, T])$ . There exists a quantum algorithm that, with probability at least $2/3$ , solves Problem 1.1 using $\widetilde{\mathcal{O}}\left(\frac{dLT^2}{\epsilon^3}\right)$ queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ , and $\widetilde{\mathcal{O}}\left(\frac{dnLT^2}{\epsilon^3} + \frac{LT^{3/2}}{\epsilon^{5/2}}\right)$ additional 1- and 2-qubit gates. The Lipschitz constant $L$ can be bounded by Equation (14).
326
+
327
+ Proof. Recall that by using Lemma 3.1, we can obtain $|\psi_N\rangle$ given $|\psi_0\rangle$ . Now, we show how to construct the oracle to estimate the gradient of $\widetilde{J}$ . We first construct the probability oracle $U_{\widetilde{J}_1}$ for $\widetilde{J}_1$ by a Hadamard test circuit. Note that this oracle is well-defined because we have assumed that $\|O\| \leq 1$ . In addition, we need access to a block-encoding $U_O$ of $O$ , which is a unitary of the form
328
+
329
+ $$
330
+ U _ {O} = \left[ \begin{array}{c c} O & \cdot \\ \cdot & \cdot \end{array} \right]. \tag {27}
331
+ $$
332
+
333
+ Hence, $\langle 0|\langle \psi_N|U_O|0\rangle |\psi_N\rangle = \langle \psi_N|O|\psi_N\rangle$ . Let $\mathfrak{c}-U_O$ denote the controlled $U_O$ . The Hadamard test circuit $(H\otimes I)(\mathfrak{c}-U_O)(H\otimes I)$ acting on $|0\rangle |\psi_N\rangle$ produces,
334
+
335
+ $$
336
+ \sqrt {f (\boldsymbol {u})} | 1 \rangle \left| \phi_ {1} (\boldsymbol {u} \rangle + \sqrt {1 - f (\boldsymbol {u})} | 0 \rangle \right| \phi_ {0} (\boldsymbol {u} \rangle , \tag {28}
337
+ $$
338
+
339
+ for $f(\pmb{u}) \coloneqq -\frac{1}{2}\langle \psi_N|O|\psi_N\rangle +\frac{1}{2}$ . Note that we actually constructed the probability oracle for $f(\pmb{u})$ instead of $\langle \psi_N|O|\psi_N\rangle$ . However, this is fine because the gradient of the latter is the gradient of the former multiplied by a factor $-1/2$ . In addition, we note that the block-encoding $U_O$ can be efficiently constructed using the sparse-access oracles for $O$ (see Lemma 48 of (Gilyén et al., 2019b)). It is important to note that the implementation of the time-dependent Hamiltonian simulation by using Lemma 3.1 uses some control variable $\pmb{u}$ as part of the input. Such Hamiltonian simulation circuits can be made coherent, i.e., it can be used when the register containing the control variable $\pmb{u}$ is in superposition. In addition, we use $U_{\psi_0}$ to prepare the initial state $|\psi_0\rangle$ from $|0\rangle$ for Hamiltonian simulation. Due to the bound on the $L_1$ norm in Equation (26), we can implement the probability oracle $U_{\widetilde{J}_1}$ as defined in Definition 3.2 using $\widetilde{\mathcal{O}}(dT)$ queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ . We highlight that the oracle for the time-dependent Hamiltonian can be efficiently implemented. The values of the control function away from the nodal points can be easily computed by linear interpolation. Thus, we store $\mathcal{O}(N)$ parameters in QRAM to construct the input oracle. The gate complexity of the addressing scheme for QRAM is $\widetilde{\mathcal{O}}(N)$ , which is polynomial in $T$ and $\epsilon$ due to Equation (10). The circuit depth of the addressing scheme is $\mathcal{O}(\log N)$ . As a result, considering the gate- and time-complexities of implementing QRAM, the Hamiltonian simulation is still efficient. Further, in special cases of our control models where the form of $u(t)$ is known, while the parameters in $u(t)$ need to be determined, we do not need QRAM because $u(t)$ can be computed by an efficient subroutine.
340
+
341
+ Next, we use Lemma 3.4 to construct an $\epsilon$ -approximate phase oracle $\widetilde{O}_f$ defined in Definition 3.3 using $\mathcal{O}(1)$ queries to $U_{\widetilde{J}_1}$ and hence $\widetilde{\mathcal{O}}(dT)$ queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ .
342
+
343
+ Using Lemma 3.7, we can obtain a vector $\pmb{g}$ such that $\left\| \pmb {g} - \nabla \widetilde{J}_1 / 2\right\| \leq \epsilon$ with probability at least $1 - \rho$ using $\widetilde{\mathcal{O}} (T\log (N / \rho) / \epsilon)$ queries to $O_{\widetilde{J}_1}$ . Hence, the number of queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ is
344
+
345
+ $$
346
+ \widetilde {\mathcal {O}} \left(\frac {d T ^ {2} \log (N / \rho)}{\epsilon}\right). \tag {29}
347
+ $$
348
+
349
+ Now we use Theorem 2.3, and analyze the error caused by the estimation error in the spectral norm. We consider the gradient iteration method with the noise $\zeta_{k} = 0$
350
+
351
+ $$
352
+ \boldsymbol {u} ^ {(k + 1)} = \boldsymbol {u} ^ {(k)} + \eta \left(\boldsymbol {g} _ {k} + \boldsymbol {\zeta} _ {k}\right). \tag {30}
353
+ $$
354
+
355
+ The main departure from the optimization algorithm in Equation (11) is that an approximation $\pmb{g}_k$ of the gradient of a loss function $\nabla J(\pmb{u}^{(k)})$ is used. We denote the error by
356
+
357
+ $$
358
+ \boldsymbol {e} _ {k} := \boldsymbol {g} _ {k} - \nabla J (\boldsymbol {u} ^ {(k)}).
359
+ $$
360
+
361
+ The proof of Theorem 2.3 in (Jin et al., 2021) relies on a descent property: Lemma B.1 in (Jin et al., 2021). Following this approach, we first show that the following inequality holds with probability at least $1 - \nu$ ,
362
+
363
+ $$
364
+ J (\boldsymbol {u} ^ {(k)}) \geq J (\boldsymbol {u} ^ {(0)}) + \frac {\eta}{2} \sum_ {j = 0} ^ {k - 1} \left\| \nabla J (\boldsymbol {u} ^ {(j)}) \right\| ^ {2} - \frac {k \eta \epsilon^ {2}}{4} \tag {31}
365
+ $$
366
+
367
+ where the algorithm in Lemma 3.7 is implemented with $\rho = \nu /k$ . We leave the derivation of this inequality to Appendix C.
368
+
369
+ In light of Equation (8), the fact that $w_{j} = \mathcal{O}(1)$ , and the derivative bounds in Lemma 3.5, we see that the Lipschitz constant of $\nabla J$ is $L = \mathcal{O}\big((1 + \alpha)\sqrt{N}\delta \big)$ . Now if we choose the number of iterations,
370
+
371
+ $$
372
+ k = 4 L \frac {J ^ {*} - J (\boldsymbol {u} ^ {(0)})}{\epsilon^ {2}}, \tag {32}
373
+ $$
374
+
375
+ and suppose that $\| \nabla J(\pmb{u}^{(j)})\| > \epsilon, \forall j \in [k]$ . Namely, the iterations never reached a critical point. Then the descent property implies that $J(\pmb{u}^{(k)}) - J(\pmb{u}^{(0)}) \geq \frac{k\eta\epsilon^2}{4}$ with probability $1 - \nu$ , which would lead to a contradiction $J(\pmb{u}^{(k)}) - J(\pmb{u}^{(0)}) > J^* - J(\pmb{u}^{(0)})$ . Consequently, the iterations in Equation (30) will fulfill the first order condition. The rest of the proof can be completed by following the proof in (Jin et al., 2021).
376
+
377
+ We use $\nu$ instead of $\rho$ in Equation (29). The complexity only depends on $\nu$ logarithmically. As a result, we have the claimed overall query complexity. The gate complexity for each iteration is dominated by the gradient estimation and time-dependent Hamiltonian simulation, i.e., $\tilde{\mathcal{O}}(dnLT^2/\epsilon + N) = \tilde{\mathcal{O}}(dnLT^2/\epsilon + T^{3/2}/\epsilon^{1/2})$ .
378
+
379
+ # 4. Quantum dynamics with smooth control
380
+
381
+ The estimates in the previous sections have been obtained based on the mild assumption that the control function $u(t)$ is only $\mathrm{C}^2$ . Meanwhile, there are various scenarios where the control function is parameterized using smooth functions (Song et al., 2022; Machnes et al., 2018). For example, rather than controlling point-wise values of $u(t)$ , one can express $u(t)$ as Fourier series and then the control parameters are reduced to Fourier coefficients. One important implication is that the corresponding solution of the TDSE is smooth as well, in which case, the algorithms presented in Section 3 can be greatly improved. In particular, both the wave function $\psi(T)$ and the integral of the control function within a time interval can be approximated with arbitrary
382
+
383
+ order $p$ . Namely,
384
+
385
+ $$
386
+ \begin{array}{l} \left| \psi (\delta) \right\rangle - \left| \psi_ {1} \right\rangle = \widetilde {\mathcal {O}} \left(\frac {\delta^ {p + 1}}{(p + 1) !}\right), \\ \int_ {0} ^ {\delta} u (t) ^ {2} d t - \delta \sum_ {j} w _ {j} u _ {j} = \widetilde {\mathcal {O}} \left(\frac {\delta^ {p + 1}}{(p + 1) !}\right). \tag {33} \\ \end{array}
387
+ $$
388
+
389
+ for arbitrary order $p$ . Without loss of generality, we have expressed the approximations here for the first time step.
390
+
391
+ For the approximation of the integral, Gaussian quadrature can be used to obtain maximum accuracy. For the approximation of the wave function, such accuracy has been obtained in the Dyson series approach (Kieferova et al., 2019) even without this smoothness assumption.
392
+
393
+ To ensure that the error from the approximation of $|\psi (T)\rangle$ is within precision $\epsilon$ , we force the one-step error to be below $\epsilon /N$ . Since $p$ can be chosen arbitrarily, the step size $\delta = \mathcal{O}(1)$ . In light of Equation (33), this error bound can be achieved if we choose $p$ as follows,
394
+
395
+ $$
396
+ p = \Theta \left(\frac {\log N / \epsilon}{\log \log N / \epsilon}\right) = \Theta \left(\frac {\log T / \epsilon}{\log \log T / \epsilon}\right). \tag {34}
397
+ $$
398
+
399
+ Consequently, the number of time steps $N = T / \delta$ is improved from Equation (10) to
400
+
401
+ $$
402
+ N = \Theta \left(T \frac {\log T / \epsilon}{\log \log N / \epsilon}\right) = \widetilde {\mathcal {O}} (T). \tag {35}
403
+ $$
404
+
405
+ Overall, the smoothness of the control variable $u(t)$ allows us to use high-order approximations and it reduces the extra gates used in Lemma 3.6 by a factor of $T^{1/2} / \epsilon^{1/2}$ . However, the smoothness does not improve the query complexity and the overall gate complexity because the number of queries depend on $T = N\delta$ , no matter how small $N$ is.
406
+
407
+ To summarize this section, we have the following theorem.
408
+
409
+ Theorem 4.1. Assume that $u(t)$ is smooth. There exists a quantum algorithm that, with probability at least $2/3$ , solves Problem 1.1 using $\widetilde{\mathcal{O}}\left(\frac{dLT^2}{\epsilon^3}\right)$ queries to $\mathcal{P}_{H_0}$ and $\mathcal{P}_{\mu}$ , and $\widetilde{\mathcal{O}}\left(\frac{dnLT^2}{\epsilon^3} + \frac{LT}{\epsilon^2}\right)$ additional 1- and 2-qubit gates. The Lipschitz constant $L$ can be bounded by Equation (14).
410
+
411
+ Proof. The proof is similar to that of Theorem 3.9. We use the number of steps $N$ as in Equation (35) to obtain this improved gate complexity. $\square$
412
+
413
+ # 5. Numerical Example
414
+
415
+ Here we consider a one-dimensional model similar to (Zhu & Rabitz, 1998b). The Hamiltonian $H_0$ is a tri-diagonal
416
+
417
+ matrix corresponding to a three-point discrete Laplacian operator. The operator $\mu$ and $O$ are diagonal,
418
+
419
+ $$
420
+ \mu = \sum_ {r} r e ^ {- r / r _ {0}} | r \rangle \langle r |, O = \sum_ {r} \frac {\gamma_ {0}}{\pi} e ^ {- \gamma_ {0} ^ {2} r ^ {2}} | r \rangle \langle r |.
421
+ $$
422
+
423
+ The step size is set to $\delta = 0.02$ .
424
+
425
+ In the optimization, we choose the learning rate to be 0.04. Using $u(t) = 0$ as the initial guess, we apply Equation (11) for 2000 iterations. Figure 1 shows that the objective function has reached a plateau. As comparison, we run the algorithms with exactly computed gradient, and perturb gradients with noise. We observe that even with noise perturbations, the gradient-based algorithm still converges to the same maximum. In addition, as shown in Figure 2, the resulting control variable exhibits some statistical fluctuations; however, it still remains close to the optimal control variable, indicating its resilience to noisy perturbations.
426
+
427
+ ![](images/b80c599e91faeb8cb10640afa0d0b030acaacc9af59e7b92fadb917eee68d9f8.jpg)
428
+ Figure 1. The loss function during 2000 iterations.
429
+
430
+ ![](images/2ad5b4e067ff1454d57002b5635842489ec769166d474823e066c6c313353de2.jpg)
431
+ Figure 2. The control function after 2000 iterations.
432
+
433
+ # 6. Acknowledgements
434
+
435
+ We thank the anonymous reviewers for the valuable comments. We are also grateful to Wenhao He for pointing out a miscalculation of the gate complexity in an earlier version of this paper. XL's research is supported by the National Science Foundation Grants DMS-2111221. CW acknowledges support from National Science Foundation grant CCF-2238766 (CAREER). Both XL and CW were supported by a seed grant from the Institute of Computational and Data Science (ICDS).
436
+
437
+ # References
438
+
439
+ Albertini, F. and D'Alessandro, D. The Lie algebra structure and controllability of spin systems. Linear Algebra and its Applications, 350(1-3):213-235, July 2002. ISSN 00243795. doi: 10.1016/S0024-3795(02)00290-2. URL https://linkinghub.elsevier.com/retrieve/pii/S0024379502002902.
440
+ Banchi, L. and Crooks, G. E. Measuring analytic gradients of general quantum evolution with the stochastic parameter shift rule. Quantum, 5:386, 2021.
441
+ Berry, D. W., Childs, A. M., Ostrander, A., and Wang, G. Quantum algorithm for linear differential equations with exponentially improved dependence on precision. Communications in Mathematical Physics, 356(3):1057-1081, 2017.
442
+ Berry, D. W., Childs, A. M., Su, Y., Wang, X., and Wiebe, N. Time-dependent Hamiltonian simulation with $l^1$ -norm scaling. Quantum, 4:254, 2020.
443
+ Brif, C., Chakrabarti, R., and Rabitz, H. Control of quantum phenomena: past, present and future. New Journal of Physics, 12(7):075008, July 2010. ISSN 1367-2630. doi: 10.1088/1367-2630/12/7/075008. URL http://stacks.iop.org/1367-2630/12/i=7/a=075008?key=crossref. 77a344443577b6cc05c060a399fa38e1.
444
+ Castro, A., Marques, M. A., and Rubio, A. Propagators for the time-dependent kohn-sham equations. The Journal of chemical physics, 121(8):3425-3433, 2004.
445
+ Castro, A., Werschnik, J., and Gross, E. K. U. Controlling the Dynamics of Many-Electron Systems from First Principles: A Combination of Optimal Control and Time-Dependent Density-Functional Theory. Physical Review Letters, 109(15), October 2012. ISSN 0031-9007, 1079-7114. doi: 10.1103/PhysRevLett.109.153603. URL https://link.aps.org/doi/10.1103/PhysRevLett.109.153603.
446
+
447
+ Cerezo, M., Arrasmith, A., Babbush, R., Benjamin, S. C., Endo, S., Fujii, K., McClean, J. R., Mitarai, K., Yuan, X., Cincio, L., et al. Variational quantum algorithms. Nature Reviews Physics, 3(9):625-644, 2021.
448
+ Chakraborty, S., Gilyén, A., and Jeffery, S. The power of block-encoded matrix powers: Improved regression techniques via faster Hamiltonian simulation. In Proceedings of the 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019), 2019.
449
+ Childs, A. M. and Liu, J.-P. Quantum spectral methods for differential equations. arXiv preprint arXiv:1901.00961, 2019.
450
+ Choquette, A., Di Paolo, A., Barkoutsos, P. K., Sénéchal, D., Tavernelli, I., and Blais, A. Quantum-optimal-control-inspired ansatz for variational quantum algorithms. Physical Review Research, 3(2):023092, 2021.
451
+ Ciaramella, G., Borzi, A., Dirr, G., and Wachsmuth, D. Newton Methods for the Optimal Control of Closed Quantum Spin Systems. SIAM Journal on Scientific Computing, 37 (1):A319-A346, January 2015. ISSN 1064-8275, 1095-7197. doi: 10.1137/140966988. URL http://epubs.siam.org/doi/10.1137/140966988.
452
+ Crooks, G. E. Gradients of parameterized quantum gates using the parameter-shift rule and gate decomposition. arXiv preprint arXiv:1905.13311, 2019.
453
+ D'Alessandro, D. Topological properties of reachable sets and the control of quantum bits. Systems & Control Letters, 41(3):213-221, October 2000. ISSN 01676911. doi: 10.1016/S0167-6911(00)00063-3. URL https://linkinghub.elsevier.com/retrieve/pii/S0167691100000633.
454
+ D'Alessandro, D. Introduction to quantum control and dynamics. Chapman & Hall/CRC applied mathematics and nonlinear science series. Chapman & Hall/CRC, Boca Raton, 2008. ISBN 978-1-58488-884-0. OCLC: ocn123539646.
455
+ Datta, S. Quantum transport: Atom to transistor. Cambridge University Press, 2005.
456
+ Deuflhard, P. and Bornemann, F. Scientific computing with ordinary differential equations, volume 42. Springer Science & Business Media, 2002.
457
+ E, W., Han, J., and Li, Q. A mean-field optimal control formulation of deep learning. *Res. Math. Sci.*, 6:1-41, 2019.
458
+ Eitan, R., Mundt, M., and Tannor, D. J. Optimal control with accelerated convergence: Combining the Krotov and quasi-Newton methods. Physical Review A, 83(5),
459
+
460
+ May 2011. ISSN 1050-2947, 1094-1622. doi: 10.1103/PhysRevA.83.053426. URL https://link.aps.org/doi/10.1103/PhysRevA.83.053426.
461
+ Farhi, E., Goldstone, J., and Gutmann, S. A quantum approximate optimization algorithm. arXiv preprint arXiv:1411.4028, 2014.
462
+ Geppert, D., Seyfarth, L., and de Vivie-Riedle, R. Laser control schemes for molecular switches. Appl. Phys. B, 79(8):987-992, 2004.
463
+ Gilyén, A., Arunachalam, S., and Wiebe, N. Optimizing quantum optimization algorithms via faster quantum gradient computation. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1425-1444. SIAM, 2019a.
464
+ Gilyén, A., Su, Y., Low, G. H., and Wiebe, N. Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pp. 193-204. ACM, 2019b.
465
+ Glaser, S. J., Boscain, U., Calarco, T., Koch, C. P., Kockenberger, W., Kosloff, R., Kuprov, I., Luy, B., Schirmer, S., Schulte-Herbruggen, T., Sugny, D., and Wilhelm, F. K. Training Schrödinger's cat: quantum optimal control: Strategic report on current status, visions and goals for research in Europe. The European Physical Journal D, 69(12), December 2015. ISSN 1434-6060, 1434-6079. doi: 10.1140/epjd/e2015-60464-1. URL http://link.springer.com/10.1140/epjd/e2015-60464-1.
466
+ He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., pp. 770-778, 2016.
467
+ Hellgren, M., Räsänen, E., and Gross, E. K. U. Optimal control of strong-field ionization with time-dependent density-functional theory. Physical Review A, 88(1), July 2013. ISSN 1050-2947, 1094-1622. doi: 10.1103/ PhysRevA.88.013414. URL https://link.aps.org/doi/10.1103/PhysRevA.88.013414.
468
+ Jin, C., Netrapalli, P., Ge, R., Kakade, S. M., and Jordan, M. I. A short note on concentration inequalities for random vectors with subgaussian norm. arXiv preprint arXiv:1902.03736, 2019.
469
+ Jin, C., Netrapalli, P., Ge, R., Kakade, S. M., and Jordan, M. I. On nonconvex optimization for machine learning: Gradients, stochasticity, and saddle points. Journal of the ACM (JACM), 68(2):1-29, 2021.
470
+
471
+ Jordan, S. P. Fast quantum algorithm for numerical gradient estimation. Physical Review Letters, 95(5):050501, 2005.
472
+ Kieferova, M., Scherer, A., and Berry, D. W. Simulating the dynamics of time-dependent hamiltonians with a truncated dyson series. Physical Review A, 99(4):042314, 2019.
473
+ Kincaid, D., Kincaid, D. R., and Cheney, E. W. Numerical analysis: mathematics of scientific computing, volume 2. American Mathematical Soc., 2009.
474
+ Kyriienko, O. and Elfving, V. E. Generalized quantum circuit differentiation rules. Physical Review A, 104(5): 052417, 2021.
475
+ Larocca, M., Ju, N., García-Martín, D., Coles, P. J., and Cerezo, M. Theory of overparametrization in quantum neural networks. arXiv preprint arXiv:2109.11676, 2021.
476
+ Larocca, M., Czarnik, P., Sharma, K., Muraleedharan, G., Coles, P. J., and Cerezo, M. Diagnosing barren plateaus with tools from quantum optimal control. Quantum, 6: 824, 2022.
477
+ Leng, J., Peng, Y., Qiao, Y.-L., Lin, M., and Wu, X. Differentiable analog quantum computing for optimization and control. In Advances in Neural Information Processing Systems, 2022.
478
+ Li, J., Yang, X., Peng, X., and Sun, C.-P. Hybrid quantum-classical approach to quantum optimal control. Physical review letters, 118(15):150503, 2017.
479
+ Low, G. H. and Chuang, I. L. Hamiltonian simulation by qubitization. Quantum, 3:163, 2019.
480
+ Low, G. H. and Wiebe, N. Hamiltonian simulation in the interaction picture. arXiv preprint arXiv:1805.00675, 2018.
481
+ Machnes, S., Assémat, E., Tannor, D., and Wilhelm, F. K. Tunable, flexible, and efficient optimization of control pulses for practical qubits. Physical review letters, 120 (15):150401, 2018.
482
+ Maday, Y. and Turinici, G. New formulations of monotonically convergent quantum control algorithms. The Journal of Chemical Physics, 118(18):8191-8196, May 2003. ISSN 0021-9606, 1089-7690. doi: 10.1063/1.1564043. URL http://aip.scitation.org/doi/10.1063/1.1564043.
483
+ McCreery, R. L., Yan, H., and Bergren, A. J. A critical perspective on molecular electronic junctions: there is plenty of room in the middle. Phys. Chem. Chem. Phys., 15(4):1065-1081, 2013.
484
+
485
+ Nesterov, Y. Lectures on convex optimization, volume 137. Springer, 2018.
486
+ Nielsen, M. A. and Chuang, I. Quantum Computation and Quantum Information. Cambridge University Press, 2010.
487
+ Song, Y., Li, J., Hai, Y.-J., Guo, Q., and Deng, X.-H. Optimizing quantum control pulses with complex constraints and few variables through autodifferentiation. Physical Review A, 105(1):012616, 2022.
488
+ Werschnik, J. and Gross, E. K. U. Quantum Optimal Control Theory. arXiv:0707.1883 [quant-ph], July 2007. URL http://arxiv.org/abs/0707.1883.arXiv:0707.1883.
489
+ Wierichs, D., Izaac, J., Wang, C., and Lin, C. Y.-Y. General parameter-shift rules for quantum gradients. Quantum, 6: 677, 2022.
490
+ Yang, Z.-C., Rahmani, A., Shabani, A., Neven, H., and Chamon, C. Optimizing variational quantum algorithms using pontryagin's minimum principle. Physical Review X, 7(2):021027, 2017.
491
+ Zhou, Y., Yang, J., Zhang, H., Liang, Y., and Tarokh, V. Sgd converges to global minimum in deep learning via starconvex path. In International Conference on Learning Representations, 2018.
492
+ Zhu, W. and Rabitz, H. A rapid monotonically convergent iteration algorithm for quantum optimal control over the expectation value of a positive definite operator. J. Chem. Phys., 109(2):385-391, 1998a.
493
+ Zhu, W. and Rabitz, H. A rapid monotonically convergent iteration algorithm for quantum optimal control over the expectation value of a positive definite operator. The Journal of Chemical Physics, 109(2):385-391, July 1998b. ISSN 0021-9606, 1089-7690. doi: 10.1063/1.476575. URL http://aip.scitation.org/doi/10.1063/1.476575.
494
+
495
+ # A. The proof of Lemma 3.5
496
+
497
+ Proof. To understand how the objective function $J$ depends on the control variables, we first explicitly write the piecewise-linear interpolating function using shape functions $b_{j}(t)$ ,
498
+
499
+ $$
500
+ u _ {I} (t) = \sum_ {j} u _ {j} b _ {j} (t),
501
+ $$
502
+
503
+ where $b_{j}(t)$ 's are standard hat functions. We first examine the derivatives of $|\psi (T)\rangle$ with respect to the control variables. Following the TDSE in Equation (1), we can write the derivative of $\psi (t)$ with respect to $u_{j}$ , $\phi_1(t)\coloneqq \partial_{u_j}\psi (t)$ , as follows,
504
+
505
+ $$
506
+ i \partial_ {t} \phi_ {1} = H (t) \phi_ {1} - \mu b _ {j} (t) \psi (t). \tag {36}
507
+ $$
508
+
509
+ Known as a variational equation (Deuflhard & Bornemann, 2002), such an equation characterizes the dependence of the solution on the parameters in an evolution equation. By using variation-of-constant formula, we find
510
+
511
+ $$
512
+ \phi_ {1} (t) = i \int_ {0} ^ {t} U (t, t ^ {\prime}) \mu \psi (t ^ {\prime}) b _ {j} (t ^ {\prime}) \mathrm {d} t ^ {\prime},
513
+ $$
514
+
515
+ where $U(t, t')$ is the unitary operator generated by $H(t)$ . A straightforward bound thus follows,
516
+
517
+ $$
518
+ \| \phi (t) \| \leq \| \mu \| \delta , \forall 0 \leq t \leq T.
519
+ $$
520
+
521
+ Here we used the fact that
522
+
523
+ $$
524
+ \int_ {0} ^ {T} | b _ {j} (t) | \mathrm {d} t \leq \delta .
525
+ $$
526
+
527
+ We can continue with this calculation by letting $\phi_2(t) \coloneqq \partial_{u_j} \phi_1(t)$ for a second order derivative:
528
+
529
+ $$
530
+ i \partial_ {t} \phi_ {2} = H (t) \phi_ {2} - 2 \mu b _ {j} (t) \phi_ {1} (t).
531
+ $$
532
+
533
+ Therefore, $\| \phi_2(t) \| \leq 2(\delta \| \mu \|)^2$ . Mixed derivatives can be treated similarly and they follow a similar bound. By defining $\phi_3(t) \coloneqq \partial_{u_j} \phi_2(t)$ , we obtain,
534
+
535
+ $$
536
+ i \partial_ {t} \phi_ {3} = H _ {0} \phi_ {3} - 3 \mu b _ {j} (t) \phi_ {2} (t).
537
+ $$
538
+
539
+ By repeating this argument for higher-order derivatives, we arrive at the inequality.
540
+
541
+ $$
542
+ \left\| \frac {\partial^ {\boldsymbol {\alpha}}}{\partial u _ {\alpha_ {1}} u _ {\alpha_ {2}} \cdots u _ {\alpha_ {k}}} \psi (T) \right\| \leq k! (\delta \| \mu \|) ^ {k}. \tag {37}
543
+ $$
544
+
545
+ Consequently, the function $\widetilde{J}_1$ has derivative bounds,
546
+
547
+ $$
548
+ \left\| \frac {\partial^ {\alpha} \widetilde {J} _ {1}}{\partial u _ {\alpha_ {1}} u _ {\alpha_ {2}} \cdots u _ {\alpha_ {k}}} \right\| \leq \sum_ {j = 0} ^ {k} \binom {k} {j} (k - j)! j! (\delta \| \mu \|) ^ {k} \leq (k + 1)! (\delta \| \mu \|) ^ {k}. \tag {38}
549
+ $$
550
+
551
+ # B. Proof of Lemma 3.7
552
+
553
+ Proof. First observe that $\widetilde{J}_1(\boldsymbol{u})$ depends on $\boldsymbol{u}$ smoothly. By Lemma 3.5, we have
554
+
555
+ $$
556
+ B = \left| \nabla_ {r} ^ {2 m + 1} J \right| = \mathcal {O} ((2 m + 1)! \delta^ {2 m + 1}). \tag {39}
557
+ $$
558
+
559
+ Therefore, according to Lemma 3.6, the query complexity to achieve the error bound in the spectral norm is
560
+
561
+ $$
562
+ \widetilde {\mathcal {O}} \left(\frac {N}{\epsilon} \frac {B ^ {\frac {1}{2 m}} N ^ {\frac {1}{4 m}}}{\epsilon^ {\frac {1}{2 m}}}\right). \tag {40}
563
+ $$
564
+
565
+ We notice that by Stirling's approximation,
566
+
567
+ $$
568
+ (2 m + 1)! \approx \left(\frac {2 m + 1}{e}\right) ^ {2 m + 1}. \tag {41}
569
+ $$
570
+
571
+ Therefore, it suffices to choose
572
+
573
+ $$
574
+ m = \mathcal {O} \left(\frac {\log \left(T ^ {1 / 2} / \epsilon^ {3 / 4}\right)}{\log \log \left(T ^ {1 / 2} / \epsilon^ {3 / 4}\right)}\right), \tag {42}
575
+ $$
576
+
577
+ so that both $m$ and $(T^{1 / 2} / \epsilon^{3 / 4})^{1 / (2m)}$ are poly-logarithmic factors. As a result, we have the claimed query complexity.
578
+
579
+ # C. The function ascent property Equation (31)
580
+
581
+ We start by noticing that,
582
+
583
+ $$
584
+ \begin{array}{l} J (\boldsymbol {u} ^ {(k + 1)}) \geq J (\boldsymbol {u} ^ {(k)}) + \left(\nabla J (\boldsymbol {u} ^ {(k)}), \boldsymbol {u} ^ {(k + 1)} - \boldsymbol {u} ^ {(k)}\right) - \frac {L}{2} \left\| \boldsymbol {u} ^ {(k + 1)} - \boldsymbol {u} ^ {(k)} \right\| ^ {2} \\ \geq J (\boldsymbol {u} ^ {(k)}) + \eta \left\| \nabla J (\boldsymbol {u} ^ {(k)}) \right\| ^ {2} + \eta (\nabla J (\boldsymbol {u} ^ {(k)}), \boldsymbol {\zeta} _ {k} + \boldsymbol {e} _ {k}) - \frac {\eta}{2} \left\| \nabla J (\boldsymbol {u} ^ {(k)}) + \boldsymbol {e} _ {k} + \boldsymbol {\zeta} _ {k} \right\| ^ {2} \\ \geq J (\boldsymbol {u} ^ {(k)}) + \frac {\eta}{2} \left\| \nabla J (\boldsymbol {u} ^ {(k)}) \right\| ^ {2} - \eta \| \boldsymbol {\zeta} _ {k} \| ^ {2} - \eta \| \boldsymbol {e} _ {k} \| ^ {2}. \\ \end{array}
585
+ $$
586
+
587
+ The first line was obtained from the Lipschitz condition on the gradient. Equation (30) is then used to arrive at the second line.
588
+
589
+ By a telescoping sum, we arrive at the desired function ascent property,
590
+
591
+ $$
592
+ \begin{array}{l} J (\boldsymbol {u} ^ {(k)}) \geq J (\boldsymbol {u} ^ {(0)}) + \frac {\eta}{2} \sum_ {j = 0} ^ {k - 1} \left\| \nabla J (\boldsymbol {u} ^ {(j)}) \right\| ^ {2} \\ - \eta \sum_ {j = 0} ^ {k - 1} \| \boldsymbol {\zeta} _ {j} \| ^ {2} - \eta \sum_ {j = 0} ^ {k - 1} \| \boldsymbol {e} _ {j} \| ^ {2}. \tag {43} \\ \end{array}
593
+ $$
594
+
595
+ The noise term $\sum_{j=0}^{k-1}\|\zeta_j\|^2$ has been treated probabilistically in (Jin et al., 2021) using a concentration inequality (Jin et al., 2019), which provides a bound of $\frac{1}{8}k\epsilon^2$ with high probability. Meanwhile, we set a failure probability $\rho = \nu / k$ in the gradient estimation such that,
596
+
597
+ $$
598
+ \mathbb {P} \big (\left\| e _ {j} \right\| ^ {2} < \epsilon^ {2} / 8 \big) \geq (1 - \rho),
599
+ $$
600
+
601
+ implying that
602
+
603
+ $$
604
+ \mathbb {P} \left(\left\| e _ {j} \right\| ^ {2} < \epsilon^ {2} / 8, \forall 1 \leq j \leq k\right) \geq (1 - \rho) ^ {k} \geq 1 - \nu . \tag {44}
605
+ $$
2023/Efficient Quantum Algorithms for Quantum Optimal Control/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:398f67d0b2a4cd090a1744c3c7e79d0c6c9e9e7b7cf293968891f7f9919208a4
3
+ size 387575
2023/Efficient Quantum Algorithms for Quantum Optimal Control/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient RL via Disentangled Environment and Agent Representations/37c7f4d8-e248-4c15-9dba-91187a8ebd1c_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:569bb7e0116ce491697614fa9fd92bd16bf85a241b0cf11811b7a3757566567e
3
+ size 8994230
2023/Efficient RL via Disentangled Environment and Agent Representations/full.md ADDED
@@ -0,0 +1,516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Efficient RL via Disentangled Environment and Agent Representations
2
+
3
+ Kevin Gmelin*1 Shikhar Bahl*1 Russell Mendonca1 Deepak Pathak1
4
+
5
+ # Abstract
6
+
7
+ Agents that are aware of the separation between themselves and their environments can leverage this understanding to form effective representations of visual input. We propose an approach for learning such structured representations for RL algorithms, using visual knowledge of the agent, such as its shape or mask, which is often inexpensive to obtain. This is incorporated into the RL objective using a simple auxiliary loss. We show that our method, Structured Environment-Agent Representations (SEAR), outperforms state-of-the-art model-free approaches over 18 different challenging visual simulation environments spanning 5 different robots.
8
+
9
+ # 1. Introduction
10
+
11
+ Proprioception, i.e. the knowledge of one's own self, is heavily used by biological entities enabling them to perform various real-world tasks such as walking, manipulation, and navigation. Awareness of the position and movement of their body, and perceiving the environment as external to themselves, enables forming efficient representations of the observed input (Shapiro, 2010). In contrast, most contemporary methods in visual reinforcement learning (RL) often learn combined representations in an end-to-end manner (Kalashnikov et al., 2021; Arulkumaran et al., 2017; Kalashnikov et al., 2018; Levine et al., 2016; Peters et al., 2010) and require large amounts of data as a result. Inspired by the concept of the interface between the "inner" and "outer" environments, we study the following question: is there a natural way to build a representation that can disentangle a robotic agent from its environment, and does that improve learning efficiency for RL?
12
+
13
+ We argue that knowledge of the agent allows RL algorithms to focus on more interesting aspects of the visual input, such
14
+
15
+ *Equal contribution ${}^{1}$ Carnegie Mellon University. Correspondence to: Kevin Gmelin <kgmelin11@gmail.com>, Shikhar Bahl <sbahl2@andrew.cmu.edu>.
16
+
17
+ Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
18
+
19
+ ![](images/01d79c68cf9b9bde6ccd1a67f8c2863f0dd72bcafffaafb47cbe34d9aa3f1b0d.jpg)
20
+ Figure 1: SEAR learns structured representations for visual control, by leveraging knowledge of the robot.
21
+
22
+ as objects in the environment. Thus, by explicitly forcing the learning algorithm to disentangle agent-centric representations, we also implicitly create environment-centric ones. This allows for visual RL approaches to not only learn faster but makes the representations interpretable. Consider a policy trained on a door-opening task with one type of robot. If it is aware of the agent-environment distinction, then it will be able to adapt a lot faster when deployed on a new robot, or a new task like opening a drawer, since it will not need to relearn visual appearance and it can focus just on dynamics. How can we incorporate this into an RL training setup?
23
+
24
+ Our solution is simple: we augment the RL loss with an agent-centric auxiliary loss. Naively doing so using proprioceptive data like joint angles or end-effector positions does not result in the desired representations, as these are not grounded in the visual observation space, and do not contain information about the robot's appearance. We find that the most grounded forms of supervision are agent masks. If some information is known about the agent, it is often quite practical to obtain (even rough) masks for agents, for example, by training a segmentation model.
25
+
26
+ Our approach, Structured Environment-Agent Representations (SEAR), formulates the agent-environment representation learning problem as an auxiliary loss to the RL objective. This loss is the sum of the reconstruction loss of the agent mask and the full image as shown in Figure 2.
27
+
28
+ ![](images/c8ec3b227f4391233969111c128bf72b732aed5c69b1fc5ca3fc5b43a7891a3f.jpg)
29
+ Figure 2: Overview of SEAR. We use the mask of the agent to learn structured representations.
30
+
31
+ We mathematically formulate the representation learning problem using variational inference and show that it leads to improved control.
32
+
33
+ Our approach is complementary to the prior works that aim to improve RL sample efficiency by adding auxiliary losses to the representations learned by the policy, drawing inspiration from advances in self-supervised learning in computer vision. This includes using inpainting losses (Pathak et al., 2016; He et al., 2022), contrastive learning (He et al., 2020; Chen et al., 2020; Chen & He, 2021; Grill et al., 2020; Laskin et al., 2020b), large-scale video pre-training (Nair et al., 2022) or simple yet effective image augmentation (Yarats et al., 2021a; Laskin et al., 2020a) to make the network more robust. Such implicit inductive biases allow for useful representations, but they don't take advantage of the fact that there exists a lot of untapped knowledge of the agent. Access to such knowledge is remarkably inexpensive as the agent morphology or joints are often known beforehand.
34
+
35
+ Empirically, we find that SEAR outperforms state-of-the-art model-free approaches for RL on a large suite of 18 different challenging environments, spanning 5 different robots, including the Sawyer, franka and adroit-hand robots.
36
+
37
+ # 2. Related Work
38
+
39
+ RL from pixels Model-based approaches (Hafner et al., 2019; 2020; Ebert et al., 2017) learn an efficient latent space dynamics model to learn a policy for visual control tasks. Model-free algorithms such as RAD (Laskin et al., 2020a) and DrQ (Kostrikov et al., 2020) make use of image augmentations to provide additional inductive biases. Some methods have focused on improving the representations
40
+
41
+ learned for visual control through auxiliary tasks, such as contrastive learning (Laskin et al., 2020b). Perhaps most similar to our algorithm, SAC-AE (Yarats et al., 2021b) uses an autoencoder, in addition to losses from the critic in SAC (Haarnoja et al., 2018), to train an image encoder used for visual control. However, unlike our algorithm, SAC-AE (Yarats et al., 2021b) only uses a single decoder, and does not attempt to make any explicit distinction between agent and environment. DrQv2 (Yarats et al., 2021a) is a state-of-the-art model-free reinforcement learning algorithm for visual continuous control, using random shift image augmentations and n-step returns for improved sample efficiency.
42
+
43
+ Agent-Environment Centric Learning Previous approaches have directly structured the representation space using forward or inverse dynamics (Zhang et al., 2019; Watter et al., 2015), but these methods do not scale well to challenging image-based manipulation tasks. Hu et al. (2022) learn a factorized visual dynamics model, using the analytical forward kinematics of the robot and a learned world model. While this enables transfer of the world model to new robots with a similar action space, it doesn't exploit agent knowledge while training. Previous works have also implicitly trained policies aware of robot morphology, using the transferability of the policies as signal (Yu et al., 2018; Duan et al., 2017; Dasari & Gupta, 2021; Finn et al., 2017). Some methods directly train separate robot and task modules, and attempt to transfer to new combinations of these modules (Neumann et al., 2014; Devin et al., 2017). It is also possible to construct a policy where each node is represented as a joint and each link is an edge (Wang et al., 2018; Huang et al., 2020), allowing for efficient generalization to new morphologies. Decoupling environment and agent learning has also been popular in exploration-based approaches (Parisi et al., 2021; Hu et al., 2022; Bahl et al., 2022; Mendonca et al., 2023). Unlike work which learns self-perception, we assume access to a self-perception module to provide access to robot segmentation masks, and then investigate how such a model can be incorporated to improve policy learning. As we show in Appendix D, such self-perception modules can be easily obtained.
44
+
45
+ # 3. Background
46
+
47
+ Reinforcement Learning Formally, the RL problem is defined by a Markov decision process (MDP) $(S, A, T, S_0, R, \gamma)$ , where $S$ is the state space, $A$ is the action space, $\mathcal{T}(s_{t+1}|s_t, a_t)$ is the unknown state transition function, $S_0(s)$ is the initial state distribution, $\mathcal{R}(s_t, a_t)$ is the reward function, and $\gamma \in (0, 1)$ is the discount factor. An agent acts according to some policy $\pi(a|s)$ and the learning objective is to maximize the expected return, $\mathbb{E}_{s_t, a_t} \sim \pi[\sum_t \gamma^t \mathcal{R}(s_t, a_t)]$ .
48
+
49
+ Representation Learning and RL Learning effective control policies directly from raw image observations without instrumented setups to detect the states of different objects in the world is quite challenging. One approach to address this is to learn low dimensional representations for control (Zhu et al., 2020; Nair et al., 2018; Yarats et al., 2021b; Laskin et al., 2020a), bringing the setting closer to state-based control. These approaches often model the state at each timestep as a latent $z$ , and learn an encoder $q_{\theta}$ and decoder $p_{\phi}$ by maximizing the evidence lower bound on the log likelihood of the image $X$ :
50
+
51
+ $$
52
+ \log p (X) \geq \mathbb {E} _ {z \sim q _ {\theta}} p _ {\phi} (X | z) - D _ {K L} \left(q _ {\theta} (z | X) \| p (z)\right) \tag {1}
53
+ $$
54
+
55
+ # 4. Structured Latents for Control
56
+
57
+ # 4.1. Learning Structured Latents
58
+
59
+ In the approaches described above, the learned latent $z$ models the entire image, consisting of both the robot and the objects in the environment. Is there a way we can learn more structured latent representations, given access to visual
60
+
61
+ ![](images/0a4963c69ed59ee9c3887d6408f419e15b6f00bf47745caacc49dddd8914b4c8.jpg)
62
+ Figure 3: Graphical Models for prior approaches (left), vs SEAR (right).
63
+
64
+ information pertaining to the robot $X_{R}$ ? In addition to learning variable $z$ which encodes the entire image, we also model $z_{R}$ , which corresponds to salient information in $X_{R}$ for control. $z_{R}$ can be thought of as a processed version of $z$ which only contains agent-relevant information, as opposed to information of the entire scene. To build the full dependency graph between variables $X, X_{R}, z, z_{R}$ , we state the following desired property:
65
+
66
+ Proposition 4.1. If $z$ effectively encodes $X$ , then $z_{R}$ and $X$ should be conditionally independent given $z$ , i.e. $p(z_{R},X|z) = p(z_{R}|z).p(X|z)$
67
+
68
+ We enforce this variable dependency by implementing the graphical model in Figure 3. The joint probability distribution resulting from the model is :
69
+
70
+ $$
71
+ p (X, X _ {R}, z, z _ {R}) = p (z). p (z _ {R} | z). p (X | z). p (X _ {R} | z _ {R}) \tag {2}
72
+ $$
73
+
74
+ In order to learn $z, z_{R}$ , we maximize $J = \log p(X, X_{R})$ and learn a variational approximation $q_{\theta}(z, z_{R}|X)$ to the posterior, which leads to the following lower bound (derivation in Appendix A.1):
75
+
76
+ $$
77
+ \begin{array}{l} \mathcal {L} = \underset {z, z _ {R} \sim q} {\mathbb {E}} [ \log p (X | z) ] + \underset {z, z _ {R} \sim q} {\mathbb {E}} [ \log p \left(X _ {R} \mid z _ {R}\right) ] \tag {3} \\ - D _ {K L} (q (z, z _ {R} | X)) | | (p (z, z _ {R})) \\ \end{array}
78
+ $$
79
+
80
+ Breaking each term down, we first want to maximize $\mathbb{E}_{z\sim q_{\theta}}\log p(X|z)$ . This is the standard reconstruction loss of the Variational Autoencoder (VAE) (Kingma & Welling, 2013; Rezende et al., 2014). The second term, $\mathbb{E}_{z\sim q_{\theta}}\log p(X_R|z_R)$ reconstructs the provided robot visual information $X_{R}$ from $z_{R}$ , and the final term regularizes the posterior distribution just like in regular VAEs.
81
+
82
+ # 4.2. Effectiveness for Control
83
+
84
+ Given these structured latent representations, do they enable better sample efficiency and faster training for policies? We propose the following thought experiment as a starting point. Under the graphical model described in Proposition 4.1, consider a value function $V(z)$ that can, without loss of generality, be written as:
85
+
86
+ $$
87
+ V (z) = V _ {R} \left(z _ {R}\right) + V _ {C} (z) \tag {4}
88
+ $$
89
+
90
+ $V_{R}$ is a function only dependent on the agent (the robot in our case) and $V_{C}$ is a coupling term for the value function, for the case where the agent is directly interacting with the environment. We argue that this formulation can represent a large class of value functions, especially under our disentangled representation space.
91
+
92
+ Our main insight is that in contact rich tasks, there are many uncertainties in modeling the environment. Furthermore, the first step in many such tasks is control of the robot to move it to some target location before it can then engage in contact. Thus, for a large percentage of $t \in (1, T)$ , there will be a large emphasis on the first term of Equation 4, which is the value function dependent on the agent directly. By explicitly modelling $z_{R}$ , we expect that it will be easier for the agent to learn basic robot control. After the agent can perform basic control of the robot, and capture some reward only relevant to the motion of the robot, it can then move on to manipulating the environment, which is better captured with the second term of Equation 4.
93
+
94
+ Overall, we hypothesize that modelling $z_{R}$ enables agents to be much more efficient in learning policies, which is supported by our experimental analysis. We provide more details and analysis on this in Appendix A.2, and showcase this intuition in a toy experiment in Appendix A.3.
95
+
96
+ # 4.3. Visually Grounded Agent Representations
97
+
98
+ Now that we have seen how to learn agent-centric representations and that they are effective for learning policies, how do we obtain the agent-relevant observations $X_{R}$ required for representation learning? While proprioceptive data such as end-effector positions or joint angles are easily accessible, they are not visually grounded, and may not convey the full information needed to model how the robot appears in the
99
+
100
+ image observations. Thus, we try to predict the visual robot observation in the image. One approach for this is to use a segmentation model of the agent to obtain a robot mask. This is reasonable to obtain for robots since the shape and appearance of the robot does not change across tasks, and obtaining the mask model is a one-time cost. Furthermore, they do not need to be fully accurate, and we show that our method can still learn effective control policies when using noisy or approximate masks.
101
+
102
+ Given an image of the full scene $X$ , we set $X_{R}$ to be a segmentation of the robot, $M$ , where $M_{i,j} = 1$ for every pixel that is occupied by the agent and 0 otherwise. Using a visual encoder $q_{\theta}(.)$ , we get $y = q_{\theta}(X)$ , which is then split into 2 vectors to obtain $z_{R}$ and $z$ . The encoder we use is similar to that of Yarats et al. (2021a). $z_{R}$ is used as input to a decoder, $P_{\phi}(M|z_{R})$ which tries to predict the robot mask. This decoder is trained using a binary cross-entropy loss, as shown in equation 5. Posing the agent-centric reconstruction as a classification problem allows for more efficient learning.
103
+
104
+ $$
105
+ \mathcal {L} _ {\text {m a s k}} = M \log P _ {\phi} (M | z _ {R}) + (1 - M) \log \left(1 - P _ {\phi} (M | z _ {R})\right) \tag {5}
106
+ $$
107
+
108
+ Following Equation 3, $z$ is used to approximate $p(X|z)$ , by using a neural network decoder $P_{\psi}$ , which tries to reconstruct the input image, $X$ . This is trained using a mean squared error reconstruction loss, as shown in equation 6.
109
+
110
+ $$
111
+ \mathcal {L} _ {\text {r e c o n}} = \| X - P _ {\psi} (z) \| _ {2} ^ {2} \tag {6}
112
+ $$
113
+
114
+ We empirically found that setting the last term of Equation 3 to be very low or 0 had much better results.
115
+
116
+ While we use DrQv2 from Yarats et al. (2021a) as our base reinforcement learning algorithm, it is possible to apply SEAR to any other reinforcement learning algorithm that utilizes a visual encoder, both for on or off-policy methods. We apply the same random shift to both the robot masks and input image observations as part of data augmentation. The mask decoder, reconstruction decoder, critic, and encoder are trained concurrently using a joint loss function, shown in Equation 7, with coefficients weighing the relative importance of the three component losses.
117
+
118
+ $$
119
+ \mathcal {L} = \mathcal {L} _ {\text {c r i t i c}} + c _ {1} \mathcal {L} _ {\text {r e c o n}} + c _ {2} \mathcal {L} _ {\text {m a s k}} \tag {7}
120
+ $$
121
+
122
+ The overall architecture is shown in figure 2. As with the DrQv2 algorithm, we do not let actor losses backpropagate into the encoder. Overall, SEAR introduces 4 additional hyperparameters to a reinforcement learning algorithm: two learning rates corresponding to two decoders, and two coefficients for the reconstruction and mask losses. To simplify
123
+
124
+ Algorithm 1 SEAR: Structured Environment and Agent Representations for Control
125
+ 1: for t = 1 ... T do
126
+ 2: Collect transition $(x_{t}, m_{t}, a_{t}, R(x_{t}, a_{t}), x_{t+n})$
127
+ 3: $\mathcal{D} \gets \mathcal{D} \cup (x_{t}, m_{t}, a_{t}, R(x_{t}, a_{t}), x_{t+1})$
128
+ 4: UPDATECRITICANDDECODERS( $\mathcal{D}$ )
129
+ 5: UPDATEACTOR (Yarats et al., 2021a)
130
+ 6: end for
131
+ 7: function UPDATECRITICANDDECODERS( $\mathcal{D}$ )
132
+ 8: $(x_{t}, M_{t}, a_{t}, r_{t:t+n-1}, x_{t+n}) \sim \mathcal{D}$
133
+ 9: Sample augmentation $A_{1}$
134
+ 10: $z_{t} \gets q_{\theta}(A_{1}(x_{t}))$
135
+ 11: $[z_{t}^{1}; z_{t}^{2}] \gets z_{t}$
136
+ 12: $\mathcal{L}_{mask} \gets \mathcal{L}_{\text{ent}}(P_{\phi}(z_{t}^{1}), A_{1}(M_{t}))$
137
+ 13: $\mathcal{L}_{recon} \gets ||P_{\psi}(z_{t}^{2}) - A_{1}(x_{t})||_{2}^{2}$
138
+ 14: Compute $\mathcal{L}_{critic}$ (Yarats et al., 2021a)
139
+ 15: $\mathcal{L}_{total} \gets \mathcal{L}_{\text{critic}} + c_{1}\mathcal{L}_{recon} + c_{2}\mathcal{L}_{mask}$
140
+ 16: Update $\theta_{enc}, \theta_{critic}, \theta_{mask}, \theta_{recon}$ using $\mathcal{L}_{total}$
141
+ 17: end function
142
+
143
+ hyperparameter tuning, we used the same learning rate as the critic for the two decoders. Our approach can be seen in Algorithm 1.
144
+
145
+ # 5. Experiments
146
+
147
+ In our experiments we seek to test the effectiveness of our structured representations in the following settings: 1) RL for manipulation with robot arms 2) RL for dexterous manipulation 3) Control in visually distracting environments 4) Transfer learning/finetuning. We also demonstrate some preliminary results in 5) multi-task learning. In this section, we describe our experimental setup, evaluations, baselines and results.
148
+
149
+ ![](images/9f949bbb5d4978ae7f79dfe8166a8a25556f9bd0403e48be0a695dc10553c684.jpg)
150
+ Figure 4: Environments used in the evaluation of SEAR. From left to right: Meta-World, Hand Manipulation Suite, Franka Kitchen, Distracting Control Suite
151
+
152
+ ![](images/aa48aa6b83ea8bea45d0a1dcd7bd4c52daeb796421defc59290f9a9b306cf57a.jpg)
153
+ Figure 5: Environment RGB images with their corresponding robot segmentation masks.
154
+
155
+ **Environments:** We use the following Mujoco-simulated (Todorov et al., 2012) environment suites:
156
+
157
+ Meta-World (Yu et al., 2020) - Table-top manipulation tasks performed by a Sawyer robot arm.
158
+ - Franka Kitchen (Gupta et al., 2019) - Manipulating objects in a realistic kitchen with a Franka arm.
159
+ - Hand Manipulation Suite (Rajeswaran et al., 2017) - Manipulating objects with an Adroit hand.
160
+ - Distracting Control Suite (Stone et al., 2021) - A variant of the DM Control suite (Tassa et al., 2018) with distractions added.
161
+
162
+ Note that we used implementations of the Hand Manipulation Suite and Franka Kitchen from the D4RL benchmark (Fu et al., 2020). Images of these four environments are shown in figure 4.
163
+
164
+ Setup: We obtain agent masks from the simulator directly. Ground truth segmentation masks were generated using Mujoco's rendering API, which has a flag for rendering segmented images. Pixel values from these segmentation renders correspond to geometric IDs. We then create binary masks based on geometric IDs known to correspond to the robot for a given environment. Example masks from each suite are shown in Fig. 5. Note that one could also use a segmentation model for these. The agent receives an RGB image as input, and a mask as supervision for the representation learning (all of which are $84 \times 84$ ). For each environment, a frame stack of 3 was used. For Meta-World and Distracting Control tasks, an action repeat of 2 was used, whereas an action repeat of 1 was used for Hand Manipulation Suite and Franka Kitchen tasks. In the Franka Kitchen setup, we used a sparse reward of 1 for each of the individual tasks. For the multi-task version, we add the sparse reward from each subtask achieved.
165
+
166
+ We compare to the following baselines in our experiments -
167
+
168
+ - DrQ - DDPG (Lillicrap et al., 2015) with image augmentations, shown to be state of the art in many visual RL settings. We use the code and setup from Yarats et al. (2021a), and implement SEAR on top of this base.
169
+ - DrQ-AE - Uses the same encoder as SEAR, but without the mask decoder. Has a single decoder operating on the entire latent vector in order to reconstruct the original input image. This is a version of SAC-AE (Yarats et al., 2021b). We run this to test if agent-environment disentangling is helping or if any form of reconstruction will have the same effect.
170
+ - DrQ-MAE - Reconstructing randomly masked patches in the images. Such methods have shown to be robust in self-supervised learning and control settings (Xiao et al., 2022; Radosavovic et al., 2022; He et al., 2022).
171
+ - CURL - State-of-the-art self-supervised visual learning for RL approach (Laskin et al., 2020b), which has been shown to be a useful auxiliary loss. Performs momentum contrastive learning (He et al., 2020) on the input images during the RL loop.
172
+
173
+ ![](images/72f8a38f9db2f6bf2c7269846ceb527ed7ed37c624d4a4cc86bc32fbbf3937b4.jpg)
174
+ 5.1. Analysis and Ablations
175
+
176
+ ![](images/a3f3b9b6db55eafe65781ba28532a9c4ef5e95872281b4c8de142815b8f6b6e7.jpg)
177
+ Figure 6: Analysis of robustness of SEAR with noisy and approximate robot masks.
178
+
179
+ ![](images/cdac14f1d64b6ec1bb42bdb93d89f2efda6d3db96807ceb05eb07f1419bf2842.jpg)
180
+ Figure 7: Noisy Mask (left) and Approximate Mask (right). Implementation described in Appendix C.6
181
+
182
+ Robustness to inaccuracies in robot masks: In real world scenarios, we do not have direct access to robot segmentation masks and may need to either have a trained
183
+
184
+ ![](images/05421322234f7ec0665d1eaef1ba8cd16b551e3ad2edb016542bc0dd93582e10.jpg)
185
+
186
+ ![](images/601e47b575d55e90b0249e2bb8eaf898414de33f8caea90cf98bf7990646a475.jpg)
187
+
188
+ ![](images/6e42d525c0779b2a7b6d3bda30476d070903ac9eb88b5ca6ff7d74c8694201e0.jpg)
189
+
190
+ ![](images/94871b741a8612ac4c4e5450d8f966c78cfd45d605e5ad4cd8d0bb28ec366b8e.jpg)
191
+
192
+ ![](images/abe1c38fca0747ac8b73267812dc7a3f03044d8b2422d2f15c1b0393fdabd5a0.jpg)
193
+
194
+ ![](images/fa249201a9c1cc0ec9fc4bd5217e76b3af85b7e450e486c58603644df3e70571.jpg)
195
+ Figure 8: Meta-World: Success rate for different methods on 10 different tasks from the Meta-World suite. SEAR outperforms or matches prior approaches on all tasks.
196
+
197
+ ![](images/95b871ecefad7cc55d7005213186af1a2650820112bda232de4dbaa02f154f17.jpg)
198
+
199
+ ![](images/54ef6b8da45033364d2e6205145807e84d0d693ef7c0eddb211afaeb648988a7.jpg)
200
+
201
+ ![](images/25c3eb9928af2bbe6e99c2cad019725c0587dbf7051bb89bf996e5937391ed90.jpg)
202
+
203
+ ![](images/4e281285223c7c5f4a78691535c90d01ef1243da75996fde3379c9e4dad85ae0.jpg)
204
+
205
+ model or use robot proprioception data. While SEAR does use additional information, which is the robot mask data, we argue that this information is not difficult to obtain or approximate. To test this, we run multiple ablations of our model and analyze these. Firstly, we confirm that adding even an approximate amount of agent information helps in the case of learning. This is done via two experiments shown in Figure 6. Agents were trained on two separate Meta-World tasks. We artificially introduce noise into the masks to evaluate the robustness of our approach (shown in orange). Another option is to use proprioceptive data to get an approximate mask. We mimic this by generating a large patch of pixels around the joints to get some mask that has a somewhat similar shape to the robot. This curve is shown in magenta in Figure 6. With both, we see that the performance does not decrease by much, almost being similar to SEAR with a perfect mask, even when a large amount of noise is added. Such masks can be seen in Figure 7. This experiment allows us to conclude that when training in the real world, a segmentation model of the robot can be used, even if it has inaccuracies. In Appendix D, we further qualitatively show that a simple masking model fine-tuned on 100 images (including those collected on our robots, and internet images) can give good robot masks for many out-of-distribution images.
206
+
207
+ Implicit Representations: Concluding that incorporating the robot information is important, we analyze other ways to learn $z_{R}$ from the robot mask, for example in an implicit manner. Thus, we run a simple ablation (green) with DrQ-RGBM. This approach uses the DrQ-v2 algorithm trained on observations consisting of RGB images concatenated with robot masks. We see that this performance on
208
+
209
+ both environments in Figure 6 is worse than that of our approach. We also see that SEAR is robust to hyperparameters such as $c_{1}$ and $c_{2}$ , the loss coefficients for the reconstruction and mask (Appendix E). In Appendix F, we further show that there is a performance drop if the mask loss is added as an auxiliary loss without splitting the latent vector.
210
+
211
+ # 5.2. Continuous Control Experiments
212
+
213
+ For the continuous control experiments, we evaluate SEAR on various challenging environments, tasks and benchmarks, where the agent varies greatly in morphology, ranging from a 7-DoF robot arm to a hand or an embodied two dimensional walker, all in MuJoCo (Todorov et al., 2012). We firstly evaluated our agent on 10 different visually challenging tasks from the Meta-World benchmark (Yu et al., 2020), as well as on three hand manipulation suite tasks, three Franka Kitchen tasks, and two Distracting Control tasks. We measure and report either episode success or total reward, at test time.
214
+
215
+ Meta-World We compared our agents performance, measured as episode success rate, to baselines on single-task manipulation tasks available in the Meta-World benchmark. Due to compute and time constraints, we only ran experiments on 10 tasks, which we chose because they seemed like the most contact-rich. The results are shown in figure 8. We observed greater sample efficiency on many of the tasks. These are all visually diverse and relatively challenging settings. Furthermore, on three of the tasks, SEAR achieved the highest episode reward by the end of training. On button-press-wall and door-close, SEAR did not outperform all the baselines, but it still matched the best ones. We found the
216
+
217
+ ![](images/5c732c0bc9922e36b64d5cb6fb55e1865bdca4f61dce436d3c8649190ddfd44c.jpg)
218
+
219
+ ![](images/b76e5040489f1726500af79d63eb5a7a70348a5cd942bf5a592d519a8ccc3182.jpg)
220
+
221
+ ![](images/1e128d3510c309a404abf794d7ed01b0c3faa5b5368d193f91ee0119ef877f2d.jpg)
222
+
223
+ ![](images/9261bcf6df3662acb06b606791728471b27d18d1260472c1ae7e7a45c8cf16f7.jpg)
224
+ Figure 9: Franka Kitchen & Adroit: Success for different methods on 3 different tasks from the FrankaKitchen suite (top) and from the Adroit-hand suite (bottom). SEAR outperforms or matches prior approaches on all tasks.
225
+
226
+ ![](images/3f1c1c24fd6c62a4b304848f30e2c5109e98484b581bff170aa5ac441aaae232.jpg)
227
+
228
+ ![](images/cccea0bdaf1554056d645a8edc23a0ef5594e4ed8b93081696f8eafe0b9bedf5.jpg)
229
+
230
+ auto-encoding baseline DrQ-AE to be a strong one, while contrastive learning (CURL) had difficulty. How does SEAR scale to different types of robots, for example, a Franka?
231
+
232
+ Franka Kitchen We evaluated our agent on the Franka Kitchen benchmark, a diverse and visually challenging environment, where a task is defined by a set of objects in the scene that have to be moved to pre-specified goal locations. We looked at three different, single item-tasks: kettle, light, and slider. A reward of 1 is given for successfully moving a task item to its pre-specified goal location. Results, given as total episode reward, are shown in figure 9. SEAR beat all baselines on light, and matched the best baseline on the other two tasks. Note that the best baseline was different between these two tasks (kettle and slide), suggesting that while there is high inter-task variance in the performance of the various algorithms, SEAR tends to match or surpass the performance of the best baseline for a given task.
233
+
234
+ Adroit Hand Manipulation We evaluated episode success rate of our agent on three different tasks within the Adroit Hand Manipulation Suite: Pen, Hammer, and Door. Results are shown in figure 9. SEAR outperformed baselines on two of the tasks, and matched the best baseline on the other task. We also ran experiments on the Relocate task, but all of the agents failed to learn, and thus we have not included it. We found that CURL was unable to solve any of the Adroit Hand Manipulation tasks, even with $>1.5\mathrm{M}$ environment steps.
235
+
236
+ Distracting Control If our hypothesis of SEAR learning environment-agent disentangling representations was correct, we would see a strong performance in cases where control completely disentangles environment from agent. Thus we conducted an experiment on two challenging environments from the Distracting Control environments: (Stone et al., 2021) the ball-in-cup catch and walker-walk, where each episode, a random image is shown in the background. Total episode reward results are shown in Fig 10. By the end of training, SEAR achieved a higher total episode reward on both tasks compared to all other baselines. This suggests that SEAR learns useful disentangled representations when controlling a robot in visually distracting environments.
237
+
238
+ ![](images/a2a7c24842334271b9386c9b3b8e8ce726420840d06602087429bacc5f56e7da.jpg)
239
+ Figure 10: Distracting Control: Reward for different methods, SEAR outperforms all the baselines.
240
+
241
+ ![](images/c31938514e9132b38202558eb6df0669caa3c15df97636a317cf01531ff3afe4.jpg)
242
+
243
+ Transfer Learning In transfer learning environments, while the task may be different, the agent is often the same.
244
+
245
+ ![](images/47003e931e15e78f476c2ccaef9209a3507fbcf6a32cd3cebc3d09284f1374af.jpg)
246
+ Figure 11: Transfer: Success for finetuning a multi-task policy pretrained on the Meta-World MT-10 suite to 8 different unseen tasks. SEAR transfers representations much better than prior methods.
247
+
248
+ This leads us to expect that making an agent-environment distinction in representation learning will lead to improved performance during transfer learning. To test this, we pretrained agents on a multi-task setting (MT10 suite), and then fine-tuned on new Meta-World tasks not part of the original MT10 tasks. We also fine-tuned on Peg-Insert, which the agents failed to learn in the multi-task setting (Potentially affected by a poor camera angle). Results for transfer learning are shown in figure 11. SEAR outperformed the baselines on many of the tasks, and matched the best baseline on the rest. Overall, the results suggest that SEAR learns a representation that performs well in transfer learning settings. We leave it to future work to investigate to what extent transfer learning performance is attributable to better transferability vs the better performance that SEAR has shown in single-task learning.
249
+
250
+ Visualizing Feature Maps To gain more insight into the difference in representations learned by SEAR, we examine the activation maps of the encoder on one task each from three of our robotics environments. This activation map is the ReLU activations after the last encoder convolutional layer. Within the encoder, such activation maps would pass though an additional pooling and projection layer to form the latent vector. These activation maps are resized to the input image size, normalized to [0,1], and then blended with the original image after being mapped through a color map. We examine these activations since it is easier to visualize their spatial correlation with the input image, compared to visualizing the latent vector. Figure 12 contains a few example maps, where we can see that SEAR has more activity in regions around the robot in some maps and a lot more activity around objects in other maps. This is particularly salient in the Franka-Kitchen and Meta-World environments.
251
+
252
+ In Appendix G, we present a comparison of all 32 channels for both SEAR and $\mathrm{DrQ}$ . While they don't show full disentanglement (since the linear projection can map them in arbitrary combinations), we found it interesting that activations from the SEAR encoder tend to have more filters that fire on either the robot or the environment (Figures 18 and 20), or focus on more diverse parts of the environment (kettle, burners, cabinet or microwave in Figure 19) compared to $\mathrm{DrQ}$ filters which only fire on the kettle. We hope to study this type of disentanglement in more detail in future work.
253
+
254
+ ![](images/080ee4d725b6083fa91ac0dacc5596217e719ef93aad45edc0ee6bc56877b029.jpg)
255
+ Figure 12: SEAR activation maps for select channels from the last convolution layer in the encoder of SEAR.
256
+
257
+ Multi-Task Learning Multi-task environments often use the same agent across multiple tasks. Thus, it is expected that making a distinction between agent and environment features will help multi-task learning as similar agent features can be shared across different tasks. To test this hypothesis, we utilized two small-scale multi-task environment
258
+
259
+ ![](images/b934470d65debcfb628610531753c0fe6a5f56c4562c6f1d98b5ea57468c8c8d.jpg)
260
+ Figure 13: Small-Scale Multi-task settings: Success for different approaches for joint training on multiple tasks from an environment suite.
261
+
262
+ ![](images/e58d1ad57b161b9b70610035a0912fe6ee2b6f1129d769fdc32522e7735871f9.jpg)
263
+
264
+ ![](images/8857aa9faac86cada9491a371cb2fa3e843ce0b7e8d7af637c174dfbbd203c54.jpg)
265
+ Figure 14: Larger-Scale Multi-task setting: Success for different approaches for joint training on the Meta-World MT50 set of tasks.
266
+
267
+ setup: a Meta-World setup with three tasks, and the Franka Kitchen environment with multiple task objects and randomized camera locations (shown in Appendix H). For each of these, the only input is the raw image. The three Meta-World tasks, button-press-topdown-wall, door-open, and hammer, were selected due to being three visually distinct tasks from our initial set of 10 contact-rich tasks. Results are shown in figure 13. SEAR outperforms baselines in the Meta-World setup and matches performance in the Franka-Kitchen environment. We further evaluate SEAR in a larger multi-task setup with the Meta-World MT50 set of tasks, with results shown in figure 14. On this larger set of tasks, SEAR matched but did not outperform the baselines. These results are preliminary, and we leave a full investigation into applying and adapting SEAR to multi-task environments as future work.
268
+
269
+ # 6. Discussion and Limitations
270
+
271
+ In this paper, we hypothesize that building representations which create a distinction between the agent and environment leads to more effective RL. We do so by formulating a representation learning method that can incorporate agent information directly and efficiently. We construct a learning algorithm, SEAR, that encourages representations to learn the agent-environment split by reconstructing the mask of the agent. We argue that this form of supervision is a very weak assumption, and in most cases is readily available (even in an approximate form). We show strong results against state of the art approaches in visual RL, on multiple different types of agents (robot arms, hands or even walkers), and in many different and challenging continuous control environments. In our future work, we hope to build agent-centric representations that can allow for building more efficient visual dynamics model, and empower exploration. Additionally, we would like to investigate disentangled representations for multi-task learning, and real-world robotics (a current limitation of SEAR).
272
+
273
+ Acknowledgement We would like to thank Alexander C. Li and Murtaza Dalal for fruitful discussions.
274
+
275
+ This work is supported by Sony Faculty Research Award and NSF IIS-2024594.
276
+
277
+ # References
278
+
279
+ Arulkumaran, K., Deisenroth, M. P., Brundage, M., and Bharath, A. A. Deep reinforcement learning: A brief survey. IEEE Signal Processing Magazine, 34(6):26-38, 2017. 1
280
+ Bahl, S., Gupta, A., and Pathak, D. Human-to-robot imitation in the wild. arXiv preprint arXiv:2207.09450, 2022. 2
281
+ Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. A simple framework for contrastive learning of visual representations. In III, H. D. and Singh, A. (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 1597-1607. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/chen20j.html.2
282
+ Chen, X. and He, K. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 15750-15758, 2021. 2
283
+ Dasari, S. and Gupta, A. Transformers for one-shot visual imitation. In Conference on Robot Learning, pp. 2071-2084. PMLR, 2021. 2
284
+
285
+ Devin, C., Gupta, A., Darrell, T., Abbeel, P., and Levine, S. Learning modular neural network policies for multi-task and multi-robot transfer. In 2017 IEEE international conference on robotics and automation (ICRA), pp. 2169-2176. IEEE, 2017. 2
286
+ Duan, Y., Andrychowicz, M., Stadie, B., Ho, O. J., Schneider, J., Sutskever, I., Abbeel, P., and Zaremba, W. One-shot imitation learning. In NIPS, 2017. 2
287
+ Ebert, F., Finn, C., Lee, A. X., and Levine, S. Self-supervised visual planning with temporal skip connections. arXiv preprint arXiv:1710.05268, 2017. 2
288
+ Finn, C., Yu, T., Zhang, T., Abbeel, P., and Levine, S. One-shot visual imitation learning via meta-learning. CoRL, 2017. 2
289
+ Fu, J., Kumar, A., Nachum, O., Tucker, G., and Levine, S. D4rl: Datasets for deep data-driven reinforcement learning. arXiv preprint arXiv:2004.07219, 2020.5
290
+ Grill, J.-B., Strub, F., Altché, F., Tallec, C., Richemond, P., Buchatskaya, E., Doersch, C., Avila Pires, B., Guo, Z., Gheshlaghi Azar, M., et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural information processing systems, 33:21271-21284, 2020. 2
291
+ Gupta, A., Kumar, V., Lynch, C., Levine, S., and Hausman, K. Relay policy learning: Solving long-horizon tasks via imitation and reinforcement learning. arXiv preprint arXiv:1910.11956, 2019. 5
292
+ Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018. 2
293
+ Hafner, D., Lillicrap, T., Ba, J., and Norouzi, M. Dream to control: Learning behaviors by latent imagination. arXiv preprint arXiv:1912.01603, 2019. 2
294
+ Hafner, D., Lillicrap, T., Norouzi, M., and Ba, J. Mastering atari with discrete world models. arXiv preprint arXiv:2010.02193, 2020. 2
295
+ He, K., Gkioxari, G., Dollár, P., and Girshick, R. Mask r-cnn. In ICCV, 2017. 16
296
+ He, K., Fan, H., Wu, Y., Xie, S., and Girshick, R. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 2, 5
297
+ He, K., Chen, X., Xie, S., Li, Y., Dollar, P., and Girshick, R. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16000-16009, 2022. 2, 5
298
+
299
+ Hu, E. S., Huang, K., Rybkin, O., and Jayaraman, D. Know thyself: Transferable visual control policies through robot-awareness. In ICLR 2022 Workshop on Generalizable Policy Learning in Physical World, 2022. 2
300
+ Huang, W., Mordatch, I., and Pathak, D. One policy to control them all: Shared modular policies for agent-agnostic control. In International Conference on Machine Learning, pp. 4455-4464. PMLR, 2020. 2
301
+ Kalashnikov, D., Irpan, A., Pastor, P., Ibarz, J., Herzog, A., Jang, E., Quillen, D., Holly, E., Kalakrishnan, M., Vanhoucke, V., et al. Qt-opt: Scalable deep reinforcement learning for vision-based robotic manipulation. arXiv preprint arXiv:1806.10293, 2018. 1
302
+ Kalashnikov, D., Varley, J., Chebotar, Y., Swanson, B., Jonschkowski, R., Finn, C., Levine, S., and Hausman, K. Mt-opt: Continuous multi-task robotic reinforcement learning at scale. arXiv preprint arXiv:2104.08212, 2021. 1
303
+ Kingma, D. P. and Welling, M. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 3
304
+ Kostrikov, I., Yarats, D., and Fergus, R. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. arXiv preprint arXiv:2004.13649, 2020. 2
305
+ Laskin, M., Lee, K., Stooke, A., Pinto, L., Abbeel, P., and Srinivas, A. Reinforcement learning with augmented data. Advances in neural information processing systems, 33: 19884-19895, 2020a. 2, 3
306
+ Laskin, M., Srinivas, A., and Abbeel, P. CURL: Contrastive unsupervised representations for reinforcement learning. In III, H. D. and Singh, A. (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 5639-5650. PMLR, 13-18 Jul 2020b. URL https://proceedings.mlr.org/press/v119/laskin20a.html.2,5
307
+ Levine, S., Finn, C., Darrell, T., and Abbeel, P. End-to-end training of deep visuomotor policies. JMLR, 2016. 1
308
+ Lillicrap, T. P., Hunt, J. J., Pritzel, A., Heess, N., Erez, T., Tassa, Y., Silver, D., and Wierstra, D. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. 5
309
+ Mendonca, R., Bahl, S., and Pathak, D. Alan: Autonomously exploring robotic agents in the real world. arXiv preprint arXiv:2302.06604, 2023. 2
310
+ Nair, A. V., Pong, V., Dalal, M., Bahl, S., Lin, S., and Levine, S. Visual reinforcement learning with imagined goals. In NeurIPS, pp. 9191-9200, 2018. 3
311
+
312
+ Nair, S., Rajeswaran, A., Kumar, V., Finn, C., and Gupta, A. R3m: A universal visual representation for robot manipulation. arXiv preprint arXiv:2203.12601, 2022. 2
313
+ Neumann, G., Daniel, C., Paraschos, A., Kupcsik, A., and Peters, J. Learning modular policies for robotics. Frontiers in computational neuroscience, 8:62, 2014. 2
314
+ Parisi, S., Dean, V., Pathak, D., and Gupta, A. Interesting object, curious agent: Learning task-agnostic exploration. Advances in Neural Information Processing Systems, 34: 20516-20530, 2021. 2
315
+ Pathak, D., Krahenbuhl, P., Donahue, J., Darrell, T., and Efros, A. A. Context encoders: Feature learning by inpainting. In CVPR, 2016. 2
316
+ Peters, J., Müllering, K., and Altün, Y. Relative entropy policy search. In Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence, AAAI'10, pp. 1607-1612. AAAI Press, 2010. 1
317
+ Radosavovic, I., Xiao, T., James, S., Abbeel, P., Malik, J., and Darrell, T. Real-world robot learning with masked visual pre-training. arXiv preprint arXiv:2210.03109, 2022.5
318
+ Rajeswaran, A., Kumar, V., Gupta, A., Vezzani, G., Schulman, J., Todorov, E., and Levine, S. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. arXiv preprint arXiv:1709.10087, 2017.5
319
+ Rezende, D. J., Mohamed, S., and Wierstra, D. Stochastic backpropagation and approximate inference in deep generative models. In International conference on machine learning, pp. 1278-1286. PMLR, 2014. 3
320
+ Shapiro, L. Embodied cognition. Routledge, 2010. 1
321
+ Stone, A., Ramirez, O., Konolige, K., and Jonschkowski, R. The distracting control suite-a challenging benchmark for reinforcement learning from pixels. arXiv preprint arXiv:2101.02722, 2021. 5, 7
322
+ Tassa, Y., Doron, Y., Muldal, A., Erez, T., Li, Y., Casas, D. d. L., Budden, D., Abdelmaleki, A., Merel, J., Lefrancq, A., et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018. 5
323
+ Todorov, E., Erez, T., and Tassa, Y. MuJoCo: A physics engine for model-based control. In IROS, 2012. 5, 6
324
+ Wang, T., Liao, R., Ba, J., and Fidler, S. Nervenet: Learning structured policy with graph neural networks. 2018. 2
325
+ Watter, M., Springenberg, J., Boedecker, J., and Riedmiller, M. Embed to control: A locally linear latent dynamics model for control from raw images. In NIPS, 2015. 2
326
+
327
+ Xiao, T., Radosavovic, I., Darrell, T., and Malik, J. Masked visual pre-training for motor control. arXiv preprint arXiv:2203.06173, 2022.5
328
+ Yarats, D., Fergus, R., Lazaric, A., and Pinto, L. Mastering visual continuous control: Improved data-augmented reinforcement learning. arXiv preprint arXiv:2107.09645, 2021a. 2, 4, 5, 14
329
+ Yarats, D., Zhang, A., Kostrikov, I., Amos, B., Pineau, J., and Fergus, R. Improving sample efficiency in model-free reinforcement learning from images. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 10674-10681, 2021b. 2, 3, 5
330
+ Yu, T., Finn, C., Xie, A., Dasari, S., Zhang, T., Abbeel, P., and Levine, S. One-shot imitation from observing humans via domain-adaptive meta-learning. RSS, 2018. 2
331
+ Yu, T., Quillen, D., He, Z., Julian, R., Hausman, K., Finn, C., and Levine, S. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on robot learning, pp. 1094-1100. PMLR, 2020. 5, 6
332
+ Zhang, M., Vikram, S., Smith, L., Abbeel, P., Johnson, M., and Levine, S. Solar: Deep structured representations for model-based reinforcement learning. In International conference on machine learning, pp. 7444-7453. PMLR, 2019. 2
333
+ Zhu, H., Yu, J., Gupta, A., Shah, D., Hartikainen, K., Singh, A., Kumar, V., and Levine, S. The ingredients of real-world robotic reinforcement learning. arXiv preprint arXiv:2004.12570, 2020.3
334
+
335
+ # A. Theoretical Justification
336
+
337
+ # A.1. Representation Objective
338
+
339
+ We describe how we obtain the training objective for the representation space from the graphical model shown in Figure 3. In order to learn $z, z_{R}$ , we maximize $J = \log p(X, X_{R})$ , and learn a variational approximation $q_{\theta}(z, z_{R}|X)$ to the posterior. We have:
340
+
341
+ $$
342
+ \begin{array}{l} \log p (X, X _ {R}) = \log \int_ {z, z _ {R}} p (z). p (z _ {R} | z). p (X | z). p (X _ {R} | z _ {R}) \\ \geq \int_ {z, z _ {R}} \log (p (z, z _ {R}). p (X | z). p (X _ {R} | z _ {R})) \\ = \mathbb {E} _ {z, z _ {R} \sim q} \left[ \log \left(\frac {p (z , z _ {R}) . p (X | z) . p (X _ {R} | z _ {R})}{q (z , z _ {R} | X)}\right) \right] \\ = \underset {z, z _ {R} \sim q} {\mathbb {E}} [ \log p (X | z) ] + \underset {z, z _ {R} \sim q} {\mathbb {E}} [ \log p (X _ {R} | z _ {R}) ] - D _ {K L} (q (z, z _ {R} | X)) | | (p (z, z _ {R})) \\ \end{array}
343
+ $$
344
+
345
+ # A.2. RL Performance
346
+
347
+ Consider the general value function described in Section 4:
348
+
349
+ $$
350
+ V \left(\boldsymbol {z} _ {t}\right) = V _ {R} \left(\boldsymbol {z} _ {t} ^ {R}\right) + V _ {C} \left(\boldsymbol {z} _ {t}\right) \tag {8}
351
+ $$
352
+
353
+ Here $z_{t}$ is the concatenation of $\pmb{z}_{t}^{R}$ and $\pmb{z}_{t}^{E}$ . We can think of the following
354
+
355
+ $$
356
+ \boldsymbol {z} _ {t} ^ {R} \sim \mathcal {N} (\mu_ {R}, \sigma_ {R})
357
+ $$
358
+
359
+ $$
360
+ \boldsymbol {z} _ {t} ^ {E} \sim \mathcal {N} (\mu_ {E}, \sigma_ {E})
361
+ $$
362
+
363
+ Let us assume two cases, one where there is environment interaction and one where there is none. In the case where there is very little or no interaction, we can think in this case that $\sigma_{R}$ will be small, as there is less noise in the robot information, as these features are more salient for the value function. Assuming that the value function can be written as a quadratic function:
364
+
365
+ $$
366
+ V (\boldsymbol {z} _ {t}) = [ \boldsymbol {z} _ {t} ^ {R}, \boldsymbol {z} _ {t} ^ {E} ] ^ {T} V [ \boldsymbol {z} _ {t} ^ {R}, \boldsymbol {z} _ {t} ^ {E} ]
367
+ $$
368
+
369
+ $$
370
+ V (\boldsymbol {z} _ {t}) = [ \boldsymbol {z} _ {t} ^ {R}, \boldsymbol {z} _ {t} ^ {E} ] ^ {T} [ V _ {1}, V _ {2} ] [ \boldsymbol {z} _ {t} ^ {R}, \boldsymbol {z} _ {t} ^ {E} ]
371
+ $$
372
+
373
+ $$
374
+ V (\boldsymbol {z} _ {t}) = \left(\boldsymbol {z} _ {t} ^ {R}\right) ^ {T} V _ {1} \boldsymbol {z} _ {t} ^ {R} + \left(\boldsymbol {z} _ {t} ^ {E}\right) ^ {T} V _ {1} \boldsymbol {z} _ {t} ^ {E} + 2 \left(\boldsymbol {z} _ {t} ^ {R}\right) ^ {T} V _ {2} \boldsymbol {z} _ {t} ^ {E}
375
+ $$
376
+
377
+ When fitting these parameters, due to the high noise in $z_{t}^{E}$ , we find that singular values of $V_{1}$ are much higher than those of $V_{2}$ .
378
+
379
+ Now let us look at the observation $X$ . This can be thought of as:
380
+
381
+ $$
382
+ X = Q z _ {t} + \epsilon \tag {9}
383
+ $$
384
+
385
+ Where $Q$ is some matrix in $SO(3)$ and $\epsilon \sim \mathcal{N}(0,1)$ . When learning $\pmb{z}_t$ from these, in the case of an autoencoder, we will fit $\hat{\pmb{z}}$ to the top principal components of $\pmb{z}_t^E$ , as $\sigma_E > \sigma_R$ . However, in the case where we are explicitly reconstructing $X_{R}$ , the model will fit $\hat{\pmb{z}}$ to a mix of top principal components of $\pmb{z}_t^R$ and $\pmb{z}_t^E$ , which means it is better at recovering the true $\pmb{z}_t$ .
386
+
387
+ # A.3. Toy Experiment
388
+
389
+ To showcase the intuition that it can be easier to learn the value function/policy if the latent representation directly decouples the agent and environment state, we construct the following toy experiment. We create a 2D continuous point mass environment with a changing obstacle position and a randomly sampled goal and initialization position. The ground truth reward is made up of an attraction term (exponential distance to goal) and a repulsion term (exponential distance to obstacle). The agent does not observe the ground truth state, but a high dimensional projection of a noisy latent state as mentioned in equation 9. Furthermore, as in Appendix A.2, $\boldsymbol{z}_t^R$ and $\boldsymbol{z}_t^E$ are drawn from normal distributions, where $\mu_R$ is the position of the agent and $\mu_E$ contains the position of the goal and the position and size of the obstacle.
390
+
391
+ When running SEAR, the agent additionally has access to the mask: $X_{R} = Q_{2}z_{R}$ .
392
+
393
+ We collect data in this environment to learn $\hat{z}$ from $X$ and $\hat{z}_R$ from $X_R$ , which learn the overall structure of the data and the agent-relevant structure respectively. We use this to train a predictive reward model: $V(\hat{z},\hat{z}_R)$ , which is later used for MPC. We test the performance of SEAR which models $(\hat{z},\hat{z}_R)$ , to a baseline which directly models $\hat{z}$ , using final distance to goal as the metric, for different relative values of $\sigma_R$ and $\sigma_E$ , presenting the results in Table 1.
394
+
395
+ Table 1: Final distance to goal for varying relative values of agent and environment observation noise
396
+
397
+ <table><tr><td></td><td>V(ˆz)</td><td>V(ˆz,ˆzR)</td></tr><tr><td>σE&gt; σR</td><td>1.35</td><td>1.09</td></tr><tr><td>σE= σR</td><td>1.09</td><td>1.08</td></tr><tr><td>σE&lt; σR</td><td>1.40</td><td>1.36</td></tr></table>
398
+
399
+ Table 1 shows the distance to goal achieved for different noise levels by using $V(\hat{z})$ or $V(\hat{z},\hat{z}_R)$ for planning. We see that when the noise in the environment observation is high, SEAR provides much more effective control, and that the performance is roughly equal in all other cases.
400
+
401
+ # B. Limitations and Broader Impacts
402
+
403
+ SEAR has a couple of different limitations. First, it's performance on learning representations for multi-task learning is not fully clear. We showed preliminary results on two small-scale multi-task settings and the Meta-World MT50 setting, but further investigation is required. SEAR has not yet been tested on real-world environments.
404
+
405
+ SEAR was only tested with the DrQv2 algorithm, and so while SEAR can be deployed with any reinforcement learning algorithm with an image encoder, future work still needs to explore the performance of using SEAR with other algorithms.
406
+
407
+ SEAR does not provide any benefit over other approaches in cases where the robot is not visible in the input image. Thus, future work will need to investigate how to incorporate such visual observations, which may be common in cases where, for example, the robot has a first-person view.
408
+
409
+ Another limitation of SEAR is that the representations learned by SEAR may not be closely aligned with human interests. This becomes more relevant as visual control algorithms are deployed in greater numbers to perform a wider variety of tasks, especially for tasks with a direct impact on humans.
410
+
411
+ Even if the representations learned are relatively well-aligned with the intentions of a designer using this algorithm, there are no safe-guards against a designer purposefully using SEAR to learn visual control tasks that can cause harm to humans.
412
+
413
+ SEAR could also be used to aid the deployment of more general-purpose robots, which may affect people's employment and overall economic conditions.
414
+
415
+ # C. Implementation Details
416
+
417
+ Here, we present additional details relevant to our implementation of SEAR.
418
+
419
+ # C.1. Code
420
+
421
+ The code of ours can be found at https://sear-r1.github.io
422
+
423
+ # C.2. Hyperparameters
424
+
425
+ For SEAR, we used the DrQv2 algorithm (Yarats et al., 2021a) with a modified encoder, and added additional mask and reconstruction decoders. A list of hyperparameters can be found in Table 2. Most hyperparameters have the same value as in (Yarats et al., 2021a).
426
+
427
+ Compared to the original replay buffer size of 1e6, we used a smaller replay buffer size of 2.5e5. This change was made mainly to reduce RAM usage for each experiment. For instance, a buffer of size 1e6 with a frame stack of 3 corresponds to 3e6 rgb images of size (84, 84). Given 3 bytes per pixel, this gives us a total RAM usage of about 63.5 GB. This problem could be alleviated through tricks such as only storing each image once, instead of duplicating the image 3 times for a frame stack of 3. However, we did not see any performance decrease during preliminary experiments when reducing the replay buffer. We used this smaller replay buffer size as well when evaluating baselines.
428
+
429
+ Another difference in value between hyperparameters common to both DrQv2 and SEAR is action repeat. On the Franka Kitchen and Hand Manipulation Suite environments, we set the action repeat to 1. We did not experiment with varying the action repeat, but we did use the same action repeat in our comparison baselines.
430
+
431
+ SEAR has a couple of extra hyperparameters that are not present in DrQv2. One such hyperparameter is the learning rate for the two decoders. For simplicity, we ended up using the same learning rate as the actor and critic. The other new hyperparameters are the coefficients controlling the contribution of the reconstruction and mask decoders to the total loss, relative to the critic loss. These correspond to coefficients $c_{1}$ and $c_{2}$ in equation 7. We observed that the cross entropy mask loss tended to converge to a value about four times greater than the reconstruction loss, so we set the reconstruction loss scaling coefficient to be four times the mask loss scaling coefficient. This kept the contribution of the decoders relatively equal. From the ablation shown in 17, SEAR is relatively insensitive to the choice for $c_{1}$ .
432
+
433
+ # C.3. Architecture
434
+
435
+ Our architecture differs from (Yarats et al., 2021a) with the addition of two decoders, and a modification to the encoder. The architectures used for the actor and critic are the same.
436
+
437
+ Similar to (Yarats et al., 2021a), our encoder architecture contains a series of four convolutions with ReLU's between them. Each convolution has a kernel size of 3, and every convolution except the first one has a stride of 1. The first convolution has a stride of 2. Every convolution has 32 feature maps. This transforms a stack of $84 \times 84$ rgb images into a $32 \times 35 \times 35$ set of activation maps. After the convolutions, we add a 2D average pooling layer with kernel size of 4 and stride of 4. This helps reduce the overall dimensionality down, giving us $32 \times 8 \times 8$ features. We flatten this set of feature maps, and pass this through a linear layer, projecting the activations to a desired latent dimension. The encoder outputs the output from this linear layer.
438
+
439
+ The decoder architecture, used for both the mask and reconstruction decoders, starts with a linear layer with ReLU activation. This maps the latent vectors to a 2048 dimensional vector, which we reshape into a $32 \times 8 \times 8$ set of feature maps. We pass these feature maps through 5 transpose convolutions. The first transpose convolution in the decoder is set up to mirror the average pooling layer in the encoder. It has a kernel size and stride of 4. We used 16 channels for this convolution, as our original encoder implementation had no linear projection, and so each half of the latent vector passed to each decoder only came from 16 of the 32 channels output by the average pooling layer. After adding a linear projection to the encoder, each half of the latent now comes from a combination of all 32 channels output by the average pooling layer, but we kept using 16 channels in the first layer of our decoder. Future work could change the first transpose convolution to use 32 channels, although we do not expect such a change to make any significant impact on the overall performance of SEAR. The last four transpose convolutions mirror the 4 convolutions in the encoder. They have 32 channels, except for the last convolution, which has the same number of channels as the stack of rgb images for the reconstruction decoder, or the same number of channels as the stack of masks for the mask decoder. They have a kernel size of 3, and a stride of 1, except for the last transpose convolution which has a stride of 2. The output from the transpose convolutions is passed through an output activation, which is the identity for the reconstruction decoder and a sigmoid for the mask decoder.
440
+
441
+ # C.4. Training Details
442
+
443
+ We train each model using a mix of RTX6000, A5000, A6000 or 2080Ti GPUs. Each run takes about 3-7 hours of training on these.
444
+
445
+ Table 2: Hyperparameter Settings
446
+
447
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Replay Buffer Size</td><td>2.5e5</td></tr><tr><td>Frame Stack</td><td>3</td></tr><tr><td>Action Repeat</td><td>2 - Meta-World; Distracting Control
448
+ 1 - Kitchen; Hand Manipulation</td></tr><tr><td>Seed Frames</td><td>4000</td></tr><tr><td>Exploration Steps</td><td>2000</td></tr><tr><td>N-Step Return</td><td>3</td></tr><tr><td>Batch Size</td><td>256</td></tr><tr><td>Discount</td><td>0.99</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Actor, Critic Learning Rate</td><td>1e-4</td></tr><tr><td>Decoder Learning Rate</td><td>1e-4</td></tr><tr><td>Agent Update Frequency</td><td>2</td></tr><tr><td>Critic Q-function Soft-UpDate Rate τ</td><td>0.01</td></tr><tr><td>Actor, Critic Feature Dimensions</td><td>50</td></tr><tr><td>Latent Dimensions</td><td>4096 - Single-task
449
+ 512 - Multi-task, Transfer</td></tr><tr><td>Exploration StdDev. Schedule</td><td>linear(1.0,0.1,2e6) - Meta-World MT
450
+ linear(1.0,0.1,5e5) - otherwise</td></tr><tr><td>Exploration StdDev Clip</td><td>0.3</td></tr><tr><td>Observation Render Size</td><td>(84, 84)</td></tr><tr><td>Reconstruction Loss Scaling Coefficient (c1)</td><td>0.01</td></tr><tr><td>Mask Loss Scaling Coefficient (c2)</td><td>0.0025</td></tr><tr><td>Camera Name/ID</td><td>&quot;Corner&quot; - Meta-World
451
+ &quot;Fixed&quot; - Hand Manipulation; Kitchen
452
+ 0 - Distracting Control</td></tr><tr><td>Evaluation Frequency</td><td>1e4</td></tr><tr><td>Evaluation Episodes</td><td>10</td></tr></table>
453
+
454
+ # C.5. Robot Mask Preprocessing
455
+
456
+ For segmentation masks, single pixel wide artifacts were observed to render around the edges of some non-robot objects. At a resolution of $84 \times 84$ , some robot features were also on the order of a single pixel wide, which made filtering at such a resolution more difficult. We observed that the artifacts remained one-pixel wide, even as the resolution was increased. Thus, to filter out these artifacts, segmentation masks were rendered at a resolution of (252, 252), a morphological opening was applied, and then the masks were downsampled to a resolution of (84, 84) before being passed to the agent.
457
+
458
+ # C.6. Noisy and Approximate Mask Generation
459
+
460
+ Noisy masks were generated by taking the clean, filtered robot mask, and randomly setting robot labels to non-robot labels with a user-specified probability. To generate an approximate mask, we take the original robot mask, downsample it, and then upsample it back to its original size. We then apply gaussian blurring and threshold the image to get a new mask.
461
+
462
+ # D. Real-World Robot Segmentation Model
463
+
464
+ In order to more directly test applicability to real robots, we train a segmentation model for a real Franka Panda robot. For this setup, we finetune a Mask-RCNN model (He et al., 2017) on around 100 images of our own robot (Franka Panda) as well as a few internet images, both of which we manually label. Figure 15 shows images of the masks obtained by running our model on out-of-distribution robot images as well as new viewpoints. When paired with the results from 5.1, which show that SEAR can work with noisy and approximate robot masks, we have hope that SEAR may also be applicable to training in real-world settings.
465
+
466
+ ![](images/6d02c89e838ca418416ca44fa0b66f446f7d57b1ca7c960c18a6aced05f6f173.jpg)
467
+ Figure 15: Segmentation masks predicted on out-of-distribution images by a fine-tuned Mask-RCNN model (He et al., 2017).
468
+
469
+ ![](images/1cf7edeae2aef0135be237afd68dba794a46f2ccff32b0df9d1ee2b735c2879d.jpg)
470
+ E. Decoder Ablations
471
+
472
+ ![](images/c087db213bdf9d7569c782621d053461e395b33c9f21808a798fc82cb530dc68.jpg)
473
+ Figure 16: Ablation of hyperparameters of SEAR such as the coefficients of the reconstruction loss: $c_{1}$ , $c_{2}$ .
474
+
475
+ ![](images/9a59996ea7372654c478f99e41a4ebd8194b0c60b9681d181d0b649f4ff7ff7b.jpg)
476
+ F. Auxiliary Mask Loss Without Latent Separation
477
+
478
+ ![](images/4000f1306164e3117947f9df0da91107b6e546aa1d055a81e739086f8d8e5ca9.jpg)
479
+
480
+ ![](images/55f47b78ef8b4344bcd7643aabc75ba82f1b8fbbd272ade52a7b591e98f3a79c.jpg)
481
+
482
+ ![](images/5af63fe8008cec3d26849b8475e034523f3547dd31c1db3961dcc41aab8d7fa1.jpg)
483
+
484
+ ![](images/e0d042add03568006df68d490c37239a67f46d7a6038ea5ede26162f925b91b5.jpg)
485
+
486
+ ![](images/947e871c081fbbdce84a48fd079fcc9bc76bf7c3aa6d20dbc0f87584121d7e3a.jpg)
487
+ Figure 17: Ablation comparing SEAR to a model where you add an auxiliary mask loss but do not split the latent vector.
488
+
489
+ ![](images/8a6cb20fff6154be715a7cb7279ca895d80f8927f1a2d06c868032190f237f3f.jpg)
490
+ #
491
+
492
+ ![](images/7ea5134a1f5739e02802b0deaf92511db25fc92a0b4bee47d8e8fe354991c60b.jpg)
493
+ Ours
494
+ $\therefore m = \frac{3}{11}$
495
+
496
+ ![](images/4f72f3e8a241453b6290ad3fedb9f3d377529cf707e85d38b92e41f2b469210c.jpg)
497
+ — No
498
+ Z
499
+
500
+ ![](images/5cbd0e465cbe50f6530454523ab7a23ab42adf25d9235dc19c55d2d400814350.jpg)
501
+
502
+ # G. Encoder Activation Maps
503
+
504
+ ![](images/1b3aad405715dcfb7af5d174dc73341c7a20577a0d236ab6ee8109a784d62a13.jpg)
505
+ Figure 18: Activation maps from the fourth convolution of the encoder, resized and overlaid on top of the corresponding input image.
506
+
507
+ ![](images/576069791db5245a9157d8232953a5bf8c051ebaa060950bd5ca505d7e807db1.jpg)
508
+ Figure 19: Activation maps from the fourth convolution of the encoder, resized and overlaid on top of the corresponding input image.
509
+
510
+ ![](images/15e8cf36c5d8f9a43ea3ab8fd9c4be89646e276d8a51475f6fd58b559f978f6f.jpg)
511
+ Figure 20: Activation maps from the fourth convolution of the encoder, resized and overlaid on top of the corresponding input image.
512
+
513
+ # H. Multi-Task Franka Kitchen Camera Locations
514
+
515
+ ![](images/348c27c66674f3f431c73f7c6794b7206fd1cf5b17e19bf0f63b23cd08c8b1a0.jpg)
516
+ Figure 21: Set of 6 camera angles randomly selected from each episode in the Franka Kitchen multi-task setup
2023/Efficient RL via Disentangled Environment and Agent Representations/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:454483bb4bb4f08f15abeff0434cd913f20715710b85ce62bf5368452db71a7e
3
+ size 1788053
2023/Efficient RL via Disentangled Environment and Agent Representations/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Efficient Rate Optimal Regret for Adversarial Contextual MDPs Using Online Function Approximation/0060b436-ee1c-4a15-b426-2e1cfcc12983_content_list.json ADDED
The diff for this file is too large to render. See raw diff