Chelsea707 commited on
Commit
ab75c57
·
verified ·
1 Parent(s): c04e230

Add Batch 2a0764a5-d44c-4895-b004-3a01733c5b9b 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/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_content_list.json +0 -0
  3. 2023/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_model.json +0 -0
  4. 2023/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_origin.pdf +3 -0
  5. 2023/Online Local Differential Private Quantile Inference via Self-normalization/full.md +583 -0
  6. 2023/Online Local Differential Private Quantile Inference via Self-normalization/images.zip +3 -0
  7. 2023/Online Local Differential Private Quantile Inference via Self-normalization/layout.json +0 -0
  8. 2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_content_list.json +0 -0
  9. 2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_model.json +0 -0
  10. 2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_origin.pdf +3 -0
  11. 2023/Online Mechanism Design for Information Acquisition/full.md +0 -0
  12. 2023/Online Mechanism Design for Information Acquisition/images.zip +3 -0
  13. 2023/Online Mechanism Design for Information Acquisition/layout.json +0 -0
  14. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_content_list.json +0 -0
  15. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_model.json +0 -0
  16. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_origin.pdf +3 -0
  17. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/full.md +523 -0
  18. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/images.zip +3 -0
  19. 2023/Online Nonstochastic Control with Adversarial and Static Constraints/layout.json +0 -0
  20. 2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_content_list.json +0 -0
  21. 2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_model.json +0 -0
  22. 2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_origin.pdf +3 -0
  23. 2023/Online Platt Scaling with Calibeating/full.md +1050 -0
  24. 2023/Online Platt Scaling with Calibeating/images.zip +3 -0
  25. 2023/Online Platt Scaling with Calibeating/layout.json +0 -0
  26. 2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_content_list.json +0 -0
  27. 2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_model.json +0 -0
  28. 2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_origin.pdf +3 -0
  29. 2023/Online Prototype Alignment for Few-shot Policy Transfer/full.md +406 -0
  30. 2023/Online Prototype Alignment for Few-shot Policy Transfer/images.zip +3 -0
  31. 2023/Online Prototype Alignment for Few-shot Policy Transfer/layout.json +0 -0
  32. 2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_content_list.json +0 -0
  33. 2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_model.json +0 -0
  34. 2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_origin.pdf +3 -0
  35. 2023/Online Restless Bandits with Unobserved States/full.md +0 -0
  36. 2023/Online Restless Bandits with Unobserved States/images.zip +3 -0
  37. 2023/Online Restless Bandits with Unobserved States/layout.json +0 -0
  38. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_content_list.json +1872 -0
  39. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_model.json +0 -0
  40. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_origin.pdf +3 -0
  41. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/full.md +347 -0
  42. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/images.zip +3 -0
  43. 2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/layout.json +0 -0
  44. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_content_list.json +2082 -0
  45. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_model.json +0 -0
  46. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_origin.pdf +3 -0
  47. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/full.md +374 -0
  48. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/images.zip +3 -0
  49. 2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/layout.json +0 -0
  50. 2023/OpenFE_ Automated Feature Generation with Expert-level Performance/4cb285e8-db2a-41a4-93db-f20359a609ed_content_list.json +0 -0
.gitattributes CHANGED
@@ -7176,3 +7176,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
7176
  2023/One-vs-the-Rest[[:space:]]Loss[[:space:]]to[[:space:]]Focus[[:space:]]on[[:space:]]Important[[:space:]]Samples[[:space:]]in[[:space:]]Adversarial[[:space:]]Training/89145bd5-5cec-4ca4-b783-50acc9536fe1_origin.pdf filter=lfs diff=lfs merge=lfs -text
7177
  2023/Online[[:space:]]Learning[[:space:]]in[[:space:]]Stackelberg[[:space:]]Games[[:space:]]with[[:space:]]an[[:space:]]Omniscient[[:space:]]Follower/8e7ecba0-1ca3-4e07-b024-8c87ffbe267d_origin.pdf filter=lfs diff=lfs merge=lfs -text
7178
  2023/Online[[:space:]]Learning[[:space:]]with[[:space:]]Feedback[[:space:]]Graphs_[[:space:]]The[[:space:]]True[[:space:]]Shape[[:space:]]of[[:space:]]Regret/2c7485f4-ed68-4500-bcb3-d78259c9f39e_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7176
  2023/One-vs-the-Rest[[:space:]]Loss[[:space:]]to[[:space:]]Focus[[:space:]]on[[:space:]]Important[[:space:]]Samples[[:space:]]in[[:space:]]Adversarial[[:space:]]Training/89145bd5-5cec-4ca4-b783-50acc9536fe1_origin.pdf filter=lfs diff=lfs merge=lfs -text
7177
  2023/Online[[:space:]]Learning[[:space:]]in[[:space:]]Stackelberg[[:space:]]Games[[:space:]]with[[:space:]]an[[:space:]]Omniscient[[:space:]]Follower/8e7ecba0-1ca3-4e07-b024-8c87ffbe267d_origin.pdf filter=lfs diff=lfs merge=lfs -text
7178
  2023/Online[[:space:]]Learning[[:space:]]with[[:space:]]Feedback[[:space:]]Graphs_[[:space:]]The[[:space:]]True[[:space:]]Shape[[:space:]]of[[:space:]]Regret/2c7485f4-ed68-4500-bcb3-d78259c9f39e_origin.pdf filter=lfs diff=lfs merge=lfs -text
7179
+ 2023/Online[[:space:]]Local[[:space:]]Differential[[:space:]]Private[[:space:]]Quantile[[:space:]]Inference[[:space:]]via[[:space:]]Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_origin.pdf filter=lfs diff=lfs merge=lfs -text
7180
+ 2023/Online[[:space:]]Mechanism[[:space:]]Design[[:space:]]for[[:space:]]Information[[:space:]]Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_origin.pdf filter=lfs diff=lfs merge=lfs -text
7181
+ 2023/Online[[:space:]]Nonstochastic[[:space:]]Control[[:space:]]with[[:space:]]Adversarial[[:space:]]and[[:space:]]Static[[:space:]]Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_origin.pdf filter=lfs diff=lfs merge=lfs -text
7182
+ 2023/Online[[:space:]]Platt[[:space:]]Scaling[[:space:]]with[[:space:]]Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_origin.pdf filter=lfs diff=lfs merge=lfs -text
7183
+ 2023/Online[[:space:]]Prototype[[:space:]]Alignment[[:space:]]for[[:space:]]Few-shot[[:space:]]Policy[[:space:]]Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_origin.pdf filter=lfs diff=lfs merge=lfs -text
7184
+ 2023/Online[[:space:]]Restless[[:space:]]Bandits[[:space:]]with[[:space:]]Unobserved[[:space:]]States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_origin.pdf filter=lfs diff=lfs merge=lfs -text
7185
+ 2023/Open-VCLIP_[[:space:]]Transforming[[:space:]]CLIP[[:space:]]to[[:space:]]an[[:space:]]Open-vocabulary[[:space:]]Video[[:space:]]Model[[:space:]]via[[:space:]]Interpolated[[:space:]]Weight[[:space:]]Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_origin.pdf filter=lfs diff=lfs merge=lfs -text
7186
+ 2023/Open-Vocabulary[[:space:]]Universal[[:space:]]Image[[:space:]]Segmentation[[:space:]]with[[:space:]]MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_origin.pdf filter=lfs diff=lfs merge=lfs -text
7187
+ 2023/OpenFE_[[:space:]]Automated[[:space:]]Feature[[:space:]]Generation[[:space:]]with[[:space:]]Expert-level[[:space:]]Performance/4cb285e8-db2a-41a4-93db-f20359a609ed_origin.pdf filter=lfs diff=lfs merge=lfs -text
7188
+ 2023/Opponent-Limited[[:space:]]Online[[:space:]]Search[[:space:]]for[[:space:]]Imperfect[[:space:]]Information[[:space:]]Games/478ccf00-2b7d-49c0-b0e0-e82b1bcf5813_origin.pdf filter=lfs diff=lfs merge=lfs -text
7189
+ 2023/Optimal[[:space:]]Arms[[:space:]]Identification[[:space:]]with[[:space:]]Knapsacks/dbef59f9-f079-44c4-86d6-060a18de782f_origin.pdf filter=lfs diff=lfs merge=lfs -text
7190
+ 2023/Optimal[[:space:]]Convergence[[:space:]]Rates[[:space:]]for[[:space:]]Agnostic[[:space:]]Nyström[[:space:]]Kernel[[:space:]]Learning/3bfa2cc3-ccdb-4abe-a17a-ca9325032e24_origin.pdf filter=lfs diff=lfs merge=lfs -text
7191
+ 2023/Optimal[[:space:]]Goal-Reaching[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]via[[:space:]]Quasimetric[[:space:]]Learning/b0eada58-0a2b-40db-a667-022e8144a402_origin.pdf filter=lfs diff=lfs merge=lfs -text
7192
+ 2023/Optimal[[:space:]]Horizon-Free[[:space:]]Reward-Free[[:space:]]Exploration[[:space:]]for[[:space:]]Linear[[:space:]]Mixture[[:space:]]MDPs/f5faf526-440a-4be9-a2e2-e82eee6574af_origin.pdf filter=lfs diff=lfs merge=lfs -text
7193
+ 2023/Optimal[[:space:]]LP[[:space:]]Rounding[[:space:]]and[[:space:]]Linear-Time[[:space:]]Approximation[[:space:]]Algorithms[[:space:]]for[[:space:]]Clustering[[:space:]]Edge-Colored[[:space:]]Hypergraphs/e68ec0f9-1b8b-43da-b51f-8b76f951edd4_origin.pdf filter=lfs diff=lfs merge=lfs -text
7194
+ 2023/Optimal[[:space:]]No-Regret[[:space:]]Learning[[:space:]]for[[:space:]]One-Sided[[:space:]]Lipschitz[[:space:]]Functions/9998c0ed-e6a6-4d21-aee1-d64d483e7de0_origin.pdf filter=lfs diff=lfs merge=lfs -text
7195
+ 2023/Optimal[[:space:]]Online[[:space:]]Generalized[[:space:]]Linear[[:space:]]Regression[[:space:]]with[[:space:]]Stochastic[[:space:]]Noise[[:space:]]and[[:space:]]Its[[:space:]]Application[[:space:]]to[[:space:]]Heteroscedastic[[:space:]]Bandits/2f11413c-1ae3-45a1-a443-53c78cc30e73_origin.pdf filter=lfs diff=lfs merge=lfs -text
7196
+ 2023/Optimal[[:space:]]Rates[[:space:]]and[[:space:]]Efficient[[:space:]]Algorithms[[:space:]]for[[:space:]]Online[[:space:]]Bayesian[[:space:]]Persuasion/e48a6043-cb93-474f-830e-6b1acfd94335_origin.pdf filter=lfs diff=lfs merge=lfs -text
7197
+ 2023/Optimal[[:space:]]Sets[[:space:]]and[[:space:]]Solution[[:space:]]Paths[[:space:]]of[[:space:]]ReLU[[:space:]]Networks/3ae2e702-f44a-4693-a337-d8cee4b20a8d_origin.pdf filter=lfs diff=lfs merge=lfs -text
7198
+ 2023/Optimal[[:space:]]Shrinkage[[:space:]]for[[:space:]]Distributed[[:space:]]Second-Order[[:space:]]Optimization/76a3fc8d-e013-47a3-af5a-c74e3d254a94_origin.pdf filter=lfs diff=lfs merge=lfs -text
7199
+ 2023/Optimal[[:space:]]Stochastic[[:space:]]Non-smooth[[:space:]]Non-convex[[:space:]]Optimization[[:space:]]through[[:space:]]Online-to-Non-convex[[:space:]]Conversion/7a3adabc-1600-4dd8-bebe-4b384c5a9a40_origin.pdf filter=lfs diff=lfs merge=lfs -text
7200
+ 2023/Optimal[[:space:]]randomized[[:space:]]multilevel[[:space:]]Monte[[:space:]]Carlo[[:space:]]for[[:space:]]repeatedly[[:space:]]nested[[:space:]]expectations/9f47ec11-ca59-499e-b775-a17514748552_origin.pdf filter=lfs diff=lfs merge=lfs -text
7201
+ 2023/Optimality[[:space:]]of[[:space:]]Thompson[[:space:]]Sampling[[:space:]]with[[:space:]]Noninformative[[:space:]]Priors[[:space:]]for[[:space:]]Pareto[[:space:]]Bandits/e8d66784-9e86-4167-8c70-2e553c97e157_origin.pdf filter=lfs diff=lfs merge=lfs -text
7202
+ 2023/Optimally-weighted[[:space:]]Estimators[[:space:]]of[[:space:]]the[[:space:]]Maximum[[:space:]]Mean[[:space:]]Discrepancy[[:space:]]for[[:space:]]Likelihood-Free[[:space:]]Inference/4296c590-4b7c-4741-a603-b369138c7197_origin.pdf filter=lfs diff=lfs merge=lfs -text
7203
+ 2023/Optimistic[[:space:]]Online[[:space:]]Mirror[[:space:]]Descent[[:space:]]for[[:space:]]Bridging[[:space:]]Stochastic[[:space:]]and[[:space:]]Adversarial[[:space:]]Online[[:space:]]Convex[[:space:]]Optimization/42cbf696-b8c2-4a8a-ac7c-b112b22ff607_origin.pdf filter=lfs diff=lfs merge=lfs -text
7204
+ 2023/Optimistic[[:space:]]Planning[[:space:]]by[[:space:]]Regularized[[:space:]]Dynamic[[:space:]]Programming/36b64464-75d0-426b-9596-21a225953963_origin.pdf filter=lfs diff=lfs merge=lfs -text
7205
+ 2023/Optimization[[:space:]]for[[:space:]]Amortized[[:space:]]Inverse[[:space:]]Problems/5e797670-3523-4fb0-a93c-cacf44fbc9d6_origin.pdf filter=lfs diff=lfs merge=lfs -text
7206
+ 2023/Optimizing[[:space:]]DDPM[[:space:]]Sampling[[:space:]]with[[:space:]]Shortcut[[:space:]]Fine-Tuning/06ad9ffb-9af7-4eca-9730-321347e434ea_origin.pdf filter=lfs diff=lfs merge=lfs -text
7207
+ 2023/Optimizing[[:space:]]Hyperparameters[[:space:]]with[[:space:]]Conformal[[:space:]]Quantile[[:space:]]Regression/9a52e73b-474f-4e50-a22b-574074a7abdc_origin.pdf filter=lfs diff=lfs merge=lfs -text
7208
+ 2023/Optimizing[[:space:]]Mode[[:space:]]Connectivity[[:space:]]for[[:space:]]Class[[:space:]]Incremental[[:space:]]Learning/8d1833d9-6018-478e-82fb-b5a2ab0cd134_origin.pdf filter=lfs diff=lfs merge=lfs -text
7209
+ 2023/Optimizing[[:space:]]NOTEARS[[:space:]]Objectives[[:space:]]via[[:space:]]Topological[[:space:]]Swaps/404f2a56-0612-4b8b-a5d0-ec3b4010f4b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
7210
+ 2023/Optimizing[[:space:]]the[[:space:]]Collaboration[[:space:]]Structure[[:space:]]in[[:space:]]Cross-Silo[[:space:]]Federated[[:space:]]Learning/3de16504-5e17-4710-9f78-a7cb3e0fd928_origin.pdf filter=lfs diff=lfs merge=lfs -text
7211
+ 2023/Oracles[[:space:]]&[[:space:]]Followers_[[:space:]]Stackelberg[[:space:]]Equilibria[[:space:]]in[[:space:]]Deep[[:space:]]Multi-Agent[[:space:]]Reinforcement[[:space:]]Learning/d14653e4-83e1-4abc-899b-137b6cac8cb9_origin.pdf filter=lfs diff=lfs merge=lfs -text
7212
+ 2023/Orthogonality-Enforced[[:space:]]Latent[[:space:]]Space[[:space:]]in[[:space:]]Autoencoders_[[:space:]]An[[:space:]]Approach[[:space:]]to[[:space:]]Learning[[:space:]]Disentangled[[:space:]]Representations/c39ba5c7-4517-44dc-bd0a-0a1ee67d2126_origin.pdf filter=lfs diff=lfs merge=lfs -text
7213
+ 2023/Oscillation-free[[:space:]]Quantization[[:space:]]for[[:space:]]Low-bit[[:space:]]Vision[[:space:]]Transformers/3110bd73-e1c9-4e14-bb2a-1fb637f21497_origin.pdf filter=lfs diff=lfs merge=lfs -text
7214
+ 2023/Out-of-Distribution[[:space:]]Generalization[[:space:]]of[[:space:]]Federated[[:space:]]Learning[[:space:]]via[[:space:]]Implicit[[:space:]]Invariant[[:space:]]Relationships/36b2047c-4388-4ff0-b9f4-01edece66215_origin.pdf filter=lfs diff=lfs merge=lfs -text
7215
+ 2023/Out-of-Domain[[:space:]]Robustness[[:space:]]via[[:space:]]Targeted[[:space:]]Augmentations/dbc276e3-e723-423b-86f2-d355cc720f7c_origin.pdf filter=lfs diff=lfs merge=lfs -text
7216
+ 2023/Outline,[[:space:]]Then[[:space:]]Details_[[:space:]]Syntactically[[:space:]]Guided[[:space:]]Coarse-To-Fine[[:space:]]Code[[:space:]]Generation/4898fdc9-3839-4b6a-a7ac-9094ad24acd4_origin.pdf filter=lfs diff=lfs merge=lfs -text
7217
+ 2023/Over-parametrization[[:space:]]via[[:space:]]Lifting[[:space:]]for[[:space:]]Low-rank[[:space:]]Matrix[[:space:]]Sensing_[[:space:]]Conversion[[:space:]]of[[:space:]]Spurious[[:space:]]Solutions[[:space:]]to[[:space:]]Strict[[:space:]]Saddle[[:space:]]Points/09220def-5b53-49d9-9724-f8f9c76fb846_origin.pdf filter=lfs diff=lfs merge=lfs -text
7218
+ 2023/Overcoming[[:space:]]Simplicity[[:space:]]Bias[[:space:]]in[[:space:]]Deep[[:space:]]Networks[[:space:]]using[[:space:]]a[[:space:]]Feature[[:space:]]Sieve/7c358586-a06e-4c93-b397-556c3e5e4635_origin.pdf filter=lfs diff=lfs merge=lfs -text
7219
+ 2023/PAC[[:space:]]Generalization[[:space:]]via[[:space:]]Invariant[[:space:]]Representations/90f14d30-0209-41e7-8899-61a259c52931_origin.pdf filter=lfs diff=lfs merge=lfs -text
7220
+ 2023/PAC[[:space:]]Prediction[[:space:]]Sets[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]of[[:space:]]Code/689ebd55-3de5-499a-81d8-4a6876e62a3c_origin.pdf filter=lfs diff=lfs merge=lfs -text
7221
+ 2023/PAC-Bayesian[[:space:]]Generalization[[:space:]]Bounds[[:space:]]for[[:space:]]Adversarial[[:space:]]Generative[[:space:]]Models/7b9d769a-c10e-4414-8747-c8e810cd07e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
7222
+ 2023/PAC-Bayesian[[:space:]]Offline[[:space:]]Contextual[[:space:]]Bandits[[:space:]]With[[:space:]]Guarantees/e48e30bc-0e15-490e-a3eb-81d346558b5c_origin.pdf filter=lfs diff=lfs merge=lfs -text
7223
+ 2023/PAL_[[:space:]]Program-aided[[:space:]]Language[[:space:]]Models/30012c90-8a46-4e4c-b93b-65b2baf6ff5e_origin.pdf filter=lfs diff=lfs merge=lfs -text
7224
+ 2023/PASTA_[[:space:]]Pessimistic[[:space:]]Assortment[[:space:]]Optimization/465676e4-62aa-4649-9eb2-2787f164209e_origin.pdf filter=lfs diff=lfs merge=lfs -text
7225
+ 2023/PCA-based[[:space:]]Multi-Task[[:space:]]Learning_[[:space:]]a[[:space:]]Random[[:space:]]Matrix[[:space:]]Approach/8c46e2ce-c4ca-4c9f-8292-b9d099eebc2d_origin.pdf filter=lfs diff=lfs merge=lfs -text
7226
+ 2023/PFGM++_[[:space:]]Unlocking[[:space:]]the[[:space:]]Potential[[:space:]]of[[:space:]]Physics-Inspired[[:space:]]Generative[[:space:]]Models/defbf173-510a-4af3-b016-563b66203903_origin.pdf filter=lfs diff=lfs merge=lfs -text
7227
+ 2023/PFNs4BO_[[:space:]]In-Context[[:space:]]Learning[[:space:]]for[[:space:]]Bayesian[[:space:]]Optimization/82880fd9-9c4f-4510-94a9-94c8f181e695_origin.pdf filter=lfs diff=lfs merge=lfs -text
7228
+ 2023/PINA_[[:space:]]Leveraging[[:space:]]Side[[:space:]]Information[[:space:]]in[[:space:]]eXtreme[[:space:]]Multi-label[[:space:]]Classification[[:space:]]via[[:space:]]Predicted[[:space:]]Instance[[:space:]]Neighborhood[[:space:]]Aggregation/4619dc9a-2ef2-4ec7-8f9f-3b9b7d333555_origin.pdf filter=lfs diff=lfs merge=lfs -text
7229
+ 2023/PLay_[[:space:]]Parametrically[[:space:]]Conditioned[[:space:]]Layout[[:space:]]Generation[[:space:]]using[[:space:]]Latent[[:space:]]Diffusion/40089cfc-d6e9-4443-ac03-b7316f9f4daf_origin.pdf filter=lfs diff=lfs merge=lfs -text
7230
+ 2023/POUF_[[:space:]]Prompt-Oriented[[:space:]]Unsupervised[[:space:]]Fine-tuning[[:space:]]for[[:space:]]Large[[:space:]]Pre-trained[[:space:]]Models/9fbc4b62-c6b3-4cea-99ad-47db923652b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
7231
+ 2023/PPG[[:space:]]Reloaded_[[:space:]]An[[:space:]]Empirical[[:space:]]Study[[:space:]]on[[:space:]]What[[:space:]]Matters[[:space:]]in[[:space:]]Phasic[[:space:]]Policy[[:space:]]Gradient/d5ea2132-a5da-459c-8e80-a808668d9fc5_origin.pdf filter=lfs diff=lfs merge=lfs -text
7232
+ 2023/PWSHAP_[[:space:]]A[[:space:]]Path-Wise[[:space:]]Explanation[[:space:]]Model[[:space:]]for[[:space:]]Targeted[[:space:]]Variables/f2badcb3-1eea-462b-8228-693dd0d053f4_origin.pdf filter=lfs diff=lfs merge=lfs -text
7233
+ 2023/PaLM-E_[[:space:]]An[[:space:]]Embodied[[:space:]]Multimodal[[:space:]]Language[[:space:]]Model/4461797a-308f-428e-a48a-e25f921ee6ed_origin.pdf filter=lfs diff=lfs merge=lfs -text
7234
+ 2023/Paging[[:space:]]with[[:space:]]Succinct[[:space:]]Predictions/dc9f89af-69dc-42a7-907e-8487c99ce46a_origin.pdf filter=lfs diff=lfs merge=lfs -text
7235
+ 2023/Pairwise[[:space:]]Ranking[[:space:]]Losses[[:space:]]of[[:space:]]Click-Through[[:space:]]Rates[[:space:]]Prediction[[:space:]]for[[:space:]]Welfare[[:space:]]Maximization[[:space:]]in[[:space:]]Ad[[:space:]]Auctions/3e781cd2-9b52-4138-b7c1-4ae974b4e8a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
7236
+ 2023/Parallel[[:space:]]$Q$-Learning_[[:space:]]Scaling[[:space:]]Off-policy[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]under[[:space:]]Massively[[:space:]]Parallel[[:space:]]Simulation/ea72b761-a8d8-40a9-a921-57fe6655ed03_origin.pdf filter=lfs diff=lfs merge=lfs -text
7237
+ 2023/Parallel[[:space:]]Neurosymbolic[[:space:]]Integration[[:space:]]with[[:space:]]Concordia/650dc6fe-4173-4f35-bfe7-4c3922fe474a_origin.pdf filter=lfs diff=lfs merge=lfs -text
7238
+ 2023/Parallel[[:space:]]Online[[:space:]]Clustering[[:space:]]of[[:space:]]Bandits[[:space:]]via[[:space:]]Hedonic[[:space:]]Game/d2164f2a-a1d3-45c8-9720-d48467e8b28b_origin.pdf filter=lfs diff=lfs merge=lfs -text
7239
+ 2023/Parameter-Level[[:space:]]Soft-Masking[[:space:]]for[[:space:]]Continual[[:space:]]Learning/da9166ad-c075-4c18-a27a-f3cfce2e0094_origin.pdf filter=lfs diff=lfs merge=lfs -text
7240
+ 2023/Pareto[[:space:]]Manifold[[:space:]]Learning_[[:space:]]Tackling[[:space:]]multiple[[:space:]]tasks[[:space:]]via[[:space:]]ensembles[[:space:]]of[[:space:]]single-task[[:space:]]models/6d40bc68-40e1-4f7c-bd97-3dfbfb7e861a_origin.pdf filter=lfs diff=lfs merge=lfs -text
7241
+ 2023/Pareto[[:space:]]Regret[[:space:]]Analyses[[:space:]]in[[:space:]]Multi-objective[[:space:]]Multi-armed[[:space:]]Bandit/39b963d3-3f00-45d4-9c2d-09c8e22fd4a3_origin.pdf filter=lfs diff=lfs merge=lfs -text
7242
+ 2023/Partial[[:space:]]Optimality[[:space:]]in[[:space:]]Cubic[[:space:]]Correlation[[:space:]]Clustering/39ca71a0-9de1-4939-b8f1-0c61d50ecd13_origin.pdf filter=lfs diff=lfs merge=lfs -text
2023/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Local Differential Private Quantile Inference via Self-normalization/25df2530-a6b7-4b82-9c80-367492d70871_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:954d07b51f5bff91db82a3c2bbb8ba06e103161f247308ef60cfeb4bff0e771d
3
+ size 1015586
2023/Online Local Differential Private Quantile Inference via Self-normalization/full.md ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Online Local Differential Private Quantile Inference via Self-normalization
2
+
3
+ Yi Liu $^{1}$ Qirui Hu $^{2}$ Lei Ding $^{1}$ Linglong Kong
4
+
5
+ # Abstract
6
+
7
+ Based on binary inquiries, we developed an algorithm to estimate population quantiles under Local Differential Privacy (LDP). By self-normalizing, our algorithm provides asymptotically normal estimation with valid inference, resulting in tight confidence intervals without the need for nuisance parameters to be estimated. Our proposed method can be conducted fully online, leading to high computational efficiency and minimal storage requirements with $\mathcal{O}(1)$ space. We also proved an optimality result by an elegant application of one central limit theorem of Gaussian Differential Privacy (GDP) when targeting the frequently encountered median estimation problem. With mathematical proof and extensive numerical testing, we demonstrate the validity of our algorithm both theoretically and experimentally.
8
+
9
+ # 1. Introduction
10
+
11
+ Personal data is currently widely used for various purposes, such as facial recognition, personalized advertising, medical trials, and recommendation systems to name a few. While there are potential benefits, it is important also to consider the risks associated with handling sensitive personal information. For instance, research on diabetes can provide valuable insights that may benefit society as a whole in the long term. However, it is crucial to keep in mind that participants may suffer direct consequences if their data is not properly protected through controlled disclosure, such as a rise in health insurance premiums.
12
+
13
+ The concept of Differential Privacy (DP; Dwork et al., 2006) has been successful in providing a rigorous condition for controlled disclosure by bounding the change in the distri
14
+
15
+ $^{1}$ Department of Mathematical and Statistical Sciences, University of Alberta, Edmonton, Canada $^{2}$ Center for Statistical Science, Department of Industrial Engineering, Tsinghua University, Beijing, China. Correspondence to: Linglong Kong <lkong@ualberta.ca>.
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
+ bution of outputs of a query made on a dataset under the alteration of one data point. This has led to a vast amount of literature under the umbrella of DP, resulting in various generalizations, tools, and applications. However, while enjoying the mathematically solid guarantee of DP and its variants, concerns about a weak link in the process, the trusted curator, are beginning to arise.
20
+
21
+ The use of trusted curators undermines the spirit of the solid cryptographic level of privacy protection that DP provides. This risk is not limited to information security breaches and rogue researchers but also includes legal proceedings where researchers may be compelled to hand over the raw data, breaking the initial promise made to DP at the time of data collection. Two concepts, Local Differential Privacy (LDP) and pan-DPs, are proposed as solutions. The pan-DP directly counters this issue by solidifying the algorithm to withstand multiple announced intrusions (subpoenas) or one unannounced intrusion (hackers). The concept of LDP was first introduced formally by (Kasiviswanathan et al., 2011), but its early form can be traced back to (Evfimievski et al., 2003) and (Warner, 1965), in the name of "amplification" and "randomized response survey," respectively.
22
+
23
+ In LDP settings, the sensitive information never leaves the control of the users unprotected. The users encode and alter their data locally before sending them to an untrusted central data server for further analysis and computation. Recently, in (Amin et al., 2020) unveiled a connection between pan-DP and LDP by considering variants of pan-DP framework that can defend against multiple unannounced intrusions. Surprisingly, this requirement can only be fulfilled if the data is scrambled before it leaves the owner's control, which goes back to the definition of LDP. For better privacy protection, many big tech companies have already implemented LDP into their products, such as Google (Erlingsson et al., 2014) and Microsoft (Ding et al., 2017).
24
+
25
+ This discovery rekindled the research interest in LDP. Researchers have begun to consider fundamental statistical problems, such as estimating parameters, modeling, and hypothesis testing under this constraint. The quantiles, including the median, are basic summary statistics that have been widely studied within the framework of differential privacy. Early research in this area includes the estimation of quantiles under the central DP setting, as presented in (Dwork
26
+
27
+ & Lei, 2009) and (Lei, 2011). More recent advancements, such as (Smith, 2011), have proposed a rate-optimal sample quantile estimator that does not rely on the evaluation of histograms. (Gillenwater et al., 2021) further extended this research by estimating multiple quantiles simultaneously. Despite these advances, the quantile estimation under the central DP setting remains an active area of research, with new work in various applications such as (Alabi et al., 2022) and (Ben-Eliezer et al., 2022).
28
+
29
+ In the central DP setting, a trusted curator can acquire the actual sample quantiles and other summary statistics, with the only limitation being that the release of the output must conform to the DP condition. However, under the local DP setting, the curator does not have access to the true data and can only see proxies generated by the users. This makes it more challenging to design local DP algorithms that can provide valid results leading to greater problems in developing corresponding theoretical properties and providing further statistical inference.
30
+
31
+ Researchers often propose consistent estimators for the parameters of interest and derive the asymptotic normality. However, these estimators often involve nuisance parameters that are not trivial to obtain or estimate, making them difficult to deploy in real-world scenarios. To address this issue, (Shao, 2010) developed the methodology of self-normalization for constructing confidence intervals. This method involves designing a statistic called the self-normalizer, which is proportional to the nuisance parameters, and making the original estimate a pivotal quantity by placing it and the self-normalizer in the numerator and the denominator, thereby canceling out the nuisance parameters and leading to an asymptotically pivotal distribution. This methodology provides a powerful tool for statistical inference under complex data, particularly in the context of LDP frameworks where obtaining accurate original data or consistently estimating nuisance parameters without an additional privacy budget is challenging.
32
+
33
+ Efficient computation is essential for the practicality of LDP algorithms, as large sample sizes are necessary to counteract the effects of local perturbations and achieve optimal performance. Meanwhile, online computation is another valuable attribute of LDP algorithms, as it reduces storage requirements and diminishes risks associated with information storage. Early attempts of introduce online computation to DP algorithms can be traced back to (Jain et al., 2012), where additive Gaussian noise was injected into the gradient to provide DP protection. Later, (Agarwal & Singh, 2017) gives an online linear optimization DP algorithm that with optimal regret bounds. The concept of online computation has also been incorporated into federated learning, as discussed by (Wei et al., 2020). More recently, (Lee et al., 2022) has facilitated online computation for a random
34
+
35
+ scaling quantity using only the trajectory of stochastic optimization, effectively eliminating the need for past state storage and enhancing computational efficiency. In contrast to traditional studies on DP online algorithms, our emphasis is on harnessing online computation for convenience. Our theoretical analysis concentrates on the statistical properties of the proposed estimators, encompassing aspects such as consistency, asymptotic normality, and more.
36
+
37
+ In this paper, our contributions are listed as follows.
38
+
39
+ - We propose a new LDP algorithm for population quantile estimation that does not require a trusted curator. Under some mild conditions, we derive the consistency and asymptotic normality of the proposed quantile estimator.
40
+ - We construct the confidence interval of the population quantiles via self-normalization, which eliminates the need for estimating the asymptotic variance in the limiting distribution. Furthermore, this procedure can be implemented online without storing all past statuses.
41
+ - We also discuss the optimality of the proposed algorithm. By combining it with the central limit theorem of GDP, we demonstrate that our algorithm for median estimation achieves the lower bound of asymptotic variance among all median estimators constructed by a binary random response-based sequential interactive mechanism under LDP.
42
+
43
+ The structure of this paper is as follows. We begin by providing an overview of the concepts of central DP and LDP. Then present our proposed methodology, detailing the algorithms and their corresponding theoretical results. Finally, we provide experimental results to demonstrate the effectiveness of our approach.
44
+
45
+ # 2. Preliminaries
46
+
47
+ # 2.1. Central Differential Privacy
48
+
49
+ Definition 2.1. (Dwork et al., 2006) A randomized algorithm $\mathcal{A}$ , taking a dataset consisting of individuals as its input, is $(\epsilon, \delta)$ -differentially private if, for any pair of datasets $S$ and $S'$ that differ in the record of a single individual and any event $E$ , satisfies the below condition:
50
+
51
+ $$
52
+ \mathbb {P} [ \mathcal {A} (S) \in E ] \leq e ^ {\epsilon} \mathbb {P} [ \mathcal {A} \left(S ^ {\prime}\right) \in E ] + \delta .
53
+ $$
54
+
55
+ When $\delta = 0$ , $\mathcal{A}$ is called $\epsilon$ -Differentially Private ( $\epsilon$ -DP).
56
+
57
+ The concept of DP only imposes constraints on the output distribution of an algorithm $\mathcal{A}$ , rather than placing restrictions on the credibility of the entity running the algorithm or
58
+
59
+ protecting the internal states of $\mathcal{A}$ . The existence of the curator who has access to the raw data set is why this approach is known as "Central" DP. The curator simplifies the algorithm design and often leads to an asymptotically negligible loss of accuracy from privacy protection (Cai et al., 2021).
60
+
61
+ # 2.2. Local Differential Privacy
62
+
63
+ Despite the varying definitions of LDP due to the level of interactions, all of them depend on the following concept called $(\epsilon, \delta)$ -randomizer.
64
+
65
+ Definition 2.2. (Joseph et al., 2019) An $(\epsilon, \delta)$ -randomizer $R: X \to Y$ is an $(\epsilon, \delta)$ -differentially private function taking a single data point as input.
66
+
67
+ The definition of randomizer is mathematically a special case of the central DP. The main difference between the central and local DP is the role of the curator, which is further determined by the level of interactions allowed. In LDP, the curator coordinates interactions between $n$ users, each of whom holds their own private information $X_{i}$ . In each round of interaction, the curator selects a user and assigns them a randomizer $R_{t}$ . If the $(\epsilon, \delta)$ parameters are allowed by the experiment setting, the user will run the randomizer on their private information and release the output to the curator. The level of interactions can vary from full-interactive, where the curator can choose the randomizer and the next user based on all previous interactions, to sequential (also called one-shot) interactive, where the curator is not allowed to pick one user twice but is still able to adaptively picking the next the user-randomizer pairs based on all previous interactions, to non-interactive, where adaptivity is forbidden, and all user-randomizer pairs must be determined before any information is collected. If the curator is further forbidden from varying the randomizer $R$ and tracking back outputs to a specific user, it will lead to another interesting setting called shuffle-DP. In this paper, our algorithm complies with the $(\epsilon, 0)$ sequentially interactive Local LDP conditions. This is because our inquiries and internal states are driven by randomized responses from users, while no user is queried more than once. For a more detailed information, please refer to Definitions 2.3 and 2.6 in (Cheu et al., 2019).
68
+
69
+ # 2.3. Notations
70
+
71
+ In this paper, we employ the following notations. $\mathbf{1}_{\{\cdot\}}$ is the indicator function and $[a]$ denotes the largest integer that does not exceed $a$ . $\mathcal{O}$ (or $\mathcal{O}$ ) denotes a sequence of real numbers of a certain order. For instance, $\mathcal{O}(n^{-1/2})$ means a smaller order than $n^{-1/2}$ , and by $\mathcal{O}_{a.s.}$ (or $\mathcal{O}_{a.s.}$ ) almost surely $\mathcal{O}$ (or $\mathcal{O}$ ). For sequences $a_n$ and $b_n$ , denote $a_n \asymp b_n$ if there exist positive constants $c$ and $C$ such that $cb_n \leq a_n \leq C b_n$ . The symbol $\xrightarrow{d}$ means weak convergence
72
+
73
+ or converge in distribution.
74
+
75
+ # 3. Algorithm and Main Results
76
+
77
+ # 3.1. Algorithm
78
+
79
+ Let $x_{1},\ldots ,x_{n},\ldots$ be independently and identically distributed(i.i.d.) random variables defined on $\mathbb{R}$ representing private information of each user, with target quantile $\tau$ and corresponding true value $Q$ , i.e., $\mathbb{P}(x_i\leq Q) = \tau$ . To ensure the uniqueness of quantiles, we assume the $x_{i}$ 's are continuous random variables, with positive density on the target quantile. In practice, we can perturb the data by a small amount of additive data-independent noise to remove atoms in the distribution as is in (Gillenwater et al., 2021).
80
+
81
+ The design of the local randomizer is crucial for LDP mechanisms as it must properly choose the inquiry to the user in order to maximize the gathering of information related to the estimation of the target quantile without violating privacy conditions. The population quantiles can be considered as a minimizer of the check loss function:
82
+
83
+ $$
84
+ l _ {\tau} (x, \theta) = \left\{ \begin{array}{l l} \tau x & \text {i f} x \geq \theta \\ (\tau - 1) x, & \text {i f} x < \theta \end{array} \right..
85
+ $$
86
+
87
+ In the non-DP case, a known solution is the use of stochastic gradient descent, as outlined in (Joseph & Bhatnagar, 2015). It is important to note that for each point, the gradient it contributes is purely determined by the binary variable representing whether the value is greater than $\theta$ or not. This motivates us to modify the stochastic gradient descent process by adding a local randomization process, resulting in the Algorithm 1 and 2 outlined below:
88
+
89
+ Algorithm 1 Locally Randomized Compare (LRC)
90
+ ```txt
91
+ Input: Inquiry $q$ response rate $r$ private data $x$ $u\sim Bernoulli(r)$ $v\sim Bernoulli(0.5)$
92
+ if $u = 1$ then return $\mathbf{1}_{x > q}$
93
+ else return $v$
94
+ end if
95
+ ```
96
+
97
+ In Algorithm 1, generating randomness of $v$ before the if-condition fork may seem wasteful, but it prevents side-channel attacks such as inferring the true value based on the timing of response (Coppens et al., 2009; Lawson, 2009). Algorithm 2 collects random responses and generates the next inquiry accordingly. Therefore, Algorithm 2 satisfies the definition of sequential interactive local DP.
98
+
99
+ The following algorithm can be used when estimations and
100
+
101
+ Algorithm 2 Main Algorithm
102
+
103
+ Input: Step sizes $d_{n}$ , target quantile $\tau \in (0,1)$ , truthful response rate $r$
104
+
105
+ Initialize: $n\gets 0,q_0\gets 0,v_0^a\gets 0,v_0^b\gets 0,Q_0\gets 0$
106
+
107
+ repeat
108
+
109
+ $$
110
+ n \leftarrow n + 1
111
+ $$
112
+
113
+ Inquire: $s \gets LRC(q_{n-1}, r, x_n)$
114
+
115
+ if $s$ is 1 then
116
+
117
+ $$
118
+ q _ {n} \leftarrow q _ {n - 1} + \frac {1 - r + 2 \tau r}{2} d _ {n}
119
+ $$
120
+
121
+ else
122
+
123
+ $$
124
+ q _ {n} \leftarrow q _ {n - 1} - \frac {1 + r - 2 \tau r}{2} d _ {n}
125
+ $$
126
+
127
+ end if
128
+
129
+ $$
130
+ Q _ {n} = ((n - 1) Q _ {n} + q _ {n}) / n
131
+ $$
132
+
133
+ $$
134
+ v _ {n} ^ {a} \leftarrow v _ {n - 1} ^ {a} + n ^ {2} Q _ {n} ^ {2}
135
+ $$
136
+
137
+ $$
138
+ v _ {n} ^ {\bar {b}} \leftarrow v _ {n - 1} ^ {\bar {b}} + n ^ {2} Q _ {n}
139
+ $$
140
+
141
+ Destroy $v_{n - 1}^{a},v_{n - 1}^{b},Q_{n - 1},q_{n - 1}$
142
+
143
+ until Forever
144
+
145
+ confidence intervals are required. These values are not calculated at every step to minimize computational expenses.
146
+
147
+ Algorithm 3 Generate Confidence Interval
148
+
149
+ Input: Internal states of Algorithm 2: $n$ , $Q_{n}$ , $v_{n}^{a}$ , $v_{n}^{b}$
150
+
151
+ $$
152
+ N _ {n} \leftarrow n ^ {- 1} \left(v _ {n} ^ {a} - 2 Q _ {n} v _ {n} ^ {b} + Q _ {n} ^ {2} n (n + 1) (2 n + 1) / 6\right)
153
+ $$
154
+
155
+ $$
156
+ W \leftarrow n ^ {- 1} \mathcal {U} _ {1 - \alpha / 2} \sqrt {N _ {n}}
157
+ $$
158
+
159
+ Return: Confidence interval $(Q_{n} - W, Q_{n} + W)$
160
+
161
+ The use of dichotomous inquiry in data privacy brings multiple advantages. One benefit is the reduced communication cost, as it only takes one bit to respond. Additionally, the binary response can make full use of the DP budget, as opposed to methods such as the Laplace mechanism, which may provide unnecessary privacy guarantees beyond $\epsilon$ -DP, as outlined in Theorem 3 in (Balle et al., 2018) and Theorem 2.1 in (Liu et al., 2022).
162
+
163
+ Furthermore, people tend to be more comfortable answering dichotomous questions compared to open-ended ones (Brown et al., 1996) as they present a choice between two options and may be perceived as less threatening than open-ended questions, which require more detailed and nuanced responses. In addition, the binary approach is easy to understand for users. With the proper choice of truthful response rate $r$ , the algorithm known as the random response can be easily simulated through coin flips or dice rolls, allowing users to understand it fully and are able to "run" it without the help of electronic devices. This is in contrast to a DP mechanism involving the usage of random distribution on
164
+
165
+ real numbers. Due to the finite nature of the computer, the imperfection of floating-point arithmetic leads to serious risks with effective exploits. For more information, please refer to (Mironov, 2012; Jin et al., 2021; Haney et al., 2022).
166
+
167
+ Before discussing the specific characteristics of our estimator, we will first demonstrate its performance through a sample trajectory. The experiment is conducted with a truthful response rate with $r = 0.5$ , which means half of the responses are purely random. The objective is to estimate the median from i.i.d. samples. The true underlying distribution is a standard normal distribution.
168
+
169
+ It can be seen that from Figure 1, the proposed estimator converges to the true value, and both infeasible and proposed confidence intervals, defined later, contain the true value at a slightly larger sample size. Also, the proposed confidence intervals are highly competitive with the infeasible one in width. Refer to Figure 5 and 6 for convergence trajectories under different initialization or target quantiles.
170
+
171
+ ![](images/6fba602d6d50632391562ec6acf6976ea59c4f88ddd9ae86faf880bf20ecbfad.jpg)
172
+ Figure 1. A sample trajectory of estimator $Q_{n}$ , infeasible confidence interval (2) and proposed confidence interval (3). The horizon dotted line is the true value $Q = 0$ .
173
+
174
+ Next, we show the LDP property of our algorithm:
175
+
176
+ Theorem 3.1. Algorithm 1 is an $(\epsilon, 0)$ -randomizer with $\epsilon = \log ((1 + r) / (1 - r))$ .
177
+
178
+ Proof. see Appendix C.1
179
+
180
+ ![](images/e2c630e00cfdb99e78bdfe62fc4f4150a59c940ecd2c5188c324104d2c0d760f.jpg)
181
+
182
+ The algorithm presented in Algorithm 2 adaptively selects the next randomizer, determined by the parameter $q$ in Algorithm 1, based on its internal state $q_{n}$ . However, it never revisits previous users. As a result, Algorithm 2 satisfies sequential interactive $(\epsilon, 0)$ -LDP, where $\epsilon = \log ((1 + r) / (1 - r))$ (equivalently, $r = (e^{\epsilon} - 1) / (e^{\epsilon} + 1) = \tanh(\epsilon / 2)$ ).
183
+
184
+ Throughout the remainder of this paper, we will use the truthful response rate $r$ to represent the privacy budget, as opposed to the more standard $\epsilon$ . This choice is made for the following reasons:
185
+
186
+ In the context of LDP, it is crucial to ensure understanding and acceptance by end-users who may not possess expertise in the field. The truthful response rate, denoted by $r$ , has a more intuitive interpretation. Additionally, $r$ appears in multiple results presented in this paper, and maintaining this form allows for a more direct presentation. If necessary, the results can be easily converted by replacing all instances of $r$ with $\tanh(\epsilon/2)$ . For a conversion table, please refer to Table 5.
187
+
188
+ # 3.2. Consistency
189
+
190
+ To discuss the asymptotic properties of estimator $Q_{n}$ , we rewrite it as a recursive equation. Let $\{U_n\}$ and $\{V_n\}$ be the i.i.d. Bernoulli sequences with
191
+
192
+ $$
193
+ \mathbb {P} (U _ {n} = 1) = r, \mathbb {P} (U _ {n} = 0) = 1 - r,
194
+ $$
195
+
196
+ $$
197
+ \mathbb {P} (V _ {n} = 1) = \mathbb {P} (V _ {n} = 0) = 1 / 2.
198
+ $$
199
+
200
+ For $q_0\in \mathbb{R}$
201
+
202
+ $$
203
+ \begin{array}{l} q _ {n + 1} = q _ {n} + \frac {1 - r + 2 r \tau}{2 d _ {n}} \left(\mathbf {1} _ {x _ {n + 1} > q _ {n}} U _ {n} + (1 - U _ {n}) V _ {n}\right) \\ - \frac {1 + r - 2 r \tau}{2 d _ {n}} \left(\mathbf {1} _ {x _ {n + 1} < q _ {n}} U _ {n} + (1 - U _ {n}) (1 - V _ {n})\right), \tag {1} \\ \end{array}
204
+ $$
205
+
206
+ where the step size $\{d_n\}_{n = 1}^{\infty}$ , satisfies
207
+
208
+ $$
209
+ \sum_ {n = 1} ^ {\infty} d _ {n} = \infty , \quad \sum_ {n = 1} ^ {\infty} d _ {n} ^ {2} < \infty .
210
+ $$
211
+
212
+ The step size $d_{n}$ is vital for the convergence of $q_{n}$ , but it has a relatively minor effect on $Q_{n}$ . The following theorem guarantees consistency:
213
+
214
+ Theorem 3.2. For increasing positive number $\gamma_{n}$ , satisfied
215
+
216
+ $$
217
+ \frac {\gamma_ {n}}{\gamma_ {n - 1}} = 1 + \mathcal {O} (d _ {n}), \quad \sum_ {n = 1} ^ {\infty} d _ {n} ^ {2} \gamma_ {n} ^ {2} < \infty ,
218
+ $$
219
+
220
+ the $n$ -step output $q_{n}$ enjoys that
221
+
222
+ $$
223
+ \gamma_ {n} \left| q _ {n} - Q \right| = \sigma_ {a. s.} (1).
224
+ $$
225
+
226
+ Proof. see Appendix C.2.
227
+
228
+ ![](images/266df12194f3046a019b437025b177a62d0b4ad7ff1fc38d56adea0af8d68c77.jpg)
229
+
230
+ In particular, if $d_{n} \asymp a / n^{\beta}$ , for some constant $a > 0$ and $\beta \in (1/2, 1)$ , then $\gamma_{n} \asymp n^{\gamma}$ for some $\gamma < \beta - 1/2$ and for the sake of simplicity, we will set the step sizes as $d_{n} \asymp a / n^{\beta}$ .
231
+
232
+ # 3.3. Asymptotic Normality
233
+
234
+ Next, the asymptotic normality will be discussed.
235
+
236
+ Theorem 3.3. If $\beta \in (0,1)$ , then
237
+
238
+ $$
239
+ \sqrt {n} \left(Q _ {n} - Q\right) \stackrel {{d}} {{\to}} N \left(0, \frac {1 - r ^ {2} (1 - 2 (1 - \tau)) ^ {2}}{4 r ^ {2} f _ {X} ^ {2} (Q)}\right),
240
+ $$
241
+
242
+ where $f_{X}^{2}(Q)$ is the value on $Q$ for density function of $X$ .
243
+
244
+ Proof. see Appendix C.2.
245
+
246
+ ![](images/e16dca0f2a7829a4defb45f67e3be308ea2bc32324ac67c06c5170b4867dab07.jpg)
247
+
248
+ Noticed that the conditions on $\beta$ in Theorem 3.2 and Theorem 3.3 are different. It is possible that $q_{n}$ fails to converge to $Q$ , but $Q_{n}$ still enjoys asymptotic normality. Following Theorem 3.3, one constructs the confidence interval of $Q$ , if $f_{X}(Q)$ can be obtained or estimated by $\widehat{f_X(Q)}$ . Denote $z_{1 - \alpha}$ as the upper $\alpha$ -quantile of standard normal distribution. The infeasible confidence interval with significance level $\alpha$ is:
249
+
250
+ $$
251
+ \begin{array}{l} \left(Q _ {n} - z _ {1 - \alpha} \sqrt {n (1 - r ^ {2} (1 - 2 (1 - \tau)) ^ {2}}) / (2 r \widehat {f _ {X} (Q)}), \right. \\ \left. Q _ {n} + z _ {1 - \alpha} \sqrt {n (1 - r ^ {2} (1 - 2 (1 - \tau)) ^ {2}) / (2 r f _ {X} (Q))}\right). \tag {2} \\ \end{array}
252
+ $$
253
+
254
+ However, obtaining a consistent estimator $\widehat{f_X(Q)}$ , such as using non-parametric methods under our differential privacy framework, is not straightforward, since we can only obtain the binary sequence $\mathbf{1}_{x_n > q_{n - 1}}$ for protecting privacy, and the original data set $x_{1},\ldots ,x_{n}$ cannot be accessed directly.
255
+
256
+ An alternative approach to estimate the nuisance parameter $f_{X}(Q)$ is through the use of bootstrap methods to simulate the asymptotic distribution. Traditional bootstrap methods that rely on re-sampling are not suitable for the stochastic gradient descent method because of failing to recover the special dependence structure defined in (1).
257
+
258
+ Recently, (Fang et al., 2018) proposed online bootstrap confidence intervals for stochastic gradient descent, which involve recursively updating randomly perturbed stochastic estimates. Although this approach performs well when there are no constraints on DP, it requires multiple interactions with the users and will therefore blow up the privacy budget.
259
+
260
+ # 3.4. Inference via Self-normalization
261
+
262
+ To overcome the difficulties above, we propose a novel inference procedure of quantiles under the LDP framework via self-normalization, which will avoid estimating the nuisance parameter $f_{X}(Q)$ . We hope to construct an estimator that is proportional to the nuisance parameters. To approach that, we will first establish further theoretical properties of the proposed estimator $Q_{n}$ . Define the process $S_{[nt]} = \sum_{i=1}^{[nt]} q_{i}, t \in [0,1]$ .
263
+
264
+ Theorem 3.4. If $\beta \in (0,1)$ , then
265
+
266
+ $$
267
+ n ^ {- 1 / 2} (S _ {[ n t ]} - n Q) \xrightarrow {d} \frac {\sqrt {(1 - r ^ {2} (1 - 2 (1 - \tau)) ^ {2})}}{2 r f _ {X} (Q)} W (t),
268
+ $$
269
+
270
+ where $W(t)$ is the Brownian motion in $(C[0,1],\mathbb{R})$
271
+
272
+ Proof: see Appendix C.2.
273
+
274
+ ![](images/1c5eeadb1c174db5b69f9e60fc7c460116a56d14605dd617332f633d599c6353.jpg)
275
+
276
+ Noticed that Theorem 3.3 is the special case in Theorem 3.4 when $t = 1$ . Then, following Theorem 3.4, we define the self-normalizer:
277
+
278
+ $$
279
+ N _ {n} = \int_ {0} ^ {1} \left(S _ {[ n t ]} - [ n t ] Q _ {n}\right) ^ {2} d t,
280
+ $$
281
+
282
+ By the continuous mapping theorem, we can derive:
283
+
284
+ $$
285
+ \frac {n ^ {- 1 / 2} \left(S _ {n} - n Q\right)}{\sqrt {n ^ {- 1} N _ {n}}} \xrightarrow {d} \mathcal {S} := \frac {W (1)}{\sqrt {\int_ {0} ^ {1} \left(W (t) - t W (1)\right) ^ {2} d t}},
286
+ $$
287
+
288
+ where the asymptotical distribution $S$ is not associated with any unknown parameters, and its quantile can be computed by Monte Carlo simulation. Therefore, we have constructed an asymptotical pivotal quantity. Denote $\mathcal{U}_{1 - \alpha}$ the $1 - \alpha$ quantile of $S$ , the $1 - \alpha$ self-normalized confidence interval of $Q$ is constructed by:
289
+
290
+ $$
291
+ \left(Q _ {n} - n ^ {- 1} \mathcal {U} _ {1 - \alpha / 2} \sqrt {N _ {n}}, Q _ {n} + n ^ {- 1} \mathcal {U} _ {1 - \alpha / 2} \sqrt {N _ {n}}\right). \tag {3}
292
+ $$
293
+
294
+ As noted by (Shao, 2015), the distribution of $S$ has a heavier tail than that of the standard normal distribution, which is analogous to the heavier tail of $t$ -distribution compared to the standard normal distribution, resulting in a wider but not conservative corresponding confidence interval. However, the average width of the confidence interval constructed through self-normalization is not excessively large when compared to the infeasible confidence interval, as demonstrated by numerical experiments in Figure 1. Furthermore, the construction of an asymptotic pivotal quantity is not unique. See Appendix B for examples of other possibilities.
295
+
296
+ Whether there are theoretical advantages between the different constructions of self-normalizer is still open to discussion, but according to (Lee et al., 2022), the proposed self-normalizer can be computed in a fully online fashion and is computationally efficient, as outlined in Algorithm 2 and 3. The algorithm only needs to store a single integer $n$ and four float numbers: $v_{n}^{a}, v_{n}^{b}, q_{n}, Q_{n}$ and conduct only a dozen of arithmetic operations.
297
+
298
+ # 3.5. Discussion of Optimality
299
+
300
+ In this subsection, we will discuss the optimality of the proposed algorithm. To generalize the setting, we consider all
301
+
302
+ binary random response-based sequential interactive mechanisms. The random response mechanism can be written as the following $K: \{0,1\} \to \{0,1\}$ :
303
+
304
+ $$
305
+ K (x) = \left\{ \begin{array}{l l} 0, & \text {w . p .} (1 - r) / 2, \\ 1, & \text {w . p .} (1 - r) / 2, \\ x, & \text {w . p .} r. \end{array} \right.
306
+ $$
307
+
308
+ Let $\{T_1,\dots ,T_n\}$ be a collection of binary query functions, which means $T_{i}(x) = \mathbf{1}_{x\in C_{i}}$ , for some subset $C\subset \mathbb{R}$ . In the sequential interactive LDP setting, the curator will generate its output based on the transcript $\{\{K\circ T_1(x_1),\dots ,K\circ$ $T_{n}(x_{n})\} ,\{C_{1},\dots ,C_{n}\} \}$ and the choice of $C_i$ may depend on the transcript up to this point: $\{\{K\circ T_1(x_1),\dots ,K\circ$ $T_{i - 1}(x_{i - 1})\} ,\{C_1,\dots ,C_{i - 1}\} \}$ . Notice that the Algorithm 1 is a special case where $C_i = \{z:z\geq q_{i - 1}\}$ , and $q_{i - 1}$ is given by
309
+
310
+ $$
311
+ \sum_ {j = 1} ^ {i - 1} T _ {j} \left(x _ {j}\right) \frac {1 - r + 2 \tau r}{2} d _ {j} - \left(1 - T _ {j} \left(x _ {j}\right)\right) \frac {1 + r - 2 \tau r}{2} d _ {j}.
312
+ $$
313
+
314
+ We aim to determine a lower bound for the estimation variance. Therefore, any lower bounds derived under specific conditions also serve as a general lower bound for the estimation variance. To demonstrate this, we will present a pair of distributions with distinct medians that are, to the best of our knowledge, the most indistinguishable given randomized binary queries.
315
+
316
+ Define:
317
+
318
+ $$
319
+ H _ {0}: x _ {i} \sim \text {L a p l a c e} (1) \text {v s .} H _ {1}: x _ {i} \sim \text {L a p l a c e} (1) + \epsilon_ {n} \tag {4}
320
+ $$
321
+
322
+ Let $\epsilon = \log \left[(e^{\frac{1}{\sqrt{n}}} (r + 1) + r - 1) / (e^{\frac{1}{\sqrt{n}}} (r - 1) + r + 1)\right]$ .
323
+
324
+ Simple computation yields that for any $(a,b)\in \{0,1\} ^2$
325
+
326
+ $$
327
+ \frac {\mathbb {P} \left(K \circ T _ {i} \left(x _ {i}\right) = a \mid H _ {b}\right)}{\mathbb {P} \left(K \circ T _ {i} \left(x _ {i}\right) = a \mid H _ {1 - b}\right)} \leq \frac {e ^ {\epsilon_ {n}} (r + 1) - r + 1}{- e ^ {\epsilon_ {n}} (r - 1) + r + 1} = e ^ {\sqrt {\frac {1}{n}}}. \tag {5}
328
+ $$
329
+
330
+ Interestingly, if we consider the truth $H \in \{H_0, H_1\}$ as a data set containing only one data point, (5) shows that $K \circ T_i$ is $1 / \sqrt{n}$ -DP. Notice that the transcript is a $n$ -fold adaptive composition (Kairouz et al., 2015) of $1 / \sqrt{n}$ -DP mechanisms. By Theorem 8 (Dong et al., 2021a), the transcript and all post-processing of it (Proposition 4; (Dong et al., 2021a)) asymptotically satisfies the Gaussian Differential Privacy condition with $\mu = 1$ (or briefly 1-GDP).
331
+
332
+ We will now examine the limit on the best possible variance imposed by the 1-GDP condition. Denote the estimator of median as $\hat{\theta}_n$ . First, we will consider asymptotically normal, unbiased, shift-invariant estimators of the median. By
333
+
334
+ restricting our discussion to unbiased, shift-invariant estimators, we ensure that no estimator has an unfair advantage by favoring specific values. Under the null hypothesis, for the standard deviation $\sigma_{n}$ of $\hat{\theta}_n$ , one has that
335
+
336
+ $$
337
+ \frac {\hat {\theta} _ {n}}{\sigma_ {n}} \stackrel {d} {\to} N (0, 1),
338
+ $$
339
+
340
+ and under the alternative hypothesis,
341
+
342
+ $$
343
+ \frac {\hat {\theta} _ {n} - \epsilon_ {n}}{\sigma_ {n}} \stackrel {d} {\to} N (0, 1).
344
+ $$
345
+
346
+ The 1-GDP condition implies that for sufficiently large $n$ , $\epsilon_n / \sigma_n \leq 1$ (see Appendix C.3). By plugging in the values $\epsilon_n = (r\sqrt{n})^{-1} + \mathcal{O}(n^{-3/2})$ and $1/2 = f(F^{-1}(1/2))$ , we deduce that:
347
+
348
+ $$
349
+ \sigma_ {n} \geq \frac {1}{2 r \sqrt {n} f (F ^ {- 1} (1 / 2))} + \mathcal {O} \left(n ^ {- 1}\right),
350
+ $$
351
+
352
+ which gives us an asymptotic lower bound of the variance: $(4r^{2}nf^{2}(F^{-1}(1 / 2)))^{-1}$ . This lower bound matches the asymptotic variance obtained in Theorem 3.3, showing the optimality of our approach. Although most estimators we are interested in have an asymptotically normal distribution, we wish to generalize the minimal variance result to other families as the theorem below.
353
+
354
+ Theorem 3.5. If $\hat{\theta}_n$ is a median estimator based on the random response of binary-based sequential interactive inquiries such that:
355
+
356
+ $$
357
+ \frac {\hat {\theta} _ {n} - F ^ {- 1} (1 / 2)}{\sigma_ {n}} \xrightarrow {d} G
358
+ $$
359
+
360
+ where $G$ has a log-concave density $f_{G}(x)\propto \mathrm{e}^{-\varphi (x)}$ on $\mathbb{R}$ such that $\varphi (x) = \varphi (-x),\mathbb{E}\left[(\varphi '(G))^2\right] < + \infty$ , and $\mathbb{E}\left[G^2\right] = 1$
361
+
362
+ Then,
363
+
364
+ $$
365
+ \sigma_ {n} \geq \frac {1}{2 r \sqrt {n} f (F ^ {- 1} (1 / 2))} + \mathcal {O} \left(n ^ {- 1}\right).
366
+ $$
367
+
368
+ The minimal variance result can be attributed to two factors. In Appendix C.3, we demonstrate that asymptotic GDP imposes a condition on the variance of estimators that follow a normal distribution. This condition serves as a lower bound for 1-GDP estimators, without relying on any specific mechanism assumption. Secondly, the relaxation from the assumption of normality to milder conditions on the function $G$ is a consequence of Theorem 1.2 in (Dong et al., 2021b). This theorem establishes that among all $\mu$ -GDP estimators satisfying the aforementioned conditions, the variance is lower bounded by $1 / \mu^2$ . This lower bound is attainable when the underlying distribution is normal.
369
+
370
+ # 4. Experiments
371
+
372
+ We evaluate the performance of our algorithms using a variety of distributions. The data come from four cases: standard Normal $N(0,1)$ , Uniform $U(-1,1)$ , standard Cauchy $C(0,1)$ , and PERT distribution (Clark, 1962) with probability density function:
373
+
374
+ $$
375
+ f (x) = 0. 6 2 5 (1 - x) (1 + x) ^ {3}, \quad x \in (- 1, 1).
376
+ $$
377
+
378
+ These cases represent situations with heavy tails, compact or non-compact support, and asymmetric distributions commonly found in practice, as shown in Figure 2.
379
+
380
+ ![](images/f66c2c1eab693a04f28e5dc2c39fe712f1e968a746fb2a22e72a46ae55d31bb0.jpg)
381
+ Figure 2. Plot of the density function, where the types of lines represent different distribution, solid: Normal, dashed: Cauchy, dotted: Uniform, dot-dash: PERT.
382
+
383
+ The target quantiles are $\tau = 0.3, 0.5, 0.8$ , and the truthful response rate $r = 0.25, 0.5, 0.9$ , which the privacy budget is $\epsilon = \log(1 + 2r / (1 - r))$ corresponding to 0.51, 1.09, 2.94 respectively. We use the step sizes $d_{n} = 2 / (n^{0.51} + 100)$ for all experiments, which satisfies the assumptions of Theorem 3.3 and 3.4. The range of sample size $n$ is (10000, 400000), the initial value $q_{0} = 0$ , and the number of replication is 10000. The results from different sample sizes are independently conducted from scratch to eliminate the correlation among experiments.
384
+
385
+ To show the consistency of the proposed estimator $Q_{n}$ , Figure 3 displays the box plots of estimator $Q_{n}$ under Normal distribution with sample size $n = 10000, \dots, 50000$ . As the sample size increases, the estimation becomes closer to the true values $Q$ , the corresponding standard errors decay across all settings, and the truthful response rate leads to significantly better performance in small finite sample sizes but has diminishing effects afterward. Meanwhile, we can also see that the proximity between the true target value and the initialization 0 is beneficial to early performances. But in an asymptotic view, the proposed algorithm is insensitive to the initial value selection.
386
+
387
+ We also demonstrate the empirical coverage rate and mean
388
+
389
+ absolute error of the developed method in Table 1. The empirical coverage rate of the proposed method becomes closer to the nominal confidence level as the sample size increases in most cases and the mean absolute error decreases to zero. The corresponding figures and tables of other distributions can be found in Appendix A, which describes a similar phenomenon.
390
+
391
+ Figure 4 investigates the performance of the proposed confidence interval in other nominal levels. One can discover that the curves of the empirical coverage rate are getting closer to $y = x$ uniformly, as sample size increases in all privacy budget settings, which reveals the performance of the proposed method is irrelevant to the pre-determined significance level. It is worth noting that when $r = 0.25$ , the effective sample size is $1/16$ of the original one, yet the performance of the proposed method remains excellent, which strongly supports the asymptotic theory.
392
+
393
+ ![](images/8599e437787510b47cc4daa175032a75363aecb9b138ba93ce22c3d8a8dd3e31.jpg)
394
+ Figure 3. Box-plot of estimator $Q_{n}$ for different target quantiles of Cauchy distribution. In each sample size divided by a vertical dotted line, the three boxes establish results with different privacy budgets by left: $r = 0.25$ , middle $r = 0.5$ , and right: $r = 0.9$ . The horizontal dashed lines represent the true value $Q$ in $\tau = 0.3$ , 0.5, 0.8 from the bottom to the top.
395
+ Figure 4. The curve of the empirical coverage rate of proposed confidence interval (3) with nominal significance level, when the data are Normal and target quantile $\tau = 0.3$ under different privacy budget (dotted $r = 0.25$ , dot-dash $r = 0.5$ and dashed $r = 0.9$ ).
396
+
397
+ # 5. Conclusion and Future Works
398
+
399
+ In this paper, we proposed a novel algorithm for estimating population quantiles under the settings of LDP. The core design idea of the algorithm is based on using dichotomous inquiry. The proposed estimator enjoys excellent theoretical properties, including consistency, asymptotic normality, and optimality in some special cases. Importantly, by applying
400
+
401
+ ![](images/680a5ea2d06bb9f94008931acd4e5c5b8ba7d033e94f2fbeac7ed2c135fc5dc1.jpg)
402
+ (a) Left: $n = 10000$ . Right: $n = 50000$
403
+
404
+ ![](images/8b010903c7b4c02c253a14eec826cb2ff9cfe749edf46adb51c29c489c7761dd.jpg)
405
+
406
+ ![](images/b57bd1f53616875e937eefc14fc15cdb552120d91fbfe4e1247f6ebccb2cc579.jpg)
407
+ (b) Left: $n = 100000$ . Right: $n = 200000$
408
+
409
+ Table 1. Empirical results of coverage rate(mean absolute error) of proposed confidence interval (3) (estimator $Q_{n}$ ) with data collected from Normal.
410
+
411
+ <table><tr><td>n</td><td>τ</td><td>r = 0.25</td><td>r = 0.5</td><td>r = 0.9</td></tr><tr><td rowspan="3">10000</td><td>0.3</td><td>0.926(0.069)</td><td>0.965(0.034)</td><td>0.982(0.018)</td></tr><tr><td>0.5</td><td>0.834(0.037)</td><td>0.897(0.019)</td><td>0.911(0.011)</td></tr><tr><td>0.8</td><td>0.962(0.121)</td><td>0.992(0.058)</td><td>0.999(0.031)</td></tr><tr><td rowspan="3">20000</td><td>0.3</td><td>0.936(0.041)</td><td>0.958(0.020)</td><td>0.971(0.011)</td></tr><tr><td>0.5</td><td>0.888(0.027)</td><td>0.915(0.014)</td><td>0.936(0.008)</td></tr><tr><td>0.8</td><td>0.965(0.063)</td><td>0.984(0.030)</td><td>0.994(0.016)</td></tr><tr><td rowspan="3">40000</td><td>0.3</td><td>0.943(0.025)</td><td>0.958(0.013)</td><td>0.967(0.007)</td></tr><tr><td>0.5</td><td>0.910(0.020)</td><td>0.931(0.010)</td><td>0.937(0.006)</td></tr><tr><td>0.8</td><td>0.966(0.035)</td><td>0.978(0.017)</td><td>0.984(0.009)</td></tr><tr><td rowspan="3">100000</td><td>0.3</td><td>0.946(0.015)</td><td>0.954(0.007)</td><td>0.958(0.004)</td></tr><tr><td>0.5</td><td>0.929(0.013)</td><td>0.944(0.006)</td><td>0.941(0.004)</td></tr><tr><td>0.8</td><td>0.954(0.019)</td><td>0.965(0.009)</td><td>0.973(0.005)</td></tr><tr><td rowspan="3">200000</td><td>0.3</td><td>0.947(0.010)</td><td>0.951(0.005)</td><td>0.956(0.003)</td></tr><tr><td>0.5</td><td>0.942(0.009)</td><td>0.949(0.004)</td><td>0.947(0.002)</td></tr><tr><td>0.8</td><td>0.956(0.013)</td><td>0.960(0.006)</td><td>0.964(0.003)</td></tr><tr><td rowspan="3">400000</td><td>0.3</td><td>0.945(0.007)</td><td>0.953(0.004)</td><td>0.948(0.002)</td></tr><tr><td>0.5</td><td>0.942(0.006)</td><td>0.949(0.003)</td><td>0.944(0.002)</td></tr><tr><td>0.8</td><td>0.952(0.009)</td><td>0.957(0.004)</td><td>0.958(0.002)</td></tr></table>
412
+
413
+ the technique of self-normalization to cancel out the nuisance parameters, we can construct confidence intervals of population quantiles for statistical inference. Finally, our algorithm is designed in an online setting, making it suitable for handling large streaming data without the need for data storage. Extensive simulation studies reveal a positive confirmation of the asymptotic theory.
414
+
415
+ Despite the contributions above, this article still leaves many exciting questions unanswered, which opens many avenues for future research. A general tight lower bound for other quantiles under our setting is still undetermined, and we have yet to consider other variants of LDP (e.g. full-interactive). Other directions include exploring data that is not independently and identically distributed, such as time series or spatial series data. Additionally, the quantile of interest may be influenced by other covariates, leading to the study of LDP quantile regression. This paper focuses on estimating quantiles for a specific sample size $n$ , with the potential for developing consistent bounds, resulting in the transition from quantile confidence intervals to confidence sequences.
416
+
417
+ # Acknowledgements
418
+
419
+ We would like to thank the anonymous reviewers and area chairs for great feedback on the paper. We thank our colleagues, Yangdi Jiang and Xiaotian Chang, for fruitful discussion. In the initial submission, we failed to input the whole author list in this camera-ready version, which should be Yi Liu, Qirui Hu, Lei Ding, Bei Jiang and Linglong Kong. We acknowledge the funding received from the Canada CIFAR AI Chairs program, the Alberta Machine Intelligence Institute, and Natural Sciences and Engineering Council of Canada, the Canada Research Chair program from NSERC and the Canadian Statistical Sciences Institute. Hu's research was supported partially by the National Natural Science Foundation of China award 12171269.
420
+
421
+ # References
422
+
423
+ Agarwal, N. and Singh, K. The price of differential privacy for online learning. In Precup, D. and Teh, Y. W. (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 32-40. PMLR, 06-11 Aug 2017.
424
+ Alabi, D., Ben-Eliezer, O., and Chaturvedi, A. Bounded space differentially private quantiles. arXiv preprint arXiv:2201.03380, 2022.
425
+ Amin, K., Joseph, M., and Mao, J. Pan-private uniformity testing. In Abernethy, J. and Agarwal, S. (eds.), Proceedings of Thirty Third Conference on Learning Theory, volume 125 of Proceedings of Machine Learning Research, pp. 183-218. PMLR, 09-12 Jul 2020.
426
+ Balle, B., Barthe, G., and Gaboardi, M. Privacy amplification by subsampling: Tight analyses via couplings and divergences. Advances in Neural Information Processing Systems, 31, 2018.
427
+ Ben-Eliezer, O., Mikulincer, D., and Zadik, I. Archimedes meets privacy: On privately estimating quantiles in high
428
+
429
+ dimensions under minimal assumptions. arXiv preprint arXiv:2208.07438, 2022.
430
+ Brown, T. C., Champ, P. A., Bishop, R. C., and McCollum, D. W. Which response format reveals the truth about donations to a public good? Land Economics, pp. 152-166, 1996.
431
+ Cai, T. T., Wang, Y., and Zhang, L. The cost of privacy: Optimal rates of convergence for parameter estimation with differential privacy. The Annals of Statistics, 49(5): 2825-2850, 2021.
432
+ Cheu, A., Smith, A., Ullman, J., Zeber, D., and Zhilyaev, M. Distributed differential privacy via shuffling. In Advances in Cryptology-EUROCRYPT 2019: 38th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Darmstadt, Germany, May 19-23, 2019, Proceedings, Part I 38, pp. 375-403. Springer, 2019.
433
+ Clark, C. E. The pert model for the distribution of an activity time. Operations Research, 10(3):405-406, 1962.
434
+ Coppens, B., Verbauwhede, I., De Bosschere, K., and De Sutter, B. Practical mitigations for timing-based side-channel attacks on modern x86 processors. In 2009 30th IEEE Symposium on Security and Privacy, pp. 45-60, 2009. doi: 10.1109/SP.2009.19.
435
+ Ding, B., Kulkarni, J., and Yekhanin, S. Collecting telemetry data privately. Advances in Neural Information Processing Systems, 30, 2017.
436
+ Dippon, J. Globally convergent stochastic optimization with optimal asymptotic distribution. Journal of applied probability, 35(2):395-406, 1998.
437
+ Dong, J., Roth, A., and Su, W. J. Gaussian differential privacy. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 2021a.
438
+ Dong, J., Su, W., and Zhang, L. A central limit theorem for differentially private query answering. In Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 14759-14770. Curran Associates, Inc., 2021b.
439
+ Dwork, C. and Lei, J. Differential privacy and robust statistics. In Proceedings of the forty-first annual ACM symposium on Theory of computing, pp. 371-380, 2009.
440
+ Dwork, C., Kenthapadi, K., McSherry, F., Mironov, I., and Naor, M. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pp. 486-503. Springer, 2006.
441
+
442
+ Erlingsson, U., Pihur, V., and Korolova, A. Rappor: Randomized aggregatable privacy-preserving ordinal response. In Proceedings of the 2014 ACM SIGSAC conference on computer and communications security, pp. 1054-1067, 2014.
443
+ Evfimievski, A., Gehrke, J., and Srikant, R. Limiting privacy breaches in privacy preserving data mining. In Proceedings of the twenty-second ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp. 211-222, 2003.
444
+ Fang, Y., Xu, J., and Yang, L. Online bootstrap confidence intervals for the stochastic gradient descent estimator. The Journal of Machine Learning Research, 19(1):3053-3073, 2018.
445
+ Gillenwater, J., Joseph, M., and Kulesza, A. Differentially private quantiles. In Meila, M. and Zhang, T. (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 3713-3722. PMLR, 18-24 Jul 2021.
446
+ Haney, S., Desfontaines, D., Hartman, L., Shrestha, R., and Hay, M. Precision-based attacks and interval refining: how to break, then fix, differential privacy on finite computers. arXiv preprint arXiv:2207.13793, 2022.
447
+ Jain, P., Kothari, P., and Thakurta, A. Differentially private online learning. In Conference on Learning Theory, pp. 24-1. JMLR Workshop and Conference Proceedings, 2012.
448
+ Jin, J., McMurtry, E., Rubinstein, B. I., and Ohrimenko, O. Are we there yet? timing and floating-point attacks on differential privacy systems. arXiv preprint arXiv:2112.05307, 2021.
449
+ Joseph, A. G. and Bhatnagar, S. A stochastic approximation algorithm for quantile estimation. In International Conference on Neural Information Processing, pp. 311-319. Springer, 2015.
450
+ Joseph, M., Mao, J., Neel, S., and Roth, A. The role of interactivity in local differential privacy. In 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS), pp. 94-105, 2019. doi: 10.1109/FOCS.2019.00015.
451
+ Kairouz, P., Oh, S., and Viswanath, P. The composition theorem for differential privacy. In International conference on machine learning, pp. 1376-1385. PMLR, 2015.
452
+ Kasiviswanathan, S. P., Lee, H. K., Nissim, K., Raskhodnikova, S., and Smith, A. What can we learn privately? SIAM Journal on Computing, 40(3):793-826, 2011.
453
+
454
+ Langley, P. Crafting papers on machine learning. In Langley, P. (ed.), Proceedings of the 17th International Conference on Machine Learning (ICML 2000), pp. 1207-1216, Stanford, CA, 2000. Morgan Kaufmann.
455
+ Lawson, N. Side-channel attacks on cryptographic software. IEEE Security & Privacy, 7(6):65-68, 2009. doi: 10.1109/MSP.2009.165.
456
+ Lee, S., Liao, Y., Seo, M. H., and Shin, Y. Fast and robust online inference with stochastic gradient descent via random scaling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 7381-7389, 2022.
457
+ Lei, J. Differentially private m-estimators. Advances in Neural Information Processing Systems, 24, 2011.
458
+ Liu, Y., Sun, K., Kong, L., and Jiang, B. Identification, amplification and measurement: A bridge to gaussian differential privacy. Advances in Neural Information Processing Systems, 2022.
459
+ Mironov, I. On significance of the least significant bits for differential privacy. In Proceedings of the 2012 ACM conference on Computer and communications security, pp. 650-661, 2012.
460
+ Shao, X. A self-normalized approach to confidence interval construction in time series. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3): 343-366, 2010.
461
+ Shao, X. Self-normalization for time series: a review of recent developments. Journal of the American Statistical Association, 110(512):1797-1817, 2015.
462
+ Smith, A. Privacy-preserving statistical estimation with optimal convergence rates. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pp. 813-822, 2011.
463
+ Warner, S. L. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63-69, 1965.
464
+ Wei, K., Li, J., Ding, M., Ma, C., Yang, H. H., Farokhi, F., Jin, S., Quek, T. Q. S., and Vincent Poor, H. Federated learning with differential privacy: Algorithms and performance analysis. IEEE Transactions on Information Forensics and Security, 15:3454-3469, 2020. doi: 10.1109/TIFS.2020.2988575.
465
+
466
+ # A. Additional figures and tables
467
+
468
+ ![](images/0fa7164bb23b47abe92564caf63c6358811cdc58c77e5652a24d81440f7f3d86.jpg)
469
+ Figure 5. An alternative sample trajectory of estimator $Q_{n}$ using a different initialization $q_{0} = 1$ .
470
+
471
+ ![](images/6f39d04edfcca443b865b791b9fa7e53b686e014ebbb6729bbf05c0bbdd98d5b.jpg)
472
+ Figure 6. An alternative sample trajectory of estimator $Q_{n}$ using a different target quantile $\tau = 0.3$ .
473
+
474
+ ![](images/3d09d2179c502a28c045639570018ce7641c8dd89b289985ea858aa0831f3f3e.jpg)
475
+ Figure 7. Box-plot of estimator $Q_{n}$ for different target quantile of Cauchy distribution. In each sample size divided by a vertical dotted line, the three boxes establish results with different privacy budgets by left: $r = 0.25$ , middle $r = 0.5$ , and right: $r = 0.9$ . The horizontal dashed lines represent the true value $Q$ in $\tau = 0.3, 0.5, 0.8$ from the bottom to the top.
476
+
477
+ ![](images/105218b1cb19c82e21a313b5feae1679d26e40be831a2b3fc97a51641263d285.jpg)
478
+ Figure 8. Box-plot of estimator $Q_{n}$ for different target quantile of Uniform distribution. In each sample size divided by a vertical dotted line, the three boxes establish results with different privacy budgets by left: $r = 0.25$ , middle $r = 0.5$ , and right: $r = 0.9$ . The horizontal dashed lines represent the true value $Q$ in $\tau = 0.3, 0.5, 0.8$ from the bottom to the top.
479
+
480
+ ![](images/ca8628406d125ab5b1c8bc99f6ae2c78060b43d2f6e69c1ef63d57f18898ebb4.jpg)
481
+ Figure 9. Box-plot of estimator $Q_{n}$ for different target quantile of PERT distribution. In each sample size divided by a vertical dotted line, the three boxes establish results with different privacy budgets by left: $r = 0.25$ , middle $r = 0.5$ , and right: $r = 0.9$ . The horizontal dashed lines represent the true value $Q$ in $\tau = 0.3, 0.5, 0.8$ from the bottom to the top.
482
+
483
+ Table 2. Empirical results of coverage rate(mean absolute error) of proposed confidence interval (3) (estimator ${Q}_{n}$ ) with data collected from Cauchy.
484
+
485
+ <table><tr><td>n</td><td>τ</td><td>r=0.25</td><td>r=0.5</td><td>r=0.9</td></tr><tr><td rowspan="3">10000</td><td>0.3</td><td>0.894(0.140)</td><td>0.972(0.068)</td><td>0.987(0.037)</td></tr><tr><td>0.5</td><td>0.807(0.045)</td><td>0.876(0.024)</td><td>0.906(0.014)</td></tr><tr><td>0.8</td><td>0.853(0.399)</td><td>0.989(0.207)</td><td>1.000(0.112)</td></tr><tr><td rowspan="3">20000</td><td>0.3</td><td>0.928(0.076)</td><td>0.966(0.037)</td><td>0.982(0.020)</td></tr><tr><td>0.5</td><td>0.872(0.034)</td><td>0.908(0.018)</td><td>0.927(0.010)</td></tr><tr><td>0.8</td><td>0.950(0.219)</td><td>0.991(0.105)</td><td>0.998(0.055)</td></tr><tr><td rowspan="3">40000</td><td>0.3</td><td>0.944(0.044)</td><td>0.964(0.022)</td><td>0.974(0.012)</td></tr><tr><td>0.5</td><td>0.900(0.025)</td><td>0.926(0.012)</td><td>0.939(0.007)</td></tr><tr><td>0.8</td><td>0.965(0.114)</td><td>0.984(0.053)</td><td>0.993(0.028)</td></tr><tr><td rowspan="3">100000</td><td>0.3</td><td>0.944(0.025)</td><td>0.956(0.012)</td><td>0.963(0.007)</td></tr><tr><td>0.5</td><td>0.927(0.016)</td><td>0.935(0.008)</td><td>0.945(0.004)</td></tr><tr><td>0.8</td><td>0.956(0.054)</td><td>0.970(0.026)</td><td>0.980(0.013)</td></tr><tr><td rowspan="3">200000</td><td>0.3</td><td>0.948(0.017)</td><td>0.954(0.008)</td><td>0.958(0.004)</td></tr><tr><td>0.5</td><td>0.936(0.011)</td><td>0.944(0.006)</td><td>0.945(0.003)</td></tr><tr><td>0.8</td><td>0.952(0.034)</td><td>0.966(0.017)</td><td>0.971(0.008)</td></tr><tr><td rowspan="3">400000</td><td>0.3</td><td>0.942(0.012)</td><td>0.954(0.006)</td><td>0.952(0.003)</td></tr><tr><td>0.5</td><td>0.944(0.008)</td><td>0.949(0.004)</td><td>0.946(0.002)</td></tr><tr><td>0.8</td><td>0.948(0.023)</td><td>0.960(0.011)</td><td>0.961(0.005)</td></tr></table>
486
+
487
+ Table 3. Empirical results of coverage rate(mean absolute error) of proposed confidence interval (3) (estimator ${Q}_{n}$ ) with data collected from PERT.
488
+
489
+ <table><tr><td>n</td><td>τ</td><td>r=0.25</td><td>r=0.5</td><td>r=0.9</td></tr><tr><td rowspan="3">10000</td><td>0.3</td><td>0.900(0.021)</td><td>0.927(0.011)</td><td>0.938(0.006)</td></tr><tr><td>0.5</td><td>0.951(0.022)</td><td>0.970(0.011)</td><td>0.971(0.006)</td></tr><tr><td>0.8</td><td>0.990(0.029)</td><td>0.997(0.014)</td><td>0.998(0.008)</td></tr><tr><td rowspan="3">20000</td><td>0.3</td><td>0.920(0.015)</td><td>0.932(0.007)</td><td>0.941(0.004)</td></tr><tr><td>0.5</td><td>0.950(0.014)</td><td>0.957(0.007)</td><td>0.962(0.004)</td></tr><tr><td>0.8</td><td>0.983(0.016)</td><td>0.990(0.008)</td><td>0.992(0.004)</td></tr><tr><td rowspan="3">40000</td><td>0.3</td><td>0.927(0.011)</td><td>0.937(0.005)</td><td>0.936(0.003)</td></tr><tr><td>0.5</td><td>0.947(0.009)</td><td>0.951(0.004)</td><td>0.955(0.002)</td></tr><tr><td>0.8</td><td>0.974(0.009)</td><td>0.978(0.005)</td><td>0.982(0.002)</td></tr><tr><td rowspan="3">100000</td><td>0.3</td><td>0.934(0.007)</td><td>0.936(0.003)</td><td>0.942(0.002)</td></tr><tr><td>0.5</td><td>0.948(0.005)</td><td>0.948(0.003)</td><td>0.956(0.001)</td></tr><tr><td>0.8</td><td>0.967(0.005)</td><td>0.969(0.003)</td><td>0.972(0.001)</td></tr><tr><td rowspan="3">200000</td><td>0.3</td><td>0.936(0.005)</td><td>0.935(0.002)</td><td>0.939(0.001)</td></tr><tr><td>0.5</td><td>0.943(0.004)</td><td>0.952(0.002)</td><td>0.949(0.001)</td></tr><tr><td>0.8</td><td>0.960(0.004)</td><td>0.963(0.002)</td><td>0.964(0.001)</td></tr><tr><td rowspan="3">400000</td><td>0.3</td><td>0.936(0.003)</td><td>0.935(0.002)</td><td>0.936(0.001)</td></tr><tr><td>0.5</td><td>0.946(0.003)</td><td>0.946(0.001)</td><td>0.946(0.001)</td></tr><tr><td>0.8</td><td>0.955(0.003)</td><td>0.956(0.001)</td><td>0.956(0.001)</td></tr></table>
490
+
491
+ Table 4. Empirical results of coverage rate(mean absolute error) of proposed confidence interval (3) (estimator ${Q}_{n}$ ) with data collected from Uniform.
492
+
493
+ <table><tr><td>n</td><td>τ</td><td>r=0.25</td><td>r=0.5</td><td>r=0.9</td></tr><tr><td rowspan="3">10000</td><td>0.3</td><td>0.922(0.043)</td><td>0.956(0.021)</td><td>0.972(0.011)</td></tr><tr><td>0.5</td><td>0.853(0.030)</td><td>0.898(0.016)</td><td>0.928(0.009)</td></tr><tr><td>0.8</td><td>0.965(0.057)</td><td>0.984(0.028)</td><td>0.994(0.015)</td></tr><tr><td rowspan="3">20000</td><td>0.3</td><td>0.930(0.027)</td><td>0.950(0.013)</td><td>0.963(0.007)</td></tr><tr><td>0.5</td><td>0.896(0.022)</td><td>0.928(0.011)</td><td>0.934(0.006)</td></tr><tr><td>0.8</td><td>0.960(0.032)</td><td>0.977(0.016)</td><td>0.984(0.008)</td></tr><tr><td rowspan="3">40000</td><td>0.3</td><td>0.939(0.017)</td><td>0.953(0.009)</td><td>0.959(0.004)</td></tr><tr><td>0.5</td><td>0.921(0.016)</td><td>0.934(0.008)</td><td>0.943(0.004)</td></tr><tr><td>0.8</td><td>0.959(0.019)</td><td>0.969(0.009)</td><td>0.974(0.005)</td></tr><tr><td rowspan="3">100000</td><td>0.3</td><td>0.942(0.010)</td><td>0.953(0.005)</td><td>0.955(0.003)</td></tr><tr><td>0.5</td><td>0.939(0.010)</td><td>0.942(0.005)</td><td>0.943(0.003)</td></tr><tr><td>0.8</td><td>0.954(0.011)</td><td>0.959(0.005)</td><td>0.960(0.003)</td></tr><tr><td rowspan="3">200000</td><td>0.3</td><td>0.944(0.007)</td><td>0.950(0.003)</td><td>0.950(0.002)</td></tr><tr><td>0.5</td><td>0.938(0.007)</td><td>0.947(0.004)</td><td>0.946(0.002)</td></tr><tr><td>0.8</td><td>0.950(0.007)</td><td>0.956(0.004)</td><td>0.957(0.002)</td></tr><tr><td rowspan="3">400000</td><td>0.3</td><td>0.945(0.005)</td><td>0.947(0.002)</td><td>0.950(0.001)</td></tr><tr><td>0.5</td><td>0.944(0.005)</td><td>0.951(0.002)</td><td>0.950(0.001)</td></tr><tr><td>0.8</td><td>0.946(0.005)</td><td>0.955(0.002)</td><td>0.948(0.001)</td></tr></table>
494
+
495
+ Table 5. Conversion table between $r$ and $e$
496
+
497
+ <table><tr><td>r</td><td>ε</td><td>r</td><td>ε</td></tr><tr><td>0</td><td>0</td><td>0.5</td><td>1.10</td></tr><tr><td>0.05</td><td>0.10</td><td>0.55</td><td>1.24</td></tr><tr><td>0.1</td><td>0.20</td><td>0.6</td><td>1.39</td></tr><tr><td>0.15</td><td>0.30</td><td>0.65</td><td>1.55</td></tr><tr><td>0.2</td><td>0.40</td><td>0.7</td><td>1.73</td></tr><tr><td>0.25</td><td>0.51</td><td>0.75</td><td>1.95</td></tr><tr><td>0.3</td><td>0.62</td><td>0.8</td><td>2.20</td></tr><tr><td>0.35</td><td>0.73</td><td>0.85</td><td>2.51</td></tr><tr><td>0.4</td><td>0.85</td><td>0.9</td><td>2.94</td></tr><tr><td>0.45</td><td>0.97</td><td>0.95</td><td>3.66</td></tr></table>
498
+
499
+ # B. Alternative self-normalizes
500
+
501
+ The following self-normalizer can also be used to construct the asymptotically pivotal quantity,
502
+
503
+ $$
504
+ N _ {n} ^ {\prime} = \sup _ {t \in [ 0, 1 ]} \left| S _ {[ n t ]} - [ n t ] Q _ {n} \right|,
505
+ $$
506
+
507
+ $$
508
+ N _ {n} ^ {\prime \prime} = \int_ {0} ^ {1} \left| S _ {[ n t ]} - [ n t ] Q _ {n} \right| d t,
509
+ $$
510
+
511
+ and based on the continuous mapping theorem again, one has that,
512
+
513
+ $$
514
+ \frac {n ^ {- 1 / 2} \left(S _ {n} - n Q\right)}{n ^ {- 1 / 2} N _ {n} ^ {\prime}} \xrightarrow {d} \frac {W (1)}{\sup _ {t \in [ 0 , 1 ]} | W (t) - t W (1) |},
515
+ $$
516
+
517
+ $$
518
+ \frac {n ^ {- 1 / 2} (S _ {n} - n Q)}{n ^ {- 1 / 2} N _ {n} ^ {\prime \prime}} \xrightarrow {d} \frac {W (1)}{\int_ {0} ^ {1} | W (t) - t W (1) | d t}.
519
+ $$
520
+
521
+ # C. Proof
522
+
523
+ # C.1. Proof of Theorem 3.1
524
+
525
+ Exhaustive computation yields that for any $(a,b)\in \{0,1\} ^2$
526
+
527
+ $$
528
+ \frac {\mathbb {P} (L R C (q , r , x) = a \mid \mathbf {1} _ {x > q} = b)}{\mathbb {P} (L R C (q , r , x) = a \mid \mathbf {1} _ {x > q} = 1 - b)} \in \left\{\frac {1 + r}{1 - r}, \frac {1 - r}{1 + r} \right\} \tag {6}
529
+ $$
530
+
531
+ # C.2. Proof of Theorem 3.2, 3.3 and 3.4
532
+
533
+ One can verify that the recursive equation (1) is asymptotically equivalent to
534
+
535
+ $$
536
+ q _ {n + 1} = q _ {n} + \frac {1}{d _ {n}} \left(1 - \frac {2}{1 - r + 2 r (1 - \tau)} 1 _ {x _ {n} ^ {*} > q _ {n}}\right),
537
+ $$
538
+
539
+ where $\mathbb{P}(x_n^* = x_n) = r, \mathbb{P}(x_n^* = -\infty) = \mathbb{P}(x_n^* = \infty) = (1 - r) / 2$ . Let
540
+
541
+ $$
542
+ H (z, X) = 1 - \frac {2}{1 - r + 2 r (1 - \tau)} 1 _ {X > z}
543
+ $$
544
+
545
+ $$
546
+ h (z, X) = \mathbb {E} H (z, X) = 1 - \frac {2 (1 - F (z))}{1 - r + 2 r (1 - \tau)}.
547
+ $$
548
+
549
+ Hence $F(Q) = \tau$ is equivalent to $h(Q, X^*) = 0$ . Then, one will find that the estimation of $Q$ with sample $x_1, \ldots, x_n$ under LDP is equivalent to the estimation of $Q^*$ with sample $x_1, \ldots, x_n$ without LDP constraints. The standard framework of the SGD method, such as Theorem 2 and 3 in (Dippon, 1998), can be applied. Moreover, the statements in Theorems 3.2, 3.3, and 3.4 hold true.
550
+
551
+ # C.3.
552
+
553
+ We prove this by contradiction. Assuming that for any $n_0 > 1$ there is a $n > n_0$ such that:
554
+
555
+ $$
556
+ \epsilon_ {n} / \sigma_ {n} > k > 1.
557
+ $$
558
+
559
+ Let
560
+
561
+ $$
562
+ w = \Phi \left(- \frac {1}{2}\right) - \Phi \left(\frac {1}{2} - k\right) > 0.
563
+ $$
564
+
565
+ We choose a sufficiently large $n_0$ such that for any $n > n_0$
566
+
567
+ $$
568
+ \mathbb {P} \left(\hat {\theta} _ {n} / \sigma_ {n} < 1 / 2 \mid H _ {0}\right) \geq \Phi (1 / 2) - w / 3
569
+ $$
570
+
571
+ and
572
+
573
+ $$
574
+ \mathbb {P} \left(\hat {\theta} _ {n} / \sigma_ {n} < 1 / 2 | H _ {1}\right) \leq \Phi \left(1 / 2 - \epsilon_ {n} / \sigma_ {n}\right) + w / 3 \leq \Phi (1 / 2 - k) + w / 3.
575
+ $$
576
+
577
+ Then,
578
+
579
+ $$
580
+ \begin{array}{l} \mathbb {P} \left(\hat {\theta} _ {n} / \sigma_ {n} < 1 / 2 \mid H _ {0}\right) - \mathbb {P} \left(\hat {\theta} _ {n} / \sigma_ {n} < 1 / 2 \mid H _ {1}\right) \geq \Phi (1 / 2) - \Phi (1 / 2 - k) - 2 w / 3 \\ = 2 \Phi \left(\frac {1}{2}\right) - 1 + \Phi \left(- \frac {1}{2}\right) - \Phi \left(\frac {1}{2} - k\right) - 2 w / 3 \\ = 2 \Phi \left(\frac {1}{2}\right) - 1 + w / 3 \\ > 2 \Phi \left(\frac {1}{2}\right) - 1 + w / 6 \\ \end{array}
581
+ $$
582
+
583
+ Then $\hat{\theta}_n$ is not $(0,2\Phi\left(\frac{1}{2}\right) - 1 + w / 6)$ -DP and therefore is not asymptotically 1-GDP leading to a contradiction.
2023/Online Local Differential Private Quantile Inference via Self-normalization/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a067ca42707485b51760fa0c2704d1411c84cb9e3379b83c2a509d3e668672e
3
+ size 928577
2023/Online Local Differential Private Quantile Inference via Self-normalization/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Mechanism Design for Information Acquisition/267cc2c3-c331-407c-8004-440b8c1636ba_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8111fe50fe6adb80a89aa1fbd474597723b10985e6f3ed9a545bf59915d7d79
3
+ size 478491
2023/Online Mechanism Design for Information Acquisition/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Mechanism Design for Information Acquisition/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fe7f63c60b98d134267a36853c863b83a4c3e37699a721dee1fd1c7bc988360
3
+ size 1452814
2023/Online Mechanism Design for Information Acquisition/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Nonstochastic Control with Adversarial and Static Constraints/5dfc496d-9a3a-4038-8960-e6a0f2229b76_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:916eda4ee1b7cf53650be44ab9d1f2f13a77ced5f23e8f90014df2053704b707
3
+ size 1619518
2023/Online Nonstochastic Control with Adversarial and Static Constraints/full.md ADDED
@@ -0,0 +1,523 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Online Nonstochastic Control with Adversarial and Static Constraints
2
+
3
+ Xin Liu<sup>1</sup> Zixian Yang<sup>2</sup> Lei Ying<sup>2</sup>
4
+
5
+ # Abstract
6
+
7
+ This paper studies online nonstochastic control problems with adversarial and static constraints. We propose online nonstochastic control algorithms that achieve both sublinear regret and sublinear adversarial constraint violation while keeping static constraint violation minimal against the optimal constrained linear control policy in hindsight. To establish the results, we introduce an online convex optimization with memory framework under adversarial and static constraints, which serves as a subroutine for the constrained online nonstochastic control algorithms. This subroutine also achieves the state-of-the-art regret and constraint violation bounds for constrained online convex optimization problems, which is of independent interest. Our experiments demonstrate the proposed control algorithms are adaptive to adversarial constraints and achieve smaller cumulative costs and violations. Moreover, our algorithms are less conservative and achieve significantly smaller cumulative costs than the state-of-the-art algorithm.
8
+
9
+ # 1. Introduction
10
+
11
+ Online nonstochastic control paradigm has been widely applied in practice (Hazan & Singh, 2022; Suo et al., 2021; O'Connell et al., 2022). It is a topic of great interest in both the learning and control communities because online nonstochastic control algorithms are robust to time-varying and even adversarial environments (Agarwal et al., 2019a;b; Cohen et al., 2018; Dean et al., 2019). In an online nonstochastic control problem, the learner aims to learn a controller that minimizes the cumulative costs in a time-varying or even adversarial environment (e.g., the adversarial cost functions
12
+
13
+ <sup>1</sup>The School of Information Science and Technology, ShanghaiTech University, Shanghai, China. <sup>2</sup>The Electrical Engineering and Computer Science Department, The University of Michigan, Ann Arbor, Ann Arbor, USA. Correspondence to: Xin Liu <liuxin7@shanghaiiteh.edu.cn>.
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 disturbances). Practical control systems often operate under various constraints (e.g., safety, demand-supply, or energy constraints), which could be unpredictable and adversarial as well. For example, robots need to navigate along a collision-free path by maintaining a minimum distance from each other with complicated surroundings (e.g., pedestrians or other robots) (Brunke et al., 2022); cloud computing platforms should guarantee low-latency service for users with time-varying traffic workload (Tirmazi et al., 2020). Motivated by these applications, we focus on online nonstochastic control problems with adversarial constraints and propose online nonstochastic control algorithms to achieve the minimum cost and the best constraint satisfaction.
18
+
19
+ It is a challenging task to synthesize a safe (online) controller because of the conflicting objectives, i.e. minimizing the cumulative costs while satisfying all constraints. The traditional way to guarantee constraint satisfaction is to incorporate the constraints into Model Predictive Control (constrained MPC) (Mayne et al., 2005; Rawlings et al., 2017). However, constrained MPC often introduces overlyconservative, even infeasible, actions in the presence of system disturbances. To address the issue, a sequence of works have relaxed or softened the constraints in MPC (Zeilinger et al., 2010; Wabersich et al., 2022; Rakovic et al., 2023). For online nonstochastic control problems where cost functions or disturbance could be arbitrary and time-varying, it is impossible to predict the model so the constrained MPC method is not applicable. Only a few works (Nonhoff & Müller, 2021; Li et al., 2021) have considered online nonstochastic control with constraints, and they only studied "static" affine constraints on the state $x_{t}$ and input $u_{t}$ , i.e., $D_{x}x_{t}\leq 0$ and $D_{u}u_{t}\leq 0$ . The work by (Nonhoff & Müller, 2021) studied an online nonstochastic control problem with state and input constraints, but the system dynamics are noise/disturbance-free. The work most related to ours is (Li et al., 2021), which considers adversarial cost functions and adversarial disturbance but static affine constraints. The paper proposed a gradient descent-based control algorithm (called online gradient descent with buffer zones (OGD-BZ)) to achieve $\tilde{O} (\sqrt{T})$ regret while the static affine constraints are satisfied. However, the work assumed the affine constraints and the knowledge of slackness of the constraints so that robust optimization methods can be used to construct safe/feasible regions for the affine constraints. The method also has the issue of being over-conservative as
20
+
21
+ constrained MPC. Moreover, the method in (Li et al., 2021) cannot be applied to the adversarial constraints because they are unknown to the controller before an action is taken.
22
+
23
+ In this paper, we study an online nonstochastic control problem with adversarial constraints, where the cost and constraint functions are revealed after the control/action has been taken (our setting can also include static constraints). Specifically, we consider a discrete-time, linear system as follows
24
+
25
+ $$
26
+ x _ {t + 1} = A x _ {t} + B u _ {t} + w _ {t},
27
+ $$
28
+
29
+ where $x_{t}$ is the state, $u_{t}$ is the control/action and $w_{t}$ is the adversarial noise/disturbance at time $t$ . The learner takes an action $u_{t}$ and observe the cost function $c_{t}(x_{t},u_{t})$ and constraint functions $d_{t}(x_{t},u_{t})$ and $l(x_{t},u_{t})$ . The goal of the learner is to minimize the cumulative costs $\sum_{t = 1}^{T}c_{t}(x_{t},u_{t})$ while satisfying the constraints, where the constraint violation will be measured by three different metrics: the soft cumulative constraint violation $\sum_{t = 1}^{T}d_{t}(x_{t},u_{t})$ , the hard cumulative violation $\sum_{t = 1}^{T}d_{t}^{+}(x_{t},u_{t})$ , and static anytime violation $l(x_{t},u_{t}),\forall t$ , where $d_t^+ (\cdot) = \max (d_t(\cdot),0)$ . We propose a class of constrained online nonstochastic control algorithms (COCA) that guarantee sublinear regret and sublinear constraint violation against the optimal linear controllers for the constrained problems in hindsight, where the controller knows everything apriori. Our contributions are summarized below (in Table 1):
30
+
31
+ - We propose COCA-Soft when adversarial constraints are measured using soft cumulative violation. The algorithm is based on the Lyapunov optimization method. COCA-Soft achieves $\tilde{O}(\sqrt{T})$ regret, $O(1)$ cumulative soft violation for adversarial constraints, and $o(1)$ any-time violation for static constraints.
32
+ - When considering hard cumulative violation as the metric, we propose COCA-Hard based on proximal optimization methods. COCA-Hard achieves $\tilde{O}(T^{2/3})$ regret, $\tilde{O}(T^{2/3})$ hard cumulative violation for adversarial constraints, and $\tilde{O}(T^{-1/3})$ anytime violation for static constraints.
33
+ - When the cost functions are strongly-convex, we propose COCA-Best2Worlds that integrates proximal and Lyapunov optimization methods and provides performance guarantees in terms of both soft and hard violation metrics. COCA-Best2Worlds achieves $\tilde{O}(\sqrt{T})$ regret, $O(1)$ and $\tilde{O}(\sqrt{T})$ cumulative soft and hard violation for adversarial constraints, respectively, and $o(1)$ anytime violation for static constraints.
34
+
35
+ To the best of our knowledge, all these results are new in the setting of online non-stochastic control with adversarial and general static constraints (not necessarily static affine
36
+
37
+ constraints). In this paper, we focus on presenting COCA-Soft and COCA-Hard and defer COCA-Best2Worlds in (Liu et al., 2023).
38
+
39
+ # 1.1. Related work
40
+
41
+ Online Nonstochastic Control of Dynamic System: Online nonstochastic control leverages online learning or data-driven methods to design efficient and robust control algorithms in an adversarial environment, where both cost functions and disturbances could be adversarial (Agarwal et al., 2019a). The main idea behind online nonstochastic control is to design a disturbance-action controller by carefully synthesizing the historical disturbance through the subroutine of online convex optimization (OCO) (Hazan, 2016). The initial work (Agarwal et al., 2019a) shows the disturbance-action controller can achieve $\tilde{O} (\sqrt{T})$ regret w.r.t. the optimal linear controller in hindsight that knows all costs and disturbances beforehand. The results have been refined in (Agarwal et al., 2019b; Foster & Simchowitz, 2020) when the cost functions are strongly-convex and have been generalized to various settings block-box time-invariant system (Plevrakis & Hazan, 2020; Simchowitz et al., 2020; Cassel et al., 2022), the time-varying system in (Minasyan et al., 2021), the non-linear system (Foster et al., 2020; Ghai et al., 2022), and only with bandit feedback (Gradu et al., 2020). Further, a neural network has been used to parameterize the control policy in (Chen et al., 2022b) and the regret performance is analyzed by combining OCO algorithm (Hazan, 2016) and neural-tangle kernel (NTK) theory (Jacot et al., 2018). However, these works do not consider any adversarial or static constraints.
42
+
43
+ Online Learning with Constraints: Online learning with constraints has been widely studied in the literature (Mahdavi et al., 2012; Sun et al., 2017; Neely & Yu, 2017; Cao et al., 2021; Yi et al., 2021a;b; Guo et al., 2022). Existing results can be classified according to the types of constraints, e.g., static, stochastic, and adversarial constraints. We next only review the papers on adversarial constraints because they are the most related ones. The work (Sun et al., 2017) studied OCO with adversarial constraints and established $O(\sqrt{T})$ regret and $O(T^{3/4})$ soft cumulative constraint violation. The work (Yi et al., 2021b; Guo et al., 2022) considered the benchmark of hard cumulative violation and established $O(\sqrt{T})$ regret and $O(T^{3/4})$ hard violation. The performance has been further improved to be $O(\log T)$ regret and $O(\sqrt{T \log T})$ hard violation when the objective is strongly-convex (Guo et al., 2022).
44
+
45
+ Safe Reinforcement Learning: Safe reinforcement learning (RL) refers to reinforcement learning with safety constraints and has received great interest as well (Aswani et al., 2013; Fisac et al., 2019; García et al., 2015; Koller et al., 2018; Wabersich & Zeilinger, 2018; Cheng et al., 2019; Tir
46
+
47
+ <table><tr><td>Algorithms</td><td>Cost Function</td><td>Regret</td><td>Soft/Hard Adversarial Vio.</td><td>Static Vio.</td></tr><tr><td>OGD-BZ in (Li et al., 2021)</td><td>Convex</td><td>O(√T)</td><td>None/None</td><td>None*</td></tr><tr><td>COCA-Soft</td><td>Convex</td><td>O(√T)</td><td>O(1)/None</td><td>o(1)</td></tr><tr><td>COCA-Hard</td><td>Convex</td><td>O(T2/3)</td><td>O(T2/3)/O(T2/3)</td><td>O(T-1/3)</td></tr><tr><td>COCA-Best2Worlds</td><td>Strongly Convex</td><td>O(√T)</td><td>O(1)/O(√T)</td><td>o(1)</td></tr></table>
48
+
49
+ Table 1. Our contribution and related work. $*(\mathrm{Li}$ et al., 2021) establishes zero violation for static anytime affine constraints, which is a special case of static constraints studied in this paper. Moreover, if we use projection-based method for static affine constraints, our algorithm can also achieve zero violation.
50
+
51
+ mazi et al., 2020; Efroni et al., 2020; Ding et al., 2020; 2021; Liu et al., 2021; Amani et al., 2021; Vaswani et al., 2022; Chen et al., 2022a; Ghosh et al., 2022; Wei et al., 2022). In safe RL, The agent optimizes the policy by interacting with the environment without violating safety constraints. However, the line of safe RL requires either the knowledge of the initial safe policy or a stationary environment where the reward and cost distributions are time-invariant.
52
+
53
+ # 2. Online Nonstochastic Control with Constraints
54
+
55
+ In this section, we introduce the online nonstochastic control problem with constraints and the performance metrics for evaluating the cost and constraint satisfaction. We consider the following linear system:
56
+
57
+ $$
58
+ x _ {t + 1} = A x _ {t} + B u _ {t} + w _ {t},
59
+ $$
60
+
61
+ where $x_{t} \in \mathbb{R}^{n}$ is the state, $u_{t} \in \mathbb{R}^{m}$ is the control/action and $w_{t} \in \mathbb{R}^{n}$ is the noise or disturbance at time $t$ . Note $w_{t}$ could be even adversarial. The system parameters $A \in \mathbb{R}^{n \times n}$ and $B \in \mathbb{R}^{n \times m}$ are assumed to be known. A constrained online nonstochastic control system works as follows: given the state $x_{t}, \forall t \in [T]$ , the learner takes action $u_{t}$ and observes the cost function $c_{t}(x_{t}, u_{t})$ and constraint functions $d_{t}(x_{t}, u_{t})$ and $l(x_{t}, u_{t})$ . The system evolves to the next state $x_{t+1}$ according to the system equation. Note the noises, costs, and constraints are chosen by an oblivious adversary. Our objective is to design an optimal control policy to minimize $\sum_{t=1}^{T} c_{t}(x_{t}, u_{t})$ while satisfying the constraints. Next, we introduce our baseline policy and define the performance metrics of regret and constraint satisfaction.
62
+
63
+ Offline Control Problem: Assuming the full knowledge of disturbance, cost functions, and constraint functions beforehand, the offline control problem is defined to be:
64
+
65
+ $$
66
+ \begin{array}{l} \min _ {\{u _ {t} \}} \sum_ {t = 1} ^ {T} c _ {t} (x _ {t}, u _ {t}) \\ \begin{array}{l} \text {s . t .} x _ {t + 1} = A x _ {t} + B u _ {t} + w _ {t}, \forall t \in [ T ], \end{array} \\ d _ {t} \left(x _ {t}, u _ {t}\right) \leq 0, \\ l \left(x _ {t}, u _ {t}\right) \leq 0, \forall t \in [ T ]. \\ \end{array}
67
+ $$
68
+
69
+ We define $K^{*} \in \mathbb{R}^{m \times n}$ to be the optimal linear control $u_{t}^{K^{*}} = -K^{*}x_{t}^{K^{*}}$ which satisfies the constraints, i.e., $K^{*} \in \Omega$ such that
70
+
71
+ $$
72
+ \Omega = \left\{\pi \mid d _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) \leq 0, l \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) \leq 0, \forall t \in [ T ] \right\}.
73
+ $$
74
+
75
+ Regret: Given the optimal linear policy $K^{*}$ as the baseline, the goal of the learner is to design an online nonstochastic control policy $\pi$ that minimizes the following regret
76
+
77
+ $$
78
+ \mathcal {R} (T) = \sum_ {t = 1} ^ {T} c _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - \sum_ {t = 1} ^ {T} c _ {t} \left(x _ {t} ^ {K ^ {*}}, u _ {t} ^ {K ^ {*}}\right).
79
+ $$
80
+
81
+ Constraint Violation: The control algorithm needs to obey the constraints. However, since the constraints are unknown and adversarial, some violation has to occur during learning and control. To evaluate the level of constraint satisfaction, we consider two different metrics for adversarial constraints: soft violation and hard violation:
82
+
83
+ $$
84
+ \begin{array}{l} \mathcal {V} _ {d} ^ {\text {s o f t}} (T) = \sum_ {t = 1} ^ {T} d _ {t} (x _ {t} ^ {\pi}, u _ {t} ^ {\pi}), \\ \mathcal {V} _ {d} ^ {h a r d} (T) = \sum_ {t = 1} ^ {T} d _ {t} ^ {+} (x _ {t} ^ {\pi}, u _ {t} ^ {\pi}), \\ \end{array}
85
+ $$
86
+
87
+ and the anytime violation for the static constraint $l$ is
88
+
89
+ $$
90
+ \mathcal {V} _ {l} (t) = l \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right).
91
+ $$
92
+
93
+ Note soft and hard violation metrics for adversarial constraints are for different applications. For example, in cloud computing, the latency constraint is soft and the soft violation is a natural metric; however in drone control, the power constraint is hard and the hard violation is a better metric. We consider anytime violation for static constraint function $l$ because it is related to state and input constraints that needs to be satisfied anytime, resembling stability requirements. To present our algorithm, we first present several key concepts of online nonstochastic control from (Agarwal et al., 2019a).
94
+
95
+ # 2.1. Preliminary on Constrained Online Nonstochastic Control
96
+
97
+ Definition 2.1 (Strong Stability). A linear controller $K \in \mathbb{R}^{m \times n}$ is $(\kappa, \rho)$ -strongly stable if there exists matrices
98
+
99
+ $A,B,U,L$ such that
100
+
101
+ $$
102
+ \tilde {A} := A - B K = U L U ^ {- 1}
103
+ $$
104
+
105
+ with $\max (\| U\| _2,\| H^{-1}\| _2,\| K\| _2)\leq \kappa$ and $\| L\| _2\leq 1 - \rho ,\rho \in (0,1]$
106
+
107
+ Given the knowledge of system dynamics $A$ and $B$ , the $(\kappa, \rho)$ -strongly stable controller $K$ can be computed with semi-definite programming (SDP) (Cohen et al., 2018). Note the stable controller $K$ might not satisfy the constraints in $\Omega$ , i.e., $K \notin \Omega$ .
108
+
109
+ Definition 2.2 (Disturbance-Action Policy Class (DAC)). A disturbance-action policy $\pi(K, \{\mathbf{M}_t\})$ with memory size $H$ is defined as follows
110
+
111
+ $$
112
+ u _ {t} = - K x _ {t} + \sum_ {i = 1} ^ {H} {\bf M} _ {t} ^ {[ i ]} w _ {t - i},
113
+ $$
114
+
115
+ where $\mathbf{M}_t\in \mathcal{M}$ and $\mathcal{M} = \{\mathbf{M}_t^{[1]},\dots ,\mathbf{M}_t^{[H]}\mid \| \mathbf{M}_t^{[i]}\| \leq$ $a(1 - \rho)^i,\mathbf{M}_t^{[i]}\in \mathbb{R}^{m\times n},a > 0,\forall i\in [H]\} .$
116
+
117
+ The disturbance-action policy consists of a linear combination of the disturbance (the memory size is $H = \Theta (\log T)$ in the paper). Given a stable controller $K$ and by carefully choosing $\{\mathbf{M}_t\}$ , $\pi (K,\{\mathbf{M}_t\})$ aims to approximate a good linear stable controller that achieves small costs and satisfies the constraints in $\Omega$ . Further, we define DAC with fixed weights, which serves as an intermediate policy class and is frequently used in our analysis.
118
+
119
+ Definition 2.3 (DAC with Fixed Weight). For a DAC $\pi(K, \{\mathbf{M}_t\})$ , the set of fixed weight DAC policies is
120
+
121
+ $$
122
+ \mathcal {E} = \left\{\pi (K, \left\{\mathbf {M} _ {t} \right\}) \mid \mathbf {M} _ {t} = \mathbf {M}, \forall t \in [ T ] \right\}. \tag {1}
123
+ $$
124
+
125
+ Let $\mathbf{M}_{s:t} \coloneqq \{\mathbf{M}_s, \dots, \mathbf{M}_t\}$ and $\tilde{A} = A - BK$ . Under a policy $\pi(K, \{\mathbf{M}_t\})$ in DAC, $\Psi_{t,i}^{\pi}(\mathbf{M}_{t-H:t-1})$ is defined to be the disturbance-state transfer matrix:
126
+
127
+ $$
128
+ \begin{array}{l} \Psi_ {t, i} ^ {\pi} \left(\mathbf {M} _ {t - H: t - 1}\right) \\ = \tilde {A} ^ {i - 1} \mathbb {I} (i \leq H) + \sum_ {j = 1} ^ {H} \tilde {A} ^ {j - 1} B \mathbf {M} _ {t - j} ^ {[ i - j ]} \mathbb {I} _ {i - j \in [ 1, H ]}. \\ \end{array}
129
+ $$
130
+
131
+ We occasionally abbreviate $\Psi_{t,i}^{\pi}(\mathbf{M}_{t-H:t-1})$ to be $\Psi_{t,i}^{\pi}$ without causing any confusion. As shown in (Agarwal et al., 2019a), under a policy $\pi$ in DAC, the state is represented by $x_{t}^{\pi} = \sum_{i=1}^{t} \Psi_{t,i}^{\pi} w_{t-i}$ , which is equivalent to
132
+
133
+ $$
134
+ x _ {t} ^ {\pi} = \tilde {A} ^ {H} x _ {t - H} + \sum_ {i = 1} ^ {2 H} \Psi_ {t, i} ^ {\pi} w _ {t - i}.
135
+ $$
136
+
137
+ By truncating the true states, we define the approximated states and actions
138
+
139
+ $$
140
+ \tilde {x} _ {t} ^ {\pi} = \sum_ {i = 1} ^ {2 H} \Psi_ {t, i} ^ {\pi} w _ {t - i}, \quad \tilde {u} _ {t} ^ {\pi} = - K \tilde {x} _ {t} ^ {\pi} + \sum_ {i = 1} ^ {H} \mathbf {M} _ {t} ^ {[ i ]} w _ {t - i}. \tag {2}
141
+ $$
142
+
143
+ Further, we have the approximated cost and constraint functions in the following
144
+
145
+ $$
146
+ c _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right), d _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right), l \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right). \tag {3}
147
+ $$
148
+
149
+ Based on the definition of approximated constraint functions, we define an approximated constraint set $\tilde{\Omega}$ such that
150
+
151
+ $$
152
+ \tilde {\Omega} = \{\pi \mid d _ {t} (\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}) \leq 0, l (\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}) \leq 0, \forall t \in [ T ] \}.
153
+ $$
154
+
155
+ Note the states in both $\Omega$ and $\tilde{\Omega}$ are driven by the same underlying dynamics with the policy $\pi$ . Intuitively, $\Omega$ and $\tilde{\Omega}$ are "close" if the approximated errors of states and actions are small. We introduce the following assumptions on cost and constraint functions.
156
+
157
+ Assumption 2.4. The cost $c_{t}(x,u)$ and constraint functions $d_{t}(x,u)$ and $l(x,u)$ are convex and differentiable. Let $C_0$ and $C_1$ be positive constants. As long as $\| x - x' \| \leq D$ and $\| u - u' \| \leq D$ , we assume the gradients $\| \nabla_x c_t \|, \| \nabla_u c_t \|, \| \nabla_x d_t \|, \| \nabla_u d_t \|, \| \nabla_x l \|, \| \nabla_u l \|$ are bounded by $C_0 D$ ; we assume $c_{t}, d_{t}$ , and $l$ are bounded by $C_1 D$ . We assume the noises $\| w_t \| \leq W, \forall t$ are bounded.
158
+
159
+ Further, we introduce an assumption on the feasibility of the offline control problem. This assumption can be regarded as Slater's condition in the optimization literature.
160
+
161
+ Assumption 2.5. Let $\delta$ be a positive constant, there exists a policy $\pi \in \mathcal{E}$ such that
162
+
163
+ $$
164
+ d _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) \leq - \delta , l \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) \leq - \delta , \forall t \in [ T ].
165
+ $$
166
+
167
+ Note it is non-trivial to extend (Agarwal et al., 2019a) into a constrained setting because it requires an adaptive balance between the costs and constraints. Next, we propose our constrained control algorithms to achieve this goal.
168
+
169
+ # 3. Constrained Online Nonstochastic Control Algorithm
170
+
171
+ Given an (arbitrary) stable control policy $K$ , we develop a set of online nonstochastic control policy $\pi(K, \{\mathbf{M}_t\})$ to adjust the weights of disturbance/noise $\{\mathbf{M}_t\}$ such that it achieves small regret and constraint violation. Specifically, we use constrained online learning algorithms as the subroutines of our online nonstochastic control policy $\pi(K, \{\mathbf{M}_t\})$ to optimize the weights $\{\mathbf{M}_t\}$ .
172
+
173
+ According to the definition in (2), the approximated state $\tilde{x}_t^\pi$ and action $\tilde{u}_t^\pi$ are only related to the weights of the past $H$ steps $\mathbf{M}_{t - H:t} \coloneqq \{\mathbf{M}_{t - H}, \dots, \mathbf{M}_t\}$ . Therefore, we denote $\tilde{c}_t(\mathbf{M}_{t - H:t}) \coloneqq c_t(\tilde{x}_t^\pi, \tilde{u}_t^\pi)$ , $\tilde{d}_t(\mathbf{M}_{t - H:t}) \coloneqq d_t(\tilde{x}_t^\pi, \tilde{u}_t^\pi)$ , $\tilde{l}(\mathbf{M}_{t - H:t}) \coloneqq l(\tilde{x}_t^\pi, \tilde{u}_t^\pi)$ . To simplify notation, we further define $\tilde{c}_t(\mathbf{M}) \coloneqq \tilde{c}_t(\mathbf{M}, \dots, \mathbf{M})$ and similarly
174
+
175
+ for $\tilde{d}_t(\mathbf{M})$ and $\tilde{l} (\mathbf{M})$ . We are ready to present our constrained online nonstochastic control algorithm (COCA) by using the constrained online convex optimization solver (COCO-Solver) as the subroutine.
176
+
177
+ # Constrained Online Nonstochastic Control Algorithm
178
+
179
+ Initialize: a $(\kappa, \rho)$ stable controller $K$ and the proper learning rates in COCO-Solver.
180
+
181
+ for $t = 1,\dots ,T$ ,do
182
+
183
+ Observe state $x_{t}$ and compute the disturbance $w_{t - 1}$ .
184
+
185
+ Apply control $u_{t} = -Kx_{t} + \sum_{i = 1}^{H}\mathbf{M}_{t}^{[i]}w_{t - i}$ .
186
+
187
+ Receive feedback including cost function $c_{t}(x_{t},u_{t})$ and constraint functions $d_{t}(x_{t},u_{t})$ and $l(x_{t},u_{t})$ .
188
+
189
+ Compute the approximated cost function $\tilde{c}_t(\cdot)$ and constraint functions $\bar{d}_t(\cdot)$ and $\bar{l} (\cdot)$
190
+
191
+ Invoke the COCO-Solver $(\mathbf{M}_t, Q_t, \tilde{c}_t(\cdot), \tilde{d}_t(\cdot), \tilde{l}(\cdot))$ to obtain $\mathbf{M}_{t+1}$ and $Q_{t+1}$ .
192
+
193
+ end for
194
+
195
+ For COCA at time $t$ , we observe the state $x_{t}$ and infer the previous disturbance $w_{t-1} = x_{t} - Ax_{t-1} - Bu_{t-1}$ . The information of state and the past disturbances are used in $\pi(K, \{\mathbf{M}_t\})$ to output a control/action $u_{t}$ . Then we observe the full information of the cost function $c_{t}(\cdot, \cdot)$ and constraint functions $d_{t}(\cdot, \cdot)$ and $l_{t}(\cdot, \cdot)$ . Based on the feedback, we compute $\tilde{c}_{t}(\cdot), \tilde{d}_{t}(\cdot)$ , and $\tilde{l}(\cdot)$ , and invoke COCO-Solver to optimize the weights of disturbance $\{\mathbf{M}_t\}$ for the next control period $t+1$ . Note COCO-Solver has an input variable of $Q_{t}$ , which is designed to track the soft cumulative violation of $d_{t}(\cdot, \cdot)$ and is also a feedback signal to control the trade-off between the cost and soft constraint satisfaction of $d_{t}(\cdot, \cdot)$ .
196
+
197
+ As discussed, COCO-Solver is the key to optimizing the cumulative costs while minimizing (soft or hard) constraint violations. Depending on the types of constraint violation metrics we want to optimize, COCO-Solver will be instantiated with the COCO-Soft or COCO-Hard solvers. Moreover, when the cost functions are strongly-convex, we design COCO-Best2Worlds solver that can optimize soft and hard cumulative violations simultaneously. The key in COCO-Solver is to design the proper surrogate functions to incorporate the cost and (adversarial) constraints (e.g., the Lyapunov optimization method for soft violation and the penalty-based method for hard violation). This design enables a flexible trade-off between the cost and constraint violation and renders a large policy region for optimizing costs. Therefore, COCA with dedicated solvers is less conservative compared to the existing robust optimization-based control approaches (Dean et al., 2019; Li et al., 2021), which usually construct overly-conservative regions via robust optimization and use a projection-based method to guarantee the constraints in each control period. Moreover, these ap
198
+
199
+ proaches are infeasible to handle the adversarial constraints because they require the knowledge of future constraints. Next, we introduce these solvers and their corresponding theoretical performance, respectively.
200
+
201
+ # 3.1. COCA with COCO-Soft Solver
202
+
203
+ We instantiate COCO-Solver in COCA with the algorithm COCO-Soft $(\mathbf{M}_t, Q_t, \tilde{c}_t(\cdot), \tilde{d}_t(\cdot), \tilde{l}(\cdot))$ . The main idea behind COCO-soft is to carefully design a control surrogate function based on the Lyapunov optimization method such that the cumulative cost and soft violation are balanced. Specifically, for the loss function, we use $\tilde{c}_t(\mathbf{M}_t) + \langle \mathbf{M} - \mathbf{M}_t, \nabla \tilde{c}_t(\mathbf{M}_t) \rangle$ to approximate $\tilde{c}_{t+1}(\mathbf{M})$ . For the adversarial constraint, we use $\tilde{d}_t(\mathbf{M}_t) + \langle \mathbf{M} - \mathbf{M}_t, \nabla \tilde{d}_t(\mathbf{M}_t) \rangle$ to approximate $\tilde{d}_{t+1}(\mathbf{M})$ and the virtual queue $Q_t$ indicates the degree of the constraint violation, i.e., a large/small $Q_t$ means a large/small violation of the adversarial constraints. The product term $Q_t \langle \mathbf{M} - \mathbf{M}_t, \nabla \tilde{d}_t(\mathbf{M}_t) \rangle$ in the control surrogate function is a proxy term of $Q_t \tilde{d}_{t+1}(\mathbf{M})$ . Combining with the virtual queue update, minimizing the product term is equivalent to minimize the Lyapunov drift of $Q_{t+1}^2(\mathbf{M}) - Q_t^2$ . For the static constraint function $\tilde{l}(\mathbf{M})$ , we directly impose the penalty factor $\eta$ to prevent the violation. In summary, the control surrogate function carefully integrates the approximated cost and constraints in $V \tilde{c}_{t+1}(\mathbf{M}) + Q_{t+1}^2(\mathbf{M}) + \eta \tilde{l}^+(\mathbf{M})$ , so optimizing the surrogate function guarantees the best trade-off between the cumulative costs and constraint violations. Next, we present
204
+
205
+ # COCO-Soft(Mt, Qt, $\tilde{c}_t(\cdot),\tilde{d}_t(\cdot),\tilde{l} (\cdot))$
206
+
207
+ Control Decision: Choose $\mathbf{M}_{t + 1}\in \mathcal{M}$ to minimize the control surrogate function
208
+
209
+ $$
210
+ \begin{array}{l} V \langle \mathbf {M} - \mathbf {M} _ {t}, \nabla \tilde {c} _ {t} (\mathbf {M} _ {t}) \rangle + Q _ {t} \langle \mathbf {M} - \mathbf {M} _ {t}, \nabla \tilde {d} _ {t} (\mathbf {M} _ {t}) \rangle \\ + \eta \tilde {l} ^ {+} (\mathbf {M}) + \alpha \| \mathbf {M} - \mathbf {M} _ {t} \| ^ {2}. \\ \end{array}
211
+ $$
212
+
213
+ # Virtual Queue Update:
214
+
215
+ $$
216
+ Q _ {t + 1} = \left[ Q _ {t} + \tilde {d} _ {t} (\mathbf {M} _ {t}) + \langle \mathbf {M} _ {t + 1} - \mathbf {M} _ {t}, \nabla \tilde {d} _ {t} (\mathbf {M} _ {t}) \rangle + \epsilon \right] ^ {+}
217
+ $$
218
+
219
+ Output: $\mathbf{M}_{t + 1}$ and $Q_{t + 1}$ .
220
+
221
+ the theoretical results for COCA with the COCO-Soft solver. We only present order-wise results. The exact constants and proof can be found in Appendix C in (Liu et al., 2023).
222
+
223
+ Theorem 3.1. Given a stable controller $K$ , under Assumptions 2.4 and 2.5, COCA with COCO-Soft solver achieves
224
+
225
+ $$
226
+ \mathcal {R} (T) = O \left(\sqrt {T} \log^ {3} T\right),
227
+ $$
228
+
229
+ $$
230
+ \mathcal {V} _ {d} ^ {\text {s o f t}} (T) = O (1), \mathcal {V} _ {l} (t) = O (1 / \log T), \forall t \in [ T ].
231
+ $$
232
+
233
+ Remark 3.2. Theorem 3.1 implies COCA with COCO-Soft achieves similar performance as the optimal offline linear controller $K^{*}$ when $T$ is large. COCO-Soft only needs to solve an almost unconstrained optimization problem, which is more computationally efficient than the projection-based method in (Li et al., 2021). Moreover, if we project $\mathbf{M}_{t+1}$ into the set of $\{\mathbf{M} \mid \tilde{l}(\mathbf{M}) \leq 0\}$ instead of the penalty-based design $\eta \tilde{l}^{+}(\mathbf{M})$ , we can also achieve zero anytime violation as in (Li et al., 2021), which is verified in Appendix C.4 in (Liu et al., 2023). Finally, we would like to mention that Lyapunov optimization with the pessimistic design in virtual queue allows COCO-Soft to achieve the best trade-off between regret and violation (please refer to Theorem 4.4 and Remark 4.5).
234
+
235
+ # 3.2. COCA with COCO-Hard Solver
236
+
237
+ We instantiate COCO-Solver in COCA with the algorithm COCO-Hard $(\mathbf{M}_t, Q_t, \tilde{c}_t(\cdot), \tilde{d}_t(\cdot), \tilde{l}(\cdot))$ . The main idea behind COCO-hard is to capture the constraint directly in the control surrogate function with the proximal penalty-based method, which is different from the Lyapunov optimization method in COCO-Soft. Since the design for $\tilde{c}_t(\mathbf{M})$ and $\tilde{l}(\mathbf{M})$ is similar to that in COCO-Soft. We focus on the new design for taking care of the adversarial constraint. Specifically, we directly use $\tilde{d}_t^+(\mathbf{M})$ as a proxy term of $\tilde{d}_{t+1}^+(\mathbf{M})$ and impose a penalty factor $\gamma$ to prevent the violation. Therefore, the control surrogate function approximates $V\tilde{c}_{t+1}(\mathbf{M}) + \gamma \tilde{d}_{t+1}^+(\mathbf{M}) + \eta \tilde{l}^+(\mathbf{M})$ , which directly captures the cumulative costs and (hard) constraint violation.
238
+
239
+ # COCO-Hard $(\mathbf{M}_t,\tilde{c}_t(\cdot),\tilde{d}_t(\cdot),\tilde{l} (\cdot))$
240
+
241
+ Control Decision: Choose $\mathbf{M}_{t + 1}\in \mathcal{M}$ to minimize the control surrogate function
242
+
243
+ $$
244
+ \begin{array}{l} V \langle \mathbf {M} - \mathbf {M} _ {t}, \nabla \tilde {c} _ {t} (\mathbf {M} _ {t}) \rangle + \gamma \tilde {d} _ {t} ^ {+} (\mathbf {M}) + \eta \tilde {l} ^ {+} (\mathbf {M}) \\ + \alpha \| \mathbf {M} - \mathbf {M} _ {t} \| ^ {2} \\ \end{array}
245
+ $$
246
+
247
+ Output: $\mathbf{M}_{t + 1}$
248
+
249
+ Next, we present the theoretical results for COCA with the COCO-Hard solver. The detailed parameters and proof can be found in Appendix D in (Liu et al., 2023).
250
+
251
+ Theorem 3.3. Given a stable linear controller $K$ , under Assumptions 2.4, COCA with COCO-Hard solver achieves
252
+
253
+ $$
254
+ \begin{array}{l} \mathcal {R} (T) = O \left(T ^ {\frac {2}{3}} \log^ {2} T\right), \\ \mathcal {V} _ {l} (t) = O \left(\log T / T ^ {\frac {1}{3}}\right), \forall t \in [ T ], \\ \mathcal {V} _ {d} ^ {h a r d} (T) = O \left(T ^ {\frac {2}{3}} \log^ {2} T\right), f o r a l a r g e T. \\ \end{array}
255
+ $$
256
+
257
+ Remark 3.4. COCO-Hard establishes Theorem 3.3 without a "Slater-like" Assumption 2.5. Similar as in COCO-Soft,
258
+
259
+ COCO-Hard is computationally efficient and avoids the complex projection operator. Moreover, by tuning learning rates $V,\gamma ,\eta$ ,and $\alpha$ in COCO-Hard, we are able to establish a trade-off $\mathcal{R}(T) = \tilde{O} (T^{\max \{1 - \frac{c}{2},c\}})$ $\nu_{d}^{hard}(T) =$ $\tilde{O} (T^{\max \{1 - \frac{c}{2},0.5\}})$ , and $\mathcal{V}_l(t) = \tilde{O} (T^{-\frac{c}{2}}),\forall t\in [T]$ with $c\in [0.5,1)$ (please refer to Appendix D.4 in (Liu et al., 2023) for details).
260
+
261
+ # 3.3. A Roadmap to Prove Theorems 3.1 and 3.3
262
+
263
+ We provide a general roadmap to prove the regret and constraint violation in Theorems 3.1 and 3.3.
264
+
265
+ Regret analysis: we have the following decomposition for the regret
266
+
267
+ $$
268
+ \begin{array}{l} \mathcal {R} (T) = \sum_ {t = 1} ^ {T} c _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - \sum_ {t = 1} ^ {T} c _ {t} \left(x _ {t} ^ {K ^ {*}}, u _ {t} ^ {K ^ {*}}\right) \\ = \sum_ {t = 1} ^ {T} \left[ c _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - c _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) \right] (4) \\ + \sum_ {t = 1} ^ {T} c _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) - \min _ {\pi \in \bar {\Omega} \cap \mathcal {E}} \sum_ {t = 1} ^ {T} c _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) (5) \\ + \min _ {\pi \in \bar {\Omega} \cap \mathcal {E}} \sum_ {t = 1} ^ {T} c _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) - \sum_ {t = 1} ^ {T} c _ {t} \left(x _ {t} ^ {K ^ {*}}, u _ {t} ^ {K ^ {*}}\right). (6) \\ \end{array}
269
+ $$
270
+
271
+ The term in (4) is on the approximation error of cost functions, related to the approximated errors of states and actions, and is bounded by $O(1)$ in Lemma F.1 when choosing the memory size $H = \Theta (\log T)$ for a disturbance-action policy. The term in (6) is on the representation ability of a disturbance-action policy with constraints, which can also be bounded by $O(1)$ in Lemma G.1 because $K^{*}$ intuitively belongs to the class $\tilde{\Omega}\bigcap \mathcal{E}$ . The term in (5) is the key to the regret of COCA, which depends on the regret of COCO-Solver and will be established in Theorems 4.4 and 4.6 in the next section, respectively.
272
+
273
+ Cumulative soft/hard violation of $d_{t}$ function: we have the following decomposition for the soft/hard violation of adversarial $d_{t}$ :
274
+
275
+ $$
276
+ \mathcal {V} _ {d} ^ {\text {s o f t}} (T) = \sum_ {t = 1} ^ {T} \left[ d _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - d _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) \right] + d _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right)
277
+ $$
278
+
279
+ $$
280
+ \mathcal {V} _ {d} ^ {h a r d} (T) \leq \sum_ {t = 1} ^ {T} \left[ d _ {t} \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - d _ {t} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) \right] ^ {+} + d _ {t} ^ {+} \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right)
281
+ $$
282
+
283
+ The difference terms in $\mathcal{V}_d^{soft}(T)$ and $\mathcal{V}_d^{hard}(T)$ are on the approximation error of constraint functions, which are also related to the approximated errors of states and actions and are bounded by $O(1)$ in Lemma F.1; the terms $\sum_{t=1}^{T} d_t(\tilde{x}_t^\pi, \tilde{u}_t^\pi)$ or $\sum_{t=1}^{T} d_t^+(\tilde{x}_t^\pi, \tilde{u}_t^\pi)$ are on the soft or hard constraint violation of COCO-Solver, which are established in the next section.
284
+
285
+ Anytime violation of $l$ function: we have the following decomposition for the constraint $l$ function:
286
+
287
+ $$
288
+ \mathcal {V} _ {l} (t) = l \left(x _ {t} ^ {\pi}, u _ {t} ^ {\pi}\right) - l \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right) + l \left(\tilde {x} _ {t} ^ {\pi}, \tilde {u} _ {t} ^ {\pi}\right).
289
+ $$
290
+
291
+ Similarly, the difference term is on the anytime approximated error of constraint functions, which is bounded by $O(1 / T)$ in Lemma F.1; the term of $l(\tilde{x}_t^\pi ,\tilde{u}_t^\pi)$ depends on the anytime violation of COCO-Solver, which is established in the next section.
292
+
293
+ As discussed above, the key is to analyze the performance of $c_{t}(\tilde{x}_{t}^{\pi}, \tilde{u}_{t}^{\pi})$ , $d_{t}(\tilde{x}_{t}^{\pi}, \tilde{u}_{t}^{\pi})$ and $l(\tilde{x}_{t}^{\pi}, \tilde{u}_{t}^{\pi})$ with COCO-Solver, where the approximated states $\tilde{x}_{t}^{\pi}$ and actions $\tilde{u}_{t}^{\pi}$ depend on the past states and actions up to the previous $H$ steps, i.e., $\mathbf{M}_{t-H:t}$ . COCO-Solver is naturally implemented by a constrained online convex optimization with memory framework (COCOWM). Since COCOwM is a plug-in component of COCA, we present the analysis in a separate section and any advance in COCOwM can be directly translated to that in COCA.
294
+
295
+ # 4. COCO-Solver via Constrained Online Convex Optimization with Memory
296
+
297
+ In the standard constrained online convex optimization (COCO), the loss and constraint functions at time $t$ only depend on the current decision $\mathbf{M}_t\in \mathcal{M}$ . In the constrained online convex optimization with memory (COCOWM), the loss function $f_{t}(\mathbf{M}_{t - H:t})$ and cost functions $g_{t}(\mathbf{M}_{t - H:t})$ and $h(\mathbf{M}_{t - H:t})$ at time $t$ depends on the historical decisions of $\{\mathbf{M}_{t - H:t}\}$ up to the previous $H$ -steps. If we associate $f_{t}(\mathbf{M}_{t - H:t}), g_{t}(\mathbf{M}_{t - H:t})$ , and $h(\mathbf{M}_{t - H:t})$ with $c_{t}(\tilde{x}_{t}^{\pi},\tilde{u}_{t}^{\pi}), d_{t}(\tilde{x}_{t}^{\pi},\tilde{u}_{t}^{\pi})$ , and $l(\tilde{x}_t^\pi ,\tilde{u}_t^\pi)$ , respectively, COCOwM is naturally used to optimize $\{\mathbf{M}_t\}$ and the performance of COCOwM (or COCO-Solver) can be translated to that of COCA. Similar to COCA, we define the metrics of regret and constraint violation for COCOwM.
298
+
299
+ Offline COCOwM: Recall for a simple notation, we define $f_{t}(\mathbf{M}) = f_{t}(\mathbf{M},\dots ,\mathbf{M})$ and similarly for $g_{t}(\mathbf{M})$ and $h(\mathbf{M})$ . We formulate the offline COCOwM as follows:
300
+
301
+ $$
302
+ \min _ {\mathbf {M} \in \mathcal {M}} \sum_ {t = 1} ^ {T} f _ {t} (\mathbf {M}) \tag {7}
303
+ $$
304
+
305
+ $$
306
+ \mathrm {s . t .} h (\mathbf {M}) \leq 0, g _ {t} (\mathbf {M}) \leq 0, \forall t \in [ T ]. \tag {8}
307
+ $$
308
+
309
+ Let the optimal solution to (7)-(8) be $\mathbf{M}^*$ . We define the regret and constraint violations of COCOwM
310
+
311
+ $$
312
+ \mathcal {R} _ {f} (T) = \sum_ {t = 1} ^ {T} f _ {t} \left(\mathbf {M} _ {t - H: t}\right) - \sum_ {t = 1} ^ {T} f _ {t} \left(\mathbf {M} ^ {*}\right),
313
+ $$
314
+
315
+ $$
316
+ \mathcal {V} _ {g} ^ {\text {s o f t}} (T) = \sum_ {t = 1} ^ {T} g _ {t} \left(\mathbf {M} _ {t - H: t}\right), \mathcal {V} _ {g} ^ {\text {h a r d}} (T) = \sum_ {t = 1} ^ {T} g _ {t} ^ {+} \left(\mathbf {M} _ {t - H: t}\right)
317
+ $$
318
+
319
+ $$
320
+ \mathcal {V} _ {h} (t) = h \left(\mathbf {M} _ {t - H: t}\right), \forall t \in [ T ].
321
+ $$
322
+
323
+ Before presenting the formal analysis of COCOwM (or COCO-Solver) algorithms, we introduce several necessary assumptions.
324
+
325
+ Assumption 4.1. The feasible set $\mathcal{M}$ is convex with diameter $D$ such that $\| \mathbf{M} - \mathbf{M}'\| \leq D, \forall \mathbf{M}, \mathbf{M}' \in \mathcal{M}$ .
326
+
327
+ Assumption 4.2. The loss and constraint functions are convex and Lipschitz continuous with Lipschitz constant $L$ . Further, assume $h(\mathbf{M}) \leq E$ and $g_{t}(\mathbf{M}) \leq E, \forall t \in [T]$ .
328
+
329
+ Assumption 4.3. There exists a positive constant $\xi >0$ and $\mathbf{M}\in \mathcal{M}$ such that $h(\mathbf{M})\leq -\xi$ and $g_{t}(\mathbf{M})\leq -\xi ,\forall t\in [T]$ .
330
+
331
+ We are ready to present the theoretical results of COCO-Soft and COCO-Hard solvers introduced in Section 3.
332
+
333
+ # 4.1. Theoretical Analysis of COCO-Soft
334
+
335
+ COCO-Soft $(\mathbf{M}_t, Q_t, f_t(\cdot), g_t(\cdot), h(\cdot))$ optimizes $f_t(\mathbf{M}_t)$ , $g_t(\mathbf{M}_t)$ , and $h(\mathbf{M}_t)$ , which are slightly off to the true targets $f_t(\mathbf{M}_{t-H,t})$ , $g_t(\mathbf{M}_{t-H,t})$ , and $h(\mathbf{M}_{t-H,t})$ . Therefore, we also need to quantify the mismatches by establishing the stability terms $\|\mathbf{M}_t - \mathbf{M}_{t+1}\|$ . The following theorem establishes the regret and constraint violation of COCO-Soft.
336
+
337
+ Theorem 4.4. Under Assumptions 4.1-4.3, COCO-Soft algorithm achieves
338
+
339
+ $$
340
+ \mathcal {R} _ {f} (T) = O \left(\sqrt {T} \log^ {3} T\right),
341
+ $$
342
+
343
+ $$
344
+ \mathcal {V} _ {h} (t) = O \left(1 / \log T\right), \forall t \in [ T ],
345
+ $$
346
+
347
+ $$
348
+ \mathcal {V} _ {g} ^ {\text {s o f t}} (T) = O (1), \text {f o r a l a r g e T}.
349
+ $$
350
+
351
+ We outline the key steps of the proof and leave the details in Appendix C in (Liu et al., 2023). We first study the regret
352
+
353
+ $$
354
+ \begin{array}{l} \mathcal {R} _ {f} (T) \leq \sum_ {t = 1} ^ {T} \left| f _ {t} \left(\mathbf {M} _ {t - H: t}\right) - f _ {t} \left(\mathbf {M} _ {t}\right) \right| + f _ {t} \left(\mathbf {M} _ {t}\right) - f _ {t} \left(\mathbf {M} ^ {*}\right) \\ \leq O \left(H ^ {2} \sum_ {t = 1} ^ {T} \| \mathbf {M} _ {t + 1} - \mathbf {M} _ {t} \|\right) + O (\sqrt {T} \log^ {3} T + T \epsilon), \\ \end{array}
355
+ $$
356
+
357
+ which proves the regret bound by letting the pessimistic factor $\epsilon = \Theta (\log^3 T / \sqrt{T})$ in Lemma C.1 and by Lemma C.2. Similarly, we establish the soft constraint violation
358
+
359
+ $$
360
+ \begin{array}{l} \mathcal {V} _ {g} ^ {\text {s o f t}} (T) \leq \sum_ {t = 1} ^ {T} \left| g _ {t} \left(\mathbf {M} _ {t - H: t}\right) - g _ {t} \left(\mathbf {M} _ {t}\right) \right| + g _ {t} \left(\mathbf {M} _ {t}\right) \\ = O \left(H ^ {2} \sum_ {t = 1} ^ {T} \left\| \mathbf {M} _ {t + 1} - \mathbf {M} _ {t} \right\| + \sqrt {T} \log^ {3} T - T \epsilon\right) \\ \end{array}
361
+ $$
362
+
363
+ which is $O(1)$ with $\epsilon = \Theta (\log^3 T / \sqrt{T})$ for a relatively large $T$ . Finally, we have anytime violation
364
+
365
+ $$
366
+ \begin{array}{l} \mathcal {V} _ {h} (t) \leq \left| h \left(\mathbf {M} _ {t - H: t}\right) - h \left(\mathbf {M} _ {t}\right) \right| + h \left(\mathbf {M} _ {t}\right) \\ = O (1 / \log T). \\ \end{array}
367
+ $$
368
+
369
+ ![](images/ecac87ca2c61bec49f2da040e3349b79c0391776fd036ee94809ea82fd393846.jpg)
370
+ (a) Cumulative costs
371
+
372
+ ![](images/6fc90e7cdd8f02ac4d20ebc6461ab4f5c02503a65a83dea13ccca414133bc336.jpg)
373
+ (b) Soft violations
374
+
375
+ ![](images/faa1ea5b69e0c814c1978739590cdc1cc66d3b8647f34fd229e44dda7331f738.jpg)
376
+ (c) Hard violations
377
+ Figure 1. Experiment results for QVF control with winds blowing down $w_{t} \sim U(-5.5, -4.5)$ . The lines are plotted by averaging over 10 independent runs. The shaded areas in Figures (a)-(c) are $95\%$ confidence intervals and in Figure (d)-(e) are the full ranges of the data.
378
+
379
+ ![](images/43a1c070bce5f037c914bcc0b1981d771dbbe794b78157b7c08f9c4f64ed3d8d.jpg)
380
+ (d) Range of $x_{t}$
381
+
382
+ ![](images/6c70978bacfa2aa46c33c4e1f43786977911d8aefe46bcff2b8fc825f7cea991.jpg)
383
+ (e) Range of $u_{t}$
384
+
385
+ Remark 4.5. Theorem 4.4 achieves $\tilde{O}(\sqrt{T})$ regret and $O(1)$ violation, which significantly improves the best existing results of $O(\sqrt{T})$ regret and violation in (Neely & Yu, 2017), a special case of ours by letting $H = 0$ . Moreover, for OCO with stochastic constraints in (Yu et al., 2017), COCO-Soft can also establish $\tilde{O}(\sqrt{T})$ regret and $O(1)$ violation against the same baseline in (Yu et al., 2017), which again improves $O(\sqrt{T})$ regret and violation in (Yu et al., 2017) (please refer to Appendix C.5 for details). The key design and analysis for such improvement is to introduce the pessimistic factor $\epsilon$ in virtual queue update and compare COCO-Soft with a "ε-tight" baseline such that we can trade regret (the amount of $T\epsilon$ ) to achieve a constant soft violation $\mathcal{V}_g^{\text{soft}}(T)$ .
386
+
387
+ # 4.2. Theoretical Analysis of COCO-Hard
388
+
389
+ For COCO-Hard, we also omit the intermediate lemmas and only present the main theorem due to the limited space. The details and proofs can be found in Appendix D in (Liu et al., 2023).
390
+
391
+ Theorem 4.6. Under Assumptions 4.1-4.2, COCO-Hard algorithm achieves
392
+
393
+ $$
394
+ \begin{array}{l} \mathcal {R} _ {f} (T) = O \left(T ^ {\frac {2}{3}} \log^ {2} T\right), \\ \mathcal {V} _ {h} (t) = O \left(\log T / T ^ {\frac {1}{3}}\right), \forall t \in [ T ], \\ \mathcal {V} _ {g} ^ {\text {h a r d}} (T) = O \left(T ^ {\frac {2}{3}} \log^ {2} T\right), f o r a l a r g e T. \\ \end{array}
395
+ $$
396
+
397
+ Note once the regret and constraint violation of COCO solvers have been established in Theorems 4.4 and 4.6, we plug them into the roadmap in Section 3.3 and prove the performance of COCA in Theorems 3.1 and 3.3.
398
+
399
+ # 5. Experiment
400
+
401
+ In this section, we test our algorithms on a quadrotor vertical flight (QVF) control under an adversarial environment, which is modified from (Li et al., 2023). The experiment is designed to verify if our algorithms are adaptive to time-varying/adversive constraints and we compare COCA
402
+
403
+ with the stable controller without considering constraints in (Agarwal et al., 2019a). We also test our algorithms on a Heating Ventilation and Air Conditioning (HVAC) control with static affine constraints in (Li et al., 2021). The experiment is to verify if our approach is less conservative in designing COCA algorithms. The learning rates of COCA algorithms can be found in Appendix H in (Liu et al., 2023).
404
+
405
+ # 5.1. QVF Control
406
+
407
+ The system equation is
408
+
409
+ $$
410
+ \ddot {x} _ {t} = \frac {u _ {t}}{m} - g - \frac {I ^ {a} \dot {x} _ {t}}{m} + w _ {t},
411
+ $$
412
+
413
+ where $x_{t}$ is the altitude of the quadrotor, $u_{t}$ is the motor thrust, $m$ is the mass of the quadrotor, $g$ is the gravitational acceleration, and $I^{a}$ is the drag coefficient of the air resistance. Let $m = 1\mathrm{kg}$ , $g = 9.8\mathrm{m / s^2}$ , and $I^{a} = 0.25\mathrm{kg / s}$ . The system is discretized with $\Delta_t = 1s$ . We impose time-varying constraints, $z_{t} \geq 0.3 + 0.3\sin (t / 10)$ , to emulate the complicated time-varying obstacles on the ground. The static affine constraints are $z_{t} \leq 1.7$ and $0 \leq v_{t} \leq 12$ . We consider a time-varying quadratic cost function $0.1(z_{t} - 0.7)^{2} + 0.1\dot{z}_{t}^{2} + \chi_{t}(v_{t} - 9.8)^{2}$ , where $\chi_{t} \sim U(0.1,0.2)$ . We simulate two different wind conditions $w_{t} \sim U(-5.5, -4.5)$ (winds blow down) and $w_{t} \sim U(4.5,5.5)$ (winds blow up), respectively.
414
+
415
+ Figure 1 shows the experiment results for QVT control with winds blowing down $w_{t} \sim U(-5.5, -4.5)$ . Figure 2 shows the experiment results for QVT control with winds blowing up $w_{t} \sim U(4.5, 5.5)$ . These two figures show that both COCA-Soft and COCA-Hard achieve much better performance than the stable controller in (Agarwal et al., 2019a). Specifically, our algorithms have much smaller cumulative costs, near-zero static constraint violations, negative cumulative soft violations that decrease by time, and cumulative hard violations that remain unchanged small constant shortly after the initial stages. Moreover, our algorithms have small hard constraint violations while having similar costs compared with the controller in (Agarwal et al., 2019a) in both settings. These results verify our algorithms are very adaptive to the adversarial environment and achieve minimal
416
+
417
+ ![](images/829fb1258162865f7937bc1ab2c6b3f613e74514cc56aba29ab7ec579e7e561e.jpg)
418
+ (a) Cumulative costs
419
+
420
+ ![](images/ea3f500cef132ba2b99c08c1b6328b8267462fe36094357bb9c910d58ef24f35.jpg)
421
+ (b) Soft violations
422
+
423
+ ![](images/692d87843af13a898446fe8527e75cf7d33887947340d6ae2b5cb8f44dd52aa6.jpg)
424
+ (c) Hard violations
425
+
426
+ ![](images/eb824685b2def82b7e3e72484b2f18278d8368acbbff6e2ce3540c225ca9b4ad.jpg)
427
+ (d) Range of $x_{t}$
428
+
429
+ ![](images/161df0fa4b5db97907575fe9005be1a8099481033eaf4c3e7a10e3b0a9bf8b46.jpg)
430
+ (e) Range of $u_{t}$
431
+
432
+ ![](images/1f24b050af06e395914bd4368f3c4e5914c5b67fdce327755fc9d3204d3f1004.jpg)
433
+ Figure 2. Experiment results for QVF control with winds blowing up $w_{t} \sim U(4.5, 5.5)$ . The lines are plotted by averaging over 10 independent runs. The shaded areas in Figures (a)-(c) are $95\%$ confidence intervals and in Figure (d)-(e) are the full ranges of the data.
434
+ (a) Cumulative costs
435
+
436
+ ![](images/64d029b505441d092517cc737f6a14d796ec4dcea097793ef44d735b62f1e951.jpg)
437
+ (b) Range of $x_{t}$
438
+
439
+ ![](images/c1bade6ba5235d806aa7bd26bdc76401721caa49f8bcdb586111b24205f1bb7c.jpg)
440
+ (c) Range of $u_{t}$
441
+ Figure 3. Experiment results for HVAC Control. The lines are average of 10 runs. The lines are plotted by averaging over 10 independent runs. The shaded areas in Figure (a) are $95\%$ confidence intervals and in Figures (b)-(c) are the full ranges of the data.
442
+
443
+ cumulative costs and best constraints satisfaction. Moreover, we observe COCA-Soft and COCA-Hard have almost identical performance on cumulative costs and soft violations, but COCA-Hard has a smaller hard violation than COCA-Soft. It justifies the penalty-based design is efficient in tackling the hard violation.
444
+
445
+ # 5.2. HVAC Control
446
+
447
+ The system equation is
448
+
449
+ $$
450
+ \dot {x} _ {t} = \frac {\theta^ {o} - x _ {t}}{v \zeta} - \frac {u _ {t}}{v} + \frac {w _ {t} + \iota}{v},
451
+ $$
452
+
453
+ where $x_{t}$ is the room temperature, $u_{t}$ is the airflow rate of the HVAC system as the control input, $\theta^o$ is the outdoor temperature, $w_{t}$ is the random disturbance, $\iota$ represents the impact of the external heat sources, $v$ and $\zeta$ denotes the environmental parameters. Let $v = 100$ , $\zeta = 6$ , $\theta^o = 30^\circ C$ , and $\iota = 1.5$ . Let $w_{t} \sim U(-1.1, 1.3)$ and we discretize the system with $\Delta_t = 60s$ . Similar to (Li et al., 2021), the state and input constraints are $22.5 \leq x_{t} \leq 25.5$ and $0.5 \leq u_{t} \leq 4.5$ , respectively. We specify the time-varying cost functions $c_{t} = 2(x_{t} - 24)^{2} + \chi_{t}(u_{t} - 2.5)^{2}$ with $\chi_{t} \sim U(0.1, 4.0)$ .
454
+
455
+ We compare COCA with OGD-BZ algorithm (COCA-Soft and COCA-Hard are exactly identical, called COCA, because there only exist static state and input constraints).
456
+
457
+ Figure 3 (a)-(c) show the cumulative costs, the ranges of the room temperature $x_{t}$ and control input $u_{t}$ . We observe that COCA has a significantly better cumulative cost than OGD-BZ algorithm with a near-zero constraint violation. The results verify our approach is effective in designing less-conservative COCA algorithms.
458
+
459
+ # 6. Conclusions and Extensions
460
+
461
+ In this paper, we studied online nonstochastic control problems with adversarial and static constraints. We developed COCA algorithms that minimize cumulative costs and soft or hard constraint violations. Our experiments showed the proposed algorithms are adaptive to time-varying environments and less conservative in achieving better performance. We need to mention when the costs are strongly-convex, COCA-Best2Worlds combines the Lyapunov optimization and the penalty-based methods to achieve minimal soft/hard violations for adversarial constraints. The informal results are in Table 1 and the details are in Appendix E in (Liu et al., 2023). We conclude our paper by mentioning possible future directions. The paper assumes the system dynamics is linear, known, and time-invarying. It would be interesting to extend COCA to the setting when the systems are unknown (Plevrakis & Hazan, 2020; Simchowitz et al., 2020; Cassel et al., 2022), time-varying (Minasyan et al., 2021), or even nonlinear (Foster et al., 2020; Ghai et al., 2022).
462
+
463
+ # References
464
+
465
+ Agarwal, N., Bullins, B., Hazan, E., Kakade, S., and Singh, K. Online control with adversarial disturbances. Proceedings of the 36th International Conference on Machine Learning, 2019a.
466
+ Agarwal, N., Hazan, E., and Singh, K. Logarithmic regret for online control. Advances Neural Information Processing Systems (NeurIPS), 2019b.
467
+ Amani, S., Thrampoulidis, C., and Yang, L. Safe reinforcement learning with linear function approximation. In Proceedings of the 38th International Conference on Machine Learning, 2021.
468
+ Aswani, A., Gonzalez, H., Sastry, S. S., and Tomlin, C. Provably safe and robust learning-based model predictive control. Automatica, 2013.
469
+ Brunke, L., Greeff, M., Hall, A. W., Yuan, Z., Zhou, S., Panerati, J., and Schoellig, A. P. Safe learning in robotics: From learning-based control to safe reinforcement learning. Annual Review of Control, Robotics, and Autonomous Systems, 2022.
470
+ Cao, X., Zhang, J., and Poor, H. V. Online stochastic optimization with time-varying distributions. IEEE Transactions on Automatic Control, 2021.
471
+ Cassel, A. B., Cohen, A., and Koren, T. Efficient online linear control with stochastic convex costs and unknown dynamics. In Proceedings of Thirty Fifth Conference on Learning Theory, 2022.
472
+ Chen, G. and Teboulle, M. Convergence analysis of a proximal-like minimization algorithm using bregman functions. SIAM Journal on Optimization, 1993.
473
+ Chen, L., Jain, R., and Luo, H. Learning infinite-horizon average-reward Markov decision process with constraints. In Proceedings of the 39th International Conference on Machine Learning, 2022a.
474
+ Chen, X., Minasyan, E., Lee, J. D., and Hazan, E. Provable regret bounds for deep online learning and control. arXiv preprint arXiv:2110.07807, 2022b.
475
+ Cheng, R., Orosz, G., Murray, R. M., and Burdick, J. W. End-to-end safe reinforcement learning through barrier functions for safety-critical continuous control tasks. In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, 2019.
476
+ Cohen, A., Hasidim, A., Koren, T., Lazic, N., Mansour, Y., and Talwar, K. Online linear quadratic control. In Proceedings of the 35th International Conference on Machine Learning, Proceedings of Machine Learning Research, 2018.
477
+
478
+ Dean, S., Tu, S., Matni, N., and Recht, B. Safely learning to control the constrained linear quadratic regulator. In 2019 American Control Conference (ACC), 2019.
479
+ Ding, D., Zhang, K., Basar, T., and Jovanovic, M. Natural policy gradient primal-dual method for constrained markov decision processes. In Advances in Neural Information Processing Systems. Curran Associates, Inc., 2020.
480
+ Ding, D., Wei, X., Yang, Z., Wang, Z., and Jovanovic, M. Provably efficient safe exploration via primal-dual policy optimization. In Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, 2021.
481
+ Efroni, Y., Mannor, S., and Pirotta, M. Exploration-exploitation in constrained mdps. arXiv preprint arXiv:2003.02189, 2020.
482
+ Fisac, J. F., Akametalu, A. K., Zeilinger, M. N., Kaynama, S., Gillula, J., and Tomlin, C. J. A general safety framework for learning-based control in uncertain robotic systems. IEEE Transactions on Automatic Control, 2019.
483
+ Foster, D., Sarkar, T., and Rakhlin, A. Learning nonlinear dynamical systems from a single trajectory. In Proceedings of the 2nd Conference on Learning for Dynamics and Control, 2020.
484
+ Foster, D. J. and Simchowitz, M. Logarithmic regret for adversarial online control. ICML'20. JMLR.org, 2020.
485
+ García, J., Fern, and o Fernández. A comprehensive survey on safe reinforcement learning. Journal of Machine Learning Research, 2015.
486
+ Ghai, U., Chen, X., Hazan, E., and Megretski, A. Robust online control with model misspecification. In Proceedings of The 4th Annual Learning for Dynamics and Control Conference, 2022.
487
+ Ghosh, A., Zhou, X., and Shroff, N. Provably efficient model-free constrained RL with linear function approximation. In Advances in Neural Information Processing Systems, 2022.
488
+ Gradu, P., Hallman, J., and Hazan, E. Non-stochastic control with bandit feedback. In Advances in Neural Information Processing Systems, 2020.
489
+ Guo, H., Liu, X., Wei, H., and Ying, L. Online convex optimization with hard constraints: Towards the best of two worlds and beyond. In Advances in Neural Information Processing Systems, 2022.
490
+ Hajek, B. Hitting-time and occupation-time bounds implied by drift analysis with applications. Ann. Appl. Prob., 1982.
491
+
492
+ Hazan, E. Introduction to online convex optimization. Foundations and Trends® in Optimization, 2016.
493
+ Hazan, E. and Singh, K. Introduction to online nonstochastic control. arXiv preprint arXiv:2111.09619, 2022.
494
+ Jacot, A., Gabriel, F., and Hongler, C. Neural tangent kernel: Convergence and generalization in neural networks. Advances Neural Information Processing Systems (NeurIPS), 2018.
495
+ Koller, T., Berkenkamp, F., Turchetta, M., and Krause, A. Learning-based model predictive control for safe exploration. In 2018 IEEE Conference on Decision and Control (CDC), 2018.
496
+ Li, Y., Das, S., and Li, N. Online optimal control with affine constraints. AAAI Conf. Artificial Intelligence, 2021.
497
+ Li, Y., Zhang, T., Das, S., Shamma, J., and Li, N. Safe adaptive learning for linear quadratic regulators with constraints. Technical report, 2023.
498
+ Liu, T., Zhou, R., Kalathil, D., Kumar, P., and Tian, C. Learning policies with zero or bounded constraint violation for constrained MDPs. In Advances in Neural Information Processing Systems, 2021.
499
+ Liu, X., Yang, Z., and Ying, L. Online nonstochastic control with adversarial and static constraints. arXiv preprint arXiv:2302.02426, 2023.
500
+ Mahdavi, M., Jin, R., and Yang, T. Trading regret for efficiency: online convex optimization with long term constraints. The Journal of Machine Learning Research, 2012.
501
+ Mayne, D., Seron, M., and Raković, S. Robust model predictive control of constrained linear systems with bounded disturbances. Automatica, 2005.
502
+ Minasyan, E., Gradu, P., Simchowitz, M., and Hazan, E. Online control of unknown time-varying dynamical systems. In Advances in Neural Information Processing Systems, 2021.
503
+ Neely, M. J. Stochastic network optimization with application to communication and queueing systems. Synthesis Lectures on Communication Networks, 2010.
504
+ Neely, M. J. and Yu, H. Online convex optimization with time-varying constraints. arXiv preprint arXiv:1702.04783, 2017.
505
+ Nonhoff, M. and Müller, M. A. An online convex optimization algorithm for controlling linear systems with state and input constraints. In 2021 American Control Conference (ACC), 2021.
506
+
507
+ O'Connell, M., Shi, G., Shi, X., Azizzadenesheli, K., Anandkumar, A., Yue, Y., and Chung, S.-J. Neural-fly enables rapid learning for agile flight in strong winds. Science Robotics, 2022.
508
+ Plevrakis, O. and Hazan, E. Geometric exploration for online control. In Advances in Neural Information Processing Systems, 2020.
509
+ Raković, S. V., Zhang, S., Sun, H., and Xia, Y. Model predictive control for linear systems under relaxed constraints. IEEE Transactions on Automatic Control, 2023.
510
+ Rawlings, J., Mayne, D., and Diehl, M. Model Predictive Control: Theory, Computation, and Design. 2017.
511
+ Simchowitz, M., Singh, K., and Hazan, E. Improper learning for non-stochastic control. In Proceedings of Thirty Third Conference on Learning Theory, 2020.
512
+ Sun, W., Dey, D., and Kapoor, A. Safety-aware algorithms for adversarial contextual bandit. In International Conference on Machine Learning, 2017.
513
+ Suo, D., Ghai, U., Minasyan, E., Gradu, P., Chen, X., Agarwal, N., Zhang, C., Singh, K., LaChance, J., Zadjel, T., Schottdorf, M., Cohen, D., and Hazan, E. Machine learning for mechanical ventilation control. 2021.
514
+ Tirmazi, M., Barker, A., Deng, N., Haque, M. E., Qin, Z. G., Hand, S., Harchol-Balter, M., and Wilkes, J. Borg: The next generation. EuroSys, 2020.
515
+ Vaswani, S., Yang, L., and Szepesvari, C. Near-optimal sample complexity bounds for constrained MDPs. In Advances in Neural Information Processing Systems, 2022.
516
+ Wabersich, K. P. and Zeilinger, M. N. Linear model predictive safety certification for learning-based control. In 2018 IEEE Conference on Decision and Control (CDC), 2018.
517
+ Wabersich, K. P., Krishnadas, R., and Zeilinger, M. N. A soft constrained mpc formulation enabling learning from trajectories with constraint violations. IEEE Control Systems Letters, 2022.
518
+ Wei, H., Liu, X., and Ying, L. Triple-q: A model-free algorithm for constrained reinforcement learning with sublinear regret and zero constraint violation. In Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, 2022.
519
+ Yi, X., Li, X., Yang, T., Xie, L., Chai, T., and Johansson, K. Regret and cumulative constraint violation analysis for online convex optimization with long term constraints. In International Conference on Machine Learning. PMLR, 2021a.
520
+
521
+ Yi, X., Li, X., Yang, T., Xie, L., Chai, T., and Johansson, K. H. Regret and cumulative constraint violation analysis for distributed online constrained convex optimization. arXiv preprint arXiv:2105.00321, 2021b.
522
+ Yu, H., Neely, M., and Wei, X. Online convex optimization with stochastic constraints. Advances in Neural Information Processing Systems, 30, 2017.
523
+ Zeilinger, M. N., Jones, C. N., and Morari, M. Robust stability properties of soft constrained mpc. In 49th IEEE Conference on Decision and Control (CDC), 2010.
2023/Online Nonstochastic Control with Adversarial and Static Constraints/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2aa4714d5d71aa77d7e3e0a1152c55d7171a9a9e4557256be83c315a86fa45ba
3
+ size 489288
2023/Online Nonstochastic Control with Adversarial and Static Constraints/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Platt Scaling with Calibeating/e5b96955-3b76-4298-ad0c-bbe6ac8c6f17_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eee126703f57dc77601dd9b819b21766271109415bd2e9e84db40eee906e11fa
3
+ size 2901739
2023/Online Platt Scaling with Calibeating/full.md ADDED
@@ -0,0 +1,1050 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Online Platt Scaling with Calibeating
2
+
3
+ Chirag Gupta<sup>1</sup> Aaditya Ramdas<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ We present an online post-hoc calibration method, called Online Platt Scaling (OPS), which combines the Platt scaling technique with online logistic regression. We demonstrate that OPS smoothly adapts between i.i.d. and non-i.i.d. settings with distribution drift. Further, in scenarios where the best Platt scaling model is itself miscalibrated, we enhance OPS by incorporating a recently developed technique called calibeating to make it more robust. Theoretically, our resulting OPS+calibeating method is guaranteed to be calibrated for adversarial outcome sequences. Empirically, it is effective on a range of synthetic and real-world datasets, with and without distribution drifts, achieving superior performance without hyperparameter tuning. Finally, we extend all OPS ideas to the beta scaling method.
8
+
9
+ # 1 Introduction
10
+
11
+ In the past two decades, there has been significant interest in the ML community on post-hoc calibration of ML classifiers (Zadrozny and Elkan, 2002; Niculescu-Mizil and Caruana, 2005; Guo et al., 2017). Consider a pretrained classifier $f: \mathcal{X} \rightarrow [0,1]$ that produces scores in $[0,1]$ for covariates in $\mathcal{X}$ . Suppose $f$ is used to make probabilistic predictions for a sequence of points $(\mathbf{x}_t, y_t)_{t=1}^T$ where $y_t \in \{0,1\}$ . Informally, $f$ is said to be calibrated (Dawid, 1982) if the predictions made by $f$ match the empirically observed frequencies when those predictions are made:
12
+
13
+ $$
14
+ \text {f o r a l l} p \in [ 0, 1 ], \text {A v e r a g e} \left\{y _ {t}: f \left(\mathbf {x} _ {t}\right) \approx p \right\} \approx p. \tag {1}
15
+ $$
16
+
17
+ In practice, for well-trained $f$ , larger scores $f(\mathbf{x})$ indicate higher likelihoods of $y = 1$ , so that $f$ does well for accuracy or a ranking score like AUROC. Yet we often find that $f$ does not satisfy (some formalized version of) condition (1). The goal of post-hoc calibration, or recalibration,
18
+
19
+ is to use held-out data to learn a low-complexity mapping $m:[0,1]\to [0,1]$ so that $m(f(\cdot))$ retains the good properties of $f$ accuracy, AUROC, sharpness—as much as possible, but is better calibrated than $f$ .
20
+
21
+ The focus of this paper is on a recalibration method proposed by Platt (1999), commonly known as Platt scaling (PS). The PS mapping $m$ is a sigmoid transform over $f$ parameterized by two scalars $(a, b) \in \mathbb{R}^2$ :
22
+
23
+ $$
24
+ m ^ {a, b} (f (\mathbf {x})) := \operatorname {s i g m o i d} (a \cdot \operatorname {l o g i t} (f (\mathbf {x})) + b). \tag {2}
25
+ $$
26
+
27
+ Here $\mathrm{logit}(z) = \log (z / 1 - z)$ and $\mathrm{sigmoid}(z) = 1 / 1 + e^{-z}$ are inverses. Thus $m^{1,0}$ is the identity mapping. Figure 1a has additional illustrative $m^{a,b}$ plots; these are easily interpreted—if $f$ is overconfident, that is if $f(x)$ values are skewed towards 0 or 1, we can pick $a\in (0,1)$ to improve calibration; if $f$ is underconfident, we can pick $a > 1$ ; if $f$ is systematically biased towards 0 (or 1), we can pick $b > 0$ (or $b < 0$ ). The counter-intuitive choice $a < 0$ can also make sense if $f$ 's predictions oppose reality (perhaps due to a distribution shift). The parameters $(a,b)$ are typically set as those that minimize log-loss over calibration data or equivalently maximize log-likelihood under the model $y_{i}\stackrel{\mathrm{iid}}{\sim}\mathrm{Bernoulli}(m^{a,b}(f(\mathbf{x}_{i})))$ , on the held-out data.
28
+
29
+ Although a myriad of recalibration methods now exist, PS remains an empirically strong baseline. In particular, PS is effective when few samples are available for recalibration (Niculescu-Mizil and Caruana, 2005; Gupta and Ramdas, 2021). Scaling before subsequent binning has emerged as a useful methodology (Kumar et al., 2019; Zhang et al., 2020). Multiclass adaptations of PS, called temperature, vector, and matrix scaling have become popular (Guo et al., 2017). Being a parametric method, however, PS comprises a limited family of post-hoc corrections—for instance, since $m^{a,b}$ is always a monotonic transform, PS must fail even for i.i.d. data for some data-generating distributions (see Gupta et al. (2020) for a formal proof). Furthermore, we are interested in going beyond i.i.d. data to data with drifting/shifting distribution. This brings us to our first question,
30
+
31
+ # (Q1) Can PS be extended to handle shifting or drifting data distributions?
32
+
33
+ A separate view of calibration that pre-dates the ML post-hoc calibration literature is the online adversarial calibration
34
+
35
+ ![](images/05253a02c5d25544204a4a4c92e15ff2a31819628f628b9becac9cdf730e79a6.jpg)
36
+ (a) Platt scaling
37
+
38
+ ![](images/c87a118f6e87bae54c2f362e527b917c76521a58f21dfd82c9d49e0eb89c59fd.jpg)
39
+ (b) Online logistic regression
40
+
41
+ ![](images/b3f1287c8f61f7e8628a607837f76322190cc0810dbf99b45debab65a96a8abd.jpg)
42
+ (c) Calibating applied to online Platt scaling
43
+
44
+ framework (DeGroot and Fienberg, 1981; Foster and Vohra, 1998). Through the latter work, we know that calibration can be achieved for arbitrary $y_{t}$ sequences without relying on a pretrained model $f$ or doing any other modeling over available features. This is achieved by hedging or randomizing over multiple probabilities, so that "the past track record can essentially only improve, no matter the future outcome" (paraphrased from Foster and Hart (2021)). For interesting classification problems, however, the $y_{t}$ sequence is far from adversarial and informative covariates $\mathbf{x}_{t}$ are available. In such settings, covariate-agnostic algorithms achieve calibration by predicting something akin to an average $\sum_{s=1}^{t} y_{s} / t$ at time $t + 1$ (see Appendix D). Such a prediction, while calibrated, is arguably not useful. A natural question is:
45
+
46
+ (Q2) Can informative covariates (features) be used to make online adversarial calibration practical?
47
+
48
+ We find an answer to (Q1) and (Q2) by leveraging the recently developed framework of calibating (Foster and Hart, 2023), which is illustrated in Figure 1c. Calibating shows how to perform certain corrections on top of pre-existing expert forecasts to improve (calibeat) them. The key calibrating idea relevant to our study is that adversarial calibration techniques can be used to simultaneously beat an expert and be provably calibrated.
49
+
50
+ For the sequential problem of being calibrated for a stream $(\mathbf{x}_t, y_t)_{t \geqslant 1}$ , where is one to find an expert forecaster that is both covariate-based and time-adaptive? One possibility is a time-series model—a sequence of predictors $(f_t : \mathcal{X} \to [0,1])_{t \geqslant 1}$ that are updated as more data becomes available, potentially using autoregression. Our forthcoming proposal is simpler and arguably requires less (domain) expertise.
51
+
52
+ # 1.1 Online adversarial post-hoc calibration
53
+
54
+ The proposal, summarized in Figure 2, is as follows. First, train any probabilistic classifier $f$ on some part of the data. Then, perform online post-hoc calibration on top of $f$ to get
55
+
56
+ ![](images/f09ebff75d9ae5b84d428bd049359a580d1fa94142cf96bf371f3276e8548ec1.jpg)
57
+ Figure 1: The combination of Platt scaling and online logistic regression yields Online Platt Scaling (OPS). Calibating is applied on top of OPS to achieve further empirical improvements and theoretical validity.
58
+ Figure 2: Online adversarial post-hoc calibration.
59
+
60
+ online adaptivity. In effect, this amounts to viewing $f(\mathbf{x}_t)$ as a scalar "summary" of $\mathbf{x}_t$ , and the post-hoc mapping $(m_t : [0,1] \to [0,1])_{t \geqslant 1}$ becomes the time-series model over the scalar feature $f(\mathbf{x}_t)$ . Finally, apply calibating on the post-hoc predictions $m_t(f(\mathbf{x}_t))$ to obtain adversarial validity. Figure 2 highlights our choice to do both post-hoc calibration and calibating simultaneously on the streaming test data $(\mathbf{x}_t, y_t)_{t \geqslant 1}$ .
61
+
62
+ Such an online version of post-hoc calibration has not been previously studied to the best of our knowledge. We show how one would make PS online, to obtain Online Platt Scaling (OPS). OPS relies on a simple but crucial observation: PS is a two-dimensional logistic regression problem over "pseudo-features" $\mathrm{logit}(f(\mathbf{x}_t))$ . Thus the problem of learning OPS parameters is the problem of online logistic regression (OLR, see Figure 1b for a brief description). Several regret minimization algorithms have been developed for OLR (Hazan et al., 2007; Foster et al., 2018; Jézquel et al., 2020). We consider these and find an algorithm with optimal regret guarantees that runs in linear time. These regret guarantees imply that OPS is guaranteed to perform as well as the best fixed PS model in hindsight for an arbitrarily distributed online stream $(\mathbf{x}_t, y_t)_{t \geqslant 1}$ , which includes the entire range of distribution drifts—i.i.d. data, data with covariate/label drift, and adversarial data. We next present illustrative experiments where this theory bears out impressively in practice.
63
+
64
+ Then, Section 2 presents OPS, Section 3 discusses calibating, Section 4 presents baseline experiments on synthetic and real-world datasets. Section 5 discusses the extension of all OPS ideas to a post-hoc technique called beta scaling.
65
+
66
+ ![](images/28677c8e73ed4bcc5797eb0f4bb20c5fc8c70f52fa664b069c8cd41e951d99e5.jpg)
67
+
68
+ ![](images/0f180261fe46afb56197b4c68a2f461e950871cad5ff2edff3820dedc918e7e6.jpg)
69
+ True probabilities
70
+ Fixed base model
71
+ - - - OPS model at start of time interval
72
+ - Histogram of $X_{t}$ values in time interval
73
+
74
+ ![](images/13122a50b69b5058d6f0894c4bb55a7b9f77b7bd645aa82eeaff4ab8877679de.jpg)
75
+ Figure 3: The adaptive behavior of Online Platt scaling (OPS) for the covariate drift dataset described in Section 1.2. The title of each panel indicates the time-window that panel corresponds to. The histogram of $X_{t}$ values in the corresponding time window is plotted with maximum height normalized to 1. Also plotted is the true curve for $\operatorname*{Pr}(Y = 1\mid X = x)$ and two predictive curves: a base model trained on $t = 1$ to $t = 1000$ , and OPS-calibrated models with parameter values fixed at the start of the time window. The base model is accurate for the training data which is mostly in [−5, 10], but becomes inaccurate and miscalibrated with the covariate-shifted values for larger $t$ (bottom two subplots). OPS adapts well, agreeing with the base model in the top-right subplot, but flipping the base model predictions in the bottom-right subplot.
76
+
77
+ ![](images/603aedd11e1befd17a1a276c7f24dd889770c4dbb2245309ab2eb2166b10623c.jpg)
78
+
79
+ <table><tr><td>t</td><td>Model</td><td>Acc ↑</td><td>CE ↓</td></tr><tr><td>1—1000</td><td>Base</td><td>88.00%</td><td>0.1</td></tr><tr><td rowspan="2">1501—2000</td><td>Base</td><td>81.20%</td><td>0.18</td></tr><tr><td>OPS</td><td>81.68%</td><td>0.19</td></tr><tr><td rowspan="2">3501—4000</td><td>Base</td><td>43.12%</td><td>0.55</td></tr><tr><td>OPS</td><td>62.16%</td><td>0.36</td></tr><tr><td rowspan="2">5501—6000</td><td>Base</td><td>23.60%</td><td>0.64</td></tr><tr><td>OPS</td><td>87.76%</td><td>0.13</td></tr></table>
80
+
81
+ (a) Accuracy and calibration error (CE) values of the base model and OPS for indicated values of $t$ .
82
+
83
+ # 1.2 Illustrative experiments with distribution drift
84
+
85
+ Covariate drift. We generated data as follows. For $t = 1,2,\ldots ,6000$
86
+
87
+ $$
88
+ X _ {t} \sim \mathcal {N} ((t - 1) / 2 5 0, 4);
89
+ $$
90
+
91
+ $$
92
+ Y _ {t} | X _ {t} \sim \left\{ \begin{array}{l l} \operatorname {B e r} (0. 1) & \text {i f} \bmod (\lfloor X _ {t} / 5 \rfloor , 2) = 0, \\ \operatorname {B e r} (0. 9) & \text {i f} \bmod (\lfloor X _ {t} / 5 \rfloor , 2) = 1. \end{array} \right. \tag {3}
93
+ $$
94
+
95
+ Thus the distribution of $Y_{t}$ given $X_{t}$ is a fixed periodic function, but the distribution of $X_{t}$ drifts over time. The solid yellow line in Figure 3 plots $\operatorname{Pr}(Y = 1 \mid X = x)$ against $x$ . We featurized $x$ as a 48-dimensional vector with the components $\sin \left( \frac{x}{\text{freq}} + \text{translation} \right)$ , where $\text{freq} \in \{1, 2, 3, 4, 5, 6\}$ and translation $\in \{0, \pi/4, \pi/2, \dots, 7\pi/4\}$ .
96
+
97
+ A logistic regression base model $f$ is trained over this 48-dimensional representation using the points $(X_{t}, Y_{t})_{t=1}^{1000}$ , randomly permuted and treated as a single batch of exchangeable points, which we will call training points. The points $(X_{t}, Y_{t})_{t=1001}^{6000}$ form a supervised non-exchangeable test stream: we use this stream to evaluate $f$ , recalibrate $f$ using OPS, and evaluate the OPS-calibrated model.
98
+
99
+ Figure 3 displays $f$ and the recalibrated OPS models at four ranges of $t$ (one per plot). The training data has most $x_{t}$ -values in the range $[-5,10]$ as shown by the (height-normalized) histogram in the top-left plot. In this regime,
100
+
101
+ $f$ is visually accurate and calibrated—the dotted light blue line is close to the solid yellow truth. We now make some observations at three test-time regimes of $t$ :
102
+
103
+ (a) $t = 1501$ to $t = 2000$ (the histogram shows the distribution of $(x_{t})_{t=1501}^{2000}$ ). For these values of $t$ , the test data is only slightly shifted from the training data, and $f$ continues to perform well. The OPS model recognizes the good performance of $f$ and does not modify it much.
104
+ (b) $t = 3500$ to $t = 4000$ . Here, $f$ is "out-of-phase" with the true distribution, and Platt scaling is insufficient to improve $f$ by a lot. OPS recognizes this, and it offers slightly better calibration and accuracy by making less confident predictions between 0.2 and 0.4.
105
+ (c) $t = 5500$ to $t = 6000$ . In this regime, $f$ makes predictions opposing reality. Here, the OPS model flips the prediction, achieving high accuracy and calibration.
106
+
107
+ These observations are quantitatively supported by the accuracy and $\ell_1$ -calibration error (CE) values reported by the table in Figure 3a. Accuracy and CE values are estimated using the known true distribution of $Y_{t} \mid X_{t}$ and the observed $X_{t}$ values, making them unbiased and avoiding some well-known issues with CE estimation. More details are provided in Appendix A.2.
108
+
109
+ Label drift. For $t = 1,2,\ldots ,{6000}$ ,data is generated as:
110
+
111
+ ![](images/364974668fcdd7eac807ce07eaeca56f17527a480c59b6256a44a78f6d712f8f.jpg)
112
+
113
+ ![](images/9be1f5443d83d7d0f54cb010c4b622ea1029325912b734c9a7c74b6c3959427e.jpg)
114
+
115
+ ![](images/33abf37745d17fa8bbf8ff88c9c84ff7e0b16ff640312353ac830e626b5d5328.jpg)
116
+
117
+ ![](images/6c41322c078dd36893af235b08378ebd0f6bbd31c029dc937c4b8dcd931bfd3f.jpg)
118
+ (a) OPS with label drift.
119
+
120
+ ![](images/d2df561663615d8ebed93cca00ff7eb9ccee49d5df98bbc8c5ec890877a7c2e3.jpg)
121
+ Figure 4: The adaptive behavior of OPS for the simulated label shift and regression-function drift datasets described in Section 1.2. For more details on the contents of the figure, please refer to Figure 3. The improvement in calibration and accuracy of OPS over the base model is visually apparent, but for completeness, {Acc, CE} values are reported in the Appendix as part of Figures 10 and 11.
122
+
123
+ ![](images/fe9bebd183f28436013f3a637e09b5ab3894744a001448d3b68a699d78ebbe68.jpg)
124
+
125
+ ![](images/88017adf5bdda17f25e9b3abe0f1ae7ee78a48e4bd6d79ff6ee476fb8f354efc.jpg)
126
+
127
+ ![](images/0eec5c613dacc2d981511daed9343dacbb8a548009167e47c7b820a3312cebe7.jpg)
128
+ (b) OPS with regression-function drift.
129
+
130
+ ![](images/55a60fe3973827ca9046af4f5e0deb5297a4f3440377c2acf1df43d339d12c92.jpg)
131
+
132
+ $$
133
+ Y _ {t} \sim \operatorname {B e r n o u l l i} (0. 9 5 (1 - \alpha_ {t}) + 0. 0 5 \alpha_ {t}),
134
+ $$
135
+
136
+ $$
137
+ \text {w h e r e} \alpha_ {t} = (t - 1) / 6 0 0 0); \tag {4}
138
+ $$
139
+
140
+ $$
141
+ X _ {t} \mid Y _ {t} \sim \mathbb {1} \left\{Y _ {t} = 0 \right\} \mathcal {N} (0, 1) + \mathbb {1} \left\{Y _ {t} = 1 \right\} \mathcal {N} (2, 1).
142
+ $$
143
+
144
+ Thus, $X_{t} \mid Y_{t}$ is fixed while the label distribution drifts. We follow the same training and test splits described in the covariate drift experiment, but without sinusoidal featurization of $X_{t}$ ; the base logistic regression model is trained directly on the scalar $X_{t}$ 's. The gap between $f$ and the true model increases over time but OPS adapts well (Figure 4a).
145
+
146
+ Regression-function drift. For $t = 1,2,\ldots ,{6000}$ ,the data is generated as follows: ${\alpha }_{t} = \left( {t - 1}\right) /{5000}$ ,
147
+
148
+ $$
149
+ X _ {t} \sim \mathcal {N} (0, 1 0) \text {a n d} Y _ {t} | X _ {t} \sim \operatorname {B e r n o u l l i} \left(p _ {t}\right), \text {w h e r e} \tag {5}
150
+ $$
151
+
152
+ $$
153
+ p _ {t} = \left\{ \begin{array}{l l} 0. 1 (1 - \alpha_ {t}) + 0. 5 \alpha_ {t} & \text {i f m o d (\lfloor X _ {t} / 5 \rfloor , 2) = 0}, \\ 0. 9 (1 - \alpha_ {t}) + 0. 5 \alpha_ {t} & \text {i f m o d (\lfloor X _ {t} / 5 \rfloor , 2) = 1}. \end{array} \right.
154
+ $$
155
+
156
+ Thus the distribution of $X_{t}$ is fixed, but the regression function $\operatorname{Pr}(Y_t = 1 \mid X_t)$ drifts over time. We follow the same training and test splits described in the covariate drift experiment, as well as the 48-dimensional featurization and logistic regression modeling. The performance of the base model worsens over time, while OPS adapts (Figure 4b).
157
+
158
+ # 2 Online Platt scaling (OPS)
159
+
160
+ In a batch post-hoc setting, the Platt scaling parameters are set to those that minimize log-loss over the calibration data. If we view the first $t$ instances in our stream as the calibration data, the fixed-batch Platt scaling parameters are,
161
+
162
+ $$
163
+ \left(\widehat {a} _ {t}, \widehat {b} _ {t}\right) = \underset {(a, b) \in \mathbb {R} ^ {2}} {\arg \min } \sum_ {s = 1} ^ {t} l \left(m ^ {a, b} \left(f \left(\mathbf {x} _ {s}\right)\right), y _ {s}\right), \tag {6}
164
+ $$
165
+
166
+ where $l(p, y) = -y \log p - (1 - y) \log (1 - p)$ and $m^{a,b}$ is defined in (2). Observe that this is exactly logistic regression over the dataset $(\mathrm{logit}(f(\mathbf{x}_s)), y_s)^t_{s=1}$ .
167
+
168
+ The thesis of OPS is that as more data is observed over time, we should use it to update the Platt scaling parameters. Define $p_t^{\mathrm{OPS}} \coloneqq m^{a_t, b_t}(f(\mathbf{x}_t))$ , where $(a_t, b_t)$ depends on $\{(f(\mathbf{x}_1), y_1), \ldots, (f(\mathbf{x}_{t-1}), y_{t-1})\}$ . One way to compare methods in this online setting is to consider regret $R_T$ with respect to a reference $\ell_2$ -ball of radius $B$ , $\mathcal{B} \coloneqq \{(a, b) \in \mathbb{R}^2 : a^2 + b^2 \leqslant B^2\}$ :
169
+
170
+ $$
171
+ R _ {T} = \sum_ {t = 1} ^ {T} l \left(p _ {t} ^ {\mathrm {O P S}}, y _ {t}\right) - \min _ {(a, b) \in \mathcal {B}} \sum_ {t = 1} ^ {T} l \left(m ^ {a, b} \left(f \left(\mathbf {x} _ {t}\right)\right), y _ {t}\right). \tag {7}
172
+ $$
173
+
174
+ $R_{T}$ is the difference between the total loss incurred when playing $(a_{t},b_{t})$ at times $t\leqslant T$ and the total loss incurred when playing the single optimal $(a,b)\in \mathcal{B}$ for all $t\leqslant T$ . Typically, we are interested in algorithms that have low $R_{T}$ irrespective of how $(\mathbf{x}_t,y_t)$ is generated.
175
+
176
+ # 2.1 Logarithmic worst-case regret bound for OPS
177
+
178
+ OPS regret minimization is exactly online logistic regression (OLR) regret minimization over "pseudo-features" $\mathrm{logit}(f(\mathbf{x}_t))$ . Thus our OPS problem is immediately solved
179
+
180
+ <table><tr><td>Algorithm</td><td>Regret</td><td>Running time</td></tr><tr><td>Online Gradient Descent (OGD) (Zinkevich, 2003)</td><td>B√T</td><td>T</td></tr><tr><td>Online Newton Step (ONS) (Hazan et al., 2007)</td><td>eB log T</td><td>T</td></tr><tr><td>AIOLI (Jézéquel et al., 2020)</td><td>B log(BT)</td><td>T log T</td></tr><tr><td>Aggregating Algorithm (AA) (Vovk, 1990; Foster et al., 2018)</td><td>log(BT)</td><td>B18T24</td></tr></table>
181
+
182
+ Table 1: Asymptotic regret and running times of online logistic regression (OLR) algorithms for OPS as functions of the radius of reference class $B$ and time-horizon $T$ . For general OLR, regret and running times also depend on the dimension of $\mathcal{X}$ . However, OPS effectively reduces the dimensionality of $\mathcal{X}$ to 2, so that a second-order method like ONS runs almost as fast as a first-order method like OGD. Also note that $B = \sqrt{a^2 + b^2}$ is small if the base model $f$ is not highly miscalibrated. ONS with fixed hyperparameters was chosen for all OPS experiments; see Section 2.2 for implementation details.
183
+
184
+ using OLR methods. A number of OLR methods have been proposed, and we consider their regret guarantees and running times for the OPS problem. These bounds typically depend on $T$ and two problem-dependent parameters: the dimension (say $d$ ) and $B$ , the radius of $\mathcal{B}$ .
185
+
186
+ 1. In our case, $d = 2$ since there is one feature $\operatorname{logit}(f(\mathbf{x}))$ and a bias term. Thus $d$ is a constant.
187
+ 2. $B$ could technically be large, but in practice, if $f$ is not highly miscalibrated, we expect small values of $a$ and $b$ which would in turn lead to small $B$ . This was true in all our experiments.
188
+
189
+ Regret bounds and running times for candidate OPS methods are presented in Table 1, which is an adaptation of Table 1 of Jézéquel et al. (2020) with all poly $(d)$ terms removed. Based on this table, we identify AIOLI and Online Newton Step (ONS) as the best candidates for implementing OPS, since they both have $O(\log T)$ regret and $\tilde{O}(T)$ running time. In the following theorem, we collect explicit regret guarantees for OPS based on ONS and AIOLI. Since the log-loss can be unbounded if the predicted probability equals 0 or 1, we require some restriction on $f(\mathbf{x}_t)$ .
190
+
191
+ Theorem 2.1. Suppose $\forall t, f(\mathbf{x}_t) \in [0.01, 0.99]$ , $B \geqslant 1$ , and $T \geqslant 10$ . Then, for any sequence $(\mathbf{x}_t, y_t)_{t=1}^T$ , OPS based on ONS satisfies
192
+
193
+ $$
194
+ R _ {T} (O N S) \leqslant 2 \left(e ^ {B} + 1 0 B\right) \log T + 1, \tag {8}
195
+ $$
196
+
197
+ and OPS based on AIOLI satisfies
198
+
199
+ $$
200
+ R _ {T} (A I O L I) \leqslant 2 2 B \log (B T). \tag {9}
201
+ $$
202
+
203
+ The proof is in Appendix E. Since log-loss is a proper scoring rule (Gneiting and Raftery, 2007), minimizing it has implications for calibration (Brocker, 2009). However, no "absolute" calibration bounds can be shown for OPS, as discussed shortly in Section 2.4.
204
+
205
+ # 2.2 Hyperparameter-free ONS implementation
206
+
207
+ In our experiments, we found ONS to be significantly faster than AIOLI while also giving better calibration. Further, ONS worked without any hyperparameter tuning after an
208
+
209
+ initial investigation was done to select a single set of hyperparameters. Thus we used ONS for experiments based on a verbatim implementation of Algorithm 12 in Hazan (2016), with $\gamma = 0.1$ , $\rho = 100$ , and $\mathcal{K} = \{(a,b) : \| (a,b)\|_2 \leqslant 100\}$ . Algorithm 1 in the Appendix contains pseudocode for our final OPS implementation.
210
+
211
+ # 2.3 Follow-The-Leader as a baseline for OPS
212
+
213
+ The Follow-The-Leader (FTL) algorithm sets $(a_{t},b_{t}) = (\hat{a}_{t - 1},\hat{b}_{t - 1})$ (defined in (6)) for $t\geqslant 1$ . This corresponds to solving a logistic regression optimization problem at every time step, making the overall complexity of FTL $\Omega (T^2)$ . Further, FTL has $\Omega (T)$ worst-case regret. Since full FTL is intractably slow to implement even for an experimental comparison, we propose to use a computationally cheaper variant, called Windowed Platt Scaling (WPS). In WPS the optimal parameters given all current data, $(\hat{a}_t,\hat{b}_t)$ , are computed and updated every $O(100)$ steps instead of at every time step. We call this a window and the exact size of the window can be data-dependent. The optimal parameters computed at the start of the window are used to make predictions until the end of that window, then they are updated for the next window. This heuristic version of FTL performs well in practice (Section 4).
214
+
215
+ # 2.4 Limitations of regret analysis
216
+
217
+ Regret bounds are relative to the best in class, so Theorem 2.1 implies that OPS will do no worse than the best Platt scaling model in hindsight. However, even for i.i.d. data, the best Platt scaling model is itself miscalibrated on some distributions (Gupta et al., 2020, Theorem 3). This latter result shows that some form of binning must be deployed to be calibrated for arbitrarily distributed i.i.d. data. Further, if the data is adversarial, any deterministic predictor can be rendered highly miscalibrated (Oakes, 1985; Dawid, 1985); a simple strategy is to set $y_{t} = \mathbb{1}\left\{p_{t}\leqslant 0.5\right\}$ . In a surprising seminal result, Foster and Vohra (1998) showed that adversarial calibration is possible by randomizing/hedging between different bins. The following section shows how one can perform such binning and hedging on top of OPS,
218
+
219
+ based on a technique called calibeating.
220
+
221
+ # 3 Calibating the OPS forecaster
222
+
223
+ Calibating (Foster and Hart, 2023) is a technique to improve or "beat" an expert forecaster. The idea is to first use the expert's forecasts to allocate data to representative bins. Then, the bins are treated nominally: they are just names or tags for "groups of data-points that the expert suggests are similar". The final forecasts in the bins are computed using only the outcome $(y_{t})$ values of the points in the bin (seen so far), with no more dependence on the expert's original forecast. The intuition is that forecasting inside each bin can be done in a theoretically valid sense, irrespective of the theoretical properties of the expert.
224
+
225
+ We will use the following "ε-bins" to perform calibating:
226
+
227
+ $$
228
+ B _ {1} = [ 0, \epsilon), B _ {2} = [ \epsilon , 2 \epsilon), \dots , B _ {m} = [ 1 - \epsilon , 1 ]. \tag {10}
229
+ $$
230
+
231
+ Here $\epsilon > 0$ is the width of the bins, and for simplicity we assume that $m = 1 / \epsilon$ is an integer. For instance, one could set $\epsilon = 0.1$ or the number of bins $m = 10$ , as we do in the experiments in Section 4. Two types of calibrating—tracking and hedging—are described in the following subsections. We suggest recalling our illustration of calibrating in the introduction (Figure 1c).
232
+
233
+ # 3.1 Calibeating via tracking past outcomes in bins
234
+
235
+ Say at some $t$ , the expert forecasts $p_t \in [0.7, 0.8)$ . We look at the instances $s < t$ when $p_s \in [0.7, 0.8)$ and compute
236
+
237
+ $$
238
+ \bar {y} _ {t - 1} ^ {b} = \text {A v e r a g e} \left\{y _ {s}: s < t, p _ {s} \in [ 0. 7, 0. 8) \right\}.
239
+ $$
240
+
241
+ Suppose we find that $\bar{y}_{t-1}^b = 0.85$ . That is, when the expert forecasted bin $[0.7, 0.8)$ in the past, the average outcome was 0.85. A natural idea now is to forecast 0.85 instead of 0.75. We call this process "Tracking", and it is the form of calibrating discussed in Section 4 of Foster and Hart (2023). In our case, we treat OPS as the expert and call the tracking version of OPS as TOPS. If $p_t^{\mathrm{OPS}} \in B_b$ , then
242
+
243
+ $$
244
+ p _ {t} ^ {\mathrm {T O P S}} := \text {A v e r a g e} \left\{y _ {s}: s < t, p _ {s} ^ {\mathrm {O P S}} \in B _ {b} \right\}. \tag {11}
245
+ $$
246
+
247
+ The average is defined as the mid-point of $B_{b}$ if the set above is empty.
248
+
249
+ Foster and Hart (2023) showed that the Brier-score of the TOPS forecasts $p_t^{\mathrm{TOPS}}$ , defined as $\frac{1}{T}\sum_{t=1}^{T}(y_t - p_t^{\mathrm{TOPS}})^2$ , is better than the corresponding Brier-score of the OPS forecasts $p_t^{\mathrm{OPS}}$ , by roughly the squared calibration error of $p_t^{\mathrm{OPS}}$ (minus a log $T$ term). In the forthcoming Theorem 3.1, we derive a result for a different object that is often of interest in post-hoc calibration, called sharpness.
250
+
251
+ # 3.2 Segue: defining sharpness of forecasters
252
+
253
+ Recall the $\epsilon$ -bins introduced earlier (10). Define $N_{b} = |\{t \leqslant T : p_{t} \in B_{b}\}|$ and $\hat{y}_{b} = \frac{1}{N_{b}} \sum_{t \leqslant T, p_{t} \in B_{b}} y_{t}$ if $N_{b} > 0$ , else $\hat{y}_{b} = 0$ . Sharpness is defined as,
254
+
255
+ $$
256
+ \operatorname {S H P} \left(p _ {1: T}\right) := \frac {1}{T} \sum_ {b = 1} ^ {m} N _ {b} \cdot \hat {y} _ {b} ^ {2}. ^ {2} \tag {12}
257
+ $$
258
+
259
+ If the forecaster is perfectly knowledgeable and forecasts $p_t = y_t$ , its SHP equals $\sum_{t=1}^{T} y_t / T =: \bar{y}_T$ . On the other hand, if the forecaster puts all points into a single bin $b$ , its SHP equals $(\sum_{t=1}^{T} y_t / T)^2 = \bar{y}_T^2$ . The former forecaster is precise or sharp, while the latter is not, and SHP captures this—it can be shown that $\bar{y}_T^2 \leqslant \mathrm{SHP}(p_{1:T}) \leqslant \bar{y}_T$ . We point the reader to Bröcker (2009) for further background. One of the goals of effective forecasting is to ensure high sharpness (Gneiting et al., 2007). OPS achieves this goal by relying on the log-loss, a proper scoring rule. The following theorem shows that TOPS suffers a small loss in SHP compared to OPS.
260
+
261
+ Theorem 3.1. The sharpness of TOPS forecasts satisfies
262
+
263
+ $$
264
+ S H P \left(p _ {1: T} ^ {T O P S}\right) \geqslant S H P \left(p _ {1: T} ^ {O P S}\right) - \epsilon - \frac {\epsilon^ {2}}{4} - \frac {\log T + 1}{\epsilon T}. \tag {13}
265
+ $$
266
+
267
+ The proof (in Appendix E) uses Theorem 3 of Foster and Hart (2023) and relationships between sharpness, Briescore, and a quantity called refinement. If $T$ is fixed and known, setting $\epsilon \approx \sqrt{\log T / T}$ (including constant factors), or equivalently, the number of bins $B\approx \sqrt{T / \log T}$ gives a rate of $\widetilde{O} (\sqrt{1 / T})$ for the SHP difference term. While we do not show a calibration guarantee, TOPS had the best calibration performance in most experiments (Section 4)
268
+
269
+ # 3.3 Calibating via hedging or randomized prediction
270
+
271
+ All forecasters introduced so far—the base model $f$ , OPS, and TOPS—make forecasts $p_t$ that are deterministic given the past data until time $t - 1$ . If the $y_t$ sequence is being generated by an adversary that acts after seeing $p_t$ , then the adversary can ensure that each of these forecasters is miscalibrated by setting $y_t = \mathbb{1}\{p_t \leqslant 0.5\}$ .
272
+
273
+ Suppose instead that the forecaster is allowed to hedge—randomize and draw the forecast from a distribution instead of fixing it to a single value—and the adversary only has access to the distribution and not the actual $p_t$ . Then there exist hedging strategies that allow the forecaster to be arbitrarily well-calibrated (Foster and Vohra, 1998). In fact, Foster (1999, henceforth F99) showed that this can be done while hedging between two arbitrarily close points in [0, 1].
274
+
275
+ In practice, outcomes are not adversarial, and covariates are available. A hedging algorithm that does not use covariates cannot be expected to give informative predictions. We verify this intuition through an experiment in Appendix on historical rain data D—F99's hedging algorithm simply predicts the average $y_{t}$ value in the long run.
276
+
277
+ A best-of-both-worlds result can be achieved by using the expert forecaster to bin data using $\mathbf{x}_t$ values, just like we did in Section 3.1. Then, inside every bin, a separate hedging algorithm is instantiated. For the OPS predictor, this leads to HOPS (OPS + hedging). Specifically, in our experiments and the upcoming calibration error guarantee, we used F99:
278
+
279
+ $$
280
+ p _ {t} ^ {\text {H O P S}} := \mathrm {F 9 9} \left(y _ {s}: s < t, p _ {s} \in B _ {b}\right). \tag {14}
281
+ $$
282
+
283
+ A standalone description of F99 is included in Appendix C. F99 hedges between consecutive mid-points of the $\epsilon$ -bins defined earlier (10). The only hyperparameter for F99 is $\epsilon$ . In the experiments in the main paper, we set $\epsilon = 0.1$ . To be clear, $p_t$ is binned on the $\epsilon$ -bins, and the hedging inside each bin is again over the $\epsilon$ -bins.
284
+
285
+ The upcoming theorem shows a SHP lower bound on HOPS. In addition, we show an assumption-free upper bound on the $(\ell_{1} - )$ calibration error, defined as
286
+
287
+ $$
288
+ \mathrm {C E} \left(p _ {1: T}\right) := \frac {1}{T} \sum_ {b = 1} ^ {m} N _ {b} \cdot \left| \hat {p} _ {b} - \hat {y} _ {b} \right|, \tag {15}
289
+ $$
290
+
291
+ where $N_{b},\widehat{y}_{b}$ were defined in Section 3.2, and $\widehat{p}_b = \frac{1}{N_b}\sum_{t\leqslant T,p_t\in B_b}p_t$ , if $N_{b} > 0$ , else $\widehat{p}_b =$ mid-point $(B_{b})$ - Achieving small CE is one formalization of (1). The following result is conditional on the $y_{1:T},p_{1:T}^{\mathrm{OPS}}$ sequences. The expectation is over the randomization in F99.
292
+
293
+ Theorem 3.2. For adversarially generated data, the expected sharpness of HOPS forecasts using the forecast hedging algorithm of Foster (1999) is lower bounded as
294
+
295
+ $$
296
+ \mathbb {E} \left[ S H P \left(p _ {1: T} ^ {H O P S}\right) \right] \geqslant S H P \left(p _ {1: T} ^ {O P S}\right) - \left(\epsilon + \frac {\log T + 1}{\epsilon^ {2} T}\right), \tag {16}
297
+ $$
298
+
299
+ and the expected calibration error of HOPS satisfies,
300
+
301
+ $$
302
+ \mathbb {E} \left[ C E \left(p _ {1: T} ^ {H O P S}\right) \right] \leqslant \epsilon / 2 + 2 \sqrt {1 / \epsilon^ {2} T}. \tag {17}
303
+ $$
304
+
305
+ The proof in Appendix E is based on Theorem 5 of Foster and Hart (2023) and a CE bound for F99 based on Blackwell approachability (Blackwell, 1956). With $\epsilon = \widetilde{\Theta}(T^{-1/3})$ , the difference term in the SHP bound is $\widetilde{O}(T^{-1/3})$ and with $\epsilon = \widetilde{\Theta}(T^{-1/4})$ , the CE bound is $\widetilde{O}(T^{-1/4})$ . Compare this to the usual CE rate without calibrating of $O(T^{-1/3})$ (Foster and Vohra, 1998). High-probability versions of (17) can be derived using probabilistic Blackwell approachability lemmas, such as those in Perchet (2014).
306
+
307
+ # 4 Experiments
308
+
309
+ We perform experiments with synthetic and real-data, in i.i.d. and distribution drift setting. Code to reproduce the experiments can be found at https://github.com/aigen/df-posthoc-calibration (see Appendix A.4 for more details). All baseline and proposed methods are described in Collection 1 on the following page. In each experiment, the base model $f$ was a random forest (sklearn's
310
+
311
+ Collection 1. Proposed and baseline methods for online post-hoc calibration. Final forecasts are identified in blue.
312
+
313
+ Input: $f:\mathcal{X}\to [0,1]$ , any pre-learnt model
314
+
315
+ Input: $(\mathbf{x}_1,y_1),(\mathbf{x}_2,y_2),\ldots ,(\mathbf{x}_T,y_T)\in \mathcal{X}\times \{0,1\}$
316
+
317
+ Input: calibration-set-size $T_{\mathrm{cal}} < T$ , window-size $W$
318
+
319
+ Fixed Platt scaling: $(a^{\mathrm{FPS}}, b^{\mathrm{FPS}}) \gets (\hat{a}_{T_{\mathrm{cal}}}, \hat{b}_{T_{\mathrm{cal}}})$ (eq. 6)
320
+
321
+ Windowed Platt scaling: $(a^{\mathrm{WPS}}, b^{\mathrm{WPS}}) \gets (a^{\mathrm{FPS}}, b^{\mathrm{FPS}})$
322
+
323
+ Online Platt scaling: $(a_1^{\mathrm{OPS}}, b_1^{\mathrm{OPS}}) \gets (1, 0)$
324
+
325
+ for $t = 2$ to $T$ do
326
+
327
+ $(a_{t}^{\mathrm{OPS}},b_{t}^{\mathrm{OPS}})\gets \mathrm{ONS}((\mathbf{x}_{1},y_{1}),\ldots ,(\mathbf{x}_{t - 1},y_{t - 1}))$
328
+
329
+ (ONS is Algorithm 1 in the Appendix)
330
+
331
+ # end for
332
+
333
+ for $t = T_{\mathrm{cal}} + 1$ to $T$ do
334
+
335
+ $$
336
+ p _ {t} ^ {\mathrm {B M}} \leftarrow f (\mathbf {x} _ {t})
337
+ $$
338
+
339
+ $$
340
+ p _ {t} ^ {\mathrm {F P S}} \leftarrow \operatorname {s i g m o i d} \left(a ^ {\mathrm {F P S}} \cdot \operatorname {l o g i t} \left(f \left(\mathbf {x} _ {t}\right)\right) + b ^ {\mathrm {F P S}}\right)
341
+ $$
342
+
343
+ $$
344
+ p _ {t} ^ {\mathrm {W P S}} \leftarrow \text {s i g m o i d} \left(a ^ {\mathrm {W P S}} \cdot \operatorname {l o g i t} \left(f \left(\mathbf {x} _ {t}\right)\right) + b ^ {\mathrm {W P S}}\right)
345
+ $$
346
+
347
+ $$
348
+ p _ {t} ^ {\mathrm {O P S}} \leftarrow \operatorname {s i g m o i d} \left(a _ {t} ^ {\mathrm {O P S}} \cdot \operatorname {l o g i t} \left(f \left(\mathbf {x} _ {t}\right)\right) + b _ {t} ^ {\mathrm {O P S}}\right)
349
+ $$
350
+
351
+ $$
352
+ p _ {t} ^ {\text {T O P S}} \text {i s s e t u s i n g p a s t} \left(y _ {s}, p _ {s} ^ {\text {O P S}}\right) \text {v a l u e s a s i n (1 1)}
353
+ $$
354
+
355
+ $$
356
+ p _ {t} ^ {\text {H O P S}} \text {i s s e t u s i n g p a s t} \left(y _ {s}, p _ {s} ^ {\text {O P S}}\right) \text {v a l u e s a s i n (1 4)}
357
+ $$
358
+
359
+ $$
360
+ \text {I f} (t - T _ {\mathrm {c a l}}, W) = 0, \left(a ^ {\mathrm {W P S}}, b ^ {\mathrm {W P S}}\right) \leftarrow \left(\hat {a} _ {t}, \hat {b} _ {t}\right)
361
+ $$
362
+
363
+ # end for
364
+
365
+ implementation). All default parameters were used, except n_estimators was set to 1000. No hyperparameter tuning on individual datasets was performed for any of the recalibration methods.
366
+
367
+ Metrics. We measured the SHP and CE metrics defined in (12) and (15) respectively. Although estimating population versions of SHP and CE in statistical (i.i.d.) settings is fraught with several issues (Kumar et al. (2019); Roelofs et al. (2022) and several other works), our definitions target actual observed quantities which are directly interpretable without reference to population quantities.
368
+
369
+ Reading the plots. The plots we report show CE values at certain time-stamps starting from $T_{\mathrm{cal}} + 2W$ and ending at $T$ (see third line of Collection 1). $T_{\mathrm{cal}}$ and $W$ are fixed separately for each dataset (Table 2 in Appendix). We also generated SHP plots, but these are not reported since the drop in SHP was always very small.
370
+
371
+ # 4.1 Experiments on real datasets
372
+
373
+ We worked with four public datasets in two settings. Links to the datasets are in Appendix A.1.
374
+
375
+ Distribution drift. We introduced synthetic drifts in the data based on covariate values, so this is an instance of covariate drift. For example, in the bank marketing dataset (leftmost plot in Figure 5), the problem is to predict which clients are likely to subscribe to a term deposit if they are targeted for marketing, using covariates like age, education, and bank-balance. We ordered the available 12000 rows roughly by age by adding a random num
376
+
377
+ ![](images/0b0da0c12afbbd2ef9a14b3616cdfd12439f3dc62b75aa217e03c67c12d68658.jpg)
378
+
379
+ ![](images/a642fdfb6cf7ced532e8f24e7f66e67eb07fdb8b97ef8c6353c9b14ccdead4ba.jpg)
380
+ Figure 5: Drifting data. CE (calibration error) values over time of considered models on four datasets with synthetically induced drifts. The plots have invisible error bars since variation across the 100 runs was small. OPS consistently performs better than BM, FPS, and WPS, while TOPS is the best-performing among all methods across datasets and time. All methods had roughly the same SHP values at a given time-step, so the SHP plots are delayed to Appendix A (Figure 8).
381
+
382
+ ![](images/05f0c7729263451677a4ad0c736bf2bbca29f78ff4213305637766c9b57c749b.jpg)
383
+
384
+ ![](images/c266a956898e132a3bd16b68dc2a7b46d7315ecd0d8f27b1ae38b4d29e1495d3.jpg)
385
+
386
+ ![](images/920ede1e50d644f5e6cfc98e85e611129df955dc10516ce5930c81230955d5fd.jpg)
387
+
388
+ ber uniformly from $\{-1,0,1\}$ to age and sorting all the data. Training is done on the first 1000 points, $T_{\mathrm{cal}} = 1000$ and $W = 500$ . Similar drifts are induced for the other datasets, and $T_{\mathrm{cal}}, W$ values are set depending on the total number of points; further details are in Appendix A.1.
389
+
390
+ All simulations were performed 100 times and the average CE and SHP values with $\pm$ std-deviation errorbars were evaluated at certain time-steps. Thus, our lines correspond to estimates of the expected values of CE and SHP, as indicated by the Y-axis labels. We find that across datasets, OPS has the least CE among non-calibating methods, and both forms of calibating typically improve OPS further (Figure 5). Specifically, TOPS performs the best by a margin compared to other methods. We also computed SHP values, which are reported in Appendix A (Figure 8). The drop in SHP is insignificant in each case (around 0.005).
391
+
392
+ IID data. This is the usual batch setting formed by shuffling all available data. Part of the data is used for training and the rest forms the test-stream. We used the same values of $T_{\mathrm{cal}}$ and $W$ as those used in the data drift experiments (see Appendix A.1). In our experiments, we find that the gap in CE between BM, FPS, OPS, and WPS is smaller (Figure 6). However, TOPS performs the best in all scenarios, typically by a margin. Here too, the change in SHP was small, so those plots were delayed to Appendix A (Figure 9).
393
+
394
+ # 4.2 Synthetic experiments
395
+
396
+ In all experiments with real data, WPS performs almost as good as OPS. In this subsection, we consider some synthetic data drift experiments where OPS and TOPS continue performing well, but WPS performs much worse.
397
+
398
+ Covariate drift. Once for the entire process, we draw random orthonormal vectors $\mathbf{v}_1, \mathbf{v}_2 \in \mathbb{R}^{10}$ ( $\| \mathbf{v}_1 \|_2 = \| \mathbf{v}_2 \|_2 = 1$ , $\mathbf{v}_1^{\mathrm{T}} \mathbf{v}_2 = 0$ ), a random weight vector $\mathbf{w} \in \{-1, 1\}^{10 + \binom{10}{2}}$ with each component set to 1 or -1 independently with probability 0.5, and set a drift parameter $\delta \geqslant 0$ . The data is generated as follows:
399
+
400
+ $$
401
+ \mathbf {u} _ {t} = \mathbf {v} _ {1} \cos (\delta t) + \mathbf {v} _ {2} \sin (\delta t), X _ {t} \sim \mathcal {N} (\mathbf {0}, \mathcal {I} _ {1 0} + 1 0 \mathbf {u} _ {t} \mathbf {u} _ {t} ^ {\intercal}),
402
+ $$
403
+
404
+ $$
405
+ Y _ {t} \mid X _ {t} \sim \operatorname {B e r n o u l l i} (\mathrm {s i g m o i d} (\mathbf {w} ^ {\intercal} \tilde {X} _ {t})), \text {w h e r e}
406
+ $$
407
+
408
+ $$
409
+ \widetilde {X} _ {t} = \left[ \mathbf {x} _ {1}, \ldots , \mathbf {x} _ {1 0}, \mathbf {x} _ {1} \mathbf {x} _ {2}, \mathbf {x} _ {1} \mathbf {x} _ {3}, \ldots , \mathbf {x} _ {9} \mathbf {x} _ {1 0} \right] \in \mathbb {R} ^ {1 0 + \binom {1 0} {2}}.
410
+ $$
411
+
412
+ Thus the distribution of $Y_{t}$ given $X_{t}$ is fixed as a logistic model over the expanded representation $\tilde{X}_{t}$ that includes all cross-terms (this is unknown to the forecaster who only sees $X_{t}$ ). The features $X_{t}$ themselves are normally distributed with mean 0 and a time-varying covariance matrix. The principal component (PC) of the covariance matrix is a vector $\mathbf{u}_t$ that is rotating on the two-dimensional plane containing the orthonormal vectors $\mathbf{v}_1$ and $\mathbf{v}_2$ . The first 1000 points are used as training data, the remaining $T = 5000$ form a test-stream, and $W = 500$ . We report results in two settings: one is i.i.d., that is $\delta = 0$ , and the other is where the $\mathbf{u}$ for the first and last point are at a $180^{\circ}$ angle (Figure 7a).
413
+
414
+ Label drift. Given some $\delta > 0$ , $(X_{t}, Y_{t})$ is generated as:
415
+
416
+ $$
417
+ Y _ {t} \sim \operatorname {B e r n o u l l i} (0. 5 + \delta t),
418
+ $$
419
+
420
+ $$
421
+ X _ {t} \mid Y _ {t} \sim \mathbb {1} \left\{Y _ {t} = 0 \right\} \mathcal {N} (\mathbf {0}, \mathbb {R} ^ {1 0}) + \mathbb {1} \left\{Y _ {t} = 1 \right\} \mathcal {N} (\mathbf {e} _ {\mathbf {1}}, \mathbb {R} ^ {1 0}).
422
+ $$
423
+
424
+ Thus $P(Y_{1} = 1) = 0.5 + \delta$ and for the last test point, $P(Y_{6000} = 1) = 0.5 + 6000\delta$ . This final value can be set to control the extent of label drift; we show results with no drift (i.e., $\delta = 0$ , Figure 7b left) and $\delta$ set so that final bias $0.5 + 6000\delta = 0.9$ (Figure 7b right). The number of training points is 1000, $T = 5000$ , and $W = 500$ .
425
+
426
+ # 4.3 Changing $\epsilon$ , histogram binning, beta scaling
427
+
428
+ In Appendix A.3, we report versions of Figures 5, 6 with $\epsilon = 0.05$ , 0.2 (instead of $\epsilon = 0.1$ ) with similar conclusions (Figures 12, 13). We also perform comparisons with a windowed version of the popular histogram binning method (Zadrozny and Elkan, 2001) and online versions of the beta scaling method, as discussed in the forthcoming Section 5.
429
+
430
+ ![](images/7c678e35c5122f8bba92acba661079a6363c7ba5238a1d4533ea4aa4b29f2448.jpg)
431
+
432
+ ![](images/20b32b2cdbd74bf31dcc480a34f8b801b1464578f790f36e6625ee38d9492474.jpg)
433
+ Figure 6: IID data. CE values over time of considered models with four randomly shuffled (ie, nearly i.i.d.) datasets. The plots have invisible error bars since variation across runs was small. TOPS achieves the smallest values of CE throughout.
434
+
435
+ ![](images/afa3cc5404c9b76925fc3f31a3da173eb22bd269d52d99bfb5a8352597627bfb.jpg)
436
+
437
+ ![](images/bcba6345bdd7c315cd72f98471ac8057e73040c47a9f1f86619dbb4ab725c741.jpg)
438
+
439
+ ![](images/92ccfbf8f33418ca82ffc0e89172b5754aea5731c526bc4e7b26907845a7346f.jpg)
440
+
441
+ ![](images/4a5777567986397f67d2abf1c95ecc30de0d61cb549205e4bb8b013fb5f69714.jpg)
442
+ (a) Left plot: i.i.d. data, right plot: covariate drift.
443
+
444
+ ![](images/6b355b3df02d8d9bf3175f5183d6290ae76c4857eebddae2380bcb590051d0d2.jpg)
445
+
446
+ ![](images/251ed844a92b31e626a341926c0335f6ffe4e570d01a7077284bb41d7ccefc6f.jpg)
447
+ (b) Left plot: i.i.d. data, right plot: label drift.
448
+ Figure 7: Experiments with synthetic data. In all cases, TOPS has the lowest CE across time.
449
+
450
+ ![](images/78d002fa1daa31154d34beaf02edc2d0335cf57777b4e7e9f9d75274b4d61449.jpg)
451
+
452
+ # 5 Online beta scaling with calibating
453
+
454
+ A recalibration method closely related to Platt scaling is beta scaling (Kull et al., 2017). The beta scaling mapping $m$ has three parameters $(a,b,c)\in \mathbb{R}^3$ ,
455
+
456
+ $$
457
+ m _ {\text {b e t a}} ^ {a, b, c} (f (\mathbf {x})) := \operatorname {s i g m o i d} (a \cdot \log f (\mathbf {x}) + b \cdot \log (1 - f (\mathbf {x})) + c).
458
+ $$
459
+
460
+ Observe that enforcing $b = -a$ recovers Platt scaling since $\mathrm{logit}(z) = \log (z) - \log (1 - z)$ . The beta scaling parameters can be learnt following identical protocols as Platt scaling: (i) the traditional method of fixed batch post-hoc calibration akin to FPS, (ii) a natural benchmark of windowed updates akin to WPS, and (iii) regret minimization based method akin to OPS. This leads to the methods FBS, WBS, and OBS, replacing the "P" of Platt with the "B" of beta. Tracking + OBS (TOBS) and Hedging + OBS (HOBS) can be similarly derived. Further details on all beta scaling methods are in Appendix B, where we also report plots similar to Figures 5, 6 for beta scaling (Figure 14). In a comparison between histogram binning, beta scaling, Platt scaling, and their tracking versions, TOPS and TOBS are the best-performing methods across experiments (Figure 15).
461
+
462
+ # 6 Summary
463
+
464
+ We provided a way to bridge the gap between the online (typically covariate-agnostic) calibration literature, where data is assumed to be adversarial, and the (typically i.i.d.) post-hoc calibration literature, where the joint covariate-outcome distribution takes centerstage. The TOPS method we proposed has the lowest calibration error in all our experiments. The HOPS method provably controls miscalibration at any pre-defined level and could be a desirable choice in sensitive applications. The good performance of OPS+calibating lends further empirical backing to the thesis that scaling+binning methods perform well in practice, as has also been noted in prior works (Zhang et al., 2020; Kumar et al., 2019).
465
+
466
+ We note a few directions for future work. First, online algorithms that control regret on the most recent data have been proposed (Hazan and Seshadhri, 2009; Zhang et al., 2018). These approaches could give further improvements on ONS, particularly for drifting data. Second, while this paper entirely discusses calibration for binary classification, all binary routines can be lifted to achieve multiclass notions such as top-label or class-wise calibration (Gupta and Ramdas, 2022b). Alternatively, multiclass versions of Platt scaling (Guo et al., 2017) such as temperature and vector scaling can also be targeted directly using online multiclass logistic regression (Jézéquel et al., 2021).
467
+
468
+ # Acknowledgements
469
+
470
+ We thank Youngseog Chung and Dhruv Malik for fruitful discussions, and the ICML reviewers for valuable feedback. CG was supported by the Bloomberg Data Science Ph.D. Fellowship. For computation, we used allocation CIS220171 from the Advanced Cyberinfrastructure Coordination Ecosystem: Services & Support (ACCESS) program, supported by NSF grants 2138259, 2138286, 2138307, 2137603, and 2138296. Specifically, we used the Bridges-2 system (Towns et al., 2014), supported by NSF grant 1928147, at the Pittsburgh Supercomputing Center (PSC).
471
+
472
+ # References
473
+
474
+ David Blackwell. An analog of the minimax theorem for vector payoffs. Pacific Journal of Mathematics, 6(1):1-8, 1956.
475
+ Jochen Bröcker. Reliability, sufficiency, and the decomposition of proper scores. Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography, 135(643):1512-1519, 2009.
476
+ A Philip Dawid. The well-calibrated Bayesian. Journal of the American Statistical Association, 77(379):605-610, 1982.
477
+ A Philip Dawid. Comment: The impossibility of inductive inference. Journal of the American Statistical Association, 80(390):340-341, 1985.
478
+ Morris H DeGroot and Stephen E Fienberg. Assessing probability assessors: Calibration and refinement. Technical report, Carnegie Mellon University, 1981.
479
+ Dean P Foster. A proof of calibration via Blackwell's approachability theorem. Games and Economic Behavior, 29(1-2):73-78, 1999.
480
+ Dean P Foster and Sergiu Hart. Forecast hedging and calibration. Journal of Political Economy, 129(12):3447-3490, 2021.
481
+ Dean P Foster and Sergiu Hart. "Calibating": beating forecasters at their own game. Theoretical Economics (to appear), 2023.
482
+ Dean P Foster and Rakesh V Vohra. Asymptotic calibration. Biometrika, 85(2):379-390, 1998.
483
+ Dylan J Foster, Satyen Kale, Haipeng Luo, Mehryar Mohri, and Karthik Sridharan. Logistic regression: The importance of being improper. In Conference On Learning Theory, 2018.
484
+ Tilmann Gneiting and Adrian E Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American statistical Association, 102(477):359-378, 2007.
485
+ Tilmann Gneiting, Fadoua Balabdaoui, and Adrian E Raftery. Probabilistic forecasts, calibration and sharpness. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 69(2):243-268, 2007.
486
+ Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, 2017.
487
+
488
+ Chirag Gupta and Aaditya Ramdas. Distribution-free calibration guarantees for histogram binning without sample splitting. In International Conference on Machine Learning, 2021.
489
+ Chirag Gupta and Aaditya Ramdas. Faster online calibration without randomization: interval forecasts and the power of two choices. In Conference On Learning Theory, 2022a.
490
+ Chirag Gupta and Aaditya Ramdas. Top-label calibration and multiclass-to-binary reductions. In International Conference on Learning Representations, 2022b.
491
+ Chirag Gupta, Aleksandr Podkopaev, and Aaditya Ramdas. Distribution-free binary classification: prediction sets, confidence intervals and calibration. In Advances in Neural Information Processing Systems, 2020.
492
+ Elad Hazan. Introduction to online convex optimization. Foundations and Trends in Optimization, 2(3-4):157-325, 2016.
493
+ Elad Hazan and Comandur Seshadhri. Efficient learning algorithms for changing environments. In International Conference on Machine Learning, 2009.
494
+ Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2):169-192, 2007.
495
+ Rémi Jézéquel, Pierre Gaillard, and Alessandro Rudi. Efficient improper learning for online logistic regression. In Conference on Learning Theory, 2020.
496
+ Rémi Jézquel, Pierre Gaillard, and Alessandro Rudi. Mixability made efficient: Fast online multiclass logistic regression. In Advances in Neural Information Processing Systems, 2021.
497
+ Meelis Kull, Telmo M Silva Filho, and Peter Flach. Beyond sigmoid: How to obtain well-calibrated probabilities from binary classifiers with beta calibration. *Electronic Journal of Statistics*, 11(2):5052–5080, 2017.
498
+ Ananya Kumar, Percy S Liang, and Tengyu Ma. Verified uncertainty calibration. In Advances in Neural Information Processing Systems, 2019.
499
+ Allan H Murphy. A new vector partition of the probability score. Journal of applied Meteorology, 12(4):595-600, 1973.
500
+ Alexandru Niculescu-Mizil and Rich Caruana. Predicting good probabilities with supervised learning. In International Conference on Machine Learning, 2005.
501
+
502
+ David Oakes. Self-calibrating priors do not exist. Journal of the American Statistical Association, 80(390):339-339, 1985.
503
+ Vianney Perchet. Approachability, regret and calibration: Implications and equivalences. Journal of Dynamics & Games, 1(2):181, 2014.
504
+ John Platt. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in large margin classifiers, 10(3):61-74, 1999.
505
+ Rebecca Roelofs, Nicholas Cain, Jonathon Shlens, and Michael C Mozer. Mitigating bias in calibration error estimation. In International Conference on Artificial Intelligence and Statistics, 2022.
506
+ J. Towns, T. Cockerill, M. Dahan, I. Foster, K. Gaither, A. Grimshaw, V. Hazlewood, S. Lathrop, D. Lifka, G. D. Peterson, R. Roskies, J. Scott, and N. Wilkins-Diehr. XSEDE: Accelerating Scientific Discovery. Computing in Science & Engineering, 16(5):62-74, 2014.
507
+ Volodimir G Vovk. Aggregating strategies. In Conference on Computational Learning Theory, 1990.
508
+ David Widmann, Fredrik Lindsten, and Dave Zachariah. Calibration tests in multi-class classification: A unifying framework. In Advances in Neural Information Processing Systems, 2019.
509
+ Bianca Zadrozny and Charles Elkan. Obtaining calibrated probability estimates from decision trees and naive Bayesian classifiers. In International Conference on Machine Learning, 2001.
510
+ Bianca Zadrozny and Charles Elkan. Transforming classifier scores into accurate multiclass probability estimates. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2002.
511
+ Jize Zhang, Bhavya Kailkhura, and T Yong-Jin Han. Mix-n-match: Ensemble and compositional methods for uncertainty calibration in deep learning. In International Conference on Machine Learning, 2020.
512
+ Lijun Zhang, Tianbao Yang, and Zhi-Hua Zhou. Dynamic regret of strongly adaptive methods. In International Conference on Machine Learning, 2018.
513
+ Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In International Conference on Machine Learning, 2003.
514
+
515
+ <table><tr><td>Name</td><td>Ttrain</td><td>Tcal</td><td>W</td><td>Sort-by</td><td>Link to dataset</td></tr><tr><td>Bank marketing</td><td>1000</td><td>1000</td><td>500</td><td>Age</td><td>https://www.kaggle.com/datasets/kukuroo3/ bank-marketing-response-predict</td></tr><tr><td>Credit default</td><td>1000</td><td>1000</td><td>500</td><td>Sex</td><td>https://www.kaggle.com/datasets/uciml/ default-of-credit-card-clients-dataset</td></tr><tr><td>Customer churn</td><td>1000</td><td>1000</td><td>500</td><td>Location</td><td>https://www.kaggle.com/datasets/ shrutimechlearn/churn-modelling</td></tr><tr><td>Fetal health</td><td>626</td><td>300</td><td>100</td><td>Acceleration</td><td>https://www.kaggle.com/datasets andrewmvd/ fetal-health-classification</td></tr></table>
516
+
517
+ Table 2: Metadata for datasets used in Section 4.1. The sort-by column indicates which covariate was used to order data points. All datasets are under the Creative Commons CC0 license.
518
+
519
+ ![](images/f88de9a9a397f0554b3b1a70067d9edd7aaa70d5e4074bf542a2ef0fa458bf15.jpg)
520
+
521
+ ![](images/0c931958a6db07133026315aa954e4df8c0ea9a84a0fc180ecacd35b7f1a5e58.jpg)
522
+ Figure 8: Sharpness results with drifting data. SHP values over time of considered models on four datasets with synthetically induced drifts (Section 4.1). The plots have invisible error bars since variation across the 100 runs was small. The drop in expected sharpness is below 0.005 at all times except on the Fetal Health Dataset.
523
+
524
+ ![](images/89c5d8ee15f6a9ba68009bdc3ac95014aa736f802e9043603a10561039394811.jpg)
525
+
526
+ ![](images/7b5e3a685698f9efc9744eb5ebe19fb64a6990a7882f0b8e93130b3537d9676d.jpg)
527
+
528
+ ![](images/e042194f8be74bb74c5dbebf52e656a7e81392fd77095afe3cf79697feea89cd.jpg)
529
+
530
+ ![](images/d8239916b212ab2235754e95bc2c854a77c998a27ff9f41051ed1b76c6058ddd.jpg)
531
+
532
+ ![](images/c7ff78d1654533952d04f5b849f4b0dbf8776e8e6737a54c60b4ae9c1ffc568a.jpg)
533
+ Figure 9: Sharpness results with i.i.d. data. SHP values over time of considered models on four shuffled (ie, nearly i.i.d.) datasets (Section 4.1). The drop in expected sharpness is less than 0.005 in all cases except for the HOPS forecaster on the Fetal Health dataset, where it is 0.01.
534
+
535
+ ![](images/a10db3817e04c63114459e9589f736a05123bf462f2768072fb4446e4a9d2a6c.jpg)
536
+
537
+ ![](images/e3d8b4f6e195151643f72e524c6d0c9c1f95b19a53baa55def1de0b6e2233e3c.jpg)
538
+
539
+ ![](images/9aab21be194a8cbcc4160006eca0b783383c6503870cc02d39a98cf7df3ec51a.jpg)
540
+
541
+ # A Experimental details and additional results
542
+
543
+ Some implementation details, metadata, information on metrics, and additional results and figures are collected here.
544
+
545
+ # A.1 Metadata for datasets used in Section 4.1
546
+
547
+ Table 2 contains metadata for the datasets we used in Section 4.1. $T_{train}$ refers to the number of training examples. The "sort-by" column indicates which covariate was used to order data points. In each case some
548
+
549
+ ![](images/9055966650b7f0a58a1044141bcda4069225f177e2a3555d14f03d11ed6a395c.jpg)
550
+
551
+ ![](images/edf701a26ca7bf8cdf82c69c3749b500cccab52daf327eb8f87be9c93b556a6e.jpg)
552
+ True probabilities
553
+ Fixed base model
554
+ - - - OPS model at start of time interval
555
+ - Histogram of $X_{t}$ values in time interval
556
+
557
+ ![](images/c99fce8f95169a0d535b8d11a3ff0d6a9986f983820ddd1897a64de42e56ab5a.jpg)
558
+ Value of $x$
559
+
560
+ ![](images/c81f40173830a5ac86443104da7cc1b16836c6ed7451b823d3a445df1cd57dc8.jpg)
561
+ Figure 10: The adaptive behavior of OPS for the simulated label drift scenario described in Section 1.2.
562
+
563
+ <table><tr><td>t</td><td>Model</td><td>Acc ↑</td><td>CE ↓</td></tr><tr><td>0—1000</td><td>Base</td><td>90.72%</td><td>0.025</td></tr><tr><td>1500—</td><td>Base</td><td>84.29%</td><td>0.088</td></tr><tr><td>2000</td><td>OPS</td><td>86.08%</td><td>0.029</td></tr><tr><td>3500—</td><td>Base</td><td>68.80%</td><td>0.26</td></tr><tr><td>4000</td><td>OPS</td><td>83.07%</td><td>0.053</td></tr><tr><td>5500—</td><td>Base</td><td>59.38%</td><td>0.42</td></tr><tr><td>6000</td><td>OPS</td><td>92.82%</td><td>0.049</td></tr></table>
564
+
565
+ (a) Table reporting accuracy and CE values of the base model and OPS for indicated values of $t$ .
566
+
567
+ ![](images/3eeebfe434bd56c98e545389ec609c36656880389a753a5229d5319b848a4d89.jpg)
568
+
569
+ ![](images/7a2b2b1268612002a693b7ee1a1b230e66fb1c855636bad2eadde54155d6af88.jpg)
570
+ True probabilities
571
+ Fixed base model
572
+ OPS model at start of time interval
573
+ - Histogram of $X_{t}$ values in time interval
574
+
575
+ ![](images/cbf20f283211bede1cf874648679747e073249e7b121923af7146a3ab0b33f06.jpg)
576
+ Value of $x$
577
+ Figure 11: The adaptive behavior of OPS for the simulated regression-function drift scenario described in Section 1.2.
578
+
579
+ ![](images/fd42236e37847727a4318251a64a14539e22bb44ad7d1e2a79e2ba0e913aeba8.jpg)
580
+
581
+ <table><tr><td>t</td><td>Model</td><td>Acc ↑</td><td>CE ↓</td></tr><tr><td>0—1000</td><td>Base</td><td>84.14%</td><td>0.1</td></tr><tr><td rowspan="2">1500—2000</td><td>Base</td><td>74.64%</td><td>0.12</td></tr><tr><td>OPS</td><td>75.40%</td><td>0.097</td></tr><tr><td rowspan="2">3500—4000</td><td>Base</td><td>59.51%</td><td>0.2</td></tr><tr><td>OPS</td><td>59.60%</td><td>0.067</td></tr><tr><td rowspan="2">5500—6000</td><td>Base</td><td>44.39%</td><td>0.34</td></tr><tr><td>OPS</td><td>51.43%</td><td>0.049</td></tr></table>
582
+
583
+ (a) Table reporting accuracy and CE values of the base model and OPS for indicated values of $t$ .
584
+
585
+ noise was added to the covariate in order to create variation for the experiments. The exact form of drift can be found in the python file sec_4_experiments_core.py in the repository https://github.com/AIgen/df-posthoc-calibration/tree/main/Online%20Platt%20Scaling%20with%20Calibating.
586
+
587
+ # A.2 Additional plots and details for label drift and regression-function drift experiments from Section 1
588
+
589
+ Figures 3, 10, and 11 report accuracy (Acc) and calibration error (CE) values for the base model and the OPS model in the three dataset drift settings we considered. The Acc values are straightforward averages and can be computed without issues. However, estimation of CE on real datasets is tricky and requires sophisticated techniques such as adaptive binning, debiasing, heuristics for selecting numbers of bins, or kernel estimators (Kumar et al., 2019; Roelofs et al., 2022; Widmann et al., 2019). The issue typically boils down to the fact that $\operatorname{Pr}(Y = 1 \mid X = x)$ cannot be estimated for every $x \in \mathcal{X}$ without making smoothness assumptions or performing some kind of binning. However, in the synthetic experiments of Section 1, $\operatorname{Pr}(Y = 1 \mid X)$ is known exactly, so such techniques are not required. For some subset of forecasts $p_s, p_2, \ldots, p_t$ , we compute
590
+
591
+ $$
592
+ \mathrm {C E} = \frac {1}{t - s + 1} \sum_ {i = s} ^ {t} \left| p _ {i} - \Pr \left(Y _ {i} = 1 \mid X _ {i} = \mathbf {x} _ {i}\right) \right|,
593
+ $$
594
+
595
+ on the instantiated values of $X_{s}, X_{s+1}, \ldots, X_{t}$ . Thus, what we report is the true CE given covariate values.
596
+
597
+ # A.3 Additional results with windowed histogram binning and changing bin width
598
+
599
+ Comparison to histogram binning (HB). HB is a recalibration method that has been shown to have excellent empirical performance as well as theoretical guarantees (Zadrozny and Elkan, 2001; Gupta and Ramdas, 2021). There are no online versions of HB that we are aware of, so we use the same windowed approach as windowed Platt and beta scaling for benchmarking (see Section 2.3 and the second bullet in Section B). This leads to windowed histogram binning (WHB), the fixed-batch HB recalibrator that is updated every $O(100)$ time-steps. We compare WHB to OPS and OBS (see Section 5). Since tracking improves both OPS and OBS, we also consider tracking WHB. Results are presented in Figure 15.
600
+
601
+ We find that WHB often performs better than OPS and OBS in the i.i.d. case, and results are mixed in the drifting case. However, since WHB is a binning method, it inherently produces something akin to a running average, and so tracking does not improve it further. The best methods (TOPS, TOBS) are the ones that combine one of our proposed parametric online calibrators (OPS, OBS) with tracking.
602
+
603
+ Changing the bin width $\epsilon$ . In the main paper, we used $\epsilon = 0.1$ and defined corresponding bins as in (10). This binning reflects in three ways on the experiments we performed. First, $\epsilon$ -binning is used to divide forecasts into representative bins before calibrating (equations (11), (14)). Second, $\epsilon$ -binning is used to define the sharpness and calibration error metrics. Third, the hedging procedure F99 requires specifying a binning scheme, and we used the same $\epsilon$ -bins.
604
+
605
+ Here, we show that the empirical results reported in the main paper are not sensitive to the chosen representative value of $\epsilon = 0.1$ . We run the same experiment used to produce Figures 5 and 6 but with $\epsilon = 0.05$ (Figure 12) and $\epsilon = 0.2$ (Figure 13). The qualitative results remain identical, with TOPS still the best performer and hardly affected by the changing epsilon. In fact, the plots for all methods except HOPS are indistinguishable from their $\epsilon = 0.1$ counterparts at first glance. HOPS is slightly sensitive to $\epsilon$ : the performance improves slightly with $\epsilon = 0.05$ , and worsens slightly with $\epsilon = 0.2$ .
606
+
607
+ # A.4 Reproducibility
608
+
609
+ All results in this paper can be reproduced exactly, including the randomization, using the IPython notebooks that can be found at https://github.com/aigen/df-posthoc-calibration in the folder Online Platt scaling with Calibating. The README page in the folder contains a table describing which notebook to run to reproduce individual figures from this paper.
610
+
611
+ ![](images/66613f372e12c3646fbdd77e85057b1a13dbe1687b21d5c0457142504ac4c747.jpg)
612
+
613
+ ![](images/3550e9a5ebc9af52053e84952b954ac8e23ffda7ca78168922267524ddb3c331.jpg)
614
+
615
+ ![](images/263f6c2b7509de38dbb24928698d0fa0294186579d847f6de40dd86878a83e66.jpg)
616
+ (a) Calibration error for i.i.d. data streams.
617
+
618
+ ![](images/34f2ad0c97ee6ebf3a07b7587db307840d8611ec4b64cd3e0353e280d92f2bd1.jpg)
619
+
620
+ ![](images/86da452166cbfadd8d26e6ca12c90033bea488c11a1312b44c0b73e3e5712d33.jpg)
621
+
622
+ ![](images/c566327d2a504797f113b6f6fa805a3b38f9725f6c98b0656042705135c2c0c5.jpg)
623
+ Figure 12: Results for the same experimental setup as Figures 5 and 6, but with $\epsilon = 0.05$ .
624
+
625
+ ![](images/10900f4bf886a2b52452d58c56ab3b2fe412724acb1e291b93bfe0b390edb76a.jpg)
626
+ (b) Calibration error for drifting data streams.
627
+
628
+ ![](images/301a9ddbe79fe4dcba2773275fd6ee698a9f7d77679b6ec8eec2f8d9f8d58e7a.jpg)
629
+
630
+ ![](images/73c2e058398fe1f6b7185b9090958e7e124b00d5627d70be803993ff1df154bd.jpg)
631
+
632
+ ![](images/80a150a759b495c43ec7ae287c46ef23e57cfb957acc9e33320e390179caf814.jpg)
633
+
634
+ ![](images/c8b84e07d223a39febfd370c0c85e7032d8895f20ccb8b7da9146ce847d397e3.jpg)
635
+
636
+ ![](images/45bce06bbbb8aced0bb49d5fea97abf205b10b6cae5ff206df376f8f0f0d1a71.jpg)
637
+ (a) Calibration error for i.i.d. data streams.
638
+
639
+ ![](images/b78e32069e66c249aba3f44c48f4605357a62ca689a981824ecea79cd62acb55.jpg)
640
+
641
+ ![](images/9a78e743fe5205b882ffffe546f95985b9f7ef6bce916e4bedad3d49732cc489.jpg)
642
+
643
+ ![](images/98ccc866ef1666b1133f4ea56664cb3f1cc0d50d83ab8061a3e0307df75a3dbf.jpg)
644
+ Figure 13: Results for the same experimental setup as Figures 5 and 6, but with $\epsilon = 0.2$ .
645
+
646
+ ![](images/649efbd0c1d111fc2d2354267ce08c82253f9aa85e10af59e816105d399642a0.jpg)
647
+ (b) Calibration error for drifting data streams.
648
+
649
+ ![](images/1581890191237df47d56abe44bbcf83c561d48049595272f4f7bc4835616ec18.jpg)
650
+
651
+ ![](images/b0002fadf667bcbcd44ae214bac881699ceb1da8e7ec63319cd2877f578349fc.jpg)
652
+
653
+ ![](images/a09003b9dc776b17b67ba0cdd84ada653fda397e2998ff4e71819cfd3e000e86.jpg)
654
+ Windowed beta scaling (WBS)
655
+
656
+ ![](images/045477ed58f784ed11eb2a71d307707fc01c56f79fd759e332ce937898462ba1.jpg)
657
+
658
+ ![](images/e07f575ee7648b1eb614f3bd09e3270ddc1cd88579b9d44e56a9f4febf63725b.jpg)
659
+
660
+ ![](images/17e27cd8f8438cd4b43e72490bd5118ce66fe4609783886f2097e40ed6719611.jpg)
661
+ Online beta scaling (OBS)
662
+
663
+ ![](images/017b8457e801216517c74292b14b280bb1cf252bc36d0bb029bfc9a227fd2b75.jpg)
664
+ Windowed Platt scaling (WPS)
665
+ Online Platt scaling (OPS)
666
+
667
+ ![](images/5af808313af3737bcf4b463979994c7f70f660e000304d9fdfc2b20f6a2cc7cd.jpg)
668
+ OBS + tracking (TOBS)
669
+ OBS + hedging (HOBS)
670
+
671
+ ![](images/30f0ec9bd36806dac5f0abfc9a33c93fbf6291b188fc673c297bdeb7f2906966.jpg)
672
+ Bank marketing response
673
+
674
+ ![](images/084843f019c9fd54bfd0664cf9ff4fca681a3b51ecc678a339c0ebb4cfb865ea.jpg)
675
+ Credit default
676
+ (a) Calibration error for i.i.d. data streams.
677
+
678
+ ![](images/4f3b2cfafefa05abfedf5e92114365eba07249ed584da2ad0672800920f864a9.jpg)
679
+ Customer churn modeling
680
+
681
+ ![](images/2e60e40a6a64903515d3cff6924abd8e0082507f253e268e1ff20a06a97ee8c3.jpg)
682
+ Fetal Health
683
+
684
+ ![](images/597eedee4bd4e8f50d4e325c17a33f442cc970a80622c9a36f110621423bea1c.jpg)
685
+ Bank marketing response
686
+
687
+ ![](images/34552daac969d82573b7798f9cecc4f0f40da4091e63ae52f0a22bdbf5322b70.jpg)
688
+ Credit default
689
+ (b) Calibration error for drifting data streams.
690
+
691
+ ![](images/65d356ac3c991b82ca707264e79b5b3f031f2a974cd76d313522e3e71b732e8b.jpg)
692
+ Customer churn modeling
693
+
694
+ ![](images/24681d77002d080f9766983d10dca7201d1d912b9a8666f3dca0cb0d9dca4569.jpg)
695
+ Fetal Health
696
+
697
+ ![](images/c847ac824b34fd04d2b204026f3add343c6cfcffc0ae98993fe2f66ecd544760.jpg)
698
+ Figure 14: Performance of online beta scaling (OBS) and its calibating variants on real datasets with and without distribution drift. OBS further improves upon OPS in most cases. In each plot, TOBS is the best-performing method.
699
+ Windowed histogram binning (WHB)
700
+
701
+ ![](images/7f2bf9049b455a0a0b6b08fb015ef56dea599dbe3e31edd45dc5ea641491597f.jpg)
702
+
703
+ ![](images/d07878f60ecb818d4b5c49bd2c067e30cd554245180b7e7b338be16fc4b3fce3.jpg)
704
+ Online beta scaling (OBS)
705
+ OBS + tracking (TOBS)
706
+
707
+ ![](images/f22bc64eeae93d79b1b757a5bdcede6f7869c852394385f5aebc06d0e1ee7f85.jpg)
708
+ WHB + tracking (TWHB)
709
+
710
+ ![](images/baf2d47cbd9e08a67a6e42135311fca3b8ea51a7c698f08e73f710cb7e041bef.jpg)
711
+ Online Platt scaling (OPS)
712
+ -OPS + tracking (TOPS)
713
+
714
+ ![](images/0caf5a52243fb7e35d06343baf9d93a29e3a7a3f79839748b90b7de4c8e8409a.jpg)
715
+ Bank marketing response
716
+
717
+ ![](images/9a574868b276d50235c707de78f35e503933a4984077246f14eaf4e36689446d.jpg)
718
+ Credit default
719
+ (a) Calibration error for i.i.d. data streams.
720
+
721
+ ![](images/e343f088eb7448cd37d46f2fd356e69fbc1342d0ce068e1e90e6944b515bdd86.jpg)
722
+ Customer churn modeling
723
+
724
+ ![](images/93ffc4a54ed5ac1f847c14b4fe6704d4a74d8a609f153765730bf355e85f293f.jpg)
725
+ Fetal Health
726
+
727
+ ![](images/7b4a06b2a2665f8a444208114a35adb58e54d0c6dc13039517b70b199e4b14fc.jpg)
728
+ Bank marketing response
729
+ Figure 15: Comparing the performance of windowed histogram binning (WHB), online Platt scaling (OPS), online beta scaling (OBS), and their tracking variants on real datasets with and without distribution drifts. Among non-tracking methods (dotted lines), WHB performs well with i.i.d. data, while OBS performs well for drifting data. Among tracking methods (solid lines), TOBS and TOPS are the best-performing methods in every plot. Tracking typically does not improve WHB much since WHB is already a binning method (so tracking is implicit).
730
+
731
+ ![](images/9c6b2bccbd771a1a9619b2e02fb2160f222c66d414ee00dacfce47c883a17f1c.jpg)
732
+ Credit default
733
+ (b) Calibration error for drifting data streams.
734
+
735
+ ![](images/28aa6b61c0b9e035ec58f0cfb4e29d5422d915649c59cf24223976d0a181d418.jpg)
736
+ Customer churn modeling
737
+
738
+ ![](images/7776a9a4fb7c96f66c51fec396d239043572c3e3f8ef8eff1d6a55a38f7159ff.jpg)
739
+ Fetal Health
740
+
741
+ Algorithm 1 Online Newton Step for OPS (based on Hazan (2016, Algorithm 12))
742
+ Input: $\mathcal{K} = \{(x,y):\| (x,y)\| _2\leqslant 100\}$ , time horizon $T$ , and initialization parameter $(a_{1}^{\mathrm{OPS}},b_{1}^{\mathrm{OPS}}) = (1,0) = :\theta_{1}\in \mathcal{K}$ Hyperparameters: $\gamma = 0.1$ $\rho = 100$
743
+ Set $A_0 = \rho I_2$
744
+ for $t = 1$ to $T$ do
745
+ Play $\theta_t$ , observe log-loss $l(m^{\theta_t}(f(\mathbf{x}_t)),y_t)$ and its gradient $\nabla_{t}\coloneqq \nabla_{\theta_{t}}l(m^{\theta_{t}}(f(\mathbf{x}_{t})),y_{t})$ $A_{t} = A_{t - 1} + \nabla_{t}\nabla_{t}^{\intercal}$
746
+ Newton step: $\widetilde{\theta}_{t + 1} = \theta_t - \frac{1}{\gamma} A_t^{-1}\nabla_t$
747
+ Projection: $(a_{t + 1}^{\mathrm{OPS}},b_{t + 1}^{\mathrm{OPS}}) = \theta_{t + 1} = \arg \min_{\theta \in \mathcal{K}}(\widetilde{\theta}_{t + 1} - \theta)^{\intercal}A_{t}(\widetilde{\theta}_{t + 1} - \theta)$
748
+ end for
749
+
750
+ # B Online beta scaling
751
+
752
+ This is an extended version of Section 5, with some repetition but more details. A recalibration method closely related to Platt scaling is beta scaling (Kull et al., 2017). The beta scaling mapping $m$ has three parameters $(a,b,c)\in \mathbb{R}^3$ , and corresponds to a sigmoid transform over two pseudo-features derived from $f(\mathbf{x})$ : $\log (f(\mathbf{x}))$ and $\log (1 - f(\mathbf{x}))$ :
753
+
754
+ $$
755
+ m ^ {a, b, c} (f (\mathbf {x})) := \operatorname {s i g m o i d} (a \cdot \log (f (\mathbf {x})) + b \cdot \log (1 - f (\mathbf {x})) + c). \tag {18}
756
+ $$
757
+
758
+ Observe that enforcing $b = -a$ recovers Platt scaling since $\log (z) = \log (z) - \log (1 - z)$ . The beta scaling parameters can be learnt following identical protocols as Platt scaling.
759
+
760
+ - The traditional method is to optimize parameters by minimizing the log-likelihood (equivalently, log-loss) over a fixed held-out batch of points.
761
+ - A natural benchmark for online settings is to update the parameters at some frequency (such as every 50 or 100 steps). At each update, the beta scaling parameters are set to the optimal value based on all data seen so far, and these parameters are used for prediction until the next update occurs. We call this benchmark windowed beta scaling (WBS); it is analogous to the windowed Platt scaling (WPS) benchmark considered in the main paper.
762
+ - Our proposed method for online settings, called online Beta scaling (OBS), is to use a log-loss regret minimization procedure, similar to OPS. Analogously to (7), $R_{T}$ for OBS predictions $p_t^{\mathrm{OBS}} = m^{a_t,b_t,c_t}(f(\mathbf{x}_t))$ is defined as
763
+
764
+ $$
765
+ R _ {T} (\mathrm {O B S}) = \sum_ {t = 1} ^ {T} l \left(p _ {t} ^ {\mathrm {O B S}}, y _ {t}\right) - \min _ {(a, b, c) \in \mathcal {B}} \sum_ {t = 1} ^ {T} l \left(m ^ {a, b, c} \left(f \left(\mathbf {x} _ {t}\right)\right), y _ {t}\right), \tag {19}
766
+ $$
767
+
768
+ where $\mathcal{B} \coloneqq \{(a, b, c) \in \mathbb{R}^3 : a^2 + b^2 + c^2 \leqslant B^2\}$ for some $B \in \mathbb{R}$ , and $l$ is the log-loss. We use online Newton step (Algorithm 1) to learn $(a_t, b_t, c_t)$ , with the following initialization and hyperparameter values:
769
+
770
+ $$
771
+ \begin{array}{l} - \mathcal {K} = \left\{(x, y, z): \| (x, y, z) \| _ {2} \leqslant 1 0 0 \right\}, \left(a _ {1} ^ {\mathrm {O B S}}, b _ {1} ^ {\mathrm {O B S}}, c _ {1} ^ {\mathrm {O B S}}\right) = (1, 1, 0); \\ - \gamma = 0. 1, \rho = 2 5, A _ {0} = \rho \mathbf {I} _ {3}. \\ \end{array}
772
+ $$
773
+
774
+ These minor changes have to be made simply because the dimensionality changes from two to three. The empirical results we present shortly are based on an implementation with exactly these fixed hyperparameter values that do not change across the experiments (that is, we do not do any hyperparameter tuning).
775
+
776
+ Due to the additional degree of freedom, beta scaling is more expressive than Platt scaling. In the traditional batch setting, it was demonstrated by Kull et al. (2017) that this expressiveness typically leads to better (out-of-sample) calibration performance. We expect this relationship between Platt scaling and beta scaling to hold for their windowed and online versions as well. We confirm this intuition through an extension of the real dataset experiments of Section 4.1 to include WBS and OBS (Figure 14). In the main paper we reported that the base model (BM) and fixed-batch Platt scaling model (FPS) perform the worst by a margin, so these lines are not reported again. We find that OBS performs better than both OPS and WBS, so we additionally report the performance of calibating versions of OBS instead of OPS. That is, we replace $\mathrm{OPS} +$ tracking (TOPS) with $\mathrm{OBS} +$ tracking (TOBS), and $\mathrm{OPS} +$ hedging (HOPS) with $\mathrm{OBS} +$ hedging (HOBS).
777
+
778
+ A regret bound similar to Theorem 2.1 can be derived for OBS by instantiating ONS and AIOLI regret bounds with $d = 3$ (instead of $d = 2$ as done for OPS). The calibating theorems (3.1 and 3.2) hold regardless of the underlying expert, and so also hold for OBS.
779
+
780
+ # C F99 online calibration method
781
+
782
+ We describe the F99 method proposed by Foster (1999), and used in our implementation of HOPS (Section 3.3). The description is borrowed with some changes from Gupta and Ramdas (2022a). Recall that the F99 forecasts are the mid-points of the $\epsilon$ -bins (10): $B_{1} = [0,\epsilon), B_{2} = [\epsilon,2\epsilon), \ldots, B_{m} = [1 - \epsilon,1]$ . For $b \in [m] := \{1,2,\dots,m\}$ and $t \geqslant 1$ , define:
783
+
784
+ $$
785
+ \left(\text {m i d - p o i n t} B _ {b}\right) m _ {b} = (b - 0. 5) / m = b \epsilon - \epsilon / 2,
786
+ $$
787
+
788
+ $$
789
+ \left(\text {l e f t} B _ {b}\right) l _ {b} = (b - 1) / m = (b - 1) \epsilon ,
790
+ $$
791
+
792
+ $$
793
+ \left(\text {r i g h t e n d - p o i n t} B _ {b}\right) r _ {b} = b / m = b \epsilon ,
794
+ $$
795
+
796
+ F99 maintains some quantities as more data set is observed and forecasts are made. These are,
797
+
798
+ $$
799
+ (f r e q u e n c y \quad f o r c a s t i n g m _ {b}) N _ {b} ^ {t} = | \{\mathbb {1} \left\{p _ {s} = m _ {b} \right\}: s \leqslant t \} |,
800
+ $$
801
+
802
+ $$
803
+ \text {(o b s e r v e d a v e r g e w h e n m _ {b} w a s f o r e c a s t e d)} p _ {b} ^ {t} = \left\{ \begin{array}{l l} \sum_ {s = 1} ^ {t} y _ {s} \mathbb {1} \left\{p _ {s} = m _ {b} \right\} / N _ {b} ^ {t} & \text {i f N _ {b} ^ {t} > 0} \\ m _ {b} & \text {i f N _ {b} ^ {t} = 0}, \end{array} \right.
804
+ $$
805
+
806
+ $$
807
+ \text {(d e f i c i t)} d _ {b} ^ {t} = l _ {b} - p _ {b} ^ {t},
808
+ $$
809
+
810
+ $$
811
+ \left(\text {e x c e s s}\right) e _ {b} ^ {t} = p _ {b} ^ {t} - r _ {b}.
812
+ $$
813
+
814
+ The terminology "deficit" is used to indicate that $p_b^t$ is smaller $l_b$ similarly. "Excess" is used to indicate that $p_b^t$ is larger than $r_b$ similarly. The F99 algorithm is as follows. Implicit in the description is computation of the quantities defined above.
815
+
816
+ # F99: the online adversarial calibration method of Foster (1999)
817
+
818
+ - At time $t = 1$ , forecast $p_1 = m_1$ .
819
+ - At time $t + 1$ ( $t \geqslant 1$ ), if
820
+
821
+ $$
822
+ \text {c o n d i t i o n A :} \text {t h e r e e x i s t s a n} b \in [ m ] \text {s u c h t h a t} d _ {b} ^ {t} \leqslant 0 \text {a n d} e _ {b} ^ {t} \leqslant 0,
823
+ $$
824
+
825
+ is satisfied, forecast $p_{t + 1} = m_b$ for any $i$ that verifies condition A. Otherwise,
826
+
827
+ $$
828
+ \text {c o n d i t i o n B :} \quad \text {t h e r e e x i s t s a} b \in [ m - 1 ] \text {s u c h t h a t} e _ {b} ^ {t} > 0 \text {a n d} d _ {b + 1} ^ {t} > 0,
829
+ $$
830
+
831
+ must be satisfied (see Lemma 5 (Gupta and Ramdas, 2022a)). For any index $b$ that satisfies condition B, forecast
832
+
833
+ $$
834
+ p _ {t + 1} = \left\{ \begin{array}{l l} m _ {b} & \text {w i t h p r o b a b i l i t y} \frac {d _ {b + 1} ^ {t}}{d _ {b + 1} ^ {t} + e _ {b} ^ {t}} \\ m _ {b + 1} & \text {w i t h p r o b a b i l i t y} \frac {e _ {b} ^ {t}}{d _ {b + 1} ^ {t} + e _ {b} ^ {t}}. \end{array} \right.
835
+ $$
836
+
837
+ These randomization probabilities are revealed before $y_{t + 1}$ is set by the agent that is generating outcomes, but the actual $p_t$ value is drawn after $y_{t + 1}$ is revealed.
838
+
839
+ # D Forecasting climatology to achieve calibration
840
+
841
+ Although Foster and Vohra's result (1998) guarantees that calibrated forecasting is possible against adversarial sequences, this does not immediately imply that the forecasts are useful in practice. To see this, consider an alternating outcome sequence, $y_{t} = \mathbb{1}\left\{t\text{is odd}\right\}$ . The forecast $p_t = \mathbb{1}\left\{t\text{is odd}\right\}$ is calibrated and perfectly accurate. The forecast $p_t = 0.5$ (for every $t$ ) is also calibrated, but not very useful.
842
+
843
+ Thus we need to assess how a forecaster guaranteed to be calibrated for adversarial sequences performs on real-world sequences. In order to do so, we implemented the F99 forecaster (described in Appendix C), on Pittsburgh's hourly rain data from January 1, 2008, to December 31, 2012. The data was obtained from ncdc.noaa.gov/cdo-web/. All days on which the hourly precipitation in inches (HPCP) was at least 0.01 were considered as instances of $y_{t} = 1$ . There are many
844
+
845
+ ![](images/9020b9e0143be630a8b80c0ee33c3da589e61e660a7820ae928cc1984fd8d644.jpg)
846
+ Figure 16: Foster (1999)'s $\epsilon$ -calibrated forecaster on Pittsburgh's hourly rain data (2008-2012). The forecaster makes predictions on the grid $(0.05, 0.15, \ldots, 0.95)$ . In the long run, the forecaster starts predicting 0.35 for every instance, closely matching the average number of instances on which it rained ( $\approx 0.37$ ).
847
+
848
+ missing rows in the data, but no complex data cleaning was performed since we are mainly interested in a simple illustrative simulation. F99 makes forecasts on an $\epsilon$ -grid with $\epsilon = 0.1$ : that is, the grid corresponds to the points $(0.05, 0.15, \ldots, 0.95)$ . We observe (Figure 16) that after around 2000 instances, the forecaster always predicts 0.35. This is close to the average number of instances that it did rain which is approximately 0.37 (this long-term average is also called climatology in the meteorology literature). Although forecasting climatology can make the forecaster appear calibrated, it is arguably not a useful prediction given that there exist expert rain forecasters who can make sharp predictions for rain that change from day to day.
849
+
850
+ # E Proofs
851
+
852
+ Proof of Theorem 2.1. The regret bounds for ONS and AIOLI depend on a few problem-dependent parameters.
853
+
854
+ - The dimension $d = 2$ .
855
+ - The radius of the reference class $B$ .
856
+ - Bound on the norm of the gradient, which for logistic regression is also the radius of the space of input vectors. Due to the assumption on $f(\mathbf{x}_t)$ , the norm of the input is at most $\sqrt{\logit(0.01)^2 + 1^2} = \sqrt{\logit(0.99)^2 + 1^2} \leqslant 5$ .
857
+
858
+ The AIOLI bound (9) follows from Theorem 1, equation (4) of Jézéquel et al. (2020), setting $d = 2$ and $R = 10$ .
859
+
860
+ The ONS bound (8) follows from Theorem 4.5 of Hazan (2016), plugging in $G = 5$ , $D = 2B$ , and $\alpha = e^{-B}$ which is the known exp-concavity constant of the logistic loss over a ball of radius $B$ (Foster et al., 2018).
861
+
862
+ ![](images/987722c8b7f8e40dbdd73d0857c69f73c8eddbe8ffa50cfe1eaafc713ed01d37.jpg)
863
+
864
+ In writing the proofs of the results in Section 3, we will use an object closely connected to sharpness called refinement. For a sequence of forecasts $p_{1:T}$ and outcome sequence $y_{1:T}$ , the refinement $\mathcal{R}$ is defined as
865
+
866
+ $$
867
+ \mathcal {R} \left(p _ {1: T}\right) := \frac {1}{T} \sum_ {b = 1} ^ {m} N _ {b} \cdot \widehat {y} _ {b} \left(1 - \widehat {y} _ {b}\right), \tag {20}
868
+ $$
869
+
870
+ where $\widehat{y}_b$ is the average of the outcomes in every $\epsilon$ -bin; see the beginning of Section 3.2 where sharpness is defined. The function $x(\in [0,1]) \mapsto x(1 - x)$ is minimized at the boundary points $\{0,1\}$ and maximized at $1/2$ . Thus refinement is lower if $\widehat{y}_b$ is close to 0 or 1, or in other words if the bins discriminate points well. This is captured formally in the following (well-known) relationship between refinement and sharpness.
871
+
872
+ Lemma E.1 (Sharpness-refinement lemma). For any forecast sequence $p_{1:T}$ , the refinement $\mathcal{R}$ defined in (20) and the sharpness SHP defined in (12) are related as:
873
+
874
+ $$
875
+ \mathcal {R} (p _ {1: T}) = \bar {y} _ {T} - S H P (p _ {1: T}),
876
+ $$
877
+
878
+ where $\bar{y}_T = \frac{1}{T}\sum_{t=1}^T y_t$ .
879
+
880
+ Proof. Observe that
881
+
882
+ $$
883
+ \mathcal {R} (p _ {1: T}) = \frac {1}{T} \sum_ {b = 1} ^ {B} N _ {b} \widehat {y} _ {b} - \frac {1}{T} \sum_ {b = 1} ^ {B} N _ {b} \widehat {y} _ {b} ^ {2} = \frac {1}{T} \sum_ {b = 1} ^ {B} N _ {b} \widehat {y} _ {b} - \mathrm {S H P} (p _ {1: T}).
884
+ $$
885
+
886
+ The final result follows simply by noting that
887
+
888
+ $$
889
+ \sum_ {b = 1} ^ {B} N _ {b} \widehat {y} _ {b} = \sum_ {b = 1} ^ {B} \left(\sum_ {t \leqslant T, p _ {t} \in B _ {b}} y _ {t}\right) = \sum_ {t = 1} ^ {T} y _ {t}.
890
+ $$
891
+
892
+ ![](images/3a9c783f4d5f18cf043cf9cff08971dc0be157ad1a3eb02d7644729539e62f31.jpg)
893
+
894
+ We now state a second lemma, that relates $\mathcal{R}$ to the Brier-score $\mathcal{BS}$ defined as
895
+
896
+ $$
897
+ \mathcal {B S} \left(p _ {1: T}\right) := \frac {\sum_ {t = 1} ^ {T} \left(y _ {t} - p _ {t}\right) ^ {2}}{T}. \tag {21}
898
+ $$
899
+
900
+ Unlike $\mathcal{R}$ and SHP, $\mathcal{BS}$ is not defined after $\epsilon$ -binning. It is well-known (see for example equation (1) of FH23) that if refinement is defined without $\epsilon$ -binning (or if the Brier-score is defined with $\epsilon$ -binning), then refinement is at most the Brier-score defined above. Since we define $\mathcal{R}$ defined with binning, further work is required to relate the two.
901
+
902
+ Lemma E.2 (Brier-score-refinement lemma). For any forecast sequence $p_{1:T}$ and outcome sequence $y_{1:T}$ , the refinement $\mathcal{R}$ and the Brier-score $\mathcal{BS}$ are related as
903
+
904
+ $$
905
+ \mathcal {R} \left(p _ {1: T}\right) \leqslant \mathcal {B S} \left(p _ {1: T}\right) + \frac {\epsilon^ {2}}{4} + \epsilon , \tag {22}
906
+ $$
907
+
908
+ where $\epsilon$ is the width of the bins used to define $\mathcal{R}$ (10).
909
+
910
+ Proof. Define the discretization function $\mathrm{disc}:[0,1]\to [0,1]$ as $\mathrm{disc}(p) = \mathrm{mid - point}(B_b)\iff p\in B_b$ . Note that for all $p\in [0,1]$ , $|p - \mathrm{disc}(p)|\leqslant \epsilon /2$ . Based on standard decompositions (such as equation (1) of FH23), we know that
911
+
912
+ $$
913
+ \mathcal {R} \left(p _ {1: T}\right) \leqslant \frac {\sum_ {t = 1} ^ {T} \left(y _ {t} - \operatorname {d i s c} \left(p _ {t} ^ {\mathrm {T O P S}}\right)\right) ^ {2}}{T}. \tag {23}
914
+ $$
915
+
916
+ We now relate the RHS of the above equation to $\mathcal{BS}$
917
+
918
+ $$
919
+ \begin{array}{l} \sum_ {t = 1} ^ {T} \left(y _ {t} - \operatorname {d i s c} \left(p _ {t}\right)\right) ^ {2} = \sum_ {t = 1} ^ {T} \left(y _ {t} - p _ {t} + p _ {t} - \operatorname {d i s c} \left(p _ {t}\right)\right) ^ {2} \\ = T \cdot \mathcal {B S} \left(p _ {1: T}\right) + \sum_ {t = 1} ^ {T} \left(p _ {t} - \operatorname {d i s c} \left(p _ {t}\right)\right) ^ {2} + 2 \sum_ {t = 1} ^ {T} \left(y _ {t} - p _ {t}\right) \left(p _ {t} - \operatorname {d i s c} \left(p _ {t}\right)\right) \\ \leqslant T \cdot \mathcal {B S} (p _ {1: T}) + T (\epsilon / 2) ^ {2} + 2 \sum_ {t = 1} ^ {T} | y _ {t} - p _ {t} | (\epsilon / 2). \\ \leqslant T \cdot \mathcal {B S} \left(p _ {1: T}\right) + T (\epsilon / 2) ^ {2} + T \epsilon . \\ \end{array}
920
+ $$
921
+
922
+ The result of the theorem follows by dividing by $T$ on both sides.
923
+
924
+ ![](images/d0f4c2d5277247d747c5c74810610ddbfb617b2de55932b8bbc2f462314dfb86.jpg)
925
+
926
+ Proof of Theorem 3.1. The calibrating paper (Foster and Hart, 2023) is referred to as FH23 in this proof for succinctness.
927
+
928
+ We use Theorem 3 of FH23, specifically equation (13), which gives an upper bound on the Brier-score of a tracking forecast $(\mathcal{B}_t^c$ in their notation) relative to the refinement (20) of the base forecast. In our case, the tracking forecast is TOPS, the base forecast is OPS, and FH23's result gives,
929
+
930
+ $$
931
+ \mathcal {B S} \left(p _ {1: T} ^ {\mathrm {T O P S}}\right) = \frac {\sum_ {t = 1} ^ {T} \left(y _ {t} - p _ {t} ^ {\mathrm {T O P S}}\right) ^ {2}}{T} \leqslant \mathcal {R} \left(p _ {1: T} ^ {\mathrm {T O P S}}\right) + \frac {\log T + 1}{\epsilon T}. \tag {24}
932
+ $$
933
+
934
+ Using the Brier-score-refinement lemma E.2 to lower bound $\mathcal{BS}(p_{1:T}^{\mathrm{TOPS}})$ gives
935
+
936
+ $$
937
+ \mathcal {R} \left(p _ {1: T} ^ {\mathrm {T O P S}}\right) - \frac {\epsilon^ {2}}{4} - \epsilon \leqslant \mathcal {R} \left(p _ {1: T} ^ {\mathrm {O P S}}\right) + \frac {\log T + 1}{\epsilon T}. \tag {25}
938
+ $$
939
+
940
+ Finally, using the sharpness-refinement lemma E.1, we can replace each $\mathcal{R}$ with $\bar{y}_T - \mathrm{SHP}$ . Rearranging terms gives the final bound.
941
+
942
+ ![](images/48db565a8a0ddbde0635df6890ef9fcea9c7e60eefc42d1aa164dbcc87f9bfa9.jpg)
943
+
944
+ Proof of Theorem 3.2. The calibrating paper (Foster and Hart, 2023) is referred to as FH23 in this proof for succinctness.
945
+
946
+ Sharpness bound (16). Theorem 5 of FH23 showed that the expected Brier-score for a different hedging scheme (instead of F99), is at most the expected refinement score of the base forecast plus $\epsilon^2 + \frac{\log T + 1}{\epsilon^2T}$ . In our case, the second term remains unchanged, but because we use F99, the $\epsilon^2$ needs to be replaced, and we show that it can be replaced by $\epsilon$ next.
947
+
948
+ Let us call the combination of OPS and the FH23 hedging method as FH23-HOPS, and the calibeating forecast as $p_{1:T}^{\mathrm{FH23 - HOPS}}$ . The source of the $\epsilon^2$ term in Theorem 5 of FH23 is the following property of FH23-HOPS: for both values of $y_t \in \{0,1\}$ ,
949
+
950
+ $$
951
+ \mathbb {E} _ {t - 1} \left[ \left(y _ {t} - p _ {t} ^ {\mathrm {F H 2 3 - H O P S}}\right) ^ {2} - \left(y _ {t} - \text {A v e r a g e} \left\{y _ {s}: s < t, p _ {s} ^ {\mathrm {O P S}} = p _ {t} ^ {\mathrm {O P S}}, p _ {s} ^ {\mathrm {F H 2 3 - H O P S}} = p _ {t} ^ {\mathrm {F H 2 3 - H O P S}} \right\}\right) ^ {2} \right] \leqslant \epsilon^ {2},
952
+ $$
953
+
954
+ where $\mathbb{E}_{t - 1}[\cdot ]$ is the expectation conditional on $(y_{1:t - 1},p_{1:t - 1}^{\mathrm{FH23-hedging}},p_{1:t - 1}^{\mathrm{OPS}})$ (all that's happened in the past, and the current OPS forecast). For HOPS, we will show that
955
+
956
+ $$
957
+ Q _ {t} := \mathbb {E} _ {t - 1} \left[ \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right) ^ {2} - \left(y _ {t} - \text {A v e r a g e} \{y _ {s}: s < t, p _ {s} ^ {\mathrm {O P S}} = p _ {t} ^ {\mathrm {O P S}}, p _ {s} ^ {\mathrm {H O P S}} = p _ {t} ^ {\mathrm {H O P S}} \}\right) ^ {2} \right] \leqslant \epsilon ,
958
+ $$
959
+
960
+ for $y_{t}\in \{0,1\}$ , which would give the required result.
961
+
962
+ At time $t$ , the F99 forecast falls into one of two scenarios which we analyze separately (see Appendix C for details of F99 which would help follow the case-work).
963
+
964
+ - Case 1. This corresponds to condition A in the description of F99 in Section C. There exists a bin index $b$ such that $q = \text{mid-point}(B_b)$ satisfies
965
+
966
+ $$
967
+ \left| \text {A v e r a g e} \left\{y _ {s}: s < t, p _ {s} ^ {\text {O P S}} = p _ {t} ^ {\text {O P S}}, p _ {s} ^ {\text {H O P S}} = q \right\} - q \right| \leqslant \epsilon / 2.
968
+ $$
969
+
970
+ In this case, F99 would set $p_t^{\mathrm{HOPS}} = q$ (deterministically) for some $q$ satisfying the above. Thus,
971
+
972
+ $$
973
+ \begin{array}{l} Q _ {t} = \left(y _ {t} - q\right) ^ {2} - \left(y _ {t} - \text {A v e r a g e} \left\{y _ {s}: s < t, p _ {s} ^ {\mathrm {O P S}} = p _ {t} ^ {\mathrm {O P S}}, p _ {s} ^ {\mathrm {H O P S}} = q \right\}\right) ^ {2} \\ \leqslant \max \left(\left(y _ {t} - q\right) ^ {2} - \left(y _ {t} - q - \epsilon / 2\right) ^ {2}, \left(y _ {t} - q\right) ^ {2} - \left(y _ {t} - q + \epsilon / 2\right) ^ {2}\right) \\ \leqslant (\epsilon / 2) (2 | y _ {t} - q | + \epsilon / 2) < \epsilon , \\ \end{array}
974
+ $$
975
+
976
+ irrespective of $y_{t}$ , since $q \in [\epsilon / 2, 1 - \epsilon / 2]$ .
977
+
978
+ - Case 2. This corresponds to condition B in the description of F99 in Section C. If Case 1 does not hold, F99 randomizes between two consecutive bin mid-points $m - \epsilon / 2$ and $m - \epsilon / 2$ , where $m$ is one of the edges of the $\epsilon$ -bins (10). Define $n_1 := \text{Average}\{y_s : s < t, p_s^{\text{OPS}} = p_t^{\text{OPS}}, p_s^{\text{HOPS}} = m - \epsilon / 2\}$ and $n_2 := \text{Average}\{y_s : s < t, p_s^{\text{OPS}} = p_t^{\text{OPS}}, p_s^{\text{HOPS}} = m + \epsilon / 2\}$ . The choice of $m$ in F99 guarantees that $n_2 < m < n_1$ , and the randomization probabilities are given by
979
+
980
+ $$
981
+ \mathbb {P} _ {t - 1} \big (p _ {t} ^ {\mathrm {H O P S}} = m - \epsilon / 2 \big) = \frac {m - n _ {2}}{n _ {1} - n _ {2}}, \text {a n d} \mathbb {P} _ {t - 1} \big (p _ {t} ^ {\mathrm {H O P S}} = m + \epsilon / 2 \big) = \frac {n _ {1} - m}{n _ {1} - n _ {2}},
982
+ $$
983
+
984
+ where $\mathbb{P}_{t - 1}$ is the conditional probability in the same sense as $\mathbb{E}_{t - 1}$ . We now bound $Q_{t}$ . If $y_{t} = 1$
985
+
986
+ $$
987
+ \begin{array}{l} Q _ {t} = \mathbb {E} _ {t - 1} \left[ (y _ {t} - p _ {t} ^ {\text {H O P S}}) ^ {2} - (y _ {t} - \text {A v e r a g e} \{y _ {s}: s < t, p _ {s} ^ {\text {O P S}} = p _ {t} ^ {\text {O P S}}, p _ {s} ^ {\text {H O P S}} = p _ {t} ^ {\text {H O P S}} \}) ^ {2} \right] \\ = \frac {m - n _ {2}}{n _ {1} - n _ {2}} \left(\left(1 - (m - \epsilon / 2)\right) ^ {2} - (1 - n _ {1}) ^ {2}\right) + \frac {n _ {1} - m}{n _ {1} - n _ {2}} \left(\left(1 - (m + \epsilon / 2)\right) ^ {2} - (1 - n _ {2}) ^ {2}\right) \\ = \underbrace {\frac {m - n _ {2}}{n _ {1} - n _ {2}} \left((1 - m) ^ {2} - (1 - n _ {1}) ^ {2}\right) + \frac {n _ {1} - m}{n _ {1} - n _ {2}} \left((1 - m) ^ {2} - (1 - n _ {2}) ^ {2}\right)} _ {=: A _ {1}} \\ + \underbrace {2 \cdot (\epsilon / 2) \cdot \frac {(m - n _ {2}) (1 - m) - (n _ {1} - m) (1 - m)}{n _ {1} - n _ {2}}} _ {=: A _ {2}} \\ + \left(\epsilon / 2\right) ^ {2} \cdot \frac {n _ {1} - n _ {2}}{n _ {1} - n _ {2}}. \\ \end{array}
988
+ $$
989
+
990
+ $A_{1}$ and $A_{2}$ simplify as follows.
991
+
992
+ $$
993
+ \begin{array}{l} A _ {1} = \frac {(m - n _ {2}) (n _ {1} - m) (2 - (n _ {1} + m)) + (n _ {1} - m) (n _ {2} - m) (2 - (n _ {2} + m))}{n _ {1} - n _ {2}} \\ = \frac {(m - n _ {2}) (n _ {1} - m) (n _ {2} - n _ {1})}{n _ {1} - n _ {2}} < 0, \\ \end{array}
994
+ $$
995
+
996
+ since $n_2 < m < n_1$
997
+
998
+ $$
999
+ \begin{array}{l} A _ {2} = \epsilon \cdot \frac {(m - n _ {2}) (1 - m)}{n _ {1} - n _ {2}} + \epsilon \cdot \frac {(m - n _ {1}) (1 - m)}{n _ {1} - n _ {2}} \\ < \epsilon \cdot \frac {(m - n _ {2}) (1 - m)}{n _ {1} - n _ {2}} \quad (\text {s i n c e} m < n _ {1}) \\ < \epsilon (1 - m). \\ \end{array}
1000
+ $$
1001
+
1002
+ Overall, we obtain that for $y_{t} = 1$
1003
+
1004
+ $$
1005
+ Q _ {t} < \epsilon (1 - m) + (\epsilon^ {2} / 4) < \epsilon ,
1006
+ $$
1007
+
1008
+ where the final inequality holds since $m$ is an end-point between two bins, and thus $m \geqslant \epsilon$ . We do the calculations for $y_{t} = 0$ less explicitly since it essentially follows the same steps:
1009
+
1010
+ $$
1011
+ \begin{array}{l} Q _ {t} = \mathbb {E} _ {t - 1} \left[ (0 - p _ {t} ^ {\text {H O P S}}) ^ {2} - (0 - \text {A v e r a g e} \{y _ {s}: s < t, p _ {s} ^ {\text {O P S}} = p _ {t} ^ {\text {O P S}}, p _ {s} ^ {\text {H O P S}} = p _ {t} ^ {\text {H O P S}} \}) ^ {2} \right] \\ = \frac {m - n _ {2}}{n _ {1} - n _ {2}} \left(\left(m - \epsilon / 2\right) ^ {2} - n _ {1} ^ {2}\right) + \frac {n _ {1} - m}{n _ {1} - n _ {2}} \left(\left(m + \epsilon / 2\right) ^ {2} - n _ {2} ^ {2}\right) \\ = \frac {(m - n _ {2}) (m - n _ {1}) (m + n _ {1}) + (n _ {1} - m) (m - n _ {2}) (m + n _ {2})}{n _ {1} - n _ {2}} + \epsilon \cdot \frac {(n _ {2} - m) m + (n _ {1} - m) m}{n _ {1} - n _ {2}} + \frac {\epsilon^ {2}}{4} \\ < 0 + \epsilon m + (\epsilon^ {2} / 4) < \epsilon . \\ \end{array}
1012
+ $$
1013
+
1014
+ Finally, by Proposition 1 of FH23 and the above bound on $Q_{t}$ , we obtain,
1015
+
1016
+ $$
1017
+ \mathbb {E} \left[ \mathcal {R} \left(p _ {1: T} ^ {\mathrm {H O P S}}\right) \right] \leqslant \mathbb {E} \left[ \mathcal {B S} \left(p _ {1: T} ^ {\mathrm {H O P S}}\right) \right] \leqslant \epsilon + \mathcal {R} \left(p _ {1: T} ^ {\mathrm {O P S}}\right) + \frac {\log T + 1}{\epsilon^ {2} T}.
1018
+ $$
1019
+
1020
+ Using the sharpness-refinement lemma E.1, we replace each $\mathcal{R}$ with $\bar{y}_T - \mathrm{SHP}$ . Rearranging terms gives the sharpness result.
1021
+
1022
+ Calibration bound (17). Recall that the number of bins is $m = 1 / \epsilon$ . For some bin indices $b, b' \in \{1, 2, \ldots, m\}$ , let $S_{b \to b'} = \{t \leqslant T : p_t^{\mathrm{OPS}} \in B_b, p_t^{\mathrm{HOPS}} = \text{mid-point}(B_{b'})\}$ be the set of time instances at which the OPS forecast $p_t^{\mathrm{OPS}}$ belonged to bin $b$ , but the HOPS forecast $p_t^{\mathrm{HOPS}}$ belonged to bin $b'$ (and equals the mid-point of bin $b'$ ). Also, let $S_b = \{t \leqslant T : p_t^{\mathrm{OPS}} \in B_b\}$ be the set of time instances at which the $p_t^{\mathrm{OPS}}$ forecast belonged to bin $b$ . Thus $S_b = \bigcup_{b' = 1}^{m} S_{b \to b'}$ . Also define $N_b^{\mathrm{OPS}} = |S_b|$ and $N_b^{\mathrm{HOPS}} = \left| \{t \leqslant T : p_t^{\mathrm{HOPS}} = \text{mid-point}(B_b)\} \right|$ .
1023
+
1024
+ Now for any specific $b$ , consider the sequence $(y_{t})_{t\in S_{b}}$ . On this sequence, the HOPS forecasts correspond to F99 using just the outcomes (with no regard for covariate values once the bin of $p_t^{\mathrm{OPS}}$ is fixed). Thus, within this particular bin, we have a usual CE guarantee that F99's algorithm has for any arbitrary sequence:
1025
+
1026
+ $$
1027
+ \underbrace {\mathbb {E} \left[ \frac {1}{N _ {b} ^ {\mathrm {O P S}}} \sum_ {b ^ {\prime} = 1} ^ {m} \left| \sum_ {t \in S _ {b \rightarrow b ^ {\prime}}} \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right)\right|\right]} _ {\text {t h i s i s t h e e x p e c t e d C E o v e r t h e} S _ {b} \text {i n s t a n c e s}} \leqslant \frac {\epsilon}{2} + \frac {2}{\sqrt {\epsilon \cdot N _ {b} ^ {\mathrm {O P S}}}}. \tag {26}
1028
+ $$
1029
+
1030
+ This result is unavailable in exactly this form in Foster (1999) which just gives the reduction to Blackwell approachability, after which any finite-sample approachability bound can be used. The above version follows from Theorem 1.1 of Perchet (2014). The precise details of the Blackwell approachability set, reward vectors, and how the distance to the set can be translated to CE can be found in Gupta and Ramdas (2022a, Section 4.1).
1031
+
1032
+ Jensen's inequality can be used to lift this CE guarantee to the entire sequence:
1033
+
1034
+ $$
1035
+ \begin{array}{l} \mathbb {E} \left[ \mathbf {C E} (p _ {1: T} ^ {\mathrm {H O P S}}) \right] = \mathbb {E} \left[ \sum_ {b = 1} ^ {m} \frac {\left| N _ {b} ^ {\mathrm {H O P S}} (\widehat {y} _ {b} ^ {\mathrm {H O P S}} - \widehat {p} _ {b} ^ {\mathrm {H O P S}}) \right|}{T} \right] \\ = \mathbb {E} \left[ \sum_ {b = 1} ^ {m} \frac {\left| \sum_ {t = 1} ^ {T} \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right) \mathbb {1} \left\{p _ {t} ^ {\mathrm {H O P S}} \in B _ {b} \right\} \right|}{T} \right] \\ = \mathbb {E} \left[ \sum_ {b = 1} ^ {m} \frac {\left| \sum_ {b ^ {\prime} = 1} ^ {m} \sum_ {t \in S _ {b ^ {\prime} \rightarrow b}} \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right)\right|}{T} \right] \\ \leqslant \mathbb {E} \left[ \sum_ {b = 1} ^ {m} \sum_ {b ^ {\prime} = 1} ^ {m} \frac {\left| \sum_ {t \in S _ {b ^ {\prime} \rightarrow b}} \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right)\right|}{T} \right] \quad (\text {J e s s e n ' s i n e q u a l i t y}) \\ = \sum_ {b ^ {\prime} = 1} ^ {m} \mathbb {E} \left[ \sum_ {b = 1} ^ {m} \frac {\left| \sum_ {t \in S _ {b ^ {\prime} \to b}} \left(y _ {t} - p _ {t} ^ {\mathrm {H O P S}}\right) \right|}{T} \right] \\ \leqslant \sum_ {b ^ {\prime} = 1} ^ {m} \frac {N _ {b ^ {\prime}} ^ {\mathrm {O P S}} \left(\epsilon / 2 + 2 / \sqrt {\epsilon \cdot N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}\right)}{T} \tag {by(26)} \\ = \frac {\epsilon}{2} + \frac {2}{\sqrt {\epsilon}} \cdot \frac {\sum_ {b ^ {\prime} = 1} ^ {m} \sqrt {N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}}{\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}} \quad (\text {s i n c e} T = \sum_ {b ^ {\prime} = 1} ^ {B} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}) \\ \stackrel {(\star)} {\leqslant} \frac {\epsilon}{2} + \frac {2}{\sqrt {\epsilon}} \cdot \sqrt {\frac {m}{T}} = \frac {\epsilon}{2} + 2 \sqrt {\frac {1}{\epsilon^ {2} T}}, \\ \end{array}
1036
+ $$
1037
+
1038
+ as needed to be shown. The inequality $(\star)$ holds because, by Jensen's inequality (or AM-QM inequality),
1039
+
1040
+ $$
1041
+ \sqrt {\frac {\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}{m}} \geqslant \frac {\sum_ {b ^ {\prime} = 1} ^ {m} \sqrt {N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}}{m},
1042
+ $$
1043
+
1044
+ so that
1045
+
1046
+ $$
1047
+ \frac {\sum_ {b ^ {\prime} = 1} ^ {m} \sqrt {N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}}{\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}} = \frac {\sum_ {b ^ {\prime} = 1} ^ {m} \sqrt {N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}}{\sqrt {\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}} \cdot \frac {1}{\sqrt {\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}} \leqslant \frac {\sqrt {m}}{\sqrt {\sum_ {b ^ {\prime} = 1} ^ {m} N _ {b ^ {\prime}} ^ {\mathrm {O P S}}}} = \sqrt {m / T}.
1048
+ $$
1049
+
1050
+ ![](images/e0c062b8ee67e9a50dde7f15d0e8c278282b58688cf3b56affe48f674eefe6e6.jpg)
2023/Online Platt Scaling with Calibeating/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21e17f5425212bb38949ceb811a65e01326c35d665378440486eaba1f5e0d8ef
3
+ size 2437206
2023/Online Platt Scaling with Calibeating/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Prototype Alignment for Few-shot Policy Transfer/c93de1a6-ded9-44ff-90e7-773094c06b1f_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bad93ea6e8d48497a8100790b0cc505496953ef43eb3bda3036af55eeccf308a
3
+ size 1211959
2023/Online Prototype Alignment for Few-shot Policy Transfer/full.md ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Online Prototype Alignment for Few-shot Policy Transfer
2
+
3
+ Qi Yi $^{123}$ Rui Zhang $^{2}$ Shaohui Peng $^{243}$ Jiaming Guo $^{243}$ Yunkai Gao $^{123}$ Kaizhao Yuan $^{243}$ Ruizhi Chen $^{5}$ Siming Lan $^{123}$ Xing Hu $^{2}$ Zidong Du $^{2}$ Xishan Zhang $^{23}$ Qi Guo $^{2}$ Yunji Chen $^{24}$
4
+
5
+ # Abstract
6
+
7
+ Domain adaptation in reinforcement learning (RL) mainly deals with the changes of observation when transferring the policy to a new environment. Many traditional approaches of domain adaptation in RL manage to learn a mapping function between the source and target domain in explicit or implicit ways. However, they typically require access to abundant data from the target domain. Besides, they often rely on visual clues to learn the mapping function and may fail when the source domain looks quite different from the target domain. To address these problems, we propose a novel framework Online Prototype Alignment (OPA) to learn the mapping function based on the functional similarity of elements and is able to achieve the few-shot policy transfer within only several episodes. The key insight of OPA is to introduce an exploration mechanism that can interact with the unseen elements of the target domain in an efficient and purposeful manner, and then connect them with the seen elements in the source domain according to their functionalities (instead of visual clues). Experimental results show that when the target domain looks visually different from the source domain, OPA can achieve better transfer performance even with much fewer samples from the target domain, outperforming prior methods.
8
+
9
+ # 1. Introduction
10
+
11
+ Deep Reinforcement Learning has achieved impressive results in many domains, such as Atari (Mnih et al., 2013) and Mujoco (Lillicrap et al., 2015). However, traditional RL
12
+
13
+ <sup>1</sup>University of Science and Technology of China <sup>2</sup>SKL of Processors, Institute of Computing Technology, CAS <sup>3</sup>Cambricon Technologies <sup>4</sup>University of Chinese Academy of Sciences, China <sup>5</sup>Institute of Software Chinese Academy of Sciences. Correspondence to: Yunji Chen <sup><</sup>cyj@ict.ac.cn>.
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/e07c2577fb00083339dd28c7e72ee45a7edcd18b133d27d225c6bb23af2ba8d4.jpg)
18
+ (a) Case A: Source
19
+
20
+ ![](images/d31764ff9720634fa6dd20844ea6e6e9486348b256e71ddbaa560f776a466072.jpg)
21
+ (b) Case A: Target
22
+
23
+ ![](images/59ad151b568765c718af8b07a0db17ce03f2cf650e6b41e94204f10f4a3cd79b.jpg)
24
+ (c) Case B: Source
25
+
26
+ ![](images/5635ebea61030833f2b7e386f6fa2a0793e442dc7509da689717914daf136861.jpg)
27
+ (d) Case B: Target
28
+ Figure 1. The source and target domain for cases A (Xing et al., 2021) and B (considered in this work). Case B is more difficult than case A because we can not solely rely on visual clues to learn the mapping function between the source and target domain.
29
+
30
+ algorithms typically require many interactions with the environment (François-Lavet et al., 2018). Besides, the learned policy can easily be over-fitted to the source domain where it is trained and may collapse if faced with slight changes in the target domain (Cobbe et al., 2019; Peng et al., 2023). Therefore, it is essential to investigate how a policy can be transferred to a new environment.
31
+
32
+ When trying to achieve such transfer, one of the most critical problems is dealing with the changes to the observation distribution, also known as domain adaptation in RL (Higgins et al., 2017; Li et al., 2021). Many previous works try to solve this problem by learning a mapping function between the target and source domain. For example, (Gamrian & Goldberg, 2018a; Tzeng et al., 2015; You et al., 2017) learn an image-to-image translation model that can map the observations from the target domain back into the source domain, and therefore the policy trained in the source domain is directly applicable when equipped with such translation. Some works (Xing et al., 2021; Higgins et al., 2017; Chen et al., 2021) also learn such a mapping indirectly, in which the observations from the source and target domain are
33
+
34
+ mapped into aligned representations.
35
+
36
+ Although these works have achieved compelling performance in many tasks, they typically require access to abundant data from the target domain, which can be problematic when collecting these data is expensive. Besides, most works are applicable when the target domain looks similar in appearances to the source domain (e.g. case A in Figure 1). When faced with more challenging cases where the elements in the target domain have the same underlying functionalities but irrelevant appearances (e.g. case B in Figure 1), these methods are likely to fail. Therefore, how to quickly transfer between domains of irrelevant appearances still remains a problem.
37
+
38
+ On the other hand, it is possible for our human beings to achieve such a transfer. This is because we can utilize the functional similarity between elements to determine the mapping function between the source and target domain. For example, suppose we can get a score by eating an 'apple' and then learn to seek and eat the apples in a game. When faced with an unseen 'pear' in a new game, we find that we can also get a score by eating the 'pear', then we can quickly treat it as an 'apple' and also seek and eat the pears in the new game. In summary, the policy transfer from an 'apple' to a 'pear' is based on the fact that 'pear' and 'apple' have the same underlying functionality, i.e. both eating a 'pear' and an 'apple' can increase the score. However, learning the functional similarity of elements between source and target domains is difficult, because we have to interact actively with those unseen elements in the target domain. Thus, an efficient exploration mechanism is needed to discover the underlying functionalities.
39
+
40
+ Following the insight above, in this work, we propose a novel framework named Online Prototype Alignment (OPA) to learn the mapping function based on the functional similarity of elements and achieve the few-shot policy transfer within only several episodes. To represent the underlying functionalities of elements, we assume the elements in the tasks can be divided into several kinds of prototypes such that elements of the same prototype share the same functionalities. To discover the prototypes of unseen elements quickly, OPA introduces an exploration policy. The exploration policy is trained by maximizing the mutual information between the trajectories it produces and the prototypes of unseen elements, therefore it can interact with these unseen elements in an efficient and purposeful manner to infer their prototypes. When deployed on the target domain, OPA first distinguishes unseen elements by novelty detection. Then the exploration policy interacts with these unseen elements so that OPA can infer their prototypes based on the produced trajectories. Finally, by building a mapping function based on the discovered prototypes, we can directly transfer the policy trained in the source domain to solve the
41
+
42
+ task in the target domain. Compared with previous works, OPA introduces an exploration mechanism to learn the mapping function based on the functional similarity between elements in the source and target domain, and can efficiently achieve few-shot policy transfer even if there are no visual clues for transfer between the two domains.
43
+
44
+ The experiments are carried out on the task suite named Hunter (Yi et al., 2022). To reveal the strength of OPA, we use the original version of Hunter as the source domain and derive a new variant that looks significantly different from the original as the target domain. Compared with several baselines, OPA can achieve better transfer performance by only using a few data from the target domain, outperforming other baselines.
45
+
46
+ # 2. Related Work
47
+
48
+ Domain Adaptation in RL: The goal of domain adaptation is to address the domain shift between the source and target domain. Most domain adaptation approaches are designed to deal with the changes to the observation distribution. Current domain adaptation methods can be roughly divided into three categories: domain randomization (Tobin et al., 2017; Sadeghi & Levine, 2017; James et al., 2019), image-to-image translation (Gamrian & Goldberg, 2018a; Tzeng et al., 2015; You et al., 2017; Zhang et al., 2018), and adaptation via aligned representations (Xing et al., 2021; Higgins et al., 2017; Chen et al., 2021).
49
+
50
+ In domain randomization, a meta-simulator is required to generate many variants of the source domain. As a result, policies trained in these variants can learn to attend to the common features. However, these methods cannot work when the meta-simulator is not available, which is generally costly to attain in practice. In image-to-image translation approaches, a mapping function is learned to map the pixel observations from the target domain to the source domain. Such mapping is often learned via generative adversarial networks (GANs). In adaptation approaches via aligned representations, the source and target domain observations are mapped into a well-regularized latent space. Ideally, representations in this latent space can share consistent semantic meanings no matter which domain they come from. For example, (Xing et al., 2021) explicitly splits the latent representations into domain-specific and domain-general features and then builds policy on the domain-general features to ignore domain-specific variations.
51
+
52
+ Although these works have achieved compelling performance, they typically require access to abundant data from the target domain (or other domains that are different from the source domain). Besides, most of them rely on visual clues to learn the mapping function, which can be problematic when the elements in the target domain have irrelevant
53
+
54
+ appearances.
55
+
56
+ Object Oriented RL: The basic assumption of Object Oriented RL (OORL) is that the state space of MDPs can be represented in terms of objects, which is inspired by the fact that objects are the basic units of recognizing the world. In OORL, the agent's observations are a set of object representations, and the agent can solve the task by reasoning over these objects. By leveraging the invariance of objects' functionalities in different scenarios, policy trained in this way can often achieve better generalization ability (Yi et al., 2022; Zambaldi et al., 2019). Recent progress (Lin et al., 2020; Jiang et al., 2020) in Unsupervised Object Discovery also boosts the development of OORL. In our work, we follow the basic settings of OORL.
57
+
58
+ # 3. Preliminaries
59
+
60
+ # 3.1. Notation
61
+
62
+ We assume the underlying environment is a Markov decision process (MDP), described by the tuple $\mathcal{M} = (S, A, P_T, R)$ where $S$ is the state space, $A$ the action space, $P_T: S_t \times A_t \times S_{t+1} \to [0, 1]$ the transition probability function which determines the distribution of next state given current state and action, and $R: S_t \times A_t \times S_{t+1} \to \mathbb{R}$ the reward function. Given the current state $s \in S$ , an agent chooses its action $a \in A$ according to a policy function $a \sim \pi(\cdot | s)$ . This action will update the system state to a new state $s'$ according to the transition function $P_T$ , and then a reward $r = R(s, a, s') \in \mathbb{R}$ is given to the agent. The goal of the agent is to maximize the expected cumulative rewards by learning a policy $\pi$ :
63
+
64
+ $$
65
+ J (\pi) = \mathbb {E} _ {\tau \sim \pi} \sum_ {t = 0} ^ {T} R \left(s _ {t}, a _ {t}, s _ {t + 1}\right), \tag {1}
66
+ $$
67
+
68
+ where $\tau := (s_0, a_0, r_0, \dots, s_T)$ is the trajectory generated by $\pi$ .
69
+
70
+ In this work, we also assume the state space $S$ can be broken into a set of object representations: $S = \prod_{i=1}^{N} O$ , where $O$ is the space of object representations.
71
+
72
+ # 3.2. Problem Statement
73
+
74
+ We consider the domain adaptation problem in which a task policy $\pi_{task}$ is first trained in the source domain $\mathcal{M}_S = (S^{source}, A, P_T^{source}, R^{source})$ and then transferred to the target domain $\mathcal{M}_T = (S^{target}, A, P_T^{target}, R^{target})$ . We also assume that the $\mathcal{M}_S$ and $\mathcal{M}_T$ share the same underlying dynamics and reward structures such that there exists a mapping function $f: S^{target} \to S^{source}$ and $\pi_{task}$ can achieve optimal transfer performance when equipped with $f$ (i.e. $\pi_{task} \circ f$ ).
75
+
76
+ Algorithm 1 The training procedure of OPA
77
+ Input: $\mathcal{M}_S$
78
+ Output: $\pi_{task},\pi_{exp},q_{\theta},\Psi_{\mathrm{IsUnseen}}$
79
+ /\*Train $\pi_{task}^{*}$
80
+ Train $\pi_{task}$ to solve $\mathcal{M}_S$ , and save the historic trajectories as $D_{his}$
81
+ /\*Train $\Psi_{\mathrm{IsUnseen}}*$
82
+ Train $g_{enc},g_{dec}$ on $\mathcal{D}_{his}$ , obtaining $\Psi_{\mathrm{IsUnseen}}$ . (see Eq.(3))
83
+ /\*Pre-train $q_{\theta}$ using $\mathcal{D}_{his}^{*}/$
84
+ repeat Sample a batch of episodes $\{\tau_k\} _k$ from $\mathcal{D}_{his}$ Sample a subset of prototypes $I\subseteq P_{seen}$ and an injection $\psi :I\to P_{unseen}$ Update $q_{\theta}$ using $\{\tau_k\} _k,f_{I,\psi}$ according to Eq.(6).
85
+ until convergence
86
+ /\*Train $\pi_{exp}$ using $\mathcal{M}_S$ and $q_{\theta}^{*}/$
87
+ repeat Sample $I\subseteq P_{seen}$ and $\psi :I\rightarrow P_{unseen}$ Running the latest $\pi_{exp}$ on $\mathcal{M}_S$ (with $f_{I,\psi}$ ) to obtain trajectories $\{\tau_k\} _k$ Relabel the rewards of $\{\tau_k\} _k$ using the intrinsic rewards generated by $q_{\theta}$ . (see Eq.(7)) Update $\pi_{exp}$ with PPO using $\{\tau_k\} _k$
88
+ until certain steps
89
+
90
+ # 4. Method
91
+
92
+ As stated in Section 3, we assume the observation space can be divided into the direct product of multiple object representation spaces: $S = \prod_{i=1}^{N} O$ . We further assume that each object $o$ has been assigned a category label $o^c$ according to its appearance, which can be obtained by oracle or by unsupervised clustering on objects.
93
+
94
+ The goal of OPA is to learn a prototype mapping function $f_{proto}:O\to P_{seen} = \{1,2,\dots,C\}$ that assigns a prototype $o^p$ to each object $o$ in $\mathcal{M}_S$ and $\mathcal{M}_T$ such that objects within the same prototype share the same functionalities. Intuitively, the prototype of an object can represent its functionality, therefore objects with the same prototype can be treated equally no matter which domain $(\mathcal{M}_S$ or $\mathcal{M}_T)$ they come from.
95
+
96
+ In $\mathcal{M}_S$ , we simply define $f_{proto}$ as $f_{proto}|_S(o) = o^c$ (i.e. $o^p = o^c$ ) which means prototypes are exactly the category labels of objects. This is because objects with the same appearances share the same functionalities. However, it is not the case in $\mathcal{M}_T$ because we have to map objects into the prototype space aligned with $\mathcal{M}_S$ such that our task policy $\pi_{task}$ is applicable. An object in $\mathcal{M}_T$ can be seen or unseen depending on whether it has shown in $\mathcal{M}_S$ . For the seen object, we can safely apply $f_{proto}|_S$ to obtain its prototype. For the unseen object, $f_{proto}|_S$ is not applicable,
97
+
98
+ ![](images/1504689c02098eb68448071fe8ef0b9d25930cf9f7405d50b39d396aa02997d2.jpg)
99
+ Figure 2. The training and test procedures of OPA.
100
+
101
+ therefore we have to explore its functionality to determine its prototype.
102
+
103
+ The overall procedures of OPA are presented in Algorithm 1 and Figure 2. In the training phase, we first train an indicator $\Psi_{\mathrm{IsUnseen}}$ to distinguish unseen objects (Section 4.1). Then, we train an exploration policy $\pi_{exp}$ and an inference model $q_{\theta}$ in $\mathcal{M}_S$ (Section 4.2), which aim to efficiently discover the prototypes of unseen objects. In the test phase, we obtain $f_{proto}|_T$ for $\mathcal{M}_T$ by combining $\Psi_{\mathrm{IsUnseen}}, \pi_{exp}$ and $q_{\theta}$ together (Section 4.3), with which $\pi_{task}$ can be transferred to $\mathcal{M}_T$ .
104
+
105
+ # 4.1. Novelty Detection
106
+
107
+ For an object in $\mathcal{M}_T$ , we want to classify whether it has shown in $\mathcal{M}_S$ . This problem is actually a task of novel detection, and many approaches in this field are able to solve it. For simplicity, in this work, we consider a native approach that relies on reconstruction loss.
108
+
109
+ We collect some object samples $O_S = \{o_j\}_{j=1}^M$ from $\mathcal{M}_S$ , and train an auto-encoder (consisting of $g_{enc}$ and $g_{dec}$ ) that tries to map $o_j \in O_S$ into a latent space via $g_{enc}$ , and then map the resulting latent back into $o_j$ via $g_{dec}$ . Since the $g_{enc}, g_{dec}$ will be over-fitted to the $O_S$ , it will present high reconstruction loss if faced with out-of-distribution samples, and therefore can be a hint for unseen objects:
110
+
111
+ $$
112
+ \Psi_ {\text {I s U n s e e n}} (o) = \left\| g _ {d e c} \circ g _ {e n c} (o) - o \right\| _ {2} \geq \eta . \tag {2}
113
+ $$
114
+
115
+ For a seen object in $\mathcal{M}_T$ , we can adopt $f_{proto}|_S$ to obtain its prototype. For an unseen object, we want to remind the agent to explore its functionalities, therefore we also map it into a special prototype space $P_{unseen}$ via an injection $\phi (P_{seen} \cap P_{unseen} = \emptyset)$ . Therefore, the overall mapping
116
+
117
+ function of novelty detection is:
118
+
119
+ $$
120
+ f _ {N D} (o) = \left\{ \begin{array}{l l} f _ {p r o t o} | _ {S} (o), & \text {i f n o t} \Psi_ {\text {I s U n s e e n}} (o) \\ \phi \left(o ^ {c}\right), & \text {i f} \Psi_ {\text {I s U n s e e n}} (o) \end{array} , \right. \tag {3}
121
+ $$
122
+
123
+ where $o^c$ is the category label of $o$ , and $\phi$ is an injection that maps $o^c$ to $P_{unseen} = \{C + 1, \dots, 2C\}$ . Note that the exact value of $\phi(o^c)$ does not matter because the prototypes of objects in $P_{unseen}$ are all unknown and require to be explored.
124
+
125
+ # 4.2. Online Prototype Alignment
126
+
127
+ In this section, we aim to train an exploration policy $\pi_{exp}$ that can interact with unseen objects of $\mathcal{M}_T$ (i.e., $\{o:f_{ND}(o)\in P_{\text{unseen}}\}$ ) in a purposeful manner to discover their prototypes. However, we have no access to $\mathcal{M}_T$ in the training phase; Even though we do have it, we do not know the real prototypes of unseen objects which are needed for training $\pi_{exp}$ .
128
+
129
+ Fortunately, we can create some 'imaginary' environments from $\mathcal{M}_S$ to train $\pi_{exp}$ in which we have access to groundtruth prototypes via $f_{proto}|_S$ . At the beginning of an episode, we randomly sample a subset of prototypes $I \subseteq P_{seen}$ and then map them into $P_{unseen}$ :
130
+
131
+ $$
132
+ f _ {I, \psi} (o) = \left\{ \begin{array}{l l} o ^ {p}, & \text {i f} o ^ {p} \notin I \\ \psi \left(o ^ {p}\right), & \text {i f} o ^ {p} \in I \end{array} , \right. \tag {4}
133
+ $$
134
+
135
+ where $o^p = f_{proto}|_S(o)$ is the prototype of $o$ and $\psi :I\to P_{unseen}$ is a randomly sampled injection. Note that the randomness of $\psi$ is essential, otherwise we can easily infer the prototypes by leveraging $\psi$ , which is actually a backdoor of non-sense. Both $I$ and $\psi$ keep fixed in the remaining part of the episode. Without loss of generality, we further assume the codomain of $\psi$ is $P_{unseen}^{I} = \{C + 1,C + 2,\dots,C + |I|\}$ .
136
+
137
+ Compared Eq.(4) and Eq.(3), we can see that they induce the same prototype encodings (if we ignore the differences in $P_{\text{unseen}}$ ) when $I = \{o^c : \Psi_{\text{IsUnseen}}(o) = \text{True}\}$ , which means that we can learn $\pi_{\text{exp}}$ in $\mathcal{M}_S$ with $f_{I,\psi}$ and then apply it to $\mathcal{M}_T$ with $f_{ND}$ .
138
+
139
+ The exploration policy $\pi_{exp}$ is trained in $\mathcal{M}_S$ equipped with $f_{I,\psi}$ . The aim of $\pi_{exp}$ is to interact with objects in the $P_{\text{unseen}}^I$ , and $\pi_{exp}$ 's behaviour should be informative to infer the original prototypes. To this end, we propose to maximize the mutual information of the trajectory induced by $\pi_{exp}$ (which is denoted as $\tau_{exp}$ ) and the original prototypes of $P_{\text{unseen}}^I$ (which are $I' = [\psi^{-1}(C + 1), \dots, \psi^{-1}(C + |I|)]$ ). Formally, $\pi_{exp}$ is trained to maximize the following objec
140
+
141
+ tive:
142
+
143
+ $$
144
+ \begin{array}{l} M I \left(\tau_ {e x p}; I ^ {\prime}\right) = H \left(I ^ {\prime}\right) - H \left(I ^ {\prime} \mid \tau_ {e x p}\right) \\ \geq H \left(I ^ {\prime}\right) + \mathbb {E} _ {\tau \sim I, \psi , \pi_ {e x p}} \log q _ {\theta} \left(I ^ {\prime} \mid \tau\right) \\ = \mathbb {E} _ {\tau \sim I, \psi , \pi_ {e x p}} \sum_ {t = 0} ^ {T} \log \frac {q _ {\theta} \left(I ^ {\prime} \mid \tau_ {: t + 1}\right)}{q _ {\theta} \left(I ^ {\prime} \mid \tau_ {: t}\right)} + C o n s t, \tag {5} \\ \end{array}
145
+ $$
146
+
147
+ where $q_{\theta}$ is an inference model that can predict $I'$ given a trajectory, $\tau_{:t} = [s_0, a_0, r_0, \dots, s_t]^1$ is the sub-trajectory consisting of first $t$ transitions in $\tau$ . The second line in Eq.(5) comes from the lower bound proposed in (Barber & Agakov, 2003), and the third line follows from the expansion along the time-step dimension and ignores the terms that are not related to $\pi_{task}$ . Note that $MI(\tau^{exp}; I')$ can be maximized by maximizing the lower bound in Eq.(5).
148
+
149
+ To predict $I^{\prime}$ as soon as possible in an episode, $q_{\theta}$ is trained using all sub-trajectories $\tau_{:t}$ , and the loss function is given as:
150
+
151
+ $$
152
+ L (\theta) = - \mathbb {E} _ {\tau ; t \sim I ^ {\prime}, \psi , \pi_ {e x p}} \log q _ {\theta} \left(I ^ {\prime} | \tau ; t\right). \tag {6}
153
+ $$
154
+
155
+ To optimize $\pi_{exp}$ , we notice that the last line in Eq.(5) is quite similar to the objective of RL (see Eq.(1)). Therefore we can maximize Eq.(5) by giving $\pi_{exp}$ an intrinsic reward as shown in Eq.(7) and training it using any RL algorithm such as PPO (Schulman et al., 2017):
156
+
157
+ $$
158
+ r _ {t} ^ {e x p} = \log \frac {q _ {\theta} \left(I ^ {\prime} \mid \tau_ {: t + 1}\right)}{q _ {\theta} \left(I ^ {\prime} \mid \tau_ {: t}\right)}. \tag {7}
159
+ $$
160
+
161
+ Intuitively, Eq.(7) will assign a positive reward to $\pi_{exp}$ if the environment transition at step $t$ (i.e. $(s_t, a_t, r_t, s_{t+1})$ ) is useful to predict $I'$ , which will motivate $\pi_{exp}$ to learn efficient exploration behaviours. These behaviours can reveal the underlying functionalities of unseen elements quickly, therefore are essential for few-shot transfer.
162
+
163
+ In practice, the modelling of $q_{\theta}$ and $\pi_{exp}$ is also important because a proper design can introduce useful inductive biases and facilitate the training of $q_{\theta}$ and $\pi_{exp}$ . Please refer to Appendix for more details.
164
+
165
+ # 4.3. Policy Reuse
166
+
167
+ Our task policy $\pi_{task}$ is built on the prototype space. Therefore, we wish to derive $f_{proto}|_T$ that can infer the prototypes in $\mathcal{M}_T$ such that our task policy is applicable when equipped with $f_{proto}|_T$ (i.e. $\pi_{task} \circ f_{proto}|_T$ ).
168
+
169
+ In $\mathcal{M}_T$ , we first run $\pi_{exp}$ (with $f_{ND}$ to label unseen elements) for several episodes. For each episode, we utilize $q_{\theta}$ to infer the probability distribution of prototypes. We average these distributions to combine them together and then obtain the final prototypes $\{o_i^p\}_i$ of objects $\{o_i\}_i$ based on
170
+
171
+ the aggregate distribution. Given $\{(o_i, o_i^p)\}_i$ , we train a classifier $f_{cls}$ that can maps $o_i$ to $o_i^p$ . In practice, we use PCA and LinearSVC implemented in (Pedregosa et al., 2011) to realize this classifier because they are light-weighted and run fast. Together with the notations in Eq.(2), our $f_{proto}|_T$ can be formulated as:
172
+
173
+ $$
174
+ f _ {p r o t o} | _ {T} (o) = \left\{ \begin{array}{l l} f _ {p r o t o} | _ {S} (o), & \text {i f n o t} \Psi_ {\Psi_ {\mathrm {I s U n s e e n}}} (o) \\ f _ {c l s} (o), & \text {i f} \Psi_ {\mathrm {I S U n s e e n}} (o) \end{array} . \right. \tag {8}
175
+ $$
176
+
177
+ # 5. Experiment
178
+
179
+ # 5.1. Environment Setup
180
+
181
+ In this work, we mainly consider the task suite Hunter (Yi et al., 2022) (and also provide results on Crafter (Hafner, 2022) in the Appendix). Hunter is an environment that is designed to be object-centric, which is suitable for our method. It contains 5 kinds of objects in total: $\square$ , $\square$ , $\square$ , and $\square$ , as shown in Figure 1 (c). The goal is to train an agent that controls $\square$ to interact with $\square$ and $\square$ . The same action may result in different rewards when interacting with different objects, e.g., the agent will get a positive reward $(=1)$ if $\square$ shoots at $\square$ , but a negative reward $(-1)$ if at $\square$ . Hunter also provides different variants (e.g., Hunter-Z1C1, Hunter-Z2C2,...), which differ in the number of objects.
182
+
183
+ To test the transfer ability of OPA, we derive a new environment from Hunter by changing the appearances of objects $(\square, \square, \square, \square, \rightarrow \square, \square, \square, \square^2)$ , as shown in Figure 1 (d). The original and the new environments serve as the source domain and target domain, respectively. To obtain object representations, we divide the $64 \times 64 \times 3$ image (the observation space in Hunter) into $8 \times 8$ tiles, and each tile is of shape $8 \times 8 \times 3$ . By the design of Hunter, each tile contains exactly one object. Therefore, these 64 tiles can be used as object representations for OPA.
184
+
185
+ # 5.1.1. BASELINE SETTINGS
186
+
187
+ We compare OPA with other approaches designed for domain adaptation, including DARLA(Higgins et al., 2017), LUSR(Xing et al., 2021), UNIT4RL (Gamrian & Goldberg, 2018b) and LTMBR (Sun et al., 2022). DARLA relies on learning disentangled representations to achieve transfer. It utilizes a special $\beta$ -VAE in which the reconstruction loss is replaced with a perceptual similarity loss. LUSR explicitly splits the latent into domain-specific and domain-general features and only relies on domain-general features to build task policy. UNIT4RL utilizes an image-to-image translation approach named UNIT (Liu et al., 2017) that can translate images between domains with unpaired samples. When deployed in the target domain, UNIT4RL translates
188
+
189
+ Table 1. The mean and standard deviation of episode returns across 4 seeds, both in the source and target domain. The UNIT4RL(LTMBR)@nM (n=0,3,5) means the UNIT4RL(LTMBR) fine-tuned for n million environment steps in the target domain.
190
+
191
+ <table><tr><td></td><td colspan="2">Hunter-Z1C1</td><td colspan="2">Hunter-Z2C2</td><td colspan="2">Hunter-Z3C3</td><td colspan="2">Hunter-Z4C4</td></tr><tr><td></td><td>Source</td><td>Target</td><td>Source</td><td>Target</td><td>Source</td><td>Target</td><td>Source</td><td>Target</td></tr><tr><td>PPO</td><td>1.73 ± 0.02</td><td>-0.01 ± 0.09</td><td>3.04 ± 0.28</td><td>-0.03 ± 0.13</td><td>4.15 ± 0.62</td><td>-0.04 ± 0.14</td><td>5.12 ± 0.21</td><td>-0.03 ± 0.15</td></tr><tr><td>DARLA</td><td>1.25 ± 0.07</td><td>-0.01 ± 0.14</td><td>1.76 ± 0.06</td><td>-0.02 ± 0.13</td><td>1.91 ± 0.09</td><td>0.01 ± 0.17</td><td>2.23 ± 0.09</td><td>0.02 ± 0.2</td></tr><tr><td>LUSR</td><td>1.14 ± 0.02</td><td>-0.33 ± 0.23</td><td>1.19 ± 0.06</td><td>-0.03 ± 0.15</td><td>0.89 ± 0.23</td><td>-0.05 ± 0.19</td><td>0.90 ± 0.16</td><td>-0.03 ± 0.20</td></tr><tr><td>UNIT4RL@0M</td><td>1.73 ± 0.02</td><td>0.22 ± 1.10</td><td>3.04 ± 0.28</td><td>0.81 ± 2.12</td><td>4.15 ± 0.62</td><td>-0.87 ± 0.40</td><td>5.12 ± 0.21</td><td>1.34 ± 3.31</td></tr><tr><td>LTMBR@0M</td><td>1.50 ± 0.02</td><td>0.00 ± 0.02</td><td>2.73 ± 0.03</td><td>-0.01 ± 0.04</td><td>3.89 ± 0.08</td><td>-0.01 ± 0.04</td><td>4.68 ± 0.06</td><td>-0.03 ± 0.04</td></tr><tr><td>OPA(ours)</td><td>1.65 ± 0.05</td><td>1.71 ± 0.05</td><td>3.22 ± 0.07</td><td>3.03 ± 0.31</td><td>4.40 ± 0.11</td><td>4.47 ± 0.18</td><td>5.61 ± 0.06</td><td>5.68 ± 0.30</td></tr><tr><td>UNIT4RL@3M</td><td>-</td><td>1.35 ± 0.33</td><td>-</td><td>3.13 ± 0.26</td><td>-</td><td>3.84 ± 0.05</td><td>-</td><td>4.67 ± 0.77</td></tr><tr><td>UNIT4RL@5M</td><td>-</td><td>1.68 ± 0.05</td><td>-</td><td>3.24 ± 0.14</td><td>-</td><td>4.35 ± 0.03</td><td>-</td><td>5.40 ± 0.4</td></tr><tr><td>LTMBR@3M</td><td>-</td><td>1.27 ± 0.05</td><td>-</td><td>2.14 ± 0.07</td><td>-</td><td>2.83 ± 0.07</td><td>-</td><td>3.30 ± 0.12</td></tr><tr><td>LTMBR@5M</td><td>-</td><td>1.38 ± 0.04</td><td>-</td><td>2.51 ± 0.10</td><td>-</td><td>3.64 ± 0.11</td><td>-</td><td>4.63 ± 0.16</td></tr></table>
192
+
193
+ Table 2. The performance ratio of the target and source domain (higher is better) averaged across all environments. Both UNIT4RL and LTMBR need more than 3M adaptation steps in the target domain to match up with OPA.
194
+
195
+ <table><tr><td>PPO</td><td>DARLA</td><td>LUSR</td><td>UNIT4RL@0M</td><td>LTMBR@0M</td><td>OPA(ours)</td><td>UNIT4RL@3M</td><td>LTMBR@3M</td></tr><tr><td>-0.01</td><td>-0.00</td><td>-0.1</td><td>0.11</td><td>0.00</td><td>1.00</td><td>0.91</td><td>0.84</td></tr></table>
196
+
197
+ the observations back into the source domain and further fine-tunes the task policy using the translated observations. LTMBR introduces an auxiliary task to help the learning of representations in the target domain, which also includes a fine-tuning stage.
198
+
199
+ All approaches are trained with PPO using the same hyperparameters. For OPA, UNIT4RL and LTMBR, we train the task policy $\pi_{task}$ for 25M steps in the source domain. OPA uses additional 10M steps in the source domain to train $\pi_{exp}$ , and four episodes in the target domain to infer prototypes. Since the source domain and target domain are totally different, we also set $I = P_{seen}$ to facilitate the training of $\pi_{exp}$ . For LUSR and DARLA, we find $\pi_{task}$ improves much more slowly, therefore we train $\pi_{task}$ for 100M steps. Since UNIT4RL needs observations from the target domain, we collect 0.5M steps in the target domain via a random policy. This dataset is also granted to LUSR<sup>3</sup>. For other details, please refer to our Appendix.
200
+
201
+ # 5.1.2. RESULTS
202
+
203
+ In Table 1, we present the performance results for all baselines. Because we are interested in the transfer performance, therefore we also calculate the ratio of performance between
204
+
205
+ ![](images/4995118d130c8ab2e42d555cb4ea4f5f1e95abd304c285be9722dced37d814a7.jpg)
206
+ Figure 3. The observations (first row) in the target domain, (second row) generated from the first row using a ground truth mapping function, and (third row) generated using UNIT4RL trained with 4 different seeds.
207
+
208
+ the target and source domain (ratio $= \frac{\text{performance}(\mathcal{M}_T)}{\text{performance}(\mathcal{M}_S)}$ ) in Table 2. From the results reported in Table 1 and 2, we can conclude that OPA achieves best performance in all tasks.
209
+
210
+ In DARLA and LUSR, we find that the $\pi_{task}$ improves much more slowly than other baselines, therefore we train $\pi_{task}$ for 100M steps in the source domain, as we described
211
+
212
+ ![](images/8d3d4551547a455609e7e62ee8fc3dcd2488e8995a926f21644407e5d79f79e5.jpg)
213
+ Figure 4. The ratio of episodes that OPA can successfully find the ground truth prototype alignment along the training procedure of $\pi_{exp}$ . After training, OPA can find the ground truth prototypes in a single episode with a probability of more than 0.8.
214
+
215
+ ![](images/c2b71498459ca56ee59960245478835b62374763f07c9a6fc0e949caa9513690.jpg)
216
+
217
+ ![](images/1716c2c2d21cc607f5c4f8a3186167bc5a7f49914292c460f32a2a74d2d4dd98.jpg)
218
+
219
+ ![](images/b1a3e3894a8ca5d58050f4b92bfa1d64fc9abb3d8930349c3b3798b5e662e7a1.jpg)
220
+
221
+ ![](images/4b8e0db1e7f9fb68212a04c6f8d23e86c560715823ff3bb2aa7d6bdc399608cf.jpg)
222
+ Figure 5. The exploration return produced by the inference model along the training procedure of $\pi_{exp}$ . There is an obvious positive correlation between this return and the ratio reported in Figure 4.
223
+
224
+ ![](images/12e25679a4a65424cb89a2b11495fbea560f6ea48f7d60c90a97bf201ded82cc.jpg)
225
+
226
+ ![](images/0e969ea4088d281c27697146ccc7e651f94085987245174287e4beceff5e2e8e.jpg)
227
+
228
+ ![](images/5fed4c659416184f6fa66f5bc9bebe1cfce7e6d866ec3d90f373c31ec7545a47.jpg)
229
+
230
+ in the baseline settings. However, even with 4x steps, we can still find $\pi_{task}$ can not match up with others. We argue that this is because both DARLA and LUSR pre-train an encoder to extract a vectorized latent from observations (and keep frozen in the training of $\pi_{task}$ ), which ignores the fact that the environments are object-oriented and therefore results in poor performance.
231
+
232
+ Despite the inferior task performance of DARLA and LUSR in the source domain, they also totally fail to transfer $\pi_{task}$ to the target domain. For DARLA, this is not surprising because it does not use any additional data from the target domain and is solely trained in the source domain. For LUSR, we find that the domain-general and domain-specific features are not well-regularized (see Appendix), in that the domain-specific features can also contain important features such as the position of objects. Therefore, the domain-general features may lose important information, which can also explain its inferior task performance compared with DARLA in the source domain.
233
+
234
+ For UNIT4RL and LTMBR, we further fine-tune $\pi_{task}$ for 3M and 5M steps in the target domain. As shown in Table 1, both UNIT4RL and LTMBR accelerate the fine-tuning
235
+
236
+ process and only spend less than 5M steps to match up the PPO policy trained for 25M steps. Compared with these approaches, OPA only needs about 100 steps in the target domain to achieve almost optimal transfer performance, which is significantly less than the need of UNIT4RL and LTMBR (3M~5M).
237
+
238
+ To further expose the failure mode of UNIT4RL@0M and other image-to-images approaches for domain adaptation, we present the translation results of UNIT4RL in Figure 3. We can see that UNIT4RL can discover the mapping between $\rightarrow$ and $\rightarrow$ because these objects have unique existence distribution compared with others. However, UNIT4RL fails to reliably learn the mappings between $\rightarrow$ and $\rightarrow$ in that each different trial can result in a different mapping. A similar phenomenon should also appear in LUSR, although not explicitly. As we have argued before, this is because these objects can not be distinguished solely via visual clues, and therefore we have to rely on their functionalities to learn the mapping, which is one of the main motivations of our work.
239
+
240
+ Table 3. The adaptation performance of OPA with different number of exploration episodes. OPA can achieve high performance (0.8) even with only 1 episode.
241
+
242
+ <table><tr><td></td><td>Hunter-Z1C1</td><td>Hunter-Z2C2</td><td>Hunter-Z3C3</td><td>Hunter-Z4C4</td><td>Aggregate Performance Ratio</td></tr><tr><td>OPA@1episode</td><td>1.41</td><td>2.21</td><td>3.48</td><td>4.64</td><td>0.80</td></tr><tr><td>OPA@2episodes</td><td>1.67</td><td>2.92</td><td>4.23</td><td>5.44</td><td>0.96</td></tr><tr><td>OPA@4episodes</td><td>1.71</td><td>3.05</td><td>4.47</td><td>5.68</td><td>1.00</td></tr><tr><td>OPA@16episodes</td><td>1.68</td><td>3.12</td><td>4.45</td><td>5.63</td><td>1.00</td></tr></table>
243
+
244
+ Table 4. The necessity of $\pi_{exp}$ . We equip OPA with different exploration policies (i.e. $\pi_{exp}, \pi_{random}, \pi_{task}$ ), and run OPA for a single episode in the target domain of Hunter-Z1C1. $\pi_{exp}$ is much more efficient for exploration than $\pi_{random}$ and $\pi_{task}$ .
245
+
246
+ <table><tr><td></td><td>πexp</td><td>πrandom</td><td>πtask</td></tr><tr><td>Ratio of Correct Mapping</td><td>0.86</td><td>0.32</td><td>0.28</td></tr><tr><td>Ratio of Adaptation Performance</td><td>0.85</td><td>0.21</td><td>0.23</td></tr><tr><td>Average Number of Informative Interactions</td><td>1.62</td><td>0.12</td><td>0.08</td></tr></table>
247
+
248
+ # 5.2. Ablation Study
249
+
250
+ # 5.2.1. THE QUALITY OF PROTOTYPE ALIGNMENT
251
+
252
+ To better evaluate the quality of prototypes discovered by OPA, in Figure 4 we plot the ratio of episodes that OPA can successfully match with the ground truth prototypes of unseen objects in the target domain. We can see that this ratio continues to increase during the training process of $\pi_{exp}$ and eventually reaches $0.8+$ for all environments. This means OPA can find the ground truth prototypes in a single episode with a probability of more than 0.8, which can be further improved by multi-episode exploration.
253
+
254
+ In Figure 5, we plot the exploration return (produced by $q_{\theta}$ ) of $\pi_{exp}$ . We can notice that there is an obvious positive correlation between this return and the ratio plotted in Figure 4. This means that the intrinsic reward generated by $q_{\theta}$ is informative and instructive because when following this reward $\pi_{exp}$ can improve its ability to find the ground truth prototypes.
255
+
256
+ In our experiment setting, OPA takes four episodes in the target domain for exploration. In Table 3, we report the performance of OPA with other numbers of episodes. We can see that OPA achieves a performance ratio of 0.8 even only has access to a single episode in the target domain, and two episodes can quickly improve this ratio to 0.96. This means OPA can still obtain prototype assignments of relatively high quality in the absence of enough exploration chances.
257
+
258
+ # 5.2.2. THE NECESSITY OF $\pi_{exp}$
259
+
260
+ In OPA, we put effort into training $\pi_{exp}$ , and one may ask whether $\pi_{exp}$ can pay back. To answer this question, we
261
+
262
+ compare $\pi_{exp}$ with other easy-to-obtain exploration policies in Hunter-Z1C1, which includes a random policy $\pi_{random}$ and the task policy $\pi_{task}$ .
263
+
264
+ The results are shown in Table 4. We can see that $\pi_{exp}$ is much more efficient for exploration than $\pi_{random}$ and $\pi_{task}$ . Note that the performance of $\pi_{task}$ is almost the same with $\pi_{random}$ , which means that $\pi_{task}$ can not present meaningful behaviours in the target domain to facilitate the inference of $q_{\theta}$ .
265
+
266
+ To further investigate the difference between $\pi_{exp}$ and $\pi_{random} \& \pi_{task}$ , in Table 4 we also report the average number of informative interactions in an episode, which includes meaningful interactions between objects that are useful for distinguishing the prototypes and therefore informative for the functionalities of objects. As shown in Table 4, we can see that $\pi_{exp}$ will manage to find these informative interactions, whereas $\pi_{random}$ and $\pi_{task}$ do not present such a purposeful behaviour.
267
+
268
+ # 6. Conclusion
269
+
270
+ In this paper, we propose a novel framework named OPA that aims to transfer a policy to an unfamiliar environment in a few-shot manner. The key of OPA is to introduce an exploration mechanism that can purposefully interact with the unseen elements in the target domain. By doing so, we can build a mapping function between these unseen elements to seen elements according to their functionalities, and then transfer the policy trained in the source domain to the target domain. Our experiments show that OPA can not only achieve better transfer performance on tasks in which other baselines fail but also consume much fewer samples from the target domain.
271
+
272
+ # Acknowledgements
273
+
274
+ This work is partially supported by the NSF of China(under Grants 62102399, 61925208, 62002338, 62222214, U22A2028, U19B2019), Beijing Academy of Artificial Intelligence (BAAI), CAS Project for Young Scientists in Basic Research(YSBR-029), Youth Innovation Promotion Association CAS and Xplore Prize.
275
+
276
+ # References
277
+
278
+ Barber, D. and Agakov, F. V. The im algorithm: a variational approach to information maximization. In NeurIPS, 2003.
279
+ Chen, X.-H., Jiang, S., Xu, F., Zhang, Z., and Yu, Y. Cross-modal domain adaptation for cost-efficient visual reinforcement learning. In NeurIPS, 2021.
280
+ Cho, K., van Merrienboer, B., Bahdanau, D., and Bengio, Y. On the properties of neural machine translation: Encoder-decoder approaches. In SSST@EMNLP, 2014.
281
+ Cobbe, K., Klimov, O., Hesse, C., Kim, T., and Schulman, J. Quantifying generalization in reinforcement learning. In ICML, 2019.
282
+ François-Lavet, V., Henderson, P., Islam, R., Bellemare, M. G., and Pineau, J. An introduction to deep reinforcement learning. Found. Trends Mach. Learn., 2018.
283
+ Gamrian, S. and Goldberg, Y. Transfer learning for related reinforcement learning tasks via image-to-image translation. In ICML, 2018a.
284
+ Gamrian, S. and Goldberg, Y. Transfer learning for related reinforcement learning tasks via image-to-image translation. In ICML, 2018b.
285
+ Hafner, D. Benchmarking the spectrum of agent capabilities. In ICLR, 2022.
286
+ Higgins, I., Pal, A., Rusu, A. A., Matthew, L., Burgess, C. P., Pritzel, A., Botvinick, M. M., Blundell, C., and Lerchner, A. Darla: Improving zero-shot transfer in reinforcement learning. In ICML, 2017.
287
+ James, S., Wohlhart, P., Kalakrishnan, M., Kalashnikov, D., Irpan, A., Ibarz, J., Levine, S., Hadsell, R., and Bousmalis, K. Sim-to-real via sim-to-sim: Data-efficient robotic grasping via randomized-to-canonical adaptation networks. CVPR, 2019.
288
+ Jiang, J., Janghorbani, S., de Melo, G., and Ahn, S. SCALAR: generative world models with scalable object representations. In ICLR, 2020.
289
+ Li, B., Francois-Lavet, V., Doan, T. V., and Pineau, J. Domain adversarial reinforcement learning. *ArXiv*, 2021.
290
+
291
+ Lillicrap, T. P., Hunt, J. J., Pritzel, A., Heess, N. M. O., Erez, T., Tassa, Y., Silver, D., and Wierstra, D. Continuous control with deep reinforcement learning. CoRR, 2015.
292
+ Lin, Z., Wu, Y., Peri, S. V., Sun, W., Singh, G., Deng, F., Jiang, J., and Ahn, S. SPACE: unsupervised object-oriented scene representation via spatial attention and decomposition. In ICLR, 2020.
293
+ Liu, M.-Y., Breuel, T. M., and Kautz, J. Unsupervised image-to-image translation networks. *ArXiv*, 2017.
294
+ Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., and Riedmiller, M. A. Playing atari with deep reinforcement learning. ArXiv, 2013.
295
+ Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Louppe, G., Prettenhofer, P., Weiss, R., Weiss, R. J., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E. Scikit-learn: Machine learning in python. J. Mach. Learn. Res., 2011.
296
+ Peng, S., Hu, X., Zhang, R., Guo, J., Yi, Q., Chen, R., Du, Z., Li, L., Guo, Q., and Chen, Y. Conceptual reinforcement learning for language-conditioned tasks. *ArXiv*, 2023.
297
+ Sadeghi, F. and Levine, S. Cad2rl: Real single-image flight without a single real image. RSS, 2017.
298
+ Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. ArXiv, 2017.
299
+ Sun, Y., Zheng, R., Wang, X., Cohen, A. E., and Huang, F. Transfer RL across observation feature spaces via model-based regularization. In ICLR, 2022.
300
+ Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., and Abbeel, P. Domain randomization for transferring deep neural networks from simulation to the real world. IROS, 2017.
301
+ Tzeng, E., Devin, C., Hoffman, J., Finn, C., Abbeel, P., Levine, S., Saenko, K., and Darrell, T. Adapting deep visuomotor representations with weak pairwise constraints. In Workshop on the Algorithmic Foundations of Robotics, 2015.
302
+ Weng, J., Chen, H., Yan, D., You, K., Duburcq, A., Zhang, M., Su, H., and Zhu, J. Tianshou: A highly modularized deep reinforcement learning library. ArXiv, 2021.
303
+ Xing, J., Nagata, T., Chen, K., Zou, X., Neftci, E. O., and Krichmar, J. L. Domain adaptation in reinforcement learning via latent unified state representation. *ArXiv*, 2021.
304
+
305
+ Yi, Q., Zhang, R., Peng, S., Guo, J., Hu, X., Du, Z., Zhang, X., Guo, Q., and Chen, Y. Object-category aware reinforcement learning. CoRR, 2022.
306
+ You, Y., Pan, X., Wang, Z., and Lu, C. Virtual to real reinforcement learning for autonomous driving. *ArXiv*, 2017.
307
+ Zambaldi, V. F., Raposo, D., Santoro, A., Bapst, V., Li, Y., Babuschkin, I., Tuyls, K., Reichert, D. P., Lillicrap, T. P., Lockhart, E., Shanahan, M., Langston, V., Pascanu, R., Botvinick, M. M., Vinyals, O., and Battaglia, P. W. Deep reinforcement learning with relational inductive biases. In ICLR, 2019.
308
+ Zhang, J., Tai, L., Yun, P., Xiong, Y., Liu, M., Boedecker, J., and Burgard, W. Vr-goggles for robots: Real-to-sim domain adaptation for visual control. IEEE Robotics and Automation Letters, 2018.
309
+
310
+ Table 5. The data consumption for OPA and other baselines, both in the source and target domain. 'Enc.' and 'Expl.' are corresponding to 'Encoder' and 'Exploration' respectively.
311
+
312
+ <table><tr><td></td><td colspan="3">Source Domain</td><td colspan="3">Target Domain</td></tr><tr><td></td><td>πtask</td><td>πexp</td><td>Enc.</td><td>Fine-tuning</td><td>Enc.</td><td>Expl.</td></tr><tr><td>OPA(ours)</td><td>25M</td><td>10M</td><td>-</td><td>-</td><td>-</td><td>≈100</td></tr><tr><td>DARLA</td><td>100M</td><td>-</td><td>0.5M</td><td>-</td><td>-</td><td>-</td></tr><tr><td>LUSR</td><td>100M</td><td>-</td><td>0.5M</td><td>-</td><td>0.5M</td><td>-</td></tr><tr><td>UNIT4RL</td><td>25M</td><td>-</td><td>-</td><td>0-5M</td><td>0.5M</td><td>-</td></tr><tr><td>LTMBR</td><td>25M</td><td>-</td><td>-</td><td>0-5M</td><td>-</td><td>-</td></tr></table>
313
+
314
+ # A. Implementation for Baselines
315
+
316
+ Implementation for PPO The task policies for all approaches included in this work are trained via PPO. Our PPO implementation is based on Tianshou (Weng et al., 2021) which is purely based on PyTorch. We adopt the hyper-parameters which are shown in Table 6.
317
+
318
+ Implementation for DARLA For DARLA, we first collect 0.5M samples in the source domain via a random policy. Using these samples, we train a $\beta$ -VAE with a grid search over $\beta = 0.1, 0.5, 1, 2, 5, 10$ . We set $\beta = 2$ because it achieves the best results In the original paper of DARLA, the reconstruction loss of $\beta$ -VAE is replaced by a perceptual similarity loss produced by a denoising autoencoder (DAE). However, we find the reconstruction loss works better in our case, therefore is used in practice.
319
+
320
+ After pre-training the encoder, we then train a task policy $\pi_{task}$ for 100M steps in the source domain based on this encoder. The encoder is frozen during the training of $\pi_{task}$ , and will encode the pixel observation into a latent of size 128. The task policy is a 3-layer MLP with hidden sizes 64, and outputs the action probability and value function.
321
+
322
+ Implementation for LUSR LUSR needs a set of different domains to train the encoder. In our case, we simply collect 0.5M samples from the source domain and 0.5M from the target domain to train LUSR. The coefficient of the reverse loss in LUSR is grid-searched for 0.1, 0.5, 1, 2, 5, and we find 0.5 works best in our case. LUSR splits the latent representations into domain-specific features $z_{s}$ and domain-general $z_{g}$ features. We also search for the dimensions of both features (including $|z_{s}|, |z_{g}|$ ) = (8, 32), (8, 64), (16, 64), (16, 128), (32, 128)), and choose (16, 128) in practice.
323
+
324
+ After pre-training the encoder, we then train a task policy $\pi_{task}$ for 100M steps in the source domain based on the domain-general features provided by LUSR. The encoder is frozen during the training of $\pi_{task}$ , and will encode the pixel observation into a latent of size 128. The task policy is a 3-layer MLP with a hidden size of 64 and outputs the action probability and value function.
325
+
326
+ Implementation for UNIT4RL First, we collect 0.5M samples from the source domain and 0.5M from the target. This data is used to train an image-to-image translation model $T$ . All hyper-parameters of UNIT4RL are the same as in the original paper.
327
+
328
+ We train a task policy $\pi_{task}$ for 25M steps in the source domain. When deploying $\pi_{task}$ in the target domain, we first translate the observations into the source domain via the translation model $T$ , then calculate the action probability and value function using $\pi_{task}$ . $\pi_{task}$ is further fine-tuned for 0-5M steps in the target domain via PPO, with $T$ kept fixed.
329
+
330
+ Implementation for LTMBR LTMBR (Sun et al., 2022) introduces an auxiliary task to help the learning of representations in the target domain. We conduct a grid search over the coefficients (1,2,4,8,16) of the auxiliary loss in the Hunter-Z2C2 and then apply the optimal coefficient $(= 4)$ to other tasks. We train the task policy $\pi_{task}$ for 25M steps with this auxiliary loss in the source domain.
331
+
332
+ # B. Implementation for OPA
333
+
334
+ The implementation is available at https://github.com/albertcity/OPA.
335
+
336
+ # B.1. The modelling of $\pi_{exp}$ and $q_{\theta}$
337
+
338
+ In practice, the modelling of $q_{\theta}$ and $\pi_{exp}$ is also important because a proper design can introduce useful inductive biases and facilitate the training of $q_{\theta}$ and $\pi_{exp}$ . For simplicity, in the following we assume the prototype $o^{p}$ of an object $o$ has already been mapped into $P \cup P_{unseen}^{I}$ via Eq.(4).
339
+
340
+ For $\pi_{exp}$ , we use the predicted prototypes of $q_{\theta}$ as encodings of objects if $o^p \in P_{unseen}$ and $o^p$ if $o^p \notin P_{unseen}$ . The predicted results of $q_{\theta}$ can directly inform $\pi_{task}$ which objects are still unfamiliar to $q_{\theta}$ , and therefore $\pi_{task}$ can learn to interact with them.
341
+
342
+ For $q_{\theta}$ , we maintain a hidden state $h_p \in R^F$ for each prototype $p$ in $P_{unseen}^I$ ( $p = 1,..,|I|$ ), which summarizes the history of interactions related to $p$ . $h_p$ is also tasked to predict the ground truth prototype (i.e. $\psi^{-1}(p)$ ) via a learnable classifier. All $h_p$ s are initialized to the same hidden states at the beginning of an episode. At each transition $(s_t, a_t, r_t, s_{t+1})$ , $h_p$ is updated by the following steps:
343
+
344
+ **Broadcasting $h_p$ .** For each object $o$ in $s_t, s_{t+1}$ , we embed $o^p$ into $R^F$ if $o^p \notin P_{\text{unseen}}^I$ , which serves as $o$ 's encoding. For $o^p \in P_{\text{unseen}}^I$ , we use $h_p$ instead, because it summarizes the history of interactions related to $p$ . This will give us new representations of $s_t$ and $s_{t+1}$ , which are denoted as $[\hat{o}_t^1, \dots, \hat{o}_t^N] \in R^{N \times F}$ and $[\hat{o}_{t+1}^1, \dots, \hat{o}_{t+1}^N] \in R^{N \times F}$ .
345
+
346
+ Processing the transition information. In our settings, each object $o$ actually represents a tile in the original observation, therefore we can re-arrange the $[\hat{o}_t^1,\dots,\hat{o}_t^N]\in R^{N\times F}$ into $[\hat{o}_t^{i,j}]_{i = 1}^H\stackrel {W}{_j = 1}W\in R^{H\times W\times F}(N = H\times W)$ . $\hat{o}_t^{i,j}$ is corresponding to the $(i,j)$ 'th tile of location $((i - 1)\times size_h,(j - 1)\times size_w)$ ( $size_h, size_w$ is the size of each tile).
347
+
348
+ In order to process the transition information, we first concatenate $\hat{o}_t^{i,j},\hat{o}_{t + 1}^{i,j},a_t,r_t$ together. This will give us $[\hat{o}_t^{i,j}]_{i,j}\in$ $R^{H\times W\times (2F + A + R)}$ , where $A$ is corresponding to the one-hot embedding of $a_{t}$ and $R$ corresponding to the embedding of $r_t$ Then we process the resulting features using several convolution layers of (kernel size=3, stride=1, padding=1), which will give us $\tilde{O}\in R^{H\times W\times F}$ . $\tilde{O}$ can be seen as a latent that summarizes the information of transition $(s_t,a_t,r_t,s_{t + 1})$
349
+
350
+ Updating $h_p$ . In order to extract relative information related to $h_p$ from $\tilde{O}$ , we adopt an attention mechanism to get a latent $z_p$ from $\tilde{O}$ . The query vector of this attention is $h_p$ , and both the key and value vectors are $\{\tilde{O}_{i,j,:} : \hat{o}_t^{i,j} = p \text{ or } \hat{o}_{t+1}^{i,j} = p\}$ . In other words, $z_p$ only extracts information from the objects related to $p$ . After obtaining $z_p$ , $h_p$ is then updated via GRU (Cho et al., 2014) by taking $z_p$ as the current input.
351
+
352
+ By the design of $\pi_{exp}$ and $q_{\theta}$ , we can see that the choice of $\psi$ does not influence the inference results of $q_{\theta}$ and $\pi_{exp}$ (i.e.
353
+
354
+ Table 6. PPO hyper-parameters.
355
+
356
+ <table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Discount factor</td><td>0.9</td></tr><tr><td>Lambda for GAE</td><td>0.95</td></tr><tr><td>Epsilon clip (clip range)</td><td>0.2</td></tr><tr><td>Coefficient for value function loss</td><td>0.5</td></tr><tr><td>Normalize Advantage</td><td>True</td></tr><tr><td>Learning rate</td><td>5e-4</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Max gradient norm</td><td>0.5</td></tr><tr><td>Steps per collect</td><td>4096</td></tr><tr><td>Repeat per collect</td><td>3</td></tr><tr><td>Batch size</td><td>256</td></tr></table>
357
+
358
+ any $\psi$ will give the same results), which means we can choose a fixed $\psi$ to simplify the training process.
359
+
360
+ # B.2. Other implementation details
361
+
362
+ In OPA, we first train $\pi_{task}$ for 25M steps in the source domain. The $\pi_{task}$ uses the $f_{proto}|_S$ as the encoder of objects, and also adopts a self-attention mechanism to model the relations between objects, which is a common practice in OORL (Yi et al., 2022; Zambaldi et al., 2019).
363
+
364
+ During the training of $\pi_{task}$ , we save its trajectories as $D_{his}$ . $D_{his}$ is then used to train the indicator $\Psi_{\mathrm{IsUnseen}}$ and the inference model $q_{\theta}$ . Thanks to the special design of $\pi_{exp}, q_{\theta}, \psi$ can be fixed for simplicity as explained in the Appendix B.1.
365
+
366
+ After pre-training $q_{\theta}$ , we train an exploration policy $\pi_{exp}$ for 10M steps in the source domain using the intrinsic rewards generated by $q_{\theta}$ . The network architecture in $\pi_{exp}$ is the same as $\pi_{task}$ .
367
+
368
+ ![](images/6ab77a03537d29d3bef6ed9082c0518127376c4360c578a5edfaeed7b38ee2cc.jpg)
369
+ Figure 6. The reconstruction results of LUSR. First and second row: two sampled observations $a$ , $b$ ; Third row: the reconstruction results of LUSR using $z_{g}(a)$ and $z_{s}(a)$ ; Fourth row: reconstruction using $z_{g}(a)$ and $z_{s}(b)$ . Although the $z_{s}(a)$ and $z_{s}(b)$ are able to distinguish the source and target domain, it also contains important information such as the positions of objects.
370
+
371
+ # C. Analysis of LUSR
372
+
373
+ LUSR splits the latent embedding of an observation $o$ into domain-general and domain-specific features, which are denoted as $z_{g}(o)$ and $z_{s}(o)$ respectively. Intuitively, $z_{g}(o)$ should contain crucial information such as the position of each object, and $z_{s}(o)$ should contain non-important information such as the image style of the observation that is different in different domains.
374
+
375
+ In Figure 6, we show the reconstruction results of LUSR using different combinations of $z_{g}$ and $z_{s}$ . We can see that the positions of objects not only depend on $z_{g}$ but also on $z_{s}$ . Although the $z_{s}$ can be used to distinguish the source and target domain, it also contains important information such as the positions of objects. This is problematic because $z_{g}$ may lose important information.
376
+
377
+ Table 7. Results on Crafter.
378
+
379
+ <table><tr><td>Algorithm</td><td>Source Domain</td><td>Target Domain</td><td>Ratio</td></tr><tr><td>PPO</td><td>11.62 ± 0.37</td><td>3.00 ± 0.57</td><td>0.26</td></tr><tr><td>DARLA</td><td>7.50 ± 0.29</td><td>4.30 ± 0.37</td><td>0.57</td></tr><tr><td>LUSR</td><td>7.97 ± 0.23</td><td>2.15 ± 0.27</td><td>0.27</td></tr><tr><td>UNIT4RL@0M</td><td>11.62 ± 0.37</td><td>3.50 ± 0.23</td><td>0.30</td></tr><tr><td>OPA(ours)</td><td>11.57 ± 0.52</td><td>10.69 ± 0.41</td><td>1.01</td></tr><tr><td>UNIT4RL@5M</td><td>-</td><td>7.88 ± 0.45</td><td>0.68</td></tr><tr><td>UNIT4RL@20M</td><td>-</td><td>9.17 ± 0.21</td><td>0.79</td></tr></table>
380
+
381
+ # D. Results on Crafter
382
+
383
+ In this section, we provide the transfer results on the Crafter (Hafner, 2022), which is a complicated 2-D Minecraft-like environment. We use the original version of Crafter as the source domain. The target domain is a modified version in which we select several objects (i.e. 'stone', 'tree', 'coal', 'cow', 'zombie', 'skeleton') and replace their textures using icons from the Nethack (https://nethackwiki.com/).
384
+
385
+ The $\pi_{task}$ are trained for 20M for all algorithms in $\mathcal{M}_S$ . For LUSR and UNIT4RL, we take 0.5M from $\mathcal{M}_T$ to train the encoder. For OPA, we take 4 episodes to run $\pi_{exp}$ in $\mathcal{M}_T$ to transfer $\pi_{task}$ . When training $\pi_{exp}$ , we set $I$ to the chosen objects that are different in $\mathcal{M}_S$ and $\mathcal{M}_T$ , which can accelerate the training process of $\pi_{exp}$ . The observation of Crafter can be rendered into an image of size $72 \times 72 \times 3$ , which consists of two parts: (part A) the $7 \times 9$ region around the agent (of size $56 \times 72 \times 3$ in the image), and (part B) the status of the agent and items in its backpack (of size $16 \times 72 \times 3$ ). When building the encoder for $\pi_{task}, \pi_{exp}, q_\theta$ , we separate parts A and B, and use the numerical closed-form of part B (instead of pixels).
386
+
387
+ The overall results are as shown in Table 7. According to this table, OPA still achieves the best transfer performance in the Crafter environment. Interestingly, we find that UNIT4RL@20M can not recover the performance in the source domain even after training for 20M in the target domain, which means that the learned mapping function has lost some important information.
388
+
389
+ Table 8. The reconstruction errors in the source and target domain.
390
+
391
+ <table><tr><td></td><td>obj1</td><td>obj2</td><td>obj3</td><td>obj4</td></tr><tr><td>Source Domain (Seen objects)</td><td>0.0112</td><td>0.0142</td><td>0.0179</td><td>0.0410</td></tr><tr><td>Target Domain (Unseen objects)</td><td>4.920</td><td>8.034</td><td>9.998</td><td>14.327</td></tr></table>
392
+
393
+ # E. Other Discussions
394
+
395
+ OPA introduce several stages which may bring cumulative errors. In this section, we analyse this problem.
396
+
397
+ Formally, there are four parts in OPA that may bring errors:
398
+
399
+ (1) $\Psi_{\text{unseen}}: O \to 0, 1$ in Eq.(2),
400
+ (2) $q_{\theta}:\tau \rightarrow I^{\prime}$ in Eq.(6),
401
+ (3) $\pi_{exp}:S\to A$
402
+ (4) $f_{cls}:O\to P_{seen}$ in Eq.(8).
403
+
404
+ However, the approximation errors brought by (1) and (4) should be very small because the domain of both (1) and (4) is the space of objects $O$ , which is simple and small in many cases. In our environment, $O$ is actually a set of size 4. Even in the Crafter (a complicated 2D Mincraft-like environment), it is just 19. Therefore, the error brought by (1) and (4) can be ignored in many cases. For example, $\Psi_{\text{unseen}}$ can correctly identify all unseen objects in our cases as we will show later. The training of (3) relies on (2), therefore the quality of (2) does affect the training of (3). However, this is unavoidable, because (2) and (3) are designed to work together.
405
+
406
+ The accuracy of $\Psi_{\text{unseen}}$ . The binary classifier $\Psi_{\text{unseen}}$ is built upon $g_{dec} \circ g_{enc}$ (i.e. $\Psi_{\text{unseen}} = ||g_{dec} \circ g_{dec}(o) - o|| \geq \eta$ ). Therefore, we can use the reconstruction error $||g_{dec} \circ g_{enc}(o) - o||$ to measure the accuracy of $\Psi_{\text{unseen}}$ . We expect a small error for objects in the source domain and a large error for objects in the target domain. We list the reconstruction error for all objects in Table 8. As shown in Table 8, the reconstruction error is significantly different in the source and target domain, which means that $\Psi_{\text{unseen}}$ can correctly identify the unseen objects.
2023/Online Prototype Alignment for Few-shot Policy Transfer/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c38f7724d88366be7053a3154ddd3272112c016f10fbeb5612c2e8e46c9c4a49
3
+ size 594862
2023/Online Prototype Alignment for Few-shot Policy Transfer/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Restless Bandits with Unobserved States/10a0c685-a69c-4f8d-8d81-5f4973dbee1a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b420d3d5878e2354d617ee7dee48ca0e219342a0399b552c8e7771892b64692
3
+ size 573441
2023/Online Restless Bandits with Unobserved States/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2023/Online Restless Bandits with Unobserved States/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15d4386ec33a463da7400ae4e5a8bfa4c5c873918cb7b1da88573460cea9471a
3
+ size 1760782
2023/Online Restless Bandits with Unobserved States/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_content_list.json ADDED
@@ -0,0 +1,1872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Open-VCLIP: Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 124,
8
+ 109,
9
+ 849,
10
+ 156
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Zejia Weng $^{12}$ Xitong Yang $^{3}$ Ang Li $^{4}$ Zuxuan Wu $^{12}$ Yu-Gang Jiang $^{12}$",
17
+ "bbox": [
18
+ 222,
19
+ 198,
20
+ 743,
21
+ 217
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 241,
31
+ 242,
32
+ 318,
33
+ 257
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Contrastive Language-Image Pretraining (CLIP) has demonstrated impressive zero-shot learning abilities for image understanding, yet limited effort has been made to investigate CLIP for zero-shot video recognition. We introduce OpenVCLIP, a simple yet effective approach that transforms CLIP into a strong zero-shot video classifier that can recognize unseen actions and events at test time. Our framework extends CLIP with minimal modifications to model spatial-temporal relationships in videos, making it a specialized video classifier, while striving for generalization. We formally show that training an OpenVCLIP is equivalent to continual learning with zero historical data. To address this problem, we propose Interpolated Weight Optimization, which utilizes the benefit of weight interpolation in both training and test time. We evaluate our method on three popular and challenging action recognition datasets following various zero-shot evaluation protocols and we demonstrate our approach outperforms state-of-the-art methods by clear margins. In particular, we achieve $87.9\\%$ , $58.3\\%$ , $81.1\\%$ zero-shot accuracy on UCF, HMDB and Kinetics-600 respectively, outperforming state-of-the-art methods by $8.3\\%$ , $7.8\\%$ and $12.2\\%$ . Code is released at https:",
40
+ "bbox": [
41
+ 117,
42
+ 258,
43
+ 444,
44
+ 664
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "//github.com/wengzejial/Open-VCLIP.",
51
+ "bbox": [
52
+ 119,
53
+ 667,
54
+ 426,
55
+ 680
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1. Introduction",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 86,
65
+ 702,
66
+ 217,
67
+ 717
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Zero-shot learning is a challenging problem that requires deep neural networks to recognize novel unseen classes during testing without having seen them during training. The generalization ability of classifying new classes without",
74
+ "bbox": [
75
+ 84,
76
+ 720,
77
+ 475,
78
+ 781
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "$^{1}$ Shanghai Key Laboratory of Intelligent Information Processing, School of Computer Science, Fudan University $^{2}$ Shanghai Collaborative Innovation Center of Intelligent Visual Computing $^{3}$ Meta AI $^{4}$ angli.ai. Correspondence to: Zuxuan Wu <zxwu@fudan.edu.cn>.",
85
+ "bbox": [
86
+ 84,
87
+ 790,
88
+ 473,
89
+ 854
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).",
96
+ "bbox": [
97
+ 84,
98
+ 864,
99
+ 473,
100
+ 905
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/d2f672637e7b46926ee507efe91274150b261839ed80ed295e570a61e0e42618.jpg",
107
+ "image_caption": [
108
+ "Figure 1. While CLIP has shown impressive results for zero-shot image recognition, it cannot effectively recognize novel actions in videos. This paper aims to transform CLIP to a strong zero-shot video classifier with minimal modifications."
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 503,
113
+ 242,
114
+ 897,
115
+ 364
116
+ ],
117
+ "page_idx": 0
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "the need for manual annotations makes it particularly useful in real-world applications. While extensive studies have been conducted on zero-shot learning (Zellers & Choi, 2017; Brattoli et al., 2020; Xu et al., 2017), CLIP (Radford et al., 2021) recently demonstrates surprising zero-shot abilities in a variety of tasks, such as image segmentation (Wang et al., 2022; Ghiasi et al., 2021; 2022), image editing (Zheng et al., 2022; Crowson et al., 2022), by pretraining on web-scale image and text pairs in a contrastive manner.",
122
+ "bbox": [
123
+ 495,
124
+ 474,
125
+ 888,
126
+ 612
127
+ ],
128
+ "page_idx": 0
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "While significant zero-shot results are achieved in the image domain, limited effort has been made to explore CLIP for zero-shot video action recognition. Extending CLIP, designed for image tasks, to the video domain, is extremely challenging, particularly in the zero-shot setting. On one hand, to better recognize actions and events in videos, the rich temporal dynamics encoded in videos are expected to be carefully captured. Although one could treat videos as a bag of frames and perform temporal pooling over frame-based predictions (Wang et al., 2021), it is found that fine-tuning pretrained models like CLIP with specialized temporal modeling components on top of off-the-shelf image models produces better results (Ni et al., 2022). However, the improved results come at the cost of reduced generalization as optimizing specialized parameters will inevitably require fine-tuning the pretrained CLIP model. The derived model then tends to overfit to the video dataset used for fine-tuning, which are substantially smaller than the image-text dataset used to train CLIP. As a result, the zero-shot ability",
133
+ "bbox": [
134
+ 495,
135
+ 618,
136
+ 888,
137
+ 905
138
+ ],
139
+ "page_idx": 0
140
+ },
141
+ {
142
+ "type": "page_number",
143
+ "text": "1",
144
+ "bbox": [
145
+ 480,
146
+ 922,
147
+ 491,
148
+ 934
149
+ ],
150
+ "page_idx": 0
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "of CLIP diminishes over the course of fine-tuning.",
155
+ "bbox": [
156
+ 88,
157
+ 85,
158
+ 416,
159
+ 99
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "It is worth noting that the start point of the fine-tuning process is CLIP, an image classifier with strong zero-shot abilities, while the end point is a specialized model for video understanding. This motivates us to seek a middle ground between generalization and specialization—adapting a pretrained CLIP model to the video domain, and the resulting model is expected to not only recognize known actions and events seen during training but also enjoy the zero-shot learning abilities as CLIP for novel video categories. Interestingly, we discover from a theoretical perspective that this problem is essentially a continual learning problem, which aims to adapt a pretrained model to new tasks with less forgetting on previous knowledge. Traditional continual learning typically seeks decent performance on all seen tasks with access to historical data (Hu et al., 2021; Balaji et al., 2020; Shin et al., 2017). However, this is particularly challenging for adapting CLIP as raw data used for training are private. Furthermore, our goal is slightly beyond continual learning: we hope to adapt CLIP to be a strong zero-shot video learner that generalizes well to unknown video actions and events, rather than exactly preserving its knowledge for image tasks, which again is difficult without access to the training data of CLIP.",
166
+ "bbox": [
167
+ 88,
168
+ 108,
169
+ 473,
170
+ 454
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "With this in mind, we explore the problem of constructing an open-vocabulary video CLIP by simply leveraging the pretrained weights that are publicly available. More specifically, we build upon CLIP with minimal modifications so as to derive a video action recognition model that can not only capture temporal information among different frames but also generalizes well to unseen actions and events during testing. To optimize the continual learning-based training formulation, we propose a novel method called Interpolated Weight Optimization which regularizes the fine-tuning process of the CLIP model by adding a link between the original CLIP model and the current model. This prevents the derived model from drifting away from CLIP, which we argue is beneficial for generalization. Furthermore, in addition to training, we also link derived optima along the optimization trajectory at test time for improved generalization.",
177
+ "bbox": [
178
+ 88,
179
+ 462,
180
+ 473,
181
+ 703
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "We conduct extensive experiments to evaluate the performance of Open-VCLIP. In particular, we use Kinetics-400 as a proxy dataset to extend CLIP to the video domain and evaluate its zero-shot performance on UCF-101, HMDB-51 and Kinetics-600 with various evaluation protocols. Open-VCLIP achieves state-of-the-art zero-shot video action recognition performance, offering $87.9\\%$ , $58.3\\%$ , $81.1\\%$ zero-shot accuracy on UCF, HMDB and Kinetics-600 respectively, which are $8.3\\%$ , $7.8\\%$ and $12.2\\%$ better compared to alternative methods. Furthermore, Open-VCLIP also achieves the best trade-off between close-set and zero-shot performance across all the benchmarks.",
188
+ "bbox": [
189
+ 88,
190
+ 710,
191
+ 473,
192
+ 891
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "2. Related Work",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 501,
202
+ 84,
203
+ 637,
204
+ 98
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Zero-shot Video Action Recognition. Zero-shot video action recognition requires models to recognize new actions that are not seen during training, which is useful in real-world applications where data and their corresponding labels are difficult to collect. Early work focuses more on how to represent actions properly. For example, manually-crafted attributes (Liu et al., 2011; Zellers & Choi, 2017), object features (Jain et al., 2015; Gao et al., 2019) are used to represent actions. Researchers also use word embeddings of actions (Brattoli et al., 2020; Xu et al., 2017) as textual semantic representations. Recently, pretraining with large-scale vision-text data is gaining attention, as it achieves impressive results for zero-shot image classification (Radford et al., 2021; Jia et al., 2021). There is also a plethora of work using knowledge learned in large-scale pretrained vision-language models to down-stream tasks in a zero-shot manner (Wang et al., 2022; Ghiasi et al., 2021; 2022). While extensive studies have been conducted for zero-shot image understanding, zero-shot video classification remains less explored. ActionCLIP (Wang et al., 2021) and XCLIP experiment with zero-shot setting for action recognition (Ni et al., 2022), but use the same strategy as in images for zero-shot learning and ignore the forgetting problem when adapting the CLIP model. In contrast, our goal is to explicitly build a strong open-vocabulary zero-shot video classifier by regularizing the fine-tuning process.",
211
+ "bbox": [
212
+ 500,
213
+ 102,
214
+ 885,
215
+ 493
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Continual Learning. Continual learning aims at training a model on multiple sequential tasks without catastrophically forgetting knowledge from previous tasks. Existing approaches can be divided into three categories: memory-based, expansion based and regularization-based methods. Memory-based methods typically utilize a replay buffer to store past examples or related information such as gradients (Farajtabar et al., 2020). In addition, memory replay is effective for continual learning (Hu et al., 2021; Balaji et al., 2020), however, in our case, it is not feasible to directly use these approaches as historical data are not available. Expansion-based methods (Rusu et al., 2016) expand the network over time in order to maintain past performance. Closest to our approach, perhaps are regularization-based methods (Yin et al., 2020) such as EWC (Kirkpatrick et al., 2017), which add a regularization term to the optimization that constrains new model weights to be close to the original ones. But still historical data need to be used to calculate the Fisher information matrix for approaches like (Kirkpatrick et al., 2017). Our approach differs from standard continual learning in that we wish to transfer the knowledge, i.e. the ability to perform zero-shot learning, from a previous image task to video tasks without access to historical data at all.",
222
+ "bbox": [
223
+ 500,
224
+ 502,
225
+ 885,
226
+ 847
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "header",
232
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
233
+ "bbox": [
234
+ 305,
235
+ 56,
236
+ 665,
237
+ 70
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "page_number",
243
+ "text": "2",
244
+ "bbox": [
245
+ 480,
246
+ 922,
247
+ 491,
248
+ 934
249
+ ],
250
+ "page_idx": 1
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3. Preliminary: Video Action Recognition Using CLIP",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 84,
258
+ 83,
259
+ 439,
260
+ 118
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Video action recognition is a fundamental yet challenging task that often requires intensive model training on large-scale datasets. Inspired by the success of contrastive language-image pretraining (CLIP) (Radford et al., 2021), recent work has proposed to fine-tune the well-trained CLIP model on the target video dataset and has achieved state-of-the-art results (Xu et al., 2021; Wu et al., 2023).",
267
+ "bbox": [
268
+ 84,
269
+ 119,
270
+ 475,
271
+ 224
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "To adapt CLIP for video action recognition (VCLIP), a common strategy (Arnab et al., 2021; Bulat et al., 2021; Bertasius et al., 2021; Xing et al., 2022) is to extend the image encoder to capture temporal dynamics in videos and, in the meanwhile, align the video representation with the text representations of its corresponding label (e.g., \"playing drums\"). Specifically, given a video clip $V \\in \\mathcal{V}_B$ and an action label described in textual prompts $T \\in \\mathcal{T}_B$ , the goal of fine-tuning is to maximize the similarity:",
278
+ "bbox": [
279
+ 84,
280
+ 232,
281
+ 473,
282
+ 369
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "equation",
288
+ "text": "\n$$\n\\operatorname {s i m} (v, t) = \\frac {\\langle v , t \\rangle}{\\| v \\| \\| t \\|}, \\quad v = f _ {\\theta_ {B} ^ {V}} (V), t = f _ {\\theta_ {B} ^ {T}} (T), \\quad (1)\n$$\n",
289
+ "text_format": "latex",
290
+ "bbox": [
291
+ 104,
292
+ 386,
293
+ 475,
294
+ 421
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "if $V$ and $T$ represent the same video. Here, $\\nu_{B}$ denotes the video dataset for task $B$ , $\\mathcal{T}_B$ denotes the corresponding label set, $f_{\\theta_B^T}$ denotes the text encoder and $f_{\\theta_B^V}$ denotes the visual encoder. As the text encoder is typically frozen (Ilharco et al., 2022; Thengane et al., 2022), the fine-tuning stage primarily focuses on optimizing the visual encoder for adaptation to the video domain. We drop the superscript in the subsequent paragraphs for brevity.",
301
+ "bbox": [
302
+ 84,
303
+ 434,
304
+ 475,
305
+ 556
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "4. Our Approach",
312
+ "text_level": 1,
313
+ "bbox": [
314
+ 84,
315
+ 575,
316
+ 233,
317
+ 590
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "We introduce our approach in this section which consists of two major components: (1) constructing a VCLIP model from the image-based CLIP in order to better explore spatial-temporal relationships in videos, and (2) regularizing the fine-tuning process so that the derived model can generalize well to unseen actions and events.",
324
+ "bbox": [
325
+ 84,
326
+ 593,
327
+ 475,
328
+ 683
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "4.1. Constructing VCLIP for Video Understanding",
335
+ "text_level": 1,
336
+ "bbox": [
337
+ 84,
338
+ 700,
339
+ 444,
340
+ 715
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "Temporal relations among video frames contain important information for identifying actions. The image CLIP model does not have the ability to aggregate temporal features and thus is no longer suitable for video tasks. So we devote to injecting temporal modeling ability to the original CLIP model for a better transfer from images to videos.",
347
+ "bbox": [
348
+ 84,
349
+ 717,
350
+ 473,
351
+ 808
352
+ ],
353
+ "page_idx": 2
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "Adding additional temporal modeling networks is the most convenient way to achieve this, however, this generally incurs extra parameters that are computationally expensive and makes it harder for weight interpolation that greatly benefits zero-shot abilities, as will be described later. We observe that the self-attention layer in vision transformer is",
358
+ "bbox": [
359
+ 84,
360
+ 814,
361
+ 475,
362
+ 905
363
+ ],
364
+ "page_idx": 2
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "quite scalable, operating on image frame patches as:",
369
+ "bbox": [
370
+ 496,
371
+ 85,
372
+ 843,
373
+ 101
374
+ ],
375
+ "page_idx": 2
376
+ },
377
+ {
378
+ "type": "equation",
379
+ "text": "\n$$\ny _ {s, t} = \\operatorname {S o f t m a x} \\left(\\frac {q _ {s , t} K _ {t} ^ {\\mathrm {T}}}{\\sqrt {d}}\\right) V _ {t}, \\tag {2}\n$$\n",
380
+ "text_format": "latex",
381
+ "bbox": [
382
+ 596,
383
+ 106,
384
+ 885,
385
+ 141
386
+ ],
387
+ "page_idx": 2
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "where $d$ refers to the dimension of vectors, $q_{s,t}$ refers to the query vector of the $s$ -th token in the $t$ -th frame, $K_t^{\\mathrm{T}}$ is the transpose of the matrix composed of key vectors in the $t$ -th frame, and $V_{t}$ is the matrix composed of value vectors in the $t$ -th frame. Obviously, each token will only obtain information from its belonging frame. To overcome this issue, we expand the temporal attention view for every self-attention layer for aggregating the global temporal information thanks to the stacking of self-attention layers. The new self-attention layer is implemented as follows:",
392
+ "bbox": [
393
+ 495,
394
+ 146,
395
+ 887,
396
+ 297
397
+ ],
398
+ "page_idx": 2
399
+ },
400
+ {
401
+ "type": "equation",
402
+ "text": "\n$$\ny _ {s, t} = \\operatorname {S o f t m a x} \\left(\\frac {q _ {s , t} \\left[ K _ {(t - 1) \\sim (t + 1)} \\right] ^ {\\mathrm {T}}}{\\sqrt {d}}\\right) \\left[ V _ {(t - 1) \\sim (t + 1)} \\right]. \\tag {3}\n$$\n",
403
+ "text_format": "latex",
404
+ "bbox": [
405
+ 506,
406
+ 303,
407
+ 885,
408
+ 353
409
+ ],
410
+ "page_idx": 2
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "At this time, each patch will obtain information from its belonging frame and its neighbouring frames. The special modification lies in $[K_{(t - 1)\\sim (t + 1)}]$ and $[V_{(t - 1)\\sim (t + 1)}]$ which refers to the Key/Value matrix be composed with key/value vectors belonging to not only the $t$ -th frame, but also the neighbour frames. Such a small modification helps the model to gain better temporal information aggregation ability, while perfectly fitting our algorithm since no extra parameters are added.",
415
+ "bbox": [
416
+ 495,
417
+ 359,
418
+ 887,
419
+ 496
420
+ ],
421
+ "page_idx": 2
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "4.2. Training Open-VCLIP",
426
+ "text_level": 1,
427
+ "bbox": [
428
+ 496,
429
+ 512,
430
+ 691,
431
+ 527
432
+ ],
433
+ "page_idx": 2
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "We now introduce the training method with a carefully designed optimization strategy for improved zero-shot video classification. We start by formulating the problem from its original purpose and then derive its approximation which leads to a challenging continual learning problem with zero historical data. We propose a novel regularization-based method to optimize VCLIP, named Interpolated Weight Regularization (IWR). A model-averaging approach called Stochastic Weight Averaging (SWA) is further incorporated to improve model generalizability.",
438
+ "bbox": [
439
+ 495,
440
+ 527,
441
+ 887,
442
+ 679
443
+ ],
444
+ "page_idx": 2
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "4.2.1.PROBLEMDEFINITION",
449
+ "text_level": 1,
450
+ "bbox": [
451
+ 496,
452
+ 694,
453
+ 705,
454
+ 708
455
+ ],
456
+ "page_idx": 2
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "While fine-tuning the CLIP model yields impressive results for close-set video classification (Wang et al., 2021; Ni et al., 2022), its performance on unseen categories is poor—might be worse than the original CLIP model as shown in Table 4. Below, we elaborate on how to construct a robust open-vocabulary video model from a pretrained CLIP model.",
461
+ "bbox": [
462
+ 495,
463
+ 710,
464
+ 887,
465
+ 801
466
+ ],
467
+ "page_idx": 2
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "Formally, our goal is to obtain the optimal vision encoder $f_{\\theta_U}$ that satisfies:",
472
+ "bbox": [
473
+ 496,
474
+ 809,
475
+ 885,
476
+ 839
477
+ ],
478
+ "page_idx": 2
479
+ },
480
+ {
481
+ "type": "equation",
482
+ "text": "\n$$\n\\theta_ {U} = \\arg \\min _ {\\theta} L (\\theta ; D _ {U}). \\tag {4}\n$$\n",
483
+ "text_format": "latex",
484
+ "bbox": [
485
+ 604,
486
+ 845,
487
+ 885,
488
+ 868
489
+ ],
490
+ "page_idx": 2
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Here, $D_U = \\{\\mathcal{V}_U,\\mathcal{T}_U\\}$ is a hypothetical universal dataset that contains all possible videos and their corresponding",
495
+ "bbox": [
496
+ 496,
497
+ 875,
498
+ 885,
499
+ 906
500
+ ],
501
+ "page_idx": 2
502
+ },
503
+ {
504
+ "type": "header",
505
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
506
+ "bbox": [
507
+ 305,
508
+ 56,
509
+ 668,
510
+ 71
511
+ ],
512
+ "page_idx": 2
513
+ },
514
+ {
515
+ "type": "page_number",
516
+ "text": "3",
517
+ "bbox": [
518
+ 480,
519
+ 922,
520
+ 491,
521
+ 934
522
+ ],
523
+ "page_idx": 2
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "text descriptions (i.e., action labels). $L$ is the loss function defined on the video-text pairs. Optimizing such an objective directly is infeasible, yet luckily it can be approximated by training on a large-scale dataset with sufficiently diverse video and text data.",
528
+ "bbox": [
529
+ 84,
530
+ 85,
531
+ 475,
532
+ 161
533
+ ],
534
+ "page_idx": 3
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "4.2.2. AN APPROXIMATION EQUIVALENT TO CONTINUAL LEARNING",
539
+ "text_level": 1,
540
+ "bbox": [
541
+ 84,
542
+ 175,
543
+ 400,
544
+ 203
545
+ ],
546
+ "page_idx": 3
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "We first consider a video action recognition dataset $D_B = \\{\\mathcal{V}_B, \\mathcal{T}_B\\}$ used for fine-tuning. Unfortunately, even though the abundant video data $\\mathcal{V}_B$ serve as a good approximation of $\\mathcal{V}_U$ , its text space is extremely limited, bounded by the number of annotated action categories (e.g., $|\\mathcal{T}_B| = 400$ for Kinetics-400 (Kay et al., 2017)). As a result, the video representation is prone to overfitting to the highly skewed text space and the zero-shot ability of the CLIP model diminishes over the fine-tuning process. On the other hand, the scale of the image training dataset for CLIP, is sufficiently large to approximate $D_U$ , but there exists a domain gap between the image space and the video space. Even worse, this dataset is a private dataset and only the CLIP model weights $\\theta_A$ are accessible for fine-tuning.",
551
+ "bbox": [
552
+ 84,
553
+ 205,
554
+ 475,
555
+ 419
556
+ ],
557
+ "page_idx": 3
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "With these pros and cons in mind, we now seek to leverage both $\\theta_{A}$ and $D_B$ to construct a strong open-vocabulary model. We believe that $\\theta_{A}$ should contain useful information from the large image dataset that CLIP was originally trained on. Following this intuition, we notice that the initial VCLIP model (without any fine-tuning) $\\theta_{A}$ is indeed an optimal solution to a large-scale video dataset $D_A$ with a sufficiently diverse text space $\\mathcal{T}_A$ (Lemma 4.1).",
562
+ "bbox": [
563
+ 84,
564
+ 425,
565
+ 473,
566
+ 547
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "Lemma 4.1. Suppose the image CLIP model was trained on an image-text dataset $D_{\\bar{A}} = \\{\\mathcal{I}_{\\bar{A}},\\mathcal{T}_{\\bar{A}}\\}$ with $N$ examples. Then, there exists a diverse video-text dataset $D_{A} = \\{\\mathcal{V}_{A},\\mathcal{T}_{A}\\}$ containing $N$ examples where the video CLIP model with original CLIP parameters $\\theta_{A}$ is optimal.",
573
+ "bbox": [
574
+ 84,
575
+ 556,
576
+ 475,
577
+ 633
578
+ ],
579
+ "page_idx": 3
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "Proof. See Appendix.",
584
+ "bbox": [
585
+ 84,
586
+ 648,
587
+ 235,
588
+ 662
589
+ ],
590
+ "page_idx": 3
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "Although $D_A$ is unknown, it is helpful to understand our problem. Given the fact that $\\theta_A$ is an optimal solution in a large scale dataset $D_A$ , a natural idea for approximating the universal objective is to combine both datasets in the derivation, although $D_A$ is unknown in reality.",
595
+ "bbox": [
596
+ 84,
597
+ 681,
598
+ 473,
599
+ 758
600
+ ],
601
+ "page_idx": 3
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "Following this idea, Equation (4) is transformed into:",
606
+ "bbox": [
607
+ 84,
608
+ 763,
609
+ 437,
610
+ 780
611
+ ],
612
+ "page_idx": 3
613
+ },
614
+ {
615
+ "type": "equation",
616
+ "text": "\n$$\n\\arg \\min _ {\\theta} L (\\theta ; D _ {A}) + L (\\theta ; D _ {B}) \\tag {5}\n$$\n",
617
+ "text_format": "latex",
618
+ "bbox": [
619
+ 174,
620
+ 787,
621
+ 473,
622
+ 809
623
+ ],
624
+ "page_idx": 3
625
+ },
626
+ {
627
+ "type": "text",
628
+ "text": "where $D_A$ is completely unknown and only $D_B$ is present. However, we have the optimal solution $\\theta_A$ on $D_A$ . In that case, the formulation becomes equivalent to continual learning, i.e., continually training the model on a new dataset while preserving its performance on historical data so as to achieve sufficient generalizability.",
629
+ "bbox": [
630
+ 84,
631
+ 814,
632
+ 475,
633
+ 906
634
+ ],
635
+ "page_idx": 3
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "4.2.3. INTERPOLATED WEIGHT REGULARIZATION",
640
+ "text_level": 1,
641
+ "bbox": [
642
+ 496,
643
+ 85,
644
+ 849,
645
+ 98
646
+ ],
647
+ "page_idx": 3
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "While there have been many methods of studying continual learning, most of them are based on storing historical data or information, which is not applicable in our case. It is due to the fact that we do not have access to $D_A$ at all. Inspired by empirical results in (Ilharco et al., 2022), we propose to lowing the first loss term in Equation (5) by introducing an optimization-free weight interpolation strategy:",
652
+ "bbox": [
653
+ 495,
654
+ 99,
655
+ 885,
656
+ 207
657
+ ],
658
+ "page_idx": 3
659
+ },
660
+ {
661
+ "type": "equation",
662
+ "text": "\n$$\n\\theta = \\lambda \\theta_ {A} + (1 - \\lambda) \\theta_ {B}, \\tag {6}\n$$\n",
663
+ "text_format": "latex",
664
+ "bbox": [
665
+ 602,
666
+ 220,
667
+ 885,
668
+ 236
669
+ ],
670
+ "page_idx": 3
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "where $\\lambda$ is a trade-off hyperparameter. Equation (6) is called model patching (Ilharco et al., 2022), which is commonly used between two converged model weights, i.e., $\\theta_B$ is trained separately on $D_B$ only. A potential risk of this method is that we have no explicit optimization on the curve fitting performance of the final patched model, i.e., the patch may be severely underfitting to $D_B$ or sensitive to the trade-off parameter $\\lambda$ .",
675
+ "bbox": [
676
+ 495,
677
+ 250,
678
+ 885,
679
+ 371
680
+ ],
681
+ "page_idx": 3
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "To address this issue, we propose Interpolated Weight Regularization as part of the training procedure, which regularizes the loss of the interpolated weights on $D_B$ . Given that the $\\lambda$ is a hyperparameter that may vary, instead of optimizing a single point, we look for a solution such that the patched model's performance w.r.t. a range of interpolation coefficients are optimized. This is achieved by sampling a balancing coefficient during training. The final optimization objective becomes:",
686
+ "bbox": [
687
+ 495,
688
+ 377,
689
+ 888,
690
+ 513
691
+ ],
692
+ "page_idx": 3
693
+ },
694
+ {
695
+ "type": "equation",
696
+ "text": "\n$$\n\\underset {\\theta_ {B}} {\\arg \\min } \\mathcal {L} = L \\left(\\theta_ {B}; D _ {B}\\right) + \\beta L \\left(\\alpha \\theta_ {A} + (1 - \\alpha) \\theta_ {B}; D _ {B}\\right) \\tag {7}\n$$\n",
697
+ "text_format": "latex",
698
+ "bbox": [
699
+ 501,
700
+ 526,
701
+ 885,
702
+ 564
703
+ ],
704
+ "page_idx": 3
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "where $\\alpha \\sim \\mathsf{U}(0,\\lambda)$ . The $(0,\\lambda)$ interval corresponds to the low-level region between the interpolated and end weights. $\\beta$ is the trade-off coefficient for regularization and it is set as $\\beta = C\\frac{1}{1 - \\alpha}$ in practice where $C$ is a constant value. The loss can be optimized by calculating its derivative as follows:",
709
+ "bbox": [
710
+ 496,
711
+ 566,
712
+ 885,
713
+ 642
714
+ ],
715
+ "page_idx": 3
716
+ },
717
+ {
718
+ "type": "equation",
719
+ "text": "\n$$\n\\begin{array}{l} \\frac {d \\mathcal {L}}{d \\theta} = \\left. \\frac {d L}{d \\theta} \\right| _ {\\theta = \\theta_ {B}} + \\beta (1 - \\alpha) \\left. \\frac {d L}{d \\theta} \\right| _ {\\theta = \\alpha \\theta_ {A} + (1 - \\alpha) \\theta_ {B}} (8) \\\\ = \\left. \\frac {d L}{d \\theta} \\right| _ {\\theta = \\theta_ {B}} + C \\left. \\frac {d L}{d \\theta} \\right| _ {\\theta = \\alpha \\theta_ {A} + (1 - \\alpha) \\theta_ {B}}. (9) \\\\ \\end{array}\n$$\n",
720
+ "text_format": "latex",
721
+ "bbox": [
722
+ 517,
723
+ 652,
724
+ 885,
725
+ 728
726
+ ],
727
+ "page_idx": 3
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "After we obtain the optimal $\\theta_B$ , Equation (6) is applied to achieve the final VCLIP model weights.",
732
+ "bbox": [
733
+ 496,
734
+ 739,
735
+ 885,
736
+ 768
737
+ ],
738
+ "page_idx": 3
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.2.4. STOCHASTIC WEIGHT AVERAGING",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 496,
746
+ 784,
747
+ 790,
748
+ 797
749
+ ],
750
+ "page_idx": 3
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Improved zero-shot predicting ability lies in good generalization ability. We further introduce an upgrade to the above method by applying Stochastic Weight Average (SWA) on the interpolated weights along the training process to find the \"flat minimum\", which refers to a region in the weight space where the loss function is relatively flat and the test error is relatively low according to (Izmailov et al., 2018).",
755
+ "bbox": [
756
+ 495,
757
+ 799,
758
+ 885,
759
+ 905
760
+ ],
761
+ "page_idx": 3
762
+ },
763
+ {
764
+ "type": "header",
765
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
766
+ "bbox": [
767
+ 305,
768
+ 56,
769
+ 668,
770
+ 71
771
+ ],
772
+ "page_idx": 3
773
+ },
774
+ {
775
+ "type": "page_number",
776
+ "text": "4",
777
+ "bbox": [
778
+ 480,
779
+ 922,
780
+ 491,
781
+ 934
782
+ ],
783
+ "page_idx": 3
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Equation (10) showcases our solution:",
788
+ "bbox": [
789
+ 84,
790
+ 85,
791
+ 343,
792
+ 102
793
+ ],
794
+ "page_idx": 4
795
+ },
796
+ {
797
+ "type": "equation",
798
+ "text": "\n$$\n\\sum_ {i} ^ {N} \\frac {\\lambda \\theta_ {A} + (1 - \\lambda) \\theta_ {i}}{N} = \\lambda \\theta_ {A} + (1 - \\lambda) \\boxed {\\frac {1}{N} \\sum_ {i} ^ {N} \\theta_ {i}} \\tag {10}\n$$\n",
799
+ "text_format": "latex",
800
+ "bbox": [
801
+ 96,
802
+ 111,
803
+ 475,
804
+ 162
805
+ ],
806
+ "page_idx": 4
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "where $\\theta_{i}$ refers to the $i$ -th set of parameters we select during the training process. As Equation (10) shows, the moving average of the interpolated weights equals to interpolating the moving average of the updated weights, showing the order of the SWA and the weight interpolation is interchangeable. So, in practice, we maintain the moving average of the model's weights during training and do weight interpolation in the end. By averaging model weights from the optimization trajectories, we will get a robust model with better generalization to unseen classes.",
811
+ "bbox": [
812
+ 84,
813
+ 172,
814
+ 475,
815
+ 324
816
+ ],
817
+ "page_idx": 4
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "4.3. Algorithm Summary",
822
+ "text_level": 1,
823
+ "bbox": [
824
+ 84,
825
+ 340,
826
+ 264,
827
+ 354
828
+ ],
829
+ "page_idx": 4
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "We show implementation of Open-VCLIP in the following pseudo code.",
834
+ "bbox": [
835
+ 84,
836
+ 356,
837
+ 473,
838
+ 386
839
+ ],
840
+ "page_idx": 4
841
+ },
842
+ {
843
+ "type": "code",
844
+ "sub_type": "algorithm",
845
+ "code_caption": [
846
+ "Algorithm 1 Training",
847
+ "Input: Dataset $D = \\{V_i, y_i\\}^N$ , Model $f_\\theta$ , Step $= 0$ ."
848
+ ],
849
+ "code_body": "Require: SWA begins at $T$ step with a cycle length $c$ . SWA $\\theta_{\\mathrm{SWA}}$ . Counting flag $l = 0$ . Model $\\mathrm{Param}\\theta$ is initialized by the CLIP $\\mathrm{Param}\\theta_{\\mathrm{CLIP}}$ . Hyper-param R, $\\beta$ . Learning rate $\\delta$ . repeat Step $\\leftarrow$ Step + 1 sample $\\{V_i,y_i\\}^M\\subseteq D,\\widetilde{V}\\gets \\{V_i\\} ^M,\\widetilde{y}\\gets \\{y_i\\} ^M$ // normal supervision loss. $L(f_{\\theta})\\gets \\frac{1}{M}\\sum_{i = 1}^{M}L(\\widetilde{V}_i,\\widetilde{y}_i,\\theta)$ // interpolation regularization. Sample $\\alpha \\sim$ Uniform(0,R) Initialize $\\widetilde{\\theta}\\gets \\alpha \\cdot \\theta_{\\mathrm{CLIP}} + (1 - \\alpha)\\cdot \\theta$ $L(f_{\\widetilde{\\theta}})\\gets \\frac{1}{M}\\sum_{i = 1}^{M}L(\\widetilde{V}_i,\\widetilde{y}_i,\\widetilde{\\theta})$ // update model with combined loss. $\\theta \\gets \\theta -\\delta \\nabla_{\\theta}(L(f_{\\theta}) + \\beta \\cdot L(f_{\\widetilde{\\theta}}))$ // stochastic weight average. if Step $>T$ and mod $(\\mathrm{Step - T},c) == 0$ then $\\theta_{\\mathrm{SWA}}\\gets (\\theta_{\\mathrm{SWA}}*l + \\theta) / (l + 1)$ $l\\gets l + 1$ end if until converge",
850
+ "bbox": [
851
+ 99,
852
+ 435,
853
+ 473,
854
+ 713
855
+ ],
856
+ "page_idx": 4
857
+ },
858
+ {
859
+ "type": "code",
860
+ "sub_type": "algorithm",
861
+ "code_caption": [
862
+ "Algorithm 2 Inference"
863
+ ],
864
+ "code_body": "Input: Testing Set $D = \\{V_i\\}^N$ , Model Param $\\theta_{\\mathrm{SWA}}$ , Original CLIP Param $\\theta_{\\mathrm{CLIP}}$ \nRequire: Set Interpolation Ratio as $\\lambda$ \nInitialize: $\\theta_{\\mathrm{FINAL}} = \\lambda *\\theta_{\\mathrm{CLIP}} + (1 - \\lambda)*\\theta_{\\mathrm{SWA}}$ \nPredict $= f(D;\\theta_{\\mathrm{FINAL}})$",
865
+ "bbox": [
866
+ 98,
867
+ 758,
868
+ 473,
869
+ 825
870
+ ],
871
+ "page_idx": 4
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "5. Experiments",
876
+ "text_level": 1,
877
+ "bbox": [
878
+ 84,
879
+ 857,
880
+ 217,
881
+ 873
882
+ ],
883
+ "page_idx": 4
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "We present in this section our experimental evaluation. We compare our Open-VCLIP method with state-of-the-art",
888
+ "bbox": [
889
+ 84,
890
+ 875,
891
+ 473,
892
+ 905
893
+ ],
894
+ "page_idx": 4
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "video models and perform ablation studies to reveal the characteristics of our method.",
899
+ "bbox": [
900
+ 496,
901
+ 84,
902
+ 885,
903
+ 114
904
+ ],
905
+ "page_idx": 4
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "5.1. Experimental Setup",
910
+ "text_level": 1,
911
+ "bbox": [
912
+ 496,
913
+ 131,
914
+ 669,
915
+ 146
916
+ ],
917
+ "page_idx": 4
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "5.1.1. DATASETS",
922
+ "text_level": 1,
923
+ "bbox": [
924
+ 496,
925
+ 148,
926
+ 622,
927
+ 161
928
+ ],
929
+ "page_idx": 4
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "In our experiments, we use the following four datasets:",
934
+ "bbox": [
935
+ 496,
936
+ 164,
937
+ 861,
938
+ 179
939
+ ],
940
+ "page_idx": 4
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Kinetics-400&600: Kinetics-400 (Kay et al., 2017) and Kinetics-600 (Carreira et al., 2018) datasets are large-scale datasets for human action recognition, containing 400 and 600 action classes, respectively. The Kinetics-600 dataset is an extension of the Kinetics-400 dataset, including 220 new categories. These additional classes provide a valuable resource for evaluating the zero-shot ability of models trained on the Kinetics-400. Each video is a 10-second around action moment annotated from YouTube videos.",
945
+ "bbox": [
946
+ 495,
947
+ 185,
948
+ 887,
949
+ 321
950
+ ],
951
+ "page_idx": 4
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "UCF-101: The UCF-101 dataset (Soomro et al., 2012) is a widely used dataset for human action recognition, which contains 13,320 video clips from 101 action categories. Each video in the dataset is a short clip of an action, with an average length of 7.21 seconds, that is captured from real-world scenarios. Officially, three different training/testing splits files are provided.",
956
+ "bbox": [
957
+ 495,
958
+ 329,
959
+ 887,
960
+ 436
961
+ ],
962
+ "page_idx": 4
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "HMDB-51: HMDB-51 (Kuehne et al., 2011) contains 6,849 clips divided into 51 action categories with each category containing at least 101 clips. Officially, three different training/testing splits are provided to evaluate the model. To ensure a balance in the number of samples per category, 1,746 videos are left \"unused\" in each split, while each category is guaranteed to have 70 training samples and 30 test samples. Having a consistent number of testing samples for each category allows for a fair evaluation.",
967
+ "bbox": [
968
+ 495,
969
+ 441,
970
+ 888,
971
+ 580
972
+ ],
973
+ "page_idx": 4
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "We use the Kinetics-400 dataset as the training set and use UCF-101, HMDB-51, and a subset of the Kinetics-600 dataset as test datasets. By testing on datasets that contain no/few overlapping categories with the training dataset, we are able to provide a realistic and comprehensive evaluation of the zero-shot capabilities. Detailed evaluation protocols are described below.",
978
+ "bbox": [
979
+ 495,
980
+ 585,
981
+ 887,
982
+ 691
983
+ ],
984
+ "page_idx": 4
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "5.1.2. EVALUATION PROTOCOLS",
989
+ "text_level": 1,
990
+ "bbox": [
991
+ 496,
992
+ 707,
993
+ 725,
994
+ 720
995
+ ],
996
+ "page_idx": 4
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "UCF-101&HMDB-51: Following (Brattoli et al., 2020) and (Ni et al., 2022), there are three protocols for zero-shot evaluation on these two datasets.",
1001
+ "bbox": [
1002
+ 495,
1003
+ 722,
1004
+ 885,
1005
+ 767
1006
+ ],
1007
+ "page_idx": 4
1008
+ },
1009
+ {
1010
+ "type": "list",
1011
+ "sub_type": "text",
1012
+ "list_items": [
1013
+ "- Evaluation Protocol 1 (EP1): We first randomly choose half of the classes in the test dataset, i.e., 50 for UCF and 25 for HMDB, and repeat ten times and report averaged results for each dataset. (Brattoli et al., 2020)",
1014
+ "- Evaluation Protocol 2 (EP2): We test the model on full UCF and HMDB, i.e., evaluating on all 101 UCF classes and all 51 HMDB classes (Brattoli et al., 2020)."
1015
+ ],
1016
+ "bbox": [
1017
+ 514,
1018
+ 775,
1019
+ 887,
1020
+ 888
1021
+ ],
1022
+ "page_idx": 4
1023
+ },
1024
+ {
1025
+ "type": "header",
1026
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1027
+ "bbox": [
1028
+ 305,
1029
+ 56,
1030
+ 668,
1031
+ 71
1032
+ ],
1033
+ "page_idx": 4
1034
+ },
1035
+ {
1036
+ "type": "page_number",
1037
+ "text": "5",
1038
+ "bbox": [
1039
+ 480,
1040
+ 922,
1041
+ 491,
1042
+ 934
1043
+ ],
1044
+ "page_idx": 4
1045
+ },
1046
+ {
1047
+ "type": "table",
1048
+ "img_path": "images/dfdb297e407da45f62ebb62ed1d62d66a954cdbe625bfe70f05be86d41a6f2a5.jpg",
1049
+ "table_caption": [
1050
+ "Table 1. Zero-shot classification performance for various algorithms on UCF and HMDB with different protocols (see Section 5.1.2)."
1051
+ ],
1052
+ "table_footnote": [],
1053
+ "table_body": "<table><tr><td rowspan=\"2\">METHOD</td><td rowspan=\"2\">ENCODER</td><td colspan=\"2\">UCF</td><td colspan=\"2\">HMDB</td></tr><tr><td>EP1</td><td>EP2</td><td>EP1</td><td>EP2</td></tr><tr><td>GA (MISHRA ET AL., 2018)</td><td>C3D</td><td>17.3±1.1</td><td>-</td><td>19.3±2.1</td><td>-</td></tr><tr><td>TARN (BISHAY ET AL., 2019)</td><td>C3D</td><td>19.0±2.3</td><td>-</td><td>19.5±4.2</td><td>-</td></tr><tr><td>CWEGAN (MANDAL ET AL., 2019)</td><td>I3D</td><td>26.9±2.8</td><td>-</td><td>30.2±2.7</td><td>-</td></tr><tr><td>TS-GCN (GAO ET AL., 2019)</td><td>GLNET</td><td>34.2±3.1</td><td>-</td><td>23.2±3.0</td><td>-</td></tr><tr><td>PS-GNN (GAO ET AL., 2020)</td><td>GLNET</td><td>36.1±4.8</td><td>-</td><td>25.9±4.1</td><td>-</td></tr><tr><td>E2E (BRATTOLI ET AL., 2020)</td><td>R(2+1)D</td><td>48.0</td><td>37.6</td><td>32.7 / 26.9</td><td></td></tr><tr><td>DASZL (KIM ET AL., 2021)</td><td>TSM</td><td>48.9±5.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td>ER (CHEN &amp; HUANG, 2021)</td><td>TSM</td><td>51.8±2.9</td><td>-</td><td>35.3±4.6</td><td>-</td></tr><tr><td>REST (LIN ET AL., 2022)</td><td>RESNET101</td><td>58.7±3.3</td><td>40.6</td><td>41.1±3.7</td><td>34.4</td></tr><tr><td>ACTIONCLIP (WANG ET AL., 2021)</td><td>VIT-B/16</td><td>-</td><td>69.5</td><td>-</td><td>50.5</td></tr><tr><td>TEXT4VIS (WU ET AL., 2023)</td><td>VIT-L/14</td><td>85.8±3.3</td><td>79.6</td><td>58.1±5.7</td><td>49.8</td></tr><tr><td rowspan=\"3\">OPEN-VCLIP</td><td>VIT-B/32</td><td>87.1±2.4</td><td>79.5</td><td>62.3±4.0</td><td>49.9</td></tr><tr><td>VIT-B/16</td><td>89.9±1.7</td><td>83.5</td><td>64.5±4.5</td><td>53.2</td></tr><tr><td>VIT-L/14</td><td>93.1±1.9</td><td>87.9</td><td>68.5±4.0</td><td>58.3</td></tr></table>",
1054
+ "bbox": [
1055
+ 178,
1056
+ 119,
1057
+ 792,
1058
+ 357
1059
+ ],
1060
+ "page_idx": 5
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "- Evaluation Protocol 3 (EP3): We perform testing using three official splits and average the results of each split (Ni et al., 2022). The average top-1 accuracy and standard deviation are reported.",
1065
+ "bbox": [
1066
+ 102,
1067
+ 375,
1068
+ 473,
1069
+ 436
1070
+ ],
1071
+ "page_idx": 5
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Kinetics-600: (Chen & Huang, 2021) randomly split 220 new classes in Kinetics-600 into 60 validation classes and 160 testing classes, respectively, three times. We use the same splits provided by (Chen & Huang, 2021). We report the average top-1 accuracy as well as the standard deviation.",
1076
+ "bbox": [
1077
+ 84,
1078
+ 441,
1079
+ 475,
1080
+ 518
1081
+ ],
1082
+ "page_idx": 5
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "5.1.3. IMPLEMENTATION DETAILS",
1087
+ "text_level": 1,
1088
+ "bbox": [
1089
+ 84,
1090
+ 532,
1091
+ 328,
1092
+ 546
1093
+ ],
1094
+ "page_idx": 5
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "The initial learning rate is set to $3.33 \\times 10^{-6}$ and is decayed to $3.33 \\times 10^{-8}$ following the cosine decay scheduler. We use 2 epochs to warm up the training and another 20 epochs for fine-tuning on Kinetics-400. Th learning rate for warm-up is set to $3.33 \\times 10^{-8}$ and we use 8 GPUs for training, each contains a batch of 8 samples. Since we are performing vision-text alignment during the training process, augmentations such as mixup and cutmix significantly impact the alignment process. Therefore, we do not use them to avoid any potential negative effects for alignment. Instead, we simply use basic augmentations like color jittering, random flipping, and random cropping. Each video clip is extracted every 16 frames for a total of 8 frames to form an input video clip. During testing, 3 clips with 1 crop (\"3 × 1 views\") per video will be sampled to produce a prediction and the results will be further aggregated linearly. Furthermore, we set the interval of regularization to (0.0, 0.6), the balance ratio $C$ of the regularization is set to 0.5, and we start SWA from the second epoch when the warm-up stage finishes.",
1099
+ "bbox": [
1100
+ 84,
1101
+ 547,
1102
+ 475,
1103
+ 835
1104
+ ],
1105
+ "page_idx": 5
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "5.2. Main Results",
1110
+ "text_level": 1,
1111
+ "bbox": [
1112
+ 496,
1113
+ 375,
1114
+ 624,
1115
+ 387
1116
+ ],
1117
+ "page_idx": 5
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "5.2.1.COMPARISON TO STATE-OF-THE-ARTS",
1122
+ "text_level": 1,
1123
+ "bbox": [
1124
+ 496,
1125
+ 391,
1126
+ 812,
1127
+ 404
1128
+ ],
1129
+ "page_idx": 5
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "We compare our method to state-of-the-art zero-shot video action recognition methods using the UCF-101, HMDB-51, and a subset of Kinetics-600 datasets for evaluation. We first present the results under Evaluation Protocol 1 and Evaluation Protocol 2, summarized in Table 1. The first block of Table 1 presents methods that do not rely on large-scale vision-language pretrained models, while the last two blocks of Table 1 show the performance of CLIP-based methods that transfer the image CLIP model to the video domain by fine-tuning on the Kinetics-400 dataset.",
1134
+ "bbox": [
1135
+ 495,
1136
+ 406,
1137
+ 887,
1138
+ 556
1139
+ ],
1140
+ "page_idx": 5
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "As shown in the table, the results of CLIP-based methods, i.e. ActionCLIP, TEXT3VIS, and ours, are significantly better than other methods. This indicates that knowledge from large-scale vision-language pretrained models is important for zero-shot video action recognition performance. Furthermore, when using the ViT-B/16 encoder, our method outperforms ActionCLIP by $14\\%$ (83.5% vs 69.5%) and $2.7\\%$ (53.2% vs 50.5%); when using the ViT-L/14 encoder, our method outperforms TEXT4VIS by $8.3\\%$ (87.9% vs 79.6%) and $8.5\\%$ (58.3% vs 49.8%). These substantial improvements in accuracy highlight that our approach can effectively adapt the CLIP model to the video domain for improved zero-shot recognition. We also compare with X-CLIP (Ni et al., 2022) under Evaluation Protocol 3 on UCF and HMDB datasets. Results in Table 2 reveal that OpenVCLIP outperforms X-CLIP by $11.4\\%$ (83.4% vs 72.0%) on UCF and $9.3\\%$ (53.9% vs 44.6%) on HMDB using ViT-B/16, suggesting the effectiveness of our approach.",
1145
+ "bbox": [
1146
+ 495,
1147
+ 565,
1148
+ 888,
1149
+ 837
1150
+ ],
1151
+ "page_idx": 5
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "As for Kinetics-600 dataset, as shown in Table 3, we see that our method also performs favorably, especially compared to X-CLIP (Ni et al., 2022) and TEXT4VIS (Wu et al., 2023).",
1156
+ "bbox": [
1157
+ 496,
1158
+ 844,
1159
+ 888,
1160
+ 888
1161
+ ],
1162
+ "page_idx": 5
1163
+ },
1164
+ {
1165
+ "type": "header",
1166
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1167
+ "bbox": [
1168
+ 305,
1169
+ 56,
1170
+ 666,
1171
+ 70
1172
+ ],
1173
+ "page_idx": 5
1174
+ },
1175
+ {
1176
+ "type": "page_number",
1177
+ "text": "6",
1178
+ "bbox": [
1179
+ 480,
1180
+ 922,
1181
+ 491,
1182
+ 934
1183
+ ],
1184
+ "page_idx": 5
1185
+ },
1186
+ {
1187
+ "type": "table",
1188
+ "img_path": "images/622a97fe8df1cfd611a3b5277a31e35bd3edbe463f2bd0a958126c5c2225a999.jpg",
1189
+ "table_caption": [
1190
+ "Table 2. We compare the zero-shot classification performance with X-CLIP on UCF and HMDB dataset with Evaluation Protocol 3."
1191
+ ],
1192
+ "table_footnote": [],
1193
+ "table_body": "<table><tr><td>METHOD</td><td>ENCODER</td><td>UCF</td><td>HMDB</td></tr><tr><td>X-CLIP</td><td>ViT-B/16</td><td>72.0±2.3</td><td>44.6±5.2</td></tr><tr><td rowspan=\"3\">OPEN-VCLIP</td><td>ViT-B/32</td><td>79.4±1.1</td><td>50.6±0.3</td></tr><tr><td>ViT-B/16</td><td>83.4±1.2</td><td>53.9±1.2</td></tr><tr><td>ViT-L/14</td><td>87.6±1.2</td><td>59.0±0.6</td></tr></table>",
1194
+ "bbox": [
1195
+ 99,
1196
+ 130,
1197
+ 457,
1198
+ 218
1199
+ ],
1200
+ "page_idx": 6
1201
+ },
1202
+ {
1203
+ "type": "table",
1204
+ "img_path": "images/5f90ed68f60c8ae61fb0175077ba1a1a8232a0de69a7bfd63c1f00f78a5f02c6.jpg",
1205
+ "table_caption": [
1206
+ "Table 3. Comparisons of zero-shot video action recognition performance of different algorithms on Kinetics-600."
1207
+ ],
1208
+ "table_footnote": [],
1209
+ "table_body": "<table><tr><td colspan=\"2\">METHOD</td><td>TOP-1 ACC</td><td>TOP-5 ACC</td></tr><tr><td colspan=\"2\">ER (CHEN &amp; HUANG, 2021)</td><td>42.1±1.4</td><td>73.1±0.3</td></tr><tr><td colspan=\"2\">X-CLIP VIT-B/16 (NI ET AL., 2022)</td><td>65.2±0.4</td><td>86.1±0.8</td></tr><tr><td colspan=\"2\">TEXT4VIS VIT-L/14 (WU ET AL., 2023)</td><td>68.9±1.0</td><td>-</td></tr><tr><td rowspan=\"3\">OPEN-VCLIP</td><td>VIT-B/32</td><td>69.5±0.6</td><td>91.7±0.1</td></tr><tr><td>VIT-B/16</td><td>73.0±0.8</td><td>93.2±0.1</td></tr><tr><td>VIT-L/14</td><td>81.1±0.8</td><td>96.3±0.3</td></tr></table>",
1210
+ "bbox": [
1211
+ 94,
1212
+ 282,
1213
+ 464,
1214
+ 431
1215
+ ],
1216
+ "page_idx": 6
1217
+ },
1218
+ {
1219
+ "type": "table",
1220
+ "img_path": "images/d90f50b6e79d788ea034d89d0e8dd4398565a0f174059757eceae0a8354ad763.jpg",
1221
+ "table_caption": [
1222
+ "Table 4. Comparing our method with various alternative methods using different backbone networks, including ViT-B/32, ViT-B/16 and ViT-L/14. \"CLIP*\" denotes the results of directly applying the image pretrained CLIP model. \"FINE-TUNE\" denotes the standard fine-tuning process using the same model as Open-VCLIP."
1223
+ ],
1224
+ "table_footnote": [],
1225
+ "table_body": "<table><tr><td>NET</td><td>DSET</td><td>CLIP*</td><td>FINE-TUNE</td><td>OPEN-VCLIP</td></tr><tr><td rowspan=\"3\">B/32</td><td>UCF</td><td>69.1</td><td>78.0↑8.9</td><td>79.5↑10.4</td></tr><tr><td>HMDB</td><td>45.4</td><td>47.3↑1.9</td><td>49.9↑4.5</td></tr><tr><td>K600</td><td>64.8</td><td>62.8↓2.0</td><td>69.5↑4.7</td></tr><tr><td rowspan=\"3\">B/16</td><td>UCF</td><td>74.2</td><td>79.7↑5.5</td><td>83.5↑9.3</td></tr><tr><td>HMDB</td><td>47.6</td><td>49.2↑1.6</td><td>53.2↑5.6</td></tr><tr><td>K600</td><td>68.1</td><td>65.9↓2.2</td><td>73.0↑4.9</td></tr><tr><td rowspan=\"3\">L/14</td><td>UCF</td><td>80.5</td><td>85.0↑4.5</td><td>87.9↑7.4</td></tr><tr><td>HMDB</td><td>55.0</td><td>51.9↓3.1</td><td>58.3↑3.3</td></tr><tr><td>K600</td><td>76.2</td><td>74.9↓1.3</td><td>81.1↑4.9</td></tr></table>",
1226
+ "bbox": [
1227
+ 88,
1228
+ 547,
1229
+ 468,
1230
+ 704
1231
+ ],
1232
+ "page_idx": 6
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "5.2.2. RESULTS WITH DIFFERENT BACKBONES",
1237
+ "text_level": 1,
1238
+ "bbox": [
1239
+ 84,
1240
+ 738,
1241
+ 416,
1242
+ 752
1243
+ ],
1244
+ "page_idx": 6
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "We compare Open-VCLIP with the CLIP baseline and standard fine-tuning using various backbone networks. In particular, the results in the \"CLIP*\" column of Table 4 show the performance of the pretrained CLIP model, which predicts each image frame of the video separately. The \"FINE-TUNE\" column shows the results of a standard fine-tuning process using the same model as Open-VCLIP. We see from Table 4 that larger backbone networks (ViT-L/14 > ViT-B/16 > ViT-B/32) consistently improve zero-shot performance. For example, the results in the \"CLIP*\" column",
1249
+ "bbox": [
1250
+ 84,
1251
+ 753,
1252
+ 475,
1253
+ 905
1254
+ ],
1255
+ "page_idx": 6
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "show that the ViT-L/14 model outperforms the ViT-B/16 by $6.3\\%$ (80.5% vs 74.2%), 7.4% (55.0% vs 47.6%), and 8.1% (76.2% vs 68.1%) on the UCF, HMDB, and Kinetics-600 datasets, respectively, while similar trends can be found in the last two columns of Table 4, demonstrating that larger-scale vision-language pretrained models contain stronger zero-shot knowledge and are more robust when transferred from image to video tasks. However, as we can see from the results of \"FINE-TUNE\" and \"CLIP*\" in Table 4, the fine-tuning process does not always result in improved performance. For example, the fine-tuning process leads to worse zero-shot results on the HMDB dataset when using the ViT-L/14 backbone, and all zero-shot testing results on the Kinetics-600 show a performance drop after models are fine-tuned on Kinetics-400 under a standard paradigm. The results indicate that the knowledge stored in CLIP cannot always be transferred with conventional fine-tuning.",
1260
+ "bbox": [
1261
+ 495,
1262
+ 84,
1263
+ 887,
1264
+ 340
1265
+ ],
1266
+ "page_idx": 6
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "Compared to the baselines, our approach demonstrates significant and consistent improvements in zero-shot video action recognition across various datasets and models, as shown in the last column of Table 4. Taking experimental results on Kinetics-600 as an example, our approach not only avoids the performance drop seen in the \"FINE-TUNE\" method, but also significantly improves zero-shot recognition. This highlights the effectiveness of our method in effectively using annotated video datasets with limited labels for transfer learning and effectively preventing knowledge from forgetting, offering stable and decent results.",
1271
+ "bbox": [
1272
+ 495,
1273
+ 349,
1274
+ 888,
1275
+ 515
1276
+ ],
1277
+ "page_idx": 6
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "5.3. Discussion and Ablation Studies",
1282
+ "text_level": 1,
1283
+ "bbox": [
1284
+ 496,
1285
+ 532,
1286
+ 756,
1287
+ 545
1288
+ ],
1289
+ "page_idx": 6
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "The effectiveness of temporal modeling and weight interpolation. We also investigate whether temporal modeling is needed for transferring CLIP to the video domain. To this end, we compare the performance of the CLIP, VCLIP, and Open-VCLIP, represented by green, blue and red curves in Figure 2, respectively. In particular, VCLIP expands the original spatial attention of CLIP to spatial-temporal attention without additional parameters as in Open-VCLIP. The curves illustrate weight interpolations with different mixing coefficients between CLIP and the fine-tuned model. Concretely, the $y$ -axis displays the accuracy on the zero-shot video dataset, while the $x$ -axis displays accuracy on the fine-tunning dataset, Kinetics-400.",
1294
+ "bbox": [
1295
+ 495,
1296
+ 547,
1297
+ 887,
1298
+ 743
1299
+ ],
1300
+ "page_idx": 6
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Comparing the tails of the green and blue curves, we see that VCLIP achieves not only better close-set performance, but also better zero-shot performance on all of the three datasets. At the same time, when applying weight interpolation with different ratios, VCLIP achieves better trade-off than CLIP, as evidenced by the fact that the blue curve is always on top of the green curve in Figure 2. This strongly suggests the significant advantages that come with incorporating temporal modeling in the context of zero-shot video action recognition.",
1305
+ "bbox": [
1306
+ 495,
1307
+ 751,
1308
+ 888,
1309
+ 902
1310
+ ],
1311
+ "page_idx": 6
1312
+ },
1313
+ {
1314
+ "type": "header",
1315
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1316
+ "bbox": [
1317
+ 305,
1318
+ 56,
1319
+ 666,
1320
+ 71
1321
+ ],
1322
+ "page_idx": 6
1323
+ },
1324
+ {
1325
+ "type": "page_number",
1326
+ "text": "7",
1327
+ "bbox": [
1328
+ 480,
1329
+ 922,
1330
+ 491,
1331
+ 934
1332
+ ],
1333
+ "page_idx": 6
1334
+ },
1335
+ {
1336
+ "type": "image",
1337
+ "img_path": "images/9cd9964e277e4f5e1726a8f99dbc70cb0908a788f1c9c10e6c1a9548e5571154.jpg",
1338
+ "image_caption": [
1339
+ "Figure 2. We evaluate the effectiveness of temporal modeling and weight interpolation with a VCLIP B/16 model. Points on each curve represent interpolation ratios of 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2 and 0.0 from left to right, respectively. The red star marks correspond to our reported main results. We test on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600."
1340
+ ],
1341
+ "image_footnote": [],
1342
+ "bbox": [
1343
+ 99,
1344
+ 80,
1345
+ 351,
1346
+ 205
1347
+ ],
1348
+ "page_idx": 7
1349
+ },
1350
+ {
1351
+ "type": "image",
1352
+ "img_path": "images/8220291d420b8889c333e34bdfbe883bbd4504be625f1858c96bf6266f6ea674.jpg",
1353
+ "image_caption": [],
1354
+ "image_footnote": [],
1355
+ "bbox": [
1356
+ 357,
1357
+ 80,
1358
+ 604,
1359
+ 205
1360
+ ],
1361
+ "page_idx": 7
1362
+ },
1363
+ {
1364
+ "type": "image",
1365
+ "img_path": "images/cd24ca866ecbd0350925ba7d61c9722d0bdd89e68bc4a5d7b1654bb9c534b71a.jpg",
1366
+ "image_caption": [],
1367
+ "image_footnote": [],
1368
+ "bbox": [
1369
+ 625,
1370
+ 80,
1371
+ 867,
1372
+ 205
1373
+ ],
1374
+ "page_idx": 7
1375
+ },
1376
+ {
1377
+ "type": "image",
1378
+ "img_path": "images/c127d83adebeda7db889e4ff0d1e6ea5c1077900413875f1a70faab2f8dd331e.jpg",
1379
+ "image_caption": [
1380
+ "Figure 3. We evaluate the effectiveness of IWR and SWA with a VCLIP B/16 on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600."
1381
+ ],
1382
+ "image_footnote": [],
1383
+ "bbox": [
1384
+ 99,
1385
+ 273,
1386
+ 352,
1387
+ 396
1388
+ ],
1389
+ "page_idx": 7
1390
+ },
1391
+ {
1392
+ "type": "image",
1393
+ "img_path": "images/20c11b3d08f9988938ff69a8eb8f02822ce8c0d089e5f6982f002571b4e6a6e4.jpg",
1394
+ "image_caption": [],
1395
+ "image_footnote": [],
1396
+ "bbox": [
1397
+ 359,
1398
+ 273,
1399
+ 609,
1400
+ 396
1401
+ ],
1402
+ "page_idx": 7
1403
+ },
1404
+ {
1405
+ "type": "image",
1406
+ "img_path": "images/62d0a989cf9eaa3b2dbc3bbc44cf650c7fa5552cff532480b925a11c08898b2c.jpg",
1407
+ "image_caption": [],
1408
+ "image_footnote": [],
1409
+ "bbox": [
1410
+ 625,
1411
+ 273,
1412
+ 867,
1413
+ 396
1414
+ ],
1415
+ "page_idx": 7
1416
+ },
1417
+ {
1418
+ "type": "image",
1419
+ "img_path": "images/df0313edafd360464ad53b6221f57d5242b459af7bec8326d45999ec74e4b95a.jpg",
1420
+ "image_caption": [
1421
+ "Figure 4. We compare Open-VCLIP with an $\\ell_2$ regularization imposed on weights on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600."
1422
+ ],
1423
+ "image_footnote": [],
1424
+ "bbox": [
1425
+ 102,
1426
+ 452,
1427
+ 629,
1428
+ 574
1429
+ ],
1430
+ "page_idx": 7
1431
+ },
1432
+ {
1433
+ "type": "image",
1434
+ "img_path": "images/cdd1ff4dcd2249662a300ea5e42d720b3d07c5d13d390390e7bca38d9ba2b175.jpg",
1435
+ "image_caption": [],
1436
+ "image_footnote": [],
1437
+ "bbox": [
1438
+ 630,
1439
+ 452,
1440
+ 864,
1441
+ 571
1442
+ ],
1443
+ "page_idx": 7
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Furthermore, the clear margins observed between the red curves and the other curves in Figure 2 show that our proposed solution achieves the best trade-off compared to pure fine-tuning. With the same-level of close-set results, our approach always produces better zero-shot accuracy. In addition, the star marks on the red curves, which correspond to the reported main results in Tables 1 to 3, are always better than the other baseline curves.",
1448
+ "bbox": [
1449
+ 84,
1450
+ 641,
1451
+ 475,
1452
+ 760
1453
+ ],
1454
+ "page_idx": 7
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "IWR v.s. SWA. Our approach is composed of two weight interpolation modules: IWR which is used during training to regularize the fine-tuning process and SWA to improve generalization. We investigate their contributions to the final results in Figure 3. Overall, removing either IWR (green curve) or SWA (yellow curve) from the model leads to significant drops, i.e. the red curve outperforms all other curves, suggesting IWR and SWA are complimentary to each other. Furthermore, we see using only IWR or SWA is",
1459
+ "bbox": [
1460
+ 84,
1461
+ 768,
1462
+ 473,
1463
+ 905
1464
+ ],
1465
+ "page_idx": 7
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "able to produce a good zero-shot performance improvement, compared to the results with no interpolation at all.",
1470
+ "bbox": [
1471
+ 496,
1472
+ 641,
1473
+ 885,
1474
+ 671
1475
+ ],
1476
+ "page_idx": 7
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Weight regularization during fine-tuning. IWR is conceptually similar to EWC (Kirkpatrick et al., 2017), which penalizes the changes of important parameters for solving previous tasks. However, EWC needs to assess the importance of parameters through historical data which is not feasible to our setting. Instead, we simply constrain the optimization by penalizing the weight changes using an $\\ell_2$ norm. Concretely, we use the $\\ell_2$ distance between the updated weights and the original weights as the regularization loss term during training, assigning various weights to the regularization loss term. As shown in Figure 4, our method achieves the best trade-off. Open-VCLIP achieves higher close-set and zero-shot accuracy across all the datasets compared with simply applying an $\\ell_2$ normalization, demonstrating the effectiveness of Open-VCLIP.",
1481
+ "bbox": [
1482
+ 495,
1483
+ 678,
1484
+ 888,
1485
+ 904
1486
+ ],
1487
+ "page_idx": 7
1488
+ },
1489
+ {
1490
+ "type": "header",
1491
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1492
+ "bbox": [
1493
+ 305,
1494
+ 56,
1495
+ 668,
1496
+ 71
1497
+ ],
1498
+ "page_idx": 7
1499
+ },
1500
+ {
1501
+ "type": "page_number",
1502
+ "text": "8",
1503
+ "bbox": [
1504
+ 480,
1505
+ 922,
1506
+ 491,
1507
+ 934
1508
+ ],
1509
+ "page_idx": 7
1510
+ },
1511
+ {
1512
+ "type": "table",
1513
+ "img_path": "images/52c4c8c41fd83e071162f1b1f96bd730075a7ad61c4ee521f9fb0315419176b2.jpg",
1514
+ "table_caption": [
1515
+ "Table 5. Comparison of zero-shot video-to-text/text-to-video Retrieval performance for various algorithms. \"T2VRN\" denotes the recall@N of text-to-video retrieval. \"V2TRN\" denotes the recall@N of video-to-text retrieval."
1516
+ ],
1517
+ "table_footnote": [],
1518
+ "table_body": "<table><tr><td>METHOD</td><td>K400 TUNE</td><td>λ</td><td>K400</td><td>t2vR1</td><td>t2vR5</td><td>t2vR10</td><td>v2TR1</td><td>v2TR5</td><td>v2TR10</td></tr><tr><td>FROZEN (BAIN ET AL., 2021)</td><td>×</td><td>-</td><td>-</td><td>24.7</td><td>46.9</td><td>57.2</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CLIP (PORTILLO ET AL., 2021)</td><td>×</td><td>-</td><td>-</td><td>31.2</td><td>53.7</td><td>64.2</td><td>27.2</td><td>51.7</td><td>62.6</td></tr><tr><td>CLIP (OUR IMPLEMENT)</td><td>×</td><td>-</td><td>57.5</td><td>31.1</td><td>54.2</td><td>63.8</td><td>28.9</td><td>53.0</td><td>64.9</td></tr><tr><td>OPEN-VCLIP</td><td>✓</td><td>0.5</td><td>78.9</td><td>31.3</td><td>54.3</td><td>65.6</td><td>33.6</td><td>59.1</td><td>70.0</td></tr><tr><td>OPEN-VCLIP</td><td>✓</td><td>0.7</td><td>73.4</td><td>33.2</td><td>57.1</td><td>67.4</td><td>34.4</td><td>59.8</td><td>71.2</td></tr></table>",
1519
+ "bbox": [
1520
+ 86,
1521
+ 138,
1522
+ 893,
1523
+ 232
1524
+ ],
1525
+ "page_idx": 8
1526
+ },
1527
+ {
1528
+ "type": "text",
1529
+ "text": "Text-to-Video/Video-to-Text Retrieval Performance. Assessing the model via text-to-video/video-to-text retrieval tasks offers insight into its generalizability within the video domain. We follow the paradigm of training models on Kinetics-400 dataset and testing them on MSR-VTT dataset (Xu et al., 2016), which is a large video description dataset. We firstly report the result of our own implementation using CLIP for retrieval as shown in the third row of Table 5, which is similar to the results in (Portillo et al., 2021). This guarantees fair comparisons. Then, we evaluate Open-VCLIP on MSR-VTT. We find that our text-to-video retrieval (given a text to retrieve the corresponding video) recall is comparable to that of raw CLIP but with a much higher close-set score on K400 (78.9% vs 57.5%). Further increasing the mixing coefficient $\\lambda$ improves the text-to-video retrieval performance of Open-VCLIP, surpassing the CLIP baseline by $2\\%$ . We also show that the video-to-text retrieval (given a video to retrieve the corresponding text) performance of Open-VCLIP is significantly higher than that of the CLIP baseline, demonstrating the effectiveness of our method in preserving the alignment capability when transferring to video domains.",
1530
+ "bbox": [
1531
+ 86,
1532
+ 263,
1533
+ 475,
1534
+ 595
1535
+ ],
1536
+ "page_idx": 8
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "Comparison with parameter-efficient fine-tuning. Fine-tuning only a part of the weights of a network is an effective approach for adapting the CLIP model to video in a parameter-efficient manner. A noteworthy method that employs this strategy is the ST-Adapter (Pan et al., 2022), which accomplishes effective video classification by training added adapter modules, while keeping the original parameters of the CLIP model frozen. We compare ST-Adapter with our approach. More specifically, ST-Adapter forgoes the text encoder of CLIP, while introducing an additional linear classifier instead. This change prevents the model from being used in zero-shot testing. To circumvent this problem, we incorporate the text encoder of CLIP into our implementation of the ST-Adapter. The results presented in Table 6 illustrates that the ST-Adapter, while preserving the original CLIP weights and only fine-tuning the added adapters, fails to match the performance of our proposed method in zero-shot action recognition. In particular, we observe a marked degradation in the zero-shot performance of the ST-Adapter on the K600 dataset, suggesting that",
1541
+ "bbox": [
1542
+ 86,
1543
+ 603,
1544
+ 475,
1545
+ 905
1546
+ ],
1547
+ "page_idx": 8
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "parameter-efficient fine-tuning does not effectively address the issue of catastrophic forgetting.",
1552
+ "bbox": [
1553
+ 496,
1554
+ 263,
1555
+ 883,
1556
+ 294
1557
+ ],
1558
+ "page_idx": 8
1559
+ },
1560
+ {
1561
+ "type": "table",
1562
+ "img_path": "images/825ff0d27ad295747e4ab848b88c74105c973ff342a7920376578f53680f446e.jpg",
1563
+ "table_caption": [
1564
+ "Table 6. Comparison with parameter efficient fine-tuning method."
1565
+ ],
1566
+ "table_footnote": [],
1567
+ "table_body": "<table><tr><td>METHOD</td><td>UCF</td><td>HMDB</td><td>K-600</td></tr><tr><td>CLIP</td><td>74.2</td><td>47.6</td><td>68.1±1.0</td></tr><tr><td>FINE-TUNED VCLIP</td><td>79.7</td><td>49.2</td><td>65.9±1.0</td></tr><tr><td>ST-ADAPTER</td><td>77.3</td><td>49.8</td><td>60.2±1.8</td></tr><tr><td>OPEN-VCLIP</td><td>83.5</td><td>53.2</td><td>73.0±0.8</td></tr></table>",
1568
+ "bbox": [
1569
+ 514,
1570
+ 339,
1571
+ 867,
1572
+ 426
1573
+ ],
1574
+ "page_idx": 8
1575
+ },
1576
+ {
1577
+ "type": "text",
1578
+ "text": "6. Conclusion",
1579
+ "text_level": 1,
1580
+ "bbox": [
1581
+ 496,
1582
+ 462,
1583
+ 614,
1584
+ 477
1585
+ ],
1586
+ "page_idx": 8
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "We presented Open-VCLIP, an effective approach that enables CLIP to be transformed to an open-vocabulary video model. Open-VCLIP contains lightweight temporal modeling modules that equip CLIP with the ability to capture spatial and temporal relationships in videos. More importantly, Open-VCLIP is optimized with a carefully designed regularization strategy that strives for generalization to preserve the zero-shot abilities of CLIP. Extensive experiments are conducted and the results demonstrate that Open-VCLIP outperforms state-of-the-art methods with clear margins on zero-shot video action recognition and achieves the best trade-off between close-set and zero-shot video action recognition. One potential limitation is that adversaries could craft membership inference attacks to steal information from the model.",
1591
+ "bbox": [
1592
+ 495,
1593
+ 479,
1594
+ 887,
1595
+ 705
1596
+ ],
1597
+ "page_idx": 8
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "Acknowledgements",
1602
+ "text_level": 1,
1603
+ "bbox": [
1604
+ 496,
1605
+ 727,
1606
+ 663,
1607
+ 743
1608
+ ],
1609
+ "page_idx": 8
1610
+ },
1611
+ {
1612
+ "type": "text",
1613
+ "text": "This project was supported by NSFC under Grant No. 62032006 and No. 62102092. The authors would also like to thank Junke Wang for his help and suggestions.",
1614
+ "bbox": [
1615
+ 495,
1616
+ 744,
1617
+ 885,
1618
+ 791
1619
+ ],
1620
+ "page_idx": 8
1621
+ },
1622
+ {
1623
+ "type": "text",
1624
+ "text": "References",
1625
+ "text_level": 1,
1626
+ "bbox": [
1627
+ 500,
1628
+ 810,
1629
+ 591,
1630
+ 825
1631
+ ],
1632
+ "page_idx": 8
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "Arnab, A., Dehghani, M., Heigold, G., Sun, C., Lučić, M., and Schmid, C. Vivit: A video vision transformer. In ICCV, 2021.",
1637
+ "bbox": [
1638
+ 500,
1639
+ 834,
1640
+ 885,
1641
+ 878
1642
+ ],
1643
+ "page_idx": 8
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "Bain, M., Nagrani, A., Varol, G., and Zisserman, A. Frozen",
1648
+ "bbox": [
1649
+ 500,
1650
+ 890,
1651
+ 883,
1652
+ 905
1653
+ ],
1654
+ "page_idx": 8
1655
+ },
1656
+ {
1657
+ "type": "header",
1658
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1659
+ "bbox": [
1660
+ 305,
1661
+ 56,
1662
+ 666,
1663
+ 70
1664
+ ],
1665
+ "page_idx": 8
1666
+ },
1667
+ {
1668
+ "type": "page_number",
1669
+ "text": "9",
1670
+ "bbox": [
1671
+ 480,
1672
+ 922,
1673
+ 491,
1674
+ 934
1675
+ ],
1676
+ "page_idx": 8
1677
+ },
1678
+ {
1679
+ "type": "list",
1680
+ "sub_type": "ref_text",
1681
+ "list_items": [
1682
+ "in time: A joint video and image encoder for end-to-end retrieval. In ICCV, 2021.",
1683
+ "Balaji, Y., Farajtabar, M., Yin, D., Mott, A., and Li, A. The effectiveness of memory replay in large scale continual learning. arXiv preprint arXiv:2010.02418, 2020.",
1684
+ "Bertasius, G., Wang, H., and Torresani, L. Is space-time attention all you need for video understanding? In ICML, 2021.",
1685
+ "Bishay, M., Zoumpourlis, G., and Patras, I. Tarn: Temporal attentive relation network for few-shot and zero-shot action recognition. arXiv preprint arXiv:1907.09021, 2019.",
1686
+ "Brattoli, B., Tighe, J., Zhdanov, F., Perona, P., and Chalupka, K. Rethinking zero-shot video classification: End-to-end training for realistic applications. In CVPR, 2020.",
1687
+ "Bulat, A., Perez Rua, J. M., Sudhakaran, S., Martinez, B., and Tzimiropoulos, G. Space-time mixing attention for video transformer. In NeurIPS, 2021.",
1688
+ "Carreira, J., Noland, E., Banki-Horvath, A., Hillier, C., and Zisserman, A. A short note about kinetics-600. arXiv preprint arXiv:1808.01340, 2018.",
1689
+ "Chen, S. and Huang, D. Elaborative rehearsal for zero-shot action recognition. In ICCV, 2021.",
1690
+ "Crowson, K., Biderman, S., Kornis, D., Stander, D., Hallahan, E., Castricato, L., and Raff, E. Vqgan-clip: Open domain image generation and editing with natural language guidance. In ECCV, 2022.",
1691
+ "Farajtabar, M., Azizan, N., Mott, A., and Li, A. Orthogonal gradient descent for continual learning. In IJCAI, 2020.",
1692
+ "Gao, J., Zhang, T., and Xu, C. I know the relationships: Zero-shot action recognition via two-stream graph convolutional networks and knowledge graphs. In AAAI, 2019.",
1693
+ "Gao, J., Zhang, T., and Xu, C. Learning to model relationships for zero-shot video classification. TPAMI, 2020.",
1694
+ "Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Open-vocabulary image segmentation. arXiv preprint arXiv:2112.12143, 2021.",
1695
+ "Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Scaling open-vocabulary image segmentation with image-level labels. In ECCV, 2022.",
1696
+ "Hu, H., Li, A., Calandriello, D., and Gorur, D. One pass imagenet. arXiv preprint arXiv:2111.01956, 2021.",
1697
+ "Ilharco, G., Wortsman, M., Gadre, S. Y., Song, S., Hajishirzi, H., Kornblith, S., Farhadi, A., and Schmidt, L. Patching open-vocabulary models by interpolating weights. arXiv preprint arXiv:2208.05592, 2022."
1698
+ ],
1699
+ "bbox": [
1700
+ 88,
1701
+ 85,
1702
+ 475,
1703
+ 905
1704
+ ],
1705
+ "page_idx": 9
1706
+ },
1707
+ {
1708
+ "type": "list",
1709
+ "sub_type": "ref_text",
1710
+ "list_items": [
1711
+ "Izmailov, P., Podoprikhin, D., Garipov, T., Vetrov, D., and Wilson, A. G. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018.",
1712
+ "Jain, M., Van Gemert, J. C., Mensink, T., and Snoek, C. G. Objects2action: Classifying and localizing actions without any video example. In ICCV, 2015.",
1713
+ "Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q., Sung, Y.-H., Li, Z., and Duerig, T. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021.",
1714
+ "Kay, W., Carreira, J., Simonyan, K., Zhang, B., Hillier, C., Vijayanarasimhan, S., Viola, F., Green, T., Back, T., Natsev, P., et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017.",
1715
+ "Kim, T. S., Jones, J., Piven, M., Xiao, Z., Bai, J., Zhang, Y., Qiu, W., Yuille, A., and Hager, G. D. Daszl: Dynamic action signatures for zero-shot learning. In AAAI, 2021.",
1716
+ "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. PNAS, 2017.",
1717
+ "Kuehne, H., Jhuang, H., Garrote, E., Poggio, T., and Serre, T. Hmdb: a large video database for human motion recognition. In ICCV, 2011.",
1718
+ "Lin, C.-C., Lin, K., Wang, L., Liu, Z., and Li, L. Cross-modal representation learning for zero-shot action recognition. In CVPR, 2022.",
1719
+ "Liu, J., Kuipers, B., and Savarese, S. Recognizing human actions by attributes. In CVPR, 2011.",
1720
+ "Mandal, D., Narayan, S., Dwivedi, S. K., Gupta, V., Ahmed, S., Khan, F. S., and Shao, L. Out-of-distribution detection for generalized zero-shot action recognition. In CVPR, 2019.",
1721
+ "Mishra, A., Verma, V. K., Reddy, M. S. K., Arulkumar, S., Rai, P., and Mittal, A. A generative approach to zero-shot and few-shot action recognition. In WACV, 2018.",
1722
+ "Ni, B., Peng, H., Chen, M., Zhang, S., Meng, G., Fu, J., Xiang, S., and Ling, H. Expanding language-image pretrained models for general video recognition. In ECCV, 2022.",
1723
+ "Pan, J., Lin, Z., Zhu, X., Shao, J., and Li, H. St-adapter: Parameter-efficient image-to-video transfer learning. In NeurIPS, 2022.",
1724
+ "Portillo, Quintero, J. A., Ortiz-Bayliss, J. C., and Terashima-Marín, H. A straightforward framework for video retrieval using clip. In MCPR, 2021."
1725
+ ],
1726
+ "bbox": [
1727
+ 500,
1728
+ 85,
1729
+ 885,
1730
+ 905
1731
+ ],
1732
+ "page_idx": 9
1733
+ },
1734
+ {
1735
+ "type": "header",
1736
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1737
+ "bbox": [
1738
+ 305,
1739
+ 56,
1740
+ 668,
1741
+ 71
1742
+ ],
1743
+ "page_idx": 9
1744
+ },
1745
+ {
1746
+ "type": "page_number",
1747
+ "text": "10",
1748
+ "bbox": [
1749
+ 478,
1750
+ 922,
1751
+ 495,
1752
+ 934
1753
+ ],
1754
+ "page_idx": 9
1755
+ },
1756
+ {
1757
+ "type": "list",
1758
+ "sub_type": "ref_text",
1759
+ "list_items": [
1760
+ "Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In ICML, 2021.",
1761
+ "Rusu, A. A., Rabinowitz, N. C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., and Hadsell, R. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.",
1762
+ "Shin, H., Lee, J. K., Kim, J., and Kim, J. Continual learning with deep generative replay. In NeurIPS, 2017.",
1763
+ "Soomro, K., Zamir, A. R., and Shah, M. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.",
1764
+ "Thengane, V., Khan, S., Hayat, M., and Khan, F. Clip model is an efficient continual learner. arXiv preprint arXiv:2210.03114, 2022.",
1765
+ "Wang, M., Xing, J., and Liu, Y. Actionclip: A new paradigm for video action recognition. arXiv preprint arXiv:2109.08472, 2021.",
1766
+ "Wang, Z., Lu, Y., Li, Q., Tao, X., Guo, Y., Gong, M., and Liu, T. Cris: Clip-driven referring image segmentation. In CVPR, 2022.",
1767
+ "Wu, W., Sun, Z., and Ouyang, W. Revisiting classifier: Transferring vision-language models for video recognition. In AAAI, 2023.",
1768
+ "Xing, Z., Dai, Q., Hu, H., Chen, J., Wu, Z., and Jiang, Y.-G. Svformer: Semi-supervised video transformer for action recognition. arXiv preprint arXiv:2211.13222, 2022.",
1769
+ "Xu, H., Ghosh, G., Huang, P.-Y., Okhonko, D., Aghajanyan, A., Metze, F., Zettlemoyer, L., and Feichtenhofer, C. Videoclip: Contrastive pre-training for zero-shot videotext understanding. arXiv preprint arXiv:2109.14084, 2021.",
1770
+ "Xu, J., Mei, T., Yao, T., and Rui, Y. Msr-vtt: A large video description dataset for bridging video and language. In CVPR, 2016.",
1771
+ "Xu, X., Hospedales, T., and Gong, S. Transductive zero-shot action recognition by word-vector embedding. IJCV, 2017.",
1772
+ "Yin, D., Farajtabar, M., and Sola, A. L. Continual learning with second-order loss approximation. arXiv preprint arXiv:2006.10974, 2020.",
1773
+ "Zellers, R. and Choi, Y. Zero-shot activity recognition with verb attribute induction. arXiv preprint arXiv:1707.09468, 2017."
1774
+ ],
1775
+ "bbox": [
1776
+ 86,
1777
+ 84,
1778
+ 475,
1779
+ 904
1780
+ ],
1781
+ "page_idx": 10
1782
+ },
1783
+ {
1784
+ "type": "ref_text",
1785
+ "text": "Zheng, W., Li, Q., Guo, X., Wan, P., and Wang, Z. Bridging clip and stylegan through latent alignment for image editing. arXiv preprint arXiv:2210.04506, 2022.",
1786
+ "bbox": [
1787
+ 500,
1788
+ 84,
1789
+ 887,
1790
+ 130
1791
+ ],
1792
+ "page_idx": 10
1793
+ },
1794
+ {
1795
+ "type": "header",
1796
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1797
+ "bbox": [
1798
+ 305,
1799
+ 56,
1800
+ 668,
1801
+ 71
1802
+ ],
1803
+ "page_idx": 10
1804
+ },
1805
+ {
1806
+ "type": "page_number",
1807
+ "text": "11",
1808
+ "bbox": [
1809
+ 477,
1810
+ 922,
1811
+ 493,
1812
+ 934
1813
+ ],
1814
+ "page_idx": 10
1815
+ },
1816
+ {
1817
+ "type": "text",
1818
+ "text": "A. Proof",
1819
+ "text_level": 1,
1820
+ "bbox": [
1821
+ 88,
1822
+ 83,
1823
+ 161,
1824
+ 98
1825
+ ],
1826
+ "page_idx": 11
1827
+ },
1828
+ {
1829
+ "type": "text",
1830
+ "text": "Lemma A.1. Suppose the image CLIP model was trained on an image-text dataset $D_{\\bar{A}} = \\{\\mathcal{T}_{\\bar{A}},\\mathcal{T}_{\\bar{A}}\\}$ with $N$ examples. Then, there exists a diverse video-text dataset $D_{A} = \\{\\mathcal{V}_{A},\\mathcal{T}_{A}\\}$ containing $N$ examples where the video CLIP model with original CLIP parameters $\\theta_{A}$ is optimal.",
1831
+ "bbox": [
1832
+ 86,
1833
+ 107,
1834
+ 888,
1835
+ 152
1836
+ ],
1837
+ "page_idx": 11
1838
+ },
1839
+ {
1840
+ "type": "text",
1841
+ "text": "Proof. We denote the large-scale visual-language pretraining dataset used to train CLIP as $D_{\\bar{A}} = \\{\\mathcal{I}_{\\bar{A}},\\mathcal{T}_{\\bar{A}}\\}$ . To bridge the gap between image and video domains, we extend images in $D_{\\bar{A}}$ by repeating frames to create a set of static videos $\\mathcal{V}_A = \\{\\mathcal{V}_i = [\\mathcal{I}_{\\bar{A} i},\\mathcal{I}_{\\bar{A} i},\\dots,\\mathcal{I}_{\\bar{A} i}]\\}^N$ and let $\\mathcal{T}_A = \\mathcal{T}_{\\bar{A}}$ . Videos in $D_A = \\{\\mathcal{V}_A,\\mathcal{T}_A\\}$ are static and do not provide any additional information for prediction. As a result, $\\theta_{A}$ which offers the best results for $D_{\\bar{A}}$ is also optimal on $D_A$ .",
1842
+ "bbox": [
1843
+ 86,
1844
+ 167,
1845
+ 888,
1846
+ 229
1847
+ ],
1848
+ "page_idx": 11
1849
+ },
1850
+ {
1851
+ "type": "header",
1852
+ "text": "Transforming CLIP to an Open-vocabulary Video Model",
1853
+ "bbox": [
1854
+ 305,
1855
+ 56,
1856
+ 666,
1857
+ 70
1858
+ ],
1859
+ "page_idx": 11
1860
+ },
1861
+ {
1862
+ "type": "page_number",
1863
+ "text": "12",
1864
+ "bbox": [
1865
+ 477,
1866
+ 922,
1867
+ 495,
1868
+ 934
1869
+ ],
1870
+ "page_idx": 11
1871
+ }
1872
+ ]
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/6b67c47e-dd5a-4031-9b19-18c6928e06b2_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ef811f25ded8ec8dcc68772e8f9e6bcb9d95a3447452d09b9672e0a6bbb4a49
3
+ size 2499733
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/full.md ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Open-VCLIP: Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization
2
+
3
+ Zejia Weng $^{12}$ Xitong Yang $^{3}$ Ang Li $^{4}$ Zuxuan Wu $^{12}$ Yu-Gang Jiang $^{12}$
4
+
5
+ # Abstract
6
+
7
+ Contrastive Language-Image Pretraining (CLIP) has demonstrated impressive zero-shot learning abilities for image understanding, yet limited effort has been made to investigate CLIP for zero-shot video recognition. We introduce OpenVCLIP, a simple yet effective approach that transforms CLIP into a strong zero-shot video classifier that can recognize unseen actions and events at test time. Our framework extends CLIP with minimal modifications to model spatial-temporal relationships in videos, making it a specialized video classifier, while striving for generalization. We formally show that training an OpenVCLIP is equivalent to continual learning with zero historical data. To address this problem, we propose Interpolated Weight Optimization, which utilizes the benefit of weight interpolation in both training and test time. We evaluate our method on three popular and challenging action recognition datasets following various zero-shot evaluation protocols and we demonstrate our approach outperforms state-of-the-art methods by clear margins. In particular, we achieve $87.9\%$ , $58.3\%$ , $81.1\%$ zero-shot accuracy on UCF, HMDB and Kinetics-600 respectively, outperforming state-of-the-art methods by $8.3\%$ , $7.8\%$ and $12.2\%$ . Code is released at https:
8
+
9
+ //github.com/wengzejial/Open-VCLIP.
10
+
11
+ # 1. Introduction
12
+
13
+ Zero-shot learning is a challenging problem that requires deep neural networks to recognize novel unseen classes during testing without having seen them during training. The generalization ability of classifying new classes without
14
+
15
+ $^{1}$ Shanghai Key Laboratory of Intelligent Information Processing, School of Computer Science, Fudan University $^{2}$ Shanghai Collaborative Innovation Center of Intelligent Visual Computing $^{3}$ Meta AI $^{4}$ angli.ai. Correspondence to: Zuxuan Wu <zxwu@fudan.edu.cn>.
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/d2f672637e7b46926ee507efe91274150b261839ed80ed295e570a61e0e42618.jpg)
20
+ Figure 1. While CLIP has shown impressive results for zero-shot image recognition, it cannot effectively recognize novel actions in videos. This paper aims to transform CLIP to a strong zero-shot video classifier with minimal modifications.
21
+
22
+ the need for manual annotations makes it particularly useful in real-world applications. While extensive studies have been conducted on zero-shot learning (Zellers & Choi, 2017; Brattoli et al., 2020; Xu et al., 2017), CLIP (Radford et al., 2021) recently demonstrates surprising zero-shot abilities in a variety of tasks, such as image segmentation (Wang et al., 2022; Ghiasi et al., 2021; 2022), image editing (Zheng et al., 2022; Crowson et al., 2022), by pretraining on web-scale image and text pairs in a contrastive manner.
23
+
24
+ While significant zero-shot results are achieved in the image domain, limited effort has been made to explore CLIP for zero-shot video action recognition. Extending CLIP, designed for image tasks, to the video domain, is extremely challenging, particularly in the zero-shot setting. On one hand, to better recognize actions and events in videos, the rich temporal dynamics encoded in videos are expected to be carefully captured. Although one could treat videos as a bag of frames and perform temporal pooling over frame-based predictions (Wang et al., 2021), it is found that fine-tuning pretrained models like CLIP with specialized temporal modeling components on top of off-the-shelf image models produces better results (Ni et al., 2022). However, the improved results come at the cost of reduced generalization as optimizing specialized parameters will inevitably require fine-tuning the pretrained CLIP model. The derived model then tends to overfit to the video dataset used for fine-tuning, which are substantially smaller than the image-text dataset used to train CLIP. As a result, the zero-shot ability
25
+
26
+ of CLIP diminishes over the course of fine-tuning.
27
+
28
+ It is worth noting that the start point of the fine-tuning process is CLIP, an image classifier with strong zero-shot abilities, while the end point is a specialized model for video understanding. This motivates us to seek a middle ground between generalization and specialization—adapting a pretrained CLIP model to the video domain, and the resulting model is expected to not only recognize known actions and events seen during training but also enjoy the zero-shot learning abilities as CLIP for novel video categories. Interestingly, we discover from a theoretical perspective that this problem is essentially a continual learning problem, which aims to adapt a pretrained model to new tasks with less forgetting on previous knowledge. Traditional continual learning typically seeks decent performance on all seen tasks with access to historical data (Hu et al., 2021; Balaji et al., 2020; Shin et al., 2017). However, this is particularly challenging for adapting CLIP as raw data used for training are private. Furthermore, our goal is slightly beyond continual learning: we hope to adapt CLIP to be a strong zero-shot video learner that generalizes well to unknown video actions and events, rather than exactly preserving its knowledge for image tasks, which again is difficult without access to the training data of CLIP.
29
+
30
+ With this in mind, we explore the problem of constructing an open-vocabulary video CLIP by simply leveraging the pretrained weights that are publicly available. More specifically, we build upon CLIP with minimal modifications so as to derive a video action recognition model that can not only capture temporal information among different frames but also generalizes well to unseen actions and events during testing. To optimize the continual learning-based training formulation, we propose a novel method called Interpolated Weight Optimization which regularizes the fine-tuning process of the CLIP model by adding a link between the original CLIP model and the current model. This prevents the derived model from drifting away from CLIP, which we argue is beneficial for generalization. Furthermore, in addition to training, we also link derived optima along the optimization trajectory at test time for improved generalization.
31
+
32
+ We conduct extensive experiments to evaluate the performance of Open-VCLIP. In particular, we use Kinetics-400 as a proxy dataset to extend CLIP to the video domain and evaluate its zero-shot performance on UCF-101, HMDB-51 and Kinetics-600 with various evaluation protocols. Open-VCLIP achieves state-of-the-art zero-shot video action recognition performance, offering $87.9\%$ , $58.3\%$ , $81.1\%$ zero-shot accuracy on UCF, HMDB and Kinetics-600 respectively, which are $8.3\%$ , $7.8\%$ and $12.2\%$ better compared to alternative methods. Furthermore, Open-VCLIP also achieves the best trade-off between close-set and zero-shot performance across all the benchmarks.
33
+
34
+ # 2. Related Work
35
+
36
+ Zero-shot Video Action Recognition. Zero-shot video action recognition requires models to recognize new actions that are not seen during training, which is useful in real-world applications where data and their corresponding labels are difficult to collect. Early work focuses more on how to represent actions properly. For example, manually-crafted attributes (Liu et al., 2011; Zellers & Choi, 2017), object features (Jain et al., 2015; Gao et al., 2019) are used to represent actions. Researchers also use word embeddings of actions (Brattoli et al., 2020; Xu et al., 2017) as textual semantic representations. Recently, pretraining with large-scale vision-text data is gaining attention, as it achieves impressive results for zero-shot image classification (Radford et al., 2021; Jia et al., 2021). There is also a plethora of work using knowledge learned in large-scale pretrained vision-language models to down-stream tasks in a zero-shot manner (Wang et al., 2022; Ghiasi et al., 2021; 2022). While extensive studies have been conducted for zero-shot image understanding, zero-shot video classification remains less explored. ActionCLIP (Wang et al., 2021) and XCLIP experiment with zero-shot setting for action recognition (Ni et al., 2022), but use the same strategy as in images for zero-shot learning and ignore the forgetting problem when adapting the CLIP model. In contrast, our goal is to explicitly build a strong open-vocabulary zero-shot video classifier by regularizing the fine-tuning process.
37
+
38
+ Continual Learning. Continual learning aims at training a model on multiple sequential tasks without catastrophically forgetting knowledge from previous tasks. Existing approaches can be divided into three categories: memory-based, expansion based and regularization-based methods. Memory-based methods typically utilize a replay buffer to store past examples or related information such as gradients (Farajtabar et al., 2020). In addition, memory replay is effective for continual learning (Hu et al., 2021; Balaji et al., 2020), however, in our case, it is not feasible to directly use these approaches as historical data are not available. Expansion-based methods (Rusu et al., 2016) expand the network over time in order to maintain past performance. Closest to our approach, perhaps are regularization-based methods (Yin et al., 2020) such as EWC (Kirkpatrick et al., 2017), which add a regularization term to the optimization that constrains new model weights to be close to the original ones. But still historical data need to be used to calculate the Fisher information matrix for approaches like (Kirkpatrick et al., 2017). Our approach differs from standard continual learning in that we wish to transfer the knowledge, i.e. the ability to perform zero-shot learning, from a previous image task to video tasks without access to historical data at all.
39
+
40
+ # 3. Preliminary: Video Action Recognition Using CLIP
41
+
42
+ Video action recognition is a fundamental yet challenging task that often requires intensive model training on large-scale datasets. Inspired by the success of contrastive language-image pretraining (CLIP) (Radford et al., 2021), recent work has proposed to fine-tune the well-trained CLIP model on the target video dataset and has achieved state-of-the-art results (Xu et al., 2021; Wu et al., 2023).
43
+
44
+ To adapt CLIP for video action recognition (VCLIP), a common strategy (Arnab et al., 2021; Bulat et al., 2021; Bertasius et al., 2021; Xing et al., 2022) is to extend the image encoder to capture temporal dynamics in videos and, in the meanwhile, align the video representation with the text representations of its corresponding label (e.g., "playing drums"). Specifically, given a video clip $V \in \mathcal{V}_B$ and an action label described in textual prompts $T \in \mathcal{T}_B$ , the goal of fine-tuning is to maximize the similarity:
45
+
46
+ $$
47
+ \operatorname {s i m} (v, t) = \frac {\langle v , t \rangle}{\| v \| \| t \|}, \quad v = f _ {\theta_ {B} ^ {V}} (V), t = f _ {\theta_ {B} ^ {T}} (T), \quad (1)
48
+ $$
49
+
50
+ if $V$ and $T$ represent the same video. Here, $\nu_{B}$ denotes the video dataset for task $B$ , $\mathcal{T}_B$ denotes the corresponding label set, $f_{\theta_B^T}$ denotes the text encoder and $f_{\theta_B^V}$ denotes the visual encoder. As the text encoder is typically frozen (Ilharco et al., 2022; Thengane et al., 2022), the fine-tuning stage primarily focuses on optimizing the visual encoder for adaptation to the video domain. We drop the superscript in the subsequent paragraphs for brevity.
51
+
52
+ # 4. Our Approach
53
+
54
+ We introduce our approach in this section which consists of two major components: (1) constructing a VCLIP model from the image-based CLIP in order to better explore spatial-temporal relationships in videos, and (2) regularizing the fine-tuning process so that the derived model can generalize well to unseen actions and events.
55
+
56
+ # 4.1. Constructing VCLIP for Video Understanding
57
+
58
+ Temporal relations among video frames contain important information for identifying actions. The image CLIP model does not have the ability to aggregate temporal features and thus is no longer suitable for video tasks. So we devote to injecting temporal modeling ability to the original CLIP model for a better transfer from images to videos.
59
+
60
+ Adding additional temporal modeling networks is the most convenient way to achieve this, however, this generally incurs extra parameters that are computationally expensive and makes it harder for weight interpolation that greatly benefits zero-shot abilities, as will be described later. We observe that the self-attention layer in vision transformer is
61
+
62
+ quite scalable, operating on image frame patches as:
63
+
64
+ $$
65
+ y _ {s, t} = \operatorname {S o f t m a x} \left(\frac {q _ {s , t} K _ {t} ^ {\mathrm {T}}}{\sqrt {d}}\right) V _ {t}, \tag {2}
66
+ $$
67
+
68
+ where $d$ refers to the dimension of vectors, $q_{s,t}$ refers to the query vector of the $s$ -th token in the $t$ -th frame, $K_t^{\mathrm{T}}$ is the transpose of the matrix composed of key vectors in the $t$ -th frame, and $V_{t}$ is the matrix composed of value vectors in the $t$ -th frame. Obviously, each token will only obtain information from its belonging frame. To overcome this issue, we expand the temporal attention view for every self-attention layer for aggregating the global temporal information thanks to the stacking of self-attention layers. The new self-attention layer is implemented as follows:
69
+
70
+ $$
71
+ y _ {s, t} = \operatorname {S o f t m a x} \left(\frac {q _ {s , t} \left[ K _ {(t - 1) \sim (t + 1)} \right] ^ {\mathrm {T}}}{\sqrt {d}}\right) \left[ V _ {(t - 1) \sim (t + 1)} \right]. \tag {3}
72
+ $$
73
+
74
+ At this time, each patch will obtain information from its belonging frame and its neighbouring frames. The special modification lies in $[K_{(t - 1)\sim (t + 1)}]$ and $[V_{(t - 1)\sim (t + 1)}]$ which refers to the Key/Value matrix be composed with key/value vectors belonging to not only the $t$ -th frame, but also the neighbour frames. Such a small modification helps the model to gain better temporal information aggregation ability, while perfectly fitting our algorithm since no extra parameters are added.
75
+
76
+ # 4.2. Training Open-VCLIP
77
+
78
+ We now introduce the training method with a carefully designed optimization strategy for improved zero-shot video classification. We start by formulating the problem from its original purpose and then derive its approximation which leads to a challenging continual learning problem with zero historical data. We propose a novel regularization-based method to optimize VCLIP, named Interpolated Weight Regularization (IWR). A model-averaging approach called Stochastic Weight Averaging (SWA) is further incorporated to improve model generalizability.
79
+
80
+ # 4.2.1.PROBLEMDEFINITION
81
+
82
+ While fine-tuning the CLIP model yields impressive results for close-set video classification (Wang et al., 2021; Ni et al., 2022), its performance on unseen categories is poor—might be worse than the original CLIP model as shown in Table 4. Below, we elaborate on how to construct a robust open-vocabulary video model from a pretrained CLIP model.
83
+
84
+ Formally, our goal is to obtain the optimal vision encoder $f_{\theta_U}$ that satisfies:
85
+
86
+ $$
87
+ \theta_ {U} = \arg \min _ {\theta} L (\theta ; D _ {U}). \tag {4}
88
+ $$
89
+
90
+ Here, $D_U = \{\mathcal{V}_U,\mathcal{T}_U\}$ is a hypothetical universal dataset that contains all possible videos and their corresponding
91
+
92
+ text descriptions (i.e., action labels). $L$ is the loss function defined on the video-text pairs. Optimizing such an objective directly is infeasible, yet luckily it can be approximated by training on a large-scale dataset with sufficiently diverse video and text data.
93
+
94
+ # 4.2.2. AN APPROXIMATION EQUIVALENT TO CONTINUAL LEARNING
95
+
96
+ We first consider a video action recognition dataset $D_B = \{\mathcal{V}_B, \mathcal{T}_B\}$ used for fine-tuning. Unfortunately, even though the abundant video data $\mathcal{V}_B$ serve as a good approximation of $\mathcal{V}_U$ , its text space is extremely limited, bounded by the number of annotated action categories (e.g., $|\mathcal{T}_B| = 400$ for Kinetics-400 (Kay et al., 2017)). As a result, the video representation is prone to overfitting to the highly skewed text space and the zero-shot ability of the CLIP model diminishes over the fine-tuning process. On the other hand, the scale of the image training dataset for CLIP, is sufficiently large to approximate $D_U$ , but there exists a domain gap between the image space and the video space. Even worse, this dataset is a private dataset and only the CLIP model weights $\theta_A$ are accessible for fine-tuning.
97
+
98
+ With these pros and cons in mind, we now seek to leverage both $\theta_{A}$ and $D_B$ to construct a strong open-vocabulary model. We believe that $\theta_{A}$ should contain useful information from the large image dataset that CLIP was originally trained on. Following this intuition, we notice that the initial VCLIP model (without any fine-tuning) $\theta_{A}$ is indeed an optimal solution to a large-scale video dataset $D_A$ with a sufficiently diverse text space $\mathcal{T}_A$ (Lemma 4.1).
99
+
100
+ Lemma 4.1. Suppose the image CLIP model was trained on an image-text dataset $D_{\bar{A}} = \{\mathcal{I}_{\bar{A}},\mathcal{T}_{\bar{A}}\}$ with $N$ examples. Then, there exists a diverse video-text dataset $D_{A} = \{\mathcal{V}_{A},\mathcal{T}_{A}\}$ containing $N$ examples where the video CLIP model with original CLIP parameters $\theta_{A}$ is optimal.
101
+
102
+ Proof. See Appendix.
103
+
104
+ Although $D_A$ is unknown, it is helpful to understand our problem. Given the fact that $\theta_A$ is an optimal solution in a large scale dataset $D_A$ , a natural idea for approximating the universal objective is to combine both datasets in the derivation, although $D_A$ is unknown in reality.
105
+
106
+ Following this idea, Equation (4) is transformed into:
107
+
108
+ $$
109
+ \arg \min _ {\theta} L (\theta ; D _ {A}) + L (\theta ; D _ {B}) \tag {5}
110
+ $$
111
+
112
+ where $D_A$ is completely unknown and only $D_B$ is present. However, we have the optimal solution $\theta_A$ on $D_A$ . In that case, the formulation becomes equivalent to continual learning, i.e., continually training the model on a new dataset while preserving its performance on historical data so as to achieve sufficient generalizability.
113
+
114
+ # 4.2.3. INTERPOLATED WEIGHT REGULARIZATION
115
+
116
+ While there have been many methods of studying continual learning, most of them are based on storing historical data or information, which is not applicable in our case. It is due to the fact that we do not have access to $D_A$ at all. Inspired by empirical results in (Ilharco et al., 2022), we propose to lowing the first loss term in Equation (5) by introducing an optimization-free weight interpolation strategy:
117
+
118
+ $$
119
+ \theta = \lambda \theta_ {A} + (1 - \lambda) \theta_ {B}, \tag {6}
120
+ $$
121
+
122
+ where $\lambda$ is a trade-off hyperparameter. Equation (6) is called model patching (Ilharco et al., 2022), which is commonly used between two converged model weights, i.e., $\theta_B$ is trained separately on $D_B$ only. A potential risk of this method is that we have no explicit optimization on the curve fitting performance of the final patched model, i.e., the patch may be severely underfitting to $D_B$ or sensitive to the trade-off parameter $\lambda$ .
123
+
124
+ To address this issue, we propose Interpolated Weight Regularization as part of the training procedure, which regularizes the loss of the interpolated weights on $D_B$ . Given that the $\lambda$ is a hyperparameter that may vary, instead of optimizing a single point, we look for a solution such that the patched model's performance w.r.t. a range of interpolation coefficients are optimized. This is achieved by sampling a balancing coefficient during training. The final optimization objective becomes:
125
+
126
+ $$
127
+ \underset {\theta_ {B}} {\arg \min } \mathcal {L} = L \left(\theta_ {B}; D _ {B}\right) + \beta L \left(\alpha \theta_ {A} + (1 - \alpha) \theta_ {B}; D _ {B}\right) \tag {7}
128
+ $$
129
+
130
+ where $\alpha \sim \mathsf{U}(0,\lambda)$ . The $(0,\lambda)$ interval corresponds to the low-level region between the interpolated and end weights. $\beta$ is the trade-off coefficient for regularization and it is set as $\beta = C\frac{1}{1 - \alpha}$ in practice where $C$ is a constant value. The loss can be optimized by calculating its derivative as follows:
131
+
132
+ $$
133
+ \begin{array}{l} \frac {d \mathcal {L}}{d \theta} = \left. \frac {d L}{d \theta} \right| _ {\theta = \theta_ {B}} + \beta (1 - \alpha) \left. \frac {d L}{d \theta} \right| _ {\theta = \alpha \theta_ {A} + (1 - \alpha) \theta_ {B}} (8) \\ = \left. \frac {d L}{d \theta} \right| _ {\theta = \theta_ {B}} + C \left. \frac {d L}{d \theta} \right| _ {\theta = \alpha \theta_ {A} + (1 - \alpha) \theta_ {B}}. (9) \\ \end{array}
134
+ $$
135
+
136
+ After we obtain the optimal $\theta_B$ , Equation (6) is applied to achieve the final VCLIP model weights.
137
+
138
+ # 4.2.4. STOCHASTIC WEIGHT AVERAGING
139
+
140
+ Improved zero-shot predicting ability lies in good generalization ability. We further introduce an upgrade to the above method by applying Stochastic Weight Average (SWA) on the interpolated weights along the training process to find the "flat minimum", which refers to a region in the weight space where the loss function is relatively flat and the test error is relatively low according to (Izmailov et al., 2018).
141
+
142
+ Equation (10) showcases our solution:
143
+
144
+ $$
145
+ \sum_ {i} ^ {N} \frac {\lambda \theta_ {A} + (1 - \lambda) \theta_ {i}}{N} = \lambda \theta_ {A} + (1 - \lambda) \boxed {\frac {1}{N} \sum_ {i} ^ {N} \theta_ {i}} \tag {10}
146
+ $$
147
+
148
+ where $\theta_{i}$ refers to the $i$ -th set of parameters we select during the training process. As Equation (10) shows, the moving average of the interpolated weights equals to interpolating the moving average of the updated weights, showing the order of the SWA and the weight interpolation is interchangeable. So, in practice, we maintain the moving average of the model's weights during training and do weight interpolation in the end. By averaging model weights from the optimization trajectories, we will get a robust model with better generalization to unseen classes.
149
+
150
+ # 4.3. Algorithm Summary
151
+
152
+ We show implementation of Open-VCLIP in the following pseudo code.
153
+
154
+ Algorithm 1 Training
155
+ Input: Dataset $D = \{V_i, y_i\}^N$ , Model $f_\theta$ , Step $= 0$ .
156
+ Require: SWA begins at $T$ step with a cycle length $c$ . SWA $\theta_{\mathrm{SWA}}$ . Counting flag $l = 0$ . Model $\mathrm{Param}\theta$ is initialized by the CLIP $\mathrm{Param}\theta_{\mathrm{CLIP}}$ . Hyper-param R, $\beta$ . Learning rate $\delta$ . repeat Step $\leftarrow$ Step + 1 sample $\{V_i,y_i\}^M\subseteq D,\widetilde{V}\gets \{V_i\} ^M,\widetilde{y}\gets \{y_i\} ^M$ // normal supervision loss. $L(f_{\theta})\gets \frac{1}{M}\sum_{i = 1}^{M}L(\widetilde{V}_i,\widetilde{y}_i,\theta)$ // interpolation regularization. Sample $\alpha \sim$ Uniform(0,R) Initialize $\widetilde{\theta}\gets \alpha \cdot \theta_{\mathrm{CLIP}} + (1 - \alpha)\cdot \theta$ $L(f_{\widetilde{\theta}})\gets \frac{1}{M}\sum_{i = 1}^{M}L(\widetilde{V}_i,\widetilde{y}_i,\widetilde{\theta})$ // update model with combined loss. $\theta \gets \theta -\delta \nabla_{\theta}(L(f_{\theta}) + \beta \cdot L(f_{\widetilde{\theta}}))$ // stochastic weight average. if Step $>T$ and mod $(\mathrm{Step - T},c) == 0$ then $\theta_{\mathrm{SWA}}\gets (\theta_{\mathrm{SWA}}*l + \theta) / (l + 1)$ $l\gets l + 1$ end if until converge
157
+
158
+ Algorithm 2 Inference
159
+ Input: Testing Set $D = \{V_i\}^N$ , Model Param $\theta_{\mathrm{SWA}}$ , Original CLIP Param $\theta_{\mathrm{CLIP}}$
160
+ Require: Set Interpolation Ratio as $\lambda$
161
+ Initialize: $\theta_{\mathrm{FINAL}} = \lambda *\theta_{\mathrm{CLIP}} + (1 - \lambda)*\theta_{\mathrm{SWA}}$
162
+ Predict $= f(D;\theta_{\mathrm{FINAL}})$
163
+
164
+ # 5. Experiments
165
+
166
+ We present in this section our experimental evaluation. We compare our Open-VCLIP method with state-of-the-art
167
+
168
+ video models and perform ablation studies to reveal the characteristics of our method.
169
+
170
+ # 5.1. Experimental Setup
171
+
172
+ # 5.1.1. DATASETS
173
+
174
+ In our experiments, we use the following four datasets:
175
+
176
+ Kinetics-400&600: Kinetics-400 (Kay et al., 2017) and Kinetics-600 (Carreira et al., 2018) datasets are large-scale datasets for human action recognition, containing 400 and 600 action classes, respectively. The Kinetics-600 dataset is an extension of the Kinetics-400 dataset, including 220 new categories. These additional classes provide a valuable resource for evaluating the zero-shot ability of models trained on the Kinetics-400. Each video is a 10-second around action moment annotated from YouTube videos.
177
+
178
+ UCF-101: The UCF-101 dataset (Soomro et al., 2012) is a widely used dataset for human action recognition, which contains 13,320 video clips from 101 action categories. Each video in the dataset is a short clip of an action, with an average length of 7.21 seconds, that is captured from real-world scenarios. Officially, three different training/testing splits files are provided.
179
+
180
+ HMDB-51: HMDB-51 (Kuehne et al., 2011) contains 6,849 clips divided into 51 action categories with each category containing at least 101 clips. Officially, three different training/testing splits are provided to evaluate the model. To ensure a balance in the number of samples per category, 1,746 videos are left "unused" in each split, while each category is guaranteed to have 70 training samples and 30 test samples. Having a consistent number of testing samples for each category allows for a fair evaluation.
181
+
182
+ We use the Kinetics-400 dataset as the training set and use UCF-101, HMDB-51, and a subset of the Kinetics-600 dataset as test datasets. By testing on datasets that contain no/few overlapping categories with the training dataset, we are able to provide a realistic and comprehensive evaluation of the zero-shot capabilities. Detailed evaluation protocols are described below.
183
+
184
+ # 5.1.2. EVALUATION PROTOCOLS
185
+
186
+ UCF-101&HMDB-51: Following (Brattoli et al., 2020) and (Ni et al., 2022), there are three protocols for zero-shot evaluation on these two datasets.
187
+
188
+ - Evaluation Protocol 1 (EP1): We first randomly choose half of the classes in the test dataset, i.e., 50 for UCF and 25 for HMDB, and repeat ten times and report averaged results for each dataset. (Brattoli et al., 2020)
189
+ - Evaluation Protocol 2 (EP2): We test the model on full UCF and HMDB, i.e., evaluating on all 101 UCF classes and all 51 HMDB classes (Brattoli et al., 2020).
190
+
191
+ Table 1. Zero-shot classification performance for various algorithms on UCF and HMDB with different protocols (see Section 5.1.2).
192
+
193
+ <table><tr><td rowspan="2">METHOD</td><td rowspan="2">ENCODER</td><td colspan="2">UCF</td><td colspan="2">HMDB</td></tr><tr><td>EP1</td><td>EP2</td><td>EP1</td><td>EP2</td></tr><tr><td>GA (MISHRA ET AL., 2018)</td><td>C3D</td><td>17.3±1.1</td><td>-</td><td>19.3±2.1</td><td>-</td></tr><tr><td>TARN (BISHAY ET AL., 2019)</td><td>C3D</td><td>19.0±2.3</td><td>-</td><td>19.5±4.2</td><td>-</td></tr><tr><td>CWEGAN (MANDAL ET AL., 2019)</td><td>I3D</td><td>26.9±2.8</td><td>-</td><td>30.2±2.7</td><td>-</td></tr><tr><td>TS-GCN (GAO ET AL., 2019)</td><td>GLNET</td><td>34.2±3.1</td><td>-</td><td>23.2±3.0</td><td>-</td></tr><tr><td>PS-GNN (GAO ET AL., 2020)</td><td>GLNET</td><td>36.1±4.8</td><td>-</td><td>25.9±4.1</td><td>-</td></tr><tr><td>E2E (BRATTOLI ET AL., 2020)</td><td>R(2+1)D</td><td>48.0</td><td>37.6</td><td>32.7 / 26.9</td><td></td></tr><tr><td>DASZL (KIM ET AL., 2021)</td><td>TSM</td><td>48.9±5.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td>ER (CHEN &amp; HUANG, 2021)</td><td>TSM</td><td>51.8±2.9</td><td>-</td><td>35.3±4.6</td><td>-</td></tr><tr><td>REST (LIN ET AL., 2022)</td><td>RESNET101</td><td>58.7±3.3</td><td>40.6</td><td>41.1±3.7</td><td>34.4</td></tr><tr><td>ACTIONCLIP (WANG ET AL., 2021)</td><td>VIT-B/16</td><td>-</td><td>69.5</td><td>-</td><td>50.5</td></tr><tr><td>TEXT4VIS (WU ET AL., 2023)</td><td>VIT-L/14</td><td>85.8±3.3</td><td>79.6</td><td>58.1±5.7</td><td>49.8</td></tr><tr><td rowspan="3">OPEN-VCLIP</td><td>VIT-B/32</td><td>87.1±2.4</td><td>79.5</td><td>62.3±4.0</td><td>49.9</td></tr><tr><td>VIT-B/16</td><td>89.9±1.7</td><td>83.5</td><td>64.5±4.5</td><td>53.2</td></tr><tr><td>VIT-L/14</td><td>93.1±1.9</td><td>87.9</td><td>68.5±4.0</td><td>58.3</td></tr></table>
194
+
195
+ - Evaluation Protocol 3 (EP3): We perform testing using three official splits and average the results of each split (Ni et al., 2022). The average top-1 accuracy and standard deviation are reported.
196
+
197
+ Kinetics-600: (Chen & Huang, 2021) randomly split 220 new classes in Kinetics-600 into 60 validation classes and 160 testing classes, respectively, three times. We use the same splits provided by (Chen & Huang, 2021). We report the average top-1 accuracy as well as the standard deviation.
198
+
199
+ # 5.1.3. IMPLEMENTATION DETAILS
200
+
201
+ The initial learning rate is set to $3.33 \times 10^{-6}$ and is decayed to $3.33 \times 10^{-8}$ following the cosine decay scheduler. We use 2 epochs to warm up the training and another 20 epochs for fine-tuning on Kinetics-400. Th learning rate for warm-up is set to $3.33 \times 10^{-8}$ and we use 8 GPUs for training, each contains a batch of 8 samples. Since we are performing vision-text alignment during the training process, augmentations such as mixup and cutmix significantly impact the alignment process. Therefore, we do not use them to avoid any potential negative effects for alignment. Instead, we simply use basic augmentations like color jittering, random flipping, and random cropping. Each video clip is extracted every 16 frames for a total of 8 frames to form an input video clip. During testing, 3 clips with 1 crop ("3 × 1 views") per video will be sampled to produce a prediction and the results will be further aggregated linearly. Furthermore, we set the interval of regularization to (0.0, 0.6), the balance ratio $C$ of the regularization is set to 0.5, and we start SWA from the second epoch when the warm-up stage finishes.
202
+
203
+ # 5.2. Main Results
204
+
205
+ # 5.2.1.COMPARISON TO STATE-OF-THE-ARTS
206
+
207
+ We compare our method to state-of-the-art zero-shot video action recognition methods using the UCF-101, HMDB-51, and a subset of Kinetics-600 datasets for evaluation. We first present the results under Evaluation Protocol 1 and Evaluation Protocol 2, summarized in Table 1. The first block of Table 1 presents methods that do not rely on large-scale vision-language pretrained models, while the last two blocks of Table 1 show the performance of CLIP-based methods that transfer the image CLIP model to the video domain by fine-tuning on the Kinetics-400 dataset.
208
+
209
+ As shown in the table, the results of CLIP-based methods, i.e. ActionCLIP, TEXT3VIS, and ours, are significantly better than other methods. This indicates that knowledge from large-scale vision-language pretrained models is important for zero-shot video action recognition performance. Furthermore, when using the ViT-B/16 encoder, our method outperforms ActionCLIP by $14\%$ (83.5% vs 69.5%) and $2.7\%$ (53.2% vs 50.5%); when using the ViT-L/14 encoder, our method outperforms TEXT4VIS by $8.3\%$ (87.9% vs 79.6%) and $8.5\%$ (58.3% vs 49.8%). These substantial improvements in accuracy highlight that our approach can effectively adapt the CLIP model to the video domain for improved zero-shot recognition. We also compare with X-CLIP (Ni et al., 2022) under Evaluation Protocol 3 on UCF and HMDB datasets. Results in Table 2 reveal that OpenVCLIP outperforms X-CLIP by $11.4\%$ (83.4% vs 72.0%) on UCF and $9.3\%$ (53.9% vs 44.6%) on HMDB using ViT-B/16, suggesting the effectiveness of our approach.
210
+
211
+ As for Kinetics-600 dataset, as shown in Table 3, we see that our method also performs favorably, especially compared to X-CLIP (Ni et al., 2022) and TEXT4VIS (Wu et al., 2023).
212
+
213
+ Table 2. We compare the zero-shot classification performance with X-CLIP on UCF and HMDB dataset with Evaluation Protocol 3.
214
+
215
+ <table><tr><td>METHOD</td><td>ENCODER</td><td>UCF</td><td>HMDB</td></tr><tr><td>X-CLIP</td><td>ViT-B/16</td><td>72.0±2.3</td><td>44.6±5.2</td></tr><tr><td rowspan="3">OPEN-VCLIP</td><td>ViT-B/32</td><td>79.4±1.1</td><td>50.6±0.3</td></tr><tr><td>ViT-B/16</td><td>83.4±1.2</td><td>53.9±1.2</td></tr><tr><td>ViT-L/14</td><td>87.6±1.2</td><td>59.0±0.6</td></tr></table>
216
+
217
+ Table 3. Comparisons of zero-shot video action recognition performance of different algorithms on Kinetics-600.
218
+
219
+ <table><tr><td colspan="2">METHOD</td><td>TOP-1 ACC</td><td>TOP-5 ACC</td></tr><tr><td colspan="2">ER (CHEN &amp; HUANG, 2021)</td><td>42.1±1.4</td><td>73.1±0.3</td></tr><tr><td colspan="2">X-CLIP VIT-B/16 (NI ET AL., 2022)</td><td>65.2±0.4</td><td>86.1±0.8</td></tr><tr><td colspan="2">TEXT4VIS VIT-L/14 (WU ET AL., 2023)</td><td>68.9±1.0</td><td>-</td></tr><tr><td rowspan="3">OPEN-VCLIP</td><td>VIT-B/32</td><td>69.5±0.6</td><td>91.7±0.1</td></tr><tr><td>VIT-B/16</td><td>73.0±0.8</td><td>93.2±0.1</td></tr><tr><td>VIT-L/14</td><td>81.1±0.8</td><td>96.3±0.3</td></tr></table>
220
+
221
+ Table 4. Comparing our method with various alternative methods using different backbone networks, including ViT-B/32, ViT-B/16 and ViT-L/14. "CLIP*" denotes the results of directly applying the image pretrained CLIP model. "FINE-TUNE" denotes the standard fine-tuning process using the same model as Open-VCLIP.
222
+
223
+ <table><tr><td>NET</td><td>DSET</td><td>CLIP*</td><td>FINE-TUNE</td><td>OPEN-VCLIP</td></tr><tr><td rowspan="3">B/32</td><td>UCF</td><td>69.1</td><td>78.0↑8.9</td><td>79.5↑10.4</td></tr><tr><td>HMDB</td><td>45.4</td><td>47.3↑1.9</td><td>49.9↑4.5</td></tr><tr><td>K600</td><td>64.8</td><td>62.8↓2.0</td><td>69.5↑4.7</td></tr><tr><td rowspan="3">B/16</td><td>UCF</td><td>74.2</td><td>79.7↑5.5</td><td>83.5↑9.3</td></tr><tr><td>HMDB</td><td>47.6</td><td>49.2↑1.6</td><td>53.2↑5.6</td></tr><tr><td>K600</td><td>68.1</td><td>65.9↓2.2</td><td>73.0↑4.9</td></tr><tr><td rowspan="3">L/14</td><td>UCF</td><td>80.5</td><td>85.0↑4.5</td><td>87.9↑7.4</td></tr><tr><td>HMDB</td><td>55.0</td><td>51.9↓3.1</td><td>58.3↑3.3</td></tr><tr><td>K600</td><td>76.2</td><td>74.9↓1.3</td><td>81.1↑4.9</td></tr></table>
224
+
225
+ # 5.2.2. RESULTS WITH DIFFERENT BACKBONES
226
+
227
+ We compare Open-VCLIP with the CLIP baseline and standard fine-tuning using various backbone networks. In particular, the results in the "CLIP*" column of Table 4 show the performance of the pretrained CLIP model, which predicts each image frame of the video separately. The "FINE-TUNE" column shows the results of a standard fine-tuning process using the same model as Open-VCLIP. We see from Table 4 that larger backbone networks (ViT-L/14 > ViT-B/16 > ViT-B/32) consistently improve zero-shot performance. For example, the results in the "CLIP*" column
228
+
229
+ show that the ViT-L/14 model outperforms the ViT-B/16 by $6.3\%$ (80.5% vs 74.2%), 7.4% (55.0% vs 47.6%), and 8.1% (76.2% vs 68.1%) on the UCF, HMDB, and Kinetics-600 datasets, respectively, while similar trends can be found in the last two columns of Table 4, demonstrating that larger-scale vision-language pretrained models contain stronger zero-shot knowledge and are more robust when transferred from image to video tasks. However, as we can see from the results of "FINE-TUNE" and "CLIP*" in Table 4, the fine-tuning process does not always result in improved performance. For example, the fine-tuning process leads to worse zero-shot results on the HMDB dataset when using the ViT-L/14 backbone, and all zero-shot testing results on the Kinetics-600 show a performance drop after models are fine-tuned on Kinetics-400 under a standard paradigm. The results indicate that the knowledge stored in CLIP cannot always be transferred with conventional fine-tuning.
230
+
231
+ Compared to the baselines, our approach demonstrates significant and consistent improvements in zero-shot video action recognition across various datasets and models, as shown in the last column of Table 4. Taking experimental results on Kinetics-600 as an example, our approach not only avoids the performance drop seen in the "FINE-TUNE" method, but also significantly improves zero-shot recognition. This highlights the effectiveness of our method in effectively using annotated video datasets with limited labels for transfer learning and effectively preventing knowledge from forgetting, offering stable and decent results.
232
+
233
+ # 5.3. Discussion and Ablation Studies
234
+
235
+ The effectiveness of temporal modeling and weight interpolation. We also investigate whether temporal modeling is needed for transferring CLIP to the video domain. To this end, we compare the performance of the CLIP, VCLIP, and Open-VCLIP, represented by green, blue and red curves in Figure 2, respectively. In particular, VCLIP expands the original spatial attention of CLIP to spatial-temporal attention without additional parameters as in Open-VCLIP. The curves illustrate weight interpolations with different mixing coefficients between CLIP and the fine-tuned model. Concretely, the $y$ -axis displays the accuracy on the zero-shot video dataset, while the $x$ -axis displays accuracy on the fine-tunning dataset, Kinetics-400.
236
+
237
+ Comparing the tails of the green and blue curves, we see that VCLIP achieves not only better close-set performance, but also better zero-shot performance on all of the three datasets. At the same time, when applying weight interpolation with different ratios, VCLIP achieves better trade-off than CLIP, as evidenced by the fact that the blue curve is always on top of the green curve in Figure 2. This strongly suggests the significant advantages that come with incorporating temporal modeling in the context of zero-shot video action recognition.
238
+
239
+ ![](images/9cd9964e277e4f5e1726a8f99dbc70cb0908a788f1c9c10e6c1a9548e5571154.jpg)
240
+ Figure 2. We evaluate the effectiveness of temporal modeling and weight interpolation with a VCLIP B/16 model. Points on each curve represent interpolation ratios of 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2 and 0.0 from left to right, respectively. The red star marks correspond to our reported main results. We test on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600.
241
+
242
+ ![](images/8220291d420b8889c333e34bdfbe883bbd4504be625f1858c96bf6266f6ea674.jpg)
243
+
244
+ ![](images/cd24ca866ecbd0350925ba7d61c9722d0bdd89e68bc4a5d7b1654bb9c534b71a.jpg)
245
+
246
+ ![](images/c127d83adebeda7db889e4ff0d1e6ea5c1077900413875f1a70faab2f8dd331e.jpg)
247
+ Figure 3. We evaluate the effectiveness of IWR and SWA with a VCLIP B/16 on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600.
248
+
249
+ ![](images/20c11b3d08f9988938ff69a8eb8f02822ce8c0d089e5f6982f002571b4e6a6e4.jpg)
250
+
251
+ ![](images/62d0a989cf9eaa3b2dbc3bbc44cf650c7fa5552cff532480b925a11c08898b2c.jpg)
252
+
253
+ ![](images/df0313edafd360464ad53b6221f57d5242b459af7bec8326d45999ec74e4b95a.jpg)
254
+ Figure 4. We compare Open-VCLIP with an $\ell_2$ regularization imposed on weights on the full UCF, HMDB and the first split in (Chen & Huang, 2021) on Kinetics-600.
255
+
256
+ ![](images/cdd1ff4dcd2249662a300ea5e42d720b3d07c5d13d390390e7bca38d9ba2b175.jpg)
257
+
258
+ Furthermore, the clear margins observed between the red curves and the other curves in Figure 2 show that our proposed solution achieves the best trade-off compared to pure fine-tuning. With the same-level of close-set results, our approach always produces better zero-shot accuracy. In addition, the star marks on the red curves, which correspond to the reported main results in Tables 1 to 3, are always better than the other baseline curves.
259
+
260
+ IWR v.s. SWA. Our approach is composed of two weight interpolation modules: IWR which is used during training to regularize the fine-tuning process and SWA to improve generalization. We investigate their contributions to the final results in Figure 3. Overall, removing either IWR (green curve) or SWA (yellow curve) from the model leads to significant drops, i.e. the red curve outperforms all other curves, suggesting IWR and SWA are complimentary to each other. Furthermore, we see using only IWR or SWA is
261
+
262
+ able to produce a good zero-shot performance improvement, compared to the results with no interpolation at all.
263
+
264
+ Weight regularization during fine-tuning. IWR is conceptually similar to EWC (Kirkpatrick et al., 2017), which penalizes the changes of important parameters for solving previous tasks. However, EWC needs to assess the importance of parameters through historical data which is not feasible to our setting. Instead, we simply constrain the optimization by penalizing the weight changes using an $\ell_2$ norm. Concretely, we use the $\ell_2$ distance between the updated weights and the original weights as the regularization loss term during training, assigning various weights to the regularization loss term. As shown in Figure 4, our method achieves the best trade-off. Open-VCLIP achieves higher close-set and zero-shot accuracy across all the datasets compared with simply applying an $\ell_2$ normalization, demonstrating the effectiveness of Open-VCLIP.
265
+
266
+ Table 5. Comparison of zero-shot video-to-text/text-to-video Retrieval performance for various algorithms. "T2VRN" denotes the recall@N of text-to-video retrieval. "V2TRN" denotes the recall@N of video-to-text retrieval.
267
+
268
+ <table><tr><td>METHOD</td><td>K400 TUNE</td><td>λ</td><td>K400</td><td>t2vR1</td><td>t2vR5</td><td>t2vR10</td><td>v2TR1</td><td>v2TR5</td><td>v2TR10</td></tr><tr><td>FROZEN (BAIN ET AL., 2021)</td><td>×</td><td>-</td><td>-</td><td>24.7</td><td>46.9</td><td>57.2</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CLIP (PORTILLO ET AL., 2021)</td><td>×</td><td>-</td><td>-</td><td>31.2</td><td>53.7</td><td>64.2</td><td>27.2</td><td>51.7</td><td>62.6</td></tr><tr><td>CLIP (OUR IMPLEMENT)</td><td>×</td><td>-</td><td>57.5</td><td>31.1</td><td>54.2</td><td>63.8</td><td>28.9</td><td>53.0</td><td>64.9</td></tr><tr><td>OPEN-VCLIP</td><td>✓</td><td>0.5</td><td>78.9</td><td>31.3</td><td>54.3</td><td>65.6</td><td>33.6</td><td>59.1</td><td>70.0</td></tr><tr><td>OPEN-VCLIP</td><td>✓</td><td>0.7</td><td>73.4</td><td>33.2</td><td>57.1</td><td>67.4</td><td>34.4</td><td>59.8</td><td>71.2</td></tr></table>
269
+
270
+ Text-to-Video/Video-to-Text Retrieval Performance. Assessing the model via text-to-video/video-to-text retrieval tasks offers insight into its generalizability within the video domain. We follow the paradigm of training models on Kinetics-400 dataset and testing them on MSR-VTT dataset (Xu et al., 2016), which is a large video description dataset. We firstly report the result of our own implementation using CLIP for retrieval as shown in the third row of Table 5, which is similar to the results in (Portillo et al., 2021). This guarantees fair comparisons. Then, we evaluate Open-VCLIP on MSR-VTT. We find that our text-to-video retrieval (given a text to retrieve the corresponding video) recall is comparable to that of raw CLIP but with a much higher close-set score on K400 (78.9% vs 57.5%). Further increasing the mixing coefficient $\lambda$ improves the text-to-video retrieval performance of Open-VCLIP, surpassing the CLIP baseline by $2\%$ . We also show that the video-to-text retrieval (given a video to retrieve the corresponding text) performance of Open-VCLIP is significantly higher than that of the CLIP baseline, demonstrating the effectiveness of our method in preserving the alignment capability when transferring to video domains.
271
+
272
+ Comparison with parameter-efficient fine-tuning. Fine-tuning only a part of the weights of a network is an effective approach for adapting the CLIP model to video in a parameter-efficient manner. A noteworthy method that employs this strategy is the ST-Adapter (Pan et al., 2022), which accomplishes effective video classification by training added adapter modules, while keeping the original parameters of the CLIP model frozen. We compare ST-Adapter with our approach. More specifically, ST-Adapter forgoes the text encoder of CLIP, while introducing an additional linear classifier instead. This change prevents the model from being used in zero-shot testing. To circumvent this problem, we incorporate the text encoder of CLIP into our implementation of the ST-Adapter. The results presented in Table 6 illustrates that the ST-Adapter, while preserving the original CLIP weights and only fine-tuning the added adapters, fails to match the performance of our proposed method in zero-shot action recognition. In particular, we observe a marked degradation in the zero-shot performance of the ST-Adapter on the K600 dataset, suggesting that
273
+
274
+ parameter-efficient fine-tuning does not effectively address the issue of catastrophic forgetting.
275
+
276
+ Table 6. Comparison with parameter efficient fine-tuning method.
277
+
278
+ <table><tr><td>METHOD</td><td>UCF</td><td>HMDB</td><td>K-600</td></tr><tr><td>CLIP</td><td>74.2</td><td>47.6</td><td>68.1±1.0</td></tr><tr><td>FINE-TUNED VCLIP</td><td>79.7</td><td>49.2</td><td>65.9±1.0</td></tr><tr><td>ST-ADAPTER</td><td>77.3</td><td>49.8</td><td>60.2±1.8</td></tr><tr><td>OPEN-VCLIP</td><td>83.5</td><td>53.2</td><td>73.0±0.8</td></tr></table>
279
+
280
+ # 6. Conclusion
281
+
282
+ We presented Open-VCLIP, an effective approach that enables CLIP to be transformed to an open-vocabulary video model. Open-VCLIP contains lightweight temporal modeling modules that equip CLIP with the ability to capture spatial and temporal relationships in videos. More importantly, Open-VCLIP is optimized with a carefully designed regularization strategy that strives for generalization to preserve the zero-shot abilities of CLIP. Extensive experiments are conducted and the results demonstrate that Open-VCLIP outperforms state-of-the-art methods with clear margins on zero-shot video action recognition and achieves the best trade-off between close-set and zero-shot video action recognition. One potential limitation is that adversaries could craft membership inference attacks to steal information from the model.
283
+
284
+ # Acknowledgements
285
+
286
+ This project was supported by NSFC under Grant No. 62032006 and No. 62102092. The authors would also like to thank Junke Wang for his help and suggestions.
287
+
288
+ # References
289
+
290
+ Arnab, A., Dehghani, M., Heigold, G., Sun, C., Lučić, M., and Schmid, C. Vivit: A video vision transformer. In ICCV, 2021.
291
+
292
+ Bain, M., Nagrani, A., Varol, G., and Zisserman, A. Frozen
293
+
294
+ in time: A joint video and image encoder for end-to-end retrieval. In ICCV, 2021.
295
+ Balaji, Y., Farajtabar, M., Yin, D., Mott, A., and Li, A. The effectiveness of memory replay in large scale continual learning. arXiv preprint arXiv:2010.02418, 2020.
296
+ Bertasius, G., Wang, H., and Torresani, L. Is space-time attention all you need for video understanding? In ICML, 2021.
297
+ Bishay, M., Zoumpourlis, G., and Patras, I. Tarn: Temporal attentive relation network for few-shot and zero-shot action recognition. arXiv preprint arXiv:1907.09021, 2019.
298
+ Brattoli, B., Tighe, J., Zhdanov, F., Perona, P., and Chalupka, K. Rethinking zero-shot video classification: End-to-end training for realistic applications. In CVPR, 2020.
299
+ Bulat, A., Perez Rua, J. M., Sudhakaran, S., Martinez, B., and Tzimiropoulos, G. Space-time mixing attention for video transformer. In NeurIPS, 2021.
300
+ Carreira, J., Noland, E., Banki-Horvath, A., Hillier, C., and Zisserman, A. A short note about kinetics-600. arXiv preprint arXiv:1808.01340, 2018.
301
+ Chen, S. and Huang, D. Elaborative rehearsal for zero-shot action recognition. In ICCV, 2021.
302
+ Crowson, K., Biderman, S., Kornis, D., Stander, D., Hallahan, E., Castricato, L., and Raff, E. Vqgan-clip: Open domain image generation and editing with natural language guidance. In ECCV, 2022.
303
+ Farajtabar, M., Azizan, N., Mott, A., and Li, A. Orthogonal gradient descent for continual learning. In IJCAI, 2020.
304
+ Gao, J., Zhang, T., and Xu, C. I know the relationships: Zero-shot action recognition via two-stream graph convolutional networks and knowledge graphs. In AAAI, 2019.
305
+ Gao, J., Zhang, T., and Xu, C. Learning to model relationships for zero-shot video classification. TPAMI, 2020.
306
+ Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Open-vocabulary image segmentation. arXiv preprint arXiv:2112.12143, 2021.
307
+ Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Scaling open-vocabulary image segmentation with image-level labels. In ECCV, 2022.
308
+ Hu, H., Li, A., Calandriello, D., and Gorur, D. One pass imagenet. arXiv preprint arXiv:2111.01956, 2021.
309
+ Ilharco, G., Wortsman, M., Gadre, S. Y., Song, S., Hajishirzi, H., Kornblith, S., Farhadi, A., and Schmidt, L. Patching open-vocabulary models by interpolating weights. arXiv preprint arXiv:2208.05592, 2022.
310
+
311
+ Izmailov, P., Podoprikhin, D., Garipov, T., Vetrov, D., and Wilson, A. G. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018.
312
+ Jain, M., Van Gemert, J. C., Mensink, T., and Snoek, C. G. Objects2action: Classifying and localizing actions without any video example. In ICCV, 2015.
313
+ Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q., Sung, Y.-H., Li, Z., and Duerig, T. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021.
314
+ Kay, W., Carreira, J., Simonyan, K., Zhang, B., Hillier, C., Vijayanarasimhan, S., Viola, F., Green, T., Back, T., Natsev, P., et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017.
315
+ Kim, T. S., Jones, J., Piven, M., Xiao, Z., Bai, J., Zhang, Y., Qiu, W., Yuille, A., and Hager, G. D. Daszl: Dynamic action signatures for zero-shot learning. In AAAI, 2021.
316
+ 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. PNAS, 2017.
317
+ Kuehne, H., Jhuang, H., Garrote, E., Poggio, T., and Serre, T. Hmdb: a large video database for human motion recognition. In ICCV, 2011.
318
+ Lin, C.-C., Lin, K., Wang, L., Liu, Z., and Li, L. Cross-modal representation learning for zero-shot action recognition. In CVPR, 2022.
319
+ Liu, J., Kuipers, B., and Savarese, S. Recognizing human actions by attributes. In CVPR, 2011.
320
+ Mandal, D., Narayan, S., Dwivedi, S. K., Gupta, V., Ahmed, S., Khan, F. S., and Shao, L. Out-of-distribution detection for generalized zero-shot action recognition. In CVPR, 2019.
321
+ Mishra, A., Verma, V. K., Reddy, M. S. K., Arulkumar, S., Rai, P., and Mittal, A. A generative approach to zero-shot and few-shot action recognition. In WACV, 2018.
322
+ Ni, B., Peng, H., Chen, M., Zhang, S., Meng, G., Fu, J., Xiang, S., and Ling, H. Expanding language-image pretrained models for general video recognition. In ECCV, 2022.
323
+ Pan, J., Lin, Z., Zhu, X., Shao, J., and Li, H. St-adapter: Parameter-efficient image-to-video transfer learning. In NeurIPS, 2022.
324
+ Portillo, Quintero, J. A., Ortiz-Bayliss, J. C., and Terashima-Marín, H. A straightforward framework for video retrieval using clip. In MCPR, 2021.
325
+
326
+ Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In ICML, 2021.
327
+ Rusu, A. A., Rabinowitz, N. C., Desjardins, G., Soyer, H., Kirkpatrick, J., Kavukcuoglu, K., Pascanu, R., and Hadsell, R. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
328
+ Shin, H., Lee, J. K., Kim, J., and Kim, J. Continual learning with deep generative replay. In NeurIPS, 2017.
329
+ Soomro, K., Zamir, A. R., and Shah, M. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
330
+ Thengane, V., Khan, S., Hayat, M., and Khan, F. Clip model is an efficient continual learner. arXiv preprint arXiv:2210.03114, 2022.
331
+ Wang, M., Xing, J., and Liu, Y. Actionclip: A new paradigm for video action recognition. arXiv preprint arXiv:2109.08472, 2021.
332
+ Wang, Z., Lu, Y., Li, Q., Tao, X., Guo, Y., Gong, M., and Liu, T. Cris: Clip-driven referring image segmentation. In CVPR, 2022.
333
+ Wu, W., Sun, Z., and Ouyang, W. Revisiting classifier: Transferring vision-language models for video recognition. In AAAI, 2023.
334
+ Xing, Z., Dai, Q., Hu, H., Chen, J., Wu, Z., and Jiang, Y.-G. Svformer: Semi-supervised video transformer for action recognition. arXiv preprint arXiv:2211.13222, 2022.
335
+ Xu, H., Ghosh, G., Huang, P.-Y., Okhonko, D., Aghajanyan, A., Metze, F., Zettlemoyer, L., and Feichtenhofer, C. Videoclip: Contrastive pre-training for zero-shot videotext understanding. arXiv preprint arXiv:2109.14084, 2021.
336
+ Xu, J., Mei, T., Yao, T., and Rui, Y. Msr-vtt: A large video description dataset for bridging video and language. In CVPR, 2016.
337
+ Xu, X., Hospedales, T., and Gong, S. Transductive zero-shot action recognition by word-vector embedding. IJCV, 2017.
338
+ Yin, D., Farajtabar, M., and Sola, A. L. Continual learning with second-order loss approximation. arXiv preprint arXiv:2006.10974, 2020.
339
+ Zellers, R. and Choi, Y. Zero-shot activity recognition with verb attribute induction. arXiv preprint arXiv:1707.09468, 2017.
340
+
341
+ Zheng, W., Li, Q., Guo, X., Wan, P., and Wang, Z. Bridging clip and stylegan through latent alignment for image editing. arXiv preprint arXiv:2210.04506, 2022.
342
+
343
+ # A. Proof
344
+
345
+ Lemma A.1. Suppose the image CLIP model was trained on an image-text dataset $D_{\bar{A}} = \{\mathcal{T}_{\bar{A}},\mathcal{T}_{\bar{A}}\}$ with $N$ examples. Then, there exists a diverse video-text dataset $D_{A} = \{\mathcal{V}_{A},\mathcal{T}_{A}\}$ containing $N$ examples where the video CLIP model with original CLIP parameters $\theta_{A}$ is optimal.
346
+
347
+ Proof. We denote the large-scale visual-language pretraining dataset used to train CLIP as $D_{\bar{A}} = \{\mathcal{I}_{\bar{A}},\mathcal{T}_{\bar{A}}\}$ . To bridge the gap between image and video domains, we extend images in $D_{\bar{A}}$ by repeating frames to create a set of static videos $\mathcal{V}_A = \{\mathcal{V}_i = [\mathcal{I}_{\bar{A} i},\mathcal{I}_{\bar{A} i},\dots,\mathcal{I}_{\bar{A} i}]\}^N$ and let $\mathcal{T}_A = \mathcal{T}_{\bar{A}}$ . Videos in $D_A = \{\mathcal{V}_A,\mathcal{T}_A\}$ are static and do not provide any additional information for prediction. As a result, $\theta_{A}$ which offers the best results for $D_{\bar{A}}$ is also optimal on $D_A$ .
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a624602497bc4520fad698830df4a61f6d4d1977e44a4a114c8d1e0ebd4cb8a
3
+ size 510310
2023/Open-VCLIP_ Transforming CLIP to an Open-vocabulary Video Model via Interpolated Weight Optimization/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_content_list.json ADDED
@@ -0,0 +1,2082 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 155,
8
+ 109,
9
+ 816,
10
+ 131
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Zheng Ding<sup>1</sup> Jieke Wang<sup>1</sup> Zhuowen Tu<sup>1</sup>",
17
+ "bbox": [
18
+ 333,
19
+ 176,
20
+ 635,
21
+ 193
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 241,
31
+ 220,
32
+ 320,
33
+ 234
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "In this paper, we tackle an emerging computer vision task, open-vocabulary universal image segmentation, that aims to perform semantic/instance/panoptic segmentation (background semantic labeling + foreground instance segmentation) for arbitrary categories of text-based descriptions in inference time. We first build a baseline method by directly adopting pre-trained CLIP models without finetuning or distillation. We then develop MaskCLIP, a Transformer-based approach with a MaskCLIP Visual Encoder, which is an encoder-only module that seamlessly integrates mask tokens with a pre-trained ViT CLIP model for semantic/instance segmentation and class prediction. MaskCLIP learns to efficiently and effectively utilize pre-trained partial/dense CLIP features within the MaskCLIP Visual Encoder that avoids the time-consuming student-teacher training process. MaskCLIP outperforms previous methods for semantic/instance/panoptic segmentation on ADE20K and PASCAL datasets. We show qualitative illustrations for MaskCLIP with online custom categories. Project website: https://maskclip.github.io.",
40
+ "bbox": [
41
+ 117,
42
+ 248,
43
+ 444,
44
+ 609
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1. Introduction",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 86,
54
+ 643,
55
+ 217,
56
+ 659
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Panoptic segmentation (Kirillov et al., 2019b) or image parsing (Tu et al., 2005) integrates the task of semantic segmentation (Tu, 2008) for background regions (e.g. \"stuff\" like \"road\", \"sky\") and instance segmentation (He et al., 2017) for foreground objects (e.g. \"things\" such as \"person\", \"table\"). Existing panoptic segmentation methods (Kirillov et al., 2019b;a; Li et al., 2019; Xiong et al., 2019; Lazarow et al., 2020) and instance segmentation approach (He et al., 2017) deal with a fixed set of category definitions, which",
63
+ "bbox": [
64
+ 84,
65
+ 670,
66
+ 475,
67
+ 806
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "<sup>1</sup>University of California San Diego, Lo Jolla, CA 92093, USA. Correspondence to: Zheng Ding <zhding@ucsd.edu>, Jieke Wang <jiw010@ucsd.edu>, Zhuowen Tu <ztu@ucsd.edu>.",
74
+ "bbox": [
75
+ 84,
76
+ 815,
77
+ 473,
78
+ 854
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).",
85
+ "bbox": [
86
+ 84,
87
+ 864,
88
+ 473,
89
+ 905
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "are essentially represented by categorical labels without semantic relations. DETR (Carion et al., 2020) is a pioneering work that builds a Transformer-based architecture for both object detection and panoptic segmentation. Under a more general setting, the tasks of semantic (Tu, 2008), instance (He et al., 2017), and panoptic (Kirillov et al., 2019b) can be unified under a universal image segmentation paradigm (Cheng et al., 2022).",
96
+ "bbox": [
97
+ 495,
98
+ 220,
99
+ 887,
100
+ 342
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "The deep learning field is moving rapidly towards the open-world/zero-shot settings (Bendale & Boult, 2015) where computer vision tasks such as classification (Radford et al., 2021), object detection (Li et al., 2022b; Zareian et al., 2021; Zang et al., 2022; Gu et al., 2022; Cai et al., 2022), semantic labeling (Li et al., 2022a; Ghiasi et al., 2022), and image retrieval (Bendale & Boult, 2015; Hinami & Satoh, 2018; Zareian et al., 2021; Hinami & Satoh, 2018; Kamath et al., 2021) perform recognition and detection for categories beyond those in the training set.",
107
+ "bbox": [
108
+ 495,
109
+ 349,
110
+ 888,
111
+ 501
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this paper, we take advantage of the existence of pretrained CLIP image and text embedding models (Radford et al., 2021), that are mapped to the same space. We first build a baseline method for open-vocabulary panoptic segmentation using CLIP models without training. We then develop a new algorithm, MaskCLIP, that is a Transformer-based approach efficiently and effectively utilizing pre-trained partial/dense CLIP features without heavy re-training. The key component of MaskCLIP is a Relative Mask Attention (RMA) module that seamlessly integrates the mask tokens with a pre-trained ViT-based CLIP backbone. MaskCLIP is distinct and advantageous compared with previous approaches in three aspects: 1) A canonical background and instance segmentation representation by the mask token representation with a unique encoder-only strategy that tightly couples a pre-trained CLIP image feature encoder with the mask token encoder. 2) MaskCLIP avoids the challenging student-teacher distillation processes such as OVR-CNN (Zareian et al., 2021) and ViLD (Gu et al., 2022) that face a limited number of teacher objects to train; 3) MaskCLIP also learns to refine masks beyond simple pooling in e.g. OpenSeg (Ghiasi et al., 2022).",
118
+ "bbox": [
119
+ 495,
120
+ 508,
121
+ 888,
122
+ 840
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "The contributions of our work are listed as follows.",
129
+ "bbox": [
130
+ 496,
131
+ 848,
132
+ 834,
133
+ 862
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "- We develop a new algorithm, MaskCLIP, to perform open-vocabulary universal image segmentation building",
140
+ "bbox": [
141
+ 506,
142
+ 875,
143
+ 883,
144
+ 906
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "page_number",
150
+ "text": "1",
151
+ "bbox": [
152
+ 480,
153
+ 922,
154
+ 491,
155
+ 934
156
+ ],
157
+ "page_idx": 0
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "on top of canonical background and instance mask representation with a cascade mask proposal and refinement process.",
162
+ "bbox": [
163
+ 109,
164
+ 85,
165
+ 473,
166
+ 128
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "list",
172
+ "sub_type": "text",
173
+ "list_items": [
174
+ "- We device the MaskCLIP Visual Encoder under an encoder-only strategy by tightly coupling a pre-trained CLIP image feature encoder with the mask token encoder, to allow for the direct formulation of the mask feature representation for semantic/instance segmentation+refinement, and class prediction. Within the MaskCLIP Visual Encoder, there is a new module called Relative Mask Attention (RMA) that performs mask refinement.",
175
+ "- MaskCLIP expands the scope of the CLIP models to open-vocabulary universal image segmentation by demonstrating encouraging and competitive results for open-vocabulary semantic, instance, and panoptic segmentation."
176
+ ],
177
+ "bbox": [
178
+ 94,
179
+ 137,
180
+ 473,
181
+ 354
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2. Related Work",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 84,
191
+ 381,
192
+ 225,
193
+ 397
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Open vocabulary. The open vocabulary setting is gaining increasing popularity lately as traditional fully supervised settings cannot handle unseen classes during testing, while real-world vision applications like scene understanding, self-driving and robotics are commonly required to predict unseen classes. Previous open-vocabulary attempts have been primarily made for object detection. ViLD (Gu et al., 2022) trains a student model to distill the knowledge of CLIP. RegionCLIP (Zhong et al., 2022) finetunes the pretrained CLIP model to match the image areas with corresponding texts. OV-DETR (Zang et al., 2022) uses CLIP as an external model to obtain the query embedding from CLIP model. Recently there is also work made for open-vocabulary semantic segmentation (Ghiasi et al., 2022).",
200
+ "bbox": [
201
+ 84,
202
+ 407,
203
+ 475,
204
+ 618
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Universal segmentation. Previously semantic-instance/panoptic segmentation tasks have been treated as different tasks using different methods. With the recent trends in computer vision, the formulation and methods of the three segmentation tasks have gradually been uniformed (Cheng et al., 2021; 2022). Instead of separately dealing with the stuff/instance, those methods treat them as the same one and output masks for each stuff/instance and do a post-process on the output masks for different segmentation tasks.",
211
+ "bbox": [
212
+ 84,
213
+ 626,
214
+ 475,
215
+ 777
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Open-vocabulary universal segmentation: an emerging task. As open-set, open-world, zero-shot, and open-vocabulary are relatively new concepts that have no commonly accepted definitions, thus, different algorithms are often not directly comparable with differences in problem definition/setting, training data, and testing scope. Table 1 gives a summary for the recent open-vocabulary applications. XPM (Huynh et al., 2022) utilizes vision-language",
222
+ "bbox": [
223
+ 84,
224
+ 785,
225
+ 475,
226
+ 905
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "cross-modal data to generate pseudo-mask supervision to train a student model for instance segmentation, and thus, it may not be fully open-vocabulary to allow for arbitrary object specifications in the inference time. LSeg (Li et al., 2022a) also has a limited open-vocabulary aspect as the learned CNN image features in LSeg are not exposed to representations beyond the training labeling categories. OpenSeg (Ghiasi et al., 2022) is potentially applicable for instance/panoptic segmentation, but OpenSeg is formulated to be trained on captions that lack instance-level information that is fundamental for panoptic segmentation. The direct image feature pooling strategy in OpenSeg is potentially another limiting factor towards the open-vocabulary universal segmentation. Nevertheless, no results for open-vocabulary panoptic/instance segmentation are reported in (Ghiasi et al., 2022).",
233
+ "bbox": [
234
+ 495,
235
+ 84,
236
+ 887,
237
+ 325
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Class-agnostic segmentation. Most closed-vocabulary segmentation methods are classware i.e. predicting the classes along with the corresponding labels (He et al., 2017; Cheng et al., 2021; 2022). However, in tasks involving open-vocabulary or open-world scenarios where novel classes may appear during testing, it is common to use class-agnostic segmentation methods for generating masks(Jia et al., 2021; Qi et al., 2022; Xu et al., 2022). The difference in methodology between class-aware and class-agnostic segmentation methods is typically not substantial. Class-aware methods often incorporate a class-prediction head, whereas class-agnostic methods do not. In our method, we adopt a class-agnostic segmentation model by removing the class-prediction head from previous class-aware class-aware segmentation methods.",
244
+ "bbox": [
245
+ 495,
246
+ 333,
247
+ 887,
248
+ 559
249
+ ],
250
+ "page_idx": 1
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "CLIP model distillation/reuse. After its initial release, the CLIP model (Radford et al., 2021) that is learned from large-scale image-text paired captioning datasets has received a tremendous amount of attention. Some other similar vision-language models have also been proposed later e.g. ALIGN (Jia et al., 2021), GLIP (Li et al., 2022b). Many algorithms have been developed lately (Zang et al., 2022; Wang et al., 2022; Zhong et al., 2022; Luo et al., 2021; Patashnik et al., 2021; Shen et al., 2022) trying knowledge distillation from the CLIP model to benefit the down-stream tasks one way or the other by leveraging the rich semantic language information paired in the images. Here, we directly adopt the backbone of CLIP image model to train for open-vocabulary panoptic segmentation. There have been attempts (Rao et al., 2022; Zhou et al., 2022) that use the partial/dense CLIP features to represent pixel-wise features as teacher model to train student model for semantic segmentation.",
255
+ "bbox": [
256
+ 495,
257
+ 568,
258
+ 887,
259
+ 825
260
+ ],
261
+ "page_idx": 1
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "3. Method",
266
+ "text_level": 1,
267
+ "bbox": [
268
+ 496,
269
+ 844,
270
+ 588,
271
+ 859
272
+ ],
273
+ "page_idx": 1
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "Our pipeline, shown in Figure 1, contains two stages. The first stage is a class-agnostic mask proposal network. The",
278
+ "bbox": [
279
+ 495,
280
+ 869,
281
+ 885,
282
+ 900
283
+ ],
284
+ "page_idx": 1
285
+ },
286
+ {
287
+ "type": "header",
288
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
289
+ "bbox": [
290
+ 277,
291
+ 56,
292
+ 694,
293
+ 70
294
+ ],
295
+ "page_idx": 1
296
+ },
297
+ {
298
+ "type": "page_number",
299
+ "text": "2",
300
+ "bbox": [
301
+ 480,
302
+ 922,
303
+ 491,
304
+ 934
305
+ ],
306
+ "page_idx": 1
307
+ },
308
+ {
309
+ "type": "table",
310
+ "img_path": "images/3912bb563e92f2d5402d8f8d7bc0182bb992af72b1b973eb683e0b387578f809.jpg",
311
+ "table_caption": [
312
+ "Table 1: Comparison for recent open-vocabulary approaches for object detection, semantic segmentation, instance segmentation, and panoptic segmentation. GLIP (Li et al., 2022b); OVR-CNN (Zareian et al., 2021); ViLD (Gu et al., 2022); RegionCLIP (Zhong et al., 2022); OV-DETR (Zang et al., 2022); LSeg (Li et al., 2022a); OPenSeg (Ghiasi et al., 2022); DenseCLIP (Rao et al., 2022); XPM (Huynh et al., 2022). $\\times$ indicates that the corresponding method is loosely following the definition. Dense Clip features refer to the use of pixel-wise/local features. Note that OpenSeg uses its ALIGN (Jia et al., 2021), which is an alternative to CLIP."
313
+ ],
314
+ "table_footnote": [],
315
+ "table_body": "<table><tr><td rowspan=\"2\">Task</td><td rowspan=\"2\">Method</td><td rowspan=\"2\">Arbitrary Online Inference</td><td colspan=\"2\">Segmentation</td><td rowspan=\"2\">Dense CLIP features</td><td rowspan=\"2\">Training data</td><td rowspan=\"2\">Annotation type</td></tr><tr><td>semantic</td><td>instance</td></tr><tr><td rowspan=\"4\">Object Det.</td><td>GLIP</td><td>✓</td><td></td><td></td><td></td><td>FourODs, GoldG, Cap24M</td><td>labels +bbox + captions</td></tr><tr><td>OVR-CNN</td><td>✓</td><td></td><td></td><td></td><td>COCO base, CC3M</td><td>bbox + captions</td></tr><tr><td>ViLD</td><td>✓</td><td></td><td></td><td></td><td>COCO</td><td>labels +bbox</td></tr><tr><td>RegionCLIP</td><td>✓</td><td></td><td></td><td></td><td>CC3M, COCO</td><td>captions</td></tr><tr><td rowspan=\"3\">Semantic Seg.</td><td>LSeg</td><td>✓</td><td>✓</td><td></td><td></td><td>COCO + others</td><td>labels + segmentations</td></tr><tr><td>OpenSeg</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>COCO, LocalizedNarratives</td><td>masks + captions</td></tr><tr><td>DenseCLIP</td><td></td><td>✓</td><td></td><td>✓</td><td>COCO</td><td>labels + segmentations</td></tr><tr><td>Instance Seg.</td><td>XPM</td><td>✓</td><td></td><td>✓</td><td></td><td>COCO, CC3M</td><td>labels + masks + captions</td></tr><tr><td>Panoptic Seg.</td><td>MaskCLIP (ours)</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>COCO</td><td>labels + masks</td></tr></table>",
316
+ "bbox": [
317
+ 156,
318
+ 157,
319
+ 818,
320
+ 297
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "image",
326
+ "img_path": "images/ed2ee1b3c27d6441c26e1555225beab3529b246abc3dd293b75d5b37dc26aedc.jpg",
327
+ "image_caption": [
328
+ "Figure 1: Illustration of the pipeline. Our pipeline contains two stages. The first stage is a class-agnostic mask proposal network and the second stage is built on the pretrained CLIP ViT model. All the weights of the CLIP ViT model during training are fixed. Arrows in orange denote weight sharing. The embeddings' weights of Mask Class Tokens are shared by Class Tokens in the CLIP ViT model and are fixed. RMA represents Relative Mask Attention which is built based on the CLIP ViT attention layer. RMA contains all the weights from CLIP ViT attention layer which are all fixed during training. Additional weights are added in RMA for further mask information utilization and mask refinement. The demo image we use here is from ADE20K (Zhou et al., 2019)."
329
+ ],
330
+ "image_footnote": [],
331
+ "bbox": [
332
+ 135,
333
+ 318,
334
+ 841,
335
+ 539
336
+ ],
337
+ "page_idx": 2
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "second stage is MaskCLIP Visual Encoder which is built on the CLIP (Radford et al., 2021) ViT architecture. It takes the images and the coarse masks from the first stage as the input and outputs refined masks along with the corresponding partial/dense image features for further classification.",
342
+ "bbox": [
343
+ 84,
344
+ 657,
345
+ 473,
346
+ 733
347
+ ],
348
+ "page_idx": 2
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "3.1. Class-Agnostic Mask Proposal Network",
353
+ "text_level": 1,
354
+ "bbox": [
355
+ 84,
356
+ 750,
357
+ 397,
358
+ 766
359
+ ],
360
+ "page_idx": 2
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "Our Class-Agnostic Mask Proposal Network is built on instance/segmentation models such as MaskRCNN(He et al., 2017) and Mask2Former(Cheng et al., 2022). To make the model class-agnostic, we remove the class supervision during training. The classification head thus becomes a binary classification for either positive or negative in these models.",
365
+ "bbox": [
366
+ 84,
367
+ 773,
368
+ 475,
369
+ 878
370
+ ],
371
+ "page_idx": 2
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "3.2. MaskCLIP Visual Encoder",
376
+ "text_level": 1,
377
+ "bbox": [
378
+ 496,
379
+ 657,
380
+ 720,
381
+ 672
382
+ ],
383
+ "page_idx": 2
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "Similar to CLIP, our MaskCLIP Visual Encoder also predicts the image features. Unlike the CLIP Visual Encoder which only uses one class token to output the feature of the whole image. Our MaskCLIP Visual Encoder uses another $M$ Mask Class Tokens to output the partial/dense features for each corresponding area of the image given the masks. The Mask Class Tokens use attention masks and Relative Mask Attention to obtain the partial/dense features which we discuss in the following two parts.",
388
+ "bbox": [
389
+ 495,
390
+ 680,
391
+ 887,
392
+ 816
393
+ ],
394
+ "page_idx": 2
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "Mask Class Tokens. In order to obtain partial/dense image features for the corresponding masks or bounding boxes for further recognition or distillation, an easy way to do this is simply masking or cropping the image and then sending",
399
+ "bbox": [
400
+ 495,
401
+ 845,
402
+ 888,
403
+ 906
404
+ ],
405
+ "page_idx": 2
406
+ },
407
+ {
408
+ "type": "header",
409
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
410
+ "bbox": [
411
+ 277,
412
+ 56,
413
+ 694,
414
+ 70
415
+ ],
416
+ "page_idx": 2
417
+ },
418
+ {
419
+ "type": "page_number",
420
+ "text": "3",
421
+ "bbox": [
422
+ 480,
423
+ 922,
424
+ 491,
425
+ 934
426
+ ],
427
+ "page_idx": 2
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "the obtained image to the pretrained image encoder. This method has been widely used in several open vocabulary detection/segmentation methods (Zhong et al., 2022; Gu et al., 2022; Xu et al., 2022). The problem is that it's not computation efficient ( $N$ masks/boxes will lead to $N$ images and they will be computed through the image encoder independently) and also loses the ability to see the global image context information which is very important for recognizing some objects and stuff. For masking, another problem is that masks are in different shapes and simply masking the image will cause the resulting image to have a transparent background which usually doesn't exist in real images that are used for training in large language-vision models e.g., CLIP.",
432
+ "bbox": [
433
+ 84,
434
+ 84,
435
+ 475,
436
+ 295
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "To solve this, we propose Mask Class Tokens for efficient feature extraction from images without losing the global image context information. In the original CLIP ViT-based visual encoder framework, the input of the network is $N$ image tokens and 1 class token. The final output of the class token will be used for the relation computation with the text embeddings. Our newly introduced $M$ Mask Class Tokens will be alongside the image tokens and the class token. The embeddings' weights of the Mask Class Token are provided by the class token in the pretrained CLIP ViT model and are fixed. Each Mask Class Token will output a corresponding partial/dense image feature similar to the class token which outputs the feature of the whole image. To achieve this, we design an attention mask as follows",
443
+ "bbox": [
444
+ 84,
445
+ 303,
446
+ 473,
447
+ 515
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "equation",
453
+ "text": "\n$$\n\\mathcal {M} = \\left[ \\begin{array}{c c} \\mathcal {F} _ {(N + 1) \\times (N + 1)} & \\mathcal {T} _ {(N + 1) \\times M} \\\\ \\mathcal {M} _ {M \\times N} ^ {\\prime} \\quad \\mathcal {F} _ {M \\times 1} & \\mathcal {T} _ {M \\times M} \\end{array} \\right] \\tag {1}\n$$\n",
454
+ "text_format": "latex",
455
+ "bbox": [
456
+ 145,
457
+ 527,
458
+ 475,
459
+ 561
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "in which $M$ is the number of Mask Class Tokens, $N$ is the number of image tokens, $\\mathcal{T}_{m\\times n}$ is an $m\\times n$ True matrix, $\\mathcal{F}_{m\\times n}$ is an $m\\times n$ False matrix and $\\mathcal{M}'$ is defined as following:",
466
+ "bbox": [
467
+ 84,
468
+ 574,
469
+ 475,
470
+ 635
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "equation",
476
+ "text": "\n$$\n\\mathcal {M} _ {i, j} ^ {\\prime} = \\left\\{ \\begin{array}{l l} \\text {F a l s e} & \\text {i f m a s k} _ {i} \\text {c o n t a i n s a t l e a s t o n e p i x e l i n p a t c h} _ {j} \\\\ \\text {T r u e} & \\text {o t h e r w i s e .} \\end{array} \\right. \\tag {2}\n$$\n",
477
+ "text_format": "latex",
478
+ "bbox": [
479
+ 84,
480
+ 648,
481
+ 496,
482
+ 703
483
+ ],
484
+ "page_idx": 3
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "where True means that this position is masked out i.e. not allowed to attend and False otherwise.",
489
+ "bbox": [
490
+ 84,
491
+ 715,
492
+ 473,
493
+ 747
494
+ ],
495
+ "page_idx": 3
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "In our mask attention matrix $\\mathcal{M}$ , $\\mathcal{F}_{(N + 1)\\times (N + 1)}$ shows the $N$ Image Tokens and one Class Token are attending each other as in the original CLIP. $\\mathcal{T}_{(N + 1)\\times M}$ shows that the $N$ Image Tokens and one Class Token are not attending the $M$ Mask Class Tokens. $\\mathcal{M}_{M\\times N}^{\\prime}$ shows that the Mask Class Tokens are attending the Image Tokens given the corresponding masks. $\\mathcal{F}_{M\\times 1}$ shows that the $M$ Mask Class Tokens are attending the Class Token. $\\mathcal{T}_{M\\times M}$ shows that the $M$ Mask Class Tokens are not interacting with each other.",
500
+ "bbox": [
501
+ 84,
502
+ 753,
503
+ 475,
504
+ 905
505
+ ],
506
+ "page_idx": 3
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "In this way, each Mask Class Token will learn from the corresponding mask area of the images. The image tokens are also interacting with each other which means the global information won't lose. And it's also very efficient since we don't need to do redundant computing for each mask or finetune the pretrained model. However, the mask information is not fully utilized and it cannot be refined either. But we will see in the experiments later that simply adopting Mask Class Tokens to the pretrained CLIP model without any finetuning will already serve as a competitive baseline.",
511
+ "bbox": [
512
+ 496,
513
+ 84,
514
+ 885,
515
+ 237
516
+ ],
517
+ "page_idx": 3
518
+ },
519
+ {
520
+ "type": "image",
521
+ "img_path": "images/f652063708de1f7a783cd8929a9744637cf9206459b4f60877f0c68f7d090131.jpg",
522
+ "image_caption": [
523
+ "Figure 2: Relative Mask Attention. Our Relative Mask Attention mechanism adds another attention matrix $A_{M, -N}^{\\prime}$ to the original attention matrix. The newly added attention matrix is computed using the Image Tokens and the Mask Patch Tokens. The mask patch tokens are acquired by patchifying the masks using a similar way for the images as shown here. Moreover, the masks are refined by using $M_r$ in Eq. 5 which is computed by Image Tokens and Mask Class Tokens."
524
+ ],
525
+ "image_footnote": [],
526
+ "bbox": [
527
+ 521,
528
+ 253,
529
+ 864,
530
+ 434
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "Relative Mask Attention. To further utilize the mask information and refine the coarse masks, we propose Relative Mask Attention mechanism in our transformer. Our key design principle is to try not to change the CLIP features directly as this would destroy the learned relationship between the image features and text features in the CLIP model. Therefore, we adopt a way to only change the attention matrix in the transformer to learn a better linear combination of the values in the attention layers according to the mask information. As in Figure 2, our proposed Relative Mask Attention Mechanism only changes the attention matrix and refines the masks. $M_r$ is defined in Eq. 5. $\\mathcal{A}_{:M, -N}^{\\prime}$ is defined in Eq. 3. $f_M$ is the class-agnostic mask proposal network. $f_1$ and $f_2$ are two downsampling networks that encode the images/masks to image tokens/mask patch tokens sharing the same architecture. $f_r$ is a two-layer convolutional network that maps the attention matrix to a mask residual.",
537
+ "bbox": [
538
+ 496,
539
+ 580,
540
+ 888,
541
+ 852
542
+ ],
543
+ "page_idx": 3
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "Similar to relative positional encoding, we use a relative attention mechanism here. Let $D$ be the dimension of the token embedding, for each Mask Class Token $T_{i}^{\\mathrm{MC}} \\in \\mathbb{R}^{D}$",
548
+ "bbox": [
549
+ 496,
550
+ 859,
551
+ 885,
552
+ 907
553
+ ],
554
+ "page_idx": 3
555
+ },
556
+ {
557
+ "type": "header",
558
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
559
+ "bbox": [
560
+ 277,
561
+ 56,
562
+ 694,
563
+ 70
564
+ ],
565
+ "page_idx": 3
566
+ },
567
+ {
568
+ "type": "page_number",
569
+ "text": "4",
570
+ "bbox": [
571
+ 480,
572
+ 922,
573
+ 491,
574
+ 934
575
+ ],
576
+ "page_idx": 3
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "with a corresponding mask $K_{i} \\in \\mathbb{R}^{H \\times W}$ whose shape is the same as the image, we use a similar way as for the images to get mask patch tokens $T^{\\mathrm{MP}} \\in \\mathbb{R}^{M \\times N \\times D}$ in the computation of the attention. In our attention matrix, the Mask Class Tokens attending the image tokens part will then be as follows:",
581
+ "bbox": [
582
+ 84,
583
+ 84,
584
+ 473,
585
+ 175
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "equation",
591
+ "text": "\n$$\n\\mathcal {A} _ {: M, - N:} ^ {\\prime} = \\sum_ {c} ^ {D} \\left(\\phi_ {Q _ {m}} \\left(T ^ {\\mathrm {M P}}\\right) \\odot \\phi_ {K _ {m}} \\left(T ^ {\\mathrm {I M}}\\right)\\right) _ {c} \\tag {3}\n$$\n",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 125,
595
+ 180,
596
+ 475,
597
+ 219
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "equation",
603
+ "text": "\n$$\n\\mathcal {A}: M, - N: = \\frac {\\phi_ {Q} \\left(T ^ {\\mathrm {M C}}\\right) \\cdot \\phi_ {K} \\left(T ^ {\\mathrm {I M}}\\right) + \\mathcal {A} _ {: M , - N :} ^ {\\prime}}{2 \\sqrt {D}} \\tag {4}\n$$\n",
604
+ "text_format": "latex",
605
+ "bbox": [
606
+ 125,
607
+ 223,
608
+ 473,
609
+ 258
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "where $T^{\\mathrm{IM}}\\in \\mathbb{R}^{N\\times D}$ is image tokens, $T^{\\mathrm{MC}}\\in \\mathbb{R}^{M\\times D}$ is Mask Class Tokens, $T^{\\mathrm{MP}}\\in \\mathbb{R}^{M\\times N\\times D}$ is Mask Patch Tokens $\\phi_{Q},\\phi_{K},\\phi_{Q_{m}},\\phi_{K_{m}}$ are linear transformations, $\\odot$ is element-wise product and $\\sum_{c}^{D}(\\cdot)_{c}$ is the sum of the embedding dimension. $\\phi_{K_m}(T^{\\mathrm{IM}})\\in \\mathbb{R}^{N\\times D}$ will first be broadcast to $\\mathbb{R}^{M\\times N\\times D}$ before doing element-wise production.",
616
+ "bbox": [
617
+ 84,
618
+ 265,
619
+ 475,
620
+ 359
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "The attention will also in turn be used for the refinement of the masks. The vanilla attention can be seen as a relationship between each mask area and all the image patches. Thus we utilize this to help our coarse masks be more accurate. The updating process of the masks is as following:",
627
+ "bbox": [
628
+ 84,
629
+ 367,
630
+ 475,
631
+ 443
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "equation",
637
+ "text": "\n$$\nM _ {r} = \\sigma \\left(\\sigma^ {- 1} \\left(M _ {c}\\right) + f _ {r} \\left(\\phi_ {Q} \\left(T ^ {\\mathrm {M C}}\\right) \\odot \\phi_ {K} \\left(T ^ {\\mathrm {I M}}\\right)\\right)\\right) \\tag {5}\n$$\n",
638
+ "text_format": "latex",
639
+ "bbox": [
640
+ 107,
641
+ 449,
642
+ 473,
643
+ 467
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "where $M_{c}, M_{r} \\in \\mathbb{R}^{N \\times H \\times W}$ denotes the coarse mask and refined mask respectively, $f_{r}$ is a learnable non-linear function that maps the attention matrix to a mask residual, $\\sigma$ and $\\sigma^{-1}$ are sigmoid and inverse sigmoid functions respectively.",
650
+ "bbox": [
651
+ 84,
652
+ 474,
653
+ 475,
654
+ 536
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "The RMA method aims to leverage detailed mask information and refine masks by utilizing CLIP's features. Without RMA, the method would only utilize the mask information in the attention mask (which is just a low-resolution mask) and cannot refine the mask using CLIP's features. In order to utilize the detailed information of masks, we add another attention matrix, which is obtained from the Mask Patch Tokens and the Image Tokens, to the original attention matrix in the CLIP ViT model so that the new attention matrix could be aware of the detailed mask information and thus the Mask Class Tokens could attend the information more accurately. Furthermore, we use the information from the original attention matrix, which is obtained from the Mask Class Tokens and the Image Tokens, to refine the mask.",
661
+ "bbox": [
662
+ 84,
663
+ 542,
664
+ 475,
665
+ 753
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "4. Experiments",
672
+ "text_level": 1,
673
+ "bbox": [
674
+ 84,
675
+ 773,
676
+ 217,
677
+ 791
678
+ ],
679
+ "page_idx": 4
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "In this part, we train our proposed MaskCLIP method using COCO (Lin et al., 2014) training data and test on other datasets (ADE20K (Zhou et al., 2019; 2017), PASCAL Context (Mottaghi et al., 2014), LVIS) under the open vocabulary setting. We report our results on semantic/instance/panoptic segmentation tasks to evaluate the performance of out model's universal segmentation.",
684
+ "bbox": [
685
+ 84,
686
+ 800,
687
+ 475,
688
+ 905
689
+ ],
690
+ "page_idx": 4
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "4.1. Datasets",
695
+ "text_level": 1,
696
+ "bbox": [
697
+ 496,
698
+ 85,
699
+ 589,
700
+ 98
701
+ ],
702
+ "page_idx": 4
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "COCO: COCO (Lin et al., 2014) includes 133 classes where 80 classes are things and 53 classes are stuff or background. There are 118k training images and 5k validation images. In our experiments, we first train the class-agnostic mask proposal network on COCO training dataset using the annotations of panoptic masks. Then we train our models on COCO training images in a supervised manner.",
707
+ "bbox": [
708
+ 495,
709
+ 108,
710
+ 885,
711
+ 214
712
+ ],
713
+ "page_idx": 4
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "ADE20K: ADE20K (Zhou et al., 2019; 2017) contains 20,210 images and annotations for training and 2000 images and annotations for validation. It serves both panoptic segmentation and semantic segmentation. The full version (A-847) (Zhou et al., 2019) includes 847 classes and the short version (A-150) (Zhou et al., 2017) includes 150 classes. We use the validation set in ADE20K for testing without any training on this dataset in which case we can test our model's capability of open vocabulary segmentation.",
718
+ "bbox": [
719
+ 495,
720
+ 220,
721
+ 885,
722
+ 357
723
+ ],
724
+ "page_idx": 4
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "PASCAL Context: PASCAL Context (Mottaghi et al., 2014) contains 10,103 per-pixel annotations for images of PASCAL VOC 2010 (Everingham et al.), where 4998 for training and 5105 for validation. The full version (P-459) includes 459 classes and the short version includes 59 classes. This dataset serves as another benchmark testing our model's open vocabulary segmentation ability.",
729
+ "bbox": [
730
+ 495,
731
+ 364,
732
+ 885,
733
+ 470
734
+ ],
735
+ "page_idx": 4
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "LVIS: LVIS (Gupta et al., 2019) contains 100,170 images for training and 19,809 images for validation. It extends COCO (Lin et al., 2014) but contains 1,203 categories. It is considered one of the most challenging benchmark for instance segmentation because of its large vocabulary, long-tailed distribution, and fine-grained classification. We report our model's performance of open vocabulary instance segmentation on the validation dataset.",
740
+ "bbox": [
741
+ 495,
742
+ 478,
743
+ 885,
744
+ 598
745
+ ],
746
+ "page_idx": 4
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "4.2. Implementation Details",
751
+ "text_level": 1,
752
+ "bbox": [
753
+ 496,
754
+ 604,
755
+ 694,
756
+ 619
757
+ ],
758
+ "page_idx": 4
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Class-Agnostic Mask Proposal Network. In our first stage, we train a class-agnostic mask proposal network using MaskRCNN (He et al., 2017) and Mask2Former (Cheng et al., 2022) on COCO training data. The experiment setting we use for MaskRCNN is R50-FPN-1x. The backbone we use in Mask2Former is ResNet-50. All the training setting follows the default in their models.",
763
+ "bbox": [
764
+ 495,
765
+ 628,
766
+ 885,
767
+ 733
768
+ ],
769
+ "page_idx": 4
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "CLIP Baseline. We design our first baseline by directly using the class-agnostic mask proposal network from the first stage and the pretrained CLIP model. We mask the images according to the masks from the class-agnostic mask proposal network and send the masked images to the CLIP model to get classification results. The pretrained CLIP model we use is ViT-L/14@336px and the text inputs we use are simply the category names defined by each dataset. Those two settings keep the same with the following two methods for a fair comparison.",
774
+ "bbox": [
775
+ 495,
776
+ 741,
777
+ 885,
778
+ 892
779
+ ],
780
+ "page_idx": 4
781
+ },
782
+ {
783
+ "type": "header",
784
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
785
+ "bbox": [
786
+ 277,
787
+ 56,
788
+ 696,
789
+ 70
790
+ ],
791
+ "page_idx": 4
792
+ },
793
+ {
794
+ "type": "page_number",
795
+ "text": "5",
796
+ "bbox": [
797
+ 480,
798
+ 922,
799
+ 491,
800
+ 934
801
+ ],
802
+ "page_idx": 4
803
+ },
804
+ {
805
+ "type": "table",
806
+ "img_path": "images/ccde2c809478cbcd067a252aa2c161b4a3ae4475a2b8b3b12d5aeb561a936270.jpg",
807
+ "table_caption": [
808
+ "Table 2: Results on open-vocabulary semantic segmentation. A-150 and A-847 represent the ADE20K dataset with 150 classes and 847 classes respectively. P-459 and P-59 represent PASCAL Context dataset with 459 classes and 59 classes respectively. All results use the mIoU metric. All methods presented here don't use extra data other than COCO for training."
809
+ ],
810
+ "table_footnote": [],
811
+ "table_body": "<table><tr><td>Method</td><td>COCO Training Data</td><td>A-150 ↑</td><td>A-847 ↑</td><td>P-459 ↑</td><td>P-59 ↑</td></tr><tr><td>ALIGN (Jia et al., 2021)</td><td>None</td><td>10.7</td><td>4.1</td><td>3.7</td><td>15.7</td></tr><tr><td>ALIGN w/ proposals (Jia et al., 2021)</td><td>Masks</td><td>12.9</td><td>5.8</td><td>4.8</td><td>22.4</td></tr><tr><td>LSeg+ (Li et al., 2022a)</td><td>Masks + Labels</td><td>18.0</td><td>3.8</td><td>7.8</td><td>46.5</td></tr><tr><td>OpenSeg (Ghiasi et al., 2022)</td><td>Masks + Captions</td><td>21.1</td><td>6.3</td><td>9.0</td><td>42.1</td></tr><tr><td>SimSeg (Xu et al., 2022)</td><td>Masks + Labels</td><td>20.5</td><td>7.0</td><td>-</td><td>47.7</td></tr><tr><td>CLIP Baseline</td><td>Masks</td><td>13.8</td><td>5.2</td><td>5.2</td><td>25.3</td></tr><tr><td>MaskCLIP w/o RMA</td><td>Masks</td><td>14.9</td><td>5.6</td><td>5.3</td><td>26.1</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>Masks + Labels</td><td>22.4</td><td>6.8</td><td>9.1</td><td>41.3</td></tr><tr><td>MaskCLIP</td><td>Masks + Labels</td><td>23.7</td><td>8.2</td><td>10.0</td><td>45.9</td></tr></table>",
812
+ "bbox": [
813
+ 200,
814
+ 130,
815
+ 772,
816
+ 256
817
+ ],
818
+ "page_idx": 5
819
+ },
820
+ {
821
+ "type": "image",
822
+ "img_path": "images/4b48cadafcbecb53adfae8675fe2cb4a73fee59e6bc16b0c87ff290720ddb3ee.jpg",
823
+ "image_caption": [
824
+ "Image"
825
+ ],
826
+ "image_footnote": [],
827
+ "bbox": [
828
+ 222,
829
+ 266,
830
+ 328,
831
+ 328
832
+ ],
833
+ "page_idx": 5
834
+ },
835
+ {
836
+ "type": "image",
837
+ "img_path": "images/48677872afdf5526104bef5ccf9156a7495c259abf42d039bfb2c91d273bb4b8.jpg",
838
+ "image_caption": [
839
+ "GT"
840
+ ],
841
+ "image_footnote": [],
842
+ "bbox": [
843
+ 331,
844
+ 267,
845
+ 433,
846
+ 328
847
+ ],
848
+ "page_idx": 5
849
+ },
850
+ {
851
+ "type": "image",
852
+ "img_path": "images/76082cfb8f7a4c61e52ba2cafe947272cb7ba5aa92bd6c0032e35fd274ec31bd.jpg",
853
+ "image_caption": [
854
+ "ALIGN++"
855
+ ],
856
+ "image_footnote": [],
857
+ "bbox": [
858
+ 434,
859
+ 267,
860
+ 539,
861
+ 328
862
+ ],
863
+ "page_idx": 5
864
+ },
865
+ {
866
+ "type": "image",
867
+ "img_path": "images/d2eca909ef6a9fc0327cb32f8f071d3013a837e301eb725d1f3e9dbd2d883648.jpg",
868
+ "image_caption": [
869
+ "OpenSeg"
870
+ ],
871
+ "image_footnote": [],
872
+ "bbox": [
873
+ 540,
874
+ 267,
875
+ 643,
876
+ 328
877
+ ],
878
+ "page_idx": 5
879
+ },
880
+ {
881
+ "type": "image",
882
+ "img_path": "images/e09c87a2b9ee7a40d4c76e61b1246cc29ff960954f7432ed4d57104280930380.jpg",
883
+ "image_caption": [
884
+ "MaskCLIP"
885
+ ],
886
+ "image_footnote": [],
887
+ "bbox": [
888
+ 645,
889
+ 267,
890
+ 751,
891
+ 328
892
+ ],
893
+ "page_idx": 5
894
+ },
895
+ {
896
+ "type": "image",
897
+ "img_path": "images/0215274405c632b1f3fc750c6cb2c470b8a4189820e2dd92255653b94fef1b90.jpg",
898
+ "image_caption": [],
899
+ "image_footnote": [],
900
+ "bbox": [
901
+ 272,
902
+ 344,
903
+ 297,
904
+ 369
905
+ ],
906
+ "page_idx": 5
907
+ },
908
+ {
909
+ "type": "image",
910
+ "img_path": "images/01611a1fade2a85ce4bd1464f4270d3c4dcae28365c398fcfb5446a09b4979e8.jpg",
911
+ "image_caption": [
912
+ "Figure 3: Comparison on open-vocabulary semantic segmentation. The input image and the results for GT, ALIGN++, OpenSeg are from (Ghiasi et al., 2022)."
913
+ ],
914
+ "image_footnote": [],
915
+ "bbox": [
916
+ 305,
917
+ 345,
918
+ 330,
919
+ 371
920
+ ],
921
+ "page_idx": 5
922
+ },
923
+ {
924
+ "type": "image",
925
+ "img_path": "images/44b692a3bd0646456c8cb9da345478bb10325821ad5d4f561f7e73b33a4cc081.jpg",
926
+ "image_caption": [],
927
+ "image_footnote": [],
928
+ "bbox": [
929
+ 341,
930
+ 345,
931
+ 364,
932
+ 371
933
+ ],
934
+ "page_idx": 5
935
+ },
936
+ {
937
+ "type": "image",
938
+ "img_path": "images/3e2b34ca26f1a5aca478d8fdab689c73aa1cc2f3f74b8eae85e23b3771b75086.jpg",
939
+ "image_caption": [],
940
+ "image_footnote": [],
941
+ "bbox": [
942
+ 370,
943
+ 345,
944
+ 395,
945
+ 371
946
+ ],
947
+ "page_idx": 5
948
+ },
949
+ {
950
+ "type": "image",
951
+ "img_path": "images/024e498d47769b4c7f30c1ef52d92407c1fbb0c002c769337774e21b0c560f0b.jpg",
952
+ "image_caption": [],
953
+ "image_footnote": [],
954
+ "bbox": [
955
+ 405,
956
+ 345,
957
+ 429,
958
+ 371
959
+ ],
960
+ "page_idx": 5
961
+ },
962
+ {
963
+ "type": "image",
964
+ "img_path": "images/d292e27ddc8cda2ea9e06d546b8ccafc8a7031246bb95d333b9c31b6e945f3f4.jpg",
965
+ "image_caption": [],
966
+ "image_footnote": [],
967
+ "bbox": [
968
+ 442,
969
+ 345,
970
+ 465,
971
+ 371
972
+ ],
973
+ "page_idx": 5
974
+ },
975
+ {
976
+ "type": "image",
977
+ "img_path": "images/4559aec8ded6669c889fbfe9ff366ea8b80908bebce9114e8ef86a288d81aa8d.jpg",
978
+ "image_caption": [],
979
+ "image_footnote": [],
980
+ "bbox": [
981
+ 473,
982
+ 345,
983
+ 496,
984
+ 371
985
+ ],
986
+ "page_idx": 5
987
+ },
988
+ {
989
+ "type": "image",
990
+ "img_path": "images/e8a1badcaa225eed686efd1945bb30298fe8e6977cf0bf262a2e4f280087ff38.jpg",
991
+ "image_caption": [],
992
+ "image_footnote": [],
993
+ "bbox": [
994
+ 498,
995
+ 345,
996
+ 532,
997
+ 371
998
+ ],
999
+ "page_idx": 5
1000
+ },
1001
+ {
1002
+ "type": "image",
1003
+ "img_path": "images/dd1b7f260e104c890c4981778aaffd6bafde44f876959dbd0ab306f273f20435.jpg",
1004
+ "image_caption": [],
1005
+ "image_footnote": [],
1006
+ "bbox": [
1007
+ 540,
1008
+ 345,
1009
+ 565,
1010
+ 371
1011
+ ],
1012
+ "page_idx": 5
1013
+ },
1014
+ {
1015
+ "type": "image",
1016
+ "img_path": "images/8ad4849b6cbffe582c7428a72dc1bd95fb5373d4d03042aff27f0730dead29fd.jpg",
1017
+ "image_caption": [],
1018
+ "image_footnote": [],
1019
+ "bbox": [
1020
+ 576,
1021
+ 345,
1022
+ 598,
1023
+ 371
1024
+ ],
1025
+ "page_idx": 5
1026
+ },
1027
+ {
1028
+ "type": "image",
1029
+ "img_path": "images/efa0eea06e79590fcff5fcf8a3bdf54ce0a1300dd0d4d5911e9bd67b0ad7f969.jpg",
1030
+ "image_caption": [],
1031
+ "image_footnote": [],
1032
+ "bbox": [
1033
+ 599,
1034
+ 345,
1035
+ 635,
1036
+ 371
1037
+ ],
1038
+ "page_idx": 5
1039
+ },
1040
+ {
1041
+ "type": "image",
1042
+ "img_path": "images/483992a030c1535dfc689611d904af091448071c30102a5ce73e23da73175446.jpg",
1043
+ "image_caption": [],
1044
+ "image_footnote": [],
1045
+ "bbox": [
1046
+ 638,
1047
+ 345,
1048
+ 665,
1049
+ 371
1050
+ ],
1051
+ "page_idx": 5
1052
+ },
1053
+ {
1054
+ "type": "image",
1055
+ "img_path": "images/93e9f6c9c61da5f6ffc4ae979dd64635c70f65b5c805c850863d29b083aa25d9.jpg",
1056
+ "image_caption": [],
1057
+ "image_footnote": [],
1058
+ "bbox": [
1059
+ 669,
1060
+ 345,
1061
+ 692,
1062
+ 371
1063
+ ],
1064
+ "page_idx": 5
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "MaskCLIP w/o RMA Baseline. Our second baseline is based on the Mask Class Tokens which doesn't use the Relative Mask Attention mechanism. Instead of masking the images and sending the resulting images directly to the CLIP model for feature extraction, we use Mask Class Tokens to acquire the corresponding partial/dense image features. The obtained image features will then be used for further open vocabulary classification.",
1069
+ "bbox": [
1070
+ 84,
1071
+ 450,
1072
+ 473,
1073
+ 571
1074
+ ],
1075
+ "page_idx": 5
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "The two baselines above don't need any training in the second stage and can be used to directly perform the open vocabulary tasks. We will demonstrate that the second baseline is better at feature extraction in both quantitative results and qualitative results under the open vocabulary setting and show the effectiveness and efficiency of the proposed Mask Class Tokens.",
1080
+ "bbox": [
1081
+ 84,
1082
+ 579,
1083
+ 475,
1084
+ 683
1085
+ ],
1086
+ "page_idx": 5
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "MaskCLIP. In our MaskCLIP method, we still use the CLIP ViT-L/14@336px pretrained model as with the previous two. This model has 24 attention layers and we add Relative Mask Attention in four of them which is 6, 12, 18, 24. We use AdamW (Loshchilov & Hutter, 2019) as our optimizer and the learning rate is set to 0.0001. We train our model on COCO training data for 10k iterations with a batch size of 8. The training takes around 3h on 8 Nvidia A5000 GPUs.",
1091
+ "bbox": [
1092
+ 84,
1093
+ 691,
1094
+ 473,
1095
+ 811
1096
+ ],
1097
+ "page_idx": 5
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Loss Function. The loss function is $\\mathcal{L} = \\lambda_{\\mathrm{ce}}\\mathcal{L}_{\\mathrm{ce}} + \\lambda_{\\mathrm{dice}}\\mathcal{L}_{\\mathrm{dice}} + \\lambda_{\\mathrm{bce}}\\mathcal{L}_{\\mathrm{bce}}$ where $\\mathcal{L}_{\\mathrm{ce}}$ is the loss for classification, $\\mathcal{L}_{\\mathrm{dice}}$ and $\\mathcal{L}_{\\mathrm{bce}}$ are the losses for mask localization. In our experiments, We set $\\lambda_{\\mathrm{ce}} = 2, \\lambda_{\\mathrm{dice}} = 5, \\lambda_{\\mathrm{bce}} = 5$ .",
1102
+ "bbox": [
1103
+ 84,
1104
+ 820,
1105
+ 473,
1106
+ 881
1107
+ ],
1108
+ "page_idx": 5
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "In the next three parts, we evaluate our methods on open vo",
1113
+ "bbox": [
1114
+ 84,
1115
+ 888,
1116
+ 475,
1117
+ 902
1118
+ ],
1119
+ "page_idx": 5
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "cabulary semantic, panoptic segmentation, and instance segmentation tasks. The class-agnostic mask proposal networks we use in those methods are trained using Mask2Former other than noted.",
1124
+ "bbox": [
1125
+ 496,
1126
+ 450,
1127
+ 885,
1128
+ 510
1129
+ ],
1130
+ "page_idx": 5
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "4.3. Open-Vocabulary Semantic Segmentation",
1135
+ "text_level": 1,
1136
+ "bbox": [
1137
+ 496,
1138
+ 527,
1139
+ 821,
1140
+ 542
1141
+ ],
1142
+ "page_idx": 5
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "First, we use our method to compare with open-vocabulary semantic segmentation as in Table 2. We train our method on the COCO dataset and evaluate on another four different datasets. On the four datasets we test, MaskCLIP outperforms the two baselines we described in the implementation details which demonstrates that our feature extraction method is better than the vanilla way in this setting. It extracts the features without the need to change the input and can simultaneously extract multiple mask area features easily. For 100 masks' feature extraction in a single image, the CLIP baseline takes $\\sim 3s$ on a single 3090 GPU while the MaskCLIP w/o RMA baseline only takes $\\sim 0.6s$ which is $\\sim 4x$ faster. Our MaskCLIP beats both baselines significantly as it utilizes accurate mask information and refines the masks during the feature extraction process. Furthermore, our proposed method also reaches state-of-the-art results on three of the benchmarks with only P-59 slightly lower than LSeg+(Li et al., 2022a).",
1147
+ "bbox": [
1148
+ 495,
1149
+ 551,
1150
+ 887,
1151
+ 821
1152
+ ],
1153
+ "page_idx": 5
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "To compare with previous methods, we also provide a semantic segmentation comparison in Figure 3. Results on ALIGN++ and OpenSeg are directly from (Ghiasi et al., 2022) and we run the same image using our MaskCLIP",
1158
+ "bbox": [
1159
+ 495,
1160
+ 830,
1161
+ 887,
1162
+ 891
1163
+ ],
1164
+ "page_idx": 5
1165
+ },
1166
+ {
1167
+ "type": "header",
1168
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1169
+ "bbox": [
1170
+ 277,
1171
+ 56,
1172
+ 694,
1173
+ 70
1174
+ ],
1175
+ "page_idx": 5
1176
+ },
1177
+ {
1178
+ "type": "page_number",
1179
+ "text": "6",
1180
+ "bbox": [
1181
+ 480,
1182
+ 922,
1183
+ 491,
1184
+ 934
1185
+ ],
1186
+ "page_idx": 5
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "model. It can be seen that due to the open vocabulary setting, some similar classes may be mistakenly classified e.g. all three methods predict the house in this image while the ground truth is building.",
1191
+ "bbox": [
1192
+ 84,
1193
+ 84,
1194
+ 475,
1195
+ 147
1196
+ ],
1197
+ "page_idx": 6
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "4.4. Open-Vocabulary Panoptic Segmentation",
1202
+ "text_level": 1,
1203
+ "bbox": [
1204
+ 84,
1205
+ 161,
1206
+ 406,
1207
+ 176
1208
+ ],
1209
+ "page_idx": 6
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Next, we compare our MaskCLIP with the two baselines on ADE20K validation set under the open vocabulary panoptic segmentation setting. The results are presented in Table 3. As can be seen from the table, the MaskCLIP w/o RMA baseline performs better on all the metrics in panoptic segmentation setting which further demonstrates our method's effectiveness.",
1214
+ "bbox": [
1215
+ 84,
1216
+ 185,
1217
+ 475,
1218
+ 290
1219
+ ],
1220
+ "page_idx": 6
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "We also show two sets of images to demonstrate our model capability. The first is the qualitative results on ADE20K. We compare our method with the two baselines in Figure 4. It can be seen that our method performs much better than the two baselines. The results from the first column show that due to the lack of global information, CLIP baseline fails to predict \"floor\". Instead, it predicts \"skyscraper\". While the MaskCLIP w/o RMA baseline and MaskCLIP model can predict the floor correctly as it does not lose the global context information.",
1225
+ "bbox": [
1226
+ 84,
1227
+ 297,
1228
+ 475,
1229
+ 449
1230
+ ],
1231
+ "page_idx": 6
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "The second set of images we're presenting is in Figure 5. These figures show our capability of specifying any arbitrary classes in performing panoptic segmentation task. The results show that though we train a new model based on the CLIP model without any distillation methods, we can still preserve the CLIP image features very well. Our model doesn't have a clear bias towards the base classes in the training set and could tell the difference very well that have no chance to learn in the COCO training: e.g toy vs real and filled vs empty.",
1236
+ "bbox": [
1237
+ 84,
1238
+ 457,
1239
+ 475,
1240
+ 609
1241
+ ],
1242
+ "page_idx": 6
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "4.5. Open-Vocabulary Instance Segmentation",
1247
+ "text_level": 1,
1248
+ "bbox": [
1249
+ 84,
1250
+ 625,
1251
+ 405,
1252
+ 641
1253
+ ],
1254
+ "page_idx": 6
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Cross-Dataset Setting. We present the results on open vocabulary instance segmentation in Table 4 under the cross-dataset setting. Since instance segmentation can be regarded as \"thing-only\" panoptic segmentation, we directly apply our model trained on COCO panoptic dataset to the instance segmentation task. MaskCLIP with different class-agnostic mask proposal networks performs better than CLIP Baseline and MaskCLIP w/o RMA in general.",
1259
+ "bbox": [
1260
+ 84,
1261
+ 648,
1262
+ 475,
1263
+ 770
1264
+ ],
1265
+ "page_idx": 6
1266
+ },
1267
+ {
1268
+ "type": "table",
1269
+ "img_path": "images/c8a98fa8ed0ad86200170c9284b25bb3b2fdcb01a3762ae66149e4807291fcda.jpg",
1270
+ "table_caption": [
1271
+ "Table 4: Results on open-vocabulary instance segmentation under the cross-dataset setting."
1272
+ ],
1273
+ "table_footnote": [],
1274
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">ADE20K</td><td colspan=\"3\">LVIS</td></tr><tr><td>AP↑</td><td>AP50↑</td><td>AP75↑</td><td>AP↑</td><td>AP50↑</td><td>AP75↑</td></tr><tr><td>CLIP Baseline</td><td>3.974</td><td>6.090</td><td>4.288</td><td>4.989</td><td>7.244</td><td>5.227</td></tr><tr><td>MaskCLIP w/o RMA</td><td>4.263</td><td>6.696</td><td>4.402</td><td>5.762</td><td>8.202</td><td>6.169</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>6.164</td><td>12.072</td><td>5.775</td><td>6.431</td><td>12.753</td><td>5.777</td></tr><tr><td>MaskCLIP</td><td>5.989</td><td>9.739</td><td>6.209</td><td>8.404</td><td>12.190</td><td>8.810</td></tr></table>",
1275
+ "bbox": [
1276
+ 89,
1277
+ 829,
1278
+ 485,
1279
+ 896
1280
+ ],
1281
+ "page_idx": 6
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "COCO Split Setting. Besides the cross-dataset setting, we also follow the COCO Split Setting in XPM(Huynh et al., 2022) to perform the instance segmentation in Table 5. On the generalized setting which is a more challenging setting, we outperform previous results in base, target, and all categories. In the constrained setting, we also show competitive results in both base and target categories.",
1286
+ "bbox": [
1287
+ 496,
1288
+ 84,
1289
+ 885,
1290
+ 191
1291
+ ],
1292
+ "page_idx": 6
1293
+ },
1294
+ {
1295
+ "type": "table",
1296
+ "img_path": "images/84197cf70f589b97081378c8d276f923efb42019d5d6b508293b50bd417f5fbe.jpg",
1297
+ "table_caption": [
1298
+ "Table 5: Results on open-vocabulary instance segmentation under the COCO split setting."
1299
+ ],
1300
+ "table_footnote": [],
1301
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"2\">Constrained</td><td colspan=\"3\">Generalized</td></tr><tr><td>Base</td><td>Target</td><td>Base</td><td>Target</td><td>All</td></tr><tr><td>Soft-Teacher(Xu et al., 2021)</td><td>41.8</td><td>14.8</td><td>41.5</td><td>9.6</td><td>33.2</td></tr><tr><td>Unbiased-Teacher(Liu et al., 2021)</td><td>41.8</td><td>15.1</td><td>41.4</td><td>9.8</td><td>33.1</td></tr><tr><td>XPM(Huynh et al., 2022)</td><td>42.4</td><td>24.0</td><td>41.5</td><td>21.6</td><td>36.3</td></tr><tr><td>MaskCLIP</td><td>42.8</td><td>23.2</td><td>42.6</td><td>21.7</td><td>37.2</td></tr></table>",
1302
+ "bbox": [
1303
+ 501,
1304
+ 246,
1305
+ 895,
1306
+ 319
1307
+ ],
1308
+ "page_idx": 6
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "4.6. Efficiency Analysis",
1313
+ "text_level": 1,
1314
+ "bbox": [
1315
+ 496,
1316
+ 352,
1317
+ 663,
1318
+ 367
1319
+ ],
1320
+ "page_idx": 6
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "We further provide efficiency analysis in Table 6 to demonstrate the efficiency of our feature extraction method. Previous methods usually perform a crop/mask operation on the input images and send the resulted images to CLIP to obtain the partial/dense features for classification which is rather slow. In contrast, our proposed method employs Mask Class Tokens to obtain the partial/dense features for classification. By doing so, our method can extract partial/dense features more efficiently (instead of running CLIP $N$ times, our method only requires running CLIP one time with $N$ more Mask Class Tokens) and is also aware of the global context information.",
1325
+ "bbox": [
1326
+ 495,
1327
+ 375,
1328
+ 887,
1329
+ 556
1330
+ ],
1331
+ "page_idx": 6
1332
+ },
1333
+ {
1334
+ "type": "table",
1335
+ "img_path": "images/2c03722ab25b11eb0c654872d135265281e81a60c83e6a3c1fcce0ba90482d8c.jpg",
1336
+ "table_caption": [
1337
+ "Table 6: FLOPs Comparison. We use the CLIP ViT-L/14 model in all methods for fair comparison and 640x640 as the input resolution."
1338
+ ],
1339
+ "table_footnote": [],
1340
+ "table_body": "<table><tr><td>Method</td><td>TFLOPs</td></tr><tr><td>RegionCLIP(Zhong et al., 2022)</td><td>9.5</td></tr><tr><td>ZegFormer(Ding et al., 2022)</td><td>10.3</td></tr><tr><td>SimSeg(Xu et al., 2022)</td><td>9.6</td></tr><tr><td>CLIP Baseline</td><td>10.5</td></tr><tr><td>MaskCLIP(Ours)</td><td>0.3</td></tr></table>",
1341
+ "bbox": [
1342
+ 535,
1343
+ 627,
1344
+ 849,
1345
+ 722
1346
+ ],
1347
+ "page_idx": 6
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "5. Ablation Study",
1352
+ "text_level": 1,
1353
+ "bbox": [
1354
+ 496,
1355
+ 750,
1356
+ 648,
1357
+ 767
1358
+ ],
1359
+ "page_idx": 6
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "text": "5.1. Incorporating GT Masks.",
1364
+ "text_level": 1,
1365
+ "bbox": [
1366
+ 496,
1367
+ 776,
1368
+ 710,
1369
+ 791
1370
+ ],
1371
+ "page_idx": 6
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Since our model can decouple the mask proposal process and the classification process, we could also use the ground truth mask proposals which can be regarded as a \"perfect\" mask proposal network in our method. In this way, we can eliminate the effects of the quality of the mask proposals and inspect the method's classification capabilities. In Table 7. We can see that the performance could gain a lot from",
1376
+ "bbox": [
1377
+ 495,
1378
+ 799,
1379
+ 885,
1380
+ 905
1381
+ ],
1382
+ "page_idx": 6
1383
+ },
1384
+ {
1385
+ "type": "header",
1386
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1387
+ "bbox": [
1388
+ 277,
1389
+ 56,
1390
+ 694,
1391
+ 70
1392
+ ],
1393
+ "page_idx": 6
1394
+ },
1395
+ {
1396
+ "type": "page_number",
1397
+ "text": "7",
1398
+ "bbox": [
1399
+ 480,
1400
+ 922,
1401
+ 491,
1402
+ 934
1403
+ ],
1404
+ "page_idx": 6
1405
+ },
1406
+ {
1407
+ "type": "table",
1408
+ "img_path": "images/53ea5b325277557be1e06d137b943d66b2b51d12d3b7430d914f2325e4c5346d.jpg",
1409
+ "table_caption": [
1410
+ "Table 3: Results on open-vocabulary panoptic segmentation using the ADE20k validation dataset. th and st represent thing and stuff classes respectively."
1411
+ ],
1412
+ "table_footnote": [],
1413
+ "table_body": "<table><tr><td>Method</td><td>PQ↑</td><td>PQth↑</td><td>PQst↑</td><td>SQ↑</td><td>SQth↑</td><td>SQst↑</td><td>RQ↑</td><td>RQth↑</td><td>RQst↑</td></tr><tr><td>CLIP Baseline</td><td>8.207</td><td>8.473</td><td>7.675</td><td>53.124</td><td>52.661</td><td>54.048</td><td>10.534</td><td>10.883</td><td>9.835</td></tr><tr><td>MaskCLIP w/o RMA</td><td>9.565</td><td>8.922</td><td>10.852</td><td>62.507</td><td>62.268</td><td>62.985</td><td>12.645</td><td>11.758</td><td>14.418</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>12.860</td><td>11.242</td><td>16.095</td><td>64.008</td><td>64.183</td><td>63.658</td><td>16.803</td><td>14.968</td><td>20.473</td></tr><tr><td>MaskCLIP</td><td>15.121</td><td>13.536</td><td>18.290</td><td>70.479</td><td>70.021</td><td>71.396</td><td>19.211</td><td>17.448</td><td>22.737</td></tr></table>",
1414
+ "bbox": [
1415
+ 99,
1416
+ 162,
1417
+ 874,
1418
+ 244
1419
+ ],
1420
+ "page_idx": 7
1421
+ },
1422
+ {
1423
+ "type": "image",
1424
+ "img_path": "images/94e904b07ab550fd3283436e7a7c626980d0f7244f46fb68ecf17cafc4c57ad4.jpg",
1425
+ "image_caption": [
1426
+ "Figure 4: Qualitative results on ADE20K panoptic segmentation. The images are taken from the ADE20K validation set. We use the class names directly from the ADE20K 150 classes as the text inputs. Three images are presented here using our MaskCLIP model along with the two baselines."
1427
+ ],
1428
+ "image_footnote": [],
1429
+ "bbox": [
1430
+ 155,
1431
+ 343,
1432
+ 815,
1433
+ 813
1434
+ ],
1435
+ "page_idx": 7
1436
+ },
1437
+ {
1438
+ "type": "header",
1439
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1440
+ "bbox": [
1441
+ 277,
1442
+ 56,
1443
+ 694,
1444
+ 70
1445
+ ],
1446
+ "page_idx": 7
1447
+ },
1448
+ {
1449
+ "type": "page_number",
1450
+ "text": "8",
1451
+ "bbox": [
1452
+ 480,
1453
+ 922,
1454
+ 491,
1455
+ 934
1456
+ ],
1457
+ "page_idx": 7
1458
+ },
1459
+ {
1460
+ "type": "image",
1461
+ "img_path": "images/7ae36b8e007fce2037b2646f0adcf66c09db5312539d4eeb4a36e47551315f61.jpg",
1462
+ "image_caption": [],
1463
+ "image_footnote": [],
1464
+ "bbox": [
1465
+ 148,
1466
+ 82,
1467
+ 382,
1468
+ 202
1469
+ ],
1470
+ "page_idx": 8
1471
+ },
1472
+ {
1473
+ "type": "image",
1474
+ "img_path": "images/3e24ef10fa137bf492738c9d2b48c31637db6a647aaa4286b6ceab3baa85ee01.jpg",
1475
+ "image_caption": [
1476
+ "(a) \"toy rabbit\", \"real rabbit\", \"background\""
1477
+ ],
1478
+ "image_footnote": [],
1479
+ "bbox": [
1480
+ 148,
1481
+ 203,
1482
+ 380,
1483
+ 321
1484
+ ],
1485
+ "page_idx": 8
1486
+ },
1487
+ {
1488
+ "type": "image",
1489
+ "img_path": "images/d154d6e47a4771469fe893d4a1861ab16bdc4d4323da07cd66eca69bc94988e1.jpg",
1490
+ "image_caption": [],
1491
+ "image_footnote": [],
1492
+ "bbox": [
1493
+ 392,
1494
+ 82,
1495
+ 620,
1496
+ 202
1497
+ ],
1498
+ "page_idx": 8
1499
+ },
1500
+ {
1501
+ "type": "image",
1502
+ "img_path": "images/dcd7161b20777dc6238be285df87f1da5d511bb57e3cb5fa2759f259beb2fd85.jpg",
1503
+ "image_caption": [
1504
+ "(b) \"horse\", \"donkey\", \"sky\", \"grass\""
1505
+ ],
1506
+ "image_footnote": [],
1507
+ "bbox": [
1508
+ 392,
1509
+ 203,
1510
+ 620,
1511
+ 321
1512
+ ],
1513
+ "page_idx": 8
1514
+ },
1515
+ {
1516
+ "type": "image",
1517
+ "img_path": "images/9d7f212f6f7554cf163ef5c95c91fd8a0eeca9424d7b68bed7aed72d33062b87.jpg",
1518
+ "image_caption": [],
1519
+ "image_footnote": [],
1520
+ "bbox": [
1521
+ 620,
1522
+ 82,
1523
+ 823,
1524
+ 202
1525
+ ],
1526
+ "page_idx": 8
1527
+ },
1528
+ {
1529
+ "type": "image",
1530
+ "img_path": "images/253ac1ab7c12fc2f597109a06014acb4dc3f01961a35c70930a2447c91dee78c.jpg",
1531
+ "image_caption": [
1532
+ "(c) \"empty bottle\", \"filled bottle\", \"door\", \"wall\", \"ground\"",
1533
+ "Figure 5: User-specified class panoptic segmentation. The labels above are the text inputs we used for testing the images. Texts in bold are novel classes i.e. don't exist in the labels of COCO training data. (a) Our model is able to distinguish object properties of real rabbit and toy rabbit. (b) This example shows that our model is potential for fine-grained classifications and does not have bias toward the base classes. (c) Our results show that it can tell the difference between the filled status and empty status of bottles."
1534
+ ],
1535
+ "image_footnote": [],
1536
+ "bbox": [
1537
+ 620,
1538
+ 203,
1539
+ 823,
1540
+ 321
1541
+ ],
1542
+ "page_idx": 8
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "the \"perfect\" mask proposals. And our MaskCLIP method also outperforms OpenSeg in this setting.",
1547
+ "bbox": [
1548
+ 84,
1549
+ 450,
1550
+ 473,
1551
+ 482
1552
+ ],
1553
+ "page_idx": 8
1554
+ },
1555
+ {
1556
+ "type": "table",
1557
+ "img_path": "images/af2255850b09064e9611cc1908424098173991e8b5919a88e87baa997e260102.jpg",
1558
+ "table_caption": [
1559
+ "Table 7: Incorporating GT Masks. Results on using GT masks as mask proposals for open-vocabulary panoptic segmentation and semantic segmentation."
1560
+ ],
1561
+ "table_footnote": [],
1562
+ "table_body": "<table><tr><td></td><td>PQ↑</td><td>mIoU ↑</td></tr><tr><td>OpenSeg (Ghiasi et al., 2022)</td><td>-</td><td>21.1</td></tr><tr><td>MaskCLIP</td><td>15.1</td><td>23.7</td></tr><tr><td>OpenSeg + GT masks (Ghiasi et al., 2022)</td><td>-</td><td>27.5</td></tr><tr><td>MaskCLIP + GT masks</td><td>35.8</td><td>31.7</td></tr></table>",
1563
+ "bbox": [
1564
+ 89,
1565
+ 555,
1566
+ 473,
1567
+ 628
1568
+ ],
1569
+ "page_idx": 8
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "5.2. Mask Refinement.",
1574
+ "text_level": 1,
1575
+ "bbox": [
1576
+ 84,
1577
+ 655,
1578
+ 246,
1579
+ 669
1580
+ ],
1581
+ "page_idx": 8
1582
+ },
1583
+ {
1584
+ "type": "text",
1585
+ "text": "In our Relative Mask Attention part, the attention layer will use the accurate mask information to learn a better attention matrix and the mask will also use the attention information to gradually refine itself. In this ablation study, we only let the attention matrix learn from the mask without any mask refinement. And we get the results in Table 8. Since the SQ reflects the segmentation quality, we care more about SQ here. It can be seen that MaskCLIP performs slightly better than that without the mask refinement which demonstrates the effectiveness of the mask refinement.",
1586
+ "bbox": [
1587
+ 84,
1588
+ 679,
1589
+ 473,
1590
+ 829
1591
+ ],
1592
+ "page_idx": 8
1593
+ },
1594
+ {
1595
+ "type": "text",
1596
+ "text": "6. Conclusion",
1597
+ "text_level": 1,
1598
+ "bbox": [
1599
+ 84,
1600
+ 849,
1601
+ 205,
1602
+ 864
1603
+ ],
1604
+ "page_idx": 8
1605
+ },
1606
+ {
1607
+ "type": "text",
1608
+ "text": "In this paper, we have presented a new algorithm, MaskCLIP, to tackle an emerging computer vision task, open-vocabulary",
1609
+ "bbox": [
1610
+ 84,
1611
+ 875,
1612
+ 475,
1613
+ 906
1614
+ ],
1615
+ "page_idx": 8
1616
+ },
1617
+ {
1618
+ "type": "table",
1619
+ "img_path": "images/fe921fff4677c90bd6d09de27c469bb4e0d83e8658284cf7a35d58a2f1df2ef4.jpg",
1620
+ "table_caption": [
1621
+ "Table 8: Ablation Study on Mask Refinement. Results on ADE20K validation set are reported here. Both methods are trained on COCO and tested on ADE20K validation dataset. MR refers to mask refinement."
1622
+ ],
1623
+ "table_footnote": [],
1624
+ "table_body": "<table><tr><td></td><td>PQ↑</td><td>PQTh↑</td><td>PQSt↑</td><td>SQ↑</td><td>SQUth↑</td><td>SQSt↑</td></tr><tr><td>MaskCLIP w/o MR</td><td>13.624</td><td>13.253</td><td>14.368</td><td>66.361</td><td>67.715</td><td>63.653</td></tr><tr><td>MaskCLIP</td><td>15.121</td><td>13.536</td><td>18.290</td><td>70.479</td><td>70.021</td><td>71.396</td></tr></table>",
1625
+ "bbox": [
1626
+ 501,
1627
+ 521,
1628
+ 890,
1629
+ 559
1630
+ ],
1631
+ "page_idx": 8
1632
+ },
1633
+ {
1634
+ "type": "text",
1635
+ "text": "universal image segmentation. MaskCLIP is a Transformer-based approach using mask queries with the ViT-based CLIP backbone to efficiently and effectively utilize pre-trained partial/dense CLIP features. MaskCLIP consists of a Relative Mask Attention (RMA) module that is seamlessly integrated with a pre-trained CLIP. MaskCLIP is distinct compared with prior approaches in open-vocabulary semantic segmentation/object detection by building an integrated encoder module for segmentation mask refinement and image feature extraction with a pre-trained CLIP image model. Encouraging experimental results on open-vocabulary semantic/instance/panoptic segmentation have been obtained.",
1636
+ "bbox": [
1637
+ 496,
1638
+ 597,
1639
+ 888,
1640
+ 779
1641
+ ],
1642
+ "page_idx": 8
1643
+ },
1644
+ {
1645
+ "type": "text",
1646
+ "text": "Acknowledgement This work is supported by NSF Award IIS-2127544. We thank Xiang Zhang and Boyi Li for helpful discussions.",
1647
+ "bbox": [
1648
+ 496,
1649
+ 786,
1650
+ 887,
1651
+ 830
1652
+ ],
1653
+ "page_idx": 8
1654
+ },
1655
+ {
1656
+ "type": "text",
1657
+ "text": "References",
1658
+ "text_level": 1,
1659
+ "bbox": [
1660
+ 498,
1661
+ 849,
1662
+ 594,
1663
+ 866
1664
+ ],
1665
+ "page_idx": 8
1666
+ },
1667
+ {
1668
+ "type": "text",
1669
+ "text": "Bendale, A. and Boult, T. Towards open world recognition. In CVPR, 2015.",
1670
+ "bbox": [
1671
+ 496,
1672
+ 875,
1673
+ 887,
1674
+ 904
1675
+ ],
1676
+ "page_idx": 8
1677
+ },
1678
+ {
1679
+ "type": "header",
1680
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1681
+ "bbox": [
1682
+ 277,
1683
+ 56,
1684
+ 694,
1685
+ 70
1686
+ ],
1687
+ "page_idx": 8
1688
+ },
1689
+ {
1690
+ "type": "page_number",
1691
+ "text": "9",
1692
+ "bbox": [
1693
+ 480,
1694
+ 922,
1695
+ 491,
1696
+ 934
1697
+ ],
1698
+ "page_idx": 8
1699
+ },
1700
+ {
1701
+ "type": "list",
1702
+ "sub_type": "ref_text",
1703
+ "list_items": [
1704
+ "Cai, Z., Kwon, G., Ravichandran, A., Bas, E., Tu, Z., Bhotika, R., and Soatto, S. X-detr: A versatile architecture for instance-wise vision-language tasks. arXiv preprint arXiv:2204.05626, 2022.",
1705
+ "Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., and Zagoruyko, S. End-to-end object detection with transformers. In ECCV, pp. 213-229, 2020.",
1706
+ "Cheng, B., Schwing, A., and Kirillov, A. Per-pixel classification is not all you need for semantic segmentation. Advances in Neural Information Processing Systems, 34, 2021.",
1707
+ "Cheng, B., Misra, I., Schwing, A. G., Kirillov, A., and Girdhar, R. Masked-attention mask transformer for universal image segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1290–1299, June 2022.",
1708
+ "Ding, J., Xue, N., Xia, G.-S., and Dai, D. Decoupling zero-shot semantic segmentation. 2022.",
1709
+ "Everingham, M., Van Gool, L., Williams, C. K. I., Winn, J., and Zisserman, A. The PASCAL Visual Object Classes Challenge 2010 (VOC2010) Results. http://www.pascalnetwork.org/challenges/VOC/voc2010/workshop/index.html.",
1710
+ "Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Scaling open-vocabulary image segmentation with image-level labels. In ECCV, 2022.",
1711
+ "Gu, X., Lin, T.-Y., Kuo, W., and Cui, Y. Open-vocabulary object detection via vision and language knowledge distillation. In ICLR, 2022.",
1712
+ "Gupta, A., Dollar, P., and Girshick, R. Lvis: A dataset for large vocabulary instance segmentation. In CVPR, pp. 5356-5364, 2019.",
1713
+ "He, K., Gkioxari, G., Dollar, P., and Girshick, R. Mask r-cnn. In ICCV, pp. 2961-2969, 2017.",
1714
+ "Hinami, R. and Satoh, S. Discriminative learning of open-vocabulary object retrieval and localization by negative phrase augmentation. In EMNLP, 2018.",
1715
+ "Huynh, D., Kuen, J., Lin, Z., Gu, J., and Elhamifar, E. Open-vocabulary instance segmentation via robust cross-modal pseudo-labeling. In CVPR, 2022.",
1716
+ "Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q., Sung, Y.-H., Li, Z., and Duerig, T. Scaling up visual and vision-language representation learning with noisy text supervision. In International Conference on Machine Learning, pp. 4904-4916, 2021."
1717
+ ],
1718
+ "bbox": [
1719
+ 86,
1720
+ 84,
1721
+ 496,
1722
+ 905
1723
+ ],
1724
+ "page_idx": 9
1725
+ },
1726
+ {
1727
+ "type": "list",
1728
+ "sub_type": "ref_text",
1729
+ "list_items": [
1730
+ "Kamath, A., Singh, M., LeCun, Y., Synnaeve, G., Misra, I., and Carion, N. Mdetr-modulated detection for end-to-end multi-modal understanding. In CVPR, pp. 1780-1790, 2021.",
1731
+ "Kirillov, A., Girshick, R., He, K., and Dólar, P. Panoptic feature pyramid networks. In CVPR, 2019a.",
1732
+ "Kirillov, A., He, K., Girshick, R., Rother, C., and Dólar, P. Panoptic segmentation. In CVPR, 2019b.",
1733
+ "Lazarow, J., Lee, K., Shi, K., and Tu, Z. Learning instance occlusion for panoptic segmentation. In CVPR, 2020.",
1734
+ "Li, B., Weinberger, K. Q., Belongie, S., Koltun, V., and Ranftl, R. Language-driven semantic segmentation. In ICLR, 2022a.",
1735
+ "Li, L. H., Zhang, P., Zhang, H., Yang, J., Li, C., Zhong, Y., Wang, L., Yuan, L., Zhang, L., Hwang, J.-N., Chang, K.-W., and Gao, J. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10965-10975, June 2022b.",
1736
+ "Li, Y., Chen, X., Zhu, Z., Xie, L., Huang, G., Du, D., and Wang, X. Attention-guided unified network for panoptic segmentation. In CVPR, 2019.",
1737
+ "Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., and Zitnick, C. L. Microsoft coco: Common objects in context. In ECCV, pp. 740-755, 2014.",
1738
+ "Liu, Y.-C., Ma, C.-Y., He, Z., Kuo, C.-W., Chen, K., Zhang, P., Wu, B., Kira, Z., and Vajda, P. Unbiased teacher for semi-supervised object detection. arXiv preprint arXiv:2102.09480, 2021.",
1739
+ "Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In *ICLR*, 2019.",
1740
+ "Luo, H., Ji, L., Zhong, M., Chen, Y., Lei, W., Duan, N., and Li, T. Clip4clip: An empirical study of clip for end to end video clip retrieval. arXiv preprint arXiv:2104.08860, 2021.",
1741
+ "Mottaghi, R., Chen, X., Liu, X., Cho, N.-G., Lee, S.-W., Fidler, S., Urtasun, R., and Yuille, A. The role of context for object detection and semantic segmentation in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014.",
1742
+ "Patashnik, O., Wu, Z., Shechtman, E., Cohen-Or, D., and Lischinski, D. Styleclip: Text-driven manipulation of stylegan imagery. In CVPR, pp. 2085–2094, 2021."
1743
+ ],
1744
+ "bbox": [
1745
+ 500,
1746
+ 84,
1747
+ 885,
1748
+ 905
1749
+ ],
1750
+ "page_idx": 9
1751
+ },
1752
+ {
1753
+ "type": "header",
1754
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1755
+ "bbox": [
1756
+ 277,
1757
+ 56,
1758
+ 694,
1759
+ 71
1760
+ ],
1761
+ "page_idx": 9
1762
+ },
1763
+ {
1764
+ "type": "page_number",
1765
+ "text": "10",
1766
+ "bbox": [
1767
+ 477,
1768
+ 922,
1769
+ 495,
1770
+ 934
1771
+ ],
1772
+ "page_idx": 9
1773
+ },
1774
+ {
1775
+ "type": "list",
1776
+ "sub_type": "ref_text",
1777
+ "list_items": [
1778
+ "Qi, L., Kuen, J., Wang, Y., Gu, J., Zhao, H., Torr, P., Lin, Z., and Jia, J. Open world entity segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.",
1779
+ "Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pp. 8748-8763, 2021.",
1780
+ "Rao, Y., Zhao, W., Chen, G., Tang, Y., Zhu, Z., Huang, G., Zhou, J., and Lu, J. Denseclip: Language-guided dense prediction with context-aware prompting. In CVPR, 2022.",
1781
+ "Shen, S., Li, L. H., Tan, H., Bansal, M., Rohrbach, A., Chang, K.-W., Yao, Z., and Keutzer, K. How much can clip benefit vision-and-language tasks? In ICLR, 2022.",
1782
+ "Tu, Z. Auto-context and its application to high-level vision tasks. In CVPR, 2008.",
1783
+ "Tu, Z., Chen, X., Yuille, A. L., and Zhu, S.-C. Image parsing: Unifying segmentation, detection, and recognition. International Journal of computer vision, 63(2):113-140, 2005.",
1784
+ "Wang, Z., Codella, N., Chen, Y.-C., Zhou, L., Yang, J., Dai, X., Xiao, B., You, H., Chang, S.-F., and Yuan, L. Clip-td: Clip targeted distillation for vision-language tasks. arXiv preprint arXiv:2201.05729, 2022.",
1785
+ "Xiong, Y., Liao, R., Zhao, H., Hu, R., Bai, M., Yumer, E., and Urtasun, R. Upsnet: A unified panoptic segmentation network. In CVPR, 2019.",
1786
+ "Xu, M., Zhang, Z., Hu, H., Wang, J., Wang, L., Wei, F., Bai, X., and Liu, Z. End-to-end semi-supervised object detection with soft teacher. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3060-3069, 2021.",
1787
+ "Xu, M., Zhang, Z., Wei, F., Lin, Y., Cao, Y., Hu, H., and Bai, X. A simple baseline for open-vocabulary semantic segmentation with pre-trained vision-language model. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XXIX, pp. 736-753. Springer, 2022.",
1788
+ "Zang, Y., Li, W., Zhou, K., Huang, C., and Loy, C. C. Open-vocabulary detr with conditional matching. arXiv:2203.11876, 2022.",
1789
+ "Zareian, A., Rosa, K. D., Hu, D. H., and Chang, S.-F. Open-vocabulary object detection using captions. In CVPR, pp. 14393-14402, 2021."
1790
+ ],
1791
+ "bbox": [
1792
+ 86,
1793
+ 84,
1794
+ 475,
1795
+ 904
1796
+ ],
1797
+ "page_idx": 10
1798
+ },
1799
+ {
1800
+ "type": "list",
1801
+ "sub_type": "ref_text",
1802
+ "list_items": [
1803
+ "Zhong, Y., Yang, J., Zhang, P., Li, C., Codella, N., Li, L. H., Zhou, L., Dai, X., Yuan, L., Li, Y., and Gao, J. Regionclip: Region-based language-image pretraining. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 16793-16803, June 2022.",
1804
+ "Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., and Torralba, A. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 633-641, 2017.",
1805
+ "Zhou, B., Zhao, H., Puig, X., Xiao, T., Fidler, S., Barriuso, A., and Torralba, A. Semantic understanding of scenes through the ade20k dataset. International Journal of Computer Vision, 127(3):302-321, 2019.",
1806
+ "Zhou, C., Loy, C. C., and Dai, B. Extract free dense labels from clip. In ECCV, 2022."
1807
+ ],
1808
+ "bbox": [
1809
+ 500,
1810
+ 84,
1811
+ 885,
1812
+ 356
1813
+ ],
1814
+ "page_idx": 10
1815
+ },
1816
+ {
1817
+ "type": "header",
1818
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1819
+ "bbox": [
1820
+ 277,
1821
+ 56,
1822
+ 694,
1823
+ 71
1824
+ ],
1825
+ "page_idx": 10
1826
+ },
1827
+ {
1828
+ "type": "page_number",
1829
+ "text": "11",
1830
+ "bbox": [
1831
+ 477,
1832
+ 922,
1833
+ 493,
1834
+ 934
1835
+ ],
1836
+ "page_idx": 10
1837
+ },
1838
+ {
1839
+ "type": "text",
1840
+ "text": "A. CLIP Baseline Details",
1841
+ "text_level": 1,
1842
+ "bbox": [
1843
+ 84,
1844
+ 83,
1845
+ 299,
1846
+ 99
1847
+ ],
1848
+ "page_idx": 11
1849
+ },
1850
+ {
1851
+ "type": "text",
1852
+ "text": "Here we provide more details on our CLIP Baseline. Given an RGB image $\\mathcal{I} \\in \\mathbb{R}^{H \\times W \\times 3}$ with height $H$ and width $W$ and a list of category names with $C$ classes, we precompute the text embedding of the category names as $\\mathcal{E} \\in \\mathbb{R}^{C \\times D}$ . The mask proposal network $f_{m}$ outputs $N$ masks $\\mathcal{M} \\in \\mathbb{R}^{N \\times H \\times W}$ . For each mask: the cropped image region is the element-wise product between the binary mask $\\mathcal{M}_{i}$ and the image $\\mathcal{I}$ , i.e. $\\mathcal{R}_{i} \\in \\mathbb{R}^{H \\times W \\times 3}$ ; the visual embedding $\\mathcal{V}_{i} \\in \\mathbb{R}^{D}$ of the cropped region is computed by the visual encoder where $D$ is the hidden dimension; the final classification score $\\mathcal{V}_{i} \\in \\mathbb{R}^{C}$ is the softmax over the dot product between the visual embedding $\\mathcal{V}_{i}$ and the text embedding $\\mathcal{T}$ . A formal algorithm is described as 1 and a visualization of this is shown as 6.",
1853
+ "bbox": [
1854
+ 84,
1855
+ 108,
1856
+ 887,
1857
+ 214
1858
+ ],
1859
+ "page_idx": 11
1860
+ },
1861
+ {
1862
+ "type": "code",
1863
+ "sub_type": "algorithm",
1864
+ "code_caption": [
1865
+ "Algorithm 1 CLIP Baseline"
1866
+ ],
1867
+ "code_body": "Require: Mask proposal network $f_{m}$ , CLIP visual encoder $f_{v}$ , CLIP text encoder $f_{t}$ Given an image $\\mathcal{I}\\in \\mathbb{R}^{H\\times W\\times 3}$ and a list $\\mathcal{T}$ containing $C$ category names. $\\mathcal{E} = f_t(\\mathcal{T})$ $\\mathcal{M} = f_m(\\mathcal{I})$ \nfor $t = 1,2,\\ldots ,N$ do \n $\\mathcal{R}_i = \\mathcal{M}_i\\odot \\mathcal{I}$ $\\mathcal{V}_i = f_v(\\mathcal{R}_i)$ $\\mathcal{Y}_i = \\mathrm{softmax}(\\mathcal{E}\\otimes \\mathcal{V}_i)$ \nend for",
1868
+ "bbox": [
1869
+ 86,
1870
+ 248,
1871
+ 650,
1872
+ 385
1873
+ ],
1874
+ "page_idx": 11
1875
+ },
1876
+ {
1877
+ "type": "image",
1878
+ "img_path": "images/d56a5edb0cafc2a66d0b192dec853c3427882c5bdffe4452cf10002ca17d571c.jpg",
1879
+ "image_caption": [
1880
+ "Figure 6: Illustration of the CLIP baseline."
1881
+ ],
1882
+ "image_footnote": [],
1883
+ "bbox": [
1884
+ 264,
1885
+ 419,
1886
+ 715,
1887
+ 542
1888
+ ],
1889
+ "page_idx": 11
1890
+ },
1891
+ {
1892
+ "type": "text",
1893
+ "text": "B. Ablation on using Relative Mask Attention in Different Layers",
1894
+ "text_level": 1,
1895
+ "bbox": [
1896
+ 84,
1897
+ 619,
1898
+ 635,
1899
+ 637
1900
+ ],
1901
+ "page_idx": 11
1902
+ },
1903
+ {
1904
+ "type": "text",
1905
+ "text": "In this part we conduct an ablation study on using different layers for relative mask attention. Since our pretrained CLIP model is fixed during the whole training procedure, whether each layer would help the final results remains a question. We use four different kinds of layers combination of the layers in this part and provide the results in Table 9. We can see that the last layer is a key part of our results since the features are gradually learned through all the attention layer. Though the last four layers' features should the best, the performance wouldn't be better if Relative Mask Attention is only used in the last four layers. This is also reasonable since the network should not have the accurate mask information too late.",
1906
+ "bbox": [
1907
+ 84,
1908
+ 645,
1909
+ 887,
1910
+ 736
1911
+ ],
1912
+ "page_idx": 11
1913
+ },
1914
+ {
1915
+ "type": "table",
1916
+ "img_path": "images/6ec8ea39b64f39005e81832b77ceec1016b692f729d0d056d921f54ab10cb8e8.jpg",
1917
+ "table_caption": [
1918
+ "Table 9: Ablation Study on Relative Mask Attention Layers in different layers. All the methods are trained on COCO and tested on ADE20K validation dataset. The pretrained CLIP ViT-L/14@336px model has 24 layers and we replace four of them with our relative mask attention to fully utilize the accurate mask information and refine the masks."
1919
+ ],
1920
+ "table_footnote": [],
1921
+ "table_body": "<table><tr><td>Different Layers</td><td>PQ</td><td>PQTh</td><td>PQS</td></tr><tr><td>1, 7, 13, 19</td><td>11.241</td><td>10.519</td><td>12.686</td></tr><tr><td>3, 9, 15, 21</td><td>11.372</td><td>10.141</td><td>13.835</td></tr><tr><td>21, 22, 23, 24</td><td>14.673</td><td>14.048</td><td>15.922</td></tr><tr><td>6, 12, 18, 24</td><td>15.121</td><td>13.536</td><td>18.290</td></tr></table>",
1922
+ "bbox": [
1923
+ 323,
1924
+ 806,
1925
+ 648,
1926
+ 887
1927
+ ],
1928
+ "page_idx": 11
1929
+ },
1930
+ {
1931
+ "type": "header",
1932
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
1933
+ "bbox": [
1934
+ 277,
1935
+ 56,
1936
+ 694,
1937
+ 70
1938
+ ],
1939
+ "page_idx": 11
1940
+ },
1941
+ {
1942
+ "type": "page_number",
1943
+ "text": "12",
1944
+ "bbox": [
1945
+ 477,
1946
+ 922,
1947
+ 495,
1948
+ 934
1949
+ ],
1950
+ "page_idx": 11
1951
+ },
1952
+ {
1953
+ "type": "text",
1954
+ "text": "C. More Visualization Results on Arbitrary Categories",
1955
+ "text_level": 1,
1956
+ "bbox": [
1957
+ 84,
1958
+ 83,
1959
+ 547,
1960
+ 101
1961
+ ],
1962
+ "page_idx": 12
1963
+ },
1964
+ {
1965
+ "type": "text",
1966
+ "text": "In this part, we provide more visualization results on user-specified class discoveries in Figure 7. We select some very close text prompts such as \"four-leg animal\" and \"two-leg animal\"; \"car\", \"truck\" and \"SUV\" and find that our method can still classify them. We also show another result which is \"person identification\" in Figure 7 (c) which shows our model preserve the dense/local CLIP features rather well.",
1967
+ "bbox": [
1968
+ 84,
1969
+ 109,
1970
+ 887,
1971
+ 169
1972
+ ],
1973
+ "page_idx": 12
1974
+ },
1975
+ {
1976
+ "type": "image",
1977
+ "img_path": "images/d704654c7285c2a9de083c8b582fee717bb0caf0cca18c5855e89f57f0cce8fc.jpg",
1978
+ "image_caption": [],
1979
+ "image_footnote": [],
1980
+ "bbox": [
1981
+ 98,
1982
+ 179,
1983
+ 336,
1984
+ 306
1985
+ ],
1986
+ "page_idx": 12
1987
+ },
1988
+ {
1989
+ "type": "image",
1990
+ "img_path": "images/6575c85b38abf4a7d6377d30d6028e557987aefaad89c3689a7545063e15e546.jpg",
1991
+ "image_caption": [],
1992
+ "image_footnote": [],
1993
+ "bbox": [
1994
+ 344,
1995
+ 179,
1996
+ 630,
1997
+ 305
1998
+ ],
1999
+ "page_idx": 12
2000
+ },
2001
+ {
2002
+ "type": "image",
2003
+ "img_path": "images/8fdebb4ef8829e435b3c997666d3beeb8494e191cd0643fc146dd20b183855da.jpg",
2004
+ "image_caption": [],
2005
+ "image_footnote": [],
2006
+ "bbox": [
2007
+ 630,
2008
+ 179,
2009
+ 872,
2010
+ 305
2011
+ ],
2012
+ "page_idx": 12
2013
+ },
2014
+ {
2015
+ "type": "image",
2016
+ "img_path": "images/b2f13d000ad430eb2eca53cc2bf9cb9150a9a1f87c68f22a931ecc85662977d6.jpg",
2017
+ "image_caption": [
2018
+ "(a) \"four-leg animal\", \"two-leg animal\", \"background\""
2019
+ ],
2020
+ "image_footnote": [],
2021
+ "bbox": [
2022
+ 98,
2023
+ 306,
2024
+ 336,
2025
+ 431
2026
+ ],
2027
+ "page_idx": 12
2028
+ },
2029
+ {
2030
+ "type": "image",
2031
+ "img_path": "images/ba2ef4d1bf2a8d4aeb8bfd0065614d2864e269a64e6bc0272d2ef853ebfc8cc4.jpg",
2032
+ "image_caption": [
2033
+ "(b) \"car\", \"truck\", \"SUV\" \"road\", \"sky\""
2034
+ ],
2035
+ "image_footnote": [],
2036
+ "bbox": [
2037
+ 348,
2038
+ 306,
2039
+ 630,
2040
+ 431
2041
+ ],
2042
+ "page_idx": 12
2043
+ },
2044
+ {
2045
+ "type": "image",
2046
+ "img_path": "images/aab5d3a661dab29a2c319174bca24e641fa078e91a65a92cc9fe2af3d394798e.jpg",
2047
+ "image_caption": [
2048
+ "(c) \"Person: Obama\", \"Person: Biden\", \"Person: Trump\"",
2049
+ "Figure 7: More qualitative restuls on user-specified class. The labels above are the text prompts we used for testing the images. Texts in bold are novel classes i.e. don't exist in the labels of COCO training data."
2050
+ ],
2051
+ "image_footnote": [],
2052
+ "bbox": [
2053
+ 632,
2054
+ 306,
2055
+ 872,
2056
+ 431
2057
+ ],
2058
+ "page_idx": 12
2059
+ },
2060
+ {
2061
+ "type": "header",
2062
+ "text": "Open-Vocabulary Universal Image Segmentation with MaskCLIP",
2063
+ "bbox": [
2064
+ 277,
2065
+ 56,
2066
+ 694,
2067
+ 70
2068
+ ],
2069
+ "page_idx": 12
2070
+ },
2071
+ {
2072
+ "type": "page_number",
2073
+ "text": "13",
2074
+ "bbox": [
2075
+ 477,
2076
+ 922,
2077
+ 495,
2078
+ 934
2079
+ ],
2080
+ "page_idx": 12
2081
+ }
2082
+ ]
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/cf58fa95-4039-41bf-930d-3f2cd8143939_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb9878a1f96561e60e7a0dfdea0b19b8e7eba6b8b6829fd769e2eae5e1952adc
3
+ size 10157774
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/full.md ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Open-Vocabulary Universal Image Segmentation with MaskCLIP
2
+
3
+ Zheng Ding<sup>1</sup> Jieke Wang<sup>1</sup> Zhuowen Tu<sup>1</sup>
4
+
5
+ # Abstract
6
+
7
+ In this paper, we tackle an emerging computer vision task, open-vocabulary universal image segmentation, that aims to perform semantic/instance/panoptic segmentation (background semantic labeling + foreground instance segmentation) for arbitrary categories of text-based descriptions in inference time. We first build a baseline method by directly adopting pre-trained CLIP models without finetuning or distillation. We then develop MaskCLIP, a Transformer-based approach with a MaskCLIP Visual Encoder, which is an encoder-only module that seamlessly integrates mask tokens with a pre-trained ViT CLIP model for semantic/instance segmentation and class prediction. MaskCLIP learns to efficiently and effectively utilize pre-trained partial/dense CLIP features within the MaskCLIP Visual Encoder that avoids the time-consuming student-teacher training process. MaskCLIP outperforms previous methods for semantic/instance/panoptic segmentation on ADE20K and PASCAL datasets. We show qualitative illustrations for MaskCLIP with online custom categories. Project website: https://maskclip.github.io.
8
+
9
+ # 1. Introduction
10
+
11
+ Panoptic segmentation (Kirillov et al., 2019b) or image parsing (Tu et al., 2005) integrates the task of semantic segmentation (Tu, 2008) for background regions (e.g. "stuff" like "road", "sky") and instance segmentation (He et al., 2017) for foreground objects (e.g. "things" such as "person", "table"). Existing panoptic segmentation methods (Kirillov et al., 2019b;a; Li et al., 2019; Xiong et al., 2019; Lazarow et al., 2020) and instance segmentation approach (He et al., 2017) deal with a fixed set of category definitions, which
12
+
13
+ <sup>1</sup>University of California San Diego, Lo Jolla, CA 92093, USA. Correspondence to: Zheng Ding <zhding@ucsd.edu>, Jieke Wang <jiw010@ucsd.edu>, Zhuowen Tu <ztu@ucsd.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
+ are essentially represented by categorical labels without semantic relations. DETR (Carion et al., 2020) is a pioneering work that builds a Transformer-based architecture for both object detection and panoptic segmentation. Under a more general setting, the tasks of semantic (Tu, 2008), instance (He et al., 2017), and panoptic (Kirillov et al., 2019b) can be unified under a universal image segmentation paradigm (Cheng et al., 2022).
18
+
19
+ The deep learning field is moving rapidly towards the open-world/zero-shot settings (Bendale & Boult, 2015) where computer vision tasks such as classification (Radford et al., 2021), object detection (Li et al., 2022b; Zareian et al., 2021; Zang et al., 2022; Gu et al., 2022; Cai et al., 2022), semantic labeling (Li et al., 2022a; Ghiasi et al., 2022), and image retrieval (Bendale & Boult, 2015; Hinami & Satoh, 2018; Zareian et al., 2021; Hinami & Satoh, 2018; Kamath et al., 2021) perform recognition and detection for categories beyond those in the training set.
20
+
21
+ In this paper, we take advantage of the existence of pretrained CLIP image and text embedding models (Radford et al., 2021), that are mapped to the same space. We first build a baseline method for open-vocabulary panoptic segmentation using CLIP models without training. We then develop a new algorithm, MaskCLIP, that is a Transformer-based approach efficiently and effectively utilizing pre-trained partial/dense CLIP features without heavy re-training. The key component of MaskCLIP is a Relative Mask Attention (RMA) module that seamlessly integrates the mask tokens with a pre-trained ViT-based CLIP backbone. MaskCLIP is distinct and advantageous compared with previous approaches in three aspects: 1) A canonical background and instance segmentation representation by the mask token representation with a unique encoder-only strategy that tightly couples a pre-trained CLIP image feature encoder with the mask token encoder. 2) MaskCLIP avoids the challenging student-teacher distillation processes such as OVR-CNN (Zareian et al., 2021) and ViLD (Gu et al., 2022) that face a limited number of teacher objects to train; 3) MaskCLIP also learns to refine masks beyond simple pooling in e.g. OpenSeg (Ghiasi et al., 2022).
22
+
23
+ The contributions of our work are listed as follows.
24
+
25
+ - We develop a new algorithm, MaskCLIP, to perform open-vocabulary universal image segmentation building
26
+
27
+ on top of canonical background and instance mask representation with a cascade mask proposal and refinement process.
28
+
29
+ - We device the MaskCLIP Visual Encoder under an encoder-only strategy by tightly coupling a pre-trained CLIP image feature encoder with the mask token encoder, to allow for the direct formulation of the mask feature representation for semantic/instance segmentation+refinement, and class prediction. Within the MaskCLIP Visual Encoder, there is a new module called Relative Mask Attention (RMA) that performs mask refinement.
30
+ - MaskCLIP expands the scope of the CLIP models to open-vocabulary universal image segmentation by demonstrating encouraging and competitive results for open-vocabulary semantic, instance, and panoptic segmentation.
31
+
32
+ # 2. Related Work
33
+
34
+ Open vocabulary. The open vocabulary setting is gaining increasing popularity lately as traditional fully supervised settings cannot handle unseen classes during testing, while real-world vision applications like scene understanding, self-driving and robotics are commonly required to predict unseen classes. Previous open-vocabulary attempts have been primarily made for object detection. ViLD (Gu et al., 2022) trains a student model to distill the knowledge of CLIP. RegionCLIP (Zhong et al., 2022) finetunes the pretrained CLIP model to match the image areas with corresponding texts. OV-DETR (Zang et al., 2022) uses CLIP as an external model to obtain the query embedding from CLIP model. Recently there is also work made for open-vocabulary semantic segmentation (Ghiasi et al., 2022).
35
+
36
+ Universal segmentation. Previously semantic-instance/panoptic segmentation tasks have been treated as different tasks using different methods. With the recent trends in computer vision, the formulation and methods of the three segmentation tasks have gradually been uniformed (Cheng et al., 2021; 2022). Instead of separately dealing with the stuff/instance, those methods treat them as the same one and output masks for each stuff/instance and do a post-process on the output masks for different segmentation tasks.
37
+
38
+ Open-vocabulary universal segmentation: an emerging task. As open-set, open-world, zero-shot, and open-vocabulary are relatively new concepts that have no commonly accepted definitions, thus, different algorithms are often not directly comparable with differences in problem definition/setting, training data, and testing scope. Table 1 gives a summary for the recent open-vocabulary applications. XPM (Huynh et al., 2022) utilizes vision-language
39
+
40
+ cross-modal data to generate pseudo-mask supervision to train a student model for instance segmentation, and thus, it may not be fully open-vocabulary to allow for arbitrary object specifications in the inference time. LSeg (Li et al., 2022a) also has a limited open-vocabulary aspect as the learned CNN image features in LSeg are not exposed to representations beyond the training labeling categories. OpenSeg (Ghiasi et al., 2022) is potentially applicable for instance/panoptic segmentation, but OpenSeg is formulated to be trained on captions that lack instance-level information that is fundamental for panoptic segmentation. The direct image feature pooling strategy in OpenSeg is potentially another limiting factor towards the open-vocabulary universal segmentation. Nevertheless, no results for open-vocabulary panoptic/instance segmentation are reported in (Ghiasi et al., 2022).
41
+
42
+ Class-agnostic segmentation. Most closed-vocabulary segmentation methods are classware i.e. predicting the classes along with the corresponding labels (He et al., 2017; Cheng et al., 2021; 2022). However, in tasks involving open-vocabulary or open-world scenarios where novel classes may appear during testing, it is common to use class-agnostic segmentation methods for generating masks(Jia et al., 2021; Qi et al., 2022; Xu et al., 2022). The difference in methodology between class-aware and class-agnostic segmentation methods is typically not substantial. Class-aware methods often incorporate a class-prediction head, whereas class-agnostic methods do not. In our method, we adopt a class-agnostic segmentation model by removing the class-prediction head from previous class-aware class-aware segmentation methods.
43
+
44
+ CLIP model distillation/reuse. After its initial release, the CLIP model (Radford et al., 2021) that is learned from large-scale image-text paired captioning datasets has received a tremendous amount of attention. Some other similar vision-language models have also been proposed later e.g. ALIGN (Jia et al., 2021), GLIP (Li et al., 2022b). Many algorithms have been developed lately (Zang et al., 2022; Wang et al., 2022; Zhong et al., 2022; Luo et al., 2021; Patashnik et al., 2021; Shen et al., 2022) trying knowledge distillation from the CLIP model to benefit the down-stream tasks one way or the other by leveraging the rich semantic language information paired in the images. Here, we directly adopt the backbone of CLIP image model to train for open-vocabulary panoptic segmentation. There have been attempts (Rao et al., 2022; Zhou et al., 2022) that use the partial/dense CLIP features to represent pixel-wise features as teacher model to train student model for semantic segmentation.
45
+
46
+ # 3. Method
47
+
48
+ Our pipeline, shown in Figure 1, contains two stages. The first stage is a class-agnostic mask proposal network. The
49
+
50
+ Table 1: Comparison for recent open-vocabulary approaches for object detection, semantic segmentation, instance segmentation, and panoptic segmentation. GLIP (Li et al., 2022b); OVR-CNN (Zareian et al., 2021); ViLD (Gu et al., 2022); RegionCLIP (Zhong et al., 2022); OV-DETR (Zang et al., 2022); LSeg (Li et al., 2022a); OPenSeg (Ghiasi et al., 2022); DenseCLIP (Rao et al., 2022); XPM (Huynh et al., 2022). $\times$ indicates that the corresponding method is loosely following the definition. Dense Clip features refer to the use of pixel-wise/local features. Note that OpenSeg uses its ALIGN (Jia et al., 2021), which is an alternative to CLIP.
51
+
52
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Method</td><td rowspan="2">Arbitrary Online Inference</td><td colspan="2">Segmentation</td><td rowspan="2">Dense CLIP features</td><td rowspan="2">Training data</td><td rowspan="2">Annotation type</td></tr><tr><td>semantic</td><td>instance</td></tr><tr><td rowspan="4">Object Det.</td><td>GLIP</td><td>✓</td><td></td><td></td><td></td><td>FourODs, GoldG, Cap24M</td><td>labels +bbox + captions</td></tr><tr><td>OVR-CNN</td><td>✓</td><td></td><td></td><td></td><td>COCO base, CC3M</td><td>bbox + captions</td></tr><tr><td>ViLD</td><td>✓</td><td></td><td></td><td></td><td>COCO</td><td>labels +bbox</td></tr><tr><td>RegionCLIP</td><td>✓</td><td></td><td></td><td></td><td>CC3M, COCO</td><td>captions</td></tr><tr><td rowspan="3">Semantic Seg.</td><td>LSeg</td><td>✓</td><td>✓</td><td></td><td></td><td>COCO + others</td><td>labels + segmentations</td></tr><tr><td>OpenSeg</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>COCO, LocalizedNarratives</td><td>masks + captions</td></tr><tr><td>DenseCLIP</td><td></td><td>✓</td><td></td><td>✓</td><td>COCO</td><td>labels + segmentations</td></tr><tr><td>Instance Seg.</td><td>XPM</td><td>✓</td><td></td><td>✓</td><td></td><td>COCO, CC3M</td><td>labels + masks + captions</td></tr><tr><td>Panoptic Seg.</td><td>MaskCLIP (ours)</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>COCO</td><td>labels + masks</td></tr></table>
53
+
54
+ ![](images/ed2ee1b3c27d6441c26e1555225beab3529b246abc3dd293b75d5b37dc26aedc.jpg)
55
+ Figure 1: Illustration of the pipeline. Our pipeline contains two stages. The first stage is a class-agnostic mask proposal network and the second stage is built on the pretrained CLIP ViT model. All the weights of the CLIP ViT model during training are fixed. Arrows in orange denote weight sharing. The embeddings' weights of Mask Class Tokens are shared by Class Tokens in the CLIP ViT model and are fixed. RMA represents Relative Mask Attention which is built based on the CLIP ViT attention layer. RMA contains all the weights from CLIP ViT attention layer which are all fixed during training. Additional weights are added in RMA for further mask information utilization and mask refinement. The demo image we use here is from ADE20K (Zhou et al., 2019).
56
+
57
+ second stage is MaskCLIP Visual Encoder which is built on the CLIP (Radford et al., 2021) ViT architecture. It takes the images and the coarse masks from the first stage as the input and outputs refined masks along with the corresponding partial/dense image features for further classification.
58
+
59
+ # 3.1. Class-Agnostic Mask Proposal Network
60
+
61
+ Our Class-Agnostic Mask Proposal Network is built on instance/segmentation models such as MaskRCNN(He et al., 2017) and Mask2Former(Cheng et al., 2022). To make the model class-agnostic, we remove the class supervision during training. The classification head thus becomes a binary classification for either positive or negative in these models.
62
+
63
+ # 3.2. MaskCLIP Visual Encoder
64
+
65
+ Similar to CLIP, our MaskCLIP Visual Encoder also predicts the image features. Unlike the CLIP Visual Encoder which only uses one class token to output the feature of the whole image. Our MaskCLIP Visual Encoder uses another $M$ Mask Class Tokens to output the partial/dense features for each corresponding area of the image given the masks. The Mask Class Tokens use attention masks and Relative Mask Attention to obtain the partial/dense features which we discuss in the following two parts.
66
+
67
+ Mask Class Tokens. In order to obtain partial/dense image features for the corresponding masks or bounding boxes for further recognition or distillation, an easy way to do this is simply masking or cropping the image and then sending
68
+
69
+ the obtained image to the pretrained image encoder. This method has been widely used in several open vocabulary detection/segmentation methods (Zhong et al., 2022; Gu et al., 2022; Xu et al., 2022). The problem is that it's not computation efficient ( $N$ masks/boxes will lead to $N$ images and they will be computed through the image encoder independently) and also loses the ability to see the global image context information which is very important for recognizing some objects and stuff. For masking, another problem is that masks are in different shapes and simply masking the image will cause the resulting image to have a transparent background which usually doesn't exist in real images that are used for training in large language-vision models e.g., CLIP.
70
+
71
+ To solve this, we propose Mask Class Tokens for efficient feature extraction from images without losing the global image context information. In the original CLIP ViT-based visual encoder framework, the input of the network is $N$ image tokens and 1 class token. The final output of the class token will be used for the relation computation with the text embeddings. Our newly introduced $M$ Mask Class Tokens will be alongside the image tokens and the class token. The embeddings' weights of the Mask Class Token are provided by the class token in the pretrained CLIP ViT model and are fixed. Each Mask Class Token will output a corresponding partial/dense image feature similar to the class token which outputs the feature of the whole image. To achieve this, we design an attention mask as follows
72
+
73
+ $$
74
+ \mathcal {M} = \left[ \begin{array}{c c} \mathcal {F} _ {(N + 1) \times (N + 1)} & \mathcal {T} _ {(N + 1) \times M} \\ \mathcal {M} _ {M \times N} ^ {\prime} \quad \mathcal {F} _ {M \times 1} & \mathcal {T} _ {M \times M} \end{array} \right] \tag {1}
75
+ $$
76
+
77
+ in which $M$ is the number of Mask Class Tokens, $N$ is the number of image tokens, $\mathcal{T}_{m\times n}$ is an $m\times n$ True matrix, $\mathcal{F}_{m\times n}$ is an $m\times n$ False matrix and $\mathcal{M}'$ is defined as following:
78
+
79
+ $$
80
+ \mathcal {M} _ {i, j} ^ {\prime} = \left\{ \begin{array}{l l} \text {F a l s e} & \text {i f m a s k} _ {i} \text {c o n t a i n s a t l e a s t o n e p i x e l i n p a t c h} _ {j} \\ \text {T r u e} & \text {o t h e r w i s e .} \end{array} \right. \tag {2}
81
+ $$
82
+
83
+ where True means that this position is masked out i.e. not allowed to attend and False otherwise.
84
+
85
+ In our mask attention matrix $\mathcal{M}$ , $\mathcal{F}_{(N + 1)\times (N + 1)}$ shows the $N$ Image Tokens and one Class Token are attending each other as in the original CLIP. $\mathcal{T}_{(N + 1)\times M}$ shows that the $N$ Image Tokens and one Class Token are not attending the $M$ Mask Class Tokens. $\mathcal{M}_{M\times N}^{\prime}$ shows that the Mask Class Tokens are attending the Image Tokens given the corresponding masks. $\mathcal{F}_{M\times 1}$ shows that the $M$ Mask Class Tokens are attending the Class Token. $\mathcal{T}_{M\times M}$ shows that the $M$ Mask Class Tokens are not interacting with each other.
86
+
87
+ In this way, each Mask Class Token will learn from the corresponding mask area of the images. The image tokens are also interacting with each other which means the global information won't lose. And it's also very efficient since we don't need to do redundant computing for each mask or finetune the pretrained model. However, the mask information is not fully utilized and it cannot be refined either. But we will see in the experiments later that simply adopting Mask Class Tokens to the pretrained CLIP model without any finetuning will already serve as a competitive baseline.
88
+
89
+ ![](images/f652063708de1f7a783cd8929a9744637cf9206459b4f60877f0c68f7d090131.jpg)
90
+ Figure 2: Relative Mask Attention. Our Relative Mask Attention mechanism adds another attention matrix $A_{M, -N}^{\prime}$ to the original attention matrix. The newly added attention matrix is computed using the Image Tokens and the Mask Patch Tokens. The mask patch tokens are acquired by patchifying the masks using a similar way for the images as shown here. Moreover, the masks are refined by using $M_r$ in Eq. 5 which is computed by Image Tokens and Mask Class Tokens.
91
+
92
+ Relative Mask Attention. To further utilize the mask information and refine the coarse masks, we propose Relative Mask Attention mechanism in our transformer. Our key design principle is to try not to change the CLIP features directly as this would destroy the learned relationship between the image features and text features in the CLIP model. Therefore, we adopt a way to only change the attention matrix in the transformer to learn a better linear combination of the values in the attention layers according to the mask information. As in Figure 2, our proposed Relative Mask Attention Mechanism only changes the attention matrix and refines the masks. $M_r$ is defined in Eq. 5. $\mathcal{A}_{:M, -N}^{\prime}$ is defined in Eq. 3. $f_M$ is the class-agnostic mask proposal network. $f_1$ and $f_2$ are two downsampling networks that encode the images/masks to image tokens/mask patch tokens sharing the same architecture. $f_r$ is a two-layer convolutional network that maps the attention matrix to a mask residual.
93
+
94
+ Similar to relative positional encoding, we use a relative attention mechanism here. Let $D$ be the dimension of the token embedding, for each Mask Class Token $T_{i}^{\mathrm{MC}} \in \mathbb{R}^{D}$
95
+
96
+ with a corresponding mask $K_{i} \in \mathbb{R}^{H \times W}$ whose shape is the same as the image, we use a similar way as for the images to get mask patch tokens $T^{\mathrm{MP}} \in \mathbb{R}^{M \times N \times D}$ in the computation of the attention. In our attention matrix, the Mask Class Tokens attending the image tokens part will then be as follows:
97
+
98
+ $$
99
+ \mathcal {A} _ {: M, - N:} ^ {\prime} = \sum_ {c} ^ {D} \left(\phi_ {Q _ {m}} \left(T ^ {\mathrm {M P}}\right) \odot \phi_ {K _ {m}} \left(T ^ {\mathrm {I M}}\right)\right) _ {c} \tag {3}
100
+ $$
101
+
102
+ $$
103
+ \mathcal {A}: M, - N: = \frac {\phi_ {Q} \left(T ^ {\mathrm {M C}}\right) \cdot \phi_ {K} \left(T ^ {\mathrm {I M}}\right) + \mathcal {A} _ {: M , - N :} ^ {\prime}}{2 \sqrt {D}} \tag {4}
104
+ $$
105
+
106
+ where $T^{\mathrm{IM}}\in \mathbb{R}^{N\times D}$ is image tokens, $T^{\mathrm{MC}}\in \mathbb{R}^{M\times D}$ is Mask Class Tokens, $T^{\mathrm{MP}}\in \mathbb{R}^{M\times N\times D}$ is Mask Patch Tokens $\phi_{Q},\phi_{K},\phi_{Q_{m}},\phi_{K_{m}}$ are linear transformations, $\odot$ is element-wise product and $\sum_{c}^{D}(\cdot)_{c}$ is the sum of the embedding dimension. $\phi_{K_m}(T^{\mathrm{IM}})\in \mathbb{R}^{N\times D}$ will first be broadcast to $\mathbb{R}^{M\times N\times D}$ before doing element-wise production.
107
+
108
+ The attention will also in turn be used for the refinement of the masks. The vanilla attention can be seen as a relationship between each mask area and all the image patches. Thus we utilize this to help our coarse masks be more accurate. The updating process of the masks is as following:
109
+
110
+ $$
111
+ M _ {r} = \sigma \left(\sigma^ {- 1} \left(M _ {c}\right) + f _ {r} \left(\phi_ {Q} \left(T ^ {\mathrm {M C}}\right) \odot \phi_ {K} \left(T ^ {\mathrm {I M}}\right)\right)\right) \tag {5}
112
+ $$
113
+
114
+ where $M_{c}, M_{r} \in \mathbb{R}^{N \times H \times W}$ denotes the coarse mask and refined mask respectively, $f_{r}$ is a learnable non-linear function that maps the attention matrix to a mask residual, $\sigma$ and $\sigma^{-1}$ are sigmoid and inverse sigmoid functions respectively.
115
+
116
+ The RMA method aims to leverage detailed mask information and refine masks by utilizing CLIP's features. Without RMA, the method would only utilize the mask information in the attention mask (which is just a low-resolution mask) and cannot refine the mask using CLIP's features. In order to utilize the detailed information of masks, we add another attention matrix, which is obtained from the Mask Patch Tokens and the Image Tokens, to the original attention matrix in the CLIP ViT model so that the new attention matrix could be aware of the detailed mask information and thus the Mask Class Tokens could attend the information more accurately. Furthermore, we use the information from the original attention matrix, which is obtained from the Mask Class Tokens and the Image Tokens, to refine the mask.
117
+
118
+ # 4. Experiments
119
+
120
+ In this part, we train our proposed MaskCLIP method using COCO (Lin et al., 2014) training data and test on other datasets (ADE20K (Zhou et al., 2019; 2017), PASCAL Context (Mottaghi et al., 2014), LVIS) under the open vocabulary setting. We report our results on semantic/instance/panoptic segmentation tasks to evaluate the performance of out model's universal segmentation.
121
+
122
+ # 4.1. Datasets
123
+
124
+ COCO: COCO (Lin et al., 2014) includes 133 classes where 80 classes are things and 53 classes are stuff or background. There are 118k training images and 5k validation images. In our experiments, we first train the class-agnostic mask proposal network on COCO training dataset using the annotations of panoptic masks. Then we train our models on COCO training images in a supervised manner.
125
+
126
+ ADE20K: ADE20K (Zhou et al., 2019; 2017) contains 20,210 images and annotations for training and 2000 images and annotations for validation. It serves both panoptic segmentation and semantic segmentation. The full version (A-847) (Zhou et al., 2019) includes 847 classes and the short version (A-150) (Zhou et al., 2017) includes 150 classes. We use the validation set in ADE20K for testing without any training on this dataset in which case we can test our model's capability of open vocabulary segmentation.
127
+
128
+ PASCAL Context: PASCAL Context (Mottaghi et al., 2014) contains 10,103 per-pixel annotations for images of PASCAL VOC 2010 (Everingham et al.), where 4998 for training and 5105 for validation. The full version (P-459) includes 459 classes and the short version includes 59 classes. This dataset serves as another benchmark testing our model's open vocabulary segmentation ability.
129
+
130
+ LVIS: LVIS (Gupta et al., 2019) contains 100,170 images for training and 19,809 images for validation. It extends COCO (Lin et al., 2014) but contains 1,203 categories. It is considered one of the most challenging benchmark for instance segmentation because of its large vocabulary, long-tailed distribution, and fine-grained classification. We report our model's performance of open vocabulary instance segmentation on the validation dataset.
131
+
132
+ # 4.2. Implementation Details
133
+
134
+ Class-Agnostic Mask Proposal Network. In our first stage, we train a class-agnostic mask proposal network using MaskRCNN (He et al., 2017) and Mask2Former (Cheng et al., 2022) on COCO training data. The experiment setting we use for MaskRCNN is R50-FPN-1x. The backbone we use in Mask2Former is ResNet-50. All the training setting follows the default in their models.
135
+
136
+ CLIP Baseline. We design our first baseline by directly using the class-agnostic mask proposal network from the first stage and the pretrained CLIP model. We mask the images according to the masks from the class-agnostic mask proposal network and send the masked images to the CLIP model to get classification results. The pretrained CLIP model we use is ViT-L/14@336px and the text inputs we use are simply the category names defined by each dataset. Those two settings keep the same with the following two methods for a fair comparison.
137
+
138
+ Table 2: Results on open-vocabulary semantic segmentation. A-150 and A-847 represent the ADE20K dataset with 150 classes and 847 classes respectively. P-459 and P-59 represent PASCAL Context dataset with 459 classes and 59 classes respectively. All results use the mIoU metric. All methods presented here don't use extra data other than COCO for training.
139
+
140
+ <table><tr><td>Method</td><td>COCO Training Data</td><td>A-150 ↑</td><td>A-847 ↑</td><td>P-459 ↑</td><td>P-59 ↑</td></tr><tr><td>ALIGN (Jia et al., 2021)</td><td>None</td><td>10.7</td><td>4.1</td><td>3.7</td><td>15.7</td></tr><tr><td>ALIGN w/ proposals (Jia et al., 2021)</td><td>Masks</td><td>12.9</td><td>5.8</td><td>4.8</td><td>22.4</td></tr><tr><td>LSeg+ (Li et al., 2022a)</td><td>Masks + Labels</td><td>18.0</td><td>3.8</td><td>7.8</td><td>46.5</td></tr><tr><td>OpenSeg (Ghiasi et al., 2022)</td><td>Masks + Captions</td><td>21.1</td><td>6.3</td><td>9.0</td><td>42.1</td></tr><tr><td>SimSeg (Xu et al., 2022)</td><td>Masks + Labels</td><td>20.5</td><td>7.0</td><td>-</td><td>47.7</td></tr><tr><td>CLIP Baseline</td><td>Masks</td><td>13.8</td><td>5.2</td><td>5.2</td><td>25.3</td></tr><tr><td>MaskCLIP w/o RMA</td><td>Masks</td><td>14.9</td><td>5.6</td><td>5.3</td><td>26.1</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>Masks + Labels</td><td>22.4</td><td>6.8</td><td>9.1</td><td>41.3</td></tr><tr><td>MaskCLIP</td><td>Masks + Labels</td><td>23.7</td><td>8.2</td><td>10.0</td><td>45.9</td></tr></table>
141
+
142
+ ![](images/4b48cadafcbecb53adfae8675fe2cb4a73fee59e6bc16b0c87ff290720ddb3ee.jpg)
143
+ Image
144
+
145
+ ![](images/48677872afdf5526104bef5ccf9156a7495c259abf42d039bfb2c91d273bb4b8.jpg)
146
+ GT
147
+
148
+ ![](images/76082cfb8f7a4c61e52ba2cafe947272cb7ba5aa92bd6c0032e35fd274ec31bd.jpg)
149
+ ALIGN++
150
+
151
+ ![](images/d2eca909ef6a9fc0327cb32f8f071d3013a837e301eb725d1f3e9dbd2d883648.jpg)
152
+ OpenSeg
153
+
154
+ ![](images/e09c87a2b9ee7a40d4c76e61b1246cc29ff960954f7432ed4d57104280930380.jpg)
155
+ MaskCLIP
156
+
157
+ ![](images/0215274405c632b1f3fc750c6cb2c470b8a4189820e2dd92255653b94fef1b90.jpg)
158
+
159
+ ![](images/01611a1fade2a85ce4bd1464f4270d3c4dcae28365c398fcfb5446a09b4979e8.jpg)
160
+ Figure 3: Comparison on open-vocabulary semantic segmentation. The input image and the results for GT, ALIGN++, OpenSeg are from (Ghiasi et al., 2022).
161
+
162
+ ![](images/44b692a3bd0646456c8cb9da345478bb10325821ad5d4f561f7e73b33a4cc081.jpg)
163
+
164
+ ![](images/3e2b34ca26f1a5aca478d8fdab689c73aa1cc2f3f74b8eae85e23b3771b75086.jpg)
165
+
166
+ ![](images/024e498d47769b4c7f30c1ef52d92407c1fbb0c002c769337774e21b0c560f0b.jpg)
167
+
168
+ ![](images/d292e27ddc8cda2ea9e06d546b8ccafc8a7031246bb95d333b9c31b6e945f3f4.jpg)
169
+
170
+ ![](images/4559aec8ded6669c889fbfe9ff366ea8b80908bebce9114e8ef86a288d81aa8d.jpg)
171
+
172
+ ![](images/e8a1badcaa225eed686efd1945bb30298fe8e6977cf0bf262a2e4f280087ff38.jpg)
173
+
174
+ ![](images/dd1b7f260e104c890c4981778aaffd6bafde44f876959dbd0ab306f273f20435.jpg)
175
+
176
+ ![](images/8ad4849b6cbffe582c7428a72dc1bd95fb5373d4d03042aff27f0730dead29fd.jpg)
177
+
178
+ ![](images/efa0eea06e79590fcff5fcf8a3bdf54ce0a1300dd0d4d5911e9bd67b0ad7f969.jpg)
179
+
180
+ ![](images/483992a030c1535dfc689611d904af091448071c30102a5ce73e23da73175446.jpg)
181
+
182
+ ![](images/93e9f6c9c61da5f6ffc4ae979dd64635c70f65b5c805c850863d29b083aa25d9.jpg)
183
+
184
+ MaskCLIP w/o RMA Baseline. Our second baseline is based on the Mask Class Tokens which doesn't use the Relative Mask Attention mechanism. Instead of masking the images and sending the resulting images directly to the CLIP model for feature extraction, we use Mask Class Tokens to acquire the corresponding partial/dense image features. The obtained image features will then be used for further open vocabulary classification.
185
+
186
+ The two baselines above don't need any training in the second stage and can be used to directly perform the open vocabulary tasks. We will demonstrate that the second baseline is better at feature extraction in both quantitative results and qualitative results under the open vocabulary setting and show the effectiveness and efficiency of the proposed Mask Class Tokens.
187
+
188
+ MaskCLIP. In our MaskCLIP method, we still use the CLIP ViT-L/14@336px pretrained model as with the previous two. This model has 24 attention layers and we add Relative Mask Attention in four of them which is 6, 12, 18, 24. We use AdamW (Loshchilov & Hutter, 2019) as our optimizer and the learning rate is set to 0.0001. We train our model on COCO training data for 10k iterations with a batch size of 8. The training takes around 3h on 8 Nvidia A5000 GPUs.
189
+
190
+ Loss Function. The loss function is $\mathcal{L} = \lambda_{\mathrm{ce}}\mathcal{L}_{\mathrm{ce}} + \lambda_{\mathrm{dice}}\mathcal{L}_{\mathrm{dice}} + \lambda_{\mathrm{bce}}\mathcal{L}_{\mathrm{bce}}$ where $\mathcal{L}_{\mathrm{ce}}$ is the loss for classification, $\mathcal{L}_{\mathrm{dice}}$ and $\mathcal{L}_{\mathrm{bce}}$ are the losses for mask localization. In our experiments, We set $\lambda_{\mathrm{ce}} = 2, \lambda_{\mathrm{dice}} = 5, \lambda_{\mathrm{bce}} = 5$ .
191
+
192
+ In the next three parts, we evaluate our methods on open vo
193
+
194
+ cabulary semantic, panoptic segmentation, and instance segmentation tasks. The class-agnostic mask proposal networks we use in those methods are trained using Mask2Former other than noted.
195
+
196
+ # 4.3. Open-Vocabulary Semantic Segmentation
197
+
198
+ First, we use our method to compare with open-vocabulary semantic segmentation as in Table 2. We train our method on the COCO dataset and evaluate on another four different datasets. On the four datasets we test, MaskCLIP outperforms the two baselines we described in the implementation details which demonstrates that our feature extraction method is better than the vanilla way in this setting. It extracts the features without the need to change the input and can simultaneously extract multiple mask area features easily. For 100 masks' feature extraction in a single image, the CLIP baseline takes $\sim 3s$ on a single 3090 GPU while the MaskCLIP w/o RMA baseline only takes $\sim 0.6s$ which is $\sim 4x$ faster. Our MaskCLIP beats both baselines significantly as it utilizes accurate mask information and refines the masks during the feature extraction process. Furthermore, our proposed method also reaches state-of-the-art results on three of the benchmarks with only P-59 slightly lower than LSeg+(Li et al., 2022a).
199
+
200
+ To compare with previous methods, we also provide a semantic segmentation comparison in Figure 3. Results on ALIGN++ and OpenSeg are directly from (Ghiasi et al., 2022) and we run the same image using our MaskCLIP
201
+
202
+ model. It can be seen that due to the open vocabulary setting, some similar classes may be mistakenly classified e.g. all three methods predict the house in this image while the ground truth is building.
203
+
204
+ # 4.4. Open-Vocabulary Panoptic Segmentation
205
+
206
+ Next, we compare our MaskCLIP with the two baselines on ADE20K validation set under the open vocabulary panoptic segmentation setting. The results are presented in Table 3. As can be seen from the table, the MaskCLIP w/o RMA baseline performs better on all the metrics in panoptic segmentation setting which further demonstrates our method's effectiveness.
207
+
208
+ We also show two sets of images to demonstrate our model capability. The first is the qualitative results on ADE20K. We compare our method with the two baselines in Figure 4. It can be seen that our method performs much better than the two baselines. The results from the first column show that due to the lack of global information, CLIP baseline fails to predict "floor". Instead, it predicts "skyscraper". While the MaskCLIP w/o RMA baseline and MaskCLIP model can predict the floor correctly as it does not lose the global context information.
209
+
210
+ The second set of images we're presenting is in Figure 5. These figures show our capability of specifying any arbitrary classes in performing panoptic segmentation task. The results show that though we train a new model based on the CLIP model without any distillation methods, we can still preserve the CLIP image features very well. Our model doesn't have a clear bias towards the base classes in the training set and could tell the difference very well that have no chance to learn in the COCO training: e.g toy vs real and filled vs empty.
211
+
212
+ # 4.5. Open-Vocabulary Instance Segmentation
213
+
214
+ Cross-Dataset Setting. We present the results on open vocabulary instance segmentation in Table 4 under the cross-dataset setting. Since instance segmentation can be regarded as "thing-only" panoptic segmentation, we directly apply our model trained on COCO panoptic dataset to the instance segmentation task. MaskCLIP with different class-agnostic mask proposal networks performs better than CLIP Baseline and MaskCLIP w/o RMA in general.
215
+
216
+ Table 4: Results on open-vocabulary instance segmentation under the cross-dataset setting.
217
+
218
+ <table><tr><td rowspan="2">Method</td><td colspan="3">ADE20K</td><td colspan="3">LVIS</td></tr><tr><td>AP↑</td><td>AP50↑</td><td>AP75↑</td><td>AP↑</td><td>AP50↑</td><td>AP75↑</td></tr><tr><td>CLIP Baseline</td><td>3.974</td><td>6.090</td><td>4.288</td><td>4.989</td><td>7.244</td><td>5.227</td></tr><tr><td>MaskCLIP w/o RMA</td><td>4.263</td><td>6.696</td><td>4.402</td><td>5.762</td><td>8.202</td><td>6.169</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>6.164</td><td>12.072</td><td>5.775</td><td>6.431</td><td>12.753</td><td>5.777</td></tr><tr><td>MaskCLIP</td><td>5.989</td><td>9.739</td><td>6.209</td><td>8.404</td><td>12.190</td><td>8.810</td></tr></table>
219
+
220
+ COCO Split Setting. Besides the cross-dataset setting, we also follow the COCO Split Setting in XPM(Huynh et al., 2022) to perform the instance segmentation in Table 5. On the generalized setting which is a more challenging setting, we outperform previous results in base, target, and all categories. In the constrained setting, we also show competitive results in both base and target categories.
221
+
222
+ Table 5: Results on open-vocabulary instance segmentation under the COCO split setting.
223
+
224
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Constrained</td><td colspan="3">Generalized</td></tr><tr><td>Base</td><td>Target</td><td>Base</td><td>Target</td><td>All</td></tr><tr><td>Soft-Teacher(Xu et al., 2021)</td><td>41.8</td><td>14.8</td><td>41.5</td><td>9.6</td><td>33.2</td></tr><tr><td>Unbiased-Teacher(Liu et al., 2021)</td><td>41.8</td><td>15.1</td><td>41.4</td><td>9.8</td><td>33.1</td></tr><tr><td>XPM(Huynh et al., 2022)</td><td>42.4</td><td>24.0</td><td>41.5</td><td>21.6</td><td>36.3</td></tr><tr><td>MaskCLIP</td><td>42.8</td><td>23.2</td><td>42.6</td><td>21.7</td><td>37.2</td></tr></table>
225
+
226
+ # 4.6. Efficiency Analysis
227
+
228
+ We further provide efficiency analysis in Table 6 to demonstrate the efficiency of our feature extraction method. Previous methods usually perform a crop/mask operation on the input images and send the resulted images to CLIP to obtain the partial/dense features for classification which is rather slow. In contrast, our proposed method employs Mask Class Tokens to obtain the partial/dense features for classification. By doing so, our method can extract partial/dense features more efficiently (instead of running CLIP $N$ times, our method only requires running CLIP one time with $N$ more Mask Class Tokens) and is also aware of the global context information.
229
+
230
+ Table 6: FLOPs Comparison. We use the CLIP ViT-L/14 model in all methods for fair comparison and 640x640 as the input resolution.
231
+
232
+ <table><tr><td>Method</td><td>TFLOPs</td></tr><tr><td>RegionCLIP(Zhong et al., 2022)</td><td>9.5</td></tr><tr><td>ZegFormer(Ding et al., 2022)</td><td>10.3</td></tr><tr><td>SimSeg(Xu et al., 2022)</td><td>9.6</td></tr><tr><td>CLIP Baseline</td><td>10.5</td></tr><tr><td>MaskCLIP(Ours)</td><td>0.3</td></tr></table>
233
+
234
+ # 5. Ablation Study
235
+
236
+ # 5.1. Incorporating GT Masks.
237
+
238
+ Since our model can decouple the mask proposal process and the classification process, we could also use the ground truth mask proposals which can be regarded as a "perfect" mask proposal network in our method. In this way, we can eliminate the effects of the quality of the mask proposals and inspect the method's classification capabilities. In Table 7. We can see that the performance could gain a lot from
239
+
240
+ Table 3: Results on open-vocabulary panoptic segmentation using the ADE20k validation dataset. th and st represent thing and stuff classes respectively.
241
+
242
+ <table><tr><td>Method</td><td>PQ↑</td><td>PQth↑</td><td>PQst↑</td><td>SQ↑</td><td>SQth↑</td><td>SQst↑</td><td>RQ↑</td><td>RQth↑</td><td>RQst↑</td></tr><tr><td>CLIP Baseline</td><td>8.207</td><td>8.473</td><td>7.675</td><td>53.124</td><td>52.661</td><td>54.048</td><td>10.534</td><td>10.883</td><td>9.835</td></tr><tr><td>MaskCLIP w/o RMA</td><td>9.565</td><td>8.922</td><td>10.852</td><td>62.507</td><td>62.268</td><td>62.985</td><td>12.645</td><td>11.758</td><td>14.418</td></tr><tr><td>MaskCLIP (MaskRCNN)</td><td>12.860</td><td>11.242</td><td>16.095</td><td>64.008</td><td>64.183</td><td>63.658</td><td>16.803</td><td>14.968</td><td>20.473</td></tr><tr><td>MaskCLIP</td><td>15.121</td><td>13.536</td><td>18.290</td><td>70.479</td><td>70.021</td><td>71.396</td><td>19.211</td><td>17.448</td><td>22.737</td></tr></table>
243
+
244
+ ![](images/94e904b07ab550fd3283436e7a7c626980d0f7244f46fb68ecf17cafc4c57ad4.jpg)
245
+ Figure 4: Qualitative results on ADE20K panoptic segmentation. The images are taken from the ADE20K validation set. We use the class names directly from the ADE20K 150 classes as the text inputs. Three images are presented here using our MaskCLIP model along with the two baselines.
246
+
247
+ ![](images/7ae36b8e007fce2037b2646f0adcf66c09db5312539d4eeb4a36e47551315f61.jpg)
248
+
249
+ ![](images/3e24ef10fa137bf492738c9d2b48c31637db6a647aaa4286b6ceab3baa85ee01.jpg)
250
+ (a) "toy rabbit", "real rabbit", "background"
251
+
252
+ ![](images/d154d6e47a4771469fe893d4a1861ab16bdc4d4323da07cd66eca69bc94988e1.jpg)
253
+
254
+ ![](images/dcd7161b20777dc6238be285df87f1da5d511bb57e3cb5fa2759f259beb2fd85.jpg)
255
+ (b) "horse", "donkey", "sky", "grass"
256
+
257
+ ![](images/9d7f212f6f7554cf163ef5c95c91fd8a0eeca9424d7b68bed7aed72d33062b87.jpg)
258
+
259
+ ![](images/253ac1ab7c12fc2f597109a06014acb4dc3f01961a35c70930a2447c91dee78c.jpg)
260
+ (c) "empty bottle", "filled bottle", "door", "wall", "ground"
261
+ Figure 5: User-specified class panoptic segmentation. The labels above are the text inputs we used for testing the images. Texts in bold are novel classes i.e. don't exist in the labels of COCO training data. (a) Our model is able to distinguish object properties of real rabbit and toy rabbit. (b) This example shows that our model is potential for fine-grained classifications and does not have bias toward the base classes. (c) Our results show that it can tell the difference between the filled status and empty status of bottles.
262
+
263
+ the "perfect" mask proposals. And our MaskCLIP method also outperforms OpenSeg in this setting.
264
+
265
+ Table 7: Incorporating GT Masks. Results on using GT masks as mask proposals for open-vocabulary panoptic segmentation and semantic segmentation.
266
+
267
+ <table><tr><td></td><td>PQ↑</td><td>mIoU ↑</td></tr><tr><td>OpenSeg (Ghiasi et al., 2022)</td><td>-</td><td>21.1</td></tr><tr><td>MaskCLIP</td><td>15.1</td><td>23.7</td></tr><tr><td>OpenSeg + GT masks (Ghiasi et al., 2022)</td><td>-</td><td>27.5</td></tr><tr><td>MaskCLIP + GT masks</td><td>35.8</td><td>31.7</td></tr></table>
268
+
269
+ # 5.2. Mask Refinement.
270
+
271
+ In our Relative Mask Attention part, the attention layer will use the accurate mask information to learn a better attention matrix and the mask will also use the attention information to gradually refine itself. In this ablation study, we only let the attention matrix learn from the mask without any mask refinement. And we get the results in Table 8. Since the SQ reflects the segmentation quality, we care more about SQ here. It can be seen that MaskCLIP performs slightly better than that without the mask refinement which demonstrates the effectiveness of the mask refinement.
272
+
273
+ # 6. Conclusion
274
+
275
+ In this paper, we have presented a new algorithm, MaskCLIP, to tackle an emerging computer vision task, open-vocabulary
276
+
277
+ Table 8: Ablation Study on Mask Refinement. Results on ADE20K validation set are reported here. Both methods are trained on COCO and tested on ADE20K validation dataset. MR refers to mask refinement.
278
+
279
+ <table><tr><td></td><td>PQ↑</td><td>PQTh↑</td><td>PQSt↑</td><td>SQ↑</td><td>SQUth↑</td><td>SQSt↑</td></tr><tr><td>MaskCLIP w/o MR</td><td>13.624</td><td>13.253</td><td>14.368</td><td>66.361</td><td>67.715</td><td>63.653</td></tr><tr><td>MaskCLIP</td><td>15.121</td><td>13.536</td><td>18.290</td><td>70.479</td><td>70.021</td><td>71.396</td></tr></table>
280
+
281
+ universal image segmentation. MaskCLIP is a Transformer-based approach using mask queries with the ViT-based CLIP backbone to efficiently and effectively utilize pre-trained partial/dense CLIP features. MaskCLIP consists of a Relative Mask Attention (RMA) module that is seamlessly integrated with a pre-trained CLIP. MaskCLIP is distinct compared with prior approaches in open-vocabulary semantic segmentation/object detection by building an integrated encoder module for segmentation mask refinement and image feature extraction with a pre-trained CLIP image model. Encouraging experimental results on open-vocabulary semantic/instance/panoptic segmentation have been obtained.
282
+
283
+ Acknowledgement This work is supported by NSF Award IIS-2127544. We thank Xiang Zhang and Boyi Li for helpful discussions.
284
+
285
+ # References
286
+
287
+ Bendale, A. and Boult, T. Towards open world recognition. In CVPR, 2015.
288
+
289
+ Cai, Z., Kwon, G., Ravichandran, A., Bas, E., Tu, Z., Bhotika, R., and Soatto, S. X-detr: A versatile architecture for instance-wise vision-language tasks. arXiv preprint arXiv:2204.05626, 2022.
290
+ Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., and Zagoruyko, S. End-to-end object detection with transformers. In ECCV, pp. 213-229, 2020.
291
+ Cheng, B., Schwing, A., and Kirillov, A. Per-pixel classification is not all you need for semantic segmentation. Advances in Neural Information Processing Systems, 34, 2021.
292
+ Cheng, B., Misra, I., Schwing, A. G., Kirillov, A., and Girdhar, R. Masked-attention mask transformer for universal image segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1290–1299, June 2022.
293
+ Ding, J., Xue, N., Xia, G.-S., and Dai, D. Decoupling zero-shot semantic segmentation. 2022.
294
+ Everingham, M., Van Gool, L., Williams, C. K. I., Winn, J., and Zisserman, A. The PASCAL Visual Object Classes Challenge 2010 (VOC2010) Results. http://www.pascalnetwork.org/challenges/VOC/voc2010/workshop/index.html.
295
+ Ghiasi, G., Gu, X., Cui, Y., and Lin, T.-Y. Scaling open-vocabulary image segmentation with image-level labels. In ECCV, 2022.
296
+ Gu, X., Lin, T.-Y., Kuo, W., and Cui, Y. Open-vocabulary object detection via vision and language knowledge distillation. In ICLR, 2022.
297
+ Gupta, A., Dollar, P., and Girshick, R. Lvis: A dataset for large vocabulary instance segmentation. In CVPR, pp. 5356-5364, 2019.
298
+ He, K., Gkioxari, G., Dollar, P., and Girshick, R. Mask r-cnn. In ICCV, pp. 2961-2969, 2017.
299
+ Hinami, R. and Satoh, S. Discriminative learning of open-vocabulary object retrieval and localization by negative phrase augmentation. In EMNLP, 2018.
300
+ Huynh, D., Kuen, J., Lin, Z., Gu, J., and Elhamifar, E. Open-vocabulary instance segmentation via robust cross-modal pseudo-labeling. In CVPR, 2022.
301
+ Jia, C., Yang, Y., Xia, Y., Chen, Y.-T., Parekh, Z., Pham, H., Le, Q., Sung, Y.-H., Li, Z., and Duerig, T. Scaling up visual and vision-language representation learning with noisy text supervision. In International Conference on Machine Learning, pp. 4904-4916, 2021.
302
+
303
+ Kamath, A., Singh, M., LeCun, Y., Synnaeve, G., Misra, I., and Carion, N. Mdetr-modulated detection for end-to-end multi-modal understanding. In CVPR, pp. 1780-1790, 2021.
304
+ Kirillov, A., Girshick, R., He, K., and Dólar, P. Panoptic feature pyramid networks. In CVPR, 2019a.
305
+ Kirillov, A., He, K., Girshick, R., Rother, C., and Dólar, P. Panoptic segmentation. In CVPR, 2019b.
306
+ Lazarow, J., Lee, K., Shi, K., and Tu, Z. Learning instance occlusion for panoptic segmentation. In CVPR, 2020.
307
+ Li, B., Weinberger, K. Q., Belongie, S., Koltun, V., and Ranftl, R. Language-driven semantic segmentation. In ICLR, 2022a.
308
+ Li, L. H., Zhang, P., Zhang, H., Yang, J., Li, C., Zhong, Y., Wang, L., Yuan, L., Zhang, L., Hwang, J.-N., Chang, K.-W., and Gao, J. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10965-10975, June 2022b.
309
+ Li, Y., Chen, X., Zhu, Z., Xie, L., Huang, G., Du, D., and Wang, X. Attention-guided unified network for panoptic segmentation. In CVPR, 2019.
310
+ Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., and Zitnick, C. L. Microsoft coco: Common objects in context. In ECCV, pp. 740-755, 2014.
311
+ Liu, Y.-C., Ma, C.-Y., He, Z., Kuo, C.-W., Chen, K., Zhang, P., Wu, B., Kira, Z., and Vajda, P. Unbiased teacher for semi-supervised object detection. arXiv preprint arXiv:2102.09480, 2021.
312
+ Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In *ICLR*, 2019.
313
+ Luo, H., Ji, L., Zhong, M., Chen, Y., Lei, W., Duan, N., and Li, T. Clip4clip: An empirical study of clip for end to end video clip retrieval. arXiv preprint arXiv:2104.08860, 2021.
314
+ Mottaghi, R., Chen, X., Liu, X., Cho, N.-G., Lee, S.-W., Fidler, S., Urtasun, R., and Yuille, A. The role of context for object detection and semantic segmentation in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014.
315
+ Patashnik, O., Wu, Z., Shechtman, E., Cohen-Or, D., and Lischinski, D. Styleclip: Text-driven manipulation of stylegan imagery. In CVPR, pp. 2085–2094, 2021.
316
+
317
+ Qi, L., Kuen, J., Wang, Y., Gu, J., Zhao, H., Torr, P., Lin, Z., and Jia, J. Open world entity segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.
318
+ Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pp. 8748-8763, 2021.
319
+ Rao, Y., Zhao, W., Chen, G., Tang, Y., Zhu, Z., Huang, G., Zhou, J., and Lu, J. Denseclip: Language-guided dense prediction with context-aware prompting. In CVPR, 2022.
320
+ Shen, S., Li, L. H., Tan, H., Bansal, M., Rohrbach, A., Chang, K.-W., Yao, Z., and Keutzer, K. How much can clip benefit vision-and-language tasks? In ICLR, 2022.
321
+ Tu, Z. Auto-context and its application to high-level vision tasks. In CVPR, 2008.
322
+ Tu, Z., Chen, X., Yuille, A. L., and Zhu, S.-C. Image parsing: Unifying segmentation, detection, and recognition. International Journal of computer vision, 63(2):113-140, 2005.
323
+ Wang, Z., Codella, N., Chen, Y.-C., Zhou, L., Yang, J., Dai, X., Xiao, B., You, H., Chang, S.-F., and Yuan, L. Clip-td: Clip targeted distillation for vision-language tasks. arXiv preprint arXiv:2201.05729, 2022.
324
+ Xiong, Y., Liao, R., Zhao, H., Hu, R., Bai, M., Yumer, E., and Urtasun, R. Upsnet: A unified panoptic segmentation network. In CVPR, 2019.
325
+ Xu, M., Zhang, Z., Hu, H., Wang, J., Wang, L., Wei, F., Bai, X., and Liu, Z. End-to-end semi-supervised object detection with soft teacher. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3060-3069, 2021.
326
+ Xu, M., Zhang, Z., Wei, F., Lin, Y., Cao, Y., Hu, H., and Bai, X. A simple baseline for open-vocabulary semantic segmentation with pre-trained vision-language model. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XXIX, pp. 736-753. Springer, 2022.
327
+ Zang, Y., Li, W., Zhou, K., Huang, C., and Loy, C. C. Open-vocabulary detr with conditional matching. arXiv:2203.11876, 2022.
328
+ Zareian, A., Rosa, K. D., Hu, D. H., and Chang, S.-F. Open-vocabulary object detection using captions. In CVPR, pp. 14393-14402, 2021.
329
+
330
+ Zhong, Y., Yang, J., Zhang, P., Li, C., Codella, N., Li, L. H., Zhou, L., Dai, X., Yuan, L., Li, Y., and Gao, J. Regionclip: Region-based language-image pretraining. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 16793-16803, June 2022.
331
+ Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., and Torralba, A. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 633-641, 2017.
332
+ Zhou, B., Zhao, H., Puig, X., Xiao, T., Fidler, S., Barriuso, A., and Torralba, A. Semantic understanding of scenes through the ade20k dataset. International Journal of Computer Vision, 127(3):302-321, 2019.
333
+ Zhou, C., Loy, C. C., and Dai, B. Extract free dense labels from clip. In ECCV, 2022.
334
+
335
+ # A. CLIP Baseline Details
336
+
337
+ Here we provide more details on our CLIP Baseline. Given an RGB image $\mathcal{I} \in \mathbb{R}^{H \times W \times 3}$ with height $H$ and width $W$ and a list of category names with $C$ classes, we precompute the text embedding of the category names as $\mathcal{E} \in \mathbb{R}^{C \times D}$ . The mask proposal network $f_{m}$ outputs $N$ masks $\mathcal{M} \in \mathbb{R}^{N \times H \times W}$ . For each mask: the cropped image region is the element-wise product between the binary mask $\mathcal{M}_{i}$ and the image $\mathcal{I}$ , i.e. $\mathcal{R}_{i} \in \mathbb{R}^{H \times W \times 3}$ ; the visual embedding $\mathcal{V}_{i} \in \mathbb{R}^{D}$ of the cropped region is computed by the visual encoder where $D$ is the hidden dimension; the final classification score $\mathcal{V}_{i} \in \mathbb{R}^{C}$ is the softmax over the dot product between the visual embedding $\mathcal{V}_{i}$ and the text embedding $\mathcal{T}$ . A formal algorithm is described as 1 and a visualization of this is shown as 6.
338
+
339
+ Algorithm 1 CLIP Baseline
340
+ Require: Mask proposal network $f_{m}$ , CLIP visual encoder $f_{v}$ , CLIP text encoder $f_{t}$ Given an image $\mathcal{I}\in \mathbb{R}^{H\times W\times 3}$ and a list $\mathcal{T}$ containing $C$ category names. $\mathcal{E} = f_t(\mathcal{T})$ $\mathcal{M} = f_m(\mathcal{I})$
341
+ for $t = 1,2,\ldots ,N$ do
342
+ $\mathcal{R}_i = \mathcal{M}_i\odot \mathcal{I}$ $\mathcal{V}_i = f_v(\mathcal{R}_i)$ $\mathcal{Y}_i = \mathrm{softmax}(\mathcal{E}\otimes \mathcal{V}_i)$
343
+ end for
344
+
345
+ ![](images/d56a5edb0cafc2a66d0b192dec853c3427882c5bdffe4452cf10002ca17d571c.jpg)
346
+ Figure 6: Illustration of the CLIP baseline.
347
+
348
+ # B. Ablation on using Relative Mask Attention in Different Layers
349
+
350
+ In this part we conduct an ablation study on using different layers for relative mask attention. Since our pretrained CLIP model is fixed during the whole training procedure, whether each layer would help the final results remains a question. We use four different kinds of layers combination of the layers in this part and provide the results in Table 9. We can see that the last layer is a key part of our results since the features are gradually learned through all the attention layer. Though the last four layers' features should the best, the performance wouldn't be better if Relative Mask Attention is only used in the last four layers. This is also reasonable since the network should not have the accurate mask information too late.
351
+
352
+ Table 9: Ablation Study on Relative Mask Attention Layers in different layers. All the methods are trained on COCO and tested on ADE20K validation dataset. The pretrained CLIP ViT-L/14@336px model has 24 layers and we replace four of them with our relative mask attention to fully utilize the accurate mask information and refine the masks.
353
+
354
+ <table><tr><td>Different Layers</td><td>PQ</td><td>PQTh</td><td>PQS</td></tr><tr><td>1, 7, 13, 19</td><td>11.241</td><td>10.519</td><td>12.686</td></tr><tr><td>3, 9, 15, 21</td><td>11.372</td><td>10.141</td><td>13.835</td></tr><tr><td>21, 22, 23, 24</td><td>14.673</td><td>14.048</td><td>15.922</td></tr><tr><td>6, 12, 18, 24</td><td>15.121</td><td>13.536</td><td>18.290</td></tr></table>
355
+
356
+ # C. More Visualization Results on Arbitrary Categories
357
+
358
+ In this part, we provide more visualization results on user-specified class discoveries in Figure 7. We select some very close text prompts such as "four-leg animal" and "two-leg animal"; "car", "truck" and "SUV" and find that our method can still classify them. We also show another result which is "person identification" in Figure 7 (c) which shows our model preserve the dense/local CLIP features rather well.
359
+
360
+ ![](images/d704654c7285c2a9de083c8b582fee717bb0caf0cca18c5855e89f57f0cce8fc.jpg)
361
+
362
+ ![](images/6575c85b38abf4a7d6377d30d6028e557987aefaad89c3689a7545063e15e546.jpg)
363
+
364
+ ![](images/8fdebb4ef8829e435b3c997666d3beeb8494e191cd0643fc146dd20b183855da.jpg)
365
+
366
+ ![](images/b2f13d000ad430eb2eca53cc2bf9cb9150a9a1f87c68f22a931ecc85662977d6.jpg)
367
+ (a) "four-leg animal", "two-leg animal", "background"
368
+
369
+ ![](images/ba2ef4d1bf2a8d4aeb8bfd0065614d2864e269a64e6bc0272d2ef853ebfc8cc4.jpg)
370
+ (b) "car", "truck", "SUV" "road", "sky"
371
+
372
+ ![](images/aab5d3a661dab29a2c319174bca24e641fa078e91a65a92cc9fe2af3d394798e.jpg)
373
+ (c) "Person: Obama", "Person: Biden", "Person: Trump"
374
+ Figure 7: More qualitative restuls on user-specified class. The labels above are the text prompts we used for testing the images. Texts in bold are novel classes i.e. don't exist in the labels of COCO training data.
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b57d7101f302139ece62b739a9e454798852406df2cc455dc6a7ee3f0140ff3
3
+ size 861957
2023/Open-Vocabulary Universal Image Segmentation with MaskCLIP/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2023/OpenFE_ Automated Feature Generation with Expert-level Performance/4cb285e8-db2a-41a4-93db-f20359a609ed_content_list.json ADDED
The diff for this file is too large to render. See raw diff