Chelsea707 commited on
Commit
1c558e2
·
verified ·
1 Parent(s): 8c13724

Add Batch 80b3aa12-77d3-4ae2-b4df-62d981bbe961 data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +64 -0
  2. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_content_list.json +0 -0
  3. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_model.json +0 -0
  4. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_origin.pdf +3 -0
  5. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/full.md +0 -0
  6. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/images.zip +3 -0
  7. 2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/layout.json +0 -0
  8. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_content_list.json +0 -0
  9. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_model.json +0 -0
  10. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_origin.pdf +3 -0
  11. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/full.md +468 -0
  12. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/images.zip +3 -0
  13. 2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/layout.json +0 -0
  14. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_content_list.json +0 -0
  15. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_model.json +0 -0
  16. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_origin.pdf +3 -0
  17. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/full.md +832 -0
  18. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/images.zip +3 -0
  19. 2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/layout.json +0 -0
  20. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_content_list.json +0 -0
  21. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_model.json +0 -0
  22. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_origin.pdf +3 -0
  23. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/full.md +547 -0
  24. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/images.zip +3 -0
  25. 2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/layout.json +0 -0
  26. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_content_list.json +0 -0
  27. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_model.json +0 -0
  28. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_origin.pdf +3 -0
  29. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/full.md +572 -0
  30. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/images.zip +3 -0
  31. 2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/layout.json +0 -0
  32. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_content_list.json +0 -0
  33. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_model.json +0 -0
  34. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_origin.pdf +3 -0
  35. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/full.md +566 -0
  36. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/images.zip +3 -0
  37. 2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/layout.json +0 -0
  38. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_content_list.json +0 -0
  39. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_model.json +0 -0
  40. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_origin.pdf +3 -0
  41. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/full.md +439 -0
  42. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/images.zip +3 -0
  43. 2024/Sufficient conditions for offline reactivation in recurrent neural networks/layout.json +0 -0
  44. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_content_list.json +0 -0
  45. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_model.json +0 -0
  46. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_origin.pdf +3 -0
  47. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/full.md +0 -0
  48. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/images.zip +3 -0
  49. 2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/layout.json +0 -0
  50. 2024/Supervised Knowledge Makes Large Language Models Better In-context Learners/a11ee9aa-f3c6-49ae-825d-9e08768ce2ce_content_list.json +0 -0
.gitattributes CHANGED
@@ -5349,3 +5349,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
5349
  2024/StructComp_[[:space:]]Substituting[[:space:]]propagation[[:space:]]with[[:space:]]Structural[[:space:]]Compression[[:space:]]in[[:space:]]Training[[:space:]]Graph[[:space:]]Contrastive[[:space:]]Learning/133962bc-9c43-4fbd-8120-21abb72581fd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5350
  2024/Structural[[:space:]]Estimation[[:space:]]of[[:space:]]Partially[[:space:]]Observed[[:space:]]Linear[[:space:]]Non-Gaussian[[:space:]]Acyclic[[:space:]]Model_[[:space:]]A[[:space:]]Practical[[:space:]]Approach[[:space:]]with[[:space:]]Identifiability/25104a2e-3981-4cf8-9163-b4c2200a7808_origin.pdf filter=lfs diff=lfs merge=lfs -text
5351
  2024/Structural[[:space:]]Fairness-aware[[:space:]]Active[[:space:]]Learning[[:space:]]for[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/90a39a67-aeff-4eac-ab58-440f67416ad3_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5349
  2024/StructComp_[[:space:]]Substituting[[:space:]]propagation[[:space:]]with[[:space:]]Structural[[:space:]]Compression[[:space:]]in[[:space:]]Training[[:space:]]Graph[[:space:]]Contrastive[[:space:]]Learning/133962bc-9c43-4fbd-8120-21abb72581fd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5350
  2024/Structural[[:space:]]Estimation[[:space:]]of[[:space:]]Partially[[:space:]]Observed[[:space:]]Linear[[:space:]]Non-Gaussian[[:space:]]Acyclic[[:space:]]Model_[[:space:]]A[[:space:]]Practical[[:space:]]Approach[[:space:]]with[[:space:]]Identifiability/25104a2e-3981-4cf8-9163-b4c2200a7808_origin.pdf filter=lfs diff=lfs merge=lfs -text
5351
  2024/Structural[[:space:]]Fairness-aware[[:space:]]Active[[:space:]]Learning[[:space:]]for[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks/90a39a67-aeff-4eac-ab58-440f67416ad3_origin.pdf filter=lfs diff=lfs merge=lfs -text
5352
+ 2024/Structural[[:space:]]Inference[[:space:]]with[[:space:]]Dynamics[[:space:]]Encoding[[:space:]]and[[:space:]]Partial[[:space:]]Correlation[[:space:]]Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_origin.pdf filter=lfs diff=lfs merge=lfs -text
5353
+ 2024/Structured[[:space:]]Video-Language[[:space:]]Modeling[[:space:]]with[[:space:]]Temporal[[:space:]]Grouping[[:space:]]and[[:space:]]Spatial[[:space:]]Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_origin.pdf filter=lfs diff=lfs merge=lfs -text
5354
+ 2024/Structuring[[:space:]]Representation[[:space:]]Geometry[[:space:]]with[[:space:]]Rotationally[[:space:]]Equivariant[[:space:]]Contrastive[[:space:]]Learning/210d5ae4-a566-42e4-b258-774314f1b83e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5355
+ 2024/Stylized[[:space:]]Offline[[:space:]]Reinforcement[[:space:]]Learning_[[:space:]]Extracting[[:space:]]Diverse[[:space:]]High-Quality[[:space:]]Behaviors[[:space:]]from[[:space:]]Heterogeneous[[:space:]]Datasets/3364d27c-6293-4339-89fb-517362683f0e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5356
+ 2024/SuRe_[[:space:]]Summarizing[[:space:]]Retrievals[[:space:]]using[[:space:]]Answer[[:space:]]Candidates[[:space:]]for[[:space:]]Open-domain[[:space:]]QA[[:space:]]of[[:space:]]LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_origin.pdf filter=lfs diff=lfs merge=lfs -text
5357
+ 2024/Successor[[:space:]]Heads_[[:space:]]Recurring,[[:space:]]Interpretable[[:space:]]Attention[[:space:]]Heads[[:space:]]In[[:space:]]The[[:space:]]Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
5358
+ 2024/Sufficient[[:space:]]conditions[[:space:]]for[[:space:]]offline[[:space:]]reactivation[[:space:]]in[[:space:]]recurrent[[:space:]]neural[[:space:]]networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5359
+ 2024/Sum-Product-Set[[:space:]]Networks_[[:space:]]Deep[[:space:]]Tractable[[:space:]]Models[[:space:]]for[[:space:]]Tree-Structured[[:space:]]Graphs/9310a89c-a275-4156-9919-9c74c45d2990_origin.pdf filter=lfs diff=lfs merge=lfs -text
5360
+ 2024/Supervised[[:space:]]Knowledge[[:space:]]Makes[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Better[[:space:]]In-context[[:space:]]Learners/a11ee9aa-f3c6-49ae-825d-9e08768ce2ce_origin.pdf filter=lfs diff=lfs merge=lfs -text
5361
+ 2024/SweetDreamer_[[:space:]]Aligning[[:space:]]Geometric[[:space:]]Priors[[:space:]]in[[:space:]]2D[[:space:]]diffusion[[:space:]]for[[:space:]]Consistent[[:space:]]Text-to-3D/b04730a1-62be-453b-97e9-c356a9f748c6_origin.pdf filter=lfs diff=lfs merge=lfs -text
5362
+ 2024/Symbol[[:space:]]as[[:space:]]Points_[[:space:]]Panoptic[[:space:]]Symbol[[:space:]]Spotting[[:space:]]via[[:space:]]Point-based[[:space:]]Representation/2eafa718-c8e8-4a59-b6f8-badb1c696f56_origin.pdf filter=lfs diff=lfs merge=lfs -text
5363
+ 2024/Symmetric[[:space:]]Basis[[:space:]]Convolutions[[:space:]]for[[:space:]]Learning[[:space:]]Lagrangian[[:space:]]Fluid[[:space:]]Mechanics/bbedef83-0917-4007-b741-461f3d0fd8d3_origin.pdf filter=lfs diff=lfs merge=lfs -text
5364
+ 2024/Symmetric[[:space:]]Neural-Collapse[[:space:]]Representations[[:space:]]with[[:space:]]Supervised[[:space:]]Contrastive[[:space:]]Loss_[[:space:]]The[[:space:]]Impact[[:space:]]of[[:space:]]ReLU[[:space:]]and[[:space:]]Batching/bc3879be-6948-427b-9b4f-abc3e42482e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5365
+ 2024/Symmetric[[:space:]]Single[[:space:]]Index[[:space:]]Learning/e8de9972-a509-4031-aa3b-a222bdffbb6a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5366
+ 2024/Symphony_[[:space:]]Symmetry-Equivariant[[:space:]]Point-Centered[[:space:]]Spherical[[:space:]]Harmonics[[:space:]]for[[:space:]]3D[[:space:]]Molecule[[:space:]]Generation/54286edc-f170-4769-a37d-135579b82427_origin.pdf filter=lfs diff=lfs merge=lfs -text
5367
+ 2024/Synapse_[[:space:]]Trajectory-as-Exemplar[[:space:]]Prompting[[:space:]]with[[:space:]]Memory[[:space:]]for[[:space:]]Computer[[:space:]]Control/24e9a9ae-47d1-47ac-806f-6c1e0993460a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5368
+ 2024/Synergistic[[:space:]]Patch[[:space:]]Pruning[[:space:]]for[[:space:]]Vision[[:space:]]Transformer_[[:space:]]Unifying[[:space:]]Intra-[[:space:]]&[[:space:]]Inter-Layer[[:space:]]Patch[[:space:]]Importance/2a908008-4c38-4bf1-9c48-494a7ddd3700_origin.pdf filter=lfs diff=lfs merge=lfs -text
5369
+ 2024/T-MARS_[[:space:]]Improving[[:space:]]Visual[[:space:]]Representations[[:space:]]by[[:space:]]Circumventing[[:space:]]Text[[:space:]]Feature[[:space:]]Learning/fa91e616-80d5-470f-973c-56e927a68dcb_origin.pdf filter=lfs diff=lfs merge=lfs -text
5370
+ 2024/T-Rep_[[:space:]]Representation[[:space:]]Learning[[:space:]]for[[:space:]]Time[[:space:]]Series[[:space:]]using[[:space:]]Time-Embeddings/ab289463-12e8-4be3-9066-568da2e9d913_origin.pdf filter=lfs diff=lfs merge=lfs -text
5371
+ 2024/TAB_[[:space:]]Temporal[[:space:]]Accumulated[[:space:]]Batch[[:space:]]Normalization[[:space:]]in[[:space:]]Spiking[[:space:]]Neural[[:space:]]Networks/0c453321-ffe6-496d-b871-925068433384_origin.pdf filter=lfs diff=lfs merge=lfs -text
5372
+ 2024/TACTiS-2_[[:space:]]Better,[[:space:]]Faster,[[:space:]]Simpler[[:space:]]Attentional[[:space:]]Copulas[[:space:]]for[[:space:]]Multivariate[[:space:]]Time[[:space:]]Series/8ad87476-a243-4542-aa4e-f76e52441c96_origin.pdf filter=lfs diff=lfs merge=lfs -text
5373
+ 2024/TAIL_[[:space:]]Task-specific[[:space:]]Adapters[[:space:]]for[[:space:]]Imitation[[:space:]]Learning[[:space:]]with[[:space:]]Large[[:space:]]Pretrained[[:space:]]Models/eb554a7b-3655-4abe-bf25-1ffb616e667a_origin.pdf filter=lfs diff=lfs merge=lfs -text
5374
+ 2024/TEDDY_[[:space:]]Trimming[[:space:]]Edges[[:space:]]with[[:space:]]Degree-based[[:space:]]Discrimination[[:space:]]Strategy/2e37dae3-5ae7-4875-aa7b-4bf2cad1c732_origin.pdf filter=lfs diff=lfs merge=lfs -text
5375
+ 2024/TEMPO_[[:space:]]Prompt-based[[:space:]]Generative[[:space:]]Pre-trained[[:space:]]Transformer[[:space:]]for[[:space:]]Time[[:space:]]Series[[:space:]]Forecasting/6e5d73d7-74a7-4864-a025-bda6fbf06791_origin.pdf filter=lfs diff=lfs merge=lfs -text
5376
+ 2024/TESTAM_[[:space:]]A[[:space:]]Time-Enhanced[[:space:]]Spatio-Temporal[[:space:]]Attention[[:space:]]Model[[:space:]]with[[:space:]]Mixture[[:space:]]of[[:space:]]Experts/635d3c6b-e2f6-4e0e-996d-0818c8cf26a0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5377
+ 2024/TEST_[[:space:]]Text[[:space:]]Prototype[[:space:]]Aligned[[:space:]]Embedding[[:space:]]to[[:space:]]Activate[[:space:]]LLM's[[:space:]]Ability[[:space:]]for[[:space:]]Time[[:space:]]Series/a6cd1bf2-38f0-44b7-8f79-398274d33eed_origin.pdf filter=lfs diff=lfs merge=lfs -text
5378
+ 2024/THOUGHT[[:space:]]PROPAGATION_[[:space:]]AN[[:space:]]ANALOGICAL[[:space:]]APPROACH[[:space:]]TO[[:space:]]COMPLEX[[:space:]]REASONING[[:space:]]WITH[[:space:]]LARGE[[:space:]]LANGUAGE[[:space:]]MODELS/83c2f2ac-68d4-4946-8be7-432e2a0a8055_origin.pdf filter=lfs diff=lfs merge=lfs -text
5379
+ 2024/TOSS_[[:space:]]High-quality[[:space:]]Text-guided[[:space:]]Novel[[:space:]]View[[:space:]]Synthesis[[:space:]]from[[:space:]]a[[:space:]]Single[[:space:]]Image/b26f7e7a-9a6e-4bdc-a654-f0d9ada775df_origin.pdf filter=lfs diff=lfs merge=lfs -text
5380
+ 2024/TUVF_[[:space:]]Learning[[:space:]]Generalizable[[:space:]]Texture[[:space:]]UV[[:space:]]Radiance[[:space:]]Fields/1b544133-b506-4877-9985-b0762939afbb_origin.pdf filter=lfs diff=lfs merge=lfs -text
5381
+ 2024/TabR_[[:space:]]Tabular[[:space:]]Deep[[:space:]]Learning[[:space:]]Meets[[:space:]]Nearest[[:space:]]Neighbors/af05d6ca-328e-4f9b-bde9-6f59a26ba69d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5382
+ 2024/Tackling[[:space:]]the[[:space:]]Data[[:space:]]Heterogeneity[[:space:]]in[[:space:]]Asynchronous[[:space:]]Federated[[:space:]]Learning[[:space:]]with[[:space:]]Cached[[:space:]]Update[[:space:]]Calibration/7acc9286-ea1d-40fe-b8bd-8cfb82d52320_origin.pdf filter=lfs diff=lfs merge=lfs -text
5383
+ 2024/Tag2Text_[[:space:]]Guiding[[:space:]]Vision-Language[[:space:]]Model[[:space:]]via[[:space:]]Image[[:space:]]Tagging/17f3a5b6-9f42-48e9-beed-6a4cab14dd76_origin.pdf filter=lfs diff=lfs merge=lfs -text
5384
+ 2024/Tailoring[[:space:]]Self-Rationalizers[[:space:]]with[[:space:]]Multi-Reward[[:space:]]Distillation/4d2ed54a-e899-49a0-9c8b-9d3ec1b59ee0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5385
+ 2024/Take[[:space:]]a[[:space:]]Step[[:space:]]Back_[[:space:]]Evoking[[:space:]]Reasoning[[:space:]]via[[:space:]]Abstraction[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/e4809217-472b-4a61-a463-30264856799e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5386
+ 2024/Talk[[:space:]]like[[:space:]]a[[:space:]]Graph_[[:space:]]Encoding[[:space:]]Graphs[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/1c1de19d-1c1b-4863-a2a3-b5b2561f7676_origin.pdf filter=lfs diff=lfs merge=lfs -text
5387
+ 2024/Tangent[[:space:]]Transformers[[:space:]]for[[:space:]]Composition,Privacy[[:space:]]and[[:space:]]Removal/69b4e14b-112f-4d1a-b23b-2510d8153a1d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5388
+ 2024/TapMo_[[:space:]]Shape-aware[[:space:]]Motion[[:space:]]Generation[[:space:]]of[[:space:]]Skeleton-free[[:space:]]Characters/aebee8bd-1e55-4531-89b1-f8c79644745d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5389
+ 2024/Task[[:space:]]Planning[[:space:]]for[[:space:]]Visual[[:space:]]Room[[:space:]]Rearrangement[[:space:]]under[[:space:]]Partial[[:space:]]Observability/c850c233-8136-4d65-ad38-5ccc72e2a06e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5390
+ 2024/Task[[:space:]]structure[[:space:]]and[[:space:]]nonlinearity[[:space:]]jointly[[:space:]]determine[[:space:]]learned[[:space:]]representational[[:space:]]geometry/d0b14227-0075-4fc1-813b-478830cc1afd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5391
+ 2024/Teach[[:space:]]LLMs[[:space:]]to[[:space:]]Phish_[[:space:]]Stealing[[:space:]]Private[[:space:]]Information[[:space:]]from[[:space:]]Language[[:space:]]Models/fe11d8cd-493a-471a-916d-44fe66c481bf_origin.pdf filter=lfs diff=lfs merge=lfs -text
5392
+ 2024/Teaching[[:space:]]Arithmetic[[:space:]]to[[:space:]]Small[[:space:]]Transformers/3ad37d49-c32a-4fe7-afd5-bee9fec5f2f5_origin.pdf filter=lfs diff=lfs merge=lfs -text
5393
+ 2024/Teaching[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Hallucinate[[:space:]]Less[[:space:]]with[[:space:]]Synthetic[[:space:]]Tasks/9d942325-e293-4398-8bef-76bcbbabf95e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5394
+ 2024/Teaching[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Self-Debug/e4ab6cb5-cc00-4f33-a699-9cd38ba0c3dd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5395
+ 2024/Tell[[:space:]]Your[[:space:]]Model[[:space:]]Where[[:space:]]to[[:space:]]Attend_[[:space:]]Post-hoc[[:space:]]Attention[[:space:]]Steering[[:space:]]for[[:space:]]LLMs/822fa70e-f058-49dc-8b96-3f4c783befc5_origin.pdf filter=lfs diff=lfs merge=lfs -text
5396
+ 2024/Temporal[[:space:]]Generalization[[:space:]]Estimation[[:space:]]in[[:space:]]Evolving[[:space:]]Graphs/cdeb1d8f-04bc-4aec-a0c3-36997813cfd0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5397
+ 2024/Tensor[[:space:]]Programs[[:space:]]VI_[[:space:]]Feature[[:space:]]Learning[[:space:]]in[[:space:]]Infinite[[:space:]]Depth[[:space:]]Neural[[:space:]]Networks/e60ae015-c96c-434c-99c0-9064bc809051_origin.pdf filter=lfs diff=lfs merge=lfs -text
5398
+ 2024/Test-Time[[:space:]]Adaptation[[:space:]]with[[:space:]]CLIP[[:space:]]Reward[[:space:]]for[[:space:]]Zero-Shot[[:space:]]Generalization[[:space:]]in[[:space:]]Vision-Language[[:space:]]Models/324ca4e9-5978-4a78-92a4-39da49b062ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
5399
+ 2024/Test-Time[[:space:]]Training[[:space:]]on[[:space:]]Nearest[[:space:]]Neighbors[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/afc00c4c-9647-436b-ab8f-19eedcf4b4ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
5400
+ 2024/Test-time[[:space:]]Adaptation[[:space:]]against[[:space:]]Multi-modal[[:space:]]Reliability[[:space:]]Bias/3fa6d176-7382-4809-99ed-cfe1e0e987b6_origin.pdf filter=lfs diff=lfs merge=lfs -text
5401
+ 2024/Text-to-3D[[:space:]]with[[:space:]]Classifier[[:space:]]Score[[:space:]]Distillation/77fa21d4-221b-47e2-b971-b8e3d9e5acd0_origin.pdf filter=lfs diff=lfs merge=lfs -text
5402
+ 2024/TextField3D_[[:space:]]Towards[[:space:]]Enhancing[[:space:]]Open-Vocabulary[[:space:]]3D[[:space:]]Generation[[:space:]]with[[:space:]]Noisy[[:space:]]Text[[:space:]]Fields/1c4d51cd-2d2e-45ac-a05d-23cedf4d2d00_origin.pdf filter=lfs diff=lfs merge=lfs -text
5403
+ 2024/The[[:space:]]Alignment[[:space:]]Problem[[:space:]]from[[:space:]]a[[:space:]]Deep[[:space:]]Learning[[:space:]]Perspective/98a79d73-a092-4ab3-9d56-da1af3e1c32d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5404
+ 2024/The[[:space:]]All-Seeing[[:space:]]Project_[[:space:]]Towards[[:space:]]Panoptic[[:space:]]Visual[[:space:]]Recognition[[:space:]]and[[:space:]]Understanding[[:space:]]of[[:space:]]the[[:space:]]Open[[:space:]]World/3856ec63-a219-47b9-b019-3839ed107910_origin.pdf filter=lfs diff=lfs merge=lfs -text
5405
+ 2024/The[[:space:]]Blessing[[:space:]]of[[:space:]]Randomness_[[:space:]]SDE[[:space:]]Beats[[:space:]]ODE[[:space:]]in[[:space:]]General[[:space:]]Diffusion-based[[:space:]]Image[[:space:]]Editing/30c6d982-f9d0-4a11-8acf-7e044a862fdd_origin.pdf filter=lfs diff=lfs merge=lfs -text
5406
+ 2024/The[[:space:]]Cost[[:space:]]of[[:space:]]Scaling[[:space:]]Down[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]Reducing[[:space:]]Model[[:space:]]Size[[:space:]]Affects[[:space:]]Memory[[:space:]]before[[:space:]]In-context[[:space:]]Learning/82610220-eaee-49c9-bbb9-086fd1c2932d_origin.pdf filter=lfs diff=lfs merge=lfs -text
5407
+ 2024/The[[:space:]]Curse[[:space:]]of[[:space:]]Diversity[[:space:]]in[[:space:]]Ensemble-Based[[:space:]]Exploration/4cf9ee47-9805-4b13-ad22-d60cf119aa29_origin.pdf filter=lfs diff=lfs merge=lfs -text
5408
+ 2024/The[[:space:]]Devil[[:space:]]is[[:space:]]in[[:space:]]the[[:space:]]Neurons_[[:space:]]Interpreting[[:space:]]and[[:space:]]Mitigating[[:space:]]Social[[:space:]]Biases[[:space:]]in[[:space:]]Language[[:space:]]Models/70797330-e9c1-4b00-8ff7-bac17168803c_origin.pdf filter=lfs diff=lfs merge=lfs -text
5409
+ 2024/The[[:space:]]Devil[[:space:]]is[[:space:]]in[[:space:]]the[[:space:]]Object[[:space:]]Boundary_[[:space:]]Towards[[:space:]]Annotation-free[[:space:]]Instance[[:space:]]Segmentation[[:space:]]using[[:space:]]Foundation[[:space:]]Models/bd084001-b323-4ab8-ad90-f748f9bd88be_origin.pdf filter=lfs diff=lfs merge=lfs -text
5410
+ 2024/The[[:space:]]Effect[[:space:]]of[[:space:]]Intrinsic[[:space:]]Dataset[[:space:]]Properties[[:space:]]on[[:space:]]Generalization_[[:space:]]Unraveling[[:space:]]Learning[[:space:]]Differences[[:space:]]Between[[:space:]]Natural[[:space:]]and[[:space:]]Medical[[:space:]]Images/8e0d81f2-6fa8-4f98-938e-8838d36ae46e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5411
+ 2024/The[[:space:]]Effectiveness[[:space:]]of[[:space:]]Random[[:space:]]Forgetting[[:space:]]for[[:space:]]Robust[[:space:]]Generalization/c09ce3cb-a212-4cc5-ac31-269a3433b89c_origin.pdf filter=lfs diff=lfs merge=lfs -text
5412
+ 2024/The[[:space:]]Expressive[[:space:]]Leaky[[:space:]]Memory[[:space:]]Neuron_[[:space:]]an[[:space:]]Efficient[[:space:]]and[[:space:]]Expressive[[:space:]]Phenomenological[[:space:]]Neuron[[:space:]]Model[[:space:]]Can[[:space:]]Solve[[:space:]]Long-Horizon[[:space:]]Tasks./e7f7f7cc-ad43-4d62-8b95-b0b61a03f497_origin.pdf filter=lfs diff=lfs merge=lfs -text
5413
+ 2024/The[[:space:]]Expressive[[:space:]]Power[[:space:]]of[[:space:]]Low-Rank[[:space:]]Adaptation/9d7c4faf-fc66-4682-84b0-29bc2d58695e_origin.pdf filter=lfs diff=lfs merge=lfs -text
5414
+ 2024/The[[:space:]]Expressive[[:space:]]Power[[:space:]]of[[:space:]]Transformers[[:space:]]with[[:space:]]Chain[[:space:]]of[[:space:]]Thought/57660281-06bc-441b-bf44-703e298404e1_origin.pdf filter=lfs diff=lfs merge=lfs -text
5415
+ 2024/The[[:space:]]Generalization[[:space:]]Gap[[:space:]]in[[:space:]]Offline[[:space:]]Reinforcement[[:space:]]Learning/dd16111b-22db-46b9-ba18-0a48a0cae97f_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/9d0f1f08-909d-4e8c-82ad-2986d3a88bf8_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bffc8f12feb3e726e560720c8cc61de5c42e66ecb6c803ac4ab78bd96674682
3
+ size 593697
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d7ebc69205b919687002da3d486063e7a4409cebc577d1db37ddb6ca154d60c
3
+ size 743397
2024/Structural Inference with Dynamics Encoding and Partial Correlation Coefficients/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/ec1ee8e5-4b58-4f5e-b254-a8d518211f27_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3040d54c59bd998420ae9576f4254a5d5d3c0c7f43897871f87ef50611afdf27
3
+ size 7527908
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/full.md ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STRUCTURED VIDEO-LANGUAGE MODELING WITH TEMPORAL GROUPING AND SPATIAL GROUNDING
2
+
3
+ Yuanhao Xiong $^{1,3*}$ Long Zhao $^{1}$ Boqing Gong $^{1}$ Ming-Hsuan Yang $^{1}$
4
+
5
+ Florian Schroff $^{1}$ Ting Liu $^{1}$ Cho-Jui Hsieh $^{2,3}$ Liangzhe Yuan $^{1}$
6
+
7
+ $^{1}$ Google Research $^{2}$ Google $^{3}$ UCLA
8
+
9
+ # ABSTRACT
10
+
11
+ Existing video-language pre-training methods primarily focus on instance-level alignment between video clips and captions via global contrastive learning but neglect rich fine-grained local information in both videos and text, which is of importance to downstream tasks requiring temporal localization and semantic reasoning. A powerful model is expected to be capable of capturing region-object correspondences and recognizing scene changes in a video clip, reflecting spatial and temporal granularity, respectively. To strengthen model's understanding into such fine-grained details, we propose a simple yet effective video-language modeling framework, S-ViLM, by exploiting the intrinsic structures of these two modalities. It includes two novel designs, inter-clip spatial grounding and intra-clip temporal grouping, to promote learning region-object alignment and temporal-aware features, simultaneously. Comprehensive evaluations demonstrate that S-ViLM performs favorably against existing approaches in learning more expressive representations. Specifically, S-ViLM surpasses the state-of-the-art methods substantially on four representative downstream tasks, covering text-video retrieval, video question answering, video action recognition, and temporal action localization.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Videos are composed of groups of pixels spanning spatially and temporally. Semantically related groups of pixels form the objects in the visual scenes and their changes through space and time vividly show the action and interactions of physical world. Scene switching further complicates the video story line and finally depicts attractive video stories. The similar structures also appear in the paragraphs when they come to describe the videos. Captions are built from the basic grammar components such as nouns and verbs, and sentences are concatenated to describe complex scenes.
16
+
17
+ Modern video-language models (VLMs), however, mostly neglect the fine-grained structures of such video-text pairs during the development. Video-language pre-training typically follows the pipeline: (1) encoding video and text pairs into latent representations, (2) modality fusion, and (3) pre-training on specific objectives. Existing methods typically optimize these three components in the pre-training pipeline by designing expressive encoders (Bain et al., 2021; Li et al., 2022; Ge et al., 2022a; Nagrani et al., 2022; Ma et al., 2023), fusing two modalities via a cross-encoder (Ge et al., 2022a; Li et al., 2022; Lei et al., 2021; Li et al., 2020; Luo et al., 2020; Xu et al., 2021a; Zhu & Yang, 2020), or adopting a combination of various pre-training tasks such as contrastive learning and masked modeling (Li et al., 2022; Ge et al., 2022a; Fu et al., 2021; Zellers et al., 2022; Cao et al., 2022; Ge et al., 2022b). While these modifications benefit the pre-trained model, their lack of local discriminative modeling poses challenges for VLMs to further understand complex videos.
18
+
19
+ It has been shown that most video-language pre-training methods merely perform well on learning holistic representations to match a $\langle$ video, caption $\rangle$ pair while neglect fine-grained information such as region-object correspondences, or scene/action changes along the time in a video (Akbari et al., 2021; Bain et al., 2021; Lei et al., 2021; Li et al., 2020; Luo et al., 2020; Miech et al., 2019; Xu et al., 2021b; Nagrani et al., 2022). However, such regional or temporal fine-grained information has been demonstrated to play a vital role in localization and reasoning tasks (Li et al., 2022; Ge et al., 2022a;
20
+
21
+ Zhang et al., 2022; Ma et al., 2023; Yuan et al., 2022). Motivated by aforementioned observations, we revive the strong connectivity between basic components of video clips and languages during self-supervised video-language pre-training. We approach the video-language pre-training task from a different perspective with a focus on exploiting spatiotemporally fine-grained structures.
22
+
23
+ In this work, we incorporate structured video-language interactions into the pre-training stage and propose a novel framework, namely Structured Video-Language Modeling (S-ViLM), with temporal grouping and spatial grounding. S-ViLM encourages instance-level video-caption alignment, fine-grained region-object alignment, and learns temporal-aware video representations, simultaneously. As shown in Figure 1, S-ViLM consists of three primary training objectives: inter-clip spatial grounding, intra-clip temporal grouping, and global contrastive learning. Given a video-caption pair as the input, a classical dual-encoder model is leveraged to extract the representation for each modality, respectively. Videos are pre-processed with the cut-and-paste operation, inspired by (Zhang et al., 2022; Yun et al., 2019), i.e., pasting one clip in a video onto the other background video, to explicitly introduce temporal scene changes. We further adopt grouping blocks (Xu et al., 2022; Yu et al., 2022) to aggregate semantically similar video patches to represent regions without off-the-shelf detectors via a set of group tokens shared among all videos. In inter-clip spatial grounding, we align grouped video tokens with objects represented by nouns in the caption by minimizing our designed grounding loss. In intra-clip temporal grouping, we improve features temporal granularity by distinguishing foreground and background representations within one clip. Finally, the model is trained by a global video-caption contrastive loss to match instance-level video-caption pairs. We evaluate our proposed method comprehensively on four representative tasks, including text-video retrieval, video question answering, video action recognition, and temporal action localization. Our strong experimental results demonstrate that exploiting fine-grained video-text structures during pretraining effectively improves VLM's video understanding and reasoning capabilities.
24
+
25
+ Our key contributions are summarized as follows:
26
+
27
+ - We propose S-ViLM, a dual-encoder video-language modeling framework, making use of structured video-caption interactions to learn more expressive spatiotemporal features.
28
+ - We leverage a cut-and-paste operation to introduce scene changes into videos during pretraining, and propose an intra-clip grouping module to learn more temporal-aware features.
29
+ - We design an inter-clip spatial grounding module to capture fine-grained correspondences by aligning objects from the caption and regions from the video in a self-supervised manner.
30
+ - Experimental results have demonstrated the effectiveness of S-ViLM on four downstream tasks, including text-video retrieval, video question answering, video action recognition, and temporal action localization. For example, S-ViLM outperforms SOTA by $3\%$ in R@1 in zero-shot video-text retrieval on MSR-VTT and $5\%$ in accuracy in action recognition on UCF101, showing its advantages over both multi-modal and single-modal tasks.
31
+
32
+ # 2 RELATED WORK
33
+
34
+ Video-language pre-training. Video-language pre-training is an emerging research area that aims to develop machine learning models capable of jointly understanding visual and textual content. Representations learned from large scale noisy datasets such as HowTo100M (Miech et al., 2019), WebVid (Bain et al., 2021), and VideoCC (Nagrani et al., 2022) have demonstrated great potentials in adapting to downstream tasks, including but not limited to text-video retrieval, video question answering, and video captioning. Elaborately designed pre-training objectives ranging from generative (Chen et al., 2020b; Fu et al., 2021; Li et al., 2019; Liu et al., 2022) to discriminative (Bain et al., 2021; Lei et al., 2021; Akbari et al., 2021; Sun et al., 2022; Li et al., 2022; Ge et al., 2022a; Ma et al., 2022; Wang et al., 2023a;b;c) have been proposed, among which contrastive learning is prevalent and widely adopted to attract paired video-caption instances and repelling unpaired ones. However, their primary focus is still on learning holistic global representations to align instance-level $\langle$ video, caption\rangle pairs. Recently, some approaches have been proposed to leverage finer-grained information such as nouns/verb phrases from a caption. ALPRO (Li et al., 2022) extracts pseudo entity labels by feeding noun prompts into a frozen model and use contrastive objective to align cropped visual regions and the corresponding textual labels. In Ge et al. (2022a), MCQ recovers randomly masked noun/verb tokens via resorting to global video features, which implicitly improves text entity
35
+
36
+ association in visual encoding. LAVILA (Zhao et al., 2023) constructed temporally dense captions by automatic annotation from large language models to describe activities more comprehensively. In addition, TemPVL (Ma et al., 2023) enables temporal and semantic alignment such that the trained model can accurately perceive temporal boundaries in videos given the text description. Despite these efforts, correspondences between visual regions and objects from noun concepts in captions and temporal scene shifts in a video are still neglected and not modeled explicitly in existing video-language pre-training methods. In this work, we propose two novel designs, spatial grounding and temporal grouping, to leverage fine-grained information in the pre-training stage.
37
+
38
+ Vision language grounding. The goal of visual grounding (VG) is to locate the most relevant object or region in a visual input based on a natural language query (Fang et al., 2015; Rohrbach et al., 2016; Fukui et al., 2016; Ghiasi et al., 2022; Gupta et al., 2020). Recently, visual grounding has been adapted to pre-training tasks in a self-supervised manner for open-vocabulary image segmentation (Ghiasi et al., 2022; Xu et al., 2022). For example, OpenSeg (Ghiasi et al., 2022) semantically aligns a caption with extracted image regions via a grounding loss. Moreover, without the off-the-shelf object detectors, GroupViT (Xu et al., 2022) learns to group together semantic regions from text supervision by contrastive learning. Note that visual grounding is mostly discussed in the image domain and its success motivates us to extend visual-semantic alignment to video-language pre-training. To achieve this, we integrate a novel spatial grounding module in our framework to promote visual and textual entity correspondences in a self-supervised manner.
39
+
40
+ Video temporal modeling. In contrast to images, videos contain a sequence of dynamic frames and how to model temporal information is critical in video understanding (Feichtenhofer et al., 2019; Bertasius et al., 2021; Tran et al., 2014; Alwassel et al., 2021; Zhang et al., 2022; Qian et al., 2022). Specifically, TSP (Alwassel et al., 2021) learns temporal information via predicting clips inside or outside the action with substantial annotations. PAL (Zhang et al., 2022) aligns features of pasted pseudo action regions from two synthetic videos. BSP (Xu et al., 2021c) introduces a novel boundary-sensitive pretext task via classifying the boundary types of synthetic videos. These techniques are elaborately designed for training models on long videos such as movies or TV dramas, which contains natural scene changes. However, few of them have been considered in video-language pre-training since the majority of video-language datasets contains short videos with repeated frames and are lacking in temporal differences. Instead, we develop a temporal grouping method to learn temporal-aware clip features in a self-supervised manner. We show that features extracted from explicitly temporal modeling achieve significant improvements in not only temporal action localization tasks, but also coarse-grained reasoning and understanding tasks such as video question answering and video action recognition.
41
+
42
+ # 3 METHOD
43
+
44
+ # 3.1 OVERVIEW
45
+
46
+ The framework of S-ViLM is presented in Figure 1. We adopt the dual encoder architecture for video-language pre-training, and there are three primary objectives used in the pre-training stage: (1) inter-clip spatial grounding, (2) intra-clip temporal grouping, and (3) global contrastive learning.
47
+
48
+ As shown in Figure 1, temporal changes are first artificially introduced into training examples through cut-and-paste. Then the pre-processed video together with learnable group tokens are fed into the video encoder. Specifically, group tokens aggregate semantically similar video tokens via grouping blocks and are then aligned with object concepts by spatial grounding. It promotes region-object groundingness, which indicates the alignment between a region in the video and an object in the caption, e.g., as illustrated in Inter-clip Spatial Grounding in Figure 1, the red region corresponds exactly to the word "pins" in red. In contrast to previous methods where regions are extracted with pre-trained object detectors (Cai et al., 2022; Li et al., 2022; Yan et al., 2021), these learnable group tokens can cluster and organize semantically similar regions in a self-supervised manner, which is more effective and reduces the artifacts of any detectors. For the language branch, the original captions are tokenized into a sequence of text tokens, which are then fed into a text encoder to extract the corresponding representation from the preceding [CLS] token. Noun tokens representing objects are extracted in the same way given a set of prompts.
49
+
50
+ ![](images/fabe52d358d967bf338e30d86a65a116748d015b49fe55eeb9a673826b5ddf8d.jpg)
51
+ Figure 1: Illustration of S-ViLM pre-training. Three proposed training objectives promote structured video-language interaction: (1) temporal grouping learns temporal-aware features by distinguishing whether clips are from background or foreground; (2) spatial grounding focuses on local correspondences between regions and objects; (3) global contrastive learning matches instance-level $\langle$ video, caption $\rangle$ pairs.
52
+
53
+ To promote temporal awareness, we use masks derived from the cut-and-paste operations as the ground-truth for temporal grouping. Furthermore, we model the interaction between region features and noun tokens using inter-clip spatial grounding loss. Finally, a global contrastive loss is computed between the video and the caption representations to match the instance-level $\langle$ video, caption $\rangle$ pair.
54
+
55
+ # 3.2 INTRA-CLIP TEMPORAL GROUPING WITH CUT-AND-PASTE
56
+
57
+ Commonly-used video-language pre-training data usually consist of short video clips with repetitive scenes. To simulate scene shifts, we design a cut-and-paste operation inspired from image augmentations (Yun et al., 2019; Zhang et al., 2022) to introduce temporal changes manually to further improve video representations.
58
+
59
+ Given a target video $v_{i}$ with $T$ frames as the foreground and a randomly sampled video $v_{p_i}$ with the index $p_i$ as the background from the same batch of size $B$ , we divide each video into $N_{t} = T / t$ clips with the temporal window size $t$ . We then sample the start and end clip indices $s$ and $e$ from $(0, N_t)$ , and paste the corresponding region from $v_{i}$ into the background video $v_{p_i}$ to form a blended video $\hat{v}_i$ . For the clip sampling procedure, we first uniformly sample the duration of the foreground video $d$ from $[N_t / 2, N_t)$ to guarantee it is the majority of the blended video. Then we sample the start index $s$ from $[0, N_t - d)$ , and the end index $e$ was computed naturally as $e = s + d$ . We included this detail in our latest version. We define the foreground-background mask as $m_{i}\in \mathbb{R}^{N_{t}} = \{\mathbf{1}(j\in [s,e])|j\in [0,N_t)\}$ , where $\mathbf{1}(\cdot)$ is the indicator function. This operation is illustrated in Figure 1.
60
+
61
+ A video is first flattened into $N$ non-overlapping voxels. After projected by a linear layer, these voxel tokens are fed into the transformer encoder to obtain transformed tokens $z_{i}^{v}\in \mathbb{R}^{N\times d}$ , where $d$ is the feature dimension. To obtain clip-level representations $z_{i}^{\mathrm{clip}}\in R^{N_{t}\times d}$ , we average-pool over $z_{i}^{v}$ along the spatial dimension after recovering the feature map's 3D shape. Two cluster centers, $z_{i}^{b}$ for the background and $z_{i}^{f}$ for the foreground, are further computed by averaging features from $z_{i}^{v}$ on the corresponding position based on the mask $m_{i}$ . To assign each clip to either background or foreground, we compute $a_{i}$ via cosine similarity with an element-wise softmax function applied on the last dimension, where $\langle \cdot ,\cdot \rangle$ is cosine similarity and $\tau$ is the temperature to scale logits:
62
+
63
+ $$
64
+ a _ {i} = \operatorname {S o f t m a x} \left(\left\langle z _ {i} ^ {\text {c l i p}}, \left[ z _ {i} ^ {b}; z _ {i} ^ {f} \right] ^ {T} \right\rangle / \tau\right) \in \mathbb {R} ^ {N _ {t} \times 2}. \tag {1}
65
+ $$
66
+
67
+ Finally, the temporal grouping loss can be computed within a batch between $a_{i}$ and the ground-truth one-hot masking $m_{i}$ using mean squared error as
68
+
69
+ $$
70
+ \mathcal {L} _ {\mathrm {t}} = \frac {1}{B} \sum_ {i} ^ {B} \ell_ {\mathrm {B C E}} \left(a _ {i}, \text {O n e - h o t} \left(m _ {i}\right)\right). \tag {2}
71
+ $$
72
+
73
+ Note that we have also tried the binary cross entropy loss which performs comparably to MSE. Thus, we select a relatively simple MSE loss for temporal grouping.
74
+
75
+ # 3.3 INTER-CLIP SPATIAL GROUNDING WITH GROUPTOKENS
76
+
77
+ Observing the correspondences between visual regions in a video and noun phrases (objects) in a caption, we model such fine-grained alignment for more expressive encoders. In practice, it is infeasible to pool tokens of interest as cluster centers since we do not have ground-truth segmentation. Thus, we adopt $M$ learnable group tokens to cluster semantically similar regions in a self-supervised manner. Note that group tokens are randomly initialized and shared among different videos. The detailed structure of a grouping block is presented in Appendix A and multiple grouping blocks are placed at different layers of the video encoder to update group tokens progressively. The final group tokens denoted as $\mathcal{G} = \{g_i^m\}_{m=1}^M$ aggregate semantically similar voxels and represent different regions in the video $v_i$ . Compared with using off-the-shelf region proposal networks, our design of token grouping is more computationally efficient, and can be adapted to the pre-training dataset without region annotations in a self-supervised manner dynamically and flexibly. For each caption $c_i$ of a video, we extract $K$ noun phrases using noun chunking in $\text{spaCy}^1$ and prompt each of them with a set of handcrafted sentence templates, e.g., "A photo of a {noun}" . Such prompted noun phrases are fed into the text encoder to extract noun tokens $\{n_i^k\}_{k=1}^K$ .
78
+
79
+ We define the notation for softmax on a vector $\mathbf{x}$ at the $i$ -th element as: $\sigma(\mathbf{x})_i = \frac{\exp(x_i) / \tau}{\sum_j \exp(x_j) / \tau}$ , where $\tau$ is the temperature to scale logits. The similarity of all group tokens $\mathcal{G}$ with respect to a noun token $n^k$ is defined as $s(\mathcal{G}, n^k) = [\langle g^1, n^k \rangle, \dots, \langle g^M, n^k \rangle] \in \mathbb{R}^M$ , where $\langle \cdot, \cdot \rangle$ is the cosine similarity. Since the ground-truth correspondences between regions and nouns are inaccessible, we compute the grounding similarity between all group and noun tokens by:
80
+
81
+ $$
82
+ G (v, c) = \frac {1}{K} \sum_ {k = 1} ^ {K} \left\langle n ^ {k}, \sum_ {m = 1} ^ {M} \sigma \left(s (\mathcal {G}, n ^ {k})\right) _ {m} \cdot g ^ {m} \right\rangle . \tag {3}
83
+ $$
84
+
85
+ $G(v, c)$ encourages each noun to be grounded to one or a few regions and avoids penalizing regions that cannot find any relevant nouns.
86
+
87
+ Similarity scores over a batch of size $B$ are computed as: $G(\mathcal{V},c_i) = [G(v_1,c_i),\dots ,G(v_B,c_i)]\in \mathbb{R}^B$ and $G(v_{i},\mathcal{C}) = [G(v_{i},c_{1}),\ldots ,G(v_{i},c_{B}]\in \mathbb{R}^{B}$ , where $\mathcal{V} = \{v_i\}_{i = 1}^B$ and $\mathcal{C} = \{c_i\}_{i = 1}^B$ denote the set of videos and captions in a batch, respectively. Inter-clip spatial grounding loss $\mathcal{L}_{\mathrm{g}}$ is then defined to enable nouns to be matched with regions for each positive $\langle \text{video},\text{caption}\rangle$ pair: $\mathcal{L}_{\mathrm{g}} = \mathcal{L}_{\mathrm{g}}^{v\to c} + \mathcal{L}_{\mathrm{g}}^{c\to v}$ consists of a video-to-caption grounding loss and a caption-to-video grounding loss
88
+
89
+ $$
90
+ \mathcal {L} _ {\mathrm {g}} ^ {v \rightarrow c} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \log \sigma (G (v _ {i}, \mathcal {C})) _ {i}, \quad \mathcal {L} _ {\mathrm {g}} ^ {c \rightarrow v} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \log \sigma (G (\mathcal {V}, c _ {i})) _ {i}. \tag {4}
91
+ $$
92
+
93
+ Recall that the cut-and-paste operation indicates that $\hat{v}_i$ has another positive caption $c_{p_i}$ besides its original $c_i$ , and the loss weights of positive indices are $W^v \in \mathbb{R}^{B \times B} = \{w_{i,j}^v\}$ which satisfy
94
+
95
+ $$
96
+ w _ {i, j} ^ {v} = \left\{ \begin{array}{l l} \beta_ {i}, & j = i \\ 1 - \beta_ {i}, & j = p _ {i} \\ 0, & \text {o t h e r w i s e} \end{array} , \right. \tag {5}
97
+ $$
98
+
99
+ where $\beta_{i} = (e - s) / N_{t}$ is the ratio of the foreground in the cut-and-paste video $\hat{v}_i$ . From the perspective of captions, we can obtain $W^{c} = (W^{v})^{\top}$ . We can derive the augmented grounding loss $\mathcal{L}_{\mathrm{g}}$ with the video-to-caption loss and the caption-to-video loss:
100
+
101
+ $$
102
+ \underline {{\mathcal {L} _ {\mathrm {g}} ^ {v \rightarrow c}}} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {B} w _ {i, j} ^ {v} \log \sigma (G (\hat {v} _ {i}, \mathcal {C})) _ {j}, \quad \mathcal {L} _ {\mathrm {g}} ^ {c \rightarrow v} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {B} w _ {i, j} ^ {c} \log \sigma (G (\hat {\nu}, c _ {i})) _ {j}. \tag {6}
103
+ $$
104
+
105
+ # 3.4 OVERALL PRE-TRAINING OBJECTIVE
106
+
107
+ We include a global contrastive learning objective for instance-level alignment. $f_{i}^{v}$ , the video representation of $\hat{v}_{i}$ , is extracted from average-pooled group tokens and $f_{i}^{c}$ , the caption representation $c_{i}$ is computed from the [CLS] token of the original caption. Instance similarity scores are defined as: $s(\mathcal{V},c_i) = [\langle f_1^v,f_i^c\rangle ,\dots ,\langle f_B^v,f_i^c\rangle ]\in \mathbb{R}^B$ and $s(\hat{v}_i,\mathcal{C}) = [\langle f_i^v,f_1^c\rangle ,\dots ,\langle f_i^v,f_B^c\rangle ]\in \mathbb{R}^B$ . A global contrastive loss is defined as $\mathcal{L}_{\mathrm{contrast}} = \mathcal{L}_{\mathrm{contrast}}^{v\to c} + \mathcal{L}_{\mathrm{contrast}}^{c\to v}$ , a combination of the video-to-caption and the caption-to-video views:
108
+
109
+ $$
110
+ \mathcal {L} _ {\mathrm {c o n t r a s t}} ^ {v \rightarrow c} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {B} w _ {i, j} ^ {v} \log \sigma (s (\hat {v} _ {i}, \mathcal {C})) _ {j}, \quad \mathcal {L} _ {\mathrm {c o n t r a s t}} ^ {c \rightarrow v} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {B} w _ {i, j} ^ {c} \log \sigma (s (\mathcal {V}, c _ {i})) _ {j}. \tag {7}
111
+ $$
112
+
113
+ The overall pre-training objective is a weighted sum of grouping loss, grounding loss, and global contrastive loss: $\mathcal{L} = \omega_1\mathcal{L}_{\mathrm{t}} + \omega_2\mathcal{L}_{\mathrm{g}} + \omega_3\mathcal{L}_{\mathrm{contrast}}$ . We set three weights, $\omega_{1},\omega_{2}$ , and $\omega_{3}$ , to be equal to one in our experiments for simplicity.
114
+
115
+ # 4 EXPERIMENTS
116
+
117
+ # 4.1 DOWNSSTREAM TASKS
118
+
119
+ Text-video retrieval. We adopt the widely used text-video retrieval benchmark MSR-VTT (Xu et al., 2016) for evaluation. It consists of 10K YouTube video clips with 200K captions. We conduct experiments in both zero-shot and fine-tuning settings. For fine-tuning setup, we follow Bain et al. (2021) and Ge et al. (2022a), and train and test the model on the split of 9K and 1K videos.
120
+
121
+ Video question answering (VQA). We consider open-ended VQA settings with two representative datasets: (1) MSRVTT-QA (Xu et al., 2017) with 1,500 answer candidates and (2) MSVD-QA (Xu et al., 2017) with 2,423 answer candidates.
122
+
123
+ Video action recognition. We select HMDB51 (Kuehne et al., 2011) containing 6,766 videos with 51 categories and UCF101 (Soomro et al., 2012) containing 13,320 videos with 101 categories. Both linear probing and fine-tuning the whole model are explored.
124
+
125
+ Temporal action localization (TAL). TAL aims at predicting the temporal extent and the labels of action instances. We evaluate the performance on ActivityNet (Heilbron et al., 2015), an action understanding dataset of 19,994 temporally annotated untrimmed videos with 200 action categories.
126
+
127
+ # 4.2 IMPLEMENTATION DETAILS
128
+
129
+ Input. Following Nagrani et al. (2022), we sample 32 frames for each video and resize them into $224 \times 224$ with the same augmentations. Each caption is tokenized into 32 tokens including [CLS]. $K = 2$ noun phrases are extracted for each caption and then prompted with a set of prompt templates such as "It is a video of {noun}" We include the full list of prompt templates in Appendix A.
130
+
131
+ Model architecture. We use a 12-layer ViT-base model with the patch size of $2 \times 16 \times 16$ as the video encoder and initialize it with weights pre-trained on Kinetics-400. We adopt 32 learnable group tokens and 3 grouping blocks featuring K-means attention (Xu et al., 2022; Yu et al., 2022). Grouping blocks are inserted at the 6th, 9th and last layers of the video encoder (Xu et al., 2022; Yu et al., 2022). The text encoder is initialized from the pre-trained BERT-base model. All representations are projected into the common space with the dimension of 256.
132
+
133
+ Pre-training datasets. We pre-train S-ViLM with the VideoCC (Nagrani et al., 2022) dataset, which contains about 3.3M video-caption pairs. We also include ActivityNet-Caption (Krishna et al., 2017) with 20K well-aligned pairs into the pre-training corpus. We note the commonly-used WebVid (Bain et al., 2021) is unavailable to us due to the restricted data access policy. To illustrate the effectiveness of our proposed method and how the pre-training datasets contribute to the final results, we designed fair studies on dataset impacts. Details could be found in Section 4.3.5.
134
+
135
+ Pre-training and fine-tuning setups. We implement S-ViLM in JAX and train all models on TPU accelerators. During pre-training, SGD with momentum 0.9 and initial learning rate 0.1 is used for optimization. We train S-ViLM for 10 epochs with a batch size 1024 and adopt a cosine learning rate decay schedule with a warmup ratio 0.05. It takes about one day for the whole pre-training stage. In
136
+
137
+ Table 1: Zero-shot (top) and fine-tuning evaluation (bottom) of text-video retrieval on MSR-VTT test set with 1K videos. Higher R@k and lower MedR (Median Rank) indicate better performance.
138
+
139
+ <table><tr><td>Method</td><td>Video Encoder Input</td><td>PT Dataset</td><td>#Pairs PT</td><td>R@1</td><td>R@5</td><td>R@10</td><td>MedR</td></tr><tr><td>MIL-NCE (Miech et al., 2019)</td><td>Raw Videos</td><td>HowTo100M</td><td>120M</td><td>9.9</td><td>24.0</td><td>32.4</td><td>29.6</td></tr><tr><td>VATT (Akbari et al., 2021)</td><td>Raw Videos</td><td>HowTo100M, AudioSet</td><td>138M</td><td>-</td><td>-</td><td>29.7</td><td>49.0</td></tr><tr><td>VideoCLIP (Xu et al., 2021b)</td><td>S3D</td><td>HowTo100M</td><td>110M</td><td>10.4</td><td>22.2</td><td>30.0</td><td>-</td></tr><tr><td>SupportSet (Patrick et al., 2020)</td><td>R(2+1)D-34</td><td>HowTo100M</td><td>120M</td><td>12.7</td><td>27.5</td><td>36.2</td><td>24.0</td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>18.7</td><td>39.5</td><td>51.6</td><td>10.0</td></tr><tr><td>AVLnet (Rouditchenko et al., 2021)</td><td>ResNeXt-101</td><td>HowTo100M</td><td>120M</td><td>19.6</td><td>40.8</td><td>50.7</td><td>9.0</td></tr><tr><td>DemoVLP (Cai et al., 2022)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>24.0</td><td>44.0</td><td>52.6</td><td>8.0</td></tr><tr><td>ALPRO (Li et al., 2022)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>24.1</td><td>44.7</td><td>55.4</td><td>8.0</td></tr><tr><td>MCQ (Ge et al., 2022a)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>26.0</td><td>46.4</td><td>56.4</td><td>7.0</td></tr><tr><td>VCC (Nagrani et al., 2022)</td><td>Raw Videos</td><td>VideoCC</td><td>3.3M</td><td>18.9</td><td>37.5</td><td>47.1</td><td>-</td></tr><tr><td>S-ViLM</td><td>Raw Videos</td><td>VideoCC, ActivityNet</td><td>3.3M</td><td>28.6</td><td>53.6</td><td>65.1</td><td>5.0</td></tr><tr><td>UniVL (Luo et al., 2020)</td><td>S3D</td><td>HowTo100M</td><td>110M</td><td>21.2</td><td>49.6</td><td>63.1</td><td>6.0</td></tr><tr><td>MMT (Gabeur et al., 2020)</td><td>S3D</td><td>HowTo100M</td><td>120M</td><td>26.6</td><td>57.1</td><td>69.6</td><td>4.0</td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>Raw Videos</td><td>COCO, VisGenome</td><td>5.6M</td><td>22.0</td><td>46.8</td><td>59.9</td><td>6.0</td></tr><tr><td>AVLnet (Rouditchenko et al., 2021)</td><td>ResNeXt-101</td><td>HowTo100M</td><td>120M</td><td>27.1</td><td>55.6</td><td>66.6</td><td>4.0</td></tr><tr><td>SupportSet (Patrick et al., 2020)</td><td>R(2+1)D-34</td><td>HowTo100M</td><td>120M</td><td>30.1</td><td>58.5</td><td>69.3</td><td>3.0</td></tr><tr><td>VideoCLIP (Xu et al., 2021b)</td><td>S3D</td><td>HowTo100M</td><td>110M</td><td>30.9</td><td>55.4</td><td>66.8</td><td>-</td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>31.0</td><td>59.5</td><td>70.5</td><td>3.0</td></tr><tr><td>DemoVLP (Cai et al., 2022)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>36.0</td><td>61.0</td><td>71.8</td><td>3.0</td></tr><tr><td>ALPRO (Li et al., 2022)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>33.9</td><td>60.7</td><td>73.2</td><td>3.0</td></tr><tr><td>MCQ (Ge et al., 2022a)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>37.6</td><td>64.8</td><td>75.1</td><td>3.0</td></tr><tr><td>VIOLETv2 (Fu et al., 2023)</td><td>Raw Videos</td><td>CC3M, WebVid-2M</td><td>5.5M</td><td>37.2</td><td>64.8</td><td>75.8</td><td>-</td></tr><tr><td>All-in-One (Wang et al., 2023b)</td><td>Raw Videos</td><td>HowTo100M, WebVid-2M</td><td>112M</td><td>37.1</td><td>66.7</td><td>75.9</td><td>-</td></tr><tr><td>VCC (Nagrani et al., 2022)</td><td>Raw Videos</td><td>VideoCC</td><td>3.3M</td><td>35.0</td><td>63.1</td><td>75.1</td><td>-</td></tr><tr><td>S-ViLM</td><td>Raw Videos</td><td>VideoCC, ActivityNet</td><td>3.3M</td><td>38.4</td><td>65.7</td><td>76.3</td><td>2.0</td></tr></table>
140
+
141
+ terms of fine-tuning, different tasks are trained independently with their own set of hyperparameters on the target dataset and more details can be found in Appendix A. For temporal action localization, we fix weights of the pre-trained video encoder and its grouping blocks to extract video features, which are then evaluated by G-TAD (Xu et al., 2020), a commonly used method for TAL.
142
+
143
+ # 4.3 EVALUATION RESULTS
144
+
145
+ # 4.3.1 TEXT-VIDEO RETRIEVAL
146
+
147
+ We evaluate S-ViLM for the text-video retrieval task on MSR-VTT under both zero-shot and fine-tuning settings, and compare it with existing prevalent methods in Table 1. S-ViLM outperforms other methods significantly for zero-shot evaluation with R@10 of 65.1, yielding approximately $9\%$ improvement over the best-performing baseline MCQ. The superior results demonstrate that our pre-trained model builds up a good alignment between video and language and generalizes well to unseen datasets. S-ViLM also achieves performance gain when the model is fine-tuned on the target MSR-VTT dataset, which further validates advantages of the pre-trained model. Note that S-ViLM performs favorably against existing methods despite the much smaller size of the pre-training data used in S-ViLM than those in baselines, such as HowTo100M and WebVid-2M.
148
+
149
+ # 4.3.2 VIDEO QUESTION ANSWERING
150
+
151
+ VQA results on two open-ended datasets are shown in Table 2. To enable S-ViLM to deal with the VQA task, we add a fusion head adapted from BUTD (Anderson et al., 2018) by integrating video and text features with simple linear layers. Then a classifier is inserted after the fusion module to perform question answering as a classification problem. Compared with previous methods which leverage particular architectures for VQA or include a complicated fusion encoder, S-ViLM is the most efficient and flexible for various vision-language tasks. S-ViLM achieves better performance than competing methods with the accuracy of $43.5\%$ $(+1.4\%)$ and $46.4\%$ $(+0.5\%)$ on MSRVTT-QA and MSVD-QA, respectively.
152
+
153
+ # 4.3.3VIDEO ACTION RECOGNITION
154
+
155
+ For video action recognition, we only keep the video encoder together with its grouping blocks to extract single-modality video representations for evaluation. Two evaluation settings are considered: (1) linear probing where the backbone encoder is frozen and only the last linear classifier is trained and (2) end-to-end fine-tuning where both the backbone and the classifier are trained. Top-1 accu
156
+
157
+ Table 2: Top-1 accuracy (%) of Video Question Answering on MSRVTT-QA and MSVD-QA.
158
+
159
+ <table><tr><td>Method</td><td>PT Dataset</td><td>MSRVTT-QA</td><td>MSVD-QA</td></tr><tr><td>HGA (Jiang &amp; Han, 2020)</td><td>-</td><td>35.5</td><td>34.7</td></tr><tr><td>QUEST (Jiang et al., 2020)</td><td>-</td><td>34.6</td><td>36.1</td></tr><tr><td>HCRN (Le et al., 2020)</td><td>-</td><td>35.6</td><td>36.1</td></tr><tr><td>ClipBERT (Lei et al., 2021)</td><td>COCO, VG</td><td>37.4</td><td>-</td></tr><tr><td>SSML (Amrani et al., 2021)</td><td>HowTo100M</td><td>35.1</td><td>35.1</td></tr><tr><td>CoMVT (Seo et al., 2021)</td><td>HowTo100M</td><td>39.5</td><td>42.6</td></tr><tr><td>DemoVLP (Cai et al., 2022)</td><td>CC3M, WebVid-2M</td><td>38.3</td><td>39.5</td></tr><tr><td>ALPRO (Li et al., 2022)</td><td>CC3M, WebVid-2M</td><td>42.1</td><td>45.9</td></tr><tr><td>S-ViLM</td><td>VideoCC, ActivityNet</td><td>43.5</td><td>46.4</td></tr></table>
160
+
161
+ Table 3: Experiments of action recognition on UCF101 and HMDB51 with linear evaluation (Lin) and fully fine-tuning evaluation (FT).
162
+
163
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">Modal</td><td colspan="2">UCF101</td><td colspan="2">HMDB51</td></tr><tr><td>Lin</td><td>FT</td><td>Lin</td><td>FT</td></tr><tr><td>CoCLR (Han et al., 2020)</td><td>OF</td><td>77.8</td><td>90.6</td><td>52.4</td><td>62.9</td></tr><tr><td>MVCGC (Huo et al., 2021)</td><td>MV</td><td>78.0</td><td>90.8</td><td>53.0</td><td>63.4</td></tr><tr><td>XDC.R (Alwasser et al., 2020)</td><td>A</td><td>80.7</td><td>88.8</td><td>49.9</td><td>61.2</td></tr><tr><td>XDC.K (Alwasser et al., 2020)</td><td>A</td><td>85.3</td><td>91.5</td><td>56.0</td><td>63.1</td></tr><tr><td>MIL-NCE (Miech et al., 2019)</td><td>T</td><td>83.4</td><td>89.1</td><td>54.8</td><td>59.2</td></tr><tr><td>Frozen (Bain et al., 2021)</td><td>T</td><td>87.8</td><td>89.8</td><td>61.3</td><td>66.3</td></tr><tr><td>VATT (Akbari et al., 2021)</td><td>A, T</td><td>89.2</td><td>-</td><td>63.3</td><td>-</td></tr><tr><td>ELO (Piergiiovanni et al., 2020)</td><td>A, OF</td><td>-</td><td>93.8</td><td>64.5</td><td>67.4</td></tr><tr><td>MMV (Alayrac et al., 2020)</td><td>A</td><td>77.1</td><td>-</td><td>53.6</td><td>-</td></tr><tr><td>MMV (Alayrac et al., 2020)</td><td>T</td><td>86.8</td><td>-</td><td>55.1</td><td>-</td></tr><tr><td>MMV (Alayrac et al., 2020)</td><td>A, T</td><td>91.8</td><td>95.2</td><td>67.1</td><td>75.0</td></tr><tr><td>MCQ (Ge et al., 2022a)</td><td>T</td><td>89.1</td><td>92.3</td><td>65.8</td><td>69.8</td></tr><tr><td>S-ViLM</td><td>T</td><td>94.8</td><td>96.5</td><td>70.0</td><td>76.9</td></tr></table>
164
+
165
+ Table 4: Comparison to SOTA methods on temporal action localization (TAL).
166
+
167
+ <table><tr><td rowspan="2">Method</td><td colspan="4">TAL Task (G-TAD)</td></tr><tr><td>mAP@0.5</td><td>@0.75</td><td>@0.95</td><td>Avg</td></tr><tr><td>CoCLR (Han et al., 2020)</td><td>47.9</td><td>32.3</td><td>7.3</td><td>31.9</td></tr><tr><td>XDC (Alwassel et al., 2020)</td><td>48.4</td><td>32.6</td><td>7.6</td><td>32.3</td></tr><tr><td>MoCo-v2 (Chen et al., 2020a)</td><td>46.6</td><td>30.7</td><td>6.3</td><td>30.3</td></tr><tr><td>VideoMoCo (Pan et al., 2021)</td><td>47.8</td><td>32.1</td><td>7.0</td><td>31.7</td></tr><tr><td>RSPNet (Chen et al., 2021)</td><td>47.1</td><td>31.2</td><td>7.1</td><td>30.9</td></tr><tr><td>AoT (Wei et al., 2018)</td><td>44.1</td><td>28.9</td><td>5.9</td><td>28.8</td></tr><tr><td>SpeedNet (Benaim et al., 2020)</td><td>44.5</td><td>29.5</td><td>6.1</td><td>29.4</td></tr><tr><td>PAL (Zhang et al., 2022)</td><td>50.7</td><td>35.5</td><td>8.7</td><td>34.6</td></tr><tr><td>TAC (Xu et al., 2020)</td><td>48.5</td><td>32.9</td><td>7.2</td><td>32.5</td></tr><tr><td>BSP (Xu et al., 2021c)</td><td>50.9</td><td>35.6</td><td>8.0</td><td>34.8</td></tr><tr><td>LoFi (Xu et al., 2021d)</td><td>50.4</td><td>35.4</td><td>8.9</td><td>34.4</td></tr><tr><td>TSP (Alwassel et al., 2021)</td><td>51.3</td><td>37.1</td><td>9.3</td><td>35.8</td></tr><tr><td>S-ViLM</td><td>51.7</td><td>36.4</td><td>9.7</td><td>35.6</td></tr></table>
168
+
169
+ racy on UCF101 and HMDB51 is reported in Table 3. We observe that in linear probing, S-ViLM outperforms other baselines, with $3.0\%$ and $2.9\%$ higher than current SOTA, MMV that leverages audio and text modalities in addition on UCF101 and HMDB51. S-ViLM also achieves consistently superior performance under the fine-tuning evaluation. Outstanding performance of S-ViLM demonstrates that leveraging fine-grained video language structures during pre-training contributes to meaningful video representations. This aligns with our intuition because finer-grained video-text alignment improves video understanding.
170
+
171
+ # 4.3.4 TEMPORAL ACTION LOCALIZATION
172
+
173
+ We report the mean average precision (mAP) under different temporal Intersection over Union (tIoU) thresholds on ActivityNet in Table 4. For temporal action localization, the model is pre-trained on HowTo100M only, which is observed to be beneficial to TAL compared with VideoCC + ActivityNet (see the ablation study below). We directly use pre-trained models to extract video features as the input to G-TAD and do not further train the encoder. S-ViLM consistently exceeds other self-supervised competitors and even fully supervised approaches such as LoFi and BSP. This observation again consolidates the conclusion that vision-language pre-training can not only be applied to specific VL problems like text-video retrieval, but also benefit single-modal downstream tasks.
174
+
175
+ # 4.3.5 ABLATION STUDIES
176
+
177
+ Pre-training datasets. To analyze the effects of pre-training datasets, we report the model performances on selected downstream tasks in Table 5. In particular, the same model pre-trained on VideoCC achieves the best performance in zero-shot retrieval on MSR-VTT, compared with HowTo100M and WebVid-2M. These results coincide with findings in Nagrani et al. (2022), where HowTo100M has been pointed out not appropriate for vision-language tasks requiring strong alignment. S-ViLM trained on VideoCC alone significantly outperforms VCC on both tasks, showing the effectiveness of our proposed techniques. In particular, when pre-trained on the same VideoCC dataset, S-ViLM leads to better performance than MCQ. The significant improvement over MCQ shows that our techniques do help to learn better features for downstream tasks. It is also worth noting that pre-training on VideoCC and ActivityNet performs consistently better than using only one dataset, and thus we choose this setup in the main experiments.
178
+
179
+ Training objectives. Without loss of generality, the model in this ablation is pre-trained on VideoCC only. For better understanding S-ViLM, we start with the contrastive baseline represented in Sce
180
+
181
+ ![](images/812808a4d0f6ffcfcc3b0b02490ab4693d2a0a42705544a6644e8ba9987d8255.jpg)
182
+ Figure 2: Visualization of S-ViLM. Left: Similarity scores of features derived from the baseline and our method. Right: Attention maps between region and object with spatial grounding.
183
+
184
+ ![](images/6f2dfbe8296230b775a5ac08ba2a296a9f313fe0a39b4a99fd399aaca6f00db0.jpg)
185
+
186
+ Table 5: Effects on different choices of pre-training datasets.
187
+
188
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">PT Dataset</td><td colspan="3">MSRVTT-ZS</td><td rowspan="2">mAP@0.5</td><td colspan="3">TAL</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td><td>0.75</td><td>0.95</td><td>Avg</td></tr><tr><td rowspan="3">VCC</td><td>HowTo100M</td><td>10.4</td><td>22.2</td><td>30.0</td><td colspan="4">-</td></tr><tr><td>WebVid</td><td>15.4</td><td>33.6</td><td>44.1</td><td colspan="4">-</td></tr><tr><td>VideoCC</td><td>18.9</td><td>37.5</td><td>47.1</td><td>49.9</td><td>34.3</td><td>8.7</td><td>33.7</td></tr><tr><td>MCQ</td><td>VideoCC</td><td>22.5</td><td>43.8</td><td>54.8</td><td colspan="4">-</td></tr><tr><td rowspan="4">S-ViLM</td><td>HowTo100M</td><td>9.4</td><td>22.9</td><td>31.3</td><td>51.7</td><td>36.4</td><td>9.7</td><td>35.6</td></tr><tr><td>ActivityNet</td><td>14.4</td><td>33.5</td><td>44.0</td><td>50.5</td><td>35.3</td><td>8.7</td><td>34.5</td></tr><tr><td>VideoCC</td><td>24.7</td><td>47.4</td><td>59.0</td><td>50.5</td><td>35.0</td><td>9.2</td><td>34.2</td></tr><tr><td>VideoCC, ActivityNet</td><td>28.6</td><td>53.6</td><td>65.1</td><td>50.8</td><td>35.6</td><td>9.3</td><td>34.7</td></tr></table>
189
+
190
+ nario 1 in Table 6. Then we add our proposed spatial grouping module during the pre-training phase. This module is driven by the grouping loss $\mathcal{L}_g$ in Scenario 2, and we observe consistent improvements on all tasks across the board comparing to Scenario 1. Similarly, we introduce the temporal grouping module in $\mathcal{L}_t$ to encourage more temporal discriminative video representation. After comparing Scenario 3 to Scenario 1 in Table 6, we also observe noticeable improvements on different downstream tasks. These phenomenons suggest both spatially and temporally fine-grained features improve video understanding tasks. After combining everything together in Scenario 4, we show significant performance improvements on all tasks, which demonstrates the effectiveness of S-ViLM pre-training. Moreover, we visualize effects of temporal grouping and spatial grounding in Figure 2. It can be observed from similarity scores among frames that with temporal grouping, features from different scenes are much easier to distinguish. Besides, attention maps from spatial grounding indicate the alignment between the region and the noun phrase has been learned during the pre-training stage without any fine-grained annotations. More examples can be found in Appendix C.
191
+
192
+ Table 6: Ablation study on training objectives. We validate that our proposed spatial grounding loss and temporal grouping loss both benefit downstream tasks.
193
+
194
+ <table><tr><td rowspan="2">Scenario</td><td rowspan="2">\( \mathcal{L}_{\text{contrast}} \)</td><td rowspan="2">\( \mathcal{L}_{\text{g}} \)</td><td rowspan="2">\( \mathcal{L}_{\text{t}} \)</td><td colspan="3">MSRVTT-ZS</td><td rowspan="2">MSVD-QAAcc</td><td rowspan="2">UCF101Acc</td><td rowspan="2">TALmAP@0.5</td><td rowspan="2">0.75</td><td rowspan="2">0.95</td><td rowspan="2">Avg</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>1</td><td>✓</td><td></td><td></td><td>22.7</td><td>45.9</td><td>57.0</td><td>43.6</td><td>90.5</td><td>49.9</td><td>34.3</td><td>8.7</td><td>33.7</td></tr><tr><td>2</td><td>✓</td><td>✓</td><td></td><td>23.3</td><td>46.6</td><td>58.6</td><td>44.1</td><td>90.6</td><td>50.2</td><td>34.7</td><td>8.7</td><td>34.0</td></tr><tr><td>3</td><td>✓</td><td></td><td>✓</td><td>24.2</td><td>46.7</td><td>58.2</td><td>43.9</td><td>90.9</td><td>50.1</td><td>34.6</td><td>8.8</td><td>34.0</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>24.7</td><td>47.4</td><td>59.0</td><td>44.9</td><td>91.0</td><td>50.5</td><td>35.0</td><td>9.2</td><td>34.2</td></tr></table>
195
+
196
+ # 5 CONCLUSION
197
+
198
+ In this paper, we present a novel video-language pre-training framework, named S-ViLM, that aims to utilize fine-grained structures in video and languages to learn region-object correspondences and temporal-aware features simultaneously. Spatial grounding and temporal grouping are introduced to achieve the goal of local region-object alignment and temporal distinction in a self-supervised manner. The proposed framework outperforms existing methods significantly on downstream tasks, including text-video retrieval, video question answering, video action recognition, and temporal action localization. The superior performance validates our design and our method could be easily scaled up, as it is self-contained and does not rely on other artifacts.
199
+
200
+ # ACKNOWLEDGEMENT
201
+
202
+ We thank the reviewers for their invaluable feedbacks. Cho-Jui Hsieh is partially supported by NSF 2331966, 2325121, 2330830, 2244760, 2008173, and ONR 20230936.
203
+
204
+ # REFERENCES
205
+
206
+ Hassan Akbari, Liangzhe Yuan, Rui Qian, Wei-Hong Chuang, Shih-Fu Chang, Yin Cui, and Boqing Gong. Vatt: Transformers for multimodal self-supervised learning from raw video, audio and text. In Advances in Neural Information Processing Systems, volume 34, pp. 24206-24221, 2021.
207
+ Jean-Baptiste Alayrac, Adria Recasens, Rosalia Schneider, Relja Arandjelovic, Jason Ramapuram, Jeffrey De Fauw, Lucas Smaira, Sander Dieleman, and Andrew Zisserman. Self-supervised multimodal versatile networks. In Advances in Neural Information Processing Systems, volume 33, pp. 25-37, 2020.
208
+ Humam Alwassel, Dhruv Mahajan, Bruno Korbar, Lorenzo Torresani, Bernard Ghanem, and Du Tran. Self-supervised learning by cross-modal audio-video clustering. In Advances in Neural Information Processing Systems, volume 33, pp. 9758-9770, 2020.
209
+ Humam Alwassel, Silvio Giancola, and Bernard Ghanem. Tsp: Temporally-sensitive pretraining of video encoders for localization tasks. In IEEE International Conference on Computer Vision, pp. 3173-3183, 2021.
210
+ Elad Amrani, Rami Ben-Ari, Daniel Rotman, and Alex Bronstein. Noise estimation using density estimation for self-supervised multimodal learning. In AAAI Conference on Artificial Intelligence, volume 35, pp. 6644-6652, 2021.
211
+ Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 6077-6086, 2018.
212
+ Max Bain, Arsha Nagrani, Gül Varol, and Andrew Zisserman. Frozen in time: A joint video and image encoder for end-to-end retrieval. In IEEE International Conference on Computer Vision, pp. 1728-1738, 2021.
213
+ Sagie Benaim, Ariel Ephrat, Oran Lang, Inbar Mosseri, William T Freeman, Michael Rubinstein, Michal Irani, and Tali Dekel. Speednet: Learning the speediness in videos. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 9922-9931, 2020.
214
+ Gedas Bertasius, Heng Wang, and Lorenzo Torresani. Is space-time attention all you need for video understanding? In International Conference on Machine Learning, volume 2, pp. 4, 2021.
215
+ Guanyu Cai, Yixiao Ge, Alex Jinpeng Wang, Rui Yan, Xudong Lin, Ying Shan, Lianghua He, Xiaohu Qie, Jianping Wu, and Mike Zheng Shou. Revitalize region feature for democratizing video-language pre-training. arXiv preprint arXiv:2203.07720, 2022.
216
+ Meng Cao, Tianyu Yang, Junwu Weng, Can Zhang, Jue Wang, and Yuexian Zou. Locvtp: Video-text pre-training for temporal localization. In European Conference on Computer Vision, pp. 38-56, 2022.
217
+ Peihao Chen, Deng Huang, Dongliang He, Xiang Long, Runhao Zeng, Shilei Wen, Mingkui Tan, and Chuang Gan. Rspnet: Relative speed perception for unsupervised video representation learning. In AAAI Conference on Artificial Intelligence, volume 35, pp. 1045-1053, 2021.
218
+ Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020a.
219
+ Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European Conference on Computer Vision, pp. 104-120, 2020b.
220
+
221
+ Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh K Srivastava, Li Deng, Piotr Dólar, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C Platt, et al. From captions to visual concepts and back. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 1473-1482, 2015.
222
+ Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In IEEE International Conference on Computer Vision, pp. 6202-6211, 2019.
223
+ Tsu-Jui Fu, Linjie Li, Zhe Gan, Kevin Lin, William Yang Wang, Lijuan Wang, and Zicheng Liu. Violet: End-to-end video-language transformers with masked visual-token modeling. arXiv preprint arXiv:2111.12681, 2021.
224
+ Tsu-Jui Fu, Linjie Li, Zhe Gan, Kevin Lin, William Yang Wang, Lijuan Wang, and Zicheng Liu. An empirical study of end-to-end video-language transformers with masked visual modeling. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 22898-22909, 2023.
225
+ Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. arXiv preprint arXiv:1606.01847, 2016.
226
+ Valentin Gabeur, Chen Sun, Karteek Alahari, and Cordelia Schmid. Multi-modal transformer for video retrieval. In European Conference on Computer Vision, pp. 214-229, 2020.
227
+ Yuying Ge, Yixiao Ge, Xihui Liu, Dian Li, Ying Shan, Xiaohu Qie, and Ping Luo. Bridging videotext retrieval with multiple choice questions. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 16167-16176, 2022a.
228
+ Yuying Ge, Yixiao Ge, Xihui Liu, Jinpeng Wang, Jianping Wu, Ying Shan, Xiaohu Qie, and Ping Luo. Miles: visual bert pre-training with injected language semantics for video-text retrieval. In European Conference on Computer Vision, pp. 691-708, 2022b.
229
+ Golnaz Ghiasi, Xiuye Gu, Yin Cui, and Tsung-Yi Lin. Scaling open-vocabulary image segmentation with image-level labels. In European Conference on Computer Vision, pp. 540-557, 2022.
230
+ Tanmay Gupta, Arash Vahdat, Gal Chechik, Xiaodong Yang, Jan Kautz, and Derek Hoiem. Contrastive learning for weakly supervised phrase grounding. In European Conference on Computer Vision, pp. 752-768, 2020.
231
+ Tengda Han, Weidi Xie, and Andrew Zisserman. Self-supervised co-training for video representation learning. In Advances in Neural Information Processing Systems, volume 33, pp. 5679-5690, 2020.
232
+ Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 961-970, 2015.
233
+ Yuqi Huo, Mingyu Ding, Haoyu Lu, Nanyi Fei, Zhiwu Lu, Ji-Rong Wen, and Ping Luo. Compressed video contrastive learning. In Advances in Neural Information Processing Systems, volume 34, pp. 14176-14187, 2021.
234
+ Jianwen Jiang, Ziqiang Chen, Haojie Lin, Xibin Zhao, and Yue Gao. Divide and conquer: Question-guided spatio-temporal contextual attention for video question answering. In AAAI Conference on Artificial Intelligence, volume 34, pp. 11101-11108, 2020.
235
+ Pin Jiang and Yahong Han. Reasoning with heterogeneous graph alignment for video question answering. In AAAI Conference on Artificial Intelligence, volume 34, pp. 11109-11116, 2020.
236
+ Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-captioning events in videos. In IEEE International Conference on Computer Vision, pp. 706-715, 2017.
237
+ Hildegard Kuehne, Hueihan Jhuang, Estíbaliz Garrote, Tomaso Poggio, and Thomas Serre. Hmdb: a large video database for human motion recognition. In IEEE International Conference on Computer Vision, pp. 2556-2563, 2011.
238
+
239
+ Thao Minh Le, Vuong Le, Svetha Venkatesh, and Truyen Tran. Hierarchical conditional relation networks for video question answering. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 9972-9981, 2020.
240
+ Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. Less is more: Clipbert for video-and-language learning via sparse sampling. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 7331-7341, 2021.
241
+ Dongxu Li, Junnan Li, Hongdong Li, Juan Carlos Niebles, and Steven CH Hoi. Align and prompt: Video-and-language pre-training with entity prompts. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 4953-4963, 2022.
242
+ Linjie Li, Yen-Chun Chen, Yu Cheng, Zhe Gan, Licheng Yu, and Jingjing Liu. Hero: Hierarchical encoder for video+ language omni-representation pre-training. In Empirical Methods in Natural Language Processing, pp. 2046-2065, 2020.
243
+ LiuNian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019.
244
+ Yuqi Liu, Pengfei Xiong, Luhui Xu, Shengming Cao, and Qin Jin. Ts2-net: Token shift and selection transformer for text-video retrieval. In European Conference on Computer Vision, pp. 319-335, 2022.
245
+ Huaishao Luo, Lei Ji, Botian Shi, Haoyang Huang, Nan Duan, Tianrui Li, Jason Li, Taroon Bharti, and Ming Zhou. Univl: A unified video and language pre-training model for multimodal understanding and generation. arXiv preprint arXiv:2002.06353, 2020.
246
+ Fan Ma, Xiaojie Jin, Heng Wang, Jingjia Huang, Linchao Zhu, Jiashi Feng, and Yi Yang. Temporal perceiving video-language pre-training. arXiv preprint arXiv:2301.07463, 2023.
247
+ Yiwei Ma, Guohai Xu, Xiaoshuai Sun, Ming Yan, Ji Zhang, and Rongrong Ji. X-clip: End-to-end multi-grained contrastive learning for video-text retrieval. In ACM International Conference on Multimedia, pp. 638–647, 2022.
248
+ Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto100m: Learning a text-video embedding by watching hundred million narrated video clips. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2630-2640, 2019.
249
+ Arsha Nagrani, Paul Hongsuck Seo, Bryan Seybold, Anja Hauth, Santiago Manen, Chen Sun, and Cordelia Schmid. Learning audio-video modalities from image captions. In European Conference on Computer Vision, pp. 407-426, 2022.
250
+ Tian Pan, Yibing Song, Tianyu Yang, Wenhao Jiang, and Wei Liu. Videomoco: Contrastive video representation learning with temporally adversarial examples. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 11205-11214, 2021.
251
+ Mandela Patrick, Po-Yao Huang, Yuki Asano, Florian Metze, Alexander Hauptmann, Joao Henriques, and Andrea Vedaldi. Support-set bottlenecks for video-text representation learning. arXiv preprint arXiv:2010.02824, 2020.
252
+ AJ Piergiovanni, Anelia Angelova, and Michael S Ryoo. Evolving losses for unsupervised video representation learning. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 133-142, 2020.
253
+ Rui Qian, Yeqing Li, Liangzhe Yuan, Boqing Gong, Ting Liu, Matthew Brown, Serge Belongie, Ming-Hsuan Yang, Hartwig Adam, and Yin Cui. Exploring temporal granularity in self-supervised video representation learning. In *British Machine Vision Conference*, 2022.
254
+ Anna Rohrbach, Marcus Rohrbach, Ronghang Hu, Trevor Darrell, and Bernt Schiele. Grounding of textual phrases in images by reconstruction. In European Conference on Computer Vision, pp. 817-834, 2016.
255
+
256
+ Andrew Rouditchenko, Angie Boggust, David Harwath, Brian Chen, Dhiraj Joshi, Samuel Thomas, Kartik Audhkhasi, Hilde Kuehne, Rameswar Panda, Rogerio Feris, et al. Avlnet: Learning audiovisual language representations from instructional videos. In *Interspeech*, 2021.
257
+ Paul Hongsuck Seo, Arsha Nagrani, and Cordelia Schmid. Look before you speak: Visually contextualized utterances. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 16877-16887, 2021.
258
+ Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
259
+ Yuchong Sun, Hongwei Xue, Ruihua Song, Bei Liu, Huan Yang, and Jianlong Fu. Long-form video-language pre-training with multimodal temporal contrastive learning. In NIPS, volume 35, pp. 38032-38045, 2022.
260
+ Du Tran, Lubomir D Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. C3d: generic features for video analysis. CoRR, abs/1412.0767, 2:8, 2014.
261
+ Haixin Wang, Xinlong Yang, Jianlong Chang, Dian Jin, Jinan Sun, Shikun Zhang, Xiao Luo, and Qi Tian. Parameter-efficient tuning of large-scale multimodal foundation model. In NIPS, 2023a.
262
+ Jinpeng Wang, Yixiao Ge, Rui Yan, Yuying Ge, Kevin Qinghong Lin, Satoshi Tsutsui, Xudong Lin, Guanyu Cai, Jianping Wu, Ying Shan, et al. All in one: Exploring unified video-language pre-training. In CVPR, pp. 6598-6608, 2023b.
263
+ Ziyang Wang, Yi-Lin Sung, Feng Cheng, Gedas Bertasius, and Mohit Bansal. Unified coarse-to-fine alignment for video-text retrieval. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2816-2827, 2023c.
264
+ Donglai Wei, Joseph J Lim, Andrew Zisserman, and William T Freeman. Learning and using the arrow of time. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 8052-8060, 2018.
265
+ Dejing Xu, Zhou Zhao, Jun Xiao, Fei Wu, Hanwang Zhang, Xiangnan He, and Yueting Zhuang. Video question answering via gradually refined attention over appearance and motion. In ACM International Conference on Multimedia, pp. 1645-1653, 2017.
266
+ Hu Xu, Gargi Ghosh, Po-Yao Huang, Prahal Arora, Masoumeh Aminzadeh, Christoph Feichtenhofer, Florian Metze, and Luke Zettlemoyer. Vlm: Task-agnostic video-language model pretraining for video understanding. In Findings of the Association for Computational Linguistics, pp. 4227–4239, 2021a.
267
+ Hu Xu, Gargi Ghosh, Po-Yao Huang, Dmytro Okhonko, Armen Aghajanyan, Florian Metze, Luke Zettlemoyer, and Christoph Feichtenhofer. Videoclip: Contrastive pre-training for zero-shot video-text understanding. In Empirical Methods in Natural Language Processing, 2021b.
268
+ Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, and Xiaolong Wang. Groupvit: Semantic segmentation emerges from text supervision. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 18134-18144, 2022.
269
+ Jun Xu, Tao Mei, Ting Yao, and Yong Rui. Msr-vtt: A large video description dataset for bridging video and language. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 5288-5296, 2016.
270
+ Mengmeng Xu, Chen Zhao, David S Rojas, Ali Thabet, and Bernard Ghanem. G-tad: Sub-graph localization for temporal action detection. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 10156-10165, 2020.
271
+ Mengmeng Xu, Juan-Manuel Pérez-Rúa, Victor Escorcia, Brais Martinez, Xiatian Zhu, Li Zhang, Bernard Ghanem, and Tao Xiang. Boundary-sensitive pre-training for temporal localization in videos. In IEEE International Conference on Computer Vision, pp. 7220-7230, 2021c.
272
+
273
+ Mengmeng Xu, Juan Manuel Perez Rua, Xiatian Zhu, Bernard Ghanem, and Brais Martinez. Low-fidelity video encoder optimization for temporal action localization. In Advances in Neural Information Processing Systems, volume 34, pp. 9923-9935, 2021d.
274
+ Rui Yan, Mike Zheng Shou, Yixiao Ge, Alex Jinpeng Wang, Xudong Lin, Guanyu Cai, and Jinhui Tang. Video-text pre-training with learned regions. arXiv preprint arXiv:2112.01194, 2021.
275
+ Qihang Yu, Huiyu Wang, Siyuan Qiao, Maxwell Collins, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. k-means mask transformer. In European Conference on Computer Vision, pp. 288-307, 2022.
276
+ Liangzhe Yuan, Rui Qian, Yin Cui, Boqing Gong, Florian Schroff, Ming-Hsuan Yang, Hartwig Adam, and Ting Liu. Contextualized spatio-temporal contrastive learning with self-supervision. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 13977-13986, 2022.
277
+ Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In IEEE International Conference on Computer Vision, pp. 6023-6032, 2019.
278
+ Rowan Zellers, Jiasen Lu, Ximing Lu, Youngjae Yu, Yanpeng Zhao, Mohammadreza Salehi, Aditya Kusupati, Jack Hessel, Ali Farhadi, and Yejin Choi. Merlot reserve: Neural script knowledge through vision and language and sound. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 16375-16387, 2022.
279
+ Can Zhang, Tianyu Yang, Junwu Weng, Meng Cao, Jue Wang, and Yuexian Zou. Unsupervised pre-training for temporal action localization tasks. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 14031-14041, 2022.
280
+ Yue Zhao, Ishan Misra, Philipp Krahenbuhl, and Rohit Girdhar. Learning video representations from large language models. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 6586-6597, 2023.
281
+ Linchao Zhu and Yi Yang. Actbert: Learning global-local video-text representations. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 8746-8755, 2020.
282
+
283
+ # A IMPLEMENTATION DETAILS
284
+
285
+ # A.1 TEXT PROMPTTEMPLATES
286
+
287
+ As mentioned in Section 3.3, we extract noun tokens by prompting noun phrases with pre-defined templates. We randomly select one from 12 templates to generate the prompt and details are presented in Table 7.
288
+
289
+ Table 7: Prompt templates used for generating noun tokens.
290
+
291
+ <table><tr><td>Template</td><td>Prompts for noun phrases</td></tr><tr><td>1</td><td>A footage of a {}.</td></tr><tr><td>2</td><td>A footage of the {}.</td></tr><tr><td>3</td><td>A footage of one {}.</td></tr><tr><td>4</td><td>A video of a {}.</td></tr><tr><td>5</td><td>A video of the {}.</td></tr><tr><td>6</td><td>A video of one {}.</td></tr><tr><td>7</td><td>A portrait of a {}.</td></tr><tr><td>8</td><td>A portrait of the {}.</td></tr><tr><td>9</td><td>A portrait of one {}.</td></tr><tr><td>10</td><td>A video footage of a {}.</td></tr><tr><td>11</td><td>A video footage of the {}.</td></tr><tr><td>12</td><td>A video footage of one {}.</td></tr></table>
292
+
293
+ # A.2 STRUCTURE OF GROUPING BLOCK
294
+
295
+ We demonstrate the structure of a grouping block in Figure 3. It features a K-means clustering attention layer, in which attention scores are computed between group tokens as query and video tokens as value. The cluster assignment is computed via gumbel softmax over group tokens and converted into a one-hot hard assignment.
296
+
297
+ ![](images/444a79312d401bd369e62f49c08c8d2c42ad9940edd8f5134771dc3ce5bb25b5.jpg)
298
+ Figure 3: The structure of a grouping block. It is inserted at different layers of the video encoder to update group tokens by merging semantically similar video tokens.
299
+
300
+ # A.3 DOWNSSTREAM TASKS
301
+
302
+ Implementation details of fine-tuning the pre-trained model on downstream tasks are described in this section. During fine-tuning, we resize video frames to $224 \times 224$ and sample 32 frames for each video. The maximum length for each caption is 32 by default, the same as the value in the pre-training stage. Specific optimization settings for each dataset are shown in Tables 8 to 11.
303
+
304
+ Table 8: End-to-end fine-tuning configurations on MSR-VTT for text-to-video retrieval.
305
+
306
+ <table><tr><td>Config</td><td>MSR-VTT</td></tr><tr><td>optimizer</td><td>SGD</td></tr><tr><td>base learning rate</td><td>2.5e-1</td></tr><tr><td>optimizer momentum</td><td>0.9</td></tr><tr><td>learning rate schedule</td><td>cosine decay</td></tr><tr><td>batch size</td><td>512</td></tr><tr><td>warmup ratio</td><td>0.1</td></tr><tr><td>training epochs</td><td>20</td></tr></table>
307
+
308
+ Table 9: End-to-end fine-tuning configurations on MSRVTT-QA and MSVD-QA for VQA.
309
+
310
+ <table><tr><td>Config</td><td>MSRVTT-QA</td><td>MSVD-QA</td></tr><tr><td>optimizer</td><td>SGD</td><td>SGD</td></tr><tr><td>base learning rate</td><td>1e-1</td><td>5e-5</td></tr><tr><td>optimizer momentum</td><td>0.9</td><td>0.9</td></tr><tr><td>learning rate schedule</td><td>cosine decay</td><td>cosine decay</td></tr><tr><td>batch size</td><td>64</td><td>64</td></tr><tr><td>warmup ratio</td><td>0.1</td><td>0.1</td></tr><tr><td>training epochs</td><td>30</td><td>30</td></tr></table>
311
+
312
+ Table 10: Fine-tuning configurations on UCF101 and HMDB51 for video action recognition.
313
+
314
+ <table><tr><td>Config</td><td>UCF101</td><td>HMDB51</td></tr><tr><td>optimizer</td><td>SGD</td><td>SGD</td></tr><tr><td>base learning rate</td><td>1e-1</td><td>1e-1</td></tr><tr><td>optimizer momentum</td><td>0.9</td><td>0.9</td></tr><tr><td>learning rate schedule</td><td>cosine decay</td><td>cosine decay</td></tr><tr><td>batch size</td><td>64</td><td>64</td></tr><tr><td>warmup ratio</td><td>0.1</td><td>0.1</td></tr><tr><td>training epochs</td><td>30</td><td>60</td></tr></table>
315
+
316
+ Table 11: Fine-tuning configurations on ActivityNet for temporal action localization.
317
+
318
+ <table><tr><td>Config</td><td>ActivityNet</td></tr><tr><td>optimizer</td><td>Adam</td></tr><tr><td>base learning rate</td><td>4e-3</td></tr><tr><td>weight decay</td><td>1e-4</td></tr><tr><td>optimizer momentum</td><td>β1=0.9, β2=0.999</td></tr><tr><td>learning rate schedule</td><td>decay by γ=0.1 every 5 epochs</td></tr><tr><td>batch size</td><td>16</td></tr><tr><td>training epochs</td><td>10</td></tr></table>
319
+
320
+ # B ADDITIONAL RESULTS
321
+
322
+ Number of frames. The number of frames used in pre-training vary among different methods. We follow the setting in Nagrani et al. (2022) to sample 32 frames for each video. Note that S-ViLM uses a vanilla vision transformer with temporal patch size 2, which effectively downsamples the video frames at the first layer. Since no downsampling happens in ALPRO and MCQ's encoder, their computational cost of 16 frames is comparable to S-ViLM with 32-frame input. In Table 12 we report 16 and 32-frame results and S-ViLM outperforms ALPRO and MCQ in both settings. As most methods use 16 frames during evaluation, we thus select to sample 32 frames to ensure a fair comparison.
323
+
324
+ Table 12: Results with different number of frames.
325
+
326
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">Input</td><td colspan="3">MSRVTT-ZS</td><td colspan="2">UCF101</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td><td>Lin</td><td>FT</td></tr><tr><td>ALPRO</td><td>8-frame</td><td>24.1</td><td>44.7</td><td>55.4</td><td>-</td><td>-</td></tr><tr><td>ALPRO</td><td>16-frame</td><td>24.7</td><td>-</td><td>55.0</td><td>-</td><td>-</td></tr><tr><td>MCQ</td><td>16-frame</td><td>-</td><td>-</td><td>-</td><td>89.1</td><td>92.3</td></tr><tr><td>S-ViLM</td><td>16-frame</td><td>28.5</td><td>53.5</td><td>64.0</td><td>93.1</td><td>96.0</td></tr><tr><td>S-ViLM</td><td>32-frame</td><td>28.6</td><td>53.5</td><td>65.1</td><td>94.8</td><td>96.5</td></tr></table>
327
+
328
+ Spatiotemporal action localization. We report experiment results of spatial temporal action localization task on AVa v2.2 dataset. Results are presented in the table below:
329
+
330
+ Table 13: Results of spatiotemporal action localization on AVA v2.2. Two columns indicate using Detected and Grounded-truth boxes respectively.
331
+
332
+ <table><tr><td rowspan="2">Method</td><td colspan="2">mAP@0.5</td></tr><tr><td>Detected</td><td>Ground-truth</td></tr><tr><td>SlowFast</td><td>23.80</td><td>-</td></tr><tr><td>MViT-B</td><td>24.50</td><td>-</td></tr><tr><td>S-ViLM (contrastive only)</td><td>21.95</td><td>26.55</td></tr><tr><td>S-ViLM</td><td>25.00</td><td>30.15</td></tr></table>
333
+
334
+ We can observe that S-ViLM outperforms other models and the variant with contrastive loss only when either detected boxes or ground-truth boxes are used for evaluation. This experiment demonstrates the effectiveness of the spatiotemporal learning design of our method.
335
+
336
+ # C VISUALIZATION
337
+
338
+ We present the visualization of spatial grounding in Figure 4. For each example, we choose the group token which has the maximum similarity score of the target noun phrase, and compute the attention heatmap based on corresponding video tokens assigned to that group token. It can be observed that the alignment between the region and the noun phrase has been learned during the pre-training stage without any fine-grained annotations. In addition, more comparisons between similarity scores of baseline features and temporal-aware features are provided in Figure 5. With temporal grouping, features from different scenes are much easier to distinguish.
339
+
340
+ ![](images/86cfc4d7e65c0714e67b1077c765ebc8c4e10ebfa511e029fbd6b53976fbd533.jpg)
341
+
342
+ ![](images/b80565af0a80d2afbaf91f44a1df1e51cdbf0e70c21c8f1ee351ea3f8dfcfa4e.jpg)
343
+
344
+ ![](images/bf01c46e1d27d4e6dbfec0fe4176877efffd356ff5a7b3aad5cac6c34e76016f.jpg)
345
+
346
+ ![](images/e20edf6e1ea44b24a58e4459160b4b28476e77ac6ad9d81885dcd3f68d2a6530.jpg)
347
+
348
+ ![](images/fb4240af9265acd0e04d7272c7e26e9ad177a5ae11ef8f05c60970efad4db944.jpg)
349
+ Caption: A man throws a bowling ball into various pins..
350
+
351
+ ![](images/36bf3cf4dd3cf684ace8134ff9cc4da5b58993fe11a8661a6cd6b7cd4a4d5c47.jpg)
352
+
353
+ ![](images/615890b5ea8505b8221193b070ecec671f4032685d9f8c099b3b4926bec962d1.jpg)
354
+
355
+ ![](images/ad1442fe34cc1738ceb5b28bb610db5985354f1651458e0bf27538bdb2c019df.jpg)
356
+
357
+ ![](images/e7b657ee7362c2d8611a9fca2456720997b2ded5c913f97e339a4b6d85640c83.jpg)
358
+
359
+ ![](images/946abe991d1ce922e875041c88bfe4b4d6afe1e4bc22a36b5499404f46e77f34.jpg)
360
+
361
+ ![](images/ae06efdd5c13e63b2fc544fdce266f95d6aebcf6cfde91d050f8b1e98cd560a3.jpg)
362
+
363
+ ![](images/f79cf5d01cd865858e0b8b151c98d6e1a28a8ea37fb5ce46bb5f517a723897a5.jpg)
364
+
365
+ ![](images/facf9766ad4120e1ac55a01f7f4c00ac5ab43364e6e9e04c7f643c8ab584a366.jpg)
366
+ Caption: The boat makes a turn to the right.
367
+
368
+ ![](images/f1d7b08b3865cde9d6133b6c8f0039511f19bd4efa2673e3c664044a1d2ab448.jpg)
369
+
370
+ ![](images/343ae9479e59798a9c1d93ee941abfba78647afa48f285716ac6813a7c2ba15c.jpg)
371
+
372
+ ![](images/bc89eed4449a694aad669b6e2589d544781cd1f109a6e670c5582c711550bbfd.jpg)
373
+
374
+ ![](images/f601240441b647e4f952d9d8d3fce879557f0ded4324547b57c839a973b8be9c.jpg)
375
+
376
+ ![](images/e9ba7ec6a2c6f97e5a85924742fa39fea432e8ebd2e40116fdd223ea7cb324e4.jpg)
377
+
378
+ ![](images/d6a624959dfb1e6b774453abf84746b4533856787aa9171a4a25ef38a406e8c9.jpg)
379
+ Figure 4: Visualization of spatial grounding. The attention feature map of each example is computed from the corresponding regions assigned to the group token which achieves the highest similarity score with respect to the target noun phrase.
380
+
381
+ ![](images/da72acadde00ac3faaf0eb7177701f6d11252214087ec750cdacdcf543bdf358.jpg)
382
+
383
+ ![](images/a08c3a8f36fac5891f8ba439847c3dc1fc0ef476e26bbeb73b09637df7e45471.jpg)
384
+ Caption: The man spins around and around on the pommel horse.
385
+
386
+ ![](images/ccfdf7e9428ae50e1d65d343fe0baf5e2e9f45a7afc2e100178d91e226fd5de2.jpg)
387
+
388
+ ![](images/ae93b1f583984e6a18fdde310298bac038d58dc7a3eb0371a5cee659ed2a4931.jpg)
389
+
390
+ ![](images/c99dea213c5a9f974f3d3972d100c6a651e295c5d597488e8beb1e816e70d2b2.jpg)
391
+
392
+ ![](images/2b5ac2a15d6ddcad2d938c7f6b8352db155eeffe0d3c42a6a277f39ff34740ee.jpg)
393
+
394
+ ![](images/4afe9185187e73ffb225764fab8fe190bea99f66b46e4d42d2e62acd55c1bc5f.jpg)
395
+
396
+ ![](images/9d95bd92e6ff688aa1016328e81f0264307f4841865d746353b8376f0941a6ad.jpg)
397
+
398
+ ![](images/f3898a7ce73251a9e56b95f5f187bd929ebf5e68c056b02e03bcfe8a04976010.jpg)
399
+
400
+ ![](images/8733f27b3f819c96b1393b09fd9b565c8419908cef5edda671cd342e490e79b5.jpg)
401
+ Caption: She uses a hula hoop to go in circles.
402
+
403
+ ![](images/8ea0c7c34e822d6eede71b04f7af4ed6a5b803267722267516f78e4682f08c5b.jpg)
404
+
405
+ ![](images/4bae768a1cac43c932308d4b567eee2316ca37940cfc07f4de27dc9e81f6a578.jpg)
406
+
407
+ ![](images/7d122aa5f5e1f2dfa66e45e651771ff3b9090f2369c2f0bc9a0651fefb9c7921.jpg)
408
+
409
+ ![](images/332e27a15425fbba3128970bb4dc8dd84238d83d73e740ba25b4ae9ba0098c9c.jpg)
410
+ Caption: There is one blue pencil, one green pencil, and an eraser on the table.
411
+
412
+ ![](images/22511ce1495321983911674b4f4b4500ff31857c38fb3ab0cacd794033024a02.jpg)
413
+
414
+ ![](images/b6105a8f65cc63aa6d6ba998735347303567d3f303e27a0e8bd46e7c30968f41.jpg)
415
+
416
+ ![](images/8ba290eb0e5576c8df56ca4040a474433a3ac02a440d7b288697235e44524311.jpg)
417
+
418
+ ![](images/d74f54eb83b090b6becb4c1cfd26458672f833d3251a721e2467643f71683452.jpg)
419
+ Similarity scores of baseline features
420
+
421
+ ![](images/b493f18e59dc44d0a03dd2e0f5a38ca8df112930786a1f8784c10b926cdc6232.jpg)
422
+ Similarity scores of temporal-aware features
423
+
424
+ ![](images/c994257ed6701e6e4a8f469a56a76ca62a30568beafb3f288e1de756bc4f94f7.jpg)
425
+ Caption: A whale tail is seen out of water with hills in the background.
426
+
427
+ ![](images/69ef160b2eeb6ceeee18bf5a2df75f42735a49938a9faef9e942c67123a303ec.jpg)
428
+
429
+ ![](images/b2f53f93cd5fa6f64250519fc56c6ccf67020d12ac77db32ab23f672dca9508d.jpg)
430
+
431
+ ![](images/5c0dac1b40a08b99c33af75c6dc031ec499378300648afb3362700482164268b.jpg)
432
+
433
+ ![](images/fd0e43dd4a582b35dd057689bf1b4503d2803fce6035bca2cc41225ecab73055.jpg)
434
+ Similarity scores of baseline features
435
+
436
+ ![](images/5aa7c5c4faa8afc8259a391b7004942554a37c79bf8042b0432ec91143d9030b.jpg)
437
+ Similarity scores of temporal-aware features
438
+
439
+ ![](images/ef7d3086b34fd7a6d3cb8199fff76725f1b80cd0e0f9a3b75b9413cc7860c296.jpg)
440
+ Caption: A man was driving a tractor for land reclamation.
441
+
442
+ ![](images/60467ed37ba577369f45203ece70a711c6fbdf56b1d61e96a34c6c10e60233b3.jpg)
443
+
444
+ ![](images/19540c6bf63e7178bc23b174f6ac3c3883922857c326d26f434336d8c20154f6.jpg)
445
+
446
+ ![](images/4e6104e8ce2d6ad61eb70466f16809ff124be9ae2aea3dd720d35476a7e2c51c.jpg)
447
+
448
+ ![](images/d7fe53d13aaaa4b734f58d78c33d91114370cea56a7051e10f136f58a20711ee.jpg)
449
+ Similarity scores of baseline features
450
+
451
+ ![](images/8508ad50b6957d18cd6da6dc4fa62ed54e07025553395748eb4be36995de617b.jpg)
452
+ Similarity scores of temporal-aware features
453
+
454
+ ![](images/248f6ff6c8ee1e641bdc1e591833c930eb1545624d71aece98dd7f67cc63224c.jpg)
455
+ Caption: A person cut the paper to make a gift box.
456
+
457
+ ![](images/982e674b5798e5c4ce788db44aee59a9ed40dceb39724aab359dc4d9ee511e15.jpg)
458
+
459
+ ![](images/a5e6e49507cb394a3e64390d87adcf45d25b801be29c4e037c399e9a2555212c.jpg)
460
+
461
+ ![](images/0669a11d8314b1cd8394f4030c37fe524b10be6477443330e10260080c7bb97f.jpg)
462
+
463
+ ![](images/2dc3fb0a80ce1f195a6e074ef5bd437466e764a419e22d33faa9fa870d725cc7.jpg)
464
+ Similarity scores of baseline features
465
+
466
+ ![](images/e0e8b4df80990bfcafb16b64580543fabe5d46408d0cf0a78569f4f602659daa.jpg)
467
+ Similarity scores of temporal-aware features
468
+ Figure 5: Visualization of temporal grouping.
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5187d8e2b5fefc0e8c10b2eaf648b866b3dca945943c10920cc5b0eb2120cb77
3
+ size 888396
2024/Structured Video-Language Modeling with Temporal Grouping and Spatial Grounding/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/210d5ae4-a566-42e4-b258-774314f1b83e_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dec951af84258553afd8c5cb8fae79fb081bf736b530221cafc1287b394ac0a1
3
+ size 19096990
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/full.md ADDED
@@ -0,0 +1,832 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STRUCTURING REPRESENTATION GEOMETRY WITH ROTATIONALLY EQUIVARIANT CONTRASTIVE LEARNING
2
+
3
+ Sharut Gupta*
4
+
5
+ MIT CSAIL
6
+
7
+ sharut@mit.edu
8
+
9
+ Joshua Robinson*
10
+
11
+ MIT CSAIL
12
+
13
+ joshrob@mit.edu
14
+
15
+ Derek Lim
16
+
17
+ MITCSAIL
18
+
19
+ dereklim@mit.edu
20
+
21
+ Soledad Villar
22
+
23
+ Johns Hopkins University
24
+
25
+ svillar3@jhu.edu
26
+
27
+ Stefanie jegelka
28
+
29
+ MIT CSAIL
30
+
31
+ stefje@mit.edu
32
+
33
+ # ABSTRACT
34
+
35
+ Self-supervised learning converts raw perceptual data such as images to a compact space where simple Euclidean distances measure meaningful variations in data. In this paper, we extend this formulation by adding additional geometric structure to the embedding space by enforcing transformations of input space to correspond to simple (i.e., linear) transformations of embedding space. Specifically, in the contrastive learning setting, we introduce an equivariance objective and theoretically prove that its minima forces augmentations on input space to correspond to rotations on the spherical embedding space. We show that merely combining our equivariant loss with a non-collapse term results in non-trivial representations, without requiring invariance to data augmentations. Optimal performance is achieved by also encouraging approximate invariance, where input augmentations correspond to small rotations. Our method, CARE: Contrastive Augmentation-induced Rotational Equivalence, leads to improved performance on downstream tasks, and ensures sensitivity in embedding space to important variations in data (e.g., color) that standard contrastive methods do not achieve. Code is available at https://github.com/Sharut/CARE.
36
+
37
+ # 1 INTRODUCTION
38
+
39
+ It is only partially understood what structure neural network representation spaces should possess in order to enable intelligent behavior to emerge efficiently (Ma et al., 2022). One known key ingredient is to learn low-dimensional spaces in which simple Euclidean distances effectively measure the similarity between data, as demonstrated by powerful self-supervised methods for web-scale learning (Chen et al., 2020; Schneider et al., 2021; Radford et al., 2021). However, many use cases require the use of richer structural relationships that similarities between data cannot capture. One example that has enjoyed considerable success is the encoding of relations between objects ( $X$ is a parent of $Y$ , $A$ is a treatment for $B$ ) as simple transformations of embeddings (e.g., translations), which has driven learning with knowledge graphs (Bordes et al., 2013; Sun et al., 2019; Yasunaga et al., 2022). But similar capabilities have been notably absent from existing self-supervised learning recipes.
40
+
41
+ Recent contrastive self-supervised learning approaches have explored ways to close this gap by ensuring representation spaces are sensitive to certain transformations of input data, such as variations in color (Dangovski et al., 2022; Devillers & Lefort, 2023; Garrido et al., 2023; Bhardwaj et al., 2023) that earlier contrastive methods lacked. Encouraging sensitivity is especially important in contrastive learning, as it is known to learn shortcuts that forget features that are not needed to solve the pretraining task (Robinson et al., 2021). This line of work formalizes sensitivity in terms of equivariance: transformations of input data correspond to predictable transformations in representation space. Equivariance requires specifying a family of transformations $a \in \mathcal{A}$ in the input space, a corresponding transformation $T_{a}$ in representation space, and training $f$ so that
42
+
43
+ ![](images/b394b80600fb4eef2e996fd07e6a8feea5d17c5d4b9fbca203e116f2197b006b.jpg)
44
+ Figure 1: CARE is an equivariant contrastive learning approach that trains augmentations (cropping, blurring, etc.) of input data to correspond to orthogonal transformations of embedding space.
45
+
46
+ ![](images/40e0be3b2c2dd40047a3ee0f0aa8d000c21eb66242e5b33b2255128dce22f32a.jpg)
47
+
48
+ $f(a(x)) \approx T_a f(x)$ . Prior works have considered a learnable feed-forward network for $T_{a}$ , (Devillers & Lefort, 2023; Garrido et al., 2023). However, we find that this approach suffers from geometric pathologies, such as inconsistency under compositions: $T_{a_2 \circ a_1} f(x) \neq T_{a_2} T_{a_1} f(x)$ . Furthermore, encoding the relation between the embeddings of $x$ and $a(x)$ in a non-linear way conflicts with the aim of learning a representation space where linear transformations relate different instances.
49
+
50
+ To address these concerns we propose CARE, an equivariant contrastive learning framework that learns to translate augmentations in the input space (such as cropping, blurring, and jittering) into simple linear transformations in feature space. Here, we use the sphere as our feature space (the standard contrastive learning space) and hence consider the isometries of the sphere: rotations and reflections, i.e., orthogonal transformations. As orthogonal transformations are less expressive (by design), our learning problem is more constrained, meaning that prior approaches for learning non-linear transforms cannot be used (see Section 3). Instead, CARE trains $f$ to preserve angles, i.e., $f(a(x))^{\top}f(a(x')) \approx f(x)^{\top}f(x')$ , a property that must hold if $f$ is orthogonally equivariant. We show that achieving low error on this seemingly weaker property also implies approximate equivariance and enjoys consistency under compositions. Critically, we can easily integrate CARE into contrastive learning workflows since both operate by comparing pairs of data.
51
+
52
+ The key contributions of this work include:
53
+
54
+ - Introducing CARE, a novel equivariant contrastive learning framework that trains transformations (cropping, jittering, blurring, etc.) in input space to approximately correspond to local orthogonal transformations in representation space.
55
+ - Theoretically proving and empirically demonstrating that CARE places an orthogonally equivariant structure on the embedding space.
56
+ - Showing that CARE increases sensitivity to features (e.g., color) compared to invariance-based contrastive methods, and also improves performance on image recognition tasks.
57
+
58
+ # 2 RETHINKING HOW AUGMENTATIONS ARE USED IN SELF-SUPERVISED LEARNING
59
+
60
+ Given access only to samples from a marginal distribution $p(x)$ on some input space $\mathcal{X}$ such as images, the goal of representation learning is commonly to train a feature extracting model $f: \mathcal{X} \to \mathbb{S}^{d-1}$ mapping to the unit sphere $\mathbb{S}^{d-1} = \{z \in \mathbb{R}^d : \|z\|_2 = 1\}$ . A common strategy to automatically generate supervision from the data is to additionally introduce a space of augmentations $\mathcal{A}$ , containing maps $a: \mathcal{X} \to \mathcal{X}$ which slightly perturb inputs $\bar{x}$ (blurring, cropping, jittering, etc.). Siamese self-supervised methods learn representation spaces that reflect the relationship between the embeddings of $x = a(\bar{x})$ and $x^+ = a^+(\bar{x})$ , commonly by training $f$ to be invariant or equivariant to the augmentations in the input space (Chen & He, 2021).
61
+
62
+ Invariance to augmentation. One approach is to train $f$ to embed $x$ and $x^{+}$ nearby—i.e., so that $f(x) = f(x^{+})$ is invariant to augmentations. The InfoNCE loss (van den Oord et al., 2018; Gutmann
63
+
64
+ & Hyvarinen, 2010) used in contrastive learning achieves precisely this:
65
+
66
+ $$
67
+ \mathcal {L} _ {\text {I n f o N C E}} (f) = \mathbb {E} _ {x, x ^ {+}, \{x _ {i} ^ {-} \} _ {i = 1} ^ {N}} \left[ - \log \frac {e ^ {f (x) ^ {\top} f \left(x ^ {+}\right) / \tau}}{e ^ {f (x) ^ {\top} f \left(x ^ {+}\right) / \tau} + \sum_ {i = 1} ^ {N} e ^ {f (x) ^ {\top} f \left(x _ {i} ^ {-}\right) / \tau}} \right], \tag {1}
68
+ $$
69
+
70
+ where $\tau > 0$ is a temperature hyperparameter, and $x_{i}^{-} \sim p$ are negative samples from the marginal distribution on $\mathcal{X}$ . As noted by Wang & Isola (2020), the contrastive training mechanism balances invariance to augmentations with a competing objective: uniformly distributing embeddings over the sphere, which rules out trivial solutions such as constant functions.
71
+
72
+ Whilst contrastive learning has produced considerable advances in large-scale learning (Radford et al., 2021), several lines of work have begun to probe the fundamental role of invariance in contrastive learning. Two key conclusions of recent investigations include: 1) invariance limits the expressive power of features learned by $f$ , as it removes information about features or transformations that may be relevant in fine-grained tasks (Lee et al., 2021; Xie et al., 2022), and 2) contrastive learning actually benefits from not having exact invariance. For instance, a critical role of the projection head is to expand the feature space so that $f$ is not fully invariant (Jing et al., 2022), suggesting that it is preferable for the embeddings of $x$ and $x^{+}$ to be close, but not identical.
73
+
74
+ Equivalence to augmentation. To address the limitations of invariance, recent work has additionally proposed to control equivariance (i.e., sensitivity) of $f$ to data transformations (Dangovski et al., 2022; Devillers & Lefort, 2023; Garrido et al., 2023). Prior works can broadly be viewed as training a set of features $f$ (sometimes alongside the usual invariant features) so that $f(a(x)) \approx T_{a}f(x)$ for samples $x \sim p$ from the data distribution where $T_{a}$ is some transformation of the embedding space. A common choice is to take $T_{a}f(x) = \mathrm{MLP}(f(x), a)$ , a learnable feed-forward network, and optimize a loss $\| \mathrm{MLP}(f(x), a) - f(a(x)) \|_2$ . Whilst a learnable MLP ensures that information about $a$ is encoded into the embedding of $a(x)$ , it permits complex non-linear relations between embeddings and hence does not necessarily encode relations in a linearly separable way. Furthermore, it does not enjoy the beneficial properties of equivariance in the formal group-theoretic sense, such as consistency under compositions in general: $T_{a_2 \circ a_1}f(x) \neq T_{a_2}T_{a_1}f(x)$ .
75
+
76
+ Instead, this work introduces CARE, an equivariant contrastive learning approach respecting two key design principles:
77
+
78
+ Principle 1. The map $T_{a}$ satisfying $f(a(x)) = T_{a}f(x)$ should be linear.
79
+
80
+ Principle 2. Equivariance should be learned from pairs of data, as in invariant contrastive learning.
81
+
82
+ The first principle asks that $f$ converts complex perturbations $a$ of input data into much simpler (i.e., linear) transformations in embedding space. Specifically, we constrain the complexity of $T_{a}$ by considering isometries of the sphere, $O(d) = \{Q \in \mathbb{R}^{d \times d} : QQ^T = QTQ = I\}$ , containing all rotations and reflections. Throughout this paper we define $f(a(x)) = T_{a}f(x)$ for $T_{a} \in O(d)$ to be orthogonal equivariance. This approach draws heavily from ideas in linear representation theory (Curtis & Reiner, 1966; Serre et al., 1977), which studies how to convert abstract group structures into matrix spaces equipped with standard matrix multiplication as the group operation.
83
+
84
+ The second principle stipulates how we want to learn orthogonal equivariance. Naively following previous non-linear approaches is challenging as our learning problem is more constrained, requiring learning a mapping $a \mapsto R_a$ to orthogonal matrices. Furthermore, for a single $(a,x)$ pair, the orthogonal matrix $R_a$ such that $f(a(x)) = R_a f(x)$ is not unique, making it hard to directly learn $R_a$ . We sidestep these challenges by, instead of explicitly learning $R_a$ , training $f$ so that an augmentation $a$ applied to two different inputs $x, x^+$ produces the same change in embedding space.
85
+
86
+ Our method, CARE, encodes data augmentations (cropping, blurring, jittering, etc.) as $O(d)$ transformations of embeddings using an equivariance-promoting objective function. CARE can be viewed as an instance of symmetry regularization, a term introduced by Shakerinava et al. (2022).
87
+
88
+ # 3 CARE: CONTRASTIVE AUGMENTATION-INDUCED ROTATIONAL EQUIVARIANCE
89
+
90
+ This section introduces a simple and practical approach for training a model $f: \mathcal{X} \to \mathbb{S}^{d-1}$ so that $f$ is orthogonally equivariant: i.e., a data augmentation $a \sim \mathcal{A}$ (cropping, blurring, jittering, etc.)
91
+
92
+ applied to any input $x \in \mathcal{X}$ causes the embedding $f(x)$ to be transformed by the same $R_{a} \in O(d)$ for all $x \in \mathcal{X}$ : $f(a(x)) = R_{a}f(x)$ .
93
+
94
+ To achieve this, we consider the following loss:
95
+
96
+ $$
97
+ \mathcal {L} _ {\mathrm {e q u i}} (f) = \mathbb {E} _ {a \sim \mathcal {A}} \mathbb {E} _ {x, x ^ {\prime} \sim \mathcal {X}} \left[ f \left(a \left(x ^ {\prime}\right)\right) ^ {\top} f (a (x)) - f (x) ^ {\top} f \left(x ^ {\prime}\right) \right] ^ {2} \tag {2}
98
+ $$
99
+
100
+ $$
101
+ \mathcal {L} _ {\text {e q u i}} (f) = \mathbb {E} _ {a \sim \mathcal {A}} \mathbb {E} _ {x, x ^ {\prime} \sim \mathcal {X}} \left[ f \left(a \left(x ^ {\prime}\right)\right) ^ {\top} f (a (x)) - f \left(a ^ {\prime} (x)\right) ^ {\top} f \left(a ^ {\prime} \left(x ^ {\prime}\right)\right) \right] ^ {2} \tag {3}
102
+ $$
103
+
104
+ Since inner products describe angles on the sphere, this objective enforces the angles between the embeddings of independent samples $x$ and $x'$ to be the same as those between their transformed counterparts $a(x)$ and $a(x')$ . This is necessarily true if $f$ is orthogonally equivariant or, more generally, $R_a \in O(d)$ exists. But the converse—that $\mathcal{L}_{\mathrm{equi}} = 0$ implies orthogonal equivariance—is non-obvious. In Section 3.1 we theoretically analyze $\mathcal{L}_{\mathrm{equi}}$ , demonstrating that it does indeed enforce mapping input augmentations to orthogonal transformations of embeddings. In practice, we replace the $f(x)^{\top}f(x')$ term with $f(a'(x))^{\top}f(a'(x'))$ for a freshly sampled $a' \sim \mathcal{A}$ , noting that minimizing this variant also minimizes $\mathcal{L}_{\mathrm{equi}}$ , if we assume $a'$ can be the identity function with non-zero probability. A trivial but undesirable solution that minimizes $\mathcal{L}_{\mathrm{equi}}$ is to collapse the embeddings of all points to be the same (see Figure 10). One natural approach to avoiding trivial solutions is to combine the equivariance loss with a non-collapse term such as the uniformity $\mathcal{L}_{\mathrm{unif}}(f) = \log \mathbb{E}_{x,x' \sim \mathcal{X}} \exp(f(x)^{\top}f(x'))$ (Wang & Isola, 2020) whose optima $f$ distribute points uniformly over the sphere:
105
+
106
+ $$
107
+ \mathcal {L} (f) = \mathcal {L} _ {\text {e q u i}} (f) + \mathcal {L} _ {\text {u n i f}} (f). \tag {4}
108
+ $$
109
+
110
+ This is directly comparable to the InfoNCE loss, which can similarly be decomposed into two terms:
111
+
112
+ $$
113
+ \mathcal {L} _ {\text {I n f o N C E}} (f) = \mathcal {L} _ {\text {i n v}} (f) + \mathcal {L} _ {\text {u n i f}} (f) \tag {5}
114
+ $$
115
+
116
+ where $\mathcal{L}_{\mathrm{inv}}(f) = \mathbb{E}_{a,a^{\prime}\sim \mathcal{A}}\| f(a(x)) - f(a^{\prime}(x))\|$ is minimized when $f$ is invariant to $\mathcal{A}$ i.e., $f(a(x)) = f(x)$ . Figure 10 in the Appendix shows that training using $\mathcal{L}_{\mathrm{equi}} + \mathcal{L}_{\mathrm{unif}}$ yields nontrivial representations. However, the performance is below that of invariance-based contrastive learning approaches. We hypothesize that this is because data augmentations—which make small perceptual changes to data—should correspond to small perturbations of embeddings, which $\mathcal{L}_{\mathrm{equi}}$ does not enforce.
117
+
118
+ To rule out this possibility, we introduce CARE: Contrastive Augmentation-induced Rotational Equivariance. CARE additionally enforces the orthogonal transformations in embedding space to be localized by reintroducing an invariance loss term $\mathcal{L}_{\mathrm{inv}}$ to encourage $f$ to be approximately invariant. Doing so breaks the indifference of $\mathcal{L}_{\mathrm{equi}}$ between large and small rotations, biasing towards small. Specifically, we propose the following objective that combines our equivariant loss with InfoNCE:
119
+
120
+ $$
121
+ \mathcal {L} _ {\text {C A R E}} (f) = \mathcal {L} _ {\text {i n v}} (f) + \mathcal {L} _ {\text {u n i f}} (f) + \lambda \mathcal {L} _ {\text {e q u i}} (f) \tag {6}
122
+ $$
123
+
124
+ where $\lambda$ weights the equivariant loss. We note that many variations of this approach are possible. For instance, the equivariant loss and InfoNCE loss could use different augmentations, resulting in invariance to specific transformations while maintaining rotational equivariance to others, similar to Dangovski et al. (2022). The InfoNCE loss can also be replaced by other Siamese self-supervised losses. We leave further exploration of these possibilities to future work. In all, CARE consists of three components: (i) a term to induce orthogonal equivariance; (ii) a non-collapse term; and (iii) an invariance term to enforce localized transformations on the embedding space.
125
+
126
+ # 3.1 THEORETICAL PROPERTIES OF ORTHOGONALLY EQUIVARIANT LOSS
127
+
128
+ In this section, we establish that matching angles via $\mathcal{L}_{\mathrm{equi}}$ leads to a seemingly stronger property. Specifically, $\mathcal{L}_{\mathrm{equi}} = 0$ implies the existence of an orthogonal matrix $R_{a} \in O(d)$ for any augmentation $a$ , such that $f(a(x)) = R_{a}f(x)$ holds for all $x$ . The converse also holds and is easy to see. Indeed, suppose such an $R_{a} \in O(d)$ exists. Then, $f(a(x'))^\top f(a(x)) = f(x')^\top R_{a}^\top R_{a}f(x) = f(x)^\top f(x')$ , which implies $\mathcal{L}_{\mathrm{equi}}(f) = 0$ . We formulate the first direction as a proposition.
129
+
130
+ Proposition 1. Suppose $\mathcal{L}_{\mathrm{equi}}(f) = 0$ . Then for almost every $a \in \mathcal{A}$ , there is an orthogonal matrix $R_a \in O(d)$ such that $f(a(x)) = R_a f(x)$ for almost all $x \in \mathcal{X}$ .
131
+
132
+ Figure 1 illustrates this result. Crucially $R_{a}$ is independent of $x$ , without which the Proposition 1 would be trivial. That is, a single orthogonal transformation $R_{a}$ captures the impact of applying $a$ across the entire input space $\mathcal{X}$ . Consequently, exact minimization of $\mathcal{L}_{\mathrm{equi}}$ loss converts "unstructured" augmentations in input space to have a structured geometric interpretation as rotations in the embedding space. In Appendix B.1, we extend this result to the case where the loss is low but not exactly minimized, in which case we have a guarantee of approximate equivariance.
133
+
134
+ This result can be expressed as the existence of a mapping $\rho : \mathcal{A} \to O(d)$ that encodes the space of augmentations within $O(d)$ . This raises a natural question: how much of the structure of $\mathcal{A}$ does this encoding preserve? For instance, assuming $\mathcal{A}$ is a semi-group (i.e., closed under compositions $a' \circ a \in \mathcal{A}$ ), does this transformation respect compositions: $f(a'(a(x)) = R_{a'}R_{a}f(x)$ ? This property does not hold for non-linear actions (Devillers & Lefort, 2023), but does for orthogonal equivariance:
135
+
136
+ Corollary 1. If $\mathcal{L}_{\text{equi}}(f) = 0$ and $\{f(x):x\in \mathcal{X}\}$ spans $\mathbb{R}^d$ , then $\rho :\mathcal{A}\to O(d)$ given by $\rho (a) = R_{a}$ satisfies $\rho (a^{\prime}\circ a) = \rho (a^{\prime})\rho (a)$ for almost all $a,a^{\prime}$ . That is, $\rho$ defines a group action on $\mathbb{S}^{d - 1}$ up to a set of measure zero.
137
+
138
+ Formally, this result states that if $\mathcal{A}$ is a semi-group, then $\rho : \mathcal{A} \to O(d)$ defines a group homomorphism (or linear representation of $\mathcal{A}$ in the sense of representation theory (Curtis & Reiner, 1966; Serre et al., 1977), a branch of mathematics that studies the encoding of abstract groups as spaces of linear maps).
139
+
140
+ To exactly attain $\mathcal{L}_{\mathrm{equi}}(f) = 0$ , the space of augmentations $\mathcal{A}$ needs to have a certain structure, but this becomes less restrictive if $d$ is large. Assuming for simplicity that $\mathcal{A}$ is a group, the first isomorphism theorem for groups states that $\rho(\mathcal{A}) \simeq \mathcal{A} / \ker(\rho)$ . For instance, if $\ker(\rho)$ is trivial, the equivariant loss can be exactly zero when the group of augmentations is a subgroup of the orthogonal group. Examples include orthogonal transformations or rotations that fix a subspace—i.e., $O(d')$ or $SO(d')$ with $d' \leq d$ —or subgroups of the permutation group on $d$ elements. Furthermore, the Peter-Weyl theorem implies that any compact Lie group can be realized as a closed subgroup of $O(d)$ for some $d$ (Peter & Weyl, 1927). As with Proposition 1, we also extend this result to the case of low loss that is not exactly zero, where we show that compositionality is approximately preserved.
141
+
142
+ ![](images/b0f5c89182b300d908f809df3aa02d23c7e0ff8e5a5522b8ba436c5621d98b51.jpg)
143
+ Figure 2: When $\mathcal{L}_{\mathrm{equi}} = 0$ compositions of augmentations correspond to compositions of rotations.
144
+
145
+ # 3.2 EXTENSIONS TO OTHER GROUPS
146
+
147
+ Proposition 1 states that perfectly optimizing $\mathcal{L}_{\mathrm{equi}} = 0$ produces an $f$ that is equivariant, encoding augmentations in the input space as orthogonal transformation in the embedding space. Notably, since the computation of $\mathcal{L}_{\mathrm{equi}}$ solely relies on pairwise data instances $x, x' \in \mathcal{X}$ , it naturally aligns with the contrastive learning paradigm that already works with pairs of data.
148
+
149
+ In fact, it is possible to extend the idea of CARE and its benefits to some other group actions. Mathematically, invariants of the action of $O(d)$ on $n$ points—seen in $(\mathbb{R}^d)^n$ as $Q(x_1,\ldots x_n) = (Qx_1,\ldots ,Qx_n)$ —can be expressed as a function of pairs of objects $(x_{i}^{\top}x_{j})_{i,j = 1\dots n}$ . This is because the orthogonal group is defined as the stabilizer of a bilinear form. In other words, letting $B(x,x^{\prime}) = x^{\top}x^{\prime}$ denote the standard inner product, we have
150
+
151
+ $$
152
+ O (d) = \left\{A \in G L (d): B \left(A x, A x ^ {\prime}\right) = B \left(x, x ^ {\prime}\right) \text {f o r a l l} x, x ^ {\prime} \in \mathbb {R} ^ {d} \right\}. \tag {7}
153
+ $$
154
+
155
+ This argument applies more generally to other groups that are defined as stabilizers of bilinear forms. For instance, the Lorentz group, which has applications in the context of special relativity, can be defined as the stabilizer of the Minkowski inner product. Additionally, the symplectic group, which is used to characterize Hamiltonian dynamical systems, can be defined in a similar manner.
156
+
157
+ Such extensions to other groups allow to use CARE for different embedding space geometries. For instance, several recent works have used a hyperbolic space as an embedding space for self-supervised learners (Ge et al., 2022; Yue et al., 2023; Desai et al., 2023). If we constrain our embedding to a hyperboloid model of hyperbolic space, then linear isometries of this space are precisely the Lorentz group. Further discussions on extensions to other groups are given in Appendix D.
158
+
159
+ ![](images/60dd2abec96f9414c9b7c9459490c0cf3c1812a712a237f76683705cd001e712.jpg)
160
+ Figure 3: Trajectories through embedding space of three randomly sampled protein point clouds, rotated from 0 to $2\pi$ in three orthogonal axes. Rows correspond to different training methods.
161
+
162
+ # 4 MEASURING ORTHOGONAL ACTION ON EMBEDDING SPACE
163
+
164
+ To probe the geometric properties of CARE, we consider two efficiently computable metrics for empirically measuring the orthogonal equivariance in the embedding space.
165
+
166
+ Wahba's problem. A natural way to assess the equivariance of $f$ is to sample a batch of data $\{x_i\}_{i=1}^n$ and an augmentation $a$ and test to what extent applying $a$ transforms the embeddings of each $x_i$ the same way. To measure this we compute a single rotation that approximates the map from $f(x_i)$ to $f(a(x_i))$ for all $i$ . Let $F$ and $F_a \in \mathbb{R}^{d \times n}$ have $i$ th columns $f(x_i)$ and $f(a(x_i))$ respectively, then we compute the error $\mathcal{W}_f = \min_{R \in SO(d)} \| RF - F_a \|_{\mathrm{Fro}}$ , where $\| \cdot \|_{\mathrm{Fro}}$ denotes the Frobenius norm. If $\mathcal{W}_f = 0$ , then $f(a(x_i)) = R_a f(x_i)$ for all $i$ . This is a well-studied problem known as Wahba's problem. The analytic solution to Wahba's problem is computed easily. It is nearly $R^* = UV^\top$ where $U\Sigma V^\top$ is a singular value decomposition of $F_a F^\top$ . However, a slight modification is required as this $R^*$ could have determinant $\pm 1$ , and therefore may not belong to $SO(d)$ . The only modification needed is to re-scale so that the determinant is one: $R^* = U \cdot \operatorname{diag}\{\mathbf{1}_{(n-1)}, \det(U)\det(V)\} \cdot V^\top$ where $\mathbf{1}_n$ denotes the vector in $\mathbb{R}^n$ of all ones.
167
+
168
+ Relative rotational equivariance. Optimizing for the CARE objective may potentially result in learning invariance since for input image $x$ , $f(a(x)) = f(x)$ for $a \in \mathcal{A}$ is a trivial optimal solution of $\arg \min_{f} \mathcal{L}_{\mathrm{equi}}(f)$ . To check that our model is learning non-trivial equivariance, we consider a metric similar to one proposed by Bhardwaj et al. (2023)
169
+
170
+ $$
171
+ \gamma_ {f} = \mathbb {E} _ {a \sim \mathcal {A}} \mathbb {E} _ {x, x ^ {\prime} \sim \chi} \left\{\frac {\left(\| f \left(a \left(x ^ {\prime}\right)\right) - f (a (x)) \| ^ {2} - \| f \left(x ^ {\prime}\right) - f (x) \| ^ {2}\right) ^ {2}}{\left(\| f \left(a \left(x ^ {\prime}\right)\right) - f \left(x ^ {\prime}\right) \| ^ {2} + \| f (a (x)) - f (x) \| ^ {2}\right) ^ {2}} \right\}. \tag {8}
172
+ $$
173
+
174
+ Here, the denominator measures the invariance of the representation, with smaller values corresponding to greater invariance to the augmentations. The numerator, on the other hand, measures equivariance and can be simplified to $\left[f(a(x'))^\top f(a(x)) - f(x)^\top f(x')\right]^2$ (i.e., $\mathcal{L}_{\mathrm{equi}}(f)$ ) up to a constant, because $f$ maps to the unit sphere. The ratio $\gamma_f$ of these two terms measures the non-trivial equivariance, with a lower value implying greater non-trivial orthogonal equivariance.
175
+
176
+ # 5 EXPERIMENTS
177
+
178
+ We examine the representations learned by CARE, as well as those obtained from purely invariance-based contrastive approaches. We describe our experiment configurations in Appendix F.
179
+
180
+ # 5.1 LEARNING REPRESENTATIONS OF PROTEIN POINT CLOUDS
181
+
182
+ We consider the problem of learning representations of proteins from the Protein Data Bank (Burley et al., 2021). Each protein is described by a point cloud $X \in \mathbb{R}^{n \times 3}$ . To respect the permutation invariance of each point cloud, we take $f$ to be a DeepSet (Zaheer et al., 2017), producing embeddings in $\mathbb{R}^{16}$ , and train CARE using random rotations of 3D space as the augmentations—i.e., $X$ and $XR$ are a positive pair for $R \in SO(3)$ . We evaluate our models on the task of predicting the first principal component of the point cloud, an important structural property of the input. This task is rotation equivariant, so we expect that CARE should outperform the invariance-based methods such as SimCLR, as is verified in Figure 4.
183
+
184
+ We test equivariance to rotations by randomly sampling a new protein $X$ , and a sequence of rotations $\{R_i\}_{i=1}^{100}$ along each of the three orthogonal axes, evenly spaced, tracing a full $360^\circ$ rotation of the point cloud. We then compute $z_i = f(X R_i)$ for each $i$ , and project them into a 2D space. Each row of Figure 3 shows the trajectory of 3 different proteins, and three rotation trajectories, for a given training method. We find that CARE exhibits a much more regular geometry than models trained with SimCLR, $\mathcal{L}_{\mathrm{unif}}$ , or $\mathcal{L}_{\mathrm{inv}}$ . Learning the SO(3) manifold is challenging, and previous works assume access to the corresponding group action (Quessard et al., 2020; Park et al., 2021). However, CARE learns it by merely using $x$ and $a(x)$ , without relying on the group action $a$ .
185
+
186
+ ![](images/ad3ef36b29fd7d34bddd2620e774705aa09f90db437e3402514dcd1908d0ffaa.jpg)
187
+ Figure 4: CARE achieves the lowest error on the task of predicting the first principal component of a protein
188
+
189
+ # 5.2 QUANTITATIVE MEASURES FOR ORTHOGONAL EQUIVARIANCE
190
+
191
+ Wahba's Problem We compare ResNet-18 models pretrained with CARE and with SimCLR on CIFAR10. For each model, we compute the optimal value $\mathcal{W}_f$ of Wahba's problem, as introduced in Section 4, over repeated trials. In each trial, we sample a single augmentation $a \sim \mathcal{A}$ at random and compute $\mathcal{W}_f$ for $f = f_{\mathrm{CARE}}$ and $f = f_{\mathrm{SimCLR}}$ over the test data. We repeat this process 20 times and plot the results in Figure 5, where the colors of dots indicate the sampled augmentation. Results show that CARE has a lower average error and worst-case error. Further, comparing point-wise for each augmentation, CARE achieves lower error in nearly all cases.
192
+
193
+ ![](images/a9c2a4391104fdd0a9e73582aa6cee8cd86a02fdcb2435adac7b513be855aa4b.jpg)
194
+ Figure 5: Measuring equivari- Figure 6: Histogram of coance using Wahba's problem. sine angles between data pairs. Figure 7: Linear readout error as Lower score is more equivariant. CARE has much lower variance. the loss weightings vary.
195
+
196
+ ![](images/a8bd26cd5544915ad70602346ab39827f3cf585a21e7f54288ac11955b0e65ef.jpg)
197
+
198
+ ![](images/08eb94d2efe42eafca3ce9f73bbbacb0bd584dbad2b3522a34d5ba49b440c4a4.jpg)
199
+
200
+ Analyzing structure on a 2D manifold. To further study $\mathcal{L}_{\mathrm{equi}}$ , we train an encoder $f$ that projects the input onto a unit circle $\mathbb{S}^1$ , where orthogonal transformations are defined by angles. We measure the cosine of the angle between pairs $f(x)$ and $f(a(x))$ for all $x$ in the test set, for 20 distinct sampled augmentations $a \sim \mathcal{A}$ . As shown in Figure 6, Both CARE and SimCLR exhibit high density close to 1, demonstrating approximate invariance. However, unlike CARE, SimCLR exhibits non-zero density in the region $-0.5$ to $-1.0$ , indicating that the application of augmentations significantly displaces the embeddings. Further, CARE consistently exhibits lower variance of the cosine between $f(x)$ and $f(a(x))$ for a fixed augmentation, showing that it transforms all embeddings in the same way.
201
+
202
+ Ablation of loss terms. The CARE loss $\mathcal{L}_{\mathrm{CARE}}$ is a weighted sum of the InfoNCE loss $\mathcal{L}_{\mathrm{InfoNCE}}$ and the orthogonal equivariance loss $\mathcal{L}_{\mathrm{equi}}$ . Figure 7 evaluates the performance of ResNet-50 models trained
203
+
204
+ ![](images/9177f8c118af23f69a08568ff29435421c3e3ca4f4c8cf3ae24430ee456bc804.jpg)
205
+ Figure 8: Relative rotational equivariance (Lower is more equivariant). Both CARE and invariance-based contrastive methods (e.g., SimCLR) produce approximately invariant embeddings. However, CARE learns a considerably more rotationally structured embedding space.
206
+ Input
207
+ $\therefore m = \frac{3}{11}$
208
+ ${13}/{14}$
209
+ #
210
+ $\therefore m = \frac{3}{11}$
211
+ $\therefore m = \frac{3}{11}$
212
+ $\therefore m = \frac{3}{11}$
213
+ #
214
+ A
215
+ #
216
+ #
217
+
218
+ A
219
+ Query
220
+ $\therefore m = \frac{3}{11}$
221
+ ${13}/{14}$
222
+ W
223
+ A
224
+ #
225
+ $\therefore m = \frac{3}{11}$
226
+ A
227
+ $\therefore m = \frac{3}{11}$
228
+ #
229
+ #
230
+ #
231
+ $\therefore m = \frac{3}{11}$
232
+ $\therefore m = \frac{3}{11}$
233
+ ${13}/{14}$
234
+ $\therefore m = \frac{3}{11}$
235
+ $\therefore m = \frac{3}{11}$
236
+ A
237
+ $\therefore m = \frac{3}{11}$ ;
238
+ $\therefore m = \frac{3}{11}$
239
+ $\therefore m = \frac{3}{11}$
240
+ #
241
+ #
242
+ $\therefore m = \frac{3}{11}$
243
+ $\therefore m = \frac{3}{11}$
244
+ $\therefore m = \frac{3}{11}$
245
+ D.
246
+ #
247
+ #
248
+ #
249
+ $\therefore m = \frac{3}{11}$
250
+ $\therefore m = \frac{3}{11}$
251
+ A
252
+ #
253
+ $\therefore m = \frac{3}{11}$
254
+ A
255
+ $\therefore m = \frac{3}{11}$
256
+ Figure 9: CARE exhibits sensitivity to features that invariance-based contrastive methods (e.g., SimCLR) do not. For each query input, we retrieve top 5 nearest neighbors in the embedding space.
257
+
258
+ ![](images/830c94210273684d6dd9052a611bb58ab2f1e1ae1643a7adef0ea0e4766f727d.jpg)
259
+ CARE (ours)
260
+ #
261
+ 7
262
+ #
263
+ K
264
+ #
265
+ #
266
+ $\therefore m = \frac{3}{11}$
267
+ $\therefore m = \frac{3}{11}$
268
+ #
269
+ #
270
+ #
271
+ A
272
+ A
273
+ $\therefore m = \frac{3}{11}$
274
+ #
275
+ ${13}/{14}$
276
+ $\therefore m = \frac{3}{11}$
277
+ $\therefore m = \frac{3}{11}$
278
+ A
279
+ $\therefore m = \frac{3}{11}$
280
+ $\therefore m = \frac{3}{11}$
281
+ D
282
+ $\therefore m = \frac{3}{11}$
283
+ $\therefore m = \frac{3}{11}$
284
+ A
285
+ $\therefore m = \frac{3}{11}$
286
+ A
287
+ #
288
+ $\therefore m = \frac{3}{11}$
289
+ $\therefore m = \frac{3}{11}$
290
+ A
291
+ A
292
+ #
293
+ $\therefore m = \frac{3}{11}$
294
+ $\therefore m = \frac{3}{11}$
295
+ ${13}/{14}$
296
+ $\therefore m = \frac{3}{11}$
297
+ #
298
+ D
299
+
300
+ $\therefore m = \frac{3}{11}$
301
+ #
302
+ $\therefore m = \frac{3}{11}$ ;
303
+ A
304
+ (1)
305
+ $\therefore m = \frac{3}{11}$
306
+ #
307
+ $\therefore m = \frac{3}{11}$
308
+
309
+ ![](images/0ddd632c2f5581b1d90f11396ba3de4aca268cd7c3937f3644b2436b6921f6a7.jpg)
310
+
311
+ SimCLR
312
+ $\therefore m = \frac{3}{11}$
313
+ $\therefore m : x = 1$ 或 ${3x} + {4y} + 1 = 0$
314
+ $\therefore m = \frac{3}{11}$
315
+ #
316
+ #
317
+ #
318
+ #
319
+ #
320
+ #
321
+
322
+ $\therefore m = \frac{3}{11}$
323
+
324
+ A
325
+ $\therefore m = \frac{3}{11}$
326
+
327
+ A
328
+ #
329
+ #
330
+ #
331
+ #
332
+
333
+ $\therefore m = \frac{3}{11}$
334
+ A
335
+ ${12}/{12}$
336
+
337
+ on CIFAR10 using $\mathcal{L}_{\mathrm{InfoNCE}} + \lambda \mathcal{L}_{\mathrm{equi}}$ for varying $\lambda$ , finding optimal $\lambda$ in the range $0.01 \leq \lambda \leq 0.1$ . We additionally split the InfoNCE loss into constituent parts $\mathcal{L}_{\mathrm{inv}}$ , $\mathcal{L}_{\mathrm{unif}}$ , and test different combinations of the three losses, including $\mathcal{L}_{\mathrm{equi}}$ . We find that using all three jointly is optimal. See Figure 10 in Appendix G.1 for detailed results.
338
+
339
+ Relative rotational equivariance. We measure the relative rotational equivariance for both CARE and SimCLR over the course of pretraining by following the approach outlined in Section 4. Specifically, we compare ResNet-18 models trained using CARE and SimCLR on CIFAR10. From Figure 8, we observe that both the models produce embeddings with comparable non-zero invariance loss $\mathcal{L}_{\mathrm{inv}}$ indicating approximate invariance. However, they differ in their sensitivity to augmentations, with CARE attaining a much lower relative equivariance error $\gamma_{f}$ . Importantly, this shows that CARE is not achieving lower equivariance error $\mathcal{L}_{\mathrm{equi}}$ by collapsing to invariance, a trivial form of equivariance.
340
+
341
+ # 5.3 QUALITATIVE ASSESSMENT OF EQUIVARIANCE
342
+
343
+ A key property promised by equivariant contrastive models is sensitivity to specific augmentations. To qualitatively evaluate the sensitivity, or equivariance, of our models, we consider an image retrieval task on the Flowers-102 dataset (Nilsback & Zisserman, 2008), as considered by Bhardwaj et al. (2023). Specifically, when presented with an input image $x$ , we extract the top 5 nearest neighbors based on the Euclidean distance of $f(x)$ and $f(a(x))$ , where $a \in \mathcal{A}$ . Figure 9 shows that retrieved results for the CARE model exhibit greater variability in response to a change in query color compared to the SimCLR model, which remains largely invariant. Additionally, Figure 21 compares CARE with EquiMOD (Devillers & Lefort, 2023), an equivariant baseline.
344
+
345
+ # 5.4 LINEAR PROBE FOR IMAGE CLASSIFICATION
346
+
347
+ Next, we examine the quality of features learned by CARE for solving image classification tasks. We train ResNet-50 models on four datasets: CIFAR10, CIFAR100, STL10, and ImageNet100 using SimCLR and MoCo-v2 (see Appendix F for details). We refer to the model trained using CARE with SimCLR or MoCo-v2 backbone as $\mathrm{CARE}_{\mathrm{SimCLR}}$ and $\mathrm{CARE}_{\mathrm{MoCo-v2}}$ respectively. For each method and dataset, we evaluate the quality of the learned features by training a linear classifier (i.e., probe (Alain & Bengio, 2017)) on the frozen features of $f$ and report the performance on the test set in Table 1. We find consistent improvements in performance using CARE, showing the benefits of our structured embedding approach for image recognition tasks.
348
+
349
+ Table 1: Top-1 and Top-5 linear probe accuracy (\%) on CIFAR10, CIFAR100, STL10 and ImageNet100 datasets. We report the mean performance from 3 different random initializations for the linear classifier. * denote numbers from Devillers & Lefort (2023), and ** from Zhuo et al. (2023)
350
+
351
+ <table><tr><td>Method</td><td>CIFAR10</td><td>CIFAR100</td><td>STL10</td><td>ImageNet100</td></tr><tr><td colspan="5">Invariant prediction approaches</td></tr><tr><td>SimCLR</td><td>90.98±0.10</td><td>66.77±0.34</td><td>84.19±0.13</td><td>72.79±0.08</td></tr><tr><td>MoCo-v2</td><td>91.95±0.05</td><td>69.88±0.23</td><td>-</td><td>73.50±0.19</td></tr><tr><td>BYOL</td><td>90.44*</td><td>67.41**</td><td>-</td><td>-</td></tr><tr><td>Barlow Twins</td><td>84.54±0.02</td><td>55.54±0.05</td><td>90.62±0.02</td><td></td></tr><tr><td colspan="5">Equivariant prediction approaches</td></tr><tr><td>EquiModSimCLR</td><td>91.28</td><td>67.59</td><td>83.67</td><td>-</td></tr><tr><td>EquiModBYOL</td><td>91.57*</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CARESimCLR</td><td>91.92±0.12 (↑0.94)</td><td>68.05±0.28 (↑1.28)</td><td>84.64±0.29 (↑0.45)</td><td>76.69±0.08 (↑3.90)</td></tr><tr><td>CAREMoCo-v2</td><td>92.19±0.01 (↑0.24)</td><td>70.56±0.15 (↑0.68)</td><td>88.97±0.48</td><td>74.30±0.07 (↑0.80)</td></tr><tr><td>CAREBarlow Twins</td><td>85.65±0.05 (↑1.11)</td><td>56.76±0.02 (↑1.22)</td><td>90.92±0.01 (↑0.30)</td><td>-</td></tr></table>
352
+
353
+ # 6 DISCUSSION
354
+
355
+ Converting transformations that are complex in input space into simple transformations in embedding space has many potential uses. For instance, modifying data (e.g., in order to reason about counterfactuals) can be viewed as transforming one embedding to another. If the sought after transformation was simple and predictable, it may be easier to find. Similarly, generalizing out-of-distribution is easier when extrapolating linearly (Xu et al., 2021), suggesting that linear transformations of embedding space may facilitate more reliable generalization. This work considers several design principles that may be broadly relevant: 1) learned equivariance preserves the expressivity of backbone architectures, and in some cases may be easier for model design than hard-coded equivariance, 2) linear group actions are desirable, but require carefully designed objectives (similar in spirit to the principle of parsimony (Ma et al., 2022), also advocated for by Shakerinava et al. (2022)), and 3) orthogonal (and related) symmetries are a promising structure for Siamese network training as they can be efficiently learned using pair-wise data comparisons.
356
+
357
+ # 7 ACKNOWLEDGEMENTS
358
+
359
+ This research was supported by NSF award CCF-2112665. Derek Lim is supported by National Science Foundation Graduate Research Fellowship. Soledad Villar is partially funded by the NSF-Simons Research Collaboration on the Mathematical and Scientific Foundations of Deep Learning (MoDL) (NSF DMS 2031985), NSF CISE 2212457, ONR N00014-22-1-2126 and an Amazon AI2AI Faculty Research Award.
360
+
361
+ We acknowledge MIT SuperCloud and Lincoln Laboratory Supercomputing Center for providing HPC resources that have contributed to this work. We wish to thank Michael Murphy for insightful discussions on extensions of our method to biology.
362
+
363
+ # REFERENCES
364
+
365
+ Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. In International Conference on Learning Representations (ICLR), 2017.
366
+ Ery Arias-Castro, Adel Javanmard, and Bruno Pelletier. Perturbation bounds for procrustes, classical scaling, and trilateration, with applications to manifold learning. Journal of machine learning research, 21, 2020.
367
+ Sangnie Bhardwaj, Willie McClinton, Tongzhou Wang, Guillaume Lajoie, Chen Sun, Phillip Isola, and Dilip Krishnan. Steerable equivariant representation learning. preprint arXiv:2302.11349, 2023.
368
+ Ben Blum-Smith and Soledad Villar. Equivariant maps from invariant functions. preprint arXiv:2209.14991, 2022.
369
+ Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems (NeurIPS), volume 26, 2013.
370
+ Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Velicković. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. preprint arXiv:2104.13478, 2021.
371
+ Stephen K Burley, Charmi Bhikadiya, Chunxiao Bi, Sebastian Bittrich, Li Chen, Gregg V Crichlow, Cole H Christie, Kenneth Dalenberg, Luigi Di Costanzo, Jose M Duarte, et al. Rcsb protein data bank: powerful new tools for exploring 3d structures of biological macromolecules for basic and applied research and education in fundamental biology, biomedicine, biotechnology, bioengineering and energy sciences. Nucleic acids research, 49(D1):D437-D451, 2021.
372
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning (ICML), pp. 1597-1607. PMLR, 2020.
373
+ Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 15750-15758, 2021.
374
+ Bilal Chughtai, Lawrence Chan, and Neel Nanda. A toy model of universality: Reverse engineering how networks learn group operations. In ICLR Workshop on Physics for Machine Learning, 2023.
375
+ Taco Cohen and Max Welling. Group equivariant convolutional networks. In International Conference on Machine Learning (ICML), pp. 2990-2999. PMLR, 2016.
376
+ Charles W Curtis and Irving Reiner. Representation theory of finite groups and associative algebras, volume 356. American Mathematical Soc., 1966.
377
+ Rumen Dangovski, Li Jing, Charlotte Loh, Seungwook Han, Akash Srivastava, Brian Cheung, Pulkit Agrawal, and Marin Soljacic. Equivariant contrastive learning. In International Conference on Learning Representations (ICLR), 2022.
378
+ Karan Desai, Maximilian Nickel, Tanmay Rajpurohit, Justin Johnson, and Ramakrishna Vedantam. Hyperbolic image-text representations. *ICLR Workshop on Multimodal Representation Learning*, 2023.
379
+ Alexandre Devillers and Mathieu Lefort. Equimod: An equivariance module to improve self-supervised learning. In International Conference on Learning Representations (ICLR), 2023.
380
+ Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR), 2021.
381
+ Quentin Garrido, Laurent Najman, and Yann Lecun. Self-supervised learning of split invariant equivariant representations. preprint arXiv:2302.10283, 2023.
382
+
383
+ Songwei Ge, Shlok Mishra, Simon Kornblith, Chun-Liang Li, and David Jacobs. Hyperbolic contrastive learning for visual representations beyond objects. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
384
+ Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Proceedings International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 297-304, 2010.
385
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770-778, 2016.
386
+ Li Jing, Pascal Vincent, Yann LeCun, and Yuandong Tian. Understanding dimensional collapse in contrastive self-supervised learning. In International Conference on Learning Representations (ICLR), 2022.
387
+ Sékou-Oumar Kaba, Arnab Kumar Mondal, Yan Zhang, Yoshua Bengio, and Siamak Ravanbakhsh. Equivalence with learned canonicalization functions. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
388
+ Hankook Lee, Kibok Lee, Kimin Lee, Honglak Lee, and Jinwoo Shin. Improving transferability of representations via augmentation-aware self-supervision. In Advances in Neural Information Processing Systems (NeurIPS), volume 34, pp. 17710-17722, 2021.
389
+ Yi Ma, Doris Tsao, and Heung-Yeung Shum. On the principles of parsimony and self-consistency for the emergence of intelligence. Frontiers of Information Technology & Electronic Engineering, 23 (9):1298-1323, 2022.
390
+ Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pp. 722-729. IEEE, 2008.
391
+ Jung Yeon Park, Ondrej Biza, Linfeng Zhao, Jan-Willem van de Meent, and Robin Walters. Learning symmetric representations for equivariant world models. 2021.
392
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019.
393
+ Fritz Peter and Hermann Weyl. Die Vollständigkeit der primitiven Darstellungen einer geschlossenen kontinuierlichen Gruppe. Mathematische Annalen, 97(1):737-755, 1927.
394
+ Robin Quessard, Thomas D Barrett, and William R Clements. Learning group structure and disentangled representations of dynamical environments. arXiv preprint arXiv:2002.06991, 2020.
395
+ Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning (ICML), pp. 8748-8763. PMLR, 2021.
396
+ Joshua Robinson, Li Sun, Ke Yu, Kayhan Batmanghelich, Stefanie Jegelka, and Suvrit Sra. Can contrastive learning avoid shortcut solutions? In Advances in Neural Information Processing Systems (NeurIPS), volume 34, pp. 4974-4986, 2021.
397
+ Barbara J Schmid. Finite groups and invariant theory. In Topics in Invariant Theory: Séminaire d'Algèbre P. Dubreil et M.-P. Malliavin 1989-1990 (40ème Année), pp. 35-66. Springer, 2006.
398
+ Alexei Schneider, Alexei Baevski, Shu-wen Chen, Sanjeev Khudanpur, and Andrew Davis. Wav2vec 2.0: A framework for self-supervised learning of speech representations. In Proceedings of the 2021 Conference of the International Speech Communication Association (INTERSPEECH), pp. 1657-1661, 2021.
399
+ Jean-Pierre Serre et al. Linear representations of finite groups, volume 42. Springer, 1977.
400
+
401
+ Mehran Shakerinava, Arnab Kumar Mondal, and Siamak Ravanbakhsh. Structuring representations using group invariants. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
402
+ Xavier Suau, Federico Danieli, T Anderson Keller, Arno Blaas, Chen Huang, Jason Ramapuram, Dan Busbridge, and Luca Zappella. Duet: 2d structured and approximately equivariant representations. 2023.
403
+ Zhiqing Sun, Zhi-Hong Deng, Jian-Yun Nie, and Jian Tang. RotatE: Knowledge graph embedding by relational rotation in complex space. In International Conference on Learning Representations (ICLR), 2019.
404
+ Aäron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. preprint arXiv:1807.03748, 2018.
405
+ Soledad Villar, David W Hogg, Kate Storey-Fisher, Weichi Yao, and Ben Blum-Smith. Scalars are universal: Equivariant machine learning, structured like classical physics. pp. 28848-28863, 2021.
406
+ Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning (ICML), pp. 9929-9939. PMLR, 2020.
407
+ Hermann Weyl. The classical groups: their invariants and representations. Princeton university press, 1946.
408
+ Tete Xiao, Xiaolong Wang, Alexei A Efros, and Trevor Darrell. What should not be contrastive in contrastive learning. In International Conference on Learning Representations (ICLR), 2021.
409
+ Yuyang Xie, Jianhong Wen, Kin Wai Lau, Yasar Abbas Ur Rehman, and Jiajun Shen. What should be equivariant in self-supervised learning. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4111-4120, 2022.
410
+ Keyulu Xu, Mozhi Zhang, Jingling Li, Simon S Du, Ken-ichi Kawarabayashi, and Stefanie Jegelka. How neural networks extrapolate: From feedforward to graph neural networks. In International Conference on Learning Representations (ICLR), 2021.
411
+ Michihiro Yasunaga, Antoine Bosselut, Hongyu Ren, Xikun Zhang, Christopher D Manning, Percy S Liang, and Jure Leskovec. Deep bidirectional language-knowledge graph pretraining. In Advances in Neural Information Processing Systems (NeurIPS), volume 35, pp. 37309-37323, 2022.
412
+ Yun Yue, Fangzhou Lin, Kazunori D Yamada, and Ziming Zhang. Hyperbolic contrastive learning. preprint arXiv:2302.01409, 2023.
413
+ Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017.
414
+ Zhijian Zhuo, Yifei Wang, Jinwen Ma, and Yisen Wang. Towards a unified theoretical understanding of non-contrastive learning via rank differential mechanism. In International Conference on Learning Representations (ICLR), 2023.
415
+
416
+ # A RELATED WORK
417
+
418
+ Geometry of representation space. Equivariance is a key tool for encoding geometric structure—e.g., symmetries—into neural network representations (Cohen & Welling, 2016; Bronstein et al., 2021). Whilst hard-coding equivariance into model architectures is very successful, approximate learned equivariance (Kaba et al., 2022; Shakerinava et al., 2022), has certain advantages: 1) it applies when the symmetry is provided only by data, with no closed-form expression, 2) it can still be used when it is unclear how to hard code equivariance into the architecture, and 3) it can exploit standard high capacity architectures (He et al., 2016; Dosovitskiy et al., 2021), benefiting from considerable engineering efforts to optimize their performance. Shakerinava et al. (2022) also consider learning orthogonal equivariance but consider problems where both input and embedding space are acted on by $O(d)$ . Our setting differs from this in two key ways: 1) we consider a very different set of transforms of input space—jitter, crops, etc.—and 2) CARE can be naturally integrated into contrastive learning, and 3) we theoretically study the minima of the angle-preserving loss. A related line of work, mechanistic interpretability, hypothesizes that algorithmic structure—possibly including group symmetries—emerges naturally within network connections during training (Chughtai et al., 2023). Our approach is very different from this as we directly train models to have the desired structure without relying on implicit processes.
419
+
420
+ Self-supervised learning. Prior equivariant contrastive learning approaches extend the usual setup of learning invariance by learning sensitivity to certain features known to be important for downstream tasks. For instance, Dangovski et al. (2022) learns to predict the augmentation applied but only considers a discrete group of 4-fold rotations. Lee et al. (2021) learns the difference of augmentation parameters and Xiao et al. (2021) constructs separate embedding sub-spaces that capture invariances to all but one augmentation. However, these approaches do not offer a meaningful structure to the embedding space. Others attempt to control how this sensitivity occurs. Specifically, Devillers & Lefort (2023); Garrido et al. (2023); Bhardwaj et al. (2023) learn a mapping from one latent representation to another, predicting how data augmentation affects the embedding. But this does not constrain the group action on embeddings, resulting in complex non-linear augmentation maps. Finally, the recent work Suau et al. (2023) implements approximate equivariance using 2D representations.
421
+
422
+ # B PROOFS OF THEORETICAL RESULTS
423
+
424
+ The aim of this section is to detail the proofs of the theoretical results presented in the main manuscript. The key theoretical tools driving our analysis are prepared separately in Section C.
425
+
426
+ Throughout our analysis, we assume that all spaces (e.g., $\mathcal{A}$ and $\mathcal{X}$ ) are subspaces of Euclidean space and therefore admit a Lebesgue measure. We also assume that all distributions (e.g., $a\sim \mathcal{A}$ and $x\sim \mathcal{X}$ ) admit a density with respect to the Lebesgue measure. With these conditions in mind, we recall the loss function that is the main object of study:
427
+
428
+ $$
429
+ \mathcal {L} _ {\text {e q u i}} (f) = \mathbb {E} _ {a \sim \mathcal {A}} \mathbb {E} _ {x, x ^ {\prime} \sim \chi} \left[ f \left(a \left(x ^ {\prime}\right)\right) ^ {\top} f (a (x)) - f (x) ^ {\top} f \left(x ^ {\prime}\right) \right] ^ {2} \tag {9}
430
+ $$
431
+
432
+ Next, we re-state and prove Proposition 1, our first key result.
433
+
434
+ Proposition 1. Suppose $\mathcal{L}_{\text{equi}}(f) = 0$ . Then for almost every $a \in \mathcal{A}$ , there is an orthogonal matrix $R_a \in O(d)$ such that $f(a(x)) = R_a f(x)$ for almost all $x \in \mathcal{X}$ .
435
+
436
+ Proof. Suppose that $\mathcal{L}_{\mathrm{equi}}(f) = 0$ . This means that $f(a(x'))^\top f(a(x)) = f(x)^\top f(x')$ for almost all $a \in G$ , and $x, x' \in \mathcal{X}$ . Setting $g_a(x) = f(a(x))$ , we have that $g_a(x')^\top g_a(x) = f(x)^\top f(x')$ . The continuous version of the First Fundamental Theorem of invariant theory for the orthogonal group (see Proposition 5) implies that there is an $R_a \in O(d)$ such that $f(a(x)) = g_a(x) = R_a f(x)$ .
437
+
438
+ As discussed in greater detail in the main manuscript, these results show that minimizing $\mathcal{L}_{\mathrm{equi}}$ produces a model where an augmentation $a$ corresponds to a single orthogonal transformation of embeddings $R_{a}$ , independent of the input. This result is continuous in flavor as it studies the loss over the full data distribution $p(x)$ . There exists a corresponding result for the finite sample loss
439
+
440
+ $$
441
+ \mathcal {L} _ {\text {e q u i}, n} (f) = \mathbb {E} _ {a \sim \mathcal {A}} \sum_ {i, j = 1} ^ {n} \left[ f (a (x _ {j})) ^ {\top} f (a (x _ {i})) - f (x _ {i}) ^ {\top} f (x _ {j}) \right] ^ {2}.
442
+ $$
443
+
444
+ Proposition 2. Suppose $\mathcal{L}_{\text{equi},n}(f) = 0$ . Then for almost every $a \in \mathcal{A}$ , there is an orthogonal matrix $R_a \in O(d)$ such that $f(a(x_i)) = R_a f(x_i)$ for all $i = 1, \ldots, n$ .
445
+
446
+ As for the population counterpart, the proof of this result directly follows from the application of the First Fundamental Theorem of invariant theory for the orthogonal group.
447
+
448
+ Proof of Proposition 2. Suppose that $\mathcal{L}_{\mathrm{equi}}(f) = 0$ . This means that for almost every $a \in G$ , and every $i, j = 1, \ldots, n$ we have $f(a(x_j))^\top f(a(x_i)) = f(x_i)^\top f(x_j)$ . In other words $AA^T = BB^T$ where $A, B \in \mathbb{R}^{n \times d}$ are matrices whose $i$ th rows are $A_i = f(a(x_i))^\top$ and $B_i = f(x_i)^\top$ respectively. This implies, by the First Fundamental Theorem of invariant theory for the orthogonal group (see Corollary 3), that there is an $R_a \in O(d)$ such that $A = BR_a$ . Considering only the $i$ th rows of $A$ and $B$ leads us to conclude that $f(a(x_i)) = R_a f(x_i)$ .
449
+
450
+ A corollary of Proposition 1 is that compositions of augmentations correspond to compositions of rotations.
451
+
452
+ Corollary 1. If $\mathcal{L}_{\text{equi}}(f) = 0$ and $\{f(x):x\in \mathcal{X}\}$ spans $\mathbb{R}^d$ , then $\rho :\mathcal{A}\to O(d)$ given by $\rho (a) = R_{a}$ satisfies $\rho (a^{\prime}\circ a) = \rho (a^{\prime})\rho (a)$ for almost all $a,a^{\prime}$ . That is, $\rho$ defines a group action on $\mathbb{S}^{d - 1}$ up to a set of measure zero.
453
+
454
+ Proof. Applying Proposition 1 on $a' \circ a$ as the sampled augmentation, we have that $f(a' \circ a(x_i)) = R_{a' \circ a}f(x_i) = \rho(a' \circ a)f(x_i)$ . However, taking $\bar{x} = a(x_i)$ and applying Proposition 1 twice we also know that $f(a' \circ a(x_i)) = f(a'(\bar{x})) = R_a f(\bar{x}) = R_{a'} f(a(x_i)) = R_{a'} R_a f(x) = \rho(a')\rho(a)f(x_i)$ . That is, $\rho(a' \circ a)f(x_i) = f(a' \circ a(x_i)) = \rho(a')\rho(a)f(x_i)$ . Since this holds for all $i$ and the set of $f(x_i)$ spans $\mathbb{R}^d$ , we have that $\rho(a' \circ a) = \rho(a')\rho(a)$ .
455
+
456
+ This corollary requires us to assume that $\mathcal{A}$ is a semi-group. That is, $\mathcal{A}$ is closed under compositions, but group elements do not necessarily have inverses and it does not need to include an identity element.
457
+
458
+ # B.1 APPROXIMATE EQUIVARIANCE FOR NONZERO LOSS
459
+
460
+ For Proposition 1, we show that when our equivariance loss is zero, the learned function is exactly equivariant. In practice, the equivariance loss may not exactly be minimized. Here, we give an approximate equivariance guarantee when the loss is small. The proof is based on Theorem 1 of Arias-Castro et al. (2020) (see Section C.1). For that, define
461
+
462
+ $$
463
+ \mathcal {L} _ {\text {e q u i}} (f, a) = \mathbb {E} _ {x, x ^ {\prime} \sim \chi} \left[ f \left(a \left(x ^ {\prime}\right)\right) ^ {\top} f (a (x)) - f (x) ^ {\top} f \left(x ^ {\prime}\right) \right] ^ {2} \tag {10}
464
+ $$
465
+
466
+ Proposition 3. Suppose we have a finite training set $\mathcal{X} = \{x_1, \ldots, x_n\}$ . For an augmentation $a \in \mathcal{A}$ , suppose that
467
+
468
+ $$
469
+ \mathcal {L} _ {\text {e q u i}, n} (f, a) = \sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {n} \left[ f \left(a \left(x _ {i}\right)\right) ^ {\top} f \left(a \left(x _ {j}\right)\right) - f \left(x _ {i}\right) ^ {\top} f \left(x _ {j}\right) \right] ^ {2} \leq \epsilon^ {4}, \tag {11}
470
+ $$
471
+
472
+ and that the matrix $A = [f(x_{1}),\ldots ,f(x_{n})]^{\top}$ satisfies the conditions of Proposition 6. Let $A^{\ddagger}$ denote the pseudoinverse of $A$ . Then there is an $R_{a}\in O(d)$ such that
473
+
474
+ $$
475
+ \sqrt {\sum_ {i = 1} ^ {n} \left\| f \left(a \left(x _ {i}\right)\right) - R _ {a} f \left(x _ {i}\right) \right\| ^ {2}} \leq (1 + \sqrt {2}) \| A ^ {\ddagger} \| \epsilon^ {2}, \tag {12}
476
+ $$
477
+
478
+ and hence for each $x_{i}$ ,
479
+
480
+ $$
481
+ \left\| f \left(a \left(x _ {i}\right)\right) - R _ {a} f \left(x _ {i}\right) \right\| \leq (1 + \sqrt {2}) \| A ^ {\ddagger} \| \epsilon^ {2}. \tag {13}
482
+ $$
483
+
484
+ Proof. The first inequality is a direct application of Proposition 6, where $A = [f(x_1), \ldots, f(x_n)]^\top$ and $B = [f(a(x_1)), \ldots, f(a(x_n))]^\top$ . The second inequality follows from the fact that $\| x \|_{\infty} \leq \| x \|_2$ for vectors $x \in \mathbb{R}^n$ .
485
+
486
+ Corollary 2. If $\mathcal{L}_{\text{equi}}(f, a) \leq \epsilon^4$ for all $a \in \mathcal{A}$ and $A = [f(x_1), \ldots, f(x_n)]^\top$ satisfies the conditions in Proposition 6 then $\rho : \mathcal{A} \to O(d)$ given by $\rho(a) = R_a$ satisfies $\|\rho(a' \circ a) - \rho(a')\rho(a)\| \leq o(\epsilon^2)$ for any $a, a' \in \mathcal{A}$ .
487
+
488
+ Proof. Applying Proposition 3 on $a' \circ a$ and using the triangle inequality, we have
489
+
490
+ $$
491
+ \begin{array}{l} \left\| R _ {a ^ {\prime} \circ a} f (x) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \leq \left\| R _ {a ^ {\prime} \circ a} f (x) - f \left(a ^ {\prime} \circ a (x)\right) + f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \\ \leq \left\| R _ {a ^ {\prime} \circ a} f (x) - f \left(a ^ {\prime} \circ a (x)\right) \right\| + \left\| f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \\ \leq \left\| f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| + (1 + \sqrt {2}) \left\| A ^ {\ddagger} \right\| \epsilon^ {2} \\ \end{array}
492
+ $$
493
+
494
+ Now, using triangle inequality again, we have
495
+
496
+ $$
497
+ \begin{array}{l} \left\| R _ {a ^ {\prime} \circ a} f (x) - f \left(a ^ {\prime} \circ a (x)\right) \right\| = \left\| f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} f (a (x)) + R _ {a ^ {\prime}} f (a (x)) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \\ \leq \left\| f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} f (a (x)) \right\| + \left\| R _ {a ^ {\prime}} f (a (x)) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \\ \end{array}
498
+ $$
499
+
500
+ Taking $\bar{x} = a(x)$ , using the submultiplicativity property of matrix norms and applying Proposition 3 twice we have,
501
+
502
+ $$
503
+ \begin{array}{l} \left\| f \left(a ^ {\prime} \circ a (x)\right) - R _ {a ^ {\prime}} f (a (x)) \right\| + \left\| R _ {a ^ {\prime}} f (a (x)) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \\ = \| f \left(a ^ {\prime} (\bar {x})\right) - R _ {a ^ {\prime}} f (\bar {x}) \| + \| R _ {a ^ {\prime}} (f (a (x)) - R _ {a} f (x)) \| \\ \leq \left\| f \left(a ^ {\prime} (\bar {x})\right) - R _ {a ^ {\prime}} f (\bar {x}) \right\| + \left\| R _ {a ^ {\prime}} \right\| \left\| \left(f (a (x)) - R _ {a} f (x)\right) \right\| \\ \leq (1 + \sqrt {2}) \| \bar {A} ^ {\ddagger} \| \epsilon^ {2} + (1 + \sqrt {2}) \| A ^ {\ddagger} \| \epsilon^ {2} \\ \end{array}
504
+ $$
505
+
506
+ Hence,
507
+
508
+ $$
509
+ \left\| R _ {a ^ {\prime} \circ a} f (x) - R _ {a ^ {\prime}} R _ {a} f (x) \right\| \leq (1 + \sqrt {2}) \left\| \bar {A} ^ {\ddagger} \right\| \epsilon^ {2} + (2 + 2 \sqrt {2}) \left\| A ^ {\ddagger} \right\| \epsilon^ {2}
510
+ $$
511
+
512
+ where $A = [f(x_{1}),\ldots ,f(x_{n})]^{\top}$ and $\bar{A} = [f(a(x_1)),\dots ,f(a(x_n))]^\top$
513
+
514
+ By our assumption, we can choose a basis $f(x_{i_1}), f(x_{i_2}), \ldots f(x_{i_d})$ of $\mathbb{R}^d$ , where $i_1, i_2, \ldots i_n \in [n]$ . We can then write any unit norm $x$ in terms of this basis:
515
+
516
+ $$
517
+ x = \sum_ {j = 1} ^ {d} c _ {j} f \left(x _ {i _ {j}}\right).
518
+ $$
519
+
520
+ Letting $B = [f(x_{i_1}),\ldots ,f(x_{i_d})]^{\top}$ , we have $B^{-1}x = c$ . Thus, we can bound the 1-norm of $c$ as
521
+
522
+ $$
523
+ \left\| c \right\| _ {1} \leq \sqrt {d} \left\| c \right\| _ {2} \leq \sqrt {d} \left\| B ^ {- 1} \right\|. \tag {14}
524
+ $$
525
+
526
+ Then using the triangle inequality, we have
527
+
528
+ $$
529
+ \begin{array}{l} \left\| R _ {a ^ {\prime} \circ a} x - R _ {a ^ {\prime}} R _ {a} x \right\| = \left\| \sum_ {j = 1} ^ {n} c _ {j} \left(R _ {a ^ {\prime} \circ a} f \left(x _ {i _ {j}}\right) - R _ {a ^ {\prime}} R _ {a} f \left(x _ {i _ {j}}\right)\right) \right\| \\ \leq \sum_ {j = 1} ^ {n} \left| c _ {j} \right| \left\| R _ {a ^ {\prime} \circ a} f \left(x _ {i _ {j}}\right) - R _ {a ^ {\prime}} R _ {a} f \left(x _ {i _ {j}}\right) \right\| \\ \leq \left\| c \right\| _ {1} (1 + \sqrt {2}) \left\| A ^ {\ddagger} \right\| \epsilon^ {2} \\ \leq \sqrt {d} (1 + \sqrt {2}) \| A ^ {\ddagger} \| \| B ^ {- 1} \| \epsilon^ {2}. \\ \end{array}
530
+ $$
531
+
532
+ Taking the supremum over all unit norm $x$ finishes the proof.
533
+
534
+ # C BACKGROUND ON INVARIANCE THEORY FOR THE ORTHOGONAL GROUP
535
+
536
+ This section recalls some classical theory on orthogonal groups and an extension that we use for proving results over continuous data distributions.
537
+
538
+ A function $f: (\mathbb{R}^d)^n \to \mathbb{R}$ is said to be $O(d)$ -invariant if $f(Rv_1, \ldots, Rv_n) = f(v_1, \ldots, v_n)$ for all $R \in O(d)$ . Throughout this section, we are especially interested in determining easily computed statistics that characterize an $O(d)$ invariant function $f$ . In other words, we would like to write $f$ as a function of these statistics. The following theorem was first proved by Hermann Weyl using Capelli's identity (Weyl, 1946) and shows that the inner products $v_i^\top v_j$ suffice.
539
+
540
+ Theorem 4 (First fundamental theorem of invariant theory for the orthogonal group). Suppose that $f: (\mathbb{R}^d)^n \to \mathbb{R}$ is $O(d)$ -invariant. Then there exists a function $g: \mathbb{R}^{n \times n} \to \mathbb{R}$ for which
541
+
542
+ $$
543
+ f (v _ {1}, \dots , v _ {n}) = g \big ([ v _ {i} ^ {\top} v _ {j} ] _ {i, j = 1} ^ {n} \big).
544
+ $$
545
+
546
+ In other words, to compute $f$ at a given input, it is not necessary to know all of $v_{1},\ldots ,v_{n}$ . Computing the value of $f$ at a point can be done using only the inner products $v_{i}^{\top}v_{j}$ , which are invariant to $O(d)$ . Letting $V$ be the $n\times d$ matrix whose $i$ th row is $v_{i}^{\top}$ , we may also write $f(v_{1},\dots,n_{n}) = g(VV^{\top})$ . The map $V\mapsto VV^{\top}$ is known as the orthogonal projection of $V$ .
547
+
548
+ A corollary of this result has recently been used to develop $O(d)$ equivariant architectures in machine learning (Villar et al., 2021).
549
+
550
+ Corollary 3. Suppose that $A, B$ are $n \times d$ matrices and $AA^{\top} = BB^{\top}$ . Then $A = BR$ for some $R \in O(d)$ .
551
+
552
+ Villar et al. (2021) use this characterization of orthogonally equivariant functions to parameterize function classes of neural networks that have the same equivariance. This result is also useful in our context; However, we put it to use for a very different purpose: studying $\mathcal{L}_{\mathrm{equi}}$ .
553
+
554
+ Intuitively this result says the following: given two point clouds $A, B$ of unit length vectors with some fixed correspondence (bijection) between each point in $A$ and a point in $B$ , if the angles between the $i$ th and $j$ th points in cloud $A$ always equal the angle between the $i$ th and $j$ th point in cloud $B$ , then $A$ and $B$ are the same up to an orthogonal transformation.
555
+
556
+ This is the main tool we use to prove the finite sample version of the main result for our equivariant loss (Proposition 2). However, to analyze the population sample loss $\mathcal{L}_{\mathrm{equi}}$ (Proposition 1), we require an extended version of this result to the continuous limit as $n\to \infty$ . To this end, we develop a simple but novel extension to Theorem 4 to the case of continuous data distributions. This result may be useful in other contexts independent of our setting.
557
+
558
+ Proposition 5. Let $\mathcal{X}$ be any set and $f, h: \mathcal{X} \to \mathbb{R}^d$ be functions on $\mathcal{X}$ . If $f(x)^\top f(y) = h(x)^\top h(y)$ for all $x, y \in \mathcal{X}$ , then there exists $R \in O(d)$ such that $Rf(x) = h(x)$ for all $x \in \mathcal{X}$ .
559
+
560
+ The proof of this result directly builds on the finite sample version. The key idea of the proof is that since the embedding space $\mathbb{R}^d$ is finite-dimensional we may select a set of points $\{f(x_i)\}_i$ whose span has maximal rank in the linear space spanned by the outputs of $f$ . This means that any arbitrary point $f(x)$ can be written as a linear combination of the $f(x_i)$ . This observation allows us to apply the finite sample result on each $f(x_i)$ term in the sum to conclude that $f(x)$ is also a rotation of a sum of $h(x_i)$ terms. Next, we give the formal proof.
561
+
562
+ Proof of Proposition 5. Choose $x_1, \ldots, x_n \in \mathcal{X}$ such that $F = [f(x_1) | \ldots | f(x_n)]^\top \in \mathbb{R}^{n \times d}$ and $h = [h(x_1) | \ldots | h(x_n)]^\top \in \mathbb{R}^{n \times d}$ have maximal rank. Note we use " $|$ " to denote the column-wise concatenation of vectors. Note that such $x_i$ can always be chosen. Since we have $FF^\top = HH^\top$ , we know by Corollary 3 that $F = HR$ for some $R \in O(d)$ .
563
+
564
+ Now consider an arbitrary $x \in \mathcal{X}$ and define $\tilde{F} = [F \mid f(x)]^\top$ and $\tilde{H} = [H \mid h(x)]^\top$ , both of which belong to $\mathbb{R}^{(n + 1)\times d}$ . Note that again we have $\tilde{F}\tilde{F}^\top = \tilde{H}\tilde{H}^\top$ so also know that $\tilde{F} = \tilde{H}\tilde{R}$ for some $\tilde{R} \in O(d)$ . Since $x_i$ were chosen so that $F$ and $H$ are of maximal rank, we know that $h(x) = \sum_{i=1}^{n} c_i h(x_i)$ for some coefficients $c_i \in \mathbb{R}$ , since if this were not the case then we would have $\mathrm{rank}(\tilde{H}) = \mathrm{rank}(H) + 1$ .
565
+
566
+ From this, we know that
567
+
568
+ $$
569
+ \begin{array}{l} R ^ {\top} h (x) = \sum_ {i = 1} ^ {n} c _ {i} R ^ {\top} h (x _ {i}) \\ = \sum_ {i = 1} ^ {n} c _ {i} f (x _ {i}) \\ = \sum_ {i = 1} ^ {n} c _ {i} \tilde {R} ^ {\top} h (x _ {i}) \\ = \tilde {R} ^ {\top} \sum_ {i = 1} ^ {n} c _ {i} h \left(x _ {i}\right) \\ = \tilde {R} ^ {\top} h (x) \\ = f (x). \\ \end{array}
570
+ $$
571
+
572
+ So we have that $Rf(x) = R R^{\top}h(x) = h(x)$ for all $x\in \mathcal{X}$
573
+
574
+ ![](images/442b0ad22271351783bf58fd3494a2e557977606d8edbd62db5d2a5c302d7402.jpg)
575
+
576
+ # C.1 APPROXIMATE EQUIVARIANCE RESULTS
577
+
578
+ Here, we consider the setting when our equivariance loss is not exactly minimized. This corresponds to when the pairwise dot products between representations do not exactly match. We use a generalization of Corollary 3 to this case (Arias-Castro et al., 2020) Instead of the dot products $AA^{\top}$ and $BB^{\top}$ exactly matching, they match only up to some error. As a result, we can guarantee $A$ is close to $BR$ for some orthogonal matrix $R \in O(d)$ up to some error.
579
+
580
+ Proposition 6. (Arias-Castro et al., 2020) Let $A, B \in \mathbb{R}^{n \times d}$ with $n \geq d$ , where $A$ is full rank. Suppose $\| AA^{\top} - BB^{\top}\|_{F} \leq \epsilon^{2}$ and $\| A^{\dagger}\| \epsilon \leq \frac{1}{\sqrt{2}}$ . Then there exists an orthogonal $R \in O(d)$ such that
581
+
582
+ $$
583
+ \left\| A - B R \right\| _ {F} \leq (1 + \sqrt {2}) \left\| A ^ {\ddagger} \right\| \epsilon^ {2}, \tag {15}
584
+ $$
585
+
586
+ where $A^{\ddagger}$ is the pseudoinverse of $A$ , $\| \cdot \|_{F}$ is the Frobenius norm, and $\| \cdot \|$ is the maximum singular value norm.
587
+
588
+ In other words, for a fixed and full rank matrix $A$ , we have that $\min_{R \in O(d)} \| A - BR \|_F = o(\epsilon)$ where $o(\epsilon) \to 0$ as the error $\epsilon \to 0$ .
589
+
590
+ # D EXTENSIONS TO OTHER GROUPS: FURTHER DISCUSSION
591
+
592
+ In Section 3.2, we explore the possibility of formulating an equivariant loss $\mathcal{L}_{\mathrm{equi}}$ for pairs of points that fully captures equivariance by requiring the group to be the stabilizer of a bilinear form. In this context, the invariants are generated by polynomials of degree two in two variables, and the equivariant functions can be obtained by computing gradients of these invariants (Blum-Smith & Villar, 2022). Section 3.2 notes that this holds true not only for the orthogonal group, which is the primary focus of our research but also for the Lorentz group and the symplectic group, suggesting natural extensions of our approach.
593
+
594
+ It is worth noting that the group of rotations $SO(d)$ does not fall into this framework. It can be defined as the set of transformations that preserve both inner products (a 2-form) and determinants (a $d$ -form). Consequently, some of its generators have degree 2 while others have degree $d$ (see (Weyl, 1946), Section II.A.9).
595
+
596
+ Weyl's theorem states that if a group acts on $n$ copies of a vector space (in our case, $(\mathbb{R}^d)^n$ for consistency with the rest of the paper), its action can be characterized by examining how it acts on $k$ copies (i.e., $(\mathbb{R}^d)^k$ ) when the maximum degree of its irreducible components is $k$ (refer to Section 6 of (Schmid, 2006) for a precise statement of the theorem). Since our interest lies in understanding equivariance in terms of pairs of objects, we desire invariants that act on pairs of
597
+
598
+ points. One way to guarantee this is to restrict ourselves to groups that act through representations where the irreducible components have degrees of at most two (though this is not necessary in all cases, such as the orthogonal group $O(d)$ that we consider in the main paper). An example of such groups is the product of finite subgroups of the unitary group $U(2)$ , which holds relevance in particle physics. According to Weyl's theorem, the corresponding invariants can be expressed as polarizations of degree-2 polynomials on two variables. Polarizations represent an algebraic construction that enables the expression of homogeneous polynomials in multiple variables by introducing additional variables to polynomials with fewer variables. In our case, the base polynomials consist of degree-2 polynomials in two variables, while the polarizations incorporate additional variables. Notably, an interesting open problem lies in leveraging this formulation for contrastive learning.
599
+
600
+ # E IMPLEMENTATION DETAILS
601
+
602
+ Algorithm 1 presents pytorch-based pseudocode for implementing CARE. This implementation introduces the idea of using a smaller batch size for the equivariance loss compared to the InfoNCE loss. Specifically, by definition, the equivariance loss is defined as a double expectation, one over data pairs and the other over augmentations. Empirical observations reveal that sampling one augmentation per batch leads to unstable yet superior performance when compared to standard invariant-based baselines such as SimCLR. Since these invariant-based contrastive benchmarks generally perform well with large batch sizes, we adopt the approach of splitting a batch into multiple chunks to efficiently sample multiple augmentations per batch for the equivariance loss. Each chunk of the batch is associated with a new pair of augmentations, ensuring a large batch size for the InfoNCE loss and a smaller batch size for the equivariance loss.
603
+
604
+ Algorithm 1 PyTorch based pseudocode for CARE
605
+ 1: Notations: $f$ represents the backbone encoder network, $\lambda$ is the weight on CARE loss, apply_same_aug function applies the same augmentation to all samples in the input batch
606
+ 2: for minibatch $x$ in dataloader do
607
+ 3: draw two batches of augmentation functions $a_1, a_2 \in \mathcal{A}$
608
+ 4: /\*Functions $a_1, a_2$ apply different augmentation to each sample in batch $x^{*}/$
609
+ 5: $z_1^{\mathrm{inv}}, z_2^{\mathrm{inv}} = f(a_1(x)), f(a_2(x))$
610
+ 6: divide $x$ into n_split chunks to form $x_{\mathrm{chunks}}$
611
+ 7: /\*Module for calculating orthogonal equivariance loss*/
612
+ 8: for $c_i$ in $x_{\mathrm{chunks}}$ in parallel do
613
+ 9: draw two augmentation functions $\tilde{a}_1, \tilde{a}_2 \in \mathcal{A}$
614
+ 10: /\*Functions $\tilde{a}_1, \tilde{a}_2$ apply same augmentation to each sample in batch $c_i^{*}/$
615
+ 11: $\tilde{z}_{i1}, \tilde{z}_{i2} = f(\text{apply\_same\_aug}(c_i, \tilde{a}_1), f(\text{apply\_same\_aug}(c_i, \tilde{a}_2))$
616
+ 12: /\*Concatenate embedding vectors corresponding to all chunks*/
617
+ 13: merge $\tilde{z}_{i1}, \tilde{z}_{i2}$ into $z_1^{\mathrm{equiv}}, z_2^{\mathrm{equiv}}$ respectively
618
+ 14: /\*Loss computation */
619
+ 15: $\mathcal{L}_{\mathrm{InfoNCE}}(f) = \text{infonce\_loss}(z_1^{\mathrm{inv}}, z_2^{\mathrm{inv}})$
620
+ 16: $\mathcal{L}_{\mathrm{equiv}}(f) = \text{orthogonal\_equivariance\_loss}(z_1^{\mathrm{equiv}}, z_2^{\mathrm{equiv}}, n\_split)$
621
+ 17: $\mathcal{L}_{\mathrm{CARE}}(f) = \mathcal{L}_{\mathrm{InfoNCE}}(f) + \lambda \cdot \mathcal{L}_{\mathrm{equiv}}(f)$
622
+ 18: /\*Optimization step */
623
+ 19: $\mathcal{L}_{\mathrm{CARE}}(f). \text{backward()}$
624
+ 20: optimizer.step()
625
+
626
+ # F SUPPLEMENTARY EXPERIMENTAL DETAILS AND ASSETS DISCLOSURE
627
+
628
+ # F.1 ASSETS
629
+
630
+ We do not introduce new data in the course of this work. Instead, we use publicly available widely used image datasets for the purposes of benchmarking and comparison.
631
+
632
+ # F.2 HARDWARE AND SETUP
633
+
634
+ All experiments were performed on an HPC computing cluster using 4 NVIDIA Tesla V100 GPUs with 32GB accelerator RAM for a single training run. The CPUs used were Intel Xeon Gold 6248
635
+
636
+ processors with 40 cores and 384GB RAM. All experiments use the PyTorch deep learning framework (Paszke et al., 2019).
637
+
638
+ # F.3 EXPERIMENTAL PROTOCOLS
639
+
640
+ We first outline the training protocol adopted for training our proposed approach on a variety of datasets, namely CIFAR10, CIFAR100, STL10, and ImageNet100.
641
+
642
+ CIFAR10, CIFAR100 and STL10 All encoders have ResNet-50 backbones and are trained for 400 epochs with temperature $\tau = 0.5$ for SimCLR and $\tau = 0.1$ for MoCo-v2*. The encoded features have a dimension of 2048 and are further processed by a two-layer MLP projection head, producing an output dimension of 128. A batch size of 256 was used for all datasets. For CIFAR10 and CIFAR100, we employed the Adam optimizer with a learning rate of $1e^{-3}$ and weight decay of $1e^{-6}$ . For STL10, we employed the SGD optimizer with a learning rate of 0.06, utilizing cosine annealing and a weight decay of $5e^{-4}$ , with 10 warmup steps. We use the same set of augmentations as in SimCLR (Chen et al., 2020). To train the encoder using $\mathcal{L}_{\mathrm{CARE - SimCLR}}$ , we use the same hyper-parameters for InfoNCE loss. Additionally, we use 4, 8 and 16 batch splits for CIFAR100, STL10 and CIFAR10, respectively. This allows us to sample multiple augmentations per batch, effectively reducing the batch size of equivariance loss whilst retaining the same for InfoNCE loss. Furthermore, for the equivariant term, we find it optimal to use a weight of $\lambda = 0.01, 0.001$ , and 0.01 for CIFAR10, CIFAR100, and STL10, respectively.
643
+
644
+ ImageNet100 We use ResNet-50 as the encoder architecture and pretrain the model for 200 epochs. A base learning rate of 0.8 is used in combination with cosine annealing scheduling and a batch size of 512. For MoCo-v2, we use 0.99 as the momentum and $\tau = 0.2$ as the temperature. All remaining hyperparameters were maintained at their respective official defaults as in the official MoCo-v2 code. While training with $\mathcal{L}_{\mathrm{CARE - SimCLR}}$ and $\mathcal{L}_{\mathrm{CARE - MoCo}}$ , we find it optimal to use splits of 4 and 8 and weight of $\lambda = 0.005$ and 0.01 respectively on the equivariant term.
645
+
646
+ Linear evaluation We train a linear classifier on frozen features for 100 epochs with a batch size of 512 for CIFAR10, CIFAR100, and STL10 datasets. To optimize the classifier, we employ the Adam optimizer with a learning rate of $1e^{-3}$ and a weight decay of $1e^{-6}$ . In the case of ImageNet100, we train the linear classifier for 60 epochs using a batch size of 128. We initialize the learning rate to 30.0 and apply a step scheduler with an annealing rate of 0.1 at epochs 30, 40, and 50. The remaining hyper-parameters are retained from the official code.
647
+
648
+ # G ADDITIONAL EXPERIMENTS
649
+
650
+ # G.1 ABLATING LOSS TERMS
651
+
652
+ # G.2 HISTOGRAM FOR LOSS ABLATION.
653
+
654
+ To accompany Figure 10, this section plots the cosine similarity between positive pairs. We provide two plots for each experiment: the first plots the histogram of similarities of positive pairs drawn from the test set; the second plots the average positive cosine similarity throughout training. The results are reported in Figures 11, 12, 13, 14, 15, 16.
655
+
656
+ # G.3 ADDITIONAL PROTEIN TRAJECTORIES
657
+
658
+ In the protein cloud experiment in Section 5.1, we use the Protein Data Bank (PDB)—the single global repository of experimentally determined 3D structures of biological macromolecules and their complexes, containing approximately 130,000 samples. The core objective is to assess whether our method can effectively encode the SO(3) manifold, a highly challenging and critical aspect in drug discovery. Each input point cloud is transformed through action of the SO(3) group. Consequently, the desirect 2D trajectory is a circle corresponding to rotation along each of three orthogonal axes. This is consistent with the structure of the SO(3) manifold. Figures 17, 18, 19 and 20 illustrate
659
+
660
+ ![](images/2c84a14c90b93520afb9f1ba7319e1d0783402f60d7489d4a0842bb863ef476f.jpg)
661
+ Figure 10: Ablating different loss terms. Combining $\mathcal{L}_{\mathrm{equi}}$ with a uniformity promoting non-collapse term suffices to learn non-trivial features. However, optimal performance is achieved when encouraging smaller rotations, as in CARE. ResNet-50 models pretrained on CIFAR10 and evaluated with linear probes.
662
+
663
+ ![](images/026fe650d4685bebb1fb1c0d9bad5b753697e9f8ca77f59f8764ed8f4fa80f93.jpg)
664
+ Figure 11: (left) Histogram of positive cosine similarity values at the end of pre-training using the invariance loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the invariance loss
665
+
666
+ ![](images/1e3fcd553d0d02db8841e70e22775011655c0d20a4e54d65af40f2c203c0919e.jpg)
667
+
668
+ additional trajectories observed through the embedding space of a DeepSet trained with the CARE, SimCLR, $\mathcal{L}_{\mathrm{unif}}$ and $\mathcal{L}_{\mathrm{inv}}$ loss respectively.
669
+
670
+ # G.4 ADDITIONAL QUALITATIVE ASSESSMENT OF EQUIVARIANCE
671
+
672
+ Figure 21 qualitatively assesses sensitivity of the representation to changes in color in the Flowers-102 dataset. We compare CARE to a popular equivariant baseline, EquiMOD (Devillers & Lefort, 2023). As anticipated, both CARE and EquiMOD demonstrate sensitivity to changes in query color and hence are equivariant to color. However, as depicted in Figure 21, EquiMOD's representation exhibits
673
+
674
+ ![](images/780055f6b3cc95d7b0edd1a050d5140d1caea019d74cb845e4e98879efd5f3d8.jpg)
675
+ Figure 12: (left) Histogram of positive cosine similarity values at the end of pre-training using the orthogonal equivariance loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the orthogonal equivariance loss
676
+
677
+ ![](images/5e466620d09b31b5185a1f4fa268ab15277364f031ecaf740a79df3714dcf807.jpg)
678
+
679
+ ![](images/0659e1f44a137b926de5b5059825941efa944eaf6410f91f85bfd172b419aa2e.jpg)
680
+ Figure 13: (left) Histogram of positive cosine similarity values at the end of pre-training using the uniformity loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the uniformity loss
681
+
682
+ ![](images/81b62da8cb77caa269acae47158cc3d880ea726d2bb584051660c1852e0a2608.jpg)
683
+
684
+ ![](images/77edfc4befb8294e9b34c1cb784e78d31aca81cc20f3ac60dd7f1e5908cce043.jpg)
685
+ Figure 14: (left) Histogram of positive cosine similarity values at the end of pre-training using the Uniformity + Equivariance loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the Uniformity + Equivariance loss
686
+
687
+ ![](images/10d4ccf24beba5b074f399140ca5a91644c8e2ae908804f00727f68a018db61d.jpg)
688
+
689
+ ![](images/cf1e09eff14003acfce450fd75c5081d309b8f4f116d302b242769eae4a6c5f1.jpg)
690
+ Figure 15: (left) Histogram of positive cosine similarity values at the end of pre-training using the InfoNCE (invariance + uniformity) loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the InfoNCE loss
691
+
692
+ ![](images/99f7d1de2fdfa2bf8a26a537e7a96c7eb9467afd2166c4b182746cbf669918a8.jpg)
693
+
694
+ ![](images/5276cb50093bc89aca3dce63a472b148fffc0b729447f0db128817185990370c.jpg)
695
+ Figure 16: (left) Histogram of positive cosine similarity values at the end of pre-training using the CARE (InfoNCE + orthogonal equivariance) loss; (right) Evolution of positive cosine similarity values over pre-training epochs using the CARE loss
696
+
697
+ ![](images/1bb3c93026b5ee1648d209a01a9a486d2e3c490f6c5d47f4028ba2197cbe8549.jpg)
698
+
699
+ ![](images/aa11ff6e3e0ecff4b9f18ea92bf2d1a792ca886586437e63a1dbbeb70d75449c.jpg)
700
+ Figure 17: Additional trajectories through the embedding space of a DeepSet trained with CARE.
701
+
702
+ ![](images/a82c3827deb157cbbb139fab29ac0ceaca06151811c77ac420fc868b800a78f8.jpg)
703
+ Figure 18: Additional trajectories through the embedding space of a DeepSet trained with SimCLR.
704
+
705
+ ![](images/e093976db952e2c11b99712542e8f309693d6d0b2fc6ce75369e355fe880b290.jpg)
706
+ Figure 19: Additional trajectories through the embedding space of a DeepSet trained with the uniformity loss $\mathcal{L}_{\mathrm{unif}}$ .
707
+
708
+ nearest neighbors with significantly different shades (e.g., red and orange) compared to those learned by CARE, which are closer in color to the query images.
709
+
710
+ ![](images/2f181db6783c5e4a9d4b5b4fa76f5b2c2cbbc2209216edff29881542ebbf127b.jpg)
711
+ Figure 20: Additional trajectories through the embedding space of a DeepSet trained with the invariance loss $\mathcal{L}_{\mathrm{inv}}$ .
712
+
713
+ ![](images/1e49d019b3e87dba8324a49923282841221dcf51ee4abcbee48d0809ecccb9f1.jpg)
714
+ Input
715
+
716
+ ![](images/9aa96a41686c674a713c48c743b6a744b44d93aa7fbfad3f9819b47e767c89dd.jpg)
717
+
718
+ ![](images/7c154442e9c0f6903c18fae178efc64fcc5356a1fca2226d871001c62b5745c7.jpg)
719
+
720
+ ![](images/135032162d235a0c2d15437e941d061759bf8017a4280bacb77b7ad2267bef2b.jpg)
721
+
722
+ ![](images/bc676b0c86b2171357315583e2425c7d3b1d6d22aa3f4ad1587c2884ff394055.jpg)
723
+
724
+ ![](images/7106842a3894928711e663a013ee309475e32e69e12ade9271b55db741a64286.jpg)
725
+ Figure 21: CARE exhibits sensitivity to features as with other equivariance-based contrastive methods (e.g., EquiMOD). For each query input, we retrieve top 5 nearest neighbors in the embedding space.
726
+
727
+ ![](images/ec057dfded963cd3d6b6f13b1e728b59f8c9b856efd21007941e49fdb32c6ee5.jpg)
728
+ Query
729
+
730
+ ![](images/2846ee4c90a95569486f0beec294c6b7d92a31b4e2f9b8b240fb3e2423d309a3.jpg)
731
+
732
+ ![](images/2cfb0a0ffdd51afa96bc74ac2b2ca00791a7b25957043353c4cc3cdde0db27d2.jpg)
733
+
734
+ ![](images/ae00740f494dc3918796ea05d384e14b65c0fe156648f84a9b7af416184a8e73.jpg)
735
+
736
+ ![](images/0cead0f12bbcf8bdf42f6106c950e968e78b46e84b54643280062a2e7329b0fd.jpg)
737
+
738
+ ![](images/8c94696feaa0e0a2309fc49c4c41a18d3f8730fa256054c5d3c567050d3ee1d8.jpg)
739
+
740
+ ![](images/c237000bb2b2da228947989cf0d56fefa3f9c33a59ad5f102195e419faaf5e5a.jpg)
741
+
742
+ ![](images/cdf87899c28626cdb2834d8e19b679b9be13fd659a614f822a634b2358c69607.jpg)
743
+
744
+ ![](images/78b94357c727630bcd00de233c69227e42ea7bb0db82d852401bef6daf16406e.jpg)
745
+
746
+ ![](images/cc549510efd09bf38a6b9b6d3ba6378659449e905c778118dc622210d3b185bf.jpg)
747
+
748
+ ![](images/71460b863c5f25ac134c53dcdf41611fd2b11063562d7f5462d030b709d4210f.jpg)
749
+
750
+ ![](images/1c49a27a7d930c498d8651c67faa8c62dcc960ed4be0296fd769b08f67146846.jpg)
751
+
752
+ ![](images/ffe3381e2cd266ce5d058def26fa5270330c1582d56c648685f7a037353c3d49.jpg)
753
+ CARE (ours)
754
+
755
+ ![](images/8711b98a273b4aa37e3d0d8bffa2a235d45dcef4b8712f54f85639cd83059e70.jpg)
756
+
757
+ ![](images/b179bd7be3fe13ca78dd8bc08851faa37cb835d9d39eb86f3b71c09bdec11fb6.jpg)
758
+
759
+ ![](images/3ffd35980db23a3aae5b603522c11225b54c5c34668dbc68bbb10e75bd3565de.jpg)
760
+
761
+ ![](images/0ffc8a4511f45728b31645ae0c93e29ceac3363f09da0ef1f1568e66ef37185f.jpg)
762
+
763
+ ![](images/6347a68547932abf6170cf836d9e006950a6dc0c7e4963cdce4d981aa25d8d11.jpg)
764
+
765
+ ![](images/44508ef992198808a8b0b49d1945cce7d91193476119a4b9444a562a785f38c6.jpg)
766
+
767
+ ![](images/2bef63d7aa756bb34beb0f353a9cabe5fd404edac46bab0b433d167edbecd44b.jpg)
768
+
769
+ ![](images/6e520526a996bcdbcd1823c733715de475f370fc684fd7b3e44a69274e2ef8ac.jpg)
770
+
771
+ ![](images/cc071e653f6ef203dc6c9e868ad37a1a1c63687b4f979e76eeff543984dac7e9.jpg)
772
+
773
+ ![](images/5dc3e9f7264f79a03d9753b2e7706958d9c76bea789e4210fa3ad83185ac4abb.jpg)
774
+
775
+ ![](images/aab7937b94c1c5d73429f6c9dd09852e59c08b556152255f8f696373c5755891.jpg)
776
+
777
+ ![](images/de050387b2a36b0c7c80e914176df0223a16c1b592b3acf09e02afa2b45f5bf6.jpg)
778
+ EquiMOD (equivariant)
779
+
780
+ ![](images/376360e12e5c512bc6cd623e80c28267798984cf8db74642cae121368b4bb141.jpg)
781
+
782
+ ![](images/9ebecf99ca465af73f7b4e1e3683e02a7182b0412c0d93ee44a43f9c903470a3.jpg)
783
+
784
+ ![](images/1d4d5932f8c2e679ceb8585e9ee3181d8721ffdc30c53535b1e184c8ae3818fc.jpg)
785
+
786
+ ![](images/4558a4345a054cbdc10f51362d3e19dded5afaacfe7faa73cf39cac3c0c24c24.jpg)
787
+
788
+ ![](images/33fa7b87726d64ce82a564bc4ad0d9cfb08d8cd98941fe70be73f81bcc0c6e80.jpg)
789
+
790
+ ![](images/25ea01cad9ab58bfff335796fb28e8ec1448fb26f9b686858f11d7e11634a6c4.jpg)
791
+
792
+ ![](images/f237e4b1da2ccc1ed1f4cc7f2ffb48625f03533fe9709318dcd898352a5ec022.jpg)
793
+
794
+ ![](images/08122ba5d1dce3a3cd86965a6b31a148c35630a53a95541e4a61acfefc6ededd.jpg)
795
+
796
+ ![](images/fae367369adf4969630f273d1583fcab0ef5e9174f1e1f15152fe8be90ffd1d1.jpg)
797
+
798
+ ![](images/d398284cedbdc1f1afa526e125c29726e00bb133abc4fa2095b6dbc7c887ef47.jpg)
799
+
800
+ ![](images/d405074f96b85dc35eeddcba487dfc35d6141f970f9e3ae11fe504e8312502e6.jpg)
801
+
802
+ ![](images/6ab033d1452fafcb850e24af4ffde0f28fb7931e5e8a07d8b8090d006b4f9207.jpg)
803
+
804
+ ![](images/0587d23930897f84e79d86afe808ce56a11ffafe641eb64c1f88e4cd276a50af.jpg)
805
+
806
+ ![](images/9fe5d9617f1fe74768892788560cac2689e99ea37664066701e0b7a646843317.jpg)
807
+
808
+ ![](images/e2f31ee2966e858622d91acdbcdb51361d457545a82ae71c56e5cd981fd4a14d.jpg)
809
+
810
+ ![](images/dcddd9ad92801807f81f05afe4b83b83ca38dbe298772d2d4c51fcb6cd9461eb.jpg)
811
+
812
+ ![](images/4cfc5aab83f1645403e5d600da7fb5b6f0c3a3282550070588ceb6e99169a4ff.jpg)
813
+
814
+ ![](images/242c5b93f52e5e8f19dcb399aac052c1386d4dbc0667324de1028f9fc177d2d1.jpg)
815
+
816
+ ![](images/de3b33179bbd44e3a0e07f7862ac262278f60608194006839c7cf260b0f3eb68.jpg)
817
+
818
+ ![](images/1f5d80dbe00cf2a31595b3e1264a0d944ed8a3e0422c047bbbeb9da3cf0f6d09.jpg)
819
+
820
+ ![](images/cbc87e8cd1ca693dde3c000b4eda888bd8c2bf6f3f83c71068874e24de31ccc7.jpg)
821
+
822
+ ![](images/600fafe53020f946fe69a1b796dc8e72e01f53367590f511dde1248522cb0874.jpg)
823
+
824
+ ![](images/9f803a160176361da508e9a8ad03e5218f62288c5fe4a849447a4443993d79d7.jpg)
825
+
826
+ # H ADDITIONAL DISCUSSION
827
+
828
+ Limitations. While our method, CARE, learns embedding spaces with many advantages over prior contrastive learning embedding spaces, there are certain limitations that we acknowledge here. First, we do not provide a means to directly identify the rotation corresponding to a specific transformation. Instead, our approach allows the recovery of the rotation by solving Wahba's problem. However, this requires solving an instance of Wahba's for each augmentation of interest. Future improvements that develop techniques for quickly and easily (i.e., without needing to solve an optimization problem) identifying specific rotations would be a valuable improvement, enhancing the steerability of our models. Second, it is worth noting that equivariant contrastive methods, including CARE, only achieve approximate equivariance. This is a fundamental challenge shared by all such methods, as it is unclear how to precisely encode exact equivariance. The question remains open as to a) whether this approximate equivariance should be considered damaging in the first place, and if so, b) whether scaling techniques can sufficiently produce reliable approximate equivariance to enable the diverse applications that equivariance promises. Addressing this challenge is a crucial area for future research and exploration in the field. Each of these limitations points to valuable directions for future work.
829
+
830
+ Broader impact. Through our self-supervised learning method CARE we explore foundational questions regarding the structure and nature of neural network representation spaces. Currently, our approaches are exploratory and not ready for integration into deployed systems. However, this line of work studies self-supervised learning and therefore has the potential to scale and eventually contribute to systems that do interact with humans. In such cases, it is crucial to consider the usual
831
+
832
+ safety and alignment considerations. However, beyond this, CARE, offers insights into algorithmic approaches for controlling and moderating model behavior. Specifically, CARE identifies a simple rotation of embedding space that corresponds to a change in the attribute of the data. In principle, this transformation could be used to "canonicalize" data, preventing the model from relying on certain attributes in decision-making. Additionally, controlled transformations of embeddings could be used to debias model responses and achieve desired variations in output. It is important to note that while our focus is on the core methodology, we do not explore these possibilities in this particular work.
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b86cb334fbc45c688cf70d7b1ba326d58a5b1ec73e3f3e75f6033f9b121242ef
3
+ size 1045388
2024/Structuring Representation Geometry with Rotationally Equivariant Contrastive Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/3364d27c-6293-4339-89fb-517362683f0e_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c6be9cc8a6bb4fe04536b72da5137217cd76072161699a589074996280313ff
3
+ size 14292134
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/full.md ADDED
@@ -0,0 +1,547 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STYLIZED OFFLINE REINFORCEMENT LEARNING: EXTRACTING DIVERSE HIGH-QUALITY BEHAVIORS FROM HETEROGENEOUS DATASETS
2
+
3
+ Yihuan Mao $^{1}$ , Chengjie Wu $^{1}$ , Xi Chen $^{1}$ , Hao Hu $^{1}$ , Ji Jiang $^{2}$ , Tianze Zhou $^{2}$ , Tangjie Lv $^{2}$ , Changjie Fan $^{2}$ , Zhipeng Hu $^{2}$ , Yi Wu $^{1}$ , Yujing Hu $^{2*}$ , Chongjie Zhang $^{3*}$
4
+
5
+ $^{1}$ Institute for Interdisciplinary Information Sciences, Tsinghua University, China
6
+ $^{2}$ Fuxi AI Lab, NetEase, China, $^{3}$ Washington University in St. Louis
7
+ {maoyh20, wucj19, huh22}@mails.tsinghua.edu.cn
8
+ {pcchenxi, jxwuyi}@tsinghua.edu.cn, chongjie@wustl.edu
9
+ {jiangji, zhoutianze, hzlvtangjie, fanchangjie, zphu, huyujing}@corp.netease.com
10
+
11
+ # ABSTRACT
12
+
13
+ Previous literature on policy diversity in reinforcement learning (RL) either focuses on the online setting or ignores the policy performance. In contrast, offline RL, which aims to learn high-quality policies from batched data, has yet to fully leverage the intrinsic diversity of the offline dataset. Addressing this dichotomy and aiming to balance quality and diversity poses a significant challenge to extant methodologies. This paper introduces a novel approach, termed Stylized Offline RL (SORL), which is designed to extract high-performing, stylistically diverse policies from a dataset characterized by distinct behavioral patterns. Drawing inspiration from the venerable Expectation-Maximization (EM) algorithm, SORL innovatively alternates between policy learning and trajectory clustering, a mechanism that promotes policy diversification. To further augment policy performance, we introduce advantage-weighted style learning into the SORL framework. Experimental evaluations across multiple environments demonstrate the significant superiority of SORL over previous methods in extracting high-quality policies with diverse behaviors. A case in point is that SORL successfully learns strong policies with markedly distinct playing patterns from a real-world human dataset of a popular basketball video game "Dunk City Dynasty."
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Learning to accomplish a task with diverse behaviors, also known as quality-diversity optimization, is an emerging area within stochastic optimization research (Pugh et al., 2016; Cully & Demiris, 2018; Mouret & Clune, 2015). It aims to generate a diverse set of solutions that maximize a given objective function and is especially valuable in applications involving human interactions, such as games (Shen et al., 2021) and autonomous driving (Araujo et al., 2023). For instance, in online games, deploying AI bots with varied motion styles can enrich the gaming environment and enhance player engagement. Similarly, in autonomous driving, offering multiple solutions can cater to users with different preferences. Additionally, in opponent modeling (Yu et al., 2022), high-quality diverse opponents that resemble real opponents can significantly improve the performance of the learned policy. However, a significant limitation is that most studies in this domain heavily rely on extensive online interactions (Nilsson & Cully, 2021; Pierrot et al., 2022), leading to high costs and imposing constraints on systems with restricted online access. Recent advances in offline RL present a promising direction, allowing for policy learning from pre-collected datasets without further interactions (Fujimoto et al., 2019; Kumar et al., 2020; Kostrikov et al., 2021). However, they often prioritize policy quality, sidelining the inherent diversity within the dataset. In this paper, we bridge this gap by targeting both diversity and high-quality policy learning from offline datasets.
18
+
19
+ The central challenge lies in how to optimize the performance of the policies while ensuring that their behaviors are as distinguishable as possible. Balancing this in an offline setting becomes problematic due to the inherent characteristics of offline datasets. Typically, datasets capturing diverse behaviors are heterogeneous, gathered from multiple sources, leading to an action distribution with multiple modes and inconsistent data quality (Chen et al., 2022; Li et al., 2017). Studies focus on learning diverse behaviors that can capture the multi-modality of the action distribution. However, they often employ a diversity objective that is task-agnostic (Eysenbach et al., 2019; Masood & Doshi-Velez, 2019). In offline settings, this task-agnostic objective can lead to policies that perform exceedingly poorly due to inconsistent data quality. Conversely, current offline RL methods prioritize task performance maximization. To mitigate overestimation issues, a conservative constraint is often imposed on the policy, ensuring that its distribution aligns closely with the dataset (Fujimoto et al., 2019; Kumar et al., 2020; Kostrikov et al., 2021). Amplifying this conservativeness might retain some multi-modality of the dataset. However, it does not offer control over how distinguishable the policy should be during training.
20
+
21
+ To address this challenge, we introduce Stylized Offline Reinforcement Learning (SORL), a two-step framework designed to derive diverse and high-quality policies from a heterogeneous offline dataset. In the first step, we perform a style clustering. Drawing inspiration from the venerable Expectation-Maximization (EM) algorithm, we classify the trajectories from the heterogeneous dataset into clusters where each represents a distinct and dominant motion style. In the second step, we employ advantage-weighted style learning, an offline RL method with a novel objective considering both performance and diversity. Here we train a set of policies to maximize the task performance, with each policy specifically constrained to the action distribution of a particular style identified in the first step. Unlike other offline RL methods that constrain the policy to the entire dataset without differentiating between types of motions, our approach effectively extracts stylistically diverse behavior in the dataset that can be characterized by distinct behavioral patterns. In contrast to diverse RL methods, we achieve high-performing policies that are in-distribution with respect to the dataset, yet less influenced by the low-quality samples.
22
+
23
+ We evaluate SORL across various environments and offline datasets. These include a didactic game with a hand-crafted dataset, a set of Atari games using open-sourced human data, and the popular basketball video game "Dunk City Dynasty" with data recorded from online players. We compare SORL against the offline versions of two baseline methods that focus on learning diverse behavior from multi-modal datasets. The experimental results demonstrate the significant superiority of SORL over the baseline methods in achieving policies with higher performance while maintaining distinguishable behavior patterns. In summary, the contributions of this paper are as follows:
24
+
25
+ 1. We introduce SORL, a novel framework that addresses the limitations of both diverse RL and offline RL methods by incorporating both quality and diversity into the optimization objective.
26
+ 2. We provide comprehensive evaluations of SORL across diverse environments using datasets recorded from humans, showcasing its capability to extract high-performing, stylistically diverse policies from heterogeneous offline datasets.
27
+
28
+ # 2 RELATED WORK
29
+
30
+ Offline RL and Imitation Learning Offline reinforcement learning (RL) leverages a fixed offline dataset to learn a policy that achieves high performance in online evaluation. Previous work has focused on policy conservativeness to prevent over-estimation and mitigate out-of-distribution actions during evaluation (Fujimoto et al., 2019; Wu et al., 2019b; Peng et al., 2019; Kostrikov et al., 2021; Kumar et al., 2020). Imitation Learning involves learning the behavior policy from the dataset, instead of using the reinforcement learning. Some studies in Imitation Learning also consider the potential multi-modality of the dataset (Li et al., 2017; Kuefler & Kochenderfer, 2017; Wang et al., 2017; Igl et al., 2023; Shafiullah et al., 2022; Wu et al., 2019a). Offline skill discovery shares similarities with learning diverse policies, but its goal is to improve performance in downstream tasks through the acquisition of skills. These approaches employ similar methods to model the latent variable and capture different skills (Laskin et al., 2022; Villecroze et al., 2022).
31
+
32
+ Diversity in RL Diversity plays a crucial role in Reinforcement Learning algorithms. In some works, diversity is supposed to enhance the overall quality by means of encouraging exploration
33
+
34
+ (Hong et al., 2018) or better opponent modeling (Fu et al., 2022). Besides studies on diverse policies, skill discovery also shares the same requirement for diverse skills (Eysenbach et al., 2019; Campos et al., 2020; Sharma et al., 2020; Achiam et al., 2018). Other works consider optimizing both diversity and high quality in the optimization (Masood & Doshi-Velez, 2019; Zhang et al., 2019b; Zhou et al., 2022). It is important to mention that studies on diversity in the online environment promote exploration or skill discovery. However, in this paper, our focus is on diversity in the offline setting, which is beneficial for opponent modeling and various applications such as game AI and autonomous driving.
35
+
36
+ Quality-Diversity Optimization Some research in the field of evolutionary algorithms also focuses on discovering diverse policies. They formulate the problem as the Quality-Diversity Optimization problem (Pugh et al., 2016; Cully & Demiris, 2018), where "quality" refers to the policy's performance, and "diversity" emerges from the evolutionary iterations. An algorithm called MAP-Elites has been developed to generate diverse and high-quality policies (Cully, 2015; Mouret & Clune, 2015). Subsequent studies in this area aim to improve the efficiency of the evolutionary algorithm by combining it with policy gradient methods (Pierrot et al., 2022; Nilsson & Cully, 2021; Pierrot et al., 2022) or evolution strategies (Colas et al., 2020; Wang et al., 2022).
37
+
38
+ # 3 PRELIMINARY
39
+
40
+ In this paper, we consider a Markov Decision Process (MDP) defined by the tuple $(\mathcal{S},\mathcal{A},P,r,\rho_0,\gamma)$ , where $\mathcal{S}$ is the state space, $\mathcal{A}$ is the action space, and $P:S\times A\times S\to \mathbb{R}$ is the transition function. The reward function is denoted by $r:S\times \mathcal{A}\rightarrow \mathbb{R}$ . We use $\rho_0:S\rightarrow \mathbb{R}$ to denote the initial state distribution, and $\gamma$ to denote the discount factor. In standard reinforcement learning (RL), a learning agent optimizes its polity $\pi :S\times \mathcal{A}\to \mathbb{R}$ to maximize the expected cumulative discounted return $J(\pi) = \mathbb{E}_{\pi}\sum_{t = 0}^{T}\gamma^{t}r(s_{t},a_{t})$ , where $s_0\sim \rho_0$ , $a_{t}\sim \pi (a_{t}|s_{t})$ , and $s_{t + 1}\sim P(s_{t + 1}|s_t,a_t)$ . The value function $V^{\pi}(s_t)$ corresponds to the expected return of policy $\pi$ at state $s_t$ , and the action value function $Q^{\pi}(s_t,a_t)$ refers to the expected return obtained by playing action $a_{t}$ at state $s_t$ and then following $\pi$ . The advantage function $A^{\pi}(s_t,a_t)$ is defined as $A^{\pi}(s_t,a_t) = Q^{\pi}(s_t,a_t) - V^{\pi}(s_t)$ . We use $d_{\pi}(s) = \sum_{t = 0}^{T}\gamma^{t}p(s_{t} = s|\pi)$ to denote the unnormalized discounted state distribution induced by policy $\pi$ .
41
+
42
+ In offline RL, an agent learns from a pre-collected dataset $\mathcal{D}$ consisting of multiple trajectories without online interaction with the environment. This paper further assumes that the dataset $\mathcal{D}$ contains behaviors of heterogeneous policies $\{\beta^{(1)},\beta^{(2)},\ldots ,\beta^{(K)}\}$ . The assumption is not restrictive for many real-world scenarios. For instance, in online gaming and autonomous driving, the dataset usually contains behaviors of a number of different agents and humans, each of which may possess distinct behavioral patterns. The objective of our approach, termed Stylized Offline RL (SORL), is to learn a set of high-quality and diverse policies $\{\pi^{(1)},\pi^{(2)},\dots,\pi^{(m)}\}$ from the most representative behaviors exhibited by the dataset $\mathcal{D}$ .
43
+
44
+ # 4 METHOD
45
+
46
+ In order to leverage heterogeneous datasets and strike a balance between policy diversity and performance, we propose Stylized Offline RL (SORL), a novel two-step framework consisting of (1) EM-based style clustering and (2) advantage-weighted style learning. In style clustering, for each cluster that represents a distinct and dominant behavioral style, SORL assigns different weights to trajectories in the dataset. A trajectory's weight reflects its posterior probability of belonging to that style. Subsequently, SORL incorporates stylized advantage weighted regression to learn diverse and high-quality policies by constraining each policy to be conservative with respect to the corresponding weighted set of data. The SORL algorithm is illustrated in Algorithm 1.
47
+
48
+ # 4.1 EM-BASED STYLE CLUSTERING
49
+
50
+ The latent variable model is a natural way to disentangle a dataset generated by diverse policies (Li et al., 2017; Wang et al., 2017; Laskin et al., 2022). In our problem, each trajectory in the dataset is generated by an unknown latent policy. Therefore, drawing inspiration from the expectation-maximization (EM) algorithm, SORL alternates between trajectory clustering and policy learning to
51
+
52
+ extract the most representative diverse behaviors from the heterogeneous dataset. SORL learns a set of $m$ most representative policies $\{\mu^{(1)},\mu^{(2)},\ldots ,\mu^{(m)}\}$ by maximizing the log-likelihood:
53
+
54
+ $$
55
+ L L \left(\left\{\mu^ {(i)} \right\}\right) = \sum_ {\tau \in \mathcal {D}} \log \left[ \sum_ {i = 1} ^ {m} p (\tau | z = i) p \left(\mu^ {(i)}\right) \right] \tag {1}
56
+ $$
57
+
58
+ where $\tau$ denotes a trajectory in the dataset, $z$ is the latent variable indicating which policy $\tau$ belongs to, $p(\tau | z = i)$ is the probability of $\tau$ sampled under policy $\mu^{(i)}$ , and $p(\mu^{(i)})$ is the prior distribution. The policies serve as the generative model for generating the dataset. The main challenge is to identify latent $z$ . The EM-based algorithm iteratively updates the policies and the estimation $\hat{p}$ for the posteriors $p(z|\tau)$ . Upon its convergence, the estimated posterior distribution $\hat{p}(z|\tau)$ offers a clustering of trajectories in the dataset, and the policy $\mu^{(i)}$ imitates the behavior in cluster $i$ .
59
+
60
+ # 4.1.1 E-STEP
61
+
62
+ In the E-step, SORL calculates the estimated posterior distribution of the latent variable $\hat{p}(z|\tau)$ with respect to the current policies $\{\mu^{(i)}\}$ . Formally, $\hat{p}(z = i|\tau) \propto p(\mu^{(i)}) \prod_{(s,a) \in \tau} \mu^{(i)}(a|s)$ . In this paper, we assume a uniform prior. Empirically, we find that the long trajectory horizon leads to numerical instability when multiplying probabilities. Hence, we employ an alternative approach to estimate the latent variable. Since all steps in the trajectory $\tau$ share the same latent variable, the posterior distribution $\hat{p}(z|\tau)$ is estimated by averaging across all the samples in a trajectory.
63
+
64
+ $$
65
+ \hat {p} (z = i \mid \tau) \approx \frac {1}{Z} \sum_ {(s, a) \in \tau} \mu^ {(i)} (a \mid s) \tag {2}
66
+ $$
67
+
68
+ where $Z$ is a normalizing factor. SORL uses equation 2 to calculate the posteriors for all trajectories of the dataset in the E-step.
69
+
70
+ # 4.1.2 M-STEP
71
+
72
+ According to Jensen's inequality (Durrett, 2019),
73
+
74
+ $$
75
+ L L \left(\left\{\mu^ {(i)} \right\}\right) \geq \sum_ {\tau \in \mathcal {D}} \sum_ {i = 1} ^ {m} \left[ \hat {p} (z = i | \tau) \log \frac {p (\tau | z = i) p \left(\mu^ {(i)}\right)}{\hat {p} (z = i | \tau)} \right]. \tag {3}
76
+ $$
77
+
78
+ In the M-step, with the posteriors frozen, the policies $\{\mu^{(i)}\}_{i = 1}^{m}$ are updated to maximize the right side of inequality 3, which is a lower bound of the log likelihood in equation 1. In order to maximize the objective $\sum_{\tau \in \mathcal{D}}\sum_{i = 1}^{m}[\hat{p} (z = i|\tau)\log p(\tau |z = i)]$ , SORL utilizes weighted imitation learning to minimize the following loss:
79
+
80
+ $$
81
+ L o s s (\{\mu^ {(i)} \}) = \frac {1}{| \mathcal {D} |} \sum_ {\tau \in \mathcal {D}} \sum_ {i = 1} ^ {m} \hat {p} (z = i | \tau) \sum_ {(s, a) \in \tau} \log \mu^ {(i)} (a | s) \tag {4}
82
+ $$
83
+
84
+ The style clustering algorithm shares the same convergence result with the original EM algorithm, and it is guaranteed to converge to a saddle point (Ng et al., 2012).
85
+
86
+ # 4.2 ADVANTAGE-WEIGHTED STYLE LEARNING
87
+
88
+ In the second step, SORL further improves the policies' performances with stylized advantage-weighted regression. Formally, SORL learns a set of policies $\{\pi^{(1)},\pi^{(2)},\ldots ,\pi^{(m)}\}$ through the following constrained optimization problem:
89
+
90
+ $$
91
+ \forall i \in [ m ], \pi^ {(i)} = \arg \max J (\pi^ {(i)})
92
+ $$
93
+
94
+ $$
95
+ s. t. \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} D _ {K L} (\pi^ {(i)} (\cdot | s) | | \mu^ {(i)} (\cdot | s)) \leq \epsilon , \int_ {a} \pi^ {(i)} (a | s) d a = 1, \forall s. \tag {5}
96
+ $$
97
+
98
+ The policies learn to maximize cumulative return to avoid degenerate behavior, while still remaining diverse through constraining the KL divergence between $\mu^{(i)}$ and $\pi^{(i)}$ to be small. Maximizing the cumulative return $J(\pi^{(i)})$ is equivalent to maximizing the expected improvement $\eta (\pi^{(i)}) = J(\pi^{(i)}) - J(\mu^{(i)})$ $(i = 1\dots m)$ . According to previous works, the expected improvement can be expressed in terms of advantage: (Schulman et al., 2015)
99
+
100
+ $$
101
+ \eta \left(\pi^ {(i)}\right) = \mathbb {E} _ {s \sim d _ {\pi^ {(i)}} (s)} \mathbb {E} _ {a \sim \pi^ {(i)} (a | s)} \left[ A ^ {\mu^ {(i)}} (s, a) \right] \tag {6}
102
+ $$
103
+
104
+ Equation 6 poses challenges in optimization due to the unknown discounted state distribution $d_{\pi^{(i)}}$ . To address this, a common approach is to substitute $d_{\pi^{(i)}}$ with $d_{\mu^{(i)}}$ to provide a good estimate of $\eta(\pi^{(i)})$ (Schulman et al., 2015; Peng et al., 2019). It has been proved that the error can be bounded by the KL divergence between $\pi^{(i)}$ and $\mu^{(i)}$ (Schulman et al., 2015), which has already been constrained in our objective 5. Therefore, we optimize the following objective 11.
105
+
106
+ $$
107
+ \forall i \in [ m ], \pi^ {(i)} = \arg \max \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} \mathbb {E} _ {a \sim \pi^ {(i)} (\cdot | s)} A ^ {\mu^ {(i)}} (s, a)
108
+ $$
109
+
110
+ $$
111
+ s. t. \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} D _ {K L} (\pi^ {(i)} (\cdot | s) | | \mu^ {(i)} (\cdot | s)) \leq \epsilon , \int_ {a} \pi^ {(i)} (a | s) d a = 1, \forall s. \tag {7}
112
+ $$
113
+
114
+ In advantage-weighted style learning, we approximate $A^{\mu^{(i)}}(s,a)$ by $A^{\mu}(s,a)$ , where $\mu$ represents the policy distribution of the entire dataset. This approximation is made because $A^{\mu}(s,a)$ often has higher quality than $A^{\mu^{(i)}}$ . Subsequently, we calculate the Lagrangian of the optimization problem:
115
+
116
+ $$
117
+ \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} \left[ \mathbb {E} _ {a \sim \pi^ {(i)} (\cdot | s)} A ^ {\mu} (s, a) + \lambda \left(\epsilon - D _ {K L} \left(\pi^ {(i)} (\cdot | s) \mid \mid \mu^ {(i)} (\cdot | s)\right)\right) \right] + \int_ {s} \alpha_ {s} \left(1 - \int_ {a} \pi^ {(i)} (a | s) d a\right) \tag {8}
118
+ $$
119
+
120
+ Note that the policy $\pi^{(i)}$ of each style can be optimized independently. Taking derivative with respect to $\pi_i(a|s)$ , we can obtain the closed-form solution $\pi^{(i)*}(a|s) \propto \mu^{(i)}(a|s)\exp\left(\frac{1}{\lambda}A^\mu(s,a)\right)$ . Finally, we project $\pi^{(i)*}$ to $\pi_\theta^{(i)}$ parameterized by $\theta$ by minimizing the KL divergence between them. It can be proved that the parameterized policy of $i$ -th style $\pi_\theta^{(i)}$ can be learned by minimizing the following loss. Please refer to Appendix D for detailed proofs.
121
+
122
+ $$
123
+ L o s s \left(\pi_ {\theta} ^ {(i)}\right) = - \mathbb {E} _ {\tau \sim \mathcal {D}} \hat {p} (z = i | \tau) \sum_ {(s, a) \in \tau} \log \pi_ {\theta} ^ {(i)} (a | s) \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right). \tag {9}
124
+ $$
125
+
126
+ Compared with the previous offline RL algorithm AWR (Peng et al., 2019) that learns a single policy, SORL learns a set of diverse policies by assigning different weights to trajectories in the dataset. SORL leverages the estimated posterior distribution calculated in step one to force different policies to focus on different clusters of trajectories that possess distinct behavior patterns.
127
+
128
+ The two-step SORL algorithm is illustrated in Algorithm 1. SORL leverages the EM-based style clustering to extract distinct styles from the dataset. Furthermore, it takes into account both diversity and quality improvements to perform advantage-weighted learning. As a result, the SORL algorithm extracts from the heterogeneous dataset a collection of diverse policies with high quality.
129
+
130
+ # 5 EXPERIMENTS
131
+
132
+ In this experimental section, we aim to address the following questions: (1) Can SORL derive high-performing policies that exhibit diverse behaviors from an offline heterogeneous dataset originating from various sources? (2) How does SORL compare to prior methods that focus on learning diverse behaviors from an offline heterogeneous dataset? (3) Is SORL suitable for complex, real-world tasks, especially those involving large-scale datasets collected from human users?
133
+
134
+ Our experiments encompass a range of tasks and offline datasets. For each experiment, we train a set of policies and evaluate them based on three criteria: quality, diversity, and consistency. These criteria respectively reflect the performance, behavioral diversity, and whether the learned diversity is inherent in the offline dataset, addressing the question (1). To answer question (2), we compare SORL against two prior methods: Off-RLPMM (Wu et al., 2019a) and InfoGAIL (Li et al., 2017). This comparison spans three sets of experiments, each with increasing levels of difficulty.
135
+
136
+ The first experiment involves a grid-shooting game where the dataset is manually collected from two distinct winning strategies. This experiment allows for a detailed analysis of the learned policies as we have full control over the game environment and access to the ground truth styles in the dataset. The second experiment features a set of Atari games. The datasets for these games are recorded from human players in a controlled, semi-frame-by-frame manner (Zhang et al., 2019a). As a result, the quality of the dataset is relatively high. This experiment assesses the performance of the methods when learning from heterogeneous datasets with minimal interference from inconsistent data quality. The final experiment centers on the popular basketball video game "Dunk City Dynasty" (FuxiRL, 2023). Here, datasets are recorded directly from online players, leading to greater diversity and
137
+
138
+ Algorithm 1 Stylized Offline RL (SORL)
139
+ 1: Input: offline heterogeneous dataset $\mathcal{D}$ , number of policies $m$
140
+ 2: Output: learned diverse policies $\pi_{\theta}^{(1)} \cdots \pi_{\theta}^{(m)}$
141
+ 3: Initialize policies $\pi_{\theta}^{(1)} \cdots \pi_{\theta}^{(m)}$ and $\mu^{(1)} \cdots \mu^{(m)}$
142
+ 4: # EM-based style clustering
143
+ 5: while not converged do
144
+ 6: # E-step
145
+ 7: Calculate the posterior probability of styles $\hat{p}(z|\tau)$ with Equation 2
146
+ 8: # M-step
147
+ 9: Calculate the loss function $Loss(\{\mu^{(i)}\})$ defined in Equation 4
148
+ 10: Update $\{\mu^{(i)}\}$ by taking one step of gradient descent with respect to $Loss(\{\mu^{(i)}\})$
149
+ 11: end while
150
+ 12: # Advantage-weighted style learning
151
+ 13: Calculate the posterior probability of styles $\hat{p}(z|\tau)$ with Equation 2
152
+ 14: while not converged do
153
+ 15: Calculate the loss function $Loss(\{\pi_{\theta}^{(i)}\})$ defined in Equation 9
154
+ 16: Update $\{\pi_{\theta}^{(i)}\}$ by taking one step of gradient descent with respect to $Loss(\{\pi_{\theta}^{(i)}\})$
155
+ 17: end while
156
+
157
+ considerable variations in data quality. This experiment evaluates the effectiveness of the methods in handling complex, real-world tasks using datasets collected from a diverse group of humans, addressing the question (3).
158
+
159
+ In the following, we introduce the baseline methods and the evaluation criteria, and then present the results of the three experiments.
160
+
161
+ # 5.1 BASELINES
162
+
163
+ Off-RLPMM: RLPMM (Wu et al., 2019a) adopts a similar EM framework, but it is not directly applicable in our offline setting because it requires additional online interaction to train a classifier for labeling all the trajectories in the M-step. We implement an offline version of RLPMM (Off-RLPMM) that adopts a similar M-step as SORL, except that Off-RLPMM partitions the dataset into disjoint subsets instead of using SORL's weighting scheme.
164
+
165
+ InfoGAIL: InfoGAIL (Li et al., 2017) studies imitation learning from multimodal datasets. Different from the EM stage of SORL, InfoGAIL infers the latent style of trajectories by maximizing the mutual information between the latent codes and trajectories.
166
+
167
+ In both baselines, we employ Behavior Cloning (BC) as the imitation learning algorithm. Additionally, in contrast to the two-stage algorithm SORL, both baselines do not have a second policy improvement stage. Detailed explanations are provided in Appendix E.
168
+
169
+ # 5.2 EVALUATION CRITERIA
170
+
171
+ We evaluate the learned policy with the following three criteria.
172
+
173
+ Quality: The quality of a policy is assessed by the episode return of trajectories during evaluation. It reflects the performance of the policy in completing tasks.
174
+
175
+ Diversity: Diversity is determined by the entropy of styles identified from the learned policies. With learned clustering $\hat{p}$ , each trajectory is classified into a style with the highest probability. Diversity is then calculated as the entropy of the distribution of styles over the whole dataset. In conjunction with the later-introduced consistency metric, a higher entropy suggests that policies exhibit diverse, distinguishable behaviors.
176
+
177
+ $$
178
+ \begin{array}{l} p _ {\text {p o l u l a r i t y}} (z = i) = \frac {1}{| \mathcal {D} |} \sum_ {\tau \in \mathcal {D}} \mathbb {I} (\underset {j} {\arg \max } \left\{\hat {p} (z = j \mid \tau) \right\} = i) \tag {10} \\ D i v e r s i t y := E n t r o p y \left(p _ {p o p u l a r i t y} (\cdot)\right) \\ \end{array}
179
+ $$
180
+
181
+ Consistency: The consistency measures the likelihood that the learned policy generates actions corresponding to the specific cluster it is associated with within the dataset. Evaluating consistency is crucial to ensure that the behaviors we have learned are inherent in the heterogeneous datasets, rather than being unknown out-of-distribution actions, which could also artificially inflate diversity scores.
182
+
183
+ # 5.3 DIDACTIC EXAMPLE: GRID SHOOTING
184
+
185
+ In the grid shooting game, a player navigates in a 9x9 grid world, controlling a character that engages in combat against an AI opponent. Both the player and the AI have the ability to move in four directions within the grid, shoot at each other, and gather stars that randomly appear in one of the grid cells. Rewards and termination conditions are distributed based on the subsequent events:
186
+
187
+ - Shooting: If the player and the AI opponent are positioned in the same row or column, they have the opportunity to shoot at each other. A successful shot ends the game, with the shooter being declared the winner and receiving a reward of 10.
188
+ - Star Collection: A star is randomly placed in a grid cell, and its location is known to both the player and the AI opponent. Whichever party reaches the location of the star earns a reward of 1. After the star is collected, it reappears randomly in another grid cell. If no successful shooting occurs, the game terminates at the 100th step, and the participant with the higher accumulated rewards is announced as the winner.
189
+
190
+ <table><tr><td>Methods</td><td>Learned policies</td><td>Reward (shoot)</td><td>Reward (star)</td><td>Winning rate</td></tr><tr><td rowspan="2">SORL</td><td>policy 1</td><td>2.6 ± 0.1</td><td>2.2 ± 1.3</td><td>51.0 ± 0.1%</td></tr><tr><td>policy 2</td><td>1.1 ± 0.4</td><td>6.3 ± 0.2</td><td>59.3 ± 0.0%</td></tr><tr><td rowspan="2">Off-RLPMM</td><td>policy 1</td><td>2.7 ± 0.1</td><td>0.0 ± 0.0</td><td>26.5 ± 0.0%</td></tr><tr><td>policy 2</td><td>0.0 ± 0.0</td><td>8.6 ± 0.1</td><td>54.4 ± 0.0%</td></tr><tr><td rowspan="2">InfoGAIL</td><td>policy 1</td><td>1.7 ± 0.1</td><td>4.9 ± 0.7</td><td>52.0 ± 5.7%</td></tr><tr><td>policy 2</td><td>1.5 ± 0.3</td><td>3.5 ± 0.4</td><td>58.7 ± 7.4%</td></tr></table>
191
+
192
+ Table 1: The reward distribution and the winning rate of the two policies learned from the heterogeneous dataset.
193
+
194
+ ![](images/67080f2fc33c6a9a4e2657519aebb3aaa2bf8f770c0e9406ec56341b5e763575.jpg)
195
+ (a) A sample trajectory of style 1 that shoots the enemy.
196
+
197
+ ![](images/4278660ea3142596634bd788610658d9deb7c1ba98a08cb218e99f4dc2c0c3a0.jpg)
198
+ (b) A sample trajectory of style 2 that gets the stars.
199
+ Figure 1: Visualization of policies learned by SORL, capturing the main playing styles in the dataset.
200
+
201
+ In the Grid Shooting environment, there are two distinct winning strategies or playing styles. The first strategy emphasizes shooting the enemy, while the second focuses on collecting stars and avoiding direct confrontations with the enemy, as depicted in Figure 1. We constructed our dataset by combining trajectories from both playing styles. Using this dataset, we trained two policies with SORL and compared them with two baseline methods. The rewards earned for each event and the final winning rates are detailed in Table 1.
202
+
203
+ From the table, it is evident that SORL successfully captures the core difference between the two playing styles. This is reflected in the distinct reward distributions for shooting and star collecting across the two learned policies. Furthermore, the winning rates of the policies are promising, underscoring their robust performance. In contrast, while Off-RLPMM also captures the two playing styles, the winning rates of its policies are lower than those of SORL. InfoGAIL, on the other hand,
204
+
205
+ yields a competitive winning rate but fails to differentiate between the styles of the policies. Figure 1 shows example trajectories for the two learned policies of SORL. More detailed quantitative results including the quality, diversity and consistency is presented in Appendix A.2.
206
+
207
+ # 5.4 ATARI GAMES
208
+
209
+ In this experiment, we focus on six Atari games, including SpaceInvaders, MsPacman, MontezumaRevenge, Enduro, Riverraid, and Frostbite. For each game, We train three policies using the dataset provided by Atari Head (Zhang et al., 2019a), a large-scale dataset of human players. The dataset is recorded in a controllable semi-frame-by-frame manner, ensuring high data quality. The experimental results, which include metrics on quality, diversity, and consistency, are presented in Table 2. A visual representation of these results, using a radar plot, is available in Figure 2.
210
+
211
+ ![](images/d8e377f10fcd50a0a80c1ddbec6ec831d048c1fb2c888ab26a24e7dbd7aebece.jpg)
212
+ (a) SpaceInvaders
213
+
214
+ ![](images/cd8c9598f9a1dc9b6be12f91a451fcbd3b3f2faed0e0b6694ce3b99c0a4aa74d.jpg)
215
+ (b) MsPacman
216
+
217
+ ![](images/9d52ab549d8c1918004dc0a86f1418c9e812e1dc937289a68a6c7ca9aa4241a8.jpg)
218
+ (c) MontezumaRevenge
219
+
220
+ ![](images/eb0fc8df35bb3f02b66e2c602fddebb355c5990c7088b704096b38e2ecbd9833.jpg)
221
+ (d) Enduro
222
+
223
+ ![](images/b300f8d4e71b728dd6d44343a08a5dabec0ad5e871cb041486b3e001ad658b98.jpg)
224
+ (e) Riverraid
225
+
226
+ ![](images/79a8b3a33498c7b9d55790e5dea2072fc5e82459a7d0ee609a3339fc49f09b3e.jpg)
227
+ (f) Frostbite
228
+
229
+ Figure 2: The radar plot of quality, diversity, and consistency in the Atari environment.
230
+
231
+ <table><tr><td>Games</td><td>Methods</td><td>Quality</td><td>Diversity</td><td>Consistency</td></tr><tr><td rowspan="3">SpaceInvaders</td><td>SORL</td><td>387.1 ± 33.3</td><td>0.96 ± 0.11</td><td>94.7 ± 0.1%</td></tr><tr><td>Off-RLPMM</td><td>412.5 ± 16.3</td><td>0.22 ± 0.15</td><td>89.8 ± 0.2%</td></tr><tr><td>InfoGAIL</td><td>353.2 ± 19.3</td><td>0.0 ± 0.0</td><td>92.3 ± 0.7%</td></tr><tr><td rowspan="3">MsPacman</td><td>SORL</td><td>622.2 ± 65.3</td><td>0.91 ± 0.09</td><td>94.5 ± 0.2%</td></tr><tr><td>Off-RLPMM</td><td>543.4 ± 80.2</td><td>0.88 ± 0.09</td><td>90.0 ± 0.1%</td></tr><tr><td>InfoGAIL</td><td>558.0 ± 137.8</td><td>0.00 ± 0.00</td><td>94.2 ± 0.1</td></tr><tr><td rowspan="3">MontezumaRevenge</td><td>SORL</td><td>306.7 ± 19.1</td><td>1.05 ± 0.03</td><td>95.1 ± 0.1%</td></tr><tr><td>Off-RLPMM</td><td>216.7 ± 95.3</td><td>0.86 ± 0.13</td><td>94.8 ± 0.1</td></tr><tr><td>InfoGAIL</td><td>290.0 ± 58.6</td><td>0.00 ± 0.00</td><td>92.3 ± 1.1</td></tr><tr><td rowspan="3">Enduro</td><td>SORL</td><td>371.1 ± 2.9</td><td>0.84 ± 0.25</td><td>96.2 ± 0.1%</td></tr><tr><td>Off-RLPMM</td><td>317.2 ± 7.5</td><td>0.00 ± 0.00</td><td>89.1 ± 0.6%</td></tr><tr><td>InfoGAIL</td><td>351.3 ± 31.0</td><td>0.00 ± 0.00</td><td>84.4 ± 0.8%</td></tr><tr><td rowspan="3">Riverraid</td><td>SORL</td><td>1931.2 ± 432.1</td><td>1.00 ± 0.04</td><td>95.1 ± 0.2%</td></tr><tr><td>Off-RLPMM</td><td>1748.6 ± 113.7</td><td>0.39 ± 0.29</td><td>89.7 ± 3.9%</td></tr><tr><td>InfoGAIL</td><td>1882.6 ± 149.8</td><td>0.00 ± 0.00</td><td>89.2 ± 1.5%</td></tr><tr><td rowspan="3">Frostbite</td><td>SORL</td><td>2056.0 ± 391.9</td><td>0.97 ± 0.04</td><td>93.5 ± 0.4%</td></tr><tr><td>Off-RLPMM</td><td>2183.2 ± 502.4</td><td>0.60 ± 0.07</td><td>91.6 ± 0.0%</td></tr><tr><td>InfoGAIL</td><td>2584.7 ± 206.5</td><td>0.00 ± 0.00</td><td>91.8 ± 0.3%</td></tr></table>
232
+
233
+ Table 2: The experiment results of quality, diversity and consistency in the Atari environment.
234
+
235
+ From Table 2, we see results consistent with those in the grid shooting game. SORL outperforms the baseline methods, attaining the highest scores in both diversity and consistency for all games, and
236
+
237
+ secures the top quality score in four out of the six games. While Off-RLPMM does exhibit some diversity, its policy quality is weaker. Conversely, InfoGAIL achieves competitive quality scores but struggles to learn diverse policies. Visualizations of the stylized policies are in Appendix H.
238
+
239
+ # 5.5 VIDEO GAME APPLICATION
240
+
241
+ Dunk City Dynasty" (FuxiRL, 2023) is an online mobile game where players control a character to play in a 3v3 basketball match. The game presents a formidable challenge to existing algorithms due to its high-dimensional state and action spaces. For this experiment, we collect a dataset of over 100,000 steps, directly from online players. Compared to the other two experiments, the dataset used here has notable variations in both behavioral styles and data quality. Same as Atari games, we train three policies with SORL and compare them with two baseline methods. The experimental results on quality, diversity, and consistency are presented in Table 3. The results highlight that SORL consistently outperforms in all three evaluation metrics, underscoring its robustness and adaptability in handling complex, real-world tasks, especially when working with large-scale datasets from diverse human players.
242
+
243
+ <table><tr><td>Methods</td><td>Quality</td><td>Diversity</td><td>Consistency</td></tr><tr><td>SORL</td><td>5.3 ± 3.4</td><td>1.05 ± 0.0</td><td>40.7 ± 4.6%</td></tr><tr><td>Off-RLPMM</td><td>1.7 ± 0.5</td><td>0.51 ± 0.18</td><td>38.6 ± 5.4%</td></tr><tr><td>InfoGAIL</td><td>5.0 ± 0.8</td><td>0.73 �� 0.22</td><td>39.8 ± 3.3%</td></tr></table>
244
+
245
+ Table 3: The experiment results of quality, diversity and consistency in the "Dunk City Dynasty" environment.
246
+
247
+ ![](images/72a7b54ab0fa53147724bb0dd68b15f97aa5c43590d9b68c3df533a299336b16.jpg)
248
+ (a) Screenshot
249
+
250
+ ![](images/4f994305e33c8e9f0dcb39a5498f1e84c6f1a4eb488ff4cdb4f3f560f0d39575.jpg)
251
+ (b) Policy 1
252
+
253
+ ![](images/1a518c46afe8b07d6a15bb3fcc3bb3b13d467c944410fcbc86382823a68d45cd.jpg)
254
+ (c) Policy 2
255
+ Figure 3: A scene in the game, and the shooting areas favored by each policy. The grayscale represents the distribution of shooting action locations, with darker shades indicating higher probabilities and lighter shades signifying lower probabilities.
256
+
257
+ ![](images/093f4746e43bb311ea4213ca8929a0d51d2ae4ed0894108cba946a0fede1566f.jpg)
258
+ (d) Policy 3
259
+
260
+ We observed distinct shooting range preferences among the three policies. For example, policy 1 tends to favor short-range shots, while policy 3 is inclined towards long-range shots. The preferred shooting areas for each policy are visualized in Figure 3. Additional screenshots showcasing typical behaviors of these policies can be found in Figure 5 in the Appendix B. To better illustrate the behaviors exhibited by the learned policies, we have included gameplay videos in the supplementary materials..
261
+
262
+ # 6 CONCLUSION
263
+
264
+ In this paper, we explored the extraction of diverse and high-quality behaviors from offline heterogeneous datasets. These datasets, sourced from multiple origins, inherently possess a multimodal data distribution with inconsistent data quality. Such a setting poses significant challenges to existing methods, which can be affected by low-quality data or lack the control to differentiate the behavioral while learning. To address these challenges, we introduced the Stylized Offline Reinforcement Learning (SORL) framework. SORL employs an EM-based style clustering combined with advantage-weighted policy learning. This design not only optimizes the performance of the policies but also preserves the inherent behavioral diversity found in heterogeneous datasets. Through extensive experiments, we compared SORL with two prior methods across various tasks and heterogeneous offline datasets. Our results underscore SORL's superior capability in extracting behaviors that are both high-quality and diverse. Our future work aims to offer a more flexible formulation of policy behavior, potentially allowing shared behaviors between policies, making it more relevant for real-world applications. Furthermore, we plan to integrate adaptive task learning using the diverse policies derived from SORL, enabling dynamic switching in different task scenarios.
265
+
266
+ # 7 REPRODUCIBILITY STATEMENT
267
+
268
+ The source code for the SORL algorithm and the baselines used in this study are included in the supplementary materials. The proof sketch can be found in Section 4.2, and a comprehensive proof is provided in the Appendix 4.2. For the Grid Shooting environment, the data processing steps involve using the state and action directly from the environment output. As for the Atari Head dataset, the processing steps follow the methodology outlined in the original package.
269
+
270
+ # REFERENCES
271
+
272
+ Joshua Achiam, Harrison Edwards, Dario Amodei, and Pieter Abbeel. Variational option discovery algorithms, 2018.
273
+ Hugo Araujo, Mohammad Reza Mousavi, and Mahsa Varshosaz. Testing, validation, and verification of robotic and autonomous systems: A systematic review. ACM Trans. Softw. Eng. Methodol., 32(2), mar 2023. ISSN 1049-331X. doi: 10.1145/3542945. URL https://doi.org/10.1145/3542945.
274
+ Victor Campos, Alexander Trott, Caiming Xiong, Richard Socher, Xavier Giro-I-Nieto, and Jordi Torres. Explore, discover and learn: Unsupervised discovery of state-covering skills. In Hal Daumé III and Aarti Singh (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 1317-1327. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/campos20a.html.
275
+ Xi Chen, Ali Ghadirzadeh, Tianhe Yu, Jianhao Wang, Alex Yuan Gao, Wenzhe Li, Liang Bin, Chelsea Finn, and Chongjie Zhang. Lapo: Latent-variable advantage-weighted policy optimization for offline reinforcement learning. Advances in Neural Information Processing Systems, 35: 36902-36913, 2022.
276
+ Cédric Colas, Vashisht Madhavan, Joost Huizinga, and Jeff Clune. Scaling map-elites to deep neuroevolution. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference, GECCO '20, pp. 67-75, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450371285. doi: 10.1145/3377930.3390217. URL https://doi.org/10.1145/3377930.3390217.
277
+ Antoine Cully and Yiannis Demiris. Quality and diversity optimization: A unifying modular framework. IEEE Transactions on Evolutionary Computation, 22(2):245-259, 2018. doi: 10.1109/TEVC.2017.2704781.
278
+ Clune J. Tarapore D. et al Cully, A. Robots that can adapt like animals. Nature, 521:503-507, 2015. doi: https://doi.org/10.1038/nature14422.
279
+ Rick Durrett. Probability: theory and examples, volume 49. Cambridge university press, 2019.
280
+ Benjamin Eysenbach, Abhishek Gupta, Julian Ibarz, and Sergey Levine. Diversity is all you need: Learning skills without a reward function. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=SJx63jRqFm.
281
+ Haobo Fu, Ye Tian, Hongxiang Yu, Weiming Liu, Shuang Wu, Jiechao Xiong, Ying When, Kai Li, Junliang Xing, Qiang Fu, and Wei Yang. Greedy when sure and conservative when uncertain about the opponents. In International Conference on Machine Learning. PMLR, 2022.
282
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration, 2019.
283
+ FuxiRL. Dunk city dynasty: Multi-agent basketball environment. https://github.com/FuxiRL/Dunkcitydynasty, 2023. 2023.
284
+ Zhang-Wei Hong, Tzu-Yun Shann, Shih-Yang Su, Yi-Hsiang Chang, and Chun-Yi Lee. Diversity-driven exploration strategy for deep reinforcement learning, 2018. URL https://openreview.net/forum?id=BJsD7L1vz.
285
+
286
+ Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models, 2021.
287
+ Maximilian Igl, Punit Shah, Paul Mougin, Sirish Srinivasan, Tarun Gupta, Brandyn White, Kyriacos Shiarlis, and Shimon Whiteson. Latent hierarchical imitation learning for stochastic environments, 2023. URL https://openreview.net/forum?id=stgewiZP0OH.
288
+ Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q-learning, 2021.
289
+ Alex Kuefler and Mykel J. Kochenderfer. Burn-in demonstrations for multi-modal imitation learning. CoRR, abs/1710.05090, 2017. URL http://arxiv.org/abs/1710.05090.
290
+ Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning, 2020.
291
+ Michael Laskin, Hao Liu, Xue Bin Peng, Denis Yarats, Aravind Rajeswaran, and Pieter Abbeel. Cic: Contrastive intrinsic control for unsupervised skill discovery, 2022.
292
+ Yunzhu Li, Jiaming Song, and Stefano Ermon. Infogail: Interpretable imitation learning from visual demonstrations. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pp. 3815-3825, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.
293
+ Yicheng Luo, Zhengyao Jiang, Samuel Cohen, Edward Grefenstette, and Marc Peter Deisenroth. Optimal transport for offline imitation learning, 2023.
294
+ Muhammad Masood and Finale Doshi-Velez. Diversity-inducing policy gradient: Using maximum mean discrepancy to find a set of diverse policies. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pp. 5923-5929. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/821. URL https://doi.org/10.24963/ijcai.2019/821.
295
+ Jean-Baptiste Mouret and Jeff Clune. Illuminating search spaces by mapping elites. CoRR, abs/1504.04909, 2015. URL http://arxiv.org/abs/1504.04909.
296
+ Gerhard Neumann and Jan Peters. Fitted q-iteration by advantage weighted regression. In Proceedings of the 21st International Conference on Neural Information Processing Systems, NIPS'08, pp. 1177-1184, Red Hook, NY, USA, 2008. Curran Associates Inc. ISBN 9781605609492.
297
+ Shu Kay Ng, Thriyambakam Krishnan, and Geoffrey J. McLachlan. The EM Algorithm, pp. 139-172. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012. ISBN 978-3-642-21551-3. doi: 10.1007/978-3-642-21551-3_6. URL https://doi.org/10.1007/978-3-642-21551-3_6.
298
+ Olle Nilsson and Antoine Cully. Policy gradient assisted map-elites. In Proceedings of the Genetic and Evolutionary Computation Conference, GECCO '21, pp. 866-875, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383509. doi: 10.1145/3449639.3459304. URL https://doi.org/10.1145/3449639.3459304.
299
+ Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning, 2019.
300
+ Thomas Pierrot, Valentin Macé, Félix Chalumeau, Arthur Flajolet, Geoffrey Cideron, Karim Beguir, Antoine Cully, Olivier Sigaud, and Nicolas Perrin-Gilbert. Diversity policy gradient for sample efficient quality-diversity optimization, 2022.
301
+ Justin K. Pugh, Lisa B. Soros, and Kenneth O. Stanley. Quality diversity: A new frontier for evolutionary computation. Frontiers Robotics AI, 3:40, 2016. URL https://apisemantic scholar.org/CorpusID:21713708.
302
+ John Schulman, Sergey Levine, Philipp Moritz, Michael Jordan, and Pieter Abbeel. Trust region policy optimization. ICML'15, pp. 1889-1897. JMLR.org, 2015.
303
+
304
+ Nur Muhammad Mahi Shafiullah, Zichen Jeff Cui, Ariuntuya Altanzaya, and Lerrel Pinto. Behavior transformers: Cloning $k$ modes with one stone, 2022.
305
+ Archit Sharma, Shixiang Gu, Sergey Levine, Vikash Kumar, and Karol Hausman. Dynamics-aware unsupervised discovery of skills. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=HJgLZR4KvH.
306
+ Ruimin Shen, Yan Zheng, Jianye Hao, Zhaopeng Meng, Yingfeng Chen, Changjie Fan, and Yang Liu. Generating behavior-diverse game ais with evolutionary multi-objective deep reinforcement learning. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI'20, 2021. ISBN 9780999241165.
307
+ Noah Siegel, Jost Tobias Springenberg, Felix Berkenkamp, Abbas Abdelmaleki, Michael Neunert, Thomas Lampe, Roland Hafner, Nicolas Heess, and Martin Riedmiller. Keep doing what worked: Behavior modelling priors for offline reinforcement learning. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=rke7geHtwH.
308
+ Valentin Villecloze, Harry Braviner, Panteha Naderian, Chris Maddison, and Gabriel Loaiza-Ganem. Bayesian nonparametrics for offline skill discovery. In International Conference on Machine Learning, pp. 22284-22299. PMLR, 2022.
309
+ Qing Wang, Jiechao Xiong, Lei Han, peng sun, Han Liu, and Tong Zhang. Exponentially weighted imitation learning for batched historical data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/4aec1b3435c52abbdf8334ea0e7141e0-Paper.pdf.
310
+ Yutong Wang, Ke Xue, and Chao Qian. Evolutionary diversity optimization with clustering-based selection for reinforcement learning. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=74x5BXs4bWD.
311
+ Ziyu Wang, Josh Merel, Scott Reed, Greg Wayne, Nando de Freitas, and Nicolas Heess. Robust imitation of diverse behaviors. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pp. 5326-5335, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.
312
+ Weichang Wu, Junchi Yan, Xiaokang Yang, and Hongyuan Zha. Reinforcement learning with policy mixture model for temporal point processes clustering. ArXiv, abs/1905.12345, 2019a. URL https://api-semanticscholar.org/CorpusID:168169800.
313
+ Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. CoRR, abs/1911.11361, 2019b. URL http://arxiv.org/abs/1911.11361.
314
+ XiaoPeng Yu, Jiechuan Jiang, Wanpeng Zhang, Haobin Jiang, and Zongqing Lu. Model-based opponent modeling. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 28208-28221. Curran Associates, Inc., 2022. URL https://proceedings.neurips.cc/paper_files/paper/2022/file/b528459c99e929718a7d7e1697253d7f-Paper-Conference.pdf.
315
+ Ruohan Zhang, Calen Walshe, Zhuode Liu, Lin Guan, Karl S. Muller, Jake A. Whitner, Luxin Zhang, Mary M. Hayhoe, and Dana H. Ballard. Atari-head: Atari human eye-tracking and demonstration dataset, 2019a.
316
+ Yunbo Zhang, Wenhao Yu, and Greg Turk. Learning novel policies for tasks. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 7483-7492. PMLR, 09-15 Jun 2019b. URL https://proceedings.mlr.press/v97/zhang19q.html.
317
+ Zihan Zhou, Wei Fu, Bingliang Zhang, and Yi Wu. Continuously discovering novel strategies via reward-switching policy optimization. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=hcQHRHKfN_.
318
+
319
+ # Appendix
320
+
321
+ # A GRID SHOOTING
322
+
323
+ # A.1 ENVIRONMENT DETAILS
324
+
325
+ The state space dimension is 56. The action space is a discrete action space with 9 actions. The opponent is an agent with a fixed strategy that move randomly, and shoot with a probability once the shooting action cools down.
326
+
327
+ # A.2 QUANTITATIVE EXPERIMENT RESULTS OF THE GRID SHOOTING ENVIRONMENT
328
+
329
+ ![](images/33fca6ae6ff65e6abc673a49257e7b74aa4bb21a3d42da6ec0bb6ef8fecec6f3.jpg)
330
+ Figure 4: The radar plot of quality, diversity and consistency in the Table 4: The experiment results of quality, diversity and Grid Shooting environment. consistency in the Grid Shooting environment.
331
+
332
+ <table><tr><td></td><td>Quality</td><td>Diversity</td><td>Consistency</td></tr><tr><td>SORL</td><td>55.1 ± 4.6%</td><td>0.60 ± 0.07</td><td>86.4 ± 0.4%</td></tr><tr><td>Off-RLPMM</td><td>40.4 ± 0.7%</td><td>0.68 ± 0.01</td><td>90.5 ± 0.0%</td></tr><tr><td>InfoGAIL</td><td>55.3 ± 2.1%</td><td>0.00 ± 0.00</td><td>84.0 ± 0.3%</td></tr></table>
333
+
334
+ # B "DUNK CITY DYNASTY"
335
+
336
+ # B.1 ENVIRONMENT DETAILS
337
+
338
+ The state space dimension is 468, including global state, allies' states and enemies' states. The action space is a discrete space with 52 actions. The opponent in evaluation is an agent with moderate strength, that is learned by vanilla Behavioral Cloning for similar training steps (100,000 steps).
339
+
340
+ # B.2 SCREENSHOTS IN "DUNK CITY DYNAMSTY"
341
+
342
+ Table 3 presents three metrics in the experiment, illustrating SORL's ability to learn diverse policies while achieving satisfactory performance. Figure 5 shows screenshots from the videos showcasing each style's self-playing behavior. Supplementary materials include videos that provide additional visual demonstrations. For instance, style 1 demonstrates a preference for shooting in the short range, while style 3 favors long-range shots. The videos reveal that the proportion of goals scored inside the restricted area is $83.3\%$ , $66.7\%$ , and $33.3\%$ for styles 1, 2 and 3, respectively. Furthermore, the proportion of two-point shots is $91.6\%$ , $88.9\%$ and $66.7\%$ . Figure 4 depicts the probabilities of shooting in different regions. In Figure 6, (a) and (c) showcase typical shots of Style 1 and 3. Panel (a) demonstrates shots within the restricted zone, while panel (c) displays long-range shots. Style 2 is characterized by ball possession and running across the arena. The videos indicate that Style 2 has the fewest number of passes (41, 29, 39, respectively), and the lowest proportion of goals scored directly after a pass ( $27.7\%$ , $22.2\%$ , $44.4\%$ ).
343
+
344
+ # B.3 THE PLOT OF SHOOTING POSITIONS
345
+
346
+ We plot the shooting positions in Figure 6 based on the gameplay data. The shooting positions in the plot corresponds to the distribution in Figure 3.
347
+
348
+ ![](images/33aa5a836bf1f185cd4a1530c88a92547e41467df2d451f5056cde1b190ae846.jpg)
349
+ (a) Style 1 prefers short-range shots.
350
+
351
+ ![](images/1ee377b0265ad2d82b890d148fc670cd9a87c176fff21e70dcef650d9fc7131f.jpg)
352
+
353
+ ![](images/b2a3a3c7a559f13752737da6541b7052719b04852640ac59e7f9ff110eb9df60.jpg)
354
+
355
+ ![](images/85d6fba63a257af4b2759a42d934b4452ded8ae1c1b4387f6bbdb84fc851efc3.jpg)
356
+ (b) Style 2 prefers ball handling run.
357
+
358
+ ![](images/e0eb202f2466f7e241621a5402fba45ea1089a2baa9fa000e851522005cf6af3.jpg)
359
+
360
+ ![](images/80159e281ea7ce251ae675c92483f1ee7fa9470754fdad7d7a4e330abeb3b335.jpg)
361
+
362
+ ![](images/f6bb24f7c207331014a204abef9c68d10035f524dbce85cd9d169c48659cbbf8.jpg)
363
+ (c) Style 3 prefers long-range shots.
364
+
365
+ ![](images/41710a8b711fdb09d05579ccbb34a9d7e94b2f84f9b56b25dd28a3d38c2c5718.jpg)
366
+ Figure 5: The screenshots of 3 styles.
367
+
368
+ ![](images/ac39c46913cf02373e07bbc0a2ad3cea22b14a12032559de6282c188e42bbf28.jpg)
369
+
370
+ ![](images/6dd44e2a71f11d311bed70a5f99a57b0371949ef4d5e735e7463344fecba7ce4.jpg)
371
+ (a) Policy 1
372
+
373
+ ![](images/8f37cce15d5d5f8ec33efd6817519bbbcd0a09d6d65901082f4f272ec07aa00d.jpg)
374
+ (b) Policy 2
375
+
376
+ ![](images/5e5017f171e36b309be75eb9298215bbcfb569bca3cee5aebad7c87be9e7c5cc.jpg)
377
+ (c) Policy 3
378
+ Figure 6: The Plot of Shooting Positions.
379
+
380
+ # C ABLATION STUDY
381
+
382
+ In this section, we performed ablation experiments on the advantage-weighted policy learning. Based on the algorithm description provided in Section 4, the SORL algorithm can be divided into two parts. Therefore, when the advantage-weighted policy learning is excluded, SORL reduces to the EM-based style clustering. Table 5 presents the results, indicating that the consistency and diversity metrics show similar performance, while the quality metric improves as a result of the advantage-weighted style learning.
383
+
384
+ <table><tr><td></td><td></td><td>Quality</td><td>Diversity</td><td>Consistency</td></tr><tr><td rowspan="2">SpaceInvaders</td><td>SORL</td><td>387.1 ± 33.3</td><td>0.96 ± 0.11</td><td>94.7 ± 0.1%</td></tr><tr><td>SORL w/o advantage</td><td>349.9 ± 50.2</td><td>0.90 ± 0.14</td><td>93.9 ± 0.2%</td></tr><tr><td rowspan="2">MsPacman</td><td>SORL</td><td>622.2 ± 65.3</td><td>0.91 ± 0.09</td><td>94.5 ± 0.2%</td></tr><tr><td>SORL w/o advantage</td><td>590.0 ± 40.0</td><td>1.02 ± 0.05</td><td>93.9 ± 0.2%</td></tr><tr><td rowspan="2">MontezumaRevenge</td><td>SORL</td><td>306.7 ± 19.1</td><td>1.05 ± 0.03</td><td>95.1 ± 0.1%</td></tr><tr><td>SORL w/o advantage</td><td>211.1 ± 39.7</td><td>1.01 ± 0.05</td><td>94.7 ± 0.1%</td></tr><tr><td rowspan="2">Enduro</td><td>SORL</td><td>371.1 ± 2.9</td><td>0.84 ± 0.25</td><td>96.2 ± 0.1%</td></tr><tr><td>SORL w/o advantage</td><td>405.2 ± 9.7</td><td>0.91 ± 0.21</td><td>95.8 ± 0.1%</td></tr><tr><td rowspan="2">Riverraid</td><td>SORL</td><td>1931.2 ± 432.1</td><td>1.00 ± 0.04</td><td>95.1 ± 0.2%</td></tr><tr><td>SORL w/o advantage</td><td>1842.4 ± 282.2</td><td>0.95 ± 0.00</td><td>94.1 ± 0.2%</td></tr><tr><td rowspan="2">Frostbite</td><td>SORL</td><td>2056.0 ± 391.9</td><td>0.97 ± 0.04</td><td>93.5 ± 0.4%</td></tr><tr><td>SORL w/o advantage</td><td>1787.8 ± 250.6</td><td>0.90 ± 0.07</td><td>92.4 ± 0.1%</td></tr><tr><td rowspan="2">DunkCityDynasty</td><td>SORL</td><td>5.3 ± 3.4</td><td>1.05 ± 0.0</td><td>40.7 ± 4.6%</td></tr><tr><td>SORL w/o advantage</td><td>0.7 ± 0.9</td><td>0.92 ± 0.11</td><td>39.8 ± 5.7%</td></tr></table>
385
+
386
+ Table 5: The ablation study of SORL, comparing the SORL algorithm without advantage-weighted style learning.
387
+
388
+ # D PROOF DETAILS
389
+
390
+ We provide detailed proof of solving the constrained optimization problem in Section 4.2. The original problem is as follows.
391
+
392
+ $$
393
+ \forall i \in [ m ], \pi^ {(i)} = \arg \max \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} \mathbb {E} _ {a \sim \pi^ {(i)} (\cdot | s)} A ^ {\mu^ {(i)}} (s, a)
394
+ $$
395
+
396
+ $$
397
+ s. t. \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} D _ {K L} \left(\pi^ {(i)} (\cdot | s) \| \mu^ {(i)} (\cdot | s)\right) \leq \epsilon , \tag {11}
398
+ $$
399
+
400
+ $$
401
+ \int_ {a} \pi^ {(i)} (a | s) d a = 1, \forall s.
402
+ $$
403
+
404
+ In advantage-weighted style learning, we approximate $A^{\mu^{(i)}}(s,a)$ by $A^{\mu}(s,a)$ , where $\mu$ represents the policy distribution of the entire dataset. This approximation is made because $A^{\mu}(s,a)$ often has higher quality than $A^{\mu^{(i)}}$ . Subsequently, we calculate the Lagrangian of the optimization problem:
405
+
406
+ $$
407
+ \begin{array}{l} L (\pi^ {(i)}, \lambda , \alpha) = \mathbb {E} _ {s \sim d _ {\mu^ {(i)}} (s)} \left[ \mathbb {E} _ {a \sim \pi^ {(i)} (\cdot | s)} A ^ {\mu} (s, a) \right. \\ \left. + \lambda \left(\epsilon - D _ {K L} \left(\pi^ {(i)} (\cdot | s) \mid \mid \mu^ {(i)} (\cdot | s)\right)\right) \right] \tag {12} \\ + \int_ {s} \alpha_ {s} (1 - \int_ {a} \pi^ {(i)} (a | s) d a) \\ \end{array}
408
+ $$
409
+
410
+ Differentiating on $\pi^{(i)}$
411
+
412
+ $$
413
+ \frac {\partial L}{\partial \pi^ {(i)} (a | s)} = d _ {\mu^ {(i)} (s)} \left[ A ^ {\mu} (s, a) - \lambda \log \pi^ {(i)} (a | s) + \lambda \log \mu^ {(i)} (a | s) - \lambda \right] - \alpha_ {s} \tag {13}
414
+ $$
415
+
416
+ We set $\frac{\partial L}{\pi^{(i)}(a|s)}$ to 0, and can get the closed-form solution $\pi^{(i)*}(a|s) = \frac{1}{Z^{(i)}(s)}\mu^{(i)}(a|s)\exp (\frac{1}{\lambda} A^{\mu}(s,a))$ , where the normalization term $Z^{(i)}(s) = \exp (\frac{1}{d_{\mu^{(i)}}(s)}\frac{\alpha_s}{\lambda} +1)$ .
417
+
418
+ Finally, we project $\pi^{(i)*}$ to $\pi_{\theta}^{(i)}$ paramerized by $\theta$ by minimizing the KL divergence between them. $\mathcal{D}^{(i)}$ denotes the trajectories corresponding to style $i$ in the dataset, which is unknown. Hence, we
419
+
420
+ rewrite the expression by incorporating the probability of each trajectory being the $i$ -th style.
421
+
422
+ $$
423
+ \begin{array}{l} \underset {\theta} {\arg \min } \mathbb {E} _ {s \sim \mathcal {D} ^ {(i)}} [ D _ {K L} (\pi^ {(i) *} (\cdot | s) | | \pi_ {\theta} ^ {(i)} (\cdot | s) ] \\ = \arg \min _ {\theta} \mathbb {E} _ {s \sim \mathcal {D} ^ {(i)}} \left[ \int_ {a} \left(\pi^ {(i) *} (a | s) \log \pi^ {(i) *} (a | s) - \pi^ {(i) *} (a | s) \log \pi_ {\theta} ^ {(i)} (a | s)\right) \right] \\ = \underset {\theta} {\arg \min } \mathbb {E} _ {s \sim \mathcal {D} ^ {(i)}} \left[ \int_ {a} (- \pi^ {(i) *} (a | s) \log \pi_ {\theta} ^ {(i)} (a | s)) \right] \\ = \arg \min _ {\theta} \mathbb {E} _ {s \sim \mathcal {D} ^ {(i)}} \left[ \int_ {a} \left(- \frac {1}{Z ^ {(i)} (s)} \mu^ {(i)} (a | s) \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right) \log \pi_ {\theta} ^ {(i)} (a | s)\right) \right] \tag {14} \\ = \arg \min _ {\theta} - \mathbb {E} _ {s \sim \mathcal {D} ^ {(i)}} \mathbb {E} _ {a \sim \mathcal {D} ^ {(i)}} \log \pi_ {\theta} ^ {(i)} (a | s) \frac {1}{Z ^ {(i)} (s)} \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right) \\ = \arg \min _ {\theta} - \mathbb {E} _ {\tau \sim \mathcal {D} ^ {(i)}} \log \pi_ {\theta} ^ {(i)} (a | s) \frac {1}{Z ^ {(i)} (s)} \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right) \\ = \arg \min _ {\theta} - \mathbb {E} _ {\tau \sim \mathcal {D}} \hat {p} (z = i | \tau) \log \pi_ {\theta} ^ {(i)} (a | s) \frac {1}{Z ^ {(i)} (s)} \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right) \\ \end{array}
424
+ $$
425
+
426
+ Similar to AWR (Peng et al., 2019) and other prior work (Neumann & Peters, 2008; Siegel et al., 2020; Wang et al., 2018), we neglect the per-state normalizing constant $Z^{(i)}(s)$ . The policy update can be expressed as follows:
427
+
428
+ $$
429
+ \underset {\theta} {\arg \min } - \mathbb {E} _ {\tau \sim \mathcal {D}} \hat {p} (z = i | \tau) \log \pi_ {\theta} ^ {(i)} (a | s) \exp \left(\frac {1}{\lambda} A ^ {\mu} (s, a)\right) \tag {15}
430
+ $$
431
+
432
+ The original problem 11 has solution because it satisfies the Linear Independence Constraint Qualification (LICQ).
433
+
434
+ # EXPERIMENT DETAILS
435
+
436
+ Network structure We construct the network based on the default network of the relative task according to the codebase we use. The network of Grid Shooting and Dunk City Dynasty is a 3-layer MLP, and the network of Atari environments has three convolution layers and two linear layers.
437
+
438
+ ![](images/e9866a5c8bf48de3296b3aa71f07f870b2f171ca94f9432d558359a7f35ab259.jpg)
439
+ Figure 7: The usage of LoRA in the network structure of multiple policies.
440
+
441
+ Besides, in order to ensure balanced learning among all the styles, we share the main network and use a LoRA module to discriminate different styles. LoRA (Hu et al., 2021) is a widely used network structure, that substitutes the original matrix of the linear layer by a matrix $W$ and a low-
442
+
443
+ rank multiplication of two other matrices $A_{i}$ and $B_{i}$ . In our setting as shown in Figure 7, the matrix $W$ is shared among all styles of policies, while $A_{i}, B_{i}$ varies. The input dimension $d$ and output dimension $k$ depends on the linear layer, and the rank $r$ is set to 9 in this work.
444
+
445
+ Number of styles In Grid Shooting, we use 2 styles because we want to recover the two real styles of behaviors in the dataset. In other environments, we learn 3 styles from the dataset.
446
+
447
+ Hyperparameters and other details In Grid Shooting, we use the batch size 128, offline dataset size 20000 and the number of epochs 10. In Atari environments, we use the batch size of $32 \times 5$ where we sample $32(s,a)$ pairs for 5 times, with the number of epochs 30. In Dunk City Dynasty, we use the batch size of around 300 and 100,000 steps for the quality, diversity, and consistency metrics. We use 900,000 steps for generating the playing videos of different styles.
448
+
449
+ We re-implement the InfoGAIL with continuous latent variables in all the environments. The 3 styles are extracted by applying $(1,0,0)$ , $(0,1,0)$ , $(0,0,1)$ as the latent variable to the policy model and get the 3 different policies.
450
+
451
+ The Grid Shooting and Atari results in the tables show the mean and standard deviation among 3 random seeds.
452
+
453
+ # F ADDITIONAL METRICS EVALUATING DIVERSITY
454
+
455
+ In the main text, we use the diversity metric of popularity, which is a dataset-related metric that evaluates diversity. However, the definition of diversity, especially in the offline setting, is not unique. We provide additional diversity metrics in this part. The definitions of metrics are as follows.
456
+
457
+ 1. Skill metric measures the dissimilarity of the skill set. The skill set is defined as the vector of rewards obtained by each skill, e.g., $skill = (r_{shoot}, r_{star})$ in the grid shooting environment. And the dissimilarity between two skill sets $skill_1$ , $skill_2$ is defined as the value of their cross product $d_{skill}(skill_1, skill_2) = ||skill_1 \times skill_2||$ . The dissimilarity metric is obtained by first sampling trajectories with different policies, and calculating the average dissimilarity between pair-wise skill sets, i.e., $Diversity_{skill} = \mathbb{E}_{skill_i, skill_j} d_{skill}(skill_i, skill_j)$ where $skill_i, skill_j$ are sampled from different styles.
458
+ 2. OT (optimal transport) metric is based on the optimal transport distance (also known as Wasserstein distance). The similar idea is used in a recent work in imitation learning (Luo et al., 2023). When calculating the trajectory-level OT distance, we align steps with neighbor states together and sum up to the overall distance, i.e., $d_{OT}(\tau^1, \tau^2) = \arg \min_{\mu \in M} \sum_{t=1}^{T} \sum_{t'=1}^{T} ||s_t^1 - s_{t'}^2||_{\mu_{t,t'}}$ where $M = \{\mu \in \mathbb{R}^{T \times T}, \mu \mathbf{1} = \frac{1}{T} \mathbf{1}, \mu^T \mathbf{1} = \frac{1}{T} \mathbf{1}\}$ . And the diversity metric is calculated by averaging all trajectory pairs $\tau^i, \tau^j$ from different policies $Diversity_{OT} = \mathbb{E}_{\tau^i, \tau^j} d_{OT}(\tau^i, \tau^j)$ . We employ a normalization technique to enhance the interpretability of the OT metric. The normalization is achieved by applying the formula $normalize(Diversity_{OT}) = \frac{Diversity_{OT} - \alpha}{\alpha}$ , where $\alpha$ is the OT metric on trajectories sampled from the same policy.
459
+
460
+ 3. Discrimination metric represents how different policies can be discriminated by a neural network. After collecting trajectories of different policies, we first train a neural network to predict the policy index, and the discrimination metric is just the evaluation accuracy.
461
+
462
+ <table><tr><td></td><td>Popularty metric</td><td>Skill metric</td><td>OT metric</td><td>Discrimination metric</td></tr><tr><td>SORL</td><td>0.60</td><td>15.7</td><td>0.022</td><td>0.75</td></tr><tr><td>SORL w/o advantage</td><td>0.61</td><td>21.2</td><td>0.108</td><td>0.97</td></tr><tr><td>Off-RLPMM</td><td>0.68</td><td>23.2</td><td>0.048</td><td>0.99</td></tr><tr><td>InfoGAIL</td><td>0.00</td><td>2.0</td><td>0.000</td><td>0.69</td></tr></table>
463
+
464
+ Table 6: The diversity under differen metrics.
465
+
466
+ Based on the results of the additional diversity metrics presented in Table 6, we can conclude that the SORL algorithm is capable of obtaining diverse policies.
467
+
468
+ # G COMPARISON WITH OFFLINE RL BASELINES
469
+
470
+ <table><tr><td></td><td>SORL (ours)</td><td>CQL</td><td>AWR</td><td>IQL</td></tr><tr><td>SpaceInvaders</td><td>387.1 ± 33.3</td><td>136.5 ± 27.5</td><td>339.3 ± 57.1</td><td>361.5 ± 86.9</td></tr><tr><td>MsPacman</td><td>622.2 ± 65.3</td><td>513.7 ± 325.5</td><td>486.7 ± 148.1</td><td>505.0 ± 161.2</td></tr><tr><td>MontezumaRevenge</td><td>306.7 ± 19.1</td><td>113.4 ± 196.3</td><td>343.3 ± 173.9</td><td>166.7 ± 32.1</td></tr><tr><td>Enduro</td><td>371.1 ± 2.9</td><td>0.0 ± 0.1</td><td>345.7 ± 40.2</td><td>290.1 ± 44.2</td></tr><tr><td>Riverraid</td><td>1931.2 ± 432.1</td><td>1127.7 ± 160.6</td><td>1710.3 ± 270.0</td><td>1909.3 ± 332.1</td></tr><tr><td>Frostbite</td><td>2056.0 ± 391.9</td><td>76.3 ± 16.7</td><td>1528.0 ± 329.4</td><td>2184.7 ± 337.5</td></tr></table>
471
+
472
+ We present the results of standard offline RL methods in Table 7, which do not focus on diverse policy learning.
473
+
474
+ # H ATARI ENVIRONMENT VISUALIZATION
475
+
476
+ # H.1 SPACEINVADERS
477
+
478
+ ![](images/f856548e171401ccc30011926e517409d34f82ec1cf71275f6eed913d0a6e56c.jpg)
479
+ Figure 8: The game interface of SpaceInvaders.
480
+
481
+ In SpaceInvaders as Figure 8, the shooter can move horizontally, and there are three stationary bunkers positioned above the shooter. The shooter can shoot from bottom to top, in order to destroy the aliens above to get scores. During playing, there are random attacks from top bottom that can destroy the shooter. However, staying under the bunker can prevent those attacks. The bunker can also be destroyed by continuously attacking it. In addition, the aliens slowly swing left and right together all the time. In the game, players move horizontally to shoot from a correct position with an alien above, and avoid being attacked.
482
+
483
+ Table 7: The comparison with offline RL baselines.
484
+
485
+ <table><tr><td></td><td>Leftmost - Bunker 1</td><td>Bunker 1 - Bunker 2</td><td>Bunker 2 - Bunker 3</td><td>Bunker 3 - Rightmost</td></tr><tr><td>Style 1</td><td>23%</td><td>19%</td><td>36%</td><td>22%</td></tr><tr><td>Style 2</td><td>10%</td><td>57%</td><td>15%</td><td>18%</td></tr><tr><td>Style 3</td><td>32%</td><td>38%</td><td>26%</td><td>4%</td></tr></table>
486
+
487
+ Table 8: In SpaceInvaders, the probability of the shooter in different regions.
488
+
489
+ ![](images/c3dee6621cb32907388fba8e4d31f893da85d3a849dcd9c14a97b1ee6bb4ccd0.jpg)
490
+ (a) Style 1
491
+
492
+ ![](images/7bdac04aeea3d347e3b6dff9184e5aeb46d5f33569add3d4b5ca7ba630631cb4.jpg)
493
+ (b) Style 2
494
+
495
+ ![](images/99dd0cb3eabeab34ebbc457adfd12989a653eb3f310fef1893cbc6a84ec5a34b.jpg)
496
+ (c) Style 3
497
+ Figure 9: In SpaceInvaders, the probability distribution of the shooter's position.
498
+
499
+ To evaluate the diversity of learned policies, we calculate the frequency of the shooter's position over $30,000+$ steps for each style. Table 8 and Figure 9 demonstrates that different styles of policies tend to prefer different positions.
500
+
501
+ To better understand the style of learned clusters, we analyze the game mechanics which partially explains the preferences of styles. In SpaceInvaders, a shortcut of getting high scores is to staying close to the left of the Bunker 1 (and also staying close to the right of the Bunker 2) to destroy all the aliens in the leftmost column (and the rightmost column), because there are fewer attacks from top to bottom and is close to the bunker, where destroying the aliens in the leftmost/rightmost column provides a large amount to scores. As a result, style 1 and style 3 prefers staying in the leftmost, and style 1 and style 2 prefers staying in the leftmost.
502
+
503
+ # H.2 MSPACMAN
504
+
505
+ In MsPacman as shown in Figure 10, the map and starting position are fixed. To evaluate the diversity of learned policies, we calculate the frequency of the beginning trajectory until the first corner for each style, based on 30 trajectories per style. There are a total of six possible corners. Table 9 displays the different preferred corners for each style.
506
+
507
+ ![](images/750618a6ce5e901c0b0e7e818d490d1ce0f82ef062ba5bb7848e2028a6e49827.jpg)
508
+ Figure 10: The game interface of MsPacman.
509
+
510
+ Besides, we analyze the visualizations of the dataset trajectories. Atari datasets in our experiment are collected by three players, which exhibit some diversity in terms of policy variations. As shown the following table 10, in the game MsPacman, different human players (named J, K and R) have varying preferences for the first visited corners. Additionally, even within a single player's gameplay, there can be variations in visitation patterns.
511
+
512
+ <table><tr><td>Which corner</td><td>3rd left</td><td>2nd left</td><td>1st left</td><td>1st right</td><td>2nd right</td><td>3rd right</td></tr><tr><td>Style 1</td><td>0%</td><td>33%</td><td>67%</td><td>0%</td><td>0%</td><td>0%</td></tr><tr><td>Style 2</td><td>20%</td><td>7%</td><td>7%</td><td>3%</td><td>37%</td><td>27%</td></tr><tr><td>Style 3</td><td>0%</td><td>97%</td><td>3%</td><td>0%</td><td>0%</td><td>0%</td></tr></table>
513
+
514
+ Table 9: In MsPacman, the probability of the pacman choosing different routes in the beginning.
515
+
516
+ <table><tr><td>Which corner</td><td>3rd left</td><td>2nd left</td><td>1st left</td><td>1st right</td><td>2nd right</td><td>3rd right</td></tr><tr><td>Player J (2 trajs)</td><td>0%</td><td>0%</td><td>50%</td><td>50%</td><td>0%</td><td>0%</td></tr><tr><td>Player K (2 trajs)</td><td>0%</td><td>0%</td><td>50%</td><td>50%</td><td>0%</td><td>0%</td></tr><tr><td>Player R (16 trajs)</td><td>6%</td><td>44%</td><td>6%</td><td>19%</td><td>19%</td><td>6%</td></tr></table>
517
+
518
+ # I SENSITIVITY ANALYSIS ON THE NUMBER OF POLICIES
519
+
520
+ Sensitivity analysis We have performed experiments to evaluate the diversity, quality, and consistency of SORL under different values of $m$ , where $m$ is the number of policies. The performance of SORL in Table 11 remains similar across different $m$ values, indicating that the algorithm is not highly sensitive to the hyperparameter $m$ .
521
+
522
+ Table 10: In the dataset of MsPacman, the probability of the pacman choosing different routes in the beginning.
523
+
524
+ <table><tr><td></td><td>m = 2</td><td>m = 3</td><td>m = 4</td><td>m = 5</td></tr><tr><td>Diversity</td><td>0.61</td><td>0.85</td><td>0.65</td><td>0.69</td></tr><tr><td>Quality</td><td>55.1%</td><td>50.3%</td><td>52.5%</td><td>52.2%</td></tr><tr><td>Consistency</td><td>86.4%</td><td>88.5%</td><td>88.7%</td><td>88.7%</td></tr></table>
525
+
526
+ The reward distribution of learned policies The reward distribution of the learned policies is presented in Table 12. When taking larger $m$ value, the learned policies still differs a lot from each other. Some of them focus on shooting enemies, while others prefer collecting stars.
527
+
528
+ Table 11: The diversity, quality and consistency under different values of $m$ .
529
+
530
+ <table><tr><td colspan="2">(m=3)</td><td>Policy 1</td><td>Policy 2</td><td>Policy 3</td></tr><tr><td colspan="2">Reward (shoot)</td><td>0.0</td><td>3.3</td><td>2.7</td></tr><tr><td colspan="2">Reward (star)</td><td>8.2</td><td>0.4</td><td>3.8</td></tr><tr><td colspan="2">Winning rate</td><td>59%</td><td>36%</td><td>56%</td></tr><tr><td>(m=4)</td><td>Policy 1</td><td>Policy 2</td><td>Policy 3</td><td>Policy 4</td></tr><tr><td>Reward (shoot)</td><td>1.3</td><td>2.2</td><td>0.2</td><td>3.1</td></tr><tr><td>Reward (star)</td><td>6.0</td><td>3.2</td><td>7.6</td><td>0.5</td></tr><tr><td>Winning rate</td><td>57%</td><td>57%</td><td>56%</td><td>40%</td></tr><tr><td>(m=5)</td><td>Policy 1</td><td>Policy 2</td><td>Policy 3</td><td>Policy 4</td></tr><tr><td>Reward (shoot)</td><td>1.1</td><td>2.6</td><td>2.9</td><td>0.4</td></tr><tr><td>Reward (star)</td><td>8.0</td><td>0.5</td><td>0.5</td><td>8.6</td></tr><tr><td>Winning rate</td><td>50%</td><td>38%</td><td>37%</td><td>65%</td></tr></table>
531
+
532
+ Table 12: The reward distribution when $m = 3,4,5$
533
+
534
+ # J DISCUSSION ON POSTERIOR APPROXIMATION
535
+
536
+ In the main text, we approximate the true posterior $\hat{p}(z = i|\tau) \propto \int_{(s,a) \in \tau} \mu^{(i)}(a|s)$ with $\hat{p}(z = i|\tau) \propto \sum_{(s,a) \in \tau} \mu^{(i)}(a|s)$ , because the consecutive multiplication leads to numerical instability.
537
+
538
+ We plot the distribution of $\hat{p}(z = 1|\tau)$ for all trajectories in the dataset in Figure 11. Figure 11a uses consecutive multiplication, while Figure 11b is the average of all steps. The results show that using
539
+
540
+ consecutive multiplication causes a trend of polarization in clustering, which causes unexpected numerical instability. The experiment was conducted in the grid shooting environment with the number of clusters set to $m = 2$ .
541
+
542
+ ![](images/c08ca4a13ed292b09c7275f9c00832257e9bdbce67898c307ae66f3555d67cce.jpg)
543
+ (a) The distribution of the true posterior $\hat{p} (z = 1|\tau)$ , which is calculated by consecutive multiplication of the probability at each step.
544
+ Figure 11: The histogram of the distribution of the posterior.
545
+
546
+ ![](images/f9d715b6c7bfdbcb1f9d2cc6ac57bd6b48e223db559ebfdceeb19b9eb3635e7e.jpg)
547
+ (b) The distribution of the approximated $\hat{p} (z = 1|\tau)$ , which is calculated by averaging the probability at each step.
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:199ad618e45d782949c5285fb1162196862fc6b4404cf1fc57c3d22bae12b197
3
+ size 1188013
2024/Stylized Offline Reinforcement Learning_ Extracting Diverse High-Quality Behaviors from Heterogeneous Datasets/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/d6c5c269-83cd-497e-86c3-75dfeafcc50b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c2f7d977ab664624d51d64c1e077bc72c41a64f3ee1694bf56a71156f8d3396
3
+ size 750019
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/full.md ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SURE: SUMMARIZING RETRIEVALS USING ANSWER CANDIDATES FOR OPEN-DOMAIN QA OF LLMS
2
+
3
+ Jaehyung Kim $^{1,*}$ Jaehyun Nam $^{2}$ Sangwoo Mo $^{3}$ Jongjin Park $^{2}$
4
+
5
+ Sang-Woo Lee2,5 Minjoon Seo2 Jung-Woo Ha4,5 Jinwoo Shin2
6
+
7
+ $^{1}$ Carnegie Mellon University $^{2}$ KAIST AI $^{3}$ University of Michigan $^{4}$ Naver AI Lab $^{5}$ Naver Cloud
8
+
9
+ jaehyun4@andrew.cmu.edu
10
+
11
+ # ABSTRACT
12
+
13
+ Large language models (LLMs) have made significant advancements in various natural language processing tasks, including question answering (QA) tasks. While incorporating new information with the retrieval of relevant passages is a promising way to improve QA with LLMs, the existing methods often require additional fine-tuning which becomes infeasible with recent LLMs. Augmenting retrieved passages via prompting has the potential to address this limitation, but this direction has been limitedly explored. To this end, we design a simple yet effective framework to enhance open-domain QA (ODQA) with LLMs, based on the summarized retrieval (SURE). SURE helps LLMs predict more accurate answers for a given question, which are well-supported by the summarized retrieval that could be viewed as an explicit rationale extracted from the retrieved passages. Specifically, SURE first constructs summaries of the retrieved passages for each of the multiple answer candidates. Then, SURE confirms the most plausible answer from the candidate set by evaluating the validity and ranking of the generated summaries. Experimental results on diverse ODQA benchmarks demonstrate the superiority of SURE, with improvements of up to $4.6\%$ in exact match (EM) and $4.0\%$ in F1 score over standard prompting approaches. SURE also can be integrated with a broad range of retrieval methods and LLMs. Finally, the generated summaries from SURE show additional advantages to measure the importance of retrieved passages and serve as more preferred rationales by models and humans.<sup>1</sup>
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Large language models (LLMs) (Brown et al., 2020; Touvron et al., 2023b) have significantly accelerated progress in natural language processing (NLP) and have become a core technology in various real-world applications used by millions of users, such as coding assistants (Chen et al., 2021), search engines (Xuan-Quy et al., 2023), and chatbots (Kim et al., 2021; OpenAI, 2022). However, LLMs often suffer from limitations, such as non-factual but seemingly plausible generation, referred to as hallucinations (Welleck et al., 2020), and difficulty in integrating up-to-date knowledge, as their learned knowledge is limited by the training corpus encoded in their parameters (Guu et al., 2020). This problem is particularly critical for question answering (QA) (Kwiatkowski et al., 2019), one of the most frequently encountered applications for LLMs.
18
+
19
+ Incorporating new information through the retrieval of relevant knowledge for a given query (e.g., a question from users) is widely explored to improve the accuracy of QA systems, called open-domain QA (ODQA) (Karpukhin et al., 2020), and shows promise in addressing the aforementioned limitations of LLMs (Mialon et al., 2023). Constructing these retrieval-augmented LLMs typically involves additional fine-tuning (Borgeaud et al., 2022; Izacard et al., 2023), but it becomes infeasible due to the increase in scale and the recent nature of black-box API (OpenAI, 2023). Consequently, retrieval augmentation via prompting, i.e., giving specific instruction as the input to obtain the desired outputs by LLM, becomes an attractive direction from its simplicity and efficiency (Shi et al., 2023). However, naive prompting could be limited in fully exploiting the retrieved contexts, since
20
+
21
+ LLMs are simply instructed to use the retrieved information, instead of being explicitly trained to use it; for example, Liu et al. (2023b) recently observed that LLMs struggle to handle long input contexts when they are naively appended. Despite its importance, how to improve retrieval-augmented LLMs via prompting has been under-explored. Therefore, to improve ODQA via LLMs, we aim to develop a simple yet effective framework based on prompting, that could be easily applicable to various LLMs and retrieval methods.
22
+
23
+ Contribution. We propose a framework based on Summarized Retrieval (SURE), to improve ODQA performance of retrieval-augmented LLMs. At a high level, SURE helps LLMs predict more grounded answers, which are well-supported by the summarization of retrieved passages that could be viewed as an explicit rationale extracted from the retrieved passages. To be specific, SURE first constructs the multiple summarizations of retrieved passages conditioned on each of a few possible answer candidates. It enables LLMs to focus on the specific contexts relevant to the given candidate, and hence provides more discriminative viewpoints for the given question. Then, using the generated summarizations, SURE confirms the most plausible answer among candidates by measuring the corresponding summaries' validity to support the given candidate and ranking of relative informativeness to answer the question. Remarkably, all the procedures of SURE are conducted via zero-shot prompting. Consequently, SURE is widely applicable when LLMs are only accessible with black-box API, even without query-relevant few-shot examples.
24
+
25
+ Through the experiments on four different QA datasets, we demonstrate the effectiveness of SURE for improving the zero-shot ODQA performance of retrieval-augmented LLMs. For example, we observe that the augmentation of 10 relevant passages effectively improves QA accuracy (up to $8.2\%$ with Contriver (Izacard et al., 2022)) of ChatGPT (OpenAI, 2022), and the gain is significantly enlarged with SURE (up to $12.8\%$ ), as shown in Figure 1. Overall, SURE with ChatGPT and BM25 (Robertson et al., 2009) exhibited $4.6\% / 4.0\%$ exact match (EM)/F1 score improvements compared to the standard prompting in average on four ODQA datasets. In addition, SURE is well generalized to different configurations of various retrieval methods and LLMs. More interestingly, we observe that the generated summarization by SURE could be further utilized to evaluate the importance of the retrieved passages, and also verify that it has a higher model/human preference as a rationale for the given
26
+
27
+ prediction, compared to the generic summarization of retrieved passages. Overall, these results highlight the effectiveness of SURE, to improve ODQA systems based on LLMs, not only in terms of accuracy but also of additional advantages that can improve the user experience. We, therefore, hope that the proposed framework could be beneficial in various real-world applications.
28
+
29
+ ![](images/423943ebfad9d9da0cf0ffe33e8e421ef96e395a4f66d25b807946c3e4eed8d9.jpg)
30
+ Figure 1: Zero-shot QA accuracy with various LLMs on Natural Question (Kwiatkowski et al., 2019). The performances of LLaMA-33B, GLaM-62B, and PaLM-540B are from the corresponding papers, respectively (Chowdhery et al., 2022; Du et al., 2022; Touvron et al., 2023a).
31
+
32
+ # 2 RELATED WORK
33
+
34
+ Open-domain question answering. Open-domain question answering (ODQA) (Voorhees et al., 1999) is a task that requires responding to factual questions using external knowledge sources (Zhu et al., 2015; Nagel, 2016). Recently, there has been significant research interest in ODQA systems, under a framework known as the retriever-and-read system (Chen et al., 2017). The role of retriever is to extract the relevant pieces of information from the given knowledge sources. For the retriever, there are two different popular methods: one is a lexical-based retriever, e.g., TF-IDF or BM25 (Robertson et al., 2009), and the other is a sentence embedding-based retriever such as DPR (Karpukhin et al., 2020) or Contriver (Izacard et al., 2022). On the other hand, the reader is responsible for aggregating and reasoning with the retrieved information to generate answers. Usually, recent transformer-based language models (LMs) such as BERT (Kenton & Toutanova, 2019) or T5 (Raffel et al., 2020) are widely adopted for the reader after fine-tuning. In contrast, LLMs exhibit
35
+
36
+ comparable performance or outperform in QA without fine-tuning (Kamalloo et al., 2023; Shi et al., 2023), which indicates a potential to serve as a universal QA system (Xuan-Quy et al., 2023).
37
+
38
+ Retrieval-augmented language models. Similar to enhancing QA systems with retriever in ODQA, augmenting LMs with relevant information retrieved from external knowledge sources has been demonstrated as an effective way to improve the performance of LMs on various NLP tasks (Guu et al., 2020; Lazaridou et al., 2022; Min et al., 2022; Liu et al., 2023a), by reducing hallucination of LLMs and leveraging external knowledge which is not seen during pre-training. To construct such retrieval-augmented LMs, the standard approach is conducting additional fine-tuning to learn how to incorporate the retrieved information (Guu et al., 2020; Borgeaud et al., 2022; Izacard et al., 2023). However, when considering the recent nature of LLMs with increasing scale and providing black-box API only, such a direction becomes less attractive. One promising direction to address this challenge is investigating a better prompting (Brown et al., 2020), which incorporates the retrieved information as additional inputs in a sophisticated way. However, this direction has been only limitedly explored. Appending the retrieval (Si et al., 2023; Trivedi et al., 2023) is a common practice for prompting, but Liu et al. (2023b) recently revealed its limitation in utilizing the retrieved information. Aggregating the predictions from each retrieved passage has been also explored (Lazaridou et al., 2022; Shi et al., 2023), but LLMs can't see a full context of retrieved information in this case. More discussions about the summarization of retrieval in open-domain context are in Appendix G.
39
+
40
+ # 3 SUMMARIZED RETRIEVAL FOR QUESTION ANSWERING
41
+
42
+ # 3.1 OVERVIEW AND PROBLEM DESCRIPTION
43
+
44
+ Overview. In this section, we present our framework, coined Summarized Retrieval (SURE) to enhance ODQA performance of LLMs, by proposing an improved way to incorporate retrieved passages for the prediction. Our main idea is to construct multiple summaries of the retrieved passages conditioned with each of a few answer candidates, and predict the most plausible candidate as the answer after evaluating the validity and relative informativeness of summaries. In Sections 3.2 and 3.3, we present the details to generate the summarizations and evaluate them. Figure 2 presents the specific example of QA procedure via SURE.
45
+
46
+ Problem description. Open-domain question answering (ODQA) is an extension of QA tasks that answer questions that require background knowledge by leveraging an external database. In order to answer the given question $q$ , the ODQA system typically follows retrieve-and-read framework (Chen et al., 2017; Lee et al., 2019), where the retriever finds the informative passages $C_N^+$ from the whole corpus $C$ , and the reader exploits the retrieved passages to decide the answer $a$ , which can be formulated as follows:
47
+
48
+ $$
49
+ C _ {N} ^ {+} = \operatorname {R e t r i e v e r} (q, C, N) \text {a n d} \widehat {a} = \operatorname {R e a d e r} (q, C _ {N} ^ {+}), \tag {1}
50
+ $$
51
+
52
+ where $N$ is the number of retrieved passages and $\widehat{a}$ is the predicted answer.
53
+
54
+ In this work, we focus on improving a prompting method for an LLM-based ODQA system. Specifically, we adopt the existing retriever method, e.g., BM25 (Robertson et al., 2009) or Contriever (Izacard et al., 2022), with the dataset-specific corpus. For the reader method, we use LLMs, denoted by \(\mathcal{M}\), such as ChatGPT (Sun et al., 2023) or LLaMA-2 (Touvron et al., 2023b), by incorporating the retrieved passages via prompting (Brown et al., 2020) without additional training. For example, with a prompt \(p(q,C_N^+) = "Reading passages \(C_N^+\), answer to question \(q\) ", the prediction \(\widehat{a}\) is obtained from \(\mathcal{M}\), i.e., \(\widehat{a} = \mathcal{M}\left(p(q,C_N^+)\right)\).
55
+
56
+ # 3.2 CONDITIONAL SUMMARIZATION OF RETRIEVED PASSAGES
57
+
58
+ To better exploit the retrieved passages with LLMs, SURE first summarizes them conditioned on each of a few potential answer candidates. This conditional summarization of retrieved passages would include the specific contexts supporting a given answer candidate, compared to the generic summarization focusing on the wide coverage for the retrieved passages. Specifically, SURE first generates answer candidates and then conducts conditional summarization.
59
+
60
+ Candidates generation. Given a question $q$ , retrieved passages $C_N^+$ , and LLM $\mathcal{M}$ , we first generate $K$ answer candidates $\widetilde{\mathbf{y}} = [\widetilde{y}_1, \ldots, \widetilde{y}_K]$ using a prompt $p_{\mathrm{can}}$ designed for candidate generation from
61
+
62
+ ![](images/24fe03cc9dd85d666d542b33e49c8d55f771be0787afb8b0a92b6efe52507b44.jpg)
63
+ Figure 2: Example of QA with the proposed SURE framework. Given a query question and relevant passages retrieved by an external method, e.g., BM25 (Robertson et al., 2009), a large language model, e.g., ChatGPT, needs to predict the answer. To improve this, SURE first generates multiple answer candidates via prompting, and then conditionally summarizes the retrieved passages to support each candidate. By comparing the validity and relative informativeness of summaries, SURE selects the most plausible candidate as a final prediction.
64
+
65
+ $q$ and $C_N^+$
66
+
67
+ $$
68
+ \widetilde {\mathbf {y}} = \mathcal {M} \left(p _ {\text {c a n}} \left(q, C _ {N} ^ {+}\right)\right). \tag {2}
69
+ $$
70
+
71
+ In Figure 2, one can observe the example of generated candidates. It is noticeable that the previous works utilized stochastic decoding to generate multiple answer candidates (Lazaridou et al., 2022; Weng et al., 2022). However, we empirically observe that explicitly prompting an LLM to generate $K$ potential candidates outputs more diverse and high-quality candidates.
72
+
73
+ Candidate-conditioned summarization. Next, we conditionally summarize the retrieved passages $C_N^+$ focusing on including the relevant contexts to validate each candidate $\widetilde{y}_k \in \widetilde{\mathbf{y}}$ as an answer to $q$ :
74
+
75
+ $$
76
+ s _ {k} = \mathcal {M} \left(p _ {\text {s u m}} \left(q, C _ {N} ^ {+}, y _ {k}\right)\right) \text {f o r} k = 1, \dots , K \tag {3}
77
+ $$
78
+
79
+ where $p_{\mathrm{sum}}$ is a prompt to obtain the conditional summarization $s_k$ from $q$ , $C_N^+$ , and $\widetilde{y}_k$ . We present some examples of the generated summarizations in Figure 2, and more examples are in Appendix B. Remarkably, the generated summarizations effectively reduce the given passages by focusing on extracting the candidate-relevant contexts (e.g., 1035 words of retrieved passages → 93 words of summarization). Also, we verify that the contexts of the generated summarization are specialized on a given answer candidate; when we measure TF-IDF (Chowdhury, 2010) based text similarity between two candidates and two conditional summarizations from each candidate (e.g., summarization #1 is generated to support answer candidate #1) on Natural Question dataset (Kwiatkowski et al. rization exhibits a higher similarity with the corresponding candida
80
+
81
+ ![](images/da751ee82d74e2a1ade069fb27c3cba92403886abdb982a3c80b801dce8bd0e5.jpg)
82
+ Figure 3: TF-IDF overlap between candidates and conditional summarizations.
83
+
84
+ # 3.3 SELECTIVE PREDICTION VIA VERIFICATION OF SUMMARIZATIONS
85
+
86
+ Then, using the generated summarizations, SURE confirms the most plausible answer among the candidate set for the prediction. Our key intuition is that the quality (e.g., factuality, logicality, and
87
+
88
+ # Algorithm 1 SURE algorithm
89
+
90
+ 1: Input: Large language model $\mathcal{M}$ , question $q$ , $N$ retrieved passages $C_N^+$ , candidate number $K$
91
+ 2: Answer Candidate Generation: $\widetilde{\mathbf{y}} = \mathcal{M}\left(p_{\mathrm{can}}(q,C_N^+)\right)$ , $\widetilde{\mathbf{y}} = [\widetilde{y}_1,\dots ,\widetilde{y}_K]$
92
+ 3: Conditional Summarization: $s_k = \mathcal{M}\left(p_{\mathrm{sum}}(q, C_N^+, y_k)\right)$ for $k = 1, \ldots, K$
93
+ 4: Instance-wise Validation: $v(s_{k}) \gets$ Eq. 4 with $\mathcal{M}(p_{\mathrm{val}}(q, s_{k}))$
94
+ 5: Pair-wise Ranking: $r(s_k, S_K)$ , $r_{\mathrm{pair}}(s_k, s_i) \gets \mathrm{Eq. 5}$ with $\mathcal{M}(p_{\mathrm{rank}}(q, s_k, s_i))$
95
+ 6: Output: Prediction $\widehat{a} = \widetilde{y}_{k^*}$ , $k^* = \arg \max_k v(s_k) + r(s_k, S_K)$
96
+
97
+ readability) of the generated summarizations would vary depending on the plausibility of answer candidates, so as more plausible the answer, the corresponding summarization also will be more plausible. Then, LLMs can find the most plausible summarization among these multiple summarizations if a proper evaluation way is given. To this end, we propose to evaluate the generated summarizations with instance-wise validity and pair-wise ranking among them.
98
+
99
+ Instance-wise validity. First, we evaluate the validity of each summarization $s_k$ whether it is not a degenerated case as the provided passages are not enough to support $\widetilde{y}_k$ , or it properly supports the given answer candidate $\widetilde{y}_k$ , rather than the other candidate $\widetilde{y}_i$ , $i \neq k$ . To be specific, we measure a validity $v_k$ of each summarization $s_k$ using a prompt $p_{\mathrm{val}}$ designed for the validation:
100
+
101
+ $$
102
+ v \left(s _ {k}\right) = 1, \text {w h e n} \mathcal {M} \left(p _ {\text {v a l}} \left(q, y _ {k}, s _ {k}\right)\right) = \text {T r u e} \quad \text {o r} \quad v \left(s _ {k}\right) = 0, \text {e l s e .} \tag {4}
103
+ $$
104
+
105
+ Pair-wise ranking. In addition, we evaluate how the given summarization $s_k$ is relatively informative to answer the question $q$ , among all summaries $S_K = \{s_k\}_{k=1}^K$ . To this end, we measure a ranking $r_k$ using a pair-wise ranking prompts (Qin et al., 2023; Sun et al., 2023):
106
+
107
+ $$
108
+ r \left(s _ {k}, S _ {K}\right) = \sum_ {i \neq k} ^ {K} r _ {\text {p a i r}} \left(s _ {k}, s _ {i}\right), r _ {\text {p a i r}} \left(s _ {k}, s _ {i}\right) = \left\{ \begin{array}{l l} 1, & \mathcal {M} \left(p _ {\text {r a n k}} \left(q, s _ {k}, s _ {i}\right)\right) = s _ {k} \\ 0, & \mathcal {M} \left(p _ {\text {r a n k}} \left(q, s _ {k}, s _ {i}\right)\right) = s _ {i} \\ 0. 5, & \text {e l s e} \end{array} , \right. \tag {5}
109
+ $$
110
+
111
+ where $p_{\mathrm{rank}}$ is a prompt to determine which is relatively more informative one to answer the question by comparing two summaries. To prevent the order bias of LLMs (Zhao et al., 2021), we query the same pair of summaries twice by changing their order at the prompt $p_{\mathrm{rank}}$ .
112
+
113
+ Finally, $\mathrm{SURE}$ makes a final prediction $\widehat{a}$ by incorporating both $v(s_{k})$ and $r(s_k,S_K)$ :
114
+
115
+ $$
116
+ \widehat {a} = \widetilde {y} _ {k ^ {*}}, k ^ {*} = \underset {k} {\arg \max } v \left(s _ {k}\right) + r \left(s _ {k}, S _ {K}\right), \tag {6}
117
+ $$
118
+
119
+ i.e., both validity and ranking scores are equally contributed. Algorithm 1 summarizes the formal procedure of SURE. We also highlight that the common prompts are shared across different datasets and LLMs, and the used prompts $p_{\mathrm{can}}$ , $p_{\mathrm{sum}}$ , $p_{\mathrm{val}}$ , $p_{\mathrm{rank}}$ are presented in Appendix A.
120
+
121
+ # 4 EXPERIMENTS
122
+
123
+ In this section, we design our experiments to investigate the following questions:
124
+
125
+ Does SuRE improve the accuracy of LLMs on various ODQA datasets? (Table 1)
126
+ - Is SURE generalizable across various retrieval methods and LLMs? (Table 2)
127
+ What is the effect of each component in SURE? (Table 3)
128
+ - Is SURE's summarization a good rationale for the answer? (Table 4 & Figure 4)
129
+
130
+ # 4.1 SETUPS
131
+
132
+ Evaluation datasets. For all experiments, we measure zero-shot QA accuracy with the four different ODQA datasets: (1) Natural Questions (NQ) (Kwiatkowski et al., 2019), (2) WebQuestions (WebQ) (Berant et al., 2013), (3) 2WikiMulti-hopQA (2Wiki) (Ho et al., 2020), and (4) HotpotQA (Yang et al., 2018). For NQ and WebQ, we use their original test splits and 21M English Wikipedia dump
133
+
134
+ Table 1: EM / F1 for different QA methods with ChatGPT on four QA datasets. $N = 10$ most relevant passages are retrieved using BM25, except no retrieval. The best and second best scores are highlighted in **bold** and **underline**, respectively.
135
+
136
+ <table><tr><td>Methods / Datasets</td><td>NQ</td><td>WebQ</td><td>2Wiki</td><td>HotpotQA</td><td>Average</td></tr><tr><td>No retrieval</td><td>27.6 / 39.0</td><td>25.0 / 38.8</td><td>21.4 / 24.8</td><td>22.2 / 31.9</td><td>24.1 / 33.6</td></tr><tr><td>Base</td><td>28.4 / 38.8</td><td>19.6 / 32.5</td><td>27.4 / 32.8</td><td>30.8 / 40.3</td><td>26.6 / 36.1</td></tr><tr><td>Rerank</td><td>24.8 / 33.9</td><td>18.8 / 30.6</td><td>23.0 / 28.4</td><td>27.8 / 37.4</td><td>23.6 / 32.6</td></tr><tr><td>RePlug</td><td>26.0 / 35.3</td><td>18.8 / 31.5</td><td>23.6 / 28.5</td><td>28.0 / 37.9</td><td>24.1 / 33.3</td></tr><tr><td>Selection-inference</td><td>24.3 / 32.8</td><td>17.3 / 28.6</td><td>22.6 / 29.5</td><td>30.8 / 39.6</td><td>23.8 / 32.6</td></tr><tr><td>Chain-of-thoughts</td><td>22.3 / 31.4</td><td>15.2 / 27.8</td><td>19.6 / 22.5</td><td>25.6 / 31.8</td><td>20.7 / 28.4</td></tr><tr><td>Self-verification</td><td>25.2 / 35.4</td><td>16.1 / 28.5</td><td>23.2 / 30.5</td><td>31.6 / 41.8</td><td>24.0 / 34.1</td></tr><tr><td>SURE (Ours)</td><td>33.5 / 42.3</td><td>25.1 / 36.6</td><td>32.8 / 38.1</td><td>33.2 / 43.4</td><td>31.2 / 40.1</td></tr></table>
137
+
138
+ (Karpukhin et al., 2020) as the source passages for the retrieval. For 2Wiki and HotpotQA, we use the subsampled splits released by Trivedi et al. (2023), along with the corresponding corpus for each data. For the experiments with LLaMA2-chat (Table 2) and more analyses (Section 4.3), we took 500 randomly subsampled examples of NQ and WebQ datasets for efficient experiments considering limited computing resources, and denoted these datasets $\mathrm{NQ^{*}}$ and $\mathrm{WebQ^{*}}$ , respectively. As evaluation metrics, we calculate the exact match (EM) and F1 score. The EM accuracy is the ratio of correct answers in the test dataset, where a given prediction is considered correct if it coincides with one of the gold answers. The F1 score measures the overlap between bags of tokens in the prediction and the gold answer. We normalize the predictions and answers (i.e., case-folded, and punctuation) to compute the metrics, following the implementation of Rajpurkar et al. (2016).
139
+
140
+ Baselines. We compare SURE with the following baselines. (1) No retrieval answers the question with LLMs without the retrieved passages (i.e., closed-book setup). (2) Base appends the retrieved passages as additional inputs of LLMs via prompting. (3) Line of works for better exploitation of retrieved passages with LLMs: Rerank (Lazaridou et al., 2022) and RePlug adopt an ensemble strategy that makes predictions based on each passage and then aggregates them with specific voting methods. Specifically, Rerank and RePlug utilize TF-IDF and sentence embedding from Contriever, respectively. (4) Adapt the works that incorporate intermediate reasoning steps for improved reasoning with LLMs, as summarizing could be viewed as a specific type of reasoning: Selection-inference (Creswell et al., 2023) measures the ranking of the passages, and conducts interactive answering by adding the passages one by one starting from higher ranked ones. Chain-of-thoughts (Kojima et al., 2022): we add zero-shot Chain-of-thoughts prompting (Wei et al., 2022) into the prompt of Base. Self-verification (Weng et al., 2022) generates answer candidates based on random sampling, then selects the most plausible one by verifying its reasoning with the question from conditional masking.
141
+
142
+ Implementation details. For the experiments, we use three recent state-of-the-art LLMs: ChatGPT (gpt-3.5-turbo-0301) (OpenAI, 2022), GPT-4 (gpt-4-0613) (OpenAI, 2023), and LLaMA2-chat-70B (Touvron et al., 2023b). We use a temperature of 0.0 when calling the API or greedy decoding for LLaMA, to remove the effect of random sampling (Sun et al., 2023). For the retrieval methods, we use three different approaches: BM25 (Robertson et al., 2009), DPR-multi (DPR) (Karpukhin et al., 2020), and Contriever (Izacard et al., 2022). We use the implementations in Elasticsearch for BM25, and BEIR for DPR and Contriever, respectively. In the case of SURE, we use the same prompts across the different datasets, and they are presented in Appendix A. Also, we use a fixed value of $K = 2$ during the experiments since we observe that the improvements by increasing $K$ are limited, as shown in Appendix B. When there are multiple candidates with equal plausibility (Eq. 6), then SURE selects the one generated earlier in Eq. 2.
143
+
144
+ # 4.2 MAIN RESULTS
145
+
146
+ Table 1 summarizes the experimental results on four different ODQA datasets, under ChatGPT with $N = 10$ retrieved passages using BM25. First, augmenting the retrieved passages with prompting is effective in improving ODQA accuracies of LLMs. For example, the average EM across four ODQA datasets is increased from 24.1 to 26.6. Somewhat surprisingly, we observe that Base outperforms
147
+
148
+ Table 2: EM with different configurations of LLMs and retrieval methods on four QA datasets. $N = 10$ most relevant passages are commonly retrieved. F1 scores are reported in Table 5. For LLaMA2-chat, we conducted experiments on $\mathrm{NQ^{*}}$ and WebQ\* and the results are indicated by \*.
149
+
150
+ <table><tr><td rowspan="2">Datasets</td><td colspan="6">ChatGPT</td><td colspan="2">GPT-4</td><td colspan="2">LLaMA2-chat</td></tr><tr><td>BM25</td><td>+SURE</td><td>DPR</td><td>+SURE</td><td>Contriever</td><td>+SURE</td><td>BM25</td><td>+SURE</td><td>BM25</td><td>+SURE</td></tr><tr><td>NQ</td><td>28.4</td><td>33.5</td><td>36.1</td><td>41.0</td><td>35.8</td><td>40.4</td><td>30.2</td><td>32.4</td><td>18.6*</td><td>30.4*</td></tr><tr><td>WebQ</td><td>19.6</td><td>25.1</td><td>23.2</td><td>27.3</td><td>22.5</td><td>28.7</td><td>21.5</td><td>21.7</td><td>16.0*</td><td>24.0*</td></tr><tr><td>2Wiki</td><td>27.4</td><td>32.8</td><td>19.2</td><td>21.4</td><td>27.2</td><td>32.6</td><td>34.8</td><td>38.2</td><td>20.2</td><td>27.8</td></tr><tr><td>HotpotQA</td><td>30.8</td><td>33.2</td><td>25.6</td><td>27.4</td><td>32.2</td><td>33.6</td><td>34.8</td><td>40.6</td><td>24.0</td><td>28.0</td></tr><tr><td>Average</td><td>26.6</td><td>31.2</td><td>26.0</td><td>29.3</td><td>29.4</td><td>33.8</td><td>30.3</td><td>33.2</td><td>19.7</td><td>27.6</td></tr></table>
151
+
152
+ Table 3: Ablation and more analyses. EM / F1 with ChatGPT are compared on four QA datasets. $N = 10$ most relevant passages are retrieved using BM25. The best scores are highlighted in bold.
153
+
154
+ <table><tr><td>Methods / Datasets</td><td>NQ*</td><td>WebQ*</td><td>2Wiki</td><td>HotpotQA</td><td>Average</td></tr><tr><td>Base</td><td>29.4 / 41.7</td><td>19.4 / 32.2</td><td>27.4 / 32.8</td><td>30.8 / 40.3</td><td>26.8 / 36.8</td></tr><tr><td>Conditional summarizations</td><td>30.4 / 40.9</td><td>20.8 / 33.5</td><td>29.2 / 34.5</td><td>33.0 / 43.4</td><td>28.4 / 38.1</td></tr><tr><td>+ Pair-wise ranking</td><td>30.6 / 41.2</td><td>21.6 / 34.8</td><td>31.0 / 36.0</td><td>30.6 / 40.7</td><td>28.5 / 38.2</td></tr><tr><td>+ Instance-wise validity (SURE)</td><td>35.6 / 44.9</td><td>23.2 / 36.5</td><td>32.8 / 38.1</td><td>33.2 / 43.4</td><td>31.2 / 40.7</td></tr><tr><td>MCQ prompt</td><td>35.2 / 45.3</td><td>22.4 / 35.1</td><td>30.4 / 36.1</td><td>31.0 / 41.5</td><td>29.8 / 39.5</td></tr><tr><td>Sum-and-pred (Gen)</td><td>26.4 / 37.8</td><td>19.8 / 32.6</td><td>25.6 / 32.3</td><td>33.8 / 43.3</td><td>27.3 / 37.1</td></tr></table>
155
+
156
+ other sophisticated baselines overall; this inefficiency of previous methods might be a result of a more challenging yet practical experimental setup. For example, we assume the zero-shot QA rather than few-shot setups, and also consider general black-box APIs for LLMs which do not provide the output probability. In contrast, one can observe that SURE successfully improves QA accuracy of LLMs by effectively exploiting the retrieved passages. In particular, SURE exhibits $4.6\% / 4.0\%$ absolute EM/F1 improvements in the average, compared to naively appending the retrieved passages.
157
+
158
+ We further demonstrate the compatibility of SURE across various LLMs and retrieval methods. Specifically, in addition to ChatGPT and BM25 considered in Table 1, we run experiments on three different LLMs (GPT-4, and LLaMA2-chat) and two different retrieval methods (DPR and Contriever). In Table 2, we compare EM metric of SURE with the baseline that simply appends the retrieved passages. Here, ODQA performance significantly depends on the retrieval methods and types of LLMs; for example, using Contriever instead of BM25 makes $2.8\%$ average EM improvements, and using GPT-4 instead of ChatGPT makes $3.7\%$ average EM improvements, respectively. Overall, one can observe that SURE consistently improves ODQA accuracy regardless of types of LLMs and retrieval methods, with $4.6\%$ average EM improvements. More interestingly, SURE successfully improves average EM scores of LLaMA2-chat as $7.9\%$ , a state-of-the-art open-sourced LLM, which further indicates the practical usefulness of SURE as a simple yet effective solution for ODQA for the open source research community. The F1 results are presented in Appendix B.1.
159
+
160
+ # 4.3 ADDITIONAL ANALYSES
161
+
162
+ In this section, we conduct additional analyses of SURE. We conduct experiments using ChatGPT as an LLM, BM25 as a retriever, $\mathrm{NQ}^*$ and WebQ\* as datasets.
163
+
164
+ Ablation and more analysis of SURE. First, we compare the following methods for the ablation of SURE: (1) Base: appends the retrieved passages to inputs, (2) + Conditional summarizations: additionally appends all the conditional summarizations, (3) + Pair-wise ranking: selects the summarization with only ranking (Eq. 4), and (4) + Instance-wise validity: selects the summarization with both ranking and validity, i.e., SURE. In addition, we consider two different methods to further analyze where the effectiveness of SURE comes from. (5) MCQ prompt: composes Multiple Choice Questions by generating the answer candidates via prompting (Eq. 2) and using them as possible choices for prediction by appending them to input prompt (Robinson et al., 2023) (more details in Appendix A.7), (6) Sum-and-pred (Gen): instead of conditional summarization, it generates generic summarization and predicts the answer based on it. We present the results in Table 3.
165
+
166
+ Table 4: Comparison as reranking method. EM / F1 with ChatGPT are compared on four QA datasets. A single most relevant passage is selected among $N = 10$ passages retrieved by BM25. The best scores are highlighted in bold.
167
+
168
+ <table><tr><td>Datasets / Methods</td><td>NQ*</td><td>WebQ*</td><td>2Wiki</td><td>HotpotQA</td><td>Average</td></tr><tr><td>BM25</td><td>12.6 / 18.8</td><td>9.0 / 17.6</td><td>14.8 / 18.1</td><td>21.8 / 28.3</td><td>14.6 / 20.7</td></tr><tr><td>Sent-encoder (q)</td><td>18.2 / 26.4</td><td>11.4 / 21.1</td><td>14.8 / 18.1</td><td>20.2 / 27.2</td><td>16.2 / 23.2</td></tr><tr><td>LLM-erank</td><td>20.0 / 28.4</td><td>14.2 / 24.4</td><td>18.2 / 21.3</td><td>26.0 / 34.4</td><td>19.6 / 27.1</td></tr><tr><td>Sent-encoder (Gen)</td><td>21.2 / 31.7</td><td>13.6 / 25.3</td><td>17.8 / 21.1</td><td>27.0 / 34.3</td><td>19.9 / 28.1</td></tr><tr><td>Sent-encoder (SURE)</td><td>23.2 / 32.5</td><td>15.4 / 28.0</td><td>18.0 / 21.5</td><td>28.8 / 36.7</td><td>21.4 / 29.7</td></tr></table>
169
+
170
+ ![](images/75ffb05d2fc837783faa6cca92ad5336430ad8a7db395774eb5425880918a119.jpg)
171
+ (a) Different number of retrieval
172
+
173
+ ![](images/634ac9cc4e477b1ff0ab72e8878941b9b8a625ba9678ce6f662eb93cea7cd775.jpg)
174
+ (b) GPT-4 evaluation
175
+ Figure 4: (a) EM with different numbers of retrieved passages $(N)$ under ChatGPT and BM25. (b) Comparison between SURE's summarization and generic summarization via GPT-4 evaluation (Liu et al., 2023c). (c) Human preference between SURE's summarization and generic summarization on 84 samples of $\mathrm{NQ^{*}}$ , along with GPT-4 evaluation. More results are in Appendix C.
176
+
177
+ ![](images/00cfa1aa16c6f12d7f8288a18d741c1ae9bc0a5fedc61c6dfc5c65913a07510e.jpg)
178
+ (c) Human preference
179
+
180
+ First, constructing conditional summarizations improves performance as they can extract specialized contexts for a given question and its answer candidates. Next, incorporating the evaluation on the instance-wise validity of each summarization significantly improves the performance compared to only considering the ranking among summarizations, as it enables more precise selection by adding the assessment regarding the relevance and coherence of the summarization in relation to the given question and prediction pair. Also, a simple aggregation of generated answer candidates in the prompt shows improvement, which indicates the effectiveness of our generated candidates. However, this method becomes inefficient when the given question requires more complex reasoning to answer. Lastly, using generic summarization is effective in improving ODQA with LLMs by providing concentrated and brief contexts and addressing the difficulty from the long context (Liu et al., 2023b). However, the gain is significantly limited compared to SURE, which demonstrates that the key components of SURE are conditional summarization and comparison, rather than simply providing compressed contexts.
181
+
182
+ Different number of retrieval. Next, we investigate the effect of the number of retrieved passages $(N)$ . Increasing $N$ is one of the most intuitive ways to improve the performance of retrieve-and-read system by providing more extensive information (Karpukhin et al., 2020), and hence it is natural to expect that similar positive results could be observed with retrieval-augmented LLMs. However, on the other hand, its effectiveness could be limited as LLMs could fail to handle long input contexts (Liu et al., 2023b). To verify the effect of different $N$ on retrieval-augmented LLMs using prompting, we measure EM of ChatGPT and BM25 with varied $N$ . In Figure 4(a), we present the results of Base and SURE on $\mathrm{NQ}^*$ and WebQ*. First, we observe that the accuracy of retrieval-augmented LLMs significantly depends on $N$ ; when a small number of retrieved passages is only available, the performance of Base could be even behind the performance without retrieval, as it restricts the prediction within the limited contexts. As $N$ increases, its performance is increased and takes benefit from the retrieval system. With SURE, the accuracy of LLMs could be improved even with the small number of retrievals $(N = 5)$ , and it achieves better accuracy with larger $N$ .
183
+
184
+ Effectiveness for finding important passages. In previous experiments, we mainly focus on demonstrating the effectiveness of SURE for improving QA accuracy. While the accurate answer is the most important feature of the QA system, providing the proper rationale for the answer is another important feature, especially in LLM-based systems for reliable usage by users such as search engines. One of the standard approaches for this is explicitly enumerating the most relevant
185
+
186
+ ![](images/6e8bd1cecd6238e954b3d9665ad1f402c8047366313613ce84356eb45137545b.jpg)
187
+ Figure 5: Qualitative comparison of candidate-conditioned summarization from SURE (Ours) compared to generic summarization as a rationale for the answer. More examples are in Appendix B.
188
+
189
+ retrieved passages based on the specific scoring method, which is often called Re-ranking (Nguyen et al., 2016; Izacard et al., 2023). To explore the advantages of SURE in this aspect, we measure QA accuracy of ChatGPT augmented with the one passage considered to be most relevant with a specific reranking method within $N = 10$ originally retrieved passages with BM25. To extract such a reranking method for SURE, we use the cosine similarity between the sentence embeddings (Reimers & Gurevych, 2019) of the generated summarization and the retrieved passages, denoted by Sent-encoder (SURE). Then, we compare it with the following baselines for reranking: (1) BM25: original retrieval score, i.e., no reranking, (2) Sent-encoder $(q)$ : sentence-encoder-based reranking using the similarity between retrieved passages and question (Nguyen et al., 2016), (3) LLM-rerank: LLM-based reranking (Sun et al., 2023), and (4) Sent-encoder (Gen): sentence-encoder-based reranking using the similarity between retrieved passages and generic summarization. The results are presented in Table 4. Here, we observe that all the reranking methods are effective compared to no reranking. In addition, LLM-based reranking shows a higher accuracy, while SURE's similarity-based reranking outperforms all the baselines, demonstrating the superiority of SURE.
190
+
191
+ Qualitative evaluation as rationale to answer. Lastly, we explore the additional benefits of SURE, which offers rationales to support the prediction. Specifically, we compare the summarization from SURE with the generic summarization, which is also generated by LLMs but with no constraint of supporting specific answer candidates. To separately consider the quality as rationale with the accuracy of prediction, we only compare the samples correctly predicted by both SURE and Generic summarization used in Table 3; for example, it results in 84 remaining samples in the case of $\mathrm{NQ^{*}}$ . We first evaluate using GPT-4, which has been demonstrated to have a high correlation with humans (Liu et al., 2023c). We present the results in Figure 4(b). Here, one can observe that the summarization via SURE is more preferred by GPT-4; for example, Generic summarization wins $30.3\%$ while SURE wins $37.4\%$ on average. It is also worth noting that the average length of both summarizations is similar (Generic: 600 vs SURE's: 570 average characters on NQ), therefore the bias of GPT to prefer the longer response (Wang et al., 2023) might limitedly affect the result. Next, we ask human evaluators which summarization is more informative and plausible to support the given question-answer pair on 84 samples of $\mathrm{NQ^{*}}$ . This result is presented in Figure 4(c). Here, we also observe a higher preference for SURE's summarization (Generic: $26.9\%$ vs SURE: $43.4\%$ ). Overall, these results reveal the potential of SURE toward a better ODQA system by providing a high-quality rationale for the answer. Details on human evaluations are presented in Appendix C.
192
+
193
+ # 5 CONCLUSION
194
+
195
+ In this paper, we proposed SURE, a simple yet effective framework to improve ODQA accuracy of LLMs. Our key idea is to ensure the correctness of predicted answers by constructing the summaries of the retrieved passages for the potential answer candidates and evaluating their validity and ranking. Our experiments demonstrate that SURE significantly improves ODQA performance of various retrieval-augmented LLMs, and also has additional advantages for measuring the importance of passages and providing the rationale for prediction. From these advantages, we believe our framework can contribute to various real-world applications and provide a better experience to users.
196
+
197
+ # ETHICS STATEMENT
198
+
199
+ We strongly believe that SURE can provide a strong positive impact in real-world applications related to QA, e.g., search engines or chatbots. Since SURE can provide the summarization that supports the corresponding prediction specifically, it can significantly improve the explainability (Mao et al., 2022) and reliability (Whitehead et al., 2022) of QA systems which are more important when they are constructed using black-box LLMs. Moreover, considering the success of LLMs in various applications more than QA (Izacard et al., 2023; Nam et al., 2023), we expect the advantages of this framework to better exploit the retrieved passages with LLMs will be beneficial to them.
200
+
201
+ In contrast, there also exists some potential negative impacts when developing a system with the multiple usages of LLMs, as it could be costly (Chen et al., 2023) and generate sensitive (Santurkar et al., 2023) and malicious (Deshpande et al., 2023) text outputs. Since the summarization from SURE is constructed based on the provided passages, one should consider their quality to prevent undesirable outputs. On the other hand, incorporating the additional filtering could be a strong solution (Le Bras et al., 2020; Schick et al., 2021). To reduce the cost, substituting specific steps of SURE, e.g., measuring validity, with trainable small LMs could be an effective way, similar to Yang et al. (2020); Lewis et al. (2021); Li et al. (2023).
202
+
203
+ # REPRODUCIBILITY STATEMENT
204
+
205
+ We provide implementation details (e.g., design of prompts, used APIs, and retrieval methods) and experiment setups (e.g., datasets and metrics) in Section 4 and Appendix A. In addition, we will release source codes near future.
206
+
207
+ # ACKNOWLEDGMENTS
208
+
209
+ This work was mainly supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.2021-0-02068, Artificial Intelligence Innovation Hub; No.2019-0-00075, Artificial Intelligence Graduate School Program (KAIST)). This work was partly supported by KAIST-NAVER Hypercreative AI Center.
210
+
211
+ # REFERENCES
212
+
213
+ Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. Semantic parsing on freebase from question-answer pairs. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2013.
214
+ Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, et al. Improving language models by retrieving from trillions of tokens. In Proceedings of the International Conference on Machine Learning (ICML). PMLR, 2022.
215
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
216
+ Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer open-domain questions. In Annual Meeting of the Association for Computational Linguistics (ACL), 2017.
217
+ Lingjiao Chen, Matei Zaharia, and James Zou. Frugalgpt: How to use large language models while reducing cost and improving performance. arXiv preprint arXiv:2305.05176, 2023.
218
+ Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
219
+
220
+ Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022.
221
+ Gobinda G Chowdhury. Introduction to modern information retrieval. Facet publishing, 2010.
222
+ Yung-Sung Chuang, Wei Fang, Shang-Wen Li, Wen-tau Yih, and James Glass. Expand, rerank, and retrieve: Query reranking for open-domain question answering. In *Findings of the Association for Computational Linguistics (ACL)*, 2023.
223
+ Antonia Creswell, Murray Shanahan, and Irina Higgins. Selection-inference: Exploiting large language models for interpretable logical reasoning. In International Conference on Learning Representations (ICLR), 2023.
224
+ Ameet Deshpande, Vishvak Murahari, Tanmay Rajpurohit, Ashwin Kalyan, and Karthik Narasimhan. Toxicity in chatgpt: Analyzing persona-assigned language models. arXiv preprint arXiv:2304.05335, 2023.
225
+ Nan Du, Yanping Huang, Andrew M Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan First, et al. Glam: Efficient scaling of language models with mixture-of-experts. In Proceedings of the International Conference on Machine Learning (ICML), 2022.
226
+ Bradley Efron and Robert J Tibshirani. An introduction to the bootstrap. CRC press, 1994.
227
+ Tianyu Gao, Howard Yen, Jiatong Yu, and Danqi Chen. Enabling large language models to generate text with citations. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
228
+ John Giorgi, Luca Soldaini, Bo Wang, Gary Bader, Kyle Lo, Lucy Lu Wang, and Arman Cohan. Open domain multi-document summarization: A comprehensive study of model brittleness under retrieval. In *Findings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)*, 2023.
229
+ Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. Retrieval augmented language model pre-training. In International conference on machine learning, pp. 3929-3938. PMLR, 2020.
230
+ Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. In International Conference on Learning Representations (ICLR), 2021.
231
+ Xanh Ho, Anh-Khoa Duong Nguyen, Saku Sugawara, and Akiko Aizawa. Constructing a multi-hop qa dataset for comprehensive evaluation of reasoning steps. arXiv preprint arXiv:2011.01060, 2020.
232
+ Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. Unsupervised dense information retrieval with contrastive learning. In Transactions on Machine Learning Research (TMLR), 2022.
233
+ Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. Few-shot learning with retrieval augmented language models. In Journal of Machine Learning Research (JMLR), 2023.
234
+ Ehsan Kamalloo, Nouha Dziri, Charles LA Clarke, and Davood Rafiei. Evaluating open-domain question answering in the era of large language models. In Annual Meeting of the Association for Computational Linguistics (ACL), 2023.
235
+ Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020.
236
+
237
+ Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2019.
238
+ Omar Khattab, Christopher Potts, and Matei Zaharia. Baleen: Robust multi-hop reasoning at scale via condensed retrieval. In Advances in Neural Information Processing Systems (NeurIPS), 2021.
239
+ Boseop Kim, HyoungSeok Kim, Sang-Woo Lee, Gichang Lee, Donghyun Kwak, Jeon Dong Hyeon, Sunghyun Park, Sungju Kim, Seonhoon Kim, Dongpil Seo, et al. What changes can large-scale language models bring? intensive study on hyperclova: Billions-scale korean generative pretrained transformers. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2021.
240
+ Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
241
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453-466, 2019.
242
+ Angeliki Lazaridou, Elena Gribovskaya, Wojciech Stokowiec, and Nikolai Grigorev. Internet-augmented language models through few-shot prompting for open-domain question answering. arXiv preprint arXiv:2203.05115, 2022.
243
+ Ronan Le Bras, Swabha Swayamdipta, Chandra Bhagavatula, Rowan Zellers, Matthew Peters, Ashish Sabharwal, and Yejin Choi. Adversarial filters of dataset biases. In Proceedings of the International Conference on Machine Learning (ICML), 2020.
244
+ Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. Latent retrieval for weakly supervised open domain question answering. In Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
245
+ Patrick Lewis, Yuxiang Wu, Linqing Liu, Pasquale Minervini, Heinrich Kuttler, Aleksandra Piktus, Pontus Stenetorp, and Sebastian Riedel. Paq: 65 million probably-asked questions and what you can do with them. Transactions of the Association for Computational Linguistics, 9:1098-1115, 2021.
246
+ Lianian Harold Li, Jack Hessel, Youngjae Yu, Xiang Ren, Kai-Wei Chang, and Yejin Choi. Symbolic chain-of-thought distillation: Small models can also" think" step-by-step. In Annual Meeting of the Association for Computational Linguistics (ACL), 2023.
247
+ Jiongnnan Liu, Jiajie Jin, Zihan Wang, Jiehan Cheng, Zhicheng Dou, and Ji-Rong Wen. Reta-llm: A retrieval-augmented large language model toolkit. arXiv preprint arXiv:2306.05212, 2023a.
248
+ Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. arXiv preprint arXiv:2307.03172, 2023b.
249
+ Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. Gpteval: Nlg evaluation using gpt-4 with better human alignment. arXiv preprint arXiv:2303.16634, 2023c.
250
+ Jianguo Mao, Wenbin Jiang, Xiangdong Wang, Hong Liu, Yu Xia, Yajuan Lyu, and Qiaoqiao She. Explainable question answering based on semantic graph by global differentiable learning and dynamic adaptive reasoning. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
251
+ Yuning Mao, Pengcheng He, Xiaodong Liu, Yelong Shen, Jianfeng Gao, Jiawei Han, and Weizhu Chen. Reader-guided passage reranking for open-domain question answering. In *Findings of the Association for Computational Linguistics (ACL)*, 2021.
252
+
253
+ Grégoire Mialon, Roberto Dessi, Maria Lomeli, Christoforos Nalmantis, Ram Pasunuru, Roberta Raileanu, Baptiste Rozière, Timo Schick, Jane Dwivedi-Yu, Asli Celikyilmaz, et al. Augmented language models: a survey. In Transactions on Machine Learning Research (TMLR), 2023.
254
+ Sewon Min, Weijia Shi, Mike Lewis, Xilun Chen, Wen-tau Yih, Hannaneh Hajishirzi, and Luke Zettlemoyer. Nonparametric masked language modeling. arXiv preprint arXiv:2212.01349, 2022.
255
+ Sebastian Nagel. Common crawl news dataset. https://data(commoncrawl.org/crawl-data/CC-NEWS/index.htm1, 2016.
256
+ Jaehyun Nam, Woomin Song, Seong Hyeon Park, Jihoon Tack, Sukmin Yun, Jaehyung Kim, and Jinwoo Shin. Semi-supervised tabular classification via in-context learning of large language models. In Workshop on Efficient Systems for Foundation Models@ ICML2023, 2023.
257
+ Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. Ms marco: A human-generated machine reading comprehension dataset. arXiv preprint arXiv:1611.09268, 2016.
258
+ Jianmo Ni, Chen Qu, Jing Lu, Zhuyun Dai, Gustavo Hernández Ábrego, Ji Ma, Vincent Y Zhao, Yi Luan, Keith B Hall, Ming-Wei Chang, et al. Large dual encoders are generalizable retrievers. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
259
+ OpenAI. Introducing chatgpt. https://openai.com/blog/chatgpt, 2022.
260
+ OpenAI. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
261
+ Krishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun, Sean Welleck, Yejin Choi, and Zaid Harchaoui. Mauve: Measuring the gap between neural text and human text using divergence frontiers. In Advances in Neural Information Processing Systems (NeurIPS), 2021.
262
+ Zhen Qin, Rolf Jagerman, Kai Hui, Honglei Zhuang, Junru Wu, Jiaming Shen, Tianqi Liu, Jialu Liu, Donald Metzler, Xuanhui Wang, et al. Large language models are effective text rankers with pairwise ranking prompting. arXiv preprint arXiv:2306.17563, 2023.
263
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research (JMLR), 2020.
264
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100,000+ questions for machine comprehension of text. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2016.
265
+ Nils Reimers and Iryna Gurevych. Sentence-bert: Sentence embeddings using siamese bert-networks. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2019.
266
+ Stephen Robertson, Hugo Zaragoza, et al. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3(4):333-389, 2009.
267
+ Joshua Robinson, Christopher Michael Ryting, and David Wingate. Leveraging large language models for multiple choice question answering. In International Conference on Learning Representations (ICLR), 2023.
268
+ Shibani Santurkar, Esin Durmus, Faisal Ladhak, Cinoo Lee, Percy Liang, and Tatsunori Hashimoto. Whose opinions do language models reflect? In Proceedings of the International Conference on Machine Learning (ICML), 2023.
269
+ Timo Schick, Sahana Udupa, and Hinrich Schütze. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in nlp. Transactions of the Association for Computational Linguistics, 9:1408-1424, 2021.
270
+ Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Rich James, Mike Lewis, Luke Zettle-moyer, and Wen-tau Yih. Replug: Retrieval-augmented black-box language models. arXiv preprint arXiv:2301.12652, 2023.
271
+
272
+ Chenglei Si, Zhe Gan, Zhengyuan Yang, Shuohang Wang, Jianfeng Wang, Jordan Boyd-Graber, and Lijuan Wang. Prompting gpt-3 to be reliable. In International Conference on Learning Representations (ICLR), 2023.
273
+ Ivan Stelmakh, Yi Luan, Bhuwan Dhingra, and Ming-Wei Chang. Asqa: Factoid questions meet long-form answers. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
274
+ Dan Su, Xiaoguang Li, Jindi Zhang, Lifeng Shang, Xin Jiang, Qun Liu, and Pascale Fung. Read before generate! faithful long form question answering with machine reading. In *Findings of the Association for Computational Linguistics (ACL)*, 2022a.
275
+ Yixuan Su, Tian Lan, Yan Wang, Dani Yogatama, Lingpeng Kong, and Nigel Collier. A contrastive framework for neural text generation. In Advances in Neural Information Processing Systems (NeurIPS), 2022b.
276
+ Weiwei Sun, Lingyong Yan, Xinyu Ma, Pengjie Ren, Dawei Yin, and Zhaochun Ren. Is chatgpt good at search? investigating large language models as re-ranking agent. arXiv preprint arXiv:2304.09542, 2023.
277
+ Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023a.
278
+ Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023b.
279
+ Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. Interleaving retrieval with chain-of-thought reasoning for knowledge-intensive multi-step questions. In Annual Meeting of the Association for Computational Linguistics (ACL), 2023.
280
+ Ellen M Voorhees et al. The trec-8 question answering track report. In Trec, volume 99, pp. 77-82, 1999.
281
+ Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Raghavi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. How far can camels go? exploring the state of instruction tuning on open resources. arXiv preprint arXiv:2306.04751, 2023.
282
+ Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
283
+ Sean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan, Kyunghyun Cho, and Jason Weston. Neural text generation with unlikelihood training. In International Conference on Learning Representations (ICLR), 2020.
284
+ Yixuan Weng, Minjun Zhu, Shizhu He, Kang Liu, and Jun Zhao. Large language models are reasoners with self-verification. arXiv preprint arXiv:2212.09561, 2022.
285
+ Spencer Whitehead, Suzanne Petryk, Vedaad Shakib, Joseph Gonzalez, Trevor Darrell, Anna Rohrbach, and Marcus Rohrbach. Reliable visual question answering: Abstain rather than answer incorrectly. In International Conference on Computer Vision (ICCV), 2022.
286
+ Dao Xuan-Quy, Le Ngoc-Bich, Phan Xuan-Dung, Ngo Bac-Bien, and Vo The-Duy. Evaluation of chatgpt and microsoft bing ai chat performances on physics exams of vietnamese national high school graduation examination. arXiv preprint arXiv:2306.04538, 2023.
287
+ Yiben Yang, Chaitanya Malaviya, Jared Fernandez, Swabha Swayamdipta, Ronan Le Bras, Ji-Ping Wang, Chandra Bhagavatula, Yejin Choi, and Doug Downey. Generative data augmentation for commonsense reasoning. arXiv preprint arXiv:2004.11546, 2020.
288
+
289
+ Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2018.
290
+ Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. Calibrate before use: Improving few-shot performance of language models. In Proceedings of the International Conference on Machine Learning (ICML), 2021.
291
+ Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In European Conference on Computer Vision (ECCV), 2015.
292
+
293
+ # A DESIGNED PROMPTS FOR EXPERIMENTS
294
+
295
+ In this section, we present the specific prompts used for the experiments in Section 4.
296
+
297
+ # A.1 ANSWER CANDIDATES GENERATION
298
+
299
+ In Listing 1, we present the prompt $p_{\mathrm{can}}$ which is used to generate $K$ answer candidates $\widetilde{\mathbf{y}} = [\widetilde{y}_1,\dots ,\widetilde{y}_K]$ from the given question and $N$ retrieved passages (Eq. 2). Here, we present the case of $K = 2$ .
300
+
301
+ Listing 1 Prompt for answer candidates generation.
302
+ ```txt
303
+ f' Below are N passages related to the question at the end. After reading $\leftrightarrow$ the passages, provide two correct candidates for the answer to the $\leftrightarrow$ question at the end. Each answer should be in the form: (a) xx, (b) $\leftrightarrow$ yy, and should not exceed 3 words for each candidate. Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Question: {Question} Answer:
304
+ ```
305
+
306
+ # A.2 CONDITIONAL SUMMARIZATION
307
+
308
+ In Listing 2, we present the prompt $p_{\mathrm{sum}}$ which is used to generate conditional summarization $s_k$ of retrieved passages to validate each candidate $\widetilde{y}_k$ as an answer to the question (Eq. 3).
309
+
310
+ Listing 2 Prompt for conditional summarization.
311
+ ```python
312
+ f'' Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} ... Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Your job is to act as a professional writer. You will write a $\nrightarrow$ good-quality passage that can support the given prediction about the $\nrightarrow$ question only based on the information in the provided supporting $\nrightarrow$ passages. Now, let's start. After you write, please write [DONE] to indicate you $\nrightarrow$ are done. Do not write a prefix (e.g., "Response:") while writing a $\nrightarrow$ passage. Question: {Question} Choices: {(a) Choice 1 (b) Choice 2} Prediction: {(a) Choice 1 (or (b) Choice 2)} Passage:
313
+ ```
314
+
315
+ # A.3INSTANCE-WISE VALIDATION
316
+
317
+ In Listing 3, we present the prompt $p_{\mathrm{val}}$ which is used to evaluate the validity of each summarization $s_k$ whether it is not a degenerated case as the provided passages are not enough to support $\widetilde{y}_k$ , or it properly supports the given answer candidate $\widetilde{y}_k$ , rather than the other candidate $\widetilde{y}_i$ , $i \neq k$ (Eq. 4).
318
+
319
+ Listing 3 Prompt for instance-wise validation.
320
+ ```txt
321
+ f''
322
+ Question: {Question}
323
+ Prediction: {Prediction}
324
+ Passage: {Passage}
325
+ Does the passage correctly support the prediction? Choices: [True, $\leftrightarrow$ False]. Answer:
326
+ ```
327
+
328
+ # A.4 PAIR-WISE RANKING
329
+
330
+ In Listing 4, we present the prompt $p_{\mathrm{rank}}$ which is used to evaluate how the given summarization $s_k$ is relatively informative to answer the question $q$ , among all summaries $S_K = \{s_k\}_{k=1}^K$ (Eq. 5).
331
+
332
+ Listing 4 Prompt for pair-wise ranking.
333
+ ```txt
334
+ f'
335
+ Question: Given the following passages, determine which one provides a $\leftrightarrow$ more informative answer to the subsequent question.
336
+ Passage 1: {Passage 1}
337
+ Passage 2: {Passage 2}
338
+ Target Question: {Question}
339
+ Your Task:
340
+ Identify which passage (Passage 1 or Passage 2) is more relevant and $\leftrightarrow$ informative to answer the question at hand. Choices: [Passage 1, $\leftrightarrow$ Passage 2].
341
+ Answer:
342
+ ```
343
+
344
+ # A.5 BASELINE PREDICTION
345
+
346
+ In Listing 5, we present the prompt that is used to append the retrieved passages of the question to give it as inputs of LLMs. The result with this prompt is denoted by Base, in Section 4. The same prompt is used for no retrieval by assuming $N = 0$ , i.e., the only question is given to LLMs with instruction.
347
+
348
+ Listing 5 Prompt for baseline prediction.
349
+ ```txt
350
+ f'' Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Task description: predict the answer to the following question. Do not $\rightarrow$ exceed 3 words. Question: {Question} Answer:
351
+ ```
352
+
353
+ # A.6 PROMPTS FOR GENERAL SUMMARIZATION
354
+
355
+ In Listing 6, we present the prompt that is used to construct generic summarization used in Section 4.3. One can observe that the conditioning part is removed, compared to $p_{\mathrm{sum}}$ .
356
+
357
+ Listing 6 Prompt for generic summarization.
358
+ ```txt
359
+ f'' Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} ... Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Your job is to act as a professional writer. You will write a $\nrightarrow$ good-quality passage that can support the prediction about the $\nrightarrow$ question only based on the information in the provided supporting $\nrightarrow$ passages. Now, let's start. After you write, please write [DONE] to indicate you $\nrightarrow$ are done. Do not write a prefix (e.g., "Response:") while writing a $\nrightarrow$ passage. Question: {Question} Passage:
360
+ ```
361
+
362
+ # A.7 PROMPTS FOR MCQ PROMPT
363
+
364
+ Recently, Robinson et al. (2023) demonstrated that multiple-choice prompts generally elicit much more accurate responses than do cloze prompts, for LLMs with high multiple-choice symbol bind
365
+
366
+ ing ability like OpenAI Codex (Chen et al., 2021). Motivated by this, we consider MCQ prompt in Listing 7 and use it in Table 3, to evaluate the effectiveness of selecting the answer from the construction and verification of the conditional summarizations rather than direct prompting, under the same answer candidates from Eq. 2. One can observe that the conditioning with multiple choices part is added, compared to baseline prompting in Listing 5.
367
+
368
+ Listing 7 Prompt for MCQ prompt.
369
+ ```javascript
370
+ f'' Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Task description: predict the answer to the following question. Do not $\leftrightarrow$ exceed 3 words. Question: {Question} Choices: {(a) Choice 1 (b) Choice 2} Answer:
371
+ ```
372
+
373
+ # A.8 DESIGN PRINCIPLES FOR PROMPT
374
+
375
+ Before finalizing the prompts used in the experiments, we examined several prompt designs and chose the best-performing one. Here, we'd like to share two key observations from this process. First, precise and detailed instructions are crucial. As each component of the proposed framework operates in a zero-shot manner, its output greatly relies on the provided instruction. For example, in answer candidate generation (Eq. 2), the current prompt, outlined in Listing 1, consistently outperforms the initially considered simple prompt (Task description: give two candidates for the answer to the following question (e.g., (a) xx, (b) yy)). Second, proper input arguments are essential. For instance, along with the target candidate, providing all candidates as additional input enhanced the quality of conditional summarization. This is because it further specifies which contexts of retrieval should be the focus. However, including this information, or even the retrieval passages, disrupted the verification step by interrupting the focus on the summarizations.
376
+
377
+ # B ADDITIONAL QUANTITATIVE RESULTS
378
+
379
+ # B.1 MORE RESULTS FOR SURE UNDER DIFFERENT CONFIGURATIONS
380
+
381
+ In Table 5, we present F1 scores with different configurations of various LLMs and retrieval methods. Similar to the result in Table 2, it is observed that SURE consistently improves ODQA accuracy regardless of types of LLMs and retrieval methods, with $3.2\%$ average F1 improvement on average.
382
+
383
+ # B.2 LIMITED ACHIEVABLE IMPROVEMENT WITH MORE CANDIDATES
384
+
385
+ As we denoted in Section 4.1, we use a fixed value of $K = 2$ for all the experiments. This is due to our initial observation that the room for improvement by increasing $K$ is not large compared to the additional costs. To investigate this, we first assume the method, denoted Oracle, which takes the maximum of EM and F1 among the multiple candidates, e.g., if one candidate is true and the other is wrong, then Oracle consider it as true. As one can see in Table 6, increasing $K = 3$ from $K = 2$ limitedly improves the accuracy (e.g., $0.9\%$ in EM), compared to the remaining room for improvement by better selection with small $K$ ; for example, there is $9.0\%$ gap between SURE and Oracle, in terms of EM. Therefore, in this work, we keep $K = 2$ but we remark that SURE can be
386
+
387
+ Table 5: F1 with different configurations of LLMs and retrieval methods on four QA datasets. $N = 10$ most relevant passages are commonly retrieved. For LLaMA2-chat, we conducted experiments on $\mathrm{NQ}^*$ and $\mathrm{WebQ}^*$ and the results are indicated by $^*$ .
388
+
389
+ <table><tr><td rowspan="2">Datasets</td><td colspan="6">ChatGPT</td><td colspan="2">GPT-4</td><td colspan="2">LLaMA2-chat</td></tr><tr><td>BM25</td><td>+SURE</td><td>DPR</td><td>+SURE</td><td>Contriever</td><td>+SURE</td><td>BM25</td><td>+SURE</td><td>BM25</td><td>+SURE</td></tr><tr><td>NQ</td><td>38.8</td><td>42.3</td><td>47.4</td><td>50.8</td><td>47.6</td><td>50.4</td><td>40.9</td><td>42.4</td><td>36.4*</td><td>42.9*</td></tr><tr><td>WebQ</td><td>32.6</td><td>36.6</td><td>37.5</td><td>40.4</td><td>37.7</td><td>40.9</td><td>36.4</td><td>32.1</td><td>35.3*</td><td>40.5*</td></tr><tr><td>2Wiki</td><td>32.8</td><td>38.1</td><td>22.8</td><td>25.2</td><td>32.9</td><td>37.1</td><td>39.2</td><td>43.2</td><td>31.2</td><td>36.2</td></tr><tr><td>HotpotQA</td><td>40.3</td><td>43.4</td><td>34.6</td><td>35.5</td><td>42.9</td><td>43.5</td><td>44.4</td><td>50.4</td><td>39.6</td><td>38.4</td></tr><tr><td>Average</td><td>36.1</td><td>40.1</td><td>35.6</td><td>38.0</td><td>40.3</td><td>43.0</td><td>40.2</td><td>42.0</td><td>35.6</td><td>39.5</td></tr></table>
390
+
391
+ Table 6: EM / F1 with different $K$ under ChatGPT. $N = {10}$ most relevant passages are commonly retrieved with BM25.
392
+
393
+ <table><tr><td>Datasets / Methods</td><td>NQ*</td><td>WebQ*</td><td>2Wiki</td><td>HotpotQA</td><td>Average</td></tr><tr><td>No retrieval</td><td>26.4 / 37.9</td><td>20.4 / 36.7</td><td>21.4 / 24.8</td><td>23.2 / 34.8</td><td>22.9 / 33.6</td></tr><tr><td>Base</td><td>29.4 / 41.7</td><td>19.4 / 32.2</td><td>27.4 / 32.8</td><td>30.8 / 40.3</td><td>27.0 / 36.9</td></tr><tr><td>Oracle (K=2)</td><td>43.0 / 53.9</td><td>29.0 / 43.9</td><td>47.6 / 54.4</td><td>41.2 / 52.7</td><td>40.2 / 51.2</td></tr><tr><td>Oracle (K=3)</td><td>45.2 / 56.0</td><td>29.8 / 47.2</td><td>48.4 / 56.2</td><td>41.0 / 54.0</td><td>41.1 / 53.4</td></tr></table>
394
+
395
+ extended with $K > 2$ . Also, as there is remaining room for improvement, we hope that future work could reduce such a gap.
396
+
397
+ # B.3 ADDITIONAL EVALUATION WITH LLMS
398
+
399
+ In Section 4, we considered EM/F1 scores as the common metrics for the considered ODQA datasets, following the previous works (Chowdhery et al., 2022; Touvron et al., 2023a; Izacard et al., 2023; Shi et al., 2023), to make it easy to notice the significance of our results. Nevertheless, other factors like response coherence, relevance, and efficiency are important metrics to be considered.
400
+
401
+ To evaluate these aspects, we have conducted additional evaluations with LLMs approaches. Specifically, we measured two additional metrics: (1) MAUVE (Pillutla et al., 2021) and (2) LLM-acc (Kamalloo et al., 2023). MAUVE is a recently proposed metric to compare the two distributions of the text generation model and human-written text using divergence frontiers. MAUVE (scale of 0 to 100, higher is better) is known for correlating highly with human judgments, and is frequently used to evaluate LMs' responses (Su et al., 2022b; Gao et al., 2023). LLM-acc assesses the accuracy (\%) of LLMs' responses to questions, using the prompting of LLMs instead of term overlap like EM/F1. We used the official code from the authors, only changing LLMs to ChatGPT. We measured this metric on $\mathrm{NQ}^*$ , WebQ*, 2Wiki, and HotpotQA datasets, and the results are presented in Table 7.
402
+
403
+ Here, it is observed that the proposed method also makes significant improvements compared to the baseline under these two additional evaluations with LLMs approaches. Along with the results in Section 4, this result further validates that our framework enables LLMs to provide better answers to the given question.
404
+
405
+ # B.4 EXPERIMENTS ON LONG-FORM QUESTION ANSWERING
406
+
407
+ While we mainly conduct the experiments with QA datasets that have short answers in Section 4, our approach has the potential to be applicable beyond short-answer datasets. To verify this, we have conducted additional experiments on long-form question answering tasks to validate our approach's applicability. Specifically, we used ASQA dataset (Stelmakh et al., 2022; Gao et al., 2023) which consists of factoid questions and the corresponding long-form answers; for example, the answers of ASQA dataset have an average length of 71.8 words, while the answers of NQ dataset have 2.6 words. Following the setups in Gao et al. (2023), we compared the base prompting method with retrieval and name (ours) on 948 test examples, using ChatGPT (GPT-3.5-turbo-0301) with 5 retrieved passages via GTR (Ni et al., 2022) for the experiments. For the evaluation, we measure
408
+
409
+ Table 7: MAUVE (Pillutla et al., 2021) and LLM-evaluated accuracy (Kamalloo et al., 2023). We use ChatGPT and $N = 10$ most relevant passages are commonly retrieved with BM25.
410
+
411
+ <table><tr><td>MAUVE / LLM-acc</td><td>NQ*</td><td>WebQ*</td><td>2Wiki</td><td>HotpotQA</td><td>Average</td></tr><tr><td>Base</td><td>81.3 / 53.2</td><td>61.3 / 48.8</td><td>35.1 / 36.2</td><td>62.4 / 51.6</td><td>60.0 / 47.5</td></tr><tr><td>SURE (Ours)</td><td>95.9 / 56.2</td><td>75.7 / 51.4</td><td>52.2 / 48.2</td><td>89.6 / 52.4</td><td>78.3 / 52.1</td></tr></table>
412
+
413
+ Table 8: Evaluation on ASQA dataset (Stelmakh et al., 2022). We use ChatGPT and $N = 5$ most relevant passages are commonly retrieved with GTR (Ni et al., 2022), following Gao et al. (2023).
414
+
415
+ <table><tr><td>Methods / Metrics</td><td>ROUGE-L</td><td>STR-EM</td><td>MAUVE</td></tr><tr><td>Base</td><td>38.00</td><td>39.81</td><td>69.83</td></tr><tr><td>SURE (Ours)</td><td>39.83</td><td>42.63</td><td>70.33</td></tr></table>
416
+
417
+ ROUGE-L and String Exact Match (STR-EM) for correctness, and MAUVE (Pillutla et al., 2021) for fluency and coherence, following the previous works (Stelmakh et al., 2022; Gao et al., 2023).
418
+
419
+ The results are presented in Table 8. One can observe that our proposed framework consistently improves the performance of retrieval-augmented LLMs for long-form QA tasks. However, we acknowledge that there is still room for improvement, particularly in finding better prompt designs, given that our current designs are based on performance on short-answer datasets. We hope future research will explore this direction, extending the benefits of our framework to broader QA scenarios with LLMs.
420
+
421
+ # B.5 EXPERIMENTAL WITH FEW-SHOT EXAMPLES
422
+
423
+ Here, we conduct additional experiments on $\mathrm{NQ^{*}}$ and WebQ\*, using 1-shot and 5-shot examples from training datasets during prediction. We compare the average EM/F1 of base prompting with retrieval and SURE, across four different random seeds used for sample selection. In Listing 8, we present the prompt that is used to generate $K$ answer candidates in the case where few-shot examples are given. Here, we present the case of $K = 2$ . Note that if few-shot examples are provided, only the prompt for generating answer candidates is modified. Also, in Listing 9, we present the prompt for the base prompting. Table 9 shows that adding few-shot examples improves QA accuracy for both the baseline and name. Specifically, we observed that name's gain primarily results from generating more accurate answer candidates. These findings suggest that our proposed method could be effective in scenarios beyond the zero-shot setup considered. Therefore, we believe that our work could contribute to broader ODQA scenarios in the future.
424
+
425
+ # C HUMAN EVALUATION OF GENERATED SUMMARIZATION
426
+
427
+ In this section, we provide details on the human preference evaluation of generated summarizations in Figure 4(c). First, we generate summarizations with a generic method (Listing 6) and with our proposed SURE (Listing 2). To separately consider the quality as rationale with the accuracy of prediction, we only compare the samples correctly predicted by both SURE and generic summarization; it results in 84 examples from the $\mathrm{NQ^{*}}$ . Then, using the prompt in Listing 11, we conduct human evaluation. Specifically, we hired seven NLP experts off-line for our human evaluation experiment. Unlike asking GPT-4 with Listing 10, we ask human evaluators to answer as a tie if it is hard to determine.
428
+
429
+ Table 9: Few-shot experimental results. We use ChatGPT and $N = 10$ most relevant passages are commonly retrieved with BM25.
430
+
431
+ <table><tr><td>EM/F1</td><td>0-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>NQ*: Base</td><td>29.4/41.7</td><td>30.1/39.3</td><td>31.9/42.0</td></tr><tr><td>NQ*: SURE(Ours)</td><td>35.6/44.9</td><td>36.3/46.8</td><td>37.2/47.7</td></tr><tr><td>WebQ*: Base</td><td>19.4/32.2</td><td>19.6/32.9</td><td>19.9/33.5</td></tr><tr><td>WebQ*: SURE(Ours)</td><td>23.2/36.5</td><td>24.2/39.4</td><td>24.3/38.5</td></tr></table>
432
+
433
+ Listing 8 Prompt for answer candidates generation with few-shot examples.
434
+ ```txt
435
+ f' Below are N passages related to the question at the end. We also provide $\leftrightarrow$ the answers for various questions. After reading the passages and $\leftrightarrow$ question-answer pairs, provide two correct candidates for the answer $\leftrightarrow$ to the question at the end. Each answer should be in the form: (a) $\leftrightarrow$ xx, (b) yy, and should not exceed 3 words for each candidate. Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Question: {Example question #1} Answer: {Example answer #1} Question: {Example question #1shot} Answer: {Example answer #1shot} Question: {Query question} Provide two correct candidates for the answer:
436
+ ```
437
+
438
+ # D ADDITIONAL QUALITATIVE RESULTS
439
+
440
+ In this section, we present more qualitative results with SURE. All the examples are from $\mathrm{NQ}^*$ , and ChatGPT with BM25 ( $N = 10$ ) is commonly used.
441
+
442
+ # D.1 MORE EXAMPLES OF QUALITATIVE COMPARISON BETWEEN SURE'S SUMMARIZATION AND GENERIC SUMMARIZATION
443
+
444
+ In Figures 6, 7, and 8, we present more examples for qualitative comparison between the candidate-conditioned summarization by SURE and generic summarization. Innecessary and tedious sentences irrelevant to the answer are highlighted with red.
445
+
446
+ # D.2 QUALITATIVE EXAMPLES OF VERIFICATION WITHINSTANCE-WISE VALIDITY
447
+
448
+ To qualitatively show which samples are considered as invalid by LLMs, we present the examples that exhibit $v(s_{k}) = 0$ as $\mathcal{M}(p_{\mathrm{val}}(q,y_k,s_k)) = \mathrm{False}$ in Figure 9. Here, we highlight the sentences with green if they include the relevant context with the given candidate. In addition, we highlight the sentences with red if they induce a different candidate as an answer or do not support the candidate. For example, in the second example with a question (Who is the actor that plays Saul on 'Grace and Frankie'?), one can observe that the generated summarization
449
+
450
+ Listing 9 Base prompt with few-shot examples.
451
+ ```javascript
452
+ f'Passage #1 Title: {Passage #1 Title} Passage #1 Text: {Passage #1 Text} .. Passage #N Title: {Passage #N Title} Passage #N Text: {Passage #N Text} Task description: predict the answer to the following question. Do not $\leftrightarrow$ exceed 3 words.. Question: {Example question #1} Answer: {Example answer #1} ... Question: {Example question #K shot} Answer: {Example answer #K shot} Question: {Query question} Answer:
453
+ ```
454
+
455
+ Listing 10 Prompt for GPT-based evaluation.
456
+ ```txt
457
+ f''
458
+ Question: Given the following summaries for the target question, $\leftrightarrow$ determine which one is more informative and plausible as rationale $\leftrightarrow$ to support a given target question-answer pair.
459
+ Summary 1: {Summary 1}
460
+ Summary 2: {Summary 2}
461
+ Target Question: {Question}
462
+ Target Answer: {Answer}
463
+ Your Task:
464
+ Identify which summary (Summary 1 or Summary 2) is more informative and $\leftrightarrow$ plausible as rationale to support a given answer at hand. Choices: $\leftrightarrow$ [Summary 1, Summary 2].
465
+ Answer:
466
+ ```
467
+
468
+ concludes that the given candidate (Mark Saul) is incorrect; consequently, LLMs evaluate its validity as supporting summarization for the given candidate as false.
469
+
470
+ # D.3 QUALITATIVE EXAMPLES OF VERIFICATION WITH PAIR-WISE RANKING
471
+
472
+ In Figure 10, we present examples of verification by pair-wise ranking. Here, we highlight with green for the summarization that gets a higher ranking. In contrast, we highlight with red for the summarization that gets a lower ranking. We also highlight the relevant texts with the same colors, respectively.
473
+
474
+ Listing 11 Template for human evaluation.
475
+ ```txt
476
+ f''
477
+ Given the following summaries for the target question, determine which $\nrightarrow$ one is more informative and plausible as rationale to support a $\nleftrightarrow$ given target question-answer pair.
478
+ Target Question: {Question}
479
+ Target Answer: {Answer}
480
+ Summary 1: {Summary 1}
481
+ Summary 2: {Summary 2}
482
+ Choices: [Summary 1, Tie, Summary 2]
483
+ Your choice:
484
+ ```
485
+
486
+ Table 10: Accuracy and cost ($) for each method. For the method in the last row, ChatGPT is used for Eq 2 and 3, and LLaMA is used for Eq 4 and 5, respectively.
487
+
488
+ <table><tr><td>Exact Match (EM)</td><td>NQ*</td><td>WebQ*</td><td>Average Cost for API</td></tr><tr><td>Base (10 passages, ChatGPT)</td><td>29.4</td><td>19.4</td><td>1.57$</td></tr><tr><td>Base (50 passages, ChatGPT)</td><td>33.8</td><td>21.8</td><td>7.67$</td></tr><tr><td>SURE (10 passages, ChatGPT)</td><td>35.6</td><td>23.2</td><td>6.05$</td></tr><tr><td>SURE (10 passages, ChatGPT + LLaMA)</td><td>35.0</td><td>24.8</td><td>5.03$</td></tr></table>
489
+
490
+ # E DISCUSSION ON COST AND QUALITY GAIN
491
+
492
+ While SURE significantly improves QA system of LLMs, one can be concerned about its cost as it requires multiple inferences of LLMs. However, we note that the improvement of SURE is not just a simple consequence of more cost. Compared to other cost-increasing methods for accuracy improvement, SURE significantly outperforms them, i.e., SURE is an even more efficient way to increase performance. For instance, increasing the number of retrieved passages is one of the most straightforward methods for this goal. But, in this case, SURE with 10 passages outperforms the base prompting with 50 passages, even with a lower total cost, as presented in Table 10. In addition, we note that other baseline approaches such as chain-of-thought or self-verification (considered in Table 1) also require more cost than base prompting, but they fail to successfully improve the performance.
493
+
494
+ On the other hand, one can reduce the overall cost by using cheaper LLMs for specific components, thanks to the modularity of SURE. Remarkably, SURE is compatible with the recent state-of-the-art open LLMs (see Tables 2 and 5) and hence this advantage is more noticeable. To give an intuition, we conduct the new experiments by using ChatGPT for the answer candidate generation and summarization, and LLaMA for the succeeding verification steps. As shown in the 4th row of Table 10, this hybrid approach of different LLMs with SURE successfully reduces the cost while keeping the effectiveness for improving the accuracy; for WebQ*, this approach even outperforms the expensive one. This result is from the effectiveness of LLaMA in WebQ* and indicates the potential of such a hybrid method.
495
+
496
+ Lastly, we further remark that most of SURE's cost is currently from re-reading retrieved passages for conditional summarizations (e.g., $38\%$ of the total cost for SURE with 10 passages). This is due to current APIs not providing recycling options for previous inputs. If recycling becomes available, SURE's cost could be significantly reduced.
497
+
498
+ # F LIMITATION AND FUTURE WORK
499
+
500
+ In this work, we primarily focused on zero-shot setup for the experiments, which is a commonly encountered scenario in the real world, e.g., search engine. But, similar to the previous works (Chowdhery et al., 2022; Touvron et al., 2023a), incorporating data-specific few-shot examples is also an interesting future direction to further improve QA accuracy of LLMs with SURE. Another interesting direction is extending the applied task beyond QA, such as language modeling (Guu et al., 2020) or language understanding tasks (Hendrycks et al., 2021).
501
+
502
+ # G ADDITIONAL RELATED WORK
503
+
504
+ Summarization in open-domain. A summarization of retrieved passages has been considered in open-domain context; for example, there are recent works that propose to learn a module to selectively use the retrieved information in sentence- (Khattab et al., 2021; Su et al., 2022a) or passage-level (Mao et al., 2021; Chuang et al., 2023). In addition, Su et al. (2022a); Giorgi et al. (2023) form a new task that combines both passage retrieval and summarization for a given query, and Gao et al. (2023) considers summarization of information for prompting. However, these works require a large annotated dataset to extract the information specified to answer the question or construct the generic summarization which focuses on preserving the retrieved information within reduced texts.
505
+
506
+ # H EXPERIMENTAL RESULTS WITH CONFIDENCE INTERVAL
507
+
508
+ In this section, we present confidence intervals for our main tables (Tables 1 and 2). To achieve this, we apply bootstrapping (Efron & Tibshirani, 1994), a popular technique for statistical inference that involves random sampling with replacement. We report $95\%$ confidence intervals obtained through 1,000 iterations of bootstrapping. The confidence intervals for the EM and F1 metrics of each main table can be found in Tables 11, 12, 13, and 14.
509
+
510
+ The reliability of the results is reasonably robust, with the $95\%$ confidence interval having only about a $10\%$ variance from the reported value. Specifically, in the EM metric of the NQ dataset, our SuRe has the lowest confidence interval value at 32.0, compared to the maximum value of 29.1 for the no retrieval baseline and 30.0 for the best competitor. This demonstrates that the advantage of SuRe over prior works is statistically significant.
511
+
512
+ Table 11: EM with different QA methods with ChatGPT on four QA datasets. The $95\%$ confidence intervals are calculated via bootstrapping by 1000 iterations, and presented below the corresponding values. $N = 10$ most relevant passages are retrieved using BM25, except no retrieval. The best and second best scores are highlighted in bold and underline, respectively.
513
+
514
+ <table><tr><td>Methods / Datasets</td><td>NQ</td><td>WebQ</td><td>2Wiki</td><td>HotpotQA</td></tr><tr><td rowspan="2">No retrieval</td><td>27.6</td><td>25.0</td><td>21.4</td><td>22.2</td></tr><tr><td>[26.2, 29.1]</td><td>[23.2, 27.0]</td><td>[17.6, 25.2]</td><td>[18.8, 25.8]</td></tr><tr><td rowspan="2">Base</td><td>28.4</td><td>19.6</td><td>27.4</td><td>30.8</td></tr><tr><td>[27.0, 30.0]</td><td>[17.9, 21.3]</td><td>[23.6, 31.0]</td><td>[26.6, 35.2]</td></tr><tr><td rowspan="2">Rerank</td><td>24.8</td><td>18.8</td><td>23.0</td><td>27.8</td></tr><tr><td>[23.4, 26.2]</td><td>[17.2, 20.6]</td><td>[19.6, 26.8]</td><td>[23.8, 32.0]</td></tr><tr><td rowspan="2">RePlug</td><td>26.0</td><td>18.8</td><td>23.6</td><td>28.0</td></tr><tr><td>[24.6, 27.4]</td><td>[17.1, 20.6]</td><td>[20.0, 27.2]</td><td>[24.2, 32.0]</td></tr><tr><td rowspan="2">Selection-inference</td><td>24.3</td><td>17.3</td><td>22.6</td><td>30.8</td></tr><tr><td>[22.9, 25.7]</td><td>[15.7, 18.8]</td><td>[19.0, 26.0]</td><td>[26.8, 34.8]</td></tr><tr><td rowspan="2">Chain-of-thoughts</td><td>22.3</td><td>15.2</td><td>19.6</td><td>25.6</td></tr><tr><td>[20.8, 23.6]</td><td>[13.7, 16.6]</td><td>[16.0, 23.2]</td><td>[21.6, 29.4]</td></tr><tr><td rowspan="2">Self-verification</td><td>25.2</td><td>16.1</td><td>23.2</td><td>31.6</td></tr><tr><td>[23.7, 26.6]</td><td>[14.6, 17.7]</td><td>[19.6, 27.6]</td><td>[27.6, 35.8]</td></tr><tr><td rowspan="2">SURE (Ours)</td><td>33.5</td><td>25.1</td><td>32.8</td><td>33.2</td></tr><tr><td>[32.0, 35.0]</td><td>[23.1, 27.0]</td><td>[28.6, 36.8]</td><td>[29.0, 37.6]</td></tr></table>
515
+
516
+ Table 12: F1 with different QA methods with ChatGPT on four QA datasets. The $95\%$ confidence intervals are calculated via bootstrapping by 1000 iterations, and presented below the corresponding values. $N = 10$ most relevant passages are retrieved using BM25, except no retrieval. The best and second best scores are highlighted in bold and underline, respectively.
517
+
518
+ <table><tr><td>Methods / Datasets</td><td>NQ</td><td>WebQ</td><td>2Wiki</td><td>HotpotQA</td></tr><tr><td>No retrieval</td><td>39.0[37.7, 40.5]</td><td>38.8[36.9, 40.7]</td><td>24.8[21.1, 28.5]</td><td>31.9[28.2, 35.4]</td></tr><tr><td>Base</td><td>38.8[37.3, 40.4]</td><td>32.5[30.7, 34.3]</td><td>32.8[28.9, 36.3]</td><td>40.3[36.4, 44.4]</td></tr><tr><td>Rerank</td><td>33.9[32.5, 35.3]</td><td>30.6[28.8, 32.4]</td><td>28.4[25.1, 32.1]</td><td>37.4[33.4, 41.4]</td></tr><tr><td>RePlug</td><td>35.3[33.9, 36.8]</td><td>31.5[29.8, 33.3]</td><td>28.5[24.7, 32.1]</td><td>37.9[34.2, 41.9]</td></tr><tr><td>Selection-inference</td><td>32.8[31.5, 34.3]</td><td>28.6[27.0, 30.3]</td><td>29.5[26.2, 33.2]</td><td>39.6[35.8, 43.7]</td></tr><tr><td>Chain-of-thoughts</td><td>31.4[30.1, 32.8]</td><td>27.8[26.1, 29.4]</td><td>22.5[18.8, 26.2]</td><td>31.8[27.8, 35.7]</td></tr><tr><td>Self-verification</td><td>35.4[33.9, 36.9]</td><td>28.5[26.7, 30.2]</td><td>30.5[27.1, 34.9]</td><td>41.8[37.8, 45.6]</td></tr><tr><td>SURE (Ours)</td><td>42.3[40.8, 43.7]</td><td>36.6[34.8, 38.5]</td><td>38.1[34.0, 42.0]</td><td>43.4[39.4, 47.6]</td></tr></table>
519
+
520
+ Table 13: EM with different configurations of LLMs and retrieval methods on four QA datasets. The $95\%$ confidence intervals are calculated via bootstrapping by 1000 iterations, and presented below the corresponding values. $N = 10$ most relevant passages are commonly retrieved. For LLaMA2-chat, we conducted experiments on $\mathbf{NQ}^*$ and $\mathrm{WebQ^{*}}$ and the results are indicated by \*.
521
+
522
+ <table><tr><td rowspan="2">Datasets</td><td colspan="6">ChatGPT</td><td colspan="2">GPT-4</td><td colspan="2">LLaMA2-chat</td></tr><tr><td>BM25</td><td>+SURE</td><td>DPR</td><td>+SURE</td><td>Contriever</td><td>+SURE</td><td>BM25</td><td>+SURE</td><td>BM25</td><td>+SURE</td></tr><tr><td>NQ</td><td>28.4</td><td>33.5</td><td>36.1</td><td>41.0</td><td>35.8</td><td>40.4</td><td>30.2</td><td>32.4</td><td>18.6*</td><td>30.4*</td></tr><tr><td rowspan="2">WebQ</td><td>[27.0, 30.0]</td><td>[32.0, 35.0]</td><td>[34.5, 37.7]</td><td>[39.4, 42.6]</td><td>[34.2, 37.4]</td><td>[38.8, 42.0]</td><td>[28.8, 31.7]</td><td>[30.9, 33.9]</td><td>[15.0, 22.0]</td><td>[26.4, 34.4]</td></tr><tr><td>19.6</td><td>25.1</td><td>23.2</td><td>27.3</td><td>22.5</td><td>28.7</td><td>21.5</td><td>21.7</td><td>16.0*</td><td>24.0*</td></tr><tr><td rowspan="2">2Wiki</td><td>[17.8, 21.4]</td><td>[23.1, 27.0]</td><td>[21.4, 25.1]</td><td>[25.3, 29.2]</td><td>[20.5, 24.3]</td><td>[26.7, 30.7]</td><td>[19.6, 23.2]</td><td>[19.8, 23.4]</td><td>[13.0, 19.2]</td><td>[20.4, 27.8]</td></tr><tr><td>27.4</td><td>32.8</td><td>19.2</td><td>21.4</td><td>27.2</td><td>32.6</td><td>34.8</td><td>38.2</td><td>20.2</td><td>27.8</td></tr><tr><td rowspan="3">HotpotQA</td><td>[23.6, 31.0]</td><td>[28.6, 36.8]</td><td>[15.8, 22.8]</td><td>[17.8, 24.8]</td><td>[23.2, 31.0]</td><td>[28.4, 36.8]</td><td>[30.6, 38.8]</td><td>[34.0, 42.2]</td><td>[16.6, 23.6]</td><td>[23.6, 32.0]</td></tr><tr><td>30.8</td><td>33.2</td><td>25.6</td><td>27.4</td><td>32.2</td><td>33.6</td><td>34.8</td><td>40.6</td><td>24.0</td><td>28.0</td></tr><tr><td>[26.6, 35.2]</td><td>[29.0, 37.6]</td><td>[21.8, 29.4]</td><td>[23.8, 31.4]</td><td>[28.2, 36.6]</td><td>[29.2, 37.6]</td><td>[31.0, 38.8]</td><td>[36.2, 44.6]</td><td>[20.2, 27.6]</td><td>[24.0, 32.0]</td></tr></table>
523
+
524
+ Table 14: F1 with different configurations of LLMs and retrieval methods on four QA datasets. The $95\%$ confidence intervals are calculated via bootstrapping by 1000 iterations, and presented below the corresponding values. $N = 10$ most relevant passages are commonly retrieved. For LLaMA2-chat, we conducted experiments on $\mathrm{NQ}^*$ and WebQ* and the results are indicated by $*$ .
525
+
526
+ <table><tr><td rowspan="2">Datasets</td><td colspan="6">ChatGPT</td><td colspan="2">GPT-4</td><td colspan="2">LLaMA2-chat</td></tr><tr><td>BM25</td><td>+SURE</td><td>DPR</td><td>+SURE</td><td>Contriever</td><td>+SURE</td><td>BM25</td><td>+SURE</td><td>BM25</td><td>+SURE</td></tr><tr><td>NQ</td><td>38.8</td><td>42.3</td><td>47.4</td><td>50.8</td><td>47.6</td><td>50.4</td><td>40.9</td><td>42.4</td><td>36.4*</td><td>42.9*</td></tr><tr><td rowspan="2">WebQ</td><td>[37.3, 40.4]</td><td>[40.8, 43.7]</td><td>[45.9, 48.9]</td><td>[49.3, 52.4]</td><td>[46.2, 49.1]</td><td>[48.8, 51.8]</td><td>[39.5, 42.4]</td><td>[41.0, 43.9]</td><td>[32.8, 39.6]</td><td>[38.9, 46.8]</td></tr><tr><td>32.5</td><td>36.6</td><td>37.5</td><td>40.4</td><td>37.7</td><td>40.9</td><td>36.4</td><td>32.1</td><td>35.3*</td><td>40.5*</td></tr><tr><td rowspan="2">2Wiki</td><td>[30.8, 34.3]</td><td>[34.8, 38.5]</td><td>[35.8, 39.3]</td><td>[38.5, 42.3]</td><td>[35.8, 39.6]</td><td>[39.1, 42.7]</td><td>[34.5, 38.2]</td><td>[30.2, 34.0]</td><td>[32.2, 38.7]</td><td>[36.7, 43.9]</td></tr><tr><td>32.8</td><td>38.1</td><td>22.8</td><td>25.2</td><td>32.9</td><td>37.1</td><td>39.2</td><td>43.2</td><td>31.2</td><td>36.2</td></tr><tr><td rowspan="3">HotpotQA</td><td>[28.9, 36.3]</td><td>[34.0, 42.0]</td><td>[19.4, 26.3]</td><td>[21.6, 28.8]</td><td>[29.3, 36.9]</td><td>[33.0, 41.4]</td><td>[35.2, 43.0]</td><td>[39.3, 47.2]</td><td>[27.7, 34.9]</td><td>[32.2, 39.9]</td></tr><tr><td>40.3</td><td>43.4</td><td>34.6</td><td>35.5</td><td>42.9</td><td>43.5</td><td>44.4</td><td>50.4</td><td>39.6</td><td>38.4</td></tr><tr><td>[36.4, 44.4]</td><td>[39.4, 47.6]</td><td>[30.8, 38.1]</td><td>[31.6, 39.6]</td><td>[36.6, 47.2]</td><td>[39.3, 47.7]</td><td>[40.5, 48.1]</td><td>[46.3, 54.3]</td><td>[35.9, 43.2]</td><td>[34.6, 42.5]</td></tr></table>
527
+
528
+ ![](images/955d6d4c78509307ebc2ccbf5365200517e9d5bb2734bdb951cc7a73677860cb.jpg)
529
+ Figure 6: Qualitative comparison of candidate-conditioned summarization from SURE (Ours) compared to generic summarization as a rationale for the answer.
530
+
531
+ ![](images/a007d6c37063ddb6c7944f5a1f7506dd5e37223adcc1f4a92e0217872982a713.jpg)
532
+ Figure 7: Qualitative comparison of candidate-conditioned summarization from SURE (Ours) compared to generic summarization as a rationale for the answer.
533
+
534
+ ![](images/1ce2396e23b3ba186ae91906b19e24eb1663cd5f7ff3f4760a12b9cd90e9e730.jpg)
535
+ Figure 8: Qualitative comparison of candidate-conditioned summarization from SURE (Ours) compared to generic summarization as a rationale for the answer.
536
+
537
+ ![](images/ef35a691b6a9167cdebf2a4dc5aaa8d5ebf0a5cc63c853cf36ba5fc80a1ee68f.jpg)
538
+ Figure 9: Example summarizations that are evaluated as invalid by LLMs (Eq. 4).
539
+
540
+ # Question
541
+
542
+ Who is the CEO of Crate and Barrel?
543
+
544
+ # Candidate-conditioned Summarization 1 (Candidate: Neela Montgomery)
545
+
546
+ Neela Montgomery is the current CEO of Crate & Barrel, having assumed the role after Doug Diemoz departed in April 2017. Montgomery brings a wealth of experience to the position, having previously served as the Executive Board Member for Multi-Channel Retail at Otto Group, the parent company of Crate & Barrel. Under her leadership, the company is expected to continue its expansion into new markets, both domestically and internationally. Montgomery's focus on innovation and customer experience is sure to drive growth and success for Crate & Barrel in the years to come.
547
+
548
+ # Candidate-conditioned Summarization 2 (Candidate: Sascha Bopp)
549
+
550
+ Sascha Bopp was named as the CEO of Crate & Barrel after Barbara Turf retired in 2012. However, due to poor performance during the 2013 holiday season and growing disenchantment from employees, Bopp was removed from his position and terminated from the company. Since then, there have been several other CEOs, including Doug Diemoz and currently Neela Montgomery. However, based on the information provided, it can be predicted that Sascha Bopp was the CEO of Crate & Barrel at some point in time.
551
+
552
+ # Real answer
553
+
554
+ Neela Montgomery
555
+
556
+ # Question
557
+
558
+ The concept of micro financing was developed by who in 1976?
559
+
560
+ # Candidate-conditioned Summarization 1 (Candidate: Muhammad Yunus)
561
+
562
+ Microfinance is a term used to describe financial services, such as loans, savings, and insurance, provided to low-income individuals or those who do not have access to traditional banking services. The concept of microfinance has been around for decades, but it was not until the 1970s that it gained widespread attention. In 1976, Muhammad Yunus, a Bangladeshi economist, began experimenting with lending small amounts of money to poor women in rural areas. He founded the Grameen Bank in 1983, which became the first microfinance institution to provide small loans to the poor without requiring collateral. Yunus and the Grameen Bank were awarded the Nobel Peace Prize in 2006 for their efforts to create economic and social development through microfinance. Therefore, it can be concluded that the concept of micro financing was developed by Muhammad
563
+
564
+ # Candidate-conditioned Summarization 2 (Candidate: Grameen Bank)
565
+
566
+ Microfinance is a term that has evolved over time, from micro-credit to micro-finance. It is a way to promote economic development, employment, and growth through the support of microentrepreneurs and small businesses. The Grameen Bank is one of the pioneers of microfinance, having been founded in Bangladesh in 1983 by Muhammad Yunus. The bank's mission was to provide small loans to poor people who did not have access to traditional banking services. The bank's success in reducing poverty through microfinance has inspired similar initiatives around the world. While microfinance has its critics, it has undoubtedly helped many people lift themselves out of poverty. Therefore, it can be concluded that the concept of micro financing was not developed by Muhammad Yunus in 1976, but rather by the Grameen Bank in 1983.
567
+
568
+ # Realanswer
569
+
570
+ Muhammad Yunus
571
+
572
+ Figure 10: Example summarizations with pair-wise rank evaluation (Eq. 5).
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a898f82a7f18a87934e65ddeaed55fed7218e4025f9d611e75c2acf5a5be54b
3
+ size 1839786
2024/SuRe_ Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMs/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/4248ef15-a1a9-476b-aec0-9a3b4e1031e5_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db1e49cee84613044d6ebbedf7039430fc4e55ee89b348ac785a3b88e2acff53
3
+ size 1543067
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/full.md ADDED
@@ -0,0 +1,566 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SUCCESSOR HEADS: RECURRING, INTERPRETABLE ATTENTION HEADS IN THE WILD
2
+
3
+ Rhys Gould<sup>1</sup>, Euan Ong<sup>1</sup>, George Ogden<sup>1</sup>, Arthur Conmy<sup>2</sup>
4
+ <sup>1</sup> University of Cambridge
5
+ <sup>2</sup> Independent Correspondence to rg664@cam.ac.uk
6
+
7
+ # ABSTRACT
8
+
9
+ In this work we describe successor heads: attention heads that increment tokens with a natural ordering, such as numbers, months, and days. For example, successor heads increment 'Monday' into 'Tuesday'. We explain the successor head behavior with an approach rooted in mechanistic interpretability, the field that aims to explain how models complete tasks in human-understandable terms. Existing research in this area has struggled to find recurring, mechanistically interpretable large language model (LLM) components beyond small toy models. Further, existing results have led to very little insight to explain the internals of the larger models that are used in practice. In this paper, we analyze the behavior of successor heads in LLMs and find that they implement abstract representations that are common to different architectures. Successor heads form in LLMs with as few as 31 million parameters, and at least as many as 12 billion parameters, such as GPT-2, Pythia, and Llama-2. We find a set of 'mod 10' features<sup>1</sup> that underlie how successor heads increment in LLMs across different architectures and sizes. We perform vector arithmetic with these features to edit head behavior and provide insights into numeric representations within LLMs. Additionally, we study the behavior of successor heads on natural language data, where we find that successor heads are important for achieving a low loss on examples involving succession, and also identify interpretable polysemanticity in a Pythia successor head.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ $$
14
+ \begin{array}{c} \text {M o n d a y ^ {\prime}} \\ \text {J a n u a r y ^ {\prime}} \\ \text {F i r s t ^ {\prime}} \\ \text {A ^ {\prime}} \\ \text {1 ^ {\prime}} \end{array} \bullet \longrightarrow \boxed {W _ {E}} \longrightarrow \boxed {\mathrm {M L P} _ {0}} \longrightarrow \boxed {W _ {O V}} \longrightarrow \boxed {W _ {U}} \longrightarrow \bullet \begin{array}{c} \text {T u e s d a y ^ {\prime}} \\ \text {F e b r u a r y ^ {\prime}} \\ \text {S e c o n d ^ {\prime}} \\ \text {B ^ {\prime}} \\ \text {2 ^ {\prime}} \end{array}
15
+ $$
16
+
17
+ Figure 1: A successor head with OV matrix $W_{OV}$ takes a numbered token such as 'Monday' in embedding space and maps it to its successor value in unembedding space, e.g. 'Tuesday'. The circuit is the simple composition of the embedding matrix, the first MLP block, a single attention head, and the unembedding matrix.
18
+
19
+ Mechanistic interpretability (Olah, 2022) is the process of reverse-engineering the algorithms that trained neural networks have learned. Recently, much attention has been paid to interpreting transformer-based large language models (LLMs), as these models have demonstrated impressive capabilities (OpenAI, 2023) but there is little understanding of how these models produce their outputs. Existing interpretability research includes comprehensive reverse-engineering efforts into toy models (Nanda et al., 2023) and small language models (Olsson et al., 2022; Wang et al., 2023), though few insights have been gained about how frontier LLMs function.
20
+
21
+ In mechanistic interpretability, universality (Olah et al., 2020; Li et al., 2016) is a hypothesis that there are common representations in neural networks. The universality hypothesis asserts that neural networks with different architectures and scales form common internal representations. Strong evidence for (or against) the universality hypothesis could significantly affect research priorities in interpretability. If common representations form across different language models and tasks, then research on small or toy language models (Elhage et al., 2022; 2021) and narrow tasks (Wang et al., 2023; Heimersheim & Janiak, 2023; Hanna et al., 2023) may be the best way to gain insights into LLM capabilities. Conversely, if the representations used by language models do not generalize to different model scales and/or tasks, then developing methods that can be applied to larger language models and don't rely on lessons from small models generalizing (such as Wu et al. (2023), Bills et al. (2023), Conmy et al. (2023)) may be the most fruitful direction for interpretability.
22
+
23
+ In this work, we find an interpretable set of attention heads we call successor heads in models of many different scales and architectures. Successor heads are attention heads that perform incrementation in language models. The input to a successor head is the representation of a token in an ordinal sequence such as 'Monday', 'first', 'January', or 'one'. The output of a successor head assigns a higher likelihood to the incremented token, such as 'Tuesday', 'second', 'February', or 'two'. In our work, we find evidence for a weak form of universality (Chughtai et al. (2023); points 1. and 2.) in finding Successor Heads across different models, as well as finding that numeric representations in language models are compositional (point 3.), as
24
+
25
+ 1. Successor heads form across language models from the scale of 31 million parameters and to at least as many as 12 billion parameters.
26
+ 2. Successor heads form across models with different architectures, including Pythia, GPT-2 and Llama-2 (Touvron et al., 2023).
27
+ 3. Language models use compositional numeric representations to encode the index of these tokens within their ordinal sequence; these representations exhibit abstract structure, such as mod-10 features.
28
+
29
+ Our contributions can be summarised as follows:
30
+
31
+ # 1. Introducing and interpreting successor heads (Section 2-3)
32
+
33
+ (a) We introduce and explain successor heads, and show that they occur in language models across almost three orders of magnitude of model parameter count.
34
+
35
+ # 2. Finding abstract numeric representations in language models (Section 3)
36
+
37
+ (b) We isolate a common numeric subspace within embedding space, that for any given token (e.g. 'February') encodes the index of that token within its ordinal sequence (e.g. months).
38
+ (c) We find evidence for interpretable, abstract features within successor heads' numeric inputs: an unsupervised decomposition of token representations yields a crucial set of features we call the mod-10 features $\{f_0,\dots,f_9\}$ . $f_{n}$ is present in all tokens whose numerical index $\equiv n$ (mod 10), e.g. $f_{2}$ is present in the model's representations of '2', '32', '172', 'February', 'second' and 'twelve'.
39
+ (d) We steer the semantics of successor heads' numeric inputs with vector arithmetic.
40
+
41
+ # 3. Showing that the succession mechanism is important in the wild (Section 4)
42
+
43
+ (d) Finally, we show that successor heads play an important role in incrementation-based tasks in natural language datasets – for instance, predicting the next number in a numbered list of items.
44
+
45
+ # 2 SUCCESSOR HEADS
46
+
47
+ LLMs are able to increment elements in an ordinal sequence. For instance, Pythia-1.4B will complete the prompt "If this is 1, the next is" with "2", and the prompt "If this is January, the next is" with "February". Given this observation, we find evidence for attention heads within LLMs (which we refer to as successor heads) responsible for performing this type of incrementation. To get evidence for successor heads we require three definitions: i) the succession dataset of tasks involving abstract numeric representations, ii) an effective OV circuit to measure how attention heads affect model outputs, and finally iii) successor score.
48
+
49
+ The succession dataset is the set of tokens across eight different tasks that can be incremented:2
50
+
51
+ <table><tr><td>Task</td><td>Tokens</td></tr><tr><td>Numbers</td><td>‘1’, ‘2’, ..., ‘199’, ‘200’</td></tr><tr><td>Number words</td><td>‘one’, ‘two’, ..., ‘nineteen’, ‘twenty’</td></tr><tr><td>Cardinal words</td><td>‘first’, ‘second’, ..., ‘tenth’</td></tr><tr><td>Days</td><td>‘Monday’, ‘Tuesday’, ..., ‘Sunday’</td></tr><tr><td>Day prefixes</td><td>‘Mon’, ‘Tue’, ..., ‘Sun’</td></tr><tr><td>Months</td><td>‘January’, ‘February’, ..., ‘December’</td></tr><tr><td>Month prefixes</td><td>‘Jan’, ‘Feb’, ..., ‘Dec’</td></tr><tr><td>Letters</td><td>‘A’, ‘B’, ..., ‘Z’</td></tr></table>
52
+
53
+ Table 1: Tokens in the succession dataset
54
+
55
+ We also include different forms of these tokens, as language model tokenizers often have several tokens corresponding to the same word (e.g. words with/without a space at the start being different tokens). Full details of our dataset can be found in our open-sourced experiments.<sup>3</sup>
56
+
57
+ Notation. For consistency with prior work we follow all Elhage et al. (2021)'s notation choices, though the following definitions are sufficient and self-contained for this work regardless. Transformer language models use an embedding matrix $W_{E} \in \mathbb{R}^{d_{\mathrm{model}} \times n_{\mathrm{vocab}}}$ to map tokens to vectors in the residual stream (the cumulative sum of embeddings, attention heads and MLPs). After additive application of attention and MLP layers, the unembedding matrix $W_{U} \in \mathbb{R}^{n_{\mathrm{vocab}} \times d_{\mathrm{model}}}$ maps the final state of the residual stream to logits for all next token predictions. An OV matrix $W_{OV} \in \mathbb{R}^{d_{\mathrm{model}} \times d_{\mathrm{model}}}$ maps the residual stream to the output of an attention head, assuming the attention head solely attended to that residual stream. Altogether, our diagram in Figure 1 shows one shallow path through a transformer model.
58
+
59
+ Effective OV Circuit. We determine whether attention heads perform succession by studying their effective OV circuit, which measures the direct effect of input tokens when multiplied by an OV matrix $W_{OV}$ , as in concurrent work (McDougall et al., 2023) which surveys the importance of MLP0. The (non-effective) OV circuit $W_{U}W_{OV}W_{E}$ (1) from Elhage et al. (2021) is the inspiration for our effective OV circuit $W_{U}W_{OV}\mathrm{MLP}_{0}(W_{E})$ (2). Intuitively, (2)'s columns represent input tokens to the head and the rows represent the logits on each possible output token.
60
+
61
+ Successor Heads are then operationalized by considering an input token $t$ from our succession dataset (e.g. $t =$ 'Monday'). If the effective OV circuit column for input $t$ has a larger output on the successor to $t$ ('Tuesday') than on any other of the tokens in that task ('Monday' or 'Wednesday' or 'Thursday' or ...) then we consider the head to have performed succession in this case. Successor Heads are then defined as the attention heads that pass this test for more than half of the tokens in the succession dataset. We call the proportion of succession dataset tokens on which an attention head performs succession the succession score. The succession scores across a range of models are displayed in Figure 2.
62
+
63
+ # 3 DECOMPOSING NUMERIC REPRESENTATIONS
64
+
65
+ Having found behavioral evidence that successor heads exist across a range of models, we now perform a case study on the attention head (L12H0) with the maximal successor score in Pythia-1.4B. Indeed, not only do we find that the representations on which the successor head acts (i.e. the outputs of the $\mathrm{MLP}_0$ layer) share a common numeric subspace (Section A), that for any given token (e.g. 'February') encodes the index of that token within its ordinal sequence (e.g. months), but we also find mechanistic evidence for transferable arithmetic features within these representations. $^4$
66
+
67
+ ![](images/7590fdfbf7e441000e2ec7fb1b5eac76d54713b73feabf8f6428d4c7bf606957.jpg)
68
+ Figure 2: Plots of successor scores (proportion of tokens where succession occurs) for each model tested. A plot of the highest successor score observed across all attention heads for each model tested (left) and successor scores of the best successor heads in models (Pythia-1.4B, GPT-2 XL, Llama-2 7B) across different tasks (right).
69
+
70
+ ![](images/9bfffd42c4ac43e0f36c53a7f6c02cf53943ffe60ac31d98186845e417a47706.jpg)
71
+
72
+ Specifically, we use sparse autoencoders to isolate abstract 'mod-10' features within the outputs of the $\mathrm{MLP}_0$ layer (Section 3.1), provide further evidence for these features through linear probing and ablative experiments on individual neurons (Section 3.2), and use these features to steer model behavior across different successor tasks (Section 3.3).
73
+
74
+ # 3.1 FINDING MOD-10 FEATURES
75
+
76
+ To uncover more structure within these $\mathrm{MLP}_0$ -representations, we train a sparse autoencoder (SAE) (Ng (2011); Cunningham et al. (2023); Bricken et al. (2023), see Appendix B) on tokens $t$ from a range of ordinal sequences. In short, SAEs find a sparse set of linear features that can reconstruct activations in neural networks. We apply SAEs to the $\mathrm{MLP}_0$ -representations of all tokens $t$ and call this their SAE-decomposition. The $i$ th SAE feature has activation (on input token $t$ ) $\alpha_i(t) \geq 0$ .
77
+
78
+ Given an ordinal sequence token $t$ and a trained SAE, we define $t$ 's most important feature $t^{\star}$ as the SAE feature that, when ablated from the reconstruction of $t$ 's $\mathrm{MLP}_0$ -representation, causes the biggest decrease in the probability of the successor of $t$ (by calculating probabilities from the logits obtained by multiplying by $W_U W_{OV}$ ).
79
+
80
+ For numeric tokens $t_n$ (e.g. $t_{13} = '13'$ ), we find that their most important feature is usually shared by other numeric tokens $t_m$ for which $m \equiv n \mod 10$ (e.g. $t_3, t_{23}, \ldots, t_{93}$ ). Indeed, for each of the 'mod-10 classes' $\{t_0, \ldots, t_{90}\}$ , $\{t_1, \ldots, t_{91}\}$ , ..., $\{t_9, \ldots, t_{99}\}$ , the modal most important feature for tokens in that class is shared on average by 58.5% of tokens in that class. Moreover, we find that the most important feature of $t_i$ typically only has a high activation $\alpha_i(t_j)$ in the SAE-decomposition of $t_j$ if $i \equiv j \mod 10$ , which we visualise as 'mod-10 bands' in Figure 3.
81
+
82
+ We also observe that these features are causally important for the successor head to perform incrementation: if we apply the successor head to the most important features $t_i^\star$ of tokens $t_i$ (i.e. compute logits as $W_U W_{OV} t_i^\star$ ), the resulting distribution places high weight on tokens $t_j$ for $j \equiv i + 1 \mod 10$ , which we visualise as 'mod-10 bands' in Figure 5. Furthermore, the weight placed on tokens $t_j$ when $t_i$ is a single-digit number is much larger than that when $t_i$ is a double-digit number.
83
+
84
+ Given these observations, we hypothesise that the most important features of numeric tokens $t_i$ might in some way encode the value of $i \mod 10$ . As such, we define the mod-10 features $f_0, \ldots, f_9$ as the modal most important features from mod-10 classes $\{t_0, \ldots, t_{90}\}$ , $\{t_1, \ldots, t_{91}\}$ , ..., $\{t_9, \ldots, t_{99}\}$ , averaged over 100 SAE training runs. We verify that these mod-10 features are causally important for incrementation, by observing that the logit distribution obtained by applying the successor head to features $f_i$ (i.e. $W_U W_{OV} f_i$ ) places high weight on tokens $t_j$ for $j \equiv i + 1 \mod 10$ (which we visualise as 'mod-10 bands' in Figure 4).
85
+
86
+ # 3.2 TRANSFERABILITY OF MOD-10 FEATURES
87
+
88
+ Are the mod-10 features we found in Section 3.1 simply an artifact of the SAE technique? We provide evidence that these are natural, causally important features by using two independent methods to recover them: (1) linear probing, and (2) identifying $\mathrm{MLP}_0$ neurons. We also demonstrate that these features transfer to other tasks in the succession dataset (Section 2).
89
+
90
+ (1) Linear probing. We train a linear probe $P: \mathbb{R}^{10 \times d_{\mathrm{model}}}$ to predict the value of $i \mod 10$ from the $\mathrm{MLP}_0$ -representations of numeric tokens $t_i$ . We find that $P_i$ , the $i$ th row of our linear probe, has a high cosine similarity (on average 0.70764) to the corresponding mod-10 feature $f_i$ obtained from the SAE. Surprisingly, the probe even generalizes to non-numeric tokens, correctly predicting the index value mod 10 for 94/102 examples from succession dataset tasks 2-8 (Section 2). Our full experimental setup is described in Appendix C.1. Additionally, we provide an analysis of linear probes for moduli other than 10 in Appendix R.
91
+
92
+ (2) $\mathbf{MLP_0}$ neurons. We perform ablative experiments on individual $\mathbf{MLP_0}$ neurons (activations immediately after the final ReLU/GELU) to find the most important neurons for incrementing numeric tokens $t_i$ (measured by decrease in probability of the successor token $t_{i + 1}$ , as per the definition of most important feature). Observing the behavior of these neurons on tokens $t_i$ reveals periodic spiking patterns in firing intensity (the neuron's activation value), with the most common period across the top 16 most important neurons being 10. Figure 22 presents the firing patterns of some of these neurons. Indeed, we also find that the neurons increase probability on successor tokens by multiplying the neuron's corresponding direction with $W_{U}W_{OV}$ in the same figures. Further technical details can be found in Appendix D. Our results on the interpretability of individual neurons may seem surprising in light of recent work suggesting that the individual neurons of language models may be inappropriate as the units of understanding (Elhage et al., 2022). However, our results do not contradict previous findings that understanding MLPs requires understanding distributed behaviors, since, for example, feature $f_{6}$ appears to be in superposition across at least two neurons (see Figure 22).
93
+
94
+ # 3.3 VECTOR ARITHMETIC WITH MOD-10 FEATURES
95
+
96
+ The generalization of our mod-10 linear probe to unseen numeric tasks suggests that token representations across different tasks might be compositional and share some common mod-10 structure. In this section, we test our understanding of this structure by performing vector arithmetic with our mod-10 features to manipulate the index of ordinal sequence tokens. For instance, just as Mikolov et al. (2013) found that work vectors satisfied vec('King') - vec('Man') + vec('Woman') = vec('Queen'), we expect $\mathrm{MLP}_0(W_E(\text{'fifth'})) - kf_5 + kf_7$ (3) to be causally used by the model in a similar way to $\mathrm{MLP}_0(W_E(\text{'seventh'}))$ , where $k$ is a scaling factor (Appendix E).
97
+
98
+ We use our successor head to test this hypothesis. Observe that, if (3) behaves like $\mathrm{MLP}_0(W_E('seventh'))$ , applying the successor head to (3) (i.e. multiplying by $W_U W_{OV}$ ) should yield a distribution with more weight on 'eighth' than on any other token from the cardinal-word task in the succession dataset (Section 2). Indeed, this is correct as indicated by the circled checkmark $\odot$ in Figure 6. We can perform a similar experiment with all tokens in the succession dataset and with features other than $f_7$ added. The cases where the max logits are on the successor token are check-marked in Figure 6. We describe the experiment in more detail in Appendix E and we also display how logits are distributed across tokens for individual cells in Appendix Q. We find that when the mod 10 addition feature is larger than the source value (modulo 10), vector arithmetic works on $53\%$ (for months) and $89\%$ (for digits 20-29) of cases.
99
+
100
+ Greater-than bias. The vector arithmetic experiments (Figure 6) work much worse when the mod-10 addition is smaller than the source tokens's ordinal sequence position mod 10 (e.g. experiments involving 'March' and adding $f_{1}$ or $f_{2}$ do not go well). This is because Successor Heads are biased towards values greater than the successor, compared to values less than the successor. This effect can be seen in Figure 7a on the tokens 'first', 'second', ..., 'tenth'. However, our mod-10 features do not exhibit a greater-than bias, as seen in Figure 7b. We survey these effects across all tasks in Appendix I. As a result, using the mod-10 features to shift logits towards tokens of a lower order than the input token fails, as the changes in logits are not significant compared to the large logits on higher-order tokens. In the case of numbers, this leads to the effect that, for exam
101
+
102
+ ple, $W_U W_{OV}(\mathrm{MLP}_0(W_E('35')) - kf_5 + kf_3)$ has high logits on '43', rather than '33' (this $+10'$ effect occurs for 2/3 of entries below the diagonal in the 20-29 numbers table of Figure 6).
103
+
104
+ ![](images/82ca62ee4db4e26f9743df00f2273183da91c1627a08d252ddb2e1f5f1f80b94.jpg)
105
+ Figure 3: The activations of $t_i$ 's most important feature (y-axis) in the SAE-decomposition of $t_j$ (x-axis), for $t_i, t_j$ numeric tokens. Values averaged over 100 SAE training runs.
106
+
107
+ ![](images/f34cbf9acc37fbbe9d03dbe39341eb4c3b76b004c7bbd705f70a6a3aeb51479d.jpg)
108
+ Figure 4: The logit value for $t_j$ ( $x$ -axis) when unembedding the most important feature of $t_i$ ( $y$ -axis), for $t_i, t_j$ numeric tokens. Values averaged over 100 SAE training runs.
109
+
110
+ ![](images/65150c3bdcf8e30c56a84cc5e7c2ce6d856d943558d203547dae3d4d55bc7420.jpg)
111
+ Figure 5: Logit distribution $W_{U}W_{OV}f_{i}$ for each mod-10 feature $f_{i}$ .
112
+
113
+ Limitations: The absence of a strong greater-than bias in our mod 10 features suggests this feature-level description is missing some details – specifically, that successor heads must use other numeric information to produce the greater-than bias we observe. Additionally, while we see a good generalization of the mod 10 features across various tasks in the table in Figure 6, the mod 10 features are not able to steer the Days and Letters tasks from Section 2. We describe this in Appendix F.
114
+
115
+ # 4 SUCCESSOR HEADS IN THE WILD
116
+
117
+ In this section, we analyze the behaviour of successor heads within natural-language datasets, and observe that they aren't simply responsible for incrementation: indeed, we identify four distinct, interpretable categories of successor head behavior, highlighting successor heads as an example of an interpretably polysemantic attention head 'in the wild'.
118
+
119
+ In order to characterize the behavior of Pythia-1.4B's successor head on natural-language data, we randomly sample 128 length-512 contexts from The Pile, and for each prefix of each context, we assess whether the successor head is important for the model's ability to predict the correct next token. To measure importance, we use direct effect mean ablation, which involves patching the output of a head with its mean output over a chosen distribution (in this case, the same batch), and, at the very end of the model, subtracting this mean output and adding the original head output to the residual stream (other effects and ablation methods are explored in Appendix M). We evaluate prefixes using two different metrics for per-prompt successor head importance:
120
+
121
+ Winning cases. We identify prefixes where the head that most decreases the logit for the correct next token under direct effect mean ablation is the successor head, denoting them as winning cases.
122
+
123
+ <table><tr><td></td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr><tr><td>20</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>21</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td>✓</td><td>✓</td></tr><tr><td>22</td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>23</td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>✓</td></tr><tr><td>24</td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>25</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>26</td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td></td><td>✓</td></tr><tr><td>27</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td></td><td></td></tr><tr><td>28</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td></tr><tr><td>29</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td></tr><tr><td>ten</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr><tr><td>eleven</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>twelve</td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>✓</td><td></td></tr><tr><td>thirteen</td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>fourteen</td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr><tr><td>fifteen</td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>✓</td></tr><tr><td>sixteen</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>seventeen</td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>eighteen</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>nineteen</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>twenty</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td></td><td>✓</td></tr></table>
124
+
125
+ <table><tr><td></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>0</td></tr><tr><td>January</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>February</td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>March</td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>April</td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>May</td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td></tr><tr><td>June</td><td></td><td></td><td>✓</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td></tr><tr><td>July</td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td></tr><tr><td>August</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td></td></tr><tr><td>September</td><td></td><td></td><td>✓</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td></tr><tr><td>first</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>second</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>third</td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td></tr><tr><td>fourth</td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td></td></tr><tr><td>fifth</td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td></tr><tr><td>sixth</td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td></tr><tr><td>seventh</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td></tr><tr><td>eighth</td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td></tr><tr><td>ninth</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td></td></tr></table>
126
+
127
+ Example: The circled case (3) has a source token of 'fifth' and a target residue of 7, and it is ticked because vector arithmetic leads to this token being successfully treated like 'seventh')
128
+
129
+ Figure 6: Table displaying cases in which vector arithmetic such as (3) is successful for various ranges of tokens. Other ranges of tokens give similar results, as displayed in Appendix P. Rows: source tokens. Columns: target residues modulo 10.
130
+ ![](images/c62523a09daa05ef04f0da0efdf143718ff4cd26df7176189c228ae6ed17aa43.jpg)
131
+ (a) Evaluating the effective OV circuit on the input and output tokens 'first', 'second', ..., 'tenth'.
132
+
133
+ Figure 7: The Successor Head OV circuit displays a clear bias against decrementation (Figure 7a), i.e. the logits on or above the main diagonal are less than the logits below the main diagonal. This bias isn't captured in the mod 10 feature (Figure 7b).
134
+ ![](images/f62982c41a6f0537961ad291cac54b0cd332f215f295ebecbf11fe71634ecf43.jpg)
135
+ (b) Multiplying all mod 10 features $f_{i}$ by $W_{U}W_{OV}$ .
136
+
137
+ Loss-reducing cases. We identify prefixes $\mathfrak{p}$ where direct effect mean ablation of the successor head increases next-token prediction loss (by $\Delta \mathcal{L}(\mathfrak{p})$ ), denoting them as loss-reducing cases.
138
+
139
+ # 4.1 INTERPRETABLE POLYSEMANTICITY IN SUCCESSOR HEADS
140
+
141
+ On analyzing prefixes where the successor head is particularly important for next-token prediction - i.e. loss-reducing and winning cases - we observe four main categories of behavior, which we operationalize as follows (denoting a top- $n$ -attended token as a token at one of the top $n$ positions to which the successor head attends most strongly):
142
+
143
+ Successorship behavior: the successor head pushes for the successor of a token in the context. We say this behavior occurs when one of the top-5-attended tokens is in the successorship dataset, and the correct next token is the successor of $t$ .
144
+
145
+ Acronym behavior: the successor head pushes for an acronym of words in the context. We say this behavior occurs when the correct next token is an acronym whose last letter corresponds to the first letter of the top-1-attended token. (For example, if the successor head attends most strongly to the token 'Defense', and the correct next token is 'OSD').)
146
+
147
+ Copying behavior: the successor head pushes for a previous token in the context. We say this behavior occurs when the correct next token $t$ has already occurred in the prompt, and token $t$ is one of the top-5-attended tokens.
148
+
149
+ Greater-than behavior: the successor head pushes for a token greater than a previous token in the context. We say this behavior occurs when we do not observe successorship behavior, but when the correct next token is still part of an ordinal sequence and has greater order than some top-5-attended token (e.g. if the successor head attends to the token 'first' and the model predicts the token 'third').
150
+
151
+ ![](images/c41fca1901b276cf110a8db506ed084ce0f9cbbac35570b0059709def4de9c9b.jpg)
152
+ Proportions of behaviours in winning cases
153
+ Figure 8: Proportions of three dominant behaviors across winning cases.
154
+
155
+ <table><tr><td>Prompt</td><td>Completion</td></tr><tr><td>(...) [@B2] Hence, bonding to ceramic requires strict attention to detail for optimal clinical outcomes.@B</td><td>3</td></tr><tr><td>(...) designated as boxazomycin A and</td><td>B</td></tr><tr><td>(...) called Generalized Single Step Single Solve (</td><td>GS</td></tr><tr><td>(...) More than two-</td><td>thirds</td></tr><tr><td>(...) where one or more access points (</td><td>AP</td></tr></table>
156
+
157
+ ![](images/d4c69027c8922ab8df1e9254a275a09acd39e8de4992064e59bc55c0daf3c936.jpg)
158
+ Proportions of behaviours in most loss reducing cases
159
+ Figure 10: Proportions of reduced loss $(\Delta \mathcal{L})$ attributable to prompts of each behaviour.
160
+
161
+ Figure 9: Random sample of 5 winning cases. Negligibly many winning cases were copying.
162
+
163
+ <table><tr><td>Prompt</td><td>Completion</td></tr><tr><td>(...) low-dose administration of 14- and</td><td>15</td></tr><tr><td>(...) in the second round, let&#x27;s get it to the</td><td>third</td></tr><tr><td>(...) for 1) investigators to ask the missionaries,</td><td>2</td></tr><tr><td>(...) You are using Microsoft Test Manager (</td><td>MT</td></tr><tr><td>(...) known as the Medical Research Council Technology (</td><td>MR</td></tr></table>
164
+
165
+ Figure 11: The top 5 most loss reducing examples.
166
+
167
+ We plot the proportions of each behavior observed across winning cases in Figure 8, and the fraction of total reduced loss over all contexts $(\Delta \mathcal{L})$ attributable to contexts of each behavior in Figure 10. We also illustrate a random sample of 5 winning cases in Figure 9, and of 5 loss-reducing cases in Figure 11. We observe that, while successorship is the predominant behavior across both winning and loss-reducing cases, acronym and greater-than behaviors also form a non-negligible fraction of successor head behavior. In other words, the successor head is an example of an attention head with interpretable polysemanticity<sup>5</sup>. While polysemanticity has been observed in both vision models (Olah et al., 2020) and toy models trained to perform simple tasks (Elhage et al., 2022), to the best of our knowledge the presence of both successorship and acronym behavior in head L12H0 is the cleanest example of polysemantic behavior identified so far in an LLM, where we show two clear distinct behaviors: one model component has. Finally, this finding is surprising given research into polysemanticity and superposition (Elhage et al., 2022; Bricken et al., 2023). The succession and acronym behaviors are different tasks that L12H0 completes, yet they are not independent tasks
168
+
169
+ occur in completely different contexts (this is because a token completion could involve both succession and an acronym, e.g 'the First Limited Corporation,' could be completed with 'Second' or 'FLC').
170
+
171
+ Note that in this section, while we identified that successor heads are often used in tasks involving incrementation, we did not explicitly demonstrate that successor heads are necessary for incrementation. In Appendix K we describe an experiment that reveals that successor heads are necessary for a specific incrementation task (numbered listing).
172
+
173
+ # 5 RELATED WORK
174
+
175
+ Mechanistic Interpretability research aims to reverse engineer trained neural networks analogously to how software binaries can be reverse-engineered (Olah, 2022). This research was largely developed in vision models (Bau et al., 2017; Olah et al., 2017) though most recent research has studied language models (Elhage et al., 2021; Olsson et al., 2022; Gurnee et al., 2023) and transformers (Nanda et al., 2023). Olah et al. (2020) introduces the universality hypothesis and we use Chughtai et al. (2023)'s 'weak universality' notion in this work (Section 1).
176
+
177
+ Transformer circuits. More specifically, our work builds from the insights of Elhage et al. (2021)'s framework for understanding circuits in transformers, including how autoregressive transformers have a residual stream. Due to the residual stream, different paths from input to output can bypass as many attention heads and MLPs as necessary. This has further been explored in specific case studies (Wang et al., 2023; Goldowsky-Dill et al., 2023) and generalizes to backwards passes (Du et al., 2023). One related case study to our work is Hanna et al. (2023) which studies a Greater-Than circuit in GPT-2 Small, similar to how we indirectly found the Greater-Than operation in Section 3. Hanna et al. (2023) focus mainly on numbers, not other tasks. Our work is inspired by Olsson et al. (2022) who study induction heads and find that heads with similar attention patterns exist in larger models. In our work we provide an end-to-end explanation of generalizing language model components (Figure 1), though induction heads are related to in-context learning and a consistent phase change in training, which we didn't observe for successor heads (Appendix H).
178
+
179
+ LLMs and vector arithmetic. Mikolov et al. (2013)'s seminal work on word embedding arithmetic showed that latent language model representations had compositionality, e.g. vec('King') - vec('Man') + vec('Woman') $\approx$ vec('Queen'). Recently Merullo et al. (2023) showed some extension of these arithmetic results to LLMs. L (2023) found that 'one is 1' and that similar heads in GPT-2 Small boost successors numbers, months and days, which we generalize to more architectures and to an end-to-end circuit (Figure 1). Lan & Barez (2023) also use an automated approach to study the overlap of these tasks. Finally, Subramani et al. (2022); Li et al. (2023) and Turner et al. (2023) use residual stream additions to steer models. Our work differs in that it considers shallow targeted paths through networks, rather than deep hidden states in networks.
180
+
181
+ # 6 CONCLUSION
182
+
183
+ In this work, we discovered and interpreted a class of attention heads we call successor heads. We showed that these heads increment tokens in ordinal sequences like numbers, months, and days, and that the representations of the tokens are compositional and contain interpretable, abstract 'mod-10' features. We provided evidence that successor heads exhibit a weak form of universality, arising in models across different architectures and scales (from 31M to 12B parameters), and using similar underlying mod-10 features in all cases. Finally, we validated our understanding by demonstrating that a successor head reduced the loss on training data by predicting successor tokens.
184
+
185
+ Additional numeric representation findings relevant to future work include:
186
+
187
+ 1. Finding a 'greater-than bias', where a language model was much more likely to predict numeric answers larger than the values in the prompt, compared to smaller values than tokens present in the prompt, that was observable by a weights-level analysis.
188
+ 2. Surprisingly interpretable individual MLP0 neurons on this narrow task.
189
+ 3. A novel example of attention head polysemanticity (successor heads predicting acronyms).
190
+
191
+ # 7 ACKNOWLEDGEMENTS
192
+
193
+ We would like to thank Bilal Chughtai, Théo Wang and reviewers for comments on a draft of this work and Neel Nanda for a helpful discussion, as well as Lawrence Chan and Sebastian Farquhar for pieces of advice. Elizabeth Ho, Will Harpur-Davies and Andy Zhou worked on an early version of this work in GPT-2 Small with help from Théo Wang.
194
+
195
+ Contributions from each author: Rhys Gould first found successor heads in GPT-2 Small and Pythia1.4B, and identified the mechanism from Figure 1 as well as the mod-10 features. Euan Ong developed Appendix A, improved our understanding, and worked on writing across the paper. George Ogden found successor heads in larger models (e.g Figure 2). Arthur Conmy led the project, framed the paper's contributions and suggested and implemented several experiments throughout the work.
196
+
197
+ # REFERENCES
198
+
199
+ David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations, 2017. 9
200
+ Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens, 2023. 18
201
+ Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling, 2023. 18
202
+ Steven Bills, Nick Cammarata, Dan Mossing, Henk Tillman, Leo Gao, Gabriel Goh, Ilya Sutskever, Jan Leike, Jeff Wu, and William Saunders. Language models can explain neurons in language models. https://openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html, 2023.2
203
+ Trenton Bricken, Adly Templeton, Joshua Batson, Brian Chen, Adam Jermyn, Tom Conerly, Nick Turner, Cem Anil, Carson Denison, Amanda Askell, Robert Lasenby, Yifan Wu, Shauna Kravec, Nicholas Schiefer, Tim Maxwell, Nicholas Joseph, Zac Hatfield-Dodds, Alex Tamkin, Karina Nguyen, Brayden McLean, Josiah E Burke, Tristan Hume, Shan Carter, Tom Henighan, and Christopher Olah. Towards monoseismicity: Decomposing language models with dictionary learning. Transformer Circuits Thread, 2023. https://transformercircuits.pub/2023/monoseismic-features/index.html. 4, 8
204
+ Bilal Chughtai, Lawrence Chan, and Neel Nanda. A toy model of universality: Reverse engineering how networks learn group operations, 2023. URL https://arxiv.org/abs/2302.03025.2,9
205
+ Arthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adrià Garriga-Alonso. Towards automated circuit discovery for mechanistic interpretability, 2023. 2
206
+ Stanford CRFM. Mistral: A framework for transparent and accessible large-scale language model training. https://github.com/stanford-crfm/mistral, 2021.18
207
+ Hoagy Cunningham, Aidan Ewart, Logan Riggs, Robert Huben, and Lee Sharkey. Sparse autoencoders find highly interpretable features in language models, 2023. 4, 13, 14
208
+ Kevin Du, Lucas Torroba Hennigen, Niklas Stoehr, Alexander Warstadt, and Ryan Cotterell. Generalizing backpropagation for gradient-based interpretability, 2023. 9
209
+ Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. A mathematical framework for transformer circuits. Transformer Circuits Thread, 2021. URL https://transformer-circuits.pub/2021/framework/index.html. 2, 3, 9
210
+
211
+ Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al. Toy models of superposition. arXiv preprint arXiv:2209.10652, 2022. 1, 2, 5, 8
212
+ Nicholas Goldowsky-Dill, Chris MacLeod, Lucas Sato, and Aryaman Arora. Localizing model behavior with path patching, 2023. 9
213
+ Wes Gurnee, Neel Nanda, Matthew Pauly, Katherine Harvey, Dmitrii Troitskii, and Dimitris Bertsi-mas. Finding neurons in a haystack: Case studies with sparse probing, 2023. 9
214
+ Michael Hanna, Ollie Liu, and Alexandre Variengien. How does gpt-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model, 2023. 2, 9
215
+ Stefan Heimersheim and Jett Janiak. A circuit for Python docstrings in a 4-layer attention-only transformer, 2023. URL https://wwwalignmentforum.org/posts/u6KXXmKFbXfWzoAXn/a-circuit-forpython-docstrings-in-a-4-layer-attention-only. 2
216
+ Mikhail L. One is 1: Analyzing activations of numerical words vs digits 1, Jul 2023. 9
217
+ Michael Lan and Fazl Berez. Locating cross-task sequence continuation circuits in transformers, 2023. 9
218
+ Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. Inference-time intervention: Eliciting truthful answers from a language model, 2023. 9
219
+ Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. Convergent learning: Do different neural networks learn the same representations?, 2016. 2
220
+ Callum McDougall, Arthur Conmy, Cody Rushing, Thomas McGrath, and Neel Nanda. Copy suppression: Comprehensively understanding an attention head. arXiv preprint, 2023. 3
221
+ Thomas McGrath, Matthew Rahtz, Janos Kramar, Vladimir Mikulik, and Shane Legg. The hydra effect: Emergent self-repair in language model computations, 2023. 21
222
+ Jack Merullo, Carsten Eickhoff, and Ellie Pavlick. Language models implement simple word2vec-style vector arithmetic, 2023. 9
223
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality, 2013. 5, 9
224
+ Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. Progress measures for grokking via mechanistic interpretability. In *The Eleventh International Conference on Learning Representations*, 2023. URL https://openreview.net/forum?id=9XFSbDPmdW.1,9
225
+ Andrew Ng. Sparse autoencoder. Online Course Notes, Stanford University, 2011. URL https://web.stanford.edu/class/cs294a/sparseAutoencoder.pdf.4
226
+ Chris Olah. Mechanistic interpretability, variables, and the importance of interpretable bases. https://www.transformer-circuits.pub/2022/mech-interp-essay, 2022.1,9
227
+ Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. doi: 10.23915/distill.00007. https://distill.pub/2017/features-visualization.9
228
+ Chris Olah, Nick Cammarata, Ludwig Schubert, Gabriel Goh, Michael Petrov, and Shan Carter. Zoom in: An introduction to circuits. Distill, 2020. doi: 10.23915/distill.00024.001. 2, 8, 9
229
+ Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads, 2022. URL https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html.1,9
230
+
231
+ OpenAI. Gpt-4 technical report, 2023. 1
232
+ Judea Pearl. Causality. Cambridge University Press, 2 edition, 2009. ISBN 978-0-521-89560-6. doi: 10.1017/CBO9780511803161.21
233
+ Lee Sharkey, Dan Braun, and Beren Millidge. [interim research report] taking features out of superposition with sparse autoencoders, 2022. URL https://www.lesswrong.com/posts/z6QQJbtpkEAX3Aojj/interim-research-report-taking-features-out-of-superposition.13,14
234
+ Nishant Subramani, Nivedita Suresh, and Matthew E. Peters. Extracting latent steering vectors from pretrained language models, 2022. 9
235
+ Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023. 2
236
+ Alexander Matt Turner, Lisa Thiergart, David Udell, Gavin Leech, Ulisse Mini, and Monte MacDiarmid. Activation addition: Steering language models without optimization, 2023. 9
237
+ Kevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, and Jacob Steinhardt. Interpretability in the wild: a circuit for indirect object identification in GPT-2 small. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=NpsVSN6o4ul.1,2,9
238
+ Zhengxuan Wu, Atticus Geiger, Christopher Potts, and Noah D. Goodman. Interpretability at scale: Identifying causal mechanisms in alpaca, 2023. 2
239
+
240
+ # A ORDINAL SEQUENCES ARE REPRESENTED COMPOSITIONALLY
241
+
242
+ Let $i_s$ denote the $i$ th token in ordinal sequence $s$ (such that e.g. 2Month corresponds to the token 'February'), and let $[[i_s]] = \mathrm{MLP}_0(W_E(i_s))$ denote the model's internal $\mathbf{MLP}_0$ -representation of token $i_s$ (the output of $\mathrm{MLP}_0$ in Figure 1).
243
+
244
+ Given successor heads $S = W_{OV}$ can increment tokens $s_i$ from a range of ordinal sequences $s$ (e.g. numbers, months, days of the week), one might hypothesise that the $\mathrm{MLP}_0$ -representations of such tokens have compositional structure - i.e. that information about a token's position $i$ in its ordinal sequence is encoded independently from information about which ordinal sequence $s$ it comes from. More precisely, we claim that we can decompose representations $[[i_s]]$ into features $\mathbf{v}_i$ living in some 'index space' and $\mathbf{v}_s$ living in some 'domain space', such that $[[i_s]] = \mathbf{v}_i + \mathbf{v}_s$ .
245
+
246
+ Method. To test this compositionality hypothesis, we wish to learn two linear maps - an index-space projection $\pi_{\mathbb{N}}: \mathbb{R}^{d_{\mathrm{model}}} \to \mathbb{R}^{d_{\mathrm{model}}}$ and a domain-space projection $\pi_D: \mathbb{R}^{d_{\mathrm{model}}} \to \mathbb{R}^{d_{\mathrm{model}}} -$ such that, for all pairs of tokens $i_s$ and $j_t$ (with $i_t$ a valid token), $\llbracket i_t\rrbracket := \pi_{\mathbb{N}}(\llbracket i_s\rrbracket) + \pi_D(\llbracket j_t\rrbracket) \approx \llbracket i_t\rrbracket$ . To do so, we enforce that $\pi_{\mathbb{N}} + \pi_D = I$ , and ensure predicted representations $\llbracket i_t\rrbracket$ 'behave like' ground truth representations $\llbracket i_t\rrbracket$ for randomly sampled pairs of tokens $i_s$ and $j_t -$ in other words, that there is low $L_2$ -distance between $\llbracket i_t\rrbracket$ and $\llbracket i_t\rrbracket$ , that $\llbracket i_t\rrbracket$ decodes to $i_t$ (output-space decoding), and that $S(\llbracket i_t\rrbracket)$ decodes to $(i + 1)_t$ (successor decoding). For full experimental details see Appendix N.
247
+
248
+ <table><tr><td rowspan="2" colspan="2"></td><td colspan="12">Source index token (iRom)</td></tr><tr><td>I</td><td>II</td><td>III</td><td>IV</td><td>V</td><td>VI</td><td>VII</td><td>VIII</td><td>IX</td><td>X</td><td>XI</td><td>XII</td></tr><tr><td rowspan="8">Sequence token (1s)</td><td>1</td><td>9</td><td>2</td><td>3</td><td>4</td><td>22</td><td>6</td><td>7</td><td>8</td><td>9</td><td>24</td><td>11</td><td>12</td></tr><tr><td>one</td><td>nine</td><td>two</td><td>three</td><td>four</td><td>twenty</td><td>six</td><td>seven</td><td>eight</td><td>nine</td><td>twenty</td><td>eleven</td><td>twelve</td></tr><tr><td>first</td><td>ninth</td><td>second</td><td>third</td><td>fourth</td><td>second</td><td>sixth</td><td>seventh</td><td>eighth</td><td>ninth</td><td>fourth</td><td>-</td><td>-</td></tr><tr><td>Monday</td><td>Sunday</td><td>Tuesday</td><td>Wednesday...</td><td>Thursday</td><td>Tuesday</td><td>Saturday</td><td>Sunday</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Mon</td><td>Sep</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Tue</td><td>Sat</td><td>Sun</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>January</td><td>Septem...</td><td>February</td><td>March</td><td>April</td><td>February</td><td>June</td><td>July</td><td>August</td><td>Septem...</td><td>Decem...</td><td>Novem...</td><td>Decem...</td></tr><tr><td>Jan</td><td>Sep</td><td>Feb</td><td>Mar</td><td>Apr</td><td>Feb</td><td>Jun</td><td>Jul</td><td>Aug</td><td>Sep</td><td>Dec</td><td>Nov</td><td>Dec</td></tr><tr><td>A</td><td>I</td><td>B</td><td>C</td><td>D</td><td>V</td><td>F</td><td>G</td><td>H</td><td>I</td><td>X</td><td>W</td><td>L</td></tr></table>
249
+
250
+ Table 2: A table presenting top-1 predicted tokens under output-space decoding from $\pi_D(1_s) + \pi_{\mathbb{N}}(i_{\mathrm{Rom}})$ . Green cells denote predictions which match their target exactly; red cells denote incorrect predictions. Dashed cells denote pairs of $1_s$ and $i_{\mathrm{Rom}}$ for which $i_s$ is not a valid (single) token.
251
+
252
+ Results. On our held-out dataset of token pairs, we obtained a top-1 output-space decoding accuracy of 1.00. To explore out-of-distribution performance, we also test whether $\pi_{\mathbb{N}}$ can project out the numeric component of Roman numerals (which weren't in the successor dataset), by taking Roman numerals $i_{\mathrm{Rom}} \in \{\mathrm{I}, \dots, \mathrm{XII}\}$ and tokens $1_s$ from sequences $s$ in the successor dataset, and testing whether $\pi_D(1_s) + \pi_{\mathbb{N}}(i_{\mathrm{Rom}})$ decodes to $i_s$ . We present the top-1 predicted tokens under output-space decoding in Table 2: observe that we obtain perfect top-1 accuracy (apart from $i \in \{1, 5, 10\}$ , which we can attribute to the Roman numerals I, V and X being single-letter and impossible to disambiguate from $9_{\mathrm{Letter}}$ , $22_{\mathrm{Letter}}$ and $24_{\mathrm{Letter}}$ ).
253
+
254
+ These results – in particular, our ability to project the numeric component out of tokens from unseen sequences and transfer indices across domains – suggest that there is a shared numeric subspace storing the index of a token within its ordinal sequence. Indeed, informal testing suggests that this numeric subspace may be interpretable even for tokens not part of an ordinal sequence: for instance, $d(\pi_{\mathbb{N}}([\{\cdot^{\prime}\text{ triangle}^{\prime}\}]) + \pi_{D}(1_{\mathrm{Num}}))$ yields $3_{\mathrm{Num}}$ , and $d(\pi_{\mathbb{N}}([\{\cdot^{\prime}\text{week}^{\prime}\}]) + \pi_{D}(1_{\mathrm{Num}}))$ yields $7_{\mathrm{Num}}$ .
255
+
256
+ We note in Appendix O, however, that applying the successor head to these learned representations did not always preserve performance (i.e. for a constructed representation $\mathbb{[}\hat{i}_t\mathbb{]}$ , $S(\mathbb{[}\hat{i}_t\mathbb{]})$ did not always decode to $(i + 1)_t$ ). This suggests our numeric projection $\pi_{\mathbb{N}}$ might be capturing slightly more than just the numeric subspace: specifically, there may be some components of domain-space which are ignored by output-space decoding, but which our successor head lifts into output-space.
257
+
258
+ # B SPARSE AUTO-ENCODERS
259
+
260
+ # B.1 DEFINITION
261
+
262
+ We refer to a single-layer autoencoder with a sparsity regularization term in its loss as a sparse auto-encoder.
263
+
264
+ For a dataset generated from a set of underlying vectors (each dataset example is a sparse linear combination of such vectors), it has been empirically observed (Sharkey et al., 2022; Cunningham et al., 2023) that sparse auto-encoders are capable of retrieving the underlying set of vectors. We hope to obtain a set of sparse, interpretable features from the SAEs that decompose some of the structure of $\mathrm{MLP}_0$ space that we can use to analyze the way numeric operations are performed.
265
+
266
+ # B.2 TRAINING PROCESS FOR MOD 10 FEATURES
267
+
268
+ Training a sparse auto-encoder with $D$ features and regularization coefficient $\lambda$ on a dataset of tokens in $\mathrm{MLP}_0$ space results in a map $F: \mathrm{Tokens} \to (\mathbb{R}^d \times \mathbb{R}_+)^D$ , with $F(x) = \{(\mathbf{v}_1, a_1), \dots, (\mathbf{v}_D, a_D)\}$ , mapping a token to a set of feature and feature-activation pairs, with reconstruction $R(x) = \sum_{i=1}^{D} a_i \mathbf{v}_i$ . Each $\mathbf{v}_i$ the ReLU of a linear transformation with the input to the SAE, represented by $W_e$ in Figure 12. Note that we use SAEs in $\mathrm{MLP}_0$ space, i.e., the reconstruction loss is at the middle stage of Figure 1 which we have illustrated in Figure 12.
269
+
270
+ We train the SAE using number tokens from 0 to 500, both with and without a space ('123' and '123'), alongside other tasks, such as number words, cardinal words, days, months, etc. $90\%$ of
271
+
272
+ ![](images/9e41a981f2567d7a642f14bf9081cf66927e8828ee5eb10d14a607add3a9432b.jpg)
273
+ Figure 12: SAEs are trained on the activation after $\mathrm{MLP_0}$ and before $W_{OV}$ .
274
+
275
+ these tokens go into the train set, and the remaining $10\%$ to the validation set. Even with the other tasks, the dataset is dominated by numbers, but creating a more balanced dataset would give us less data to work with, and without enough data, the SAE fails to generalize to the validation set. Hence, we only concern ourselves with the features that the SAE learns for number tokens, and we then separately check whether these features generalize to the other tasks on the basis of logits, rather than SAE activations.
276
+
277
+ We used the hyperparameters $D = 512$ and $\lambda = 0.3$ , with a batch size of 64, and trained for 100 epochs. To find these hyperparameters, we used the metric of mean max cosine similarity between two trained SAEs, as described in Sharkey et al. (2022) and Cunningham et al. (2023).
278
+
279
+ # B.3 UNIVERSALITY OF MOD-10 RESULTS
280
+
281
+ We also observe the mod 10 structure via SAEs across models other than Pythia-1.4B, without any finetuning of SAE parameters to these models. We reproduce the SAE figures seen in Section 3.1 for other models, with Appendix B.3 for Pythia-2.8B, and Appendix B.3 for celebrimbor-gpt2-mediumx81.
282
+
283
+ # C TEST SET EVALUATION
284
+
285
+ # C.1 LINEAR PROBING
286
+
287
+ We train a linear probe to predict the mod 10 value of tokens. Specifically, we train on number tokens from '0' to '500', both with and without a space, assigning $90\%$ of tokens to a train set, and the remaining $10\%$ to a validation set. We use a learning rate of 0.001, and a batch size of 32, for 100 epochs.
288
+
289
+ We then evaluate on a dataset of unseen tasks, including number words (from 'one' to 'nineteen'), placements, Roman numerals, months, days, and any valid spaced and capitalized variants. Out of the total 102 such examples, 94/102 are correct, and the 8 failures are: ['January', 'December', 'Friday', 'Saturday', 'Sunday', 'V', 'X', 'XV'].
290
+
291
+ The failures of 3 out of 7 days are consistent with our inability to interpret the day task well with our mod 10 features. Additionally, we see 'January' and 'December' as failure cases, which is also consistent with our finding that there does not seem to be a mod 10 feature that corresponds to any of them: $f_{1}$ behaves as 'November' rather than 'January', and $f_{2}$ as 'February'.
292
+
293
+ ![](images/54c07a9f2f2c393989aae5dcfc4ca4206d131bb06e8a75bcbcdbf9ad3cc87294.jpg)
294
+ (a) SAE feature activations
295
+
296
+ ![](images/62a064951dc6b5caa8544a52813edf01e21b16a221e756e8196ae6c7c6003a2f.jpg)
297
+ (b) Feature logit distribution
298
+
299
+ ![](images/4d0895fc67f2fcb58826de2e2e118ecc436be8f2988098429ac4457976a0ae61.jpg)
300
+ (c) Logit distribution for each mod-10 feature
301
+ Figure 13: SAE plots for Pythia-2.8B analogous to Figure 3, Figure 4, and Figure 5.
302
+
303
+ ![](images/147c383f4796d14006528ca997489674f5ff08989367d30c7ab57b968f117ac7.jpg)
304
+ (a) SAE feature activations
305
+
306
+ ![](images/c5b67ee45e8bc419d50f7d80d745e24fd1087cd23c78cff450ab440ff5831b85.jpg)
307
+ (b) Feature logit distribution
308
+
309
+ ![](images/4aba6e9d928fbaf6efd8d8c24d331cbae5c2098964e1c83706f21523a9b7cf13.jpg)
310
+ (c) Logit distribution for each mod-10 feature
311
+ Figure 14: SAE plots for celebrimbor-gpt2-medium-x81 analogous to Figure 3, Figure 4, and Figure 5
312
+
313
+ ![](images/928b15d853cb70b51acc0989ffd23ddbf59aeb0b888403563d9d258f65a95c6a.jpg)
314
+ Figure 15: (Left) Succession scores for the Roman numerals task only.
315
+
316
+ In this work, we used all tokens in numeric sequences in the models' vocabularies, except Roman numerals, so can use these as a test set, as in Appendix C.1 and Appendix N. We tested all the OpenAI GPT-2 models as well as the Pythia models with at least 1B parameters. We find that Successor Heads have variable performance on this held out task, with many (including all Pythia models) achieving a high succession score. However, the original Llama-7B does not generalize well to this task.
317
+
318
+ # C.2 HELD-OUT TASK
319
+
320
+ # D $\mathrm{MLP}_0$ NEURONS
321
+
322
+ In our $\mathrm{MLP}_0$ neuron experiments, we do the following: for each $T\in \{0^{\prime},1^{\prime},\ldots ,99^{\prime}\}$ , we ablate each neuron from the final activation in $\mathrm{MLP}_0$ (the final activation is just before the final linear layer of $\mathrm{MLP}_0$ ), and store the probability attributed to the successor of $T$ after passing the modified (due to ablation) $\mathrm{MLP}_0$ output through the successor.
323
+
324
+ Averaging the correct probabilities across all 100 prompts then gives an averaged correct probability for each neuron after ablation. We then look at the intensities (neuron activation values) and logits across inputs of number tokens for neurons with the lowest correct probability after ablation, meaning they have the most impact on successorship when ablated. This gives us the plots seen in Figure 22.
325
+
326
+ # E ARITHMETIC EXPERIMENTS
327
+
328
+ For a token $t$ (row of arithmetic table) with order $n \coloneqq \operatorname{ord}(t)$ , and mod-10 feature $f_{i}$ (column of arithmetic table), we consider how $x \coloneqq \mathrm{MLP}_0(W_E(t)) + k(-f_n + f_i)$ attributes logits to tokens within the same task as $t$ , with $k \in \mathbb{R}_{+}$ a scaling. We denote whether $x$ correctly attributes maximal logits to the successor token $t^{+}$ of $t$ (defined by the property that $\mathrm{ord}(t^{+}) = n + 1$ ) by a checkmark, as seen in Figure 6. Since the mod-10 features $\{f_i\}_i$ obtained from the SAE are normalized to unit norm, the scaling $k$ is necessary in order to modify the order of a numeric token. For example, though $f_{1}$ may be present in the $\mathrm{MLP}_0$ embedding of 'eleven', we do not know the intensity of the feature (analogous to SAE feature strengths $\{\alpha_i(t)\}_i$ ) in the embedding. We use the heuristic of a scaling $k \coloneqq \lambda (\mathrm{MLP}_0(W_E(t)) \cdot f_n \in \mathbb{R}$ for some $\lambda \in \mathbb{R}_{+}$ . The appropriate $\lambda$ should be such that performing the arithmetic described by $x$ has an effect on the embedding's numeric order (i.e. $\lambda$ large enough) while not corrupting the task identity of the original embedding (i.e. $\lambda$ not too large), which is checked by multiplying $x$ by $W_U W_{OV}$ and observing whether the top token has these two properties (that is, whether the numeric order of the token has been altered while maintaining the same task identity of, say, a month). By checking this criterion for a range $\lambda \in$
329
+
330
+ ![](images/629af205f7037ddfdf39d2065af49799627de5f6cb66a76748d92c1b76b23b57.jpg)
331
+ (a) Output logits for successor heads on day tokens (cf. Fig. 7a)
332
+
333
+ ![](images/3b7cf5f0792d3dbec016059136ce7481641e1618e0f459cc4b2bbbad836dd4cc.jpg)
334
+ (b) Presence of mod-10 Features on Day Token Predictions (cf. Fig. 7b)
335
+
336
+ ![](images/4092b6f6f0f59cd18cd51fda4dac07c3bb2087ef42ab3597e5c7b37440c6f78e.jpg)
337
+ (c) Output logits for successor heads on letter tokens (cf. Fig. 7a)
338
+ Figure 16: Comparative analysis of output logits for day and letter tasks and presence of mod-10 features. This complements the main text analysis in Figures 7a and 7b, limitations of mod-10 features across certain tasks successor heads perform.
339
+
340
+ ![](images/121625add8de71f4268d8391334429d2585f383d40ee85cd159f79fbf067b282.jpg)
341
+ (d) Presence of mod-10 features on letter tokens (cf. Fig. 7b)
342
+
343
+ $\{0.0, \dots, 0.75, 1.0, 1.25, \dots, 3.0\}$ , we find that $\lambda = 1$ achieves this criterion for all tasks other than months, where months instead have $\lambda = 2$ .
344
+
345
+ # F FAILURE CASES OF MOD 10 FEATURES
346
+
347
+ For the day and alphabet task, analogously to Figure 7, we look at the logits across the task and the mod 10 features. These are displayed in Figure 16, and demonstrate that our mod 10 features are not very interpretable in the context of days and the alphabet in terms of logits, with no clear diagonal of high logits.
348
+
349
+ # G RESIDUAL CONNECTIONS ARE NOT IMPORTANT FOR SUCESSION
350
+
351
+ To show that there is no relevant information in the residual stream, i.e. the path $W_{U}\mathrm{MLP}_{0}(W_{E})$ is not sufficient to predict successors, we perform an experiment using the Tuned Lens (Belrose et al., 2023), which approximates the optimal predictions after a given layer inside a transformer.
352
+
353
+ For all tasks in the succession dataset (Section 2), we used prompt formats (where | denotes a gap between tokens)
354
+
355
+ 1. |Here| is| a| list|:| alpha| beta| gamma| and| here| is| another|:||<token1>|
356
+ 2. |The|Monday|Tuesday|Wednesday| and| The|<token1>|
357
+
358
+ in order to measure how well models were able to predict the successor <token2> (e.g 'February') given the final token of the prompt was <token1> (e.g 'January'), as LLMs, predict successors given these prompts.
359
+
360
+ We then took GPT-2 Small and Pythia-1.4B's output after $\mathrm{MLP}_0$ and used the Tuned Lens to get logits on output tokens. $^6$ The resulting successor score was $< 1\%$ and commonly predicted bigrams, such as $\langle \text{token}1 \rangle =$ " first" giving " time" as a completion and $\langle \text{token}1 \rangle =$ ' Sunday' giving ' morning' as a prediction. This suggests that $\mathrm{MLP}_0$ information is insufficient for incrementation and the successor head is critical for succession.
361
+
362
+ # H TESTING SUCCESSOR SCORE OVER TRAINING STEPS
363
+
364
+ Another line of evidence that Successor Heads are an important model component for low training loss can be found by studying successor scores across training points. We study a Pythia model (Biderman et al., 2023) as well as a Stanford GPT model (CRFM, 2021), as these models have training checkpoints. The emergence of Successor Heads throughout training is displayed in Figure 17.
365
+
366
+ ![](images/65ef1b614e790bf273d7435eca1fbc63019cac5e178ec2dddb726eb7d7f98283.jpg)
367
+ (a) Pythia models
368
+
369
+ ![](images/7c195314596de64bd0a2fbd05637a510b8321ff60cfd514836032538d2198507.jpg)
370
+ (b) Stanford GPT-2 Medium-C
371
+
372
+ ![](images/2cebad21b27df1b34a20c89d90a4353357ba7d5433ec9ccf96eee3988b5ac3a6.jpg)
373
+ Figure 17: Best successor scores across successor heads throughout training checkpoints for Pythia and stanford-gpt2 models.
374
+ (a) Numbers
375
+ Figure 18: Plots of logits across various numeric classes, analogous to Figure 7a. Source tokens are on the $y$ -axis and output tokens are on the $x$ -axis.
376
+
377
+ ![](images/e987325bd43f487710042a342ce0c3b3e9705d1e691e8c4744d64d4b72012231.jpg)
378
+ (b) Number words
379
+
380
+ ![](images/3cb1c8f14b99bbc37dbed24b92018795f4bb1696d0bffbafdd99774e5d088e7f.jpg)
381
+ (c) Placements
382
+
383
+ ![](images/bf14f6d1754fe31dbe0fa859d320c1d64d1b2452f2aac8e2c305a5adb970e7ae.jpg)
384
+ (d) Months
385
+
386
+ # I DECREMENTATION BIAS ACROSS DIFFERENT TASKS
387
+
388
+ We show the strength of the decrementation bias in figures Figure 18 and 19.
389
+
390
+ # J ALL SUCCESSOR SCORES IN A MODEL
391
+
392
+ In Appendix J we find that for both Pythia-1.4B (the mainline model in the paper) and GPT-2 Large (a randomly selected model without a successor head from (Figure 2, left)), the heads with highest successor score are sparse: in Pythia-1.4B L12H0 has eight times as great a successor score to the next higher successor score.
393
+
394
+ ![](images/201636cff44ab0419b118022ba7ca92f4ce29dc2ef7cc9f51515da875cae0ef5.jpg)
395
+ (a) Numbers
396
+ Figure 19: Plots of mod 10 feature logits across various numeric classes, analogous to Figure 7b
397
+
398
+ ![](images/e18467c8ea04161731e5e5eb761a6eeed84f6e408ccb7203138fbdbe9864ec8b.jpg)
399
+ (b) Number words
400
+
401
+ ![](images/d076d61f1afbd20e22789642dabdc9308c3b40acaffd1ec883f4b0c3602f89f2.jpg)
402
+ (c) Placements
403
+
404
+ ![](images/6a8d274a2a63bd65f5eb8de8c9843b8cc6eaedaf2a7154a182e71f2b78ffa90c.jpg)
405
+ (d) Months
406
+
407
+ ![](images/ddcb716229a8a703fe5b22d912b8c53ab653e51319bf5221e35abf795cf0e1f7.jpg)
408
+ Fraction of tokens which are weakly succeeded
409
+ (a) Pythia-1.4B
410
+
411
+ ![](images/0f49d638502d2017ec0a8533cbc782d79919257f7a6f99e8ddae2103a66a5d70.jpg)
412
+ Fraction of tokens which are weakly succeeded
413
+
414
+ ![](images/8cf0bbe8659ecf90d43b7daca0333f91d25edfcb7b4fe6559ded0503daa7784f.jpg)
415
+ (b) GPT-2 Large
416
+
417
+ ![](images/30ce503d5dc899880333fa2ad2296e6f28a6211517617d5a372c5f13bf6671f6.jpg)
418
+
419
+ Figure 20: Successor scores for Pythia-1.4B and GPT-2 Large.
420
+
421
+ <table><tr><td>Prompt</td><td>Answer</td></tr><tr><td>(...) (A) Colony formation and (&lt;</td><td>B</td></tr><tr><td>(...) (i) fg*(y) equals the factual density fg(y) for all g ∈ G; (</td><td>ii</td></tr><tr><td>(...) [^2]: Conceived and designed the experiments (...) [^</td><td>3</td></tr><tr><td>(...) 6. Kirovsky Zavod Station – St. Petersburg, Russia (...) you can see a statue of Lenin here.</td><td>7</td></tr><tr><td>(...) [9] Minutes, Criminal Law Revision Commission, January 28, 1972, 16.[</td><td>10</td></tr></table>
422
+
423
+ Figure 21: Some examples of numbered listing prompts from the Pile dataset.
424
+
425
+ # K CASE STUDY: NUMBERED LISTING
426
+
427
+ In Section 4 we demonstrate that when the successor head is contributing usefully, the prompts often required some kind of incrementation. However, we want to investigate whether the converse holds: are prompts requiring incrementation mostly solved by successor heads?
428
+
429
+ Numbered listing is widespread across real datasets and requires incrementation. Additionally, blog post discussion<sup>7</sup> suggests that even small LLMs are capable of this task in the case of incrementing citations. Examples of prompts involving numbered listing can be seen in Figure 21.
430
+
431
+ We collect 64 such prompts and check for whether the successor head in Pythia-1.4B is a winning case (as in Section 4), and find that the successor head is indeed the winning head across all 64 prompts. Hence this provides some evidence prompts requiring incrementation in real datasets are indeed mostly solved by successor heads.
432
+
433
+ # L FIRING PATTERNS OF $\mathbf{MLP}_0$ NEURONS
434
+
435
+ Moved to appendix based on suggestions to emphasise technical background more in the main text.
436
+
437
+ Firing and logit patterns for the top 16 most important $\mathrm{MLP}_0$ neurons are displayed in Figure 22. We see a superposition effect, with Figure 22c and Figure 22f both representing 6 mod 10.
438
+
439
+ ![](images/f349d39093929440b3f286adbe6ffbc14429541d2cec4f026c3bb706a9553182.jpg)
440
+ (a) 1st place neuron, firing for odd numbers, and slightly more for $1 \mod 10$
441
+
442
+ ![](images/9b5d528df0e1ab4a1890ca94027091e6684c2a58426011d24098e6dc395c19b9.jpg)
443
+ (b) 7th place neuron, 0 mod 10 neuron
444
+
445
+ ![](images/bbdc8f9635b5e4dd8557134f33d07a1a18a908ae0a06352291a0cb97ba698922.jpg)
446
+ (c) 8th place neuron, 6 mod 10 neuron
447
+
448
+ ![](images/2305860152f36426b9365028ea3ea8a47fc991e26655ec1cc6fc308b9b8c9ded.jpg)
449
+ (d) 10th place neuron, 4 mod 10 neuron
450
+
451
+ ![](images/c21f508b59ef3192be89b49f70b62194e1975c66fa1c31124f7ff58fab739e50.jpg)
452
+ (e) 15th place neuron, 5 mod 10 neuron
453
+
454
+ ![](images/eb94b3c4e708f4b7bc3a7411c03d0c17b85923df6215b9cc2a777f051cc37d7c.jpg)
455
+ (f) 16th place neuron, another 6 mod 10 neuron
456
+ Figure 22: Some examples of neurons firing strongly in modulo 10 patterns out of the top 16 most important MLP0 neurons for successorship.
457
+
458
+ # M DIFFERENT ABLATION METHODS
459
+
460
+ To analyze the effect of language model components when running ablation experiments it is important to distinguish the direct, indirect and total effect of language model components (McGrath et al., 2023; Pearl, 2009) on model outputs, which are illustrated in Figure 23. To measure the direct effect of a component (for a given ablation method) the direct effect involves, at the end of the model, subtracting the head's output and adding the ablated output of the head to the residual stream. In Section 4, we analyzed direct effect under the ablation method of mean ablation. This appendix argues that our the direct effect is the largest effect and our results hold under different ablation methods.
461
+
462
+ ![](images/a9097550b144b5ad42769533b18796abf734eb102ffaa313bed473652b4f5241.jpg)
463
+ Figure 23: The types of effect an Attention Head (A) could have on model output (O), possibly through mediating downstream model components (D).
464
+
465
+ ![](images/a814dce4a8f4569fb18a5d016e84f78df134a00b81531e4bdccf0c5e87524373.jpg)
466
+
467
+ ![](images/3f7266bfe129664d0a66052f2ca2034fe8ee107e5f6543e47daf8bc8cade04ec.jpg)
468
+
469
+ ![](images/c6e19a0db6d5ffadb0e1a42a0d1f58e4b9568d6b1d8005345f2a830aa09eb0b1.jpg)
470
+
471
+ The indirect effect instead involves replacing a head's output with an ablated output and, at the very end of the model, subtracting this ablated output and adding the head's original output. This effectively ablates the downstream effects of a head.
472
+
473
+ The total effect replaces the head's output with an ablated output, which effectively ablates both the direct and indirect effect of the head.
474
+
475
+ We ablate head outputs using one of the two techniques:
476
+
477
+ 1. Mean ablation: replacing the output of a head with the average head output over a chosen distribution. We choose this distribution to be the current batch we are using.
478
+ 2. Resampling ablation: replacing the output of a head with the head's activation on a randomly sampled example from a dataset (e.g. the Pile). When using this method, we repeat this process a number of times and average the results.
479
+
480
+ Rerunning the loss reducing experiments described in Section 4.1 for these different methods gives:
481
+
482
+ 1. Direct effect resampling ablation: $33\%$ for successorship, $11\%$ for acronym, $10\%$ for greater-than, and $11\%$ for copying behaviour.
483
+ 2. Indirect effect mean ablation: $6.5\%$ for successorship, $2.8\%$ for acronym, $12\%$ for greater-than, and $9.0\%$ for copying behaviour.
484
+ 3. Indirect effect resampling ablation: $5.8\%$ for successorship, $2.7\%$ for acronym, $11\%$ for greater-than, and $8\%$ for copying behaviour.
485
+ 4. Total effect mean ablation: $27\%$ for successorship, $8.2\%$ for acronym, $10\%$ for greater-than, and $8.4\%$ for copying behaviour.
486
+ 5. Total effect resampling ablation: $30\%$ for successorship, $6.5\%$ for acronym, $11\%$ for greater-than, and $6.2\%$ for copying behaviour.
487
+
488
+ Result 1 demonstrates that using resampling ablation instead of mean ablation for analyzing the loss reducing effect has little effect on the results in Figure 10. Additionally, the indirect effect results (2 and 3) provide some evidence that downstream effects of the successor head are not highly significant to successorship.
489
+
490
+ # N TRAINING DETAILS FOR COMPOSITIONALITY EXPERIMENTS
491
+
492
+ Remark: obtaining a decoding function. Recall that we wish to learn two linear maps - an index-space projection $\pi_{\mathbb{N}}:\mathbb{R}^{d_{\mathrm{model}}}\to \mathbb{R}^{d_{\mathrm{model}}}$ and a domain-space projection $\pi_D:\mathbb{R}^{d_{\mathrm{model}}}\to \mathbb{R}^{d_{\mathrm{model}}} -$ such that, for all pairs of tokens $i_s$ and $j_{t}$ (with $i_t$ a valid token), $[\hat{i_t} ]\coloneqq \pi_{\mathbb{N}}([i_s]) + \pi_D([j_t])\approx [i_t]$ . To evaluate the above identity, we must first learn a decoding function $d:\mathbb{R}^{d_{\mathrm{model}}}\to \mathbb{R}^{d_{\mathrm{vocab}}}$ , such that $\arg \max_t d([i_s])_t = i_s$ . Given the informal observation that directly unembedding $[i_s]$ yields next-token predictions for $i_s$ whereas unembedding $S(i_s)$ yields $(i + 1)_s$ (see Appendix G), we hypothesise that the unembedding matrix $W_{U}$ reads from some 'output space' $\mathcal{O}$ and the embedding transform $[\cdot ,]$ writes to some 'input space' $\mathcal{I}-$ and that the successor head reads from $\mathcal{I}$ and writes to $\mathcal{O}$ . Indeed, when training an output-space projection $\pi_O:\mathcal{I}\rightarrow \mathcal{O}$ over tokens in the vocabulary such that $W_{U}(\pi_{O}([i_{s}])) = i_{s}$ , we obtain $97.4\%$ top-1 accuracy on a set of 1000 held-out tokens - which both confirms the output-space hypothesis, and gives us a decoding function $d(\mathbf{x}) = W_U(\pi_O(\mathbf{x}))$ .
493
+
494
+ Method. With our decoding function in hand, we can train $\pi_{\mathbb{N}}$ and $\pi_{D}$ to satisfy our identity. Specifically, we define $\pi_{\mathbb{N}}$ and $\pi_{D}$ to be matrices such that $\pi_{\mathbb{N}} + \pi_{D} = I$ . For valid token pairs $i_s$ and $j_t$ , we obtain predicted representations $[\hat{i}_t] = \pi_{\mathbb{N}}([i_s]) + \pi_D([j_t])$ , and minimise a combination of 'closeness metrics':
495
+
496
+ $$
497
+ | | [ [ \hat {i _ {t}} ] ] - [ [ i _ {t} ] ] | | ^ {2} + \mathcal {L} (W _ {U} (\pi_ {O} ([ [ \hat {i _ {t}} ] ])), i _ {t}) + \mathcal {L} (W _ {U} (S ([ [ \hat {i _ {t}} ] ])), W _ {U} (S ([ [ i _ {t} ] ])))
498
+ $$
499
+
500
+ for $\mathcal{L}$ the cross-entropy loss. Specifically, we ensure that predicted and ground truth representations 'behave in the same way' - in other words, that they are close together, that predicted representations $[\hat{i}_t]]$ decode to tokens $i_t$ (output-space decoding), and that the logit distribution when decoding incremented predicted representations $S([\hat{i}_t])$ matches that when decoding incremented ground truth representations $S([\hat{i}_t])$ (successor decoding).
501
+
502
+ More succinctly, we can frame the training procedure as learning $\pi_{\mathbb{N}}, \pi_{D}$ such that the following diagram commutes:
503
+
504
+ ![](images/7e09fa96423633a4771ecc1ddd0cc76af2f9c06c92b8820701ba3a314a5269fd.jpg)
505
+
506
+ We trained for 10 epochs over valid token pairs sampled from the succession dataset, and evaluated on a held-out dataset of 500 randomly-sampled token pairs.
507
+
508
+ # O EFFECTS OF APPLYING THE SUCCESSOR HEAD TO COMPOSITIONAL REPRESENTATIONS
509
+
510
+ In Section A, we assessed the performance of our factoring mechanism through output-space decoding (i.e. evaluating a representation $\llbracket \hat{i}_t\rrbracket$ by testing whether $\llbracket \hat{i}_t\rrbracket$ decodes to $i_t$ ). Below, we also present results for successor-space decoding (i.e. evaluating a representation $\llbracket \hat{i}_t\rrbracket$ by testing whether $S(\llbracket \hat{i}_t\rrbracket)$ decodes to $(i + 1)_t$ ).
511
+
512
+ In contrast to the high performance of output-space decoding, we found successor-space decoding yielded a top-1 accuracy of 0.90 on the held-out dataset of token pairs, and a top-1 accuracy of 0.125 on the out-of-distribution Roman numeral dataset (see Table 3).<sup>8</sup>
513
+
514
+ <table><tr><td rowspan="2" colspan="2"></td><td colspan="12">Source index token (iRom)</td></tr><tr><td>I</td><td>II</td><td>III</td><td>IV</td><td>V</td><td>VI</td><td>VII</td><td>VIII</td><td>IX</td><td>X</td><td>XI</td><td>XII</td></tr><tr><td rowspan="8">Sequence token (1s)</td><td>1</td><td>10</td><td>Third</td><td>Fourth</td><td>5</td><td>23</td><td>VII</td><td>8</td><td>9</td><td>10</td><td>25</td><td>12</td><td>13</td></tr><tr><td>one</td><td>10</td><td>Third</td><td>fourth</td><td>fifth</td><td>23</td><td>seventh</td><td>eighth</td><td>ninth</td><td>10</td><td>25</td><td>12</td><td>13</td></tr><tr><td>first</td><td>tenth</td><td>Third</td><td>fourth</td><td>fifth</td><td>VI</td><td>seventh</td><td>ninth</td><td>ninth</td><td>tenth</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Monday</td><td>RS</td><td>Third</td><td>MC</td><td>Friday</td><td>MV</td><td>VII</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Mon</td><td>RS</td><td>HM</td><td>HM</td><td>HM</td><td>MV</td><td>MTP</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>January</td><td>RS</td><td>cs</td><td>cs</td><td>May</td><td>23</td><td>cs</td><td>cs</td><td>Septembe October</td><td>25</td><td>cs</td><td></td><td></td></tr><tr><td>Jan</td><td>CS</td><td>cs</td><td>cs</td><td>May</td><td>23</td><td>cs</td><td>cs</td><td>Sept</td><td>rs</td><td>35</td><td>cs</td><td></td></tr><tr><td>A</td><td>III</td><td>III</td><td>MC</td><td>Fifth</td><td>WV</td><td>VII</td><td>VIII</td><td>9</td><td>cx</td><td>Y</td><td>XII</td><td>iii</td></tr></table>
515
+
516
+ Table 3: A table presenting top-1 predicted tokens under successor decoding from $\pi_D(1_s) + \pi_{\mathbb{N}}(i_{\mathrm{Rom}})$ . Green cells denote predictions which match their target $((i + 1)_s)$ exactly; yellow cells denote predictions which match the target index but not the target domain; red cells denote incorrect predictions. Dashed cells denote pairs of $1_s$ and $i_{\mathrm{Rom}}$ for which $i_s$ is not a valid (single) token.
517
+
518
+ This drop in performance when switching from output-space to successor decoding (and in particular, the leakage of Roman-numeral information into $\pi_D(1_s) + \pi_{\mathbb{N}}(i_{\mathrm{Rom}})$ - notice the VII and VIII in Table 3) suggests our numeric projection $\pi_{\mathbb{N}}$ might be capturing slightly more than just the numeric subspace. Specifically, there may be some components of domain-space which are ignored by output-space decoding, but which our successor head lifts into output-space.
519
+
520
+ # P ADDITIONAL ARITHMETIC TABLES
521
+
522
+ We display additional arithmetic tables analogously to those in Figure 6, with 3 number tables (randomly sampled ranges) in Figure 24 and a number word table in Figure 25. We see that the results are similar to those in Figure 6.
523
+
524
+ ![](images/b6b7e3119bd2eb5e1f37741ccfff5d318e6adf584ddf058fbf29330c833ebc97.jpg)
525
+
526
+ ![](images/419c598c141a4551a7fa7f19364388d342bbc37ebbaa5e5ff5e7426dfe302063.jpg)
527
+ (a) Arithmetic table for range 50 to 59
528
+
529
+ ![](images/c760c2f18cf27ff70eccb8f91b8da646c9c2a133c53b53c29a50d415b59f82b5.jpg)
530
+ (b) Arithmetic table for range 30 to 39
531
+ (c) Arithmetic table for range 120 to 129
532
+ Figure 24: Additional randomly selected number arithmetic tables, analogous to those in Figure 6
533
+
534
+ ![](images/7298f2def8d78fc17bc9a78e8ad73594e14206d01b379fdfa9a29170d62ec418.jpg)
535
+ (a) Arithmetic table for range zero to nine.
536
+ Figure 25: An additional arithmetic table for number words, analogous to those in Figure 6
537
+
538
+ # Q LOGIT DISTRIBUTION FOR CELLS IN THE ARITHMETIC TABLE
539
+
540
+ The logit distributions across tokens for randomly sampled correct arithmetic examples are displayed in Figure 26.
541
+
542
+ ![](images/85b061761af3922629c402aa6273359dd42bfd639fe2490cf89cfe01b50049f0.jpg)
543
+
544
+ ![](images/2b351ab2cc392811166316d5e20b5231b7466f4bf147bf0e21aa1466e7e11d3b.jpg)
545
+ (a) Source token '83', target residue of 7 modulo 10.
546
+ (c) Source token 'eleven', target residue of 5 modulo 10.
547
+ Figure 26: Logit distributions for randomly sampled checkmarked cells, sampling two cells for numbers, one cell for number words, and one cell for months.
548
+
549
+ ![](images/ef4692a3563807397394592b59e701844781d04cb1dcf8f91499cc968f523318.jpg)
550
+
551
+ ![](images/af9b0488159ecb2ab351ee4dde90c266370993bb1babb1b03d20aef8d561195d.jpg)
552
+ (b) Source token '50', target residue of 6 modulo 10.
553
+ (d) Source token 'September', target residue of 0 modulo 10.
554
+
555
+ # R LINEAR PROBES FOR MODULI OTHER THAN 10
556
+
557
+ ![](images/b759c6f95575b4f7c1c13d47cf83e05139573c1fcc72af78b28c07acf7eab0df.jpg)
558
+ Figure 27: Validation (in-distribution task) and test (out-of-distribution task) performance for linear probes $P^{(m)}$ . The vertical purple lines denote moduli divisible by 5.
559
+
560
+ While our experiments in Section 3 focus on the study of mod-10 features, one might hypothesise that there exist similar natural mod- $k$ features for other $k$ . To explore this hypothesis, we repeat the linear probing experiment detailed in Section 3.2 for a range of moduli $m \in \{2, \dots, 25\}$ . Specifically, we test whether we can learn linear probes $P^{(m)}: \mathbb{R}^{m \times d_{\mathrm{model}}}$ to predict the value of $i \bmod m$ from the MLP-representations of numeric tokens $t_i$ , and whether these probes generalise to non-numeric tokens. As per Appendix C.1, we train our probes on numeric tokens from '0' to '500' (both with and without a leading space), holding out $10\%$ of these tokens as a validation set, and we test our probes on a dataset of unseen tasks including cardinal numbers, Roman numerals, months and days.
561
+
562
+ We present the results of these experiments in Figure 27. Observe that, while for almost all moduli, validation and test performance are above random chance, we cannot easily extract 'mod- $m$ data' from token representations for all $m$ . Indeed, the only probes with out-of-distribution performance above 0.5 are those for moduli 2-5, 6, 10, 12, 15 and 20 (and the six probes with the lowest validation performance are those corresponding to the six primes between 5 and 25).
563
+
564
+ We see some evidence, however, that 10 is a particularly significant modulus for token $MLP_{0}$ -representations: indeed, $P^{(10)}$ has both the joint highest validation performance (together with $P^{(2)}, P^{(4)}, P^{(5)}$ and $P^{(20)}$ , and the highest out-of-distribution performance. Moreover, of all the probes whose validation accuracy is above 0.5, $P^{(10)}$ has the smallest drop in performance from in-distribution to out-of-distribution tasks.
565
+
566
+ In particular, for weeks (which we might expect to have 'mod-7 features') and months (which we might expect to have 'mod-12 features'), not only are the performances of $P^{(7)}$ and $P^{(12)}$ substantially lower than that of $P^{(10)}$ , but $P^{(7)}$ fails to correctly identify the index mod 7 of any day of the week, while $P^{(12)}$ only correctly identifies the index mod 12 of 8/12 months (failing on February, May, July and August). By contrast, $P^{(10)}$ correctly identifies the index mod 10 of 4/7 days of the week, and 10/12 months.
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dacb3b4c2c928c30b9ca2218faab406a3c599cc27737c2c9f5faba31139280a9
3
+ size 1457210
2024/Successor Heads_ Recurring, Interpretable Attention Heads In The Wild/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sufficient conditions for offline reactivation in recurrent neural networks/21afa5d0-90c0-43fe-901a-f1b73b6ca51a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a939c103b282032a2bd5f37e40d25e1fc8b437f48ceb2d65b8729baae964c601
3
+ size 5193011
2024/Sufficient conditions for offline reactivation in recurrent neural networks/full.md ADDED
@@ -0,0 +1,439 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SUFFICIENT CONDITIONS FOR OFFLINE REACTIVATION IN RECURRENT NEURAL NETWORKS
2
+
3
+ Nanda H Krishna<sup>1,2,3</sup> Colin Bredenberg<sup>1,2,3</sup> Daniel Levenstein<sup>1,3</sup>
4
+
5
+ Blake Aaron Richards $^{1,3,4,5}$ Guillaume Lajoie $^{1,2,4,\text{图}}$
6
+
7
+ <sup>1</sup>Mila – Quebec AI Institute <sup>2</sup>Université de Montréal <sup>3</sup>McGill University
8
+
9
+ 4Canada CIFAR AI Chair CIFAR Learning in Machines & Brains
10
+
11
+ $\text{忍}$ {nanda.harishankar-krishna,colin.bredenberg,guillaume.lajoie}@mila.quebec
12
+
13
+ # ABSTRACT
14
+
15
+ During periods of quiescence, such as sleep, neural activity in many brain circuits resembles that observed during periods of task engagement. However, the precise conditions under which task-optimized networks can autonomously reactivate the same network states responsible for online behavior is poorly understood. In this study, we develop a mathematical framework that outlines sufficient conditions for the emergence of neural reactivation in circuits that encode features of smoothly varying stimuli. We demonstrate mathematically that noisy recurrent networks optimized to track environmental state variables using change-based sensory information naturally develop denoising dynamics, which, in the absence of input, cause the network to revisit state configurations observed during periods of online activity. We validate our findings using numerical experiments on two canonical neuroscience tasks: spatial position estimation based on self-motion cues, and head direction estimation based on angular velocity cues. Overall, our work provides theoretical support for modeling offline reactivation as an emergent consequence of task optimization in noisy neural circuits.
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ It has been widely observed that neural circuits in the brain recapitulate task-like activity during periods of quiescence, such as sleep (Tingley & Peyrache, 2020). For example, the hippocampus "replays" sequences of represented spatial locations akin to behavioral trajectories during wakefulness (Nádasdy et al., 1999; Lee & Wilson, 2002; Foster, 2017). Furthermore, prefrontal (Euston et al., 2007; Peyrache et al., 2009), sensory (Kenet et al., 2003; Xu et al., 2012), and motor (Hoffman & McNaughton, 2002) cortices reactivate representations associated with recent experiences; and sleep activity in the anterior thalamus (Peyrache et al., 2015) and entorhinal cortex (Gardner et al., 2022) is constrained to the same neural manifolds that represent head direction and spatial position in those circuits during wakefulness.
20
+
21
+ This neural reactivation phenomenon is thought to have a number of functional benefits, including the formation of long term memories (Buzsaki, 1989; McClelland et al., 1995), abstraction of general rules or "schema" (Lewis & Durrant, 2011), and offline planning of future actions (Olafsdóttir et al., 2015; Igata et al., 2021). Similarly, replay in artificial systems has been shown to be valuable in reinforcement learning, when training is sparse or expensive (Mnih et al., 2015), and in supervised learning, to prevent catastrophic forgetting in continual learning tasks (Hayes et al., 2019). However, where machine learning approaches tend to save sensory inputs from individual experiences in an external memory buffer, or use external networks that are explicitly trained to generate artificial training data (Hayes & Kanan, 2022), reactivation in the brain is autonomously generated in the same circuits that operate during active perception and action. Currently, it is unknown how reactivation can emerge in the same networks that encode information during active behavior, or why it is so widespread in neural circuits.
22
+
23
+ Previous approaches to modeling reactivation in neural circuits fall into two broad categories: generative models that have been explicitly trained to reproduce realistic sensory inputs (Deperrois et al.,
24
+
25
+ 2022), and models in which replay is an emergent consequence of the architecture of network models with a particular connectivity structure (Shen & McNaughton, 1996; Azizi et al., 2013; Milstein et al., 2023) or local synaptic plasticity mechanism (Hopfield, 2010; Litwin-Kumar & Doiron, 2014; Theodoni et al., 2018; Haga & Fukai, 2018; Asabuki & Fukai, 2023). Other approaches have modeled replay and theta sequences as emergent consequences of firing rate adaptation (Chu et al., 2024) or input modulation (Kang & DeWeese, 2019) in continuous attractor network models. Generative modeling approaches have strong theoretical guarantees that reactivation will occur, because networks are explicitly optimized to provide this functionality. However, modeling approaches that argue for emergent reactivation typically rely on empirical results, and lack rigorous mathematical justification.
26
+
27
+ In this study, we demonstrate that a certain type of reactivation—diffusive reactivation—can emerge from a system attempting to optimally encode features of its environment in the presence of internal noise. We trained continuous-time recurrent neural networks (RNNs) to optimally integrate and track perceptual variables based on sensations of change (motion through space, angular velocity, etc.), in the context of two ethologically relevant tasks: spatial navigation and head direction integration. Critically, training in this manner has been shown to produce grid cell (Cueva & Wei, 2018; Sorscher et al., 2019) and head direction cell representations (Cueva et al., 2020; Uria et al., 2022), which correspond to neural systems in which reactivation phenomena have been observed (Gardner et al., 2022; Peyrache et al., 2015). We see that these networks exhibit reactivation during quiescent states (when subject to noise but in the absence of perceptual inputs), and we explain these phenomena by demonstrating that noise compensation dynamics naturally induce diffusion on task-relevant neural manifolds in optimally trained networks.
28
+
29
+ # 2 MATHEMATICAL RESULTS
30
+
31
+ # 2.1 SETUP AND VARIABLES
32
+
33
+ In this study, we will consider a noisy discrete-time approximation of a continuous-time RNN, receiving change-based information $\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}$ about an $N_{s}$ -dimensional environmental state vector $\mathbf{s}(t)$ . The network's objective will be to reconstruct some function of these environmental state variables, $f\big(\mathbf{s}(t)\big):\mathbb{R}^{N_s}\to \mathbb{R}^{N_o}$ , where $N_{s}$ is the number of stimulus dimensions and $N_{o}$ is the number of output dimensions (for a schematic, see Fig. 1a). An underlying demand for this family of tasks is that path integration needs to be performed, possibly followed by some computations based on that integration. These requirements are often met in natural settings, as it is widely believed that animals are able to estimate their location in space $\mathbf{s}(t)$ through path integration based exclusively on local motion cues $\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}$ , and neural circuits in the brain that perform this computation have been identified (specifically the entorhinal cortex (Sorscher et al., 2019)). For our analysis, we will assume that the stimuli the network receives are drawn from a stationary distribution, such that the probability distribution $p\big(\mathbf{s}(t)\big)$ does not depend on time—for navigation, this amounts to ignoring the effects of initial conditions on an animal's state occupancy statistics, and assumes that the animal's navigation policy remains constant throughout time. The RNN's dynamics are given by:
34
+
35
+ $$
36
+ \mathbf {r} (t + \Delta t) = \mathbf {r} (t) + \Delta \mathbf {r} (t) \tag {1}
37
+ $$
38
+
39
+ $$
40
+ \Delta \mathbf {r} (t) = \phi (\mathbf {r} (t), \mathbf {s} (t), \frac {\mathrm {d} \mathbf {s} (t)}{\mathrm {d} t}) \Delta t + \sigma \boldsymbol {\eta} (t), \tag {2}
41
+ $$
42
+
43
+ where $\Delta \mathbf{r}(t)$ is a function that describes the network's update dynamics as a function of the stimulus, $\phi(\cdot)$ is a sufficiently expressive nonlinearity, $\pmb{\eta}(t) \sim \mathcal{N}(0, \Delta t)$ is Brownian noise, and $\Delta t$ is taken to be small as to approximate corresponding continuous-time dynamics. We work with a discrete-time approximation here for the sake of simplicity, and also to illustrate how the equations are implemented in practice during simulations. Suppose that the network's output is given by $\mathbf{o} = \mathbf{D}\mathbf{r}(t)$ , where $\mathbf{D}$ is an $N_{o} \times N_{r}$ matrix that maps neural activity to outputs, and $N_{r}$ is the number of neurons in the RNN.
44
+
45
+ We formalize our loss function for each time point as follows:
46
+
47
+ $$
48
+ \mathcal {L} (t) = \mathbb {E} _ {\boldsymbol {\eta}} \| f (\mathbf {s} (t)) - \mathbf {D r} (t) \| _ {2}, \tag {3}
49
+ $$
50
+
51
+ so that as the loss is minimized over timesteps, the system is optimized to match its target at every timestep while compensating for its own intrinsic noise. Our analysis proceeds as follows. First, we will derive an upper bound for this loss that partitions the optimal update $\Delta \mathbf{r}$ into two terms:
52
+
53
+ ![](images/5926ba49a78c9389f245165c0ed24dd700e8d2974326caa16d09ae24587acdbf.jpg)
54
+ a
55
+ b
56
+
57
+ ![](images/1060a089de9e3325465ab97516fae88975e2d2a311d175f53fef6cb8e0979c53.jpg)
58
+ #
59
+ f
60
+
61
+ ![](images/3b6a1d3a9c5889aea6a21e066d212d4d91ba9a206fe08f2a7e41c7ad922ffd69.jpg)
62
+
63
+ ![](images/0648479f374262d29ee1ef2473478367b3c69b4a03c927b6beb9a59e59bdf430.jpg)
64
+ d
65
+ e
66
+
67
+ ![](images/76c7681b8c92045e957c082eadfc487404c1010dc74c78ee3a90452aa54149c6.jpg)
68
+
69
+ ![](images/ab94084af6a22f5a83dc2025fa3d47b7447ca31499a8ebe63bd469326ca768cd.jpg)
70
+ #
71
+ i
72
+
73
+ ![](images/f38ceecb2f76c0dda3303faeb1ceee792ead5177037df8de3da01d81ddb3c880.jpg)
74
+ k
75
+
76
+ ![](images/61ddc1f08332228e5ed45b6c0988eb1f89712ded24d83343dee6ddc619eeca12.jpg)
77
+ h
78
+
79
+ ![](images/f6ba465076646dc2670ee67423b4b353a8521a139c657ef73cdc5296a7ff25f9.jpg)
80
+ i
81
+
82
+ ![](images/85da01965bb5bb2e47b21d0e799f33e6c933fc3a3b478d58229672f5525a4ec6.jpg)
83
+ Figure 1: Reactivation in a spatial position estimation task. a) Schematic of task. b) Test metrics as a function of training batches for the place cell tuning mean squared error loss used during training (gray) and for the position decoding spatial distance error (black). c) Explained variance as a function of the number of principal components (PCs) in population activity space during task engagement (blue) and during quiescent noise-driven activity (red). d) Sample decoded outputs during active behavior. Circles indicate the initial location, triangles indicate the final location. e) Same as (d), but for decoded outputs during quiescence. f) Neural activity projected onto the first two PCs during the active phase. Color intensity measures the decoded output's distance from the center in space. g) Neural activity during the quiescent phase projected onto the same active PC axes as in (f). h) Two-dimensional kernel density estimate (KDE) plot measuring the probability of state-occupancy over 200 decoded output trajectories during active behavior. i-k) Same as (h), but for decoded outputs during quiescence (i), neural activity projected onto the first two PCs during the active phase (j), and during the quiescent phase (k). Error bars (b-c) indicate $\pm 1$ standard deviation over five networks.
84
+
85
+ ![](images/587fedcb137c93dfa092fbd63cc7d789680508b259f26dd76b6b29c3de850fcc.jpg)
86
+
87
+ ![](images/9b0620b5cce1a9f04c675d2ace118c834817c959bc6508dc076766a67c3ed428.jpg)
88
+
89
+ ![](images/6c348e71e328643a49a41727c0d5ce51363b3662a5c3a010ff16287e180403f6.jpg)
90
+
91
+ one which requires the RNN to estimate the predicted change in the target function, and one which requires the RNN to compensate for the presence of noise. Second, we derive closed-form optimal dynamics for an upper bound of this loss, which reveals a decomposition of neural dynamics into state estimation and denoising terms. Lastly, we show that under certain conditions, these optimal dynamics can produce offline sampling of states visited during training in the absence of stimuli but in the presence of noise.
92
+
93
+ # 2.2 UPPER BOUND OF THE LOSS
94
+
95
+ To derive our upper bound, we first assume that $\phi\left(\mathbf{r}(t),\mathbf{s}(t),\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}\right)$ can be decomposed into two different functions so that Eq. 2 becomes:
96
+
97
+ $$
98
+ \Delta \mathbf {r} (t) = \Delta \mathbf {r} _ {1} (\mathbf {r} (t)) + \Delta \mathbf {r} _ {2} \left(\mathbf {r} (t), \mathbf {s} (t), \frac {\mathrm {d} \mathbf {s} (t)}{\mathrm {d} t}\right) + \sigma \boldsymbol {\eta} (t), \tag {4}
99
+ $$
100
+
101
+ where we will ultimately show that both functions scale with $\Delta t$ . We are assuming that these two terms have different functional dependencies; however, for notational conciseness, we will subsequently refer to both updates as $\Delta \mathbf{r}_1(t)$ and $\Delta \mathbf{r}_2(t)$ . The first, $\Delta \mathbf{r}_1(t)$ , is a function of $\mathbf{r}(t)$ only, and will be used to denoise $\mathbf{r}(t)$ such that the approximate equality $\mathbf{r}(t) + \Delta \mathbf{r}_1(t) + \sigma \boldsymbol{\eta}(t) \approx \mathbf{D}^\dagger f(\mathbf{s}(t))$ still holds ( $\Delta \mathbf{r}_1(t)$ cancels out the noise corruption $\sigma \boldsymbol{\eta}(t)$ ), where $\mathbf{D}^\dagger$ is the right pseudoinverse of $\mathbf{D}$ . This maintains optimality in the presence of noise. The second, $\Delta \mathbf{r}_2(t)$ , is also a function of the input, and will build upon the first update to derive a simple state update such that $\mathbf{D}\big(\mathbf{r}(t + \Delta t)\big) \approx f\big(\mathbf{s}(t + \Delta t)\big)$ . To construct this two-step solution, we first consider an upper bound on our original loss, which we will label $\mathcal{L}_{upper}$ . Exploiting the fact that $\Delta t^2$ is infinitesimally small relative to other terms, we will Taylor expand Eq. 3 to first order about a small timestep increment $\Delta t$ :
102
+
103
+ $$
104
+ \begin{array}{l} \mathcal {L} (t + \Delta t) = \mathbb {E} _ {\boldsymbol {\eta}} \| f (\mathbf {s} (t + \Delta t)) - \mathbf {D} (\mathbf {r} (t) + \Delta \mathbf {r} (t)) \| _ {2} (5) \\ \approx \mathbb {E} _ {\boldsymbol {\eta}} \left\| f (\mathbf {s} (t)) + \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} (\mathbf {r} (t) + \Delta \mathbf {r} (t)) \right\| _ {2} (6) \\ = \mathbb {E} _ {\boldsymbol {\eta}} \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) + f (\mathbf {s} (t)) - \mathbf {D} (\mathbf {r} (t) + \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t)) \right\| _ {2}, (7) \\ \end{array}
105
+ $$
106
+
107
+ where $\Delta \mathbf{s}(t) = \frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}\Delta t$ . Next, using the triangle inequality, we note that the loss is upper bounded by a new loss $\mathcal{L}_2$ , given by:
108
+
109
+ $$
110
+ \begin{array}{l} \mathcal {L} \leq \mathcal {L} _ {2} = \mathbb {E} _ {\boldsymbol {\eta}} \left[ \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \left\| f (\mathbf {s} (t)) - \mathbf {D} (\mathbf {r} (t) + \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t)) \right\| _ {2} \right] (8) \\ = \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \mathbb {E} _ {\boldsymbol {\eta}} \left\| f (\mathbf {s} (t)) - \mathbf {D} (\mathbf {r} (t) + \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t)) \right\| _ {2}, (9) \\ \end{array}
111
+ $$
112
+
113
+ which separates the loss into two independent terms: one which is a function of $\Delta \mathbf{r}_2(t)$ and the signal, while the other is a function of $\Delta \mathbf{r}_1(t)$ and the noise. The latter, $\Delta \mathbf{r}_1(t)$ -dependent term, allows $\Delta \mathbf{r}_1$ to correct for noise-driven deviations between $f(\mathbf{s}(t))$ and $\mathbf{D}\mathbf{r}(t)$ . Here, we will assume that this optimization has been successful for previous timesteps, such that $\mathbf{r}(t) \approx \mathbf{D}^{\dagger}f(\mathbf{s}(t))$ , where $\mathbf{D}^{\dagger}$ is the right pseudoinverse of $\mathbf{D}$ . By this assumption, we have the following approximation:
114
+
115
+ $$
116
+ \begin{array}{l} \mathcal {L} _ {2} \approx \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \mathbb {E} _ {\boldsymbol {\eta}} \| f (\mathbf {s} (t)) - \mathbf {D} \left(\mathbf {D} ^ {\dagger} f (\mathbf {s} (t)) + \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t)\right) \| _ {2} (10) \\ = \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \mathbb {E} _ {\boldsymbol {\eta}} \left\| \mathbf {D} \left(\Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t)\right) \right\| _ {2}. (11) \\ \end{array}
117
+ $$
118
+
119
+ Thus, the second term in $\mathcal{L}_2$ trains $\Delta \mathbf{r}_1$ to greedily cancel out noise in the system $\sigma \eta (t)$ . To show that this is similar to correcting for deviations between $\mathbf{D}^{\dagger}f\big(\mathbf{s}(t)\big)$ and $\mathbf{r}$ in neural space (as opposed to output space), we use the Cauchy-Schwarz inequality to develop the following upper bound:
120
+
121
+ $$
122
+ \mathcal {L} _ {2} \leq \mathcal {L} _ {3} = \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \| \mathbf {D} \| _ {2} \mathbb {E} _ {\boldsymbol {\eta}} \| \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t) \| _ {2}. \tag {12}
123
+ $$
124
+
125
+ This allows the system to optimize for denoising without having access to its outputs, allowing for computations that are more localized to the circuit. As our final step, we use Jensen's inequality for expectations to derive the final form of our loss upper bound:
126
+
127
+ $$
128
+ \begin{array}{l} \mathcal {L} _ {3} \leq \mathcal {L} _ {u p p e r} = \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2} + \| \mathbf {D} \| _ {2} \sqrt {\mathbb {E} _ {\boldsymbol {\eta}} \| \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t) \| _ {2} ^ {2}} (13) \\ = \mathcal {L} _ {\text {s i g n a l}} (\Delta \mathbf {r} _ {2}) + \mathcal {L} _ {\text {n o i s e}} (\Delta \mathbf {r} _ {1}), (14) \\ \end{array}
129
+ $$
130
+
131
+ where $\mathcal{L}_{signal} = \left\| \frac{\mathrm{d}f(\mathbf{s}(t))}{\mathrm{d}\mathbf{s}(t)}\Delta \mathbf{s}(t) - \mathbf{D}\Delta \mathbf{r}_2(t)\right\|_2$ is dedicated to tracking the state variable $\mathbf{s}(t)$ , and $\mathcal{L}_{noise} = \| \mathbf{D}\|_2\sqrt{\mathbb{E}_\eta\|\Delta\mathbf{r}_1(t) + \sigma\boldsymbol{\eta}(t)\|_2^2}$ is dedicated to denoising the network state. In the next section, we will describe how this objective function can be analytically optimized in terms of $\Delta \mathbf{r}_1(t)$ and $\Delta \mathbf{r}_2(t)$ in a way that decomposes the trajectory tracking problem into a combination of state estimation and denoising.
132
+
133
+ # 2.3 OPTIMIZING THE UPPER BOUND
134
+
135
+ Our optimization will be greedy, so that for each loss $\mathcal{L}(t + \Delta t)$ we will optimize only $\Delta \mathbf{r}(t)$ , ignoring dependencies on updates from previous time steps. $\mathcal{L}_{noise}$ is the only term in our loss that depends on $\Delta \mathbf{r}_1(t)$ . Ignoring proportionality constants and the square root (which do not affect the location of minima), we have the following equivalence:
136
+
137
+ $$
138
+ \operatorname {a r g m i n} _ {\Delta \mathbf {r} _ {1} (t)} \mathcal {L} _ {\text {n o i s e}} \equiv \operatorname {a r g m i n} _ {\Delta \mathbf {r} _ {1} (t)} \mathbb {E} _ {\boldsymbol {\eta}} \| \Delta \mathbf {r} _ {1} (t) + \sigma \boldsymbol {\eta} (t) \| _ {2} ^ {2}. \tag {15}
139
+ $$
140
+
141
+ Essentially, the objective of $\Delta \mathbf{r}_1(t)$ is to cancel out the noise $\sigma \eta (t)$ as efficiently as possible, given access to information about $\mathbf{r}(t)$ . This is a standard denoising objective function, where an input signal is corrupted by additive Gaussian noise, with the following well-known solution (Miyasawa, 1961; Raphan & Simoncelli, 2011):
142
+
143
+ $$
144
+ \Delta \mathbf {r} _ {1} ^ {*} (t) = \sigma^ {2} \frac {\mathrm {d}}{\mathrm {d} \mathbf {r} (t)} \log p (\mathbf {r} (t)) \Delta t, \tag {16}
145
+ $$
146
+
147
+ where $p(\mathbf{r}) = \int p\big(\mathbf{r}(t)\big|\mathbf{s}(t)\big)p\big(\mathbf{s}(t)\big)\mathrm{d}\mathbf{s}(t)$ is the probability distribution over noisy network states given input stimulus $\mathbf{s}(t)$ , prior to the application of state updates $\Delta \mathbf{r}_1(t)$ and $\Delta \mathbf{r}_2(t)$ . By assumption, $p\big(\mathbf{r}(t)\big|\mathbf{s}(t)\big)\sim \mathcal{N}\big(\mathbf{D}^\dagger f\big(\mathbf{s}(t)\big),\sigma^2\Delta t\big)$ . We note that $\frac{\mathrm{d}}{\mathrm{d}\mathbf{r}(t)}\log p\big(\mathbf{r}(t)\big)$ is the same function for all time points $t$ , because for the stimulus sets we consider, $p\big(\mathbf{s}(t)\big)$ does not depend on time (it is a stationary distribution); this demonstrates that the optimal greedy denoising update is not time-dependent. These dynamics move the network state towards states with higher probability, and do not require explicit access to noise information $\boldsymbol{\eta}(t)$ .
148
+
149
+ Next, we optimize for $\Delta \mathbf{r}_2(t)$ . $\mathcal{L}_{signal}$ is the only term in $\mathcal{L}_{upper}$ that depends on $\Delta \mathbf{r}_2(t)$ , so we minimize:
150
+
151
+ $$
152
+ \mathcal {L} _ {\text {s i g n a l}} = \left\| \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \Delta \mathbf {s} (t) - \mathbf {D} \Delta \mathbf {r} _ {2} (t) \right\| _ {2}. \tag {17}
153
+ $$
154
+
155
+ By inspection, the optimum is given by: $\Delta \mathbf{r}_2^* (t) = \mathbf{D}^\dagger \frac{\mathrm{d}f(\mathbf{s}(t))}{\mathrm{d}\mathbf{s}(t)}\Delta \mathbf{s}(t)$ . Thus the full greedily optimal dynamics, in the presence of noise, are given by:
156
+
157
+ $$
158
+ \Delta \mathbf {r} ^ {*} (t) = \left[ \sigma^ {2} \frac {\mathrm {d}}{\mathrm {d} \mathbf {r} (t)} \log p (\mathbf {r} (t)) + \mathbf {D} ^ {\dagger} \frac {\mathrm {d} f (\mathbf {s} (t))}{\mathrm {d} \mathbf {s} (t)} \frac {\mathrm {d} \mathbf {s} (t)}{\mathrm {d} t} \right] \Delta t + \sigma \boldsymbol {\eta} (t). \tag {18}
159
+ $$
160
+
161
+ This heuristic solution provides interpretability to any system attempting to maintain a relationship to a stimulus in the presence of noise. First, denoise the system $(\Delta \mathbf{r}_1^*)$ . Second, use instantaneous changes in the state variable $\left(\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}\right)$ to update state information. In theory, this solution should hold for any trained network capable of arbitrarily precise function approximation (Funahashi & Nakamura, 1993). In the next section, we will demonstrate that this approximately optimal solution will have interesting emergent consequences for neural dynamics in the continuous-time limit $(\Delta t \to 0)$ .
162
+
163
+ # 2.4 EMERGENT OFFLINE REACTIVATION
164
+
165
+ Having derived our greedily optimal dynamics, we are in a position to ask: what happens in the absence of any input to the system, as would be observed in a quiescent state? We will make two assumptions for our model of the quiescent state: 1) $\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t} = 0$ , so that no time-varying input is being provided to the system, and 2) the variance of the noise is increased by a factor of two (deviating from this factor is not catastrophic as discussed below). This gives the following quiescent dynamics $\tilde{\mathbf{r}}$ :
166
+
167
+ $$
168
+ \Delta \tilde {\mathbf {r}} (t) = \left[ \sigma^ {2} \frac {\mathrm {d}}{\mathrm {d} \mathbf {r} (t)} \log p (\mathbf {r} (t)) \right] \Delta t + \sqrt {2} \sigma \boldsymbol {\eta} (t). \tag {19}
169
+ $$
170
+
171
+ Interestingly, this corresponds to Langevin sampling of $p(\mathbf{r})$ (Besag, 1994). Therefore, we can predict an equivalence between the steady-state quiescent sampling distribution $\tilde{p}(\mathbf{r})$ and the active probability distribution over neural states $p(\mathbf{r})$ (so that $p(\mathbf{r}) = \tilde{p}(\mathbf{r})$ , and consequently $p(\mathbf{o}) = \tilde{p}(\mathbf{o})$ ). There are two key components that made this occur: first, the system needed to be performing near-optimal noisy state estimation; second, the system state needed to be determined purely by integrating changes in sensory variables of interest. The final assumption—that noise is doubled during quiescent states—is necessary only to produce sampling from the exact same distribution $p(\mathbf{r})$ . Different noise variances will result in sampling from similar steady-state distributions with different temperature parameters. When these conditions are present, we can expect to see statistically faithful reactivation phenomena during quiescence in optimally trained networks.
172
+
173
+ # 3 NUMERICAL SIMULATION TASK SETUP
174
+
175
+ To validate our mathematical results, we consider numerical experiments on two canonical neuroscience tasks, both of which conform to the structure of the general estimation task considered in our mathematical analysis (Fig. 1a). For each task, we minimize the mean squared error between the network output $\mathbf{o}$ and the task-specific target given by $f\big(\mathbf{s}(t)\big)$ , summed across timesteps.
176
+
177
+ Spatial Position Estimation. In this task, the network must learn to path integrate motion cues in order to estimate an animal's spatial location in a 2D environment. We first generate an animal's motion trajectories $\mathbf{s}_{SP}(t)$ using the model described in Erdem & Hasselmo (2012). Next, we simulate the activities of $n_{SP}$ place cells for all positions visited. The simulated place cells' receptive field centers $\mathbf{c}^{(i)}$ (where $i = 1,\dots,n_{SP}$ ) are randomly and uniformly scattered across the 2D environment, and the activity of each for a position s is given by the following Gaussian tuning curve:
178
+
179
+ $$
180
+ f _ {S P} ^ {(i)} (\mathbf {s}) = \exp \left(- \frac {\| \mathbf {s} - \mathbf {c} ^ {(i)} \| _ {2} ^ {2}}{2 \sigma_ {S P} ^ {2}}\right), \tag {20}
181
+ $$
182
+
183
+ where $\sigma_{SP}$ is the scale. We then train our network to output these simulated place cell activities based on velocity inputs $(\Delta \mathbf{s}_{SP}(t))$ from the simulated trajectories. To estimate the actual position in the environment from the network's outputs, we average the centers associated with the top $k$ most active place cells. Our implementation is consistent with prior work (Banino et al., 2018; Sorscher et al., 2019) and all task hyperparameters are listed in Suppl. Table A.1.
184
+
185
+ Head Direction Estimation. The network's goal in this task is to estimate an animal's bearing $\mathbf{s}_{HD}(t)$ in space based on angular velocity cues $\Delta \mathbf{s}_{HD}(t)$ , where $\mathbf{s}(t)$ is a 1-dimensional circular variable with domain $[-\pi, \pi)$ . As in the previous task, we first generate random head rotation trajectories. The initial bearing is sampled from a uniform distribution $\mathcal{U}(-\pi, \pi)$ , and random turns are sampled from a normal distribution $\mathcal{N}(0, 11.52)$ —this is consistent with the trajectories used in the previous task, but we do not simulate any spatial information. We then simulate the activities of $n_{HD}$ head direction cells whose preferred angles $\theta_i$ (where $i = 1, \dots, n_{HD}$ ) are uniformly spaced between $-\pi$ and $\pi$ , using an implementation similar to the RatInBox package (George et al., 2024). The activity of the $i^{\text{th}}$ cell for a bearing $s$ is given by the following von Mises tuning curve:
186
+
187
+ $$
188
+ f _ {H D} ^ {(i)} (\mathbf {s}) = \frac {\exp \left(\sigma_ {H D} ^ {- 2} \cos \left(\mathbf {s} - \theta^ {(i)}\right)\right)}{2 \pi I _ {0} \left(\sigma_ {H D} ^ {- 2}\right)}, \tag {21}
189
+ $$
190
+
191
+ where $\sigma_{HD}$ is the spread parameter for the von Mises distribution. With these simulated trajectories, we train the network to estimate the simulated head direction cell activities using angular velocity as input. We estimate the actual bearing from the network's outputs by taking the circular mean of the top $k$ most active cells' preferred angles. Hyperparameters for this task are listed in Suppl. Table A.2.
192
+
193
+ Continuous-time RNNs. For our numerical experiments, we use noisy "vanilla" continuous-time RNNs with linear readouts (further details provided in Suppl. Section A.3). The network's activity is transformed by a linear mapping to predicted place cell or head direction cell activities. During the quiescent phase, we simulated network activity in the absence of stimuli, and doubled the noise variance, as prescribed by our mathematical analysis (Section 2.4).
194
+
195
+ # 4 NUMERICAL RESULTS
196
+
197
+ Spatial Position Estimation. We used several different measures to compare the distributions of neural activity in our trained networks during the spatial position estimation task in order to validate our mathematical analysis. First, we found that the explained variance curves as a function of ordered principal components (PCs) for both the active and quiescent phases were highly overlapping and indicated that the activity manifold in both phases was low-dimensional (Fig. 1c). It is also clear that decoded output activity during the quiescent phase is smooth, and tiles output space similarly to trajectories sampled during the waking phase (Fig. 1d-e). This trend was recapitulated by quiescent neural activity projected onto the first two PCs calculated during the active phase (Fig. 1f-g). To quantify in more detail the similarity in the distributions of activity during the active and quiescent
198
+
199
+ ![](images/3f3e42b8b0a80ac55d8e6a2795c4bf8c75307421d82ca2336488e03b10293bcd.jpg)
200
+
201
+ ![](images/37cafb9625e160b3887e10e2f72c145cc3cc9be6a83eee836b7e5ba28a9dd4d4.jpg)
202
+
203
+ ![](images/e1a2e04c97f9e891025783f3b9a22de636939a9ffa9f97dbf4e7476b251e4540.jpg)
204
+ Figure 2: Biased behavioral sampling and distribution comparisons for spatial position estimation. a-b) Decoded positions for networks trained under biased behavioral trajectories for the active (a) and quiescent (b) phases. c-d) KDE plots for 200 decoded active (c) and quiescent (d) output trajectories. e) KL divergence (nats) between KDE estimates for active and quiescent phases. $\mathbf{U} =$ unbiased uniform networks, $\mathbf{B} =$ biased networks, $\mathcal{U} =$ the true uniform distribution, $\mathbf{R} =$ random networks, and the $\sigma$ superscript denotes noisy networks. Values are averaged over five networks. f) Box and whisker plots of the total variance (variance summed over output dimensions) of quiescent trajectories, averaged over 500 trajectories. Each plot (e-f) is for five trained networks.
205
+
206
+ ![](images/1617289844965b243b439ae3de9e30811952435d985e4fd54a7928d1cb06481b.jpg)
207
+
208
+ phases, we computed two-dimensional kernel density estimates (KDEs) on the output trajectories (Fig. 1h-i) and on neural activity projected onto the first two active phase PCs (Fig. 1j-k). As our analysis predicts, we indeed found that the distribution of activity was similar across active and quiescent phases, though notably in the quiescent phase output trajectories and neural activities do not tile space as uniformly as was observed during the active phase.
209
+
210
+ Our theory additionally predicts that if the distribution of network states during the active phase is biased in some way during training, the distribution during the quiescent phase should also be biased accordingly. To test this, we modified the behavioral policy of our agent during training, introducing a drift term that caused it to occupy a ring of spatial locations in the center of the field rather than uniformly tiling space (Fig. 2a). We found again a close correspondence between active and quiescent decoded output trajectories (Fig. 2b), which was also reflected in the KDEs (Fig. 2c-d). These results hold whether or not we increase the variance of noise during quiescence (Suppl. Fig. C.1). We further found that these results hold for continuous-time gated recurrent units (GRUs) (Jordan et al., 2021) (Suppl. Section A.3 and Suppl. Fig. C.2), showing that these reactivation phenomena are not unique to a particular network architecture or activation function. In practice, GRUs were more sensitive to increases in quiescent noise, and other architectures would require more hyperparameter tuning.
211
+
212
+ To compare activity distributions more quantitatively, we estimated the KL divergence of the distribution of active phase output positions to the distribution of quiescent phase decoded output positions using Monte Carlo approximation (Fig. 2e). We compared outputs from both biased and unbiased distributions, and as baselines, we compared to a true uniform distribution, as well as decoded output trajectories generated by random networks. By our metric, we found that unbiased quiescent outputs were almost as close to unbiased active outputs as a true uniform distribution. Similarly, biased quiescent outputs closely resembled biased active outputs, while biased-to-unbiased, biased-to-random, and unbiased-to-random comparisons all diverged. These results verify that during quiescence, our trained networks do indeed approximately sample from the waking trajectory distribution.
213
+
214
+ ![](images/23a88f5a155ce3b9108b169260e198b47e13912fa41768ea6bf175955ef2112a.jpg)
215
+ Figure 3: Reactivation in a head direction estimation task. a-b) Distribution of decoded head direction bearing angles during the active (a) and quiescent (b) phases. c-d) Neural network activity projected onto the first two active phase PCs for active (c) and quiescent (d) phase trajectories. Color bars indicate the decoded output head direction.
216
+
217
+ ![](images/c79b12ed2faf1cebab8e9e34bcd9d2b1cfb2f6a35d74fca12ca16dab4804a4c9.jpg)
218
+
219
+ ![](images/336fb085467acfc5302647d6282263c170fc09598c383370e7015ffa9aea5bd0.jpg)
220
+
221
+ ![](images/10e36d8068d6590e51bdf157ca279e34e45c48d668edf8609fae22dea04fd233.jpg)
222
+
223
+ We decided to further test the necessity of training and generating quiescent network activity in the presence of noise. By the same KL divergence metric, we found that even trajectories generated by networks that were not trained in the presence of noise, and also were not driven by noise in the quiescent phase, still generated quiescent activity distributions that corresponded well to the active phase distributions. This is likely due to the fact that even networks trained in the absence of noise still learned attractive task manifolds that reflected the agent's trajectory sampling statistics. However, we found that networks without noise in the quiescent state exhibited less variable trajectories, as measured by their steady-state total variance (Fig. 2f). This demonstrates that individual quiescent noiseless trajectories explored a smaller portion of the task manifold than did noisy trajectories (see Suppl. Fig. C.3a-d for a comparison of example noisy and noiseless quiescent trajectories). This failure of exploration could not be resolved by adding additional noise to networks during the quiescent phase: we found that without training in the presence of noise, quiescent phase activity with an equivalent noise level generated erratic, non-smooth decoded output trajectories (Suppl. Fig. C.3e-f), with much higher average distance between consecutive points in a trajectory than quiescent trajectories associated with noisy training (Suppl. Fig. C.4a-b). Thus, noisy training stabilizes noisy quiescent activity, which in turn explores more of the task manifold than noiseless quiescent activity.
224
+
225
+ Head Direction Estimation. To demonstrate the generality of our results across tasks, we also examined the reactivation phenomenon in the context of head direction estimation. Here, as in the previous task, we found that the distribution of decoded head direction bearings closely corresponded across the active and quiescent phases (Fig. 3a-b). Furthermore, we found that the distributions of neural trajectories, projected onto the first two active phase PCs, closely corresponded across both phases (Fig. 3c-d), showing apparent sampling along a ring attractor manifold. To explore whether reactivation dynamics also recapitulate the moment-to-moment transition structure of waking activity, we biased motion in the head direction system to be counter-clockwise (Suppl. Fig. C.5). We found that quiescent trajectories partially recapitulated the transition structure of active phase trajectories, and maintained their bearing for longer periods, resembling real neural activity more closely. The biased velocities were reflected during quiescence, but less clearly than during waking. However, reversals in the trajectories still occurred. These results demonstrate that the type of "diffusive" rehearsal dynamics explored by our theory are still able to produce the temporally correlated, sequential reactivation dynamics observed in the head direction system (Peyrache et al., 2015).
226
+
227
+ # 5 DISCUSSION
228
+
229
+ In this study, we have provided mathematical conditions under which reactivation is expected to emerge in task-optimized recurrent neural circuits. Our results come with several key conditions and caveats. Our conditions are as follows: first, the network must implement a noisy, continuous-time dynamical system; second, the network must be solving a state variable estimation task near-optimally, by integrating exclusively change-based inputs $\left(\frac{\mathrm{ds}(t)}{\mathrm{dt}}\right)$ to reconstruct some function of the state variables $(f(\mathbf{s}(t)))$ (for a full list of assumptions see Suppl. Section B). Under these conditions, we demonstrated that a greedily optimal solution to the task involves a combination of integrating the
230
+
231
+ state variables and denoising. In absence of inputs (quiescent phase), we assumed that the system would receive no stimuli $(\frac{\mathrm{ds}(t)}{\mathrm{dt}} = 0)$ so that the system is dominated by its denoising dynamics, and that noise variance would increase slightly (by a factor of 2). Under these conditions, we showed that the steady-state probability distribution of network states during quiescence $(\tilde{p}(\mathbf{r}))$ should be equivalent to the distribution of network states during active task performance $(p(\mathbf{r}))$ . Thus, these conditions constitute criteria for a form of reactivation to emerge in trained neural systems. Note that though we empirically observe reactivation that mimics the moment-to-moment transition structure of waking networks (Suppl. Fig. C.5), our theory does not yet explain how this phenomenon emerges.
232
+
233
+ We have validated our mathematical results empirically in two tasks with neuroscientific relevance. The first, a path integration task, required the network to identify its location in space based on motion cues. This form of path integration has been used to model the entorhinal cortex (Sorscher et al., 2019), a key brain area in which reactivation dynamics have been observed (Gardner et al., 2019; 2022). The second task required the network to estimate a head direction orientation based on angular velocity cues. This function in the mammalian brain has been attributed to the anterodorsal thalamic nucleus (ADn) and post-subiculum (PoS) (Taube et al., 1990; Taube, 1995; 2007), another critical locus for reactivation dynamics (Peyrache et al., 2015). Previous models have been able to reproduce these reactivation dynamics, by embedding a smooth attractor in the network's recurrent connectivity along which activity may diffuse during quiescence (Burak & Fiete, 2009; Khona & Fiete, 2022). Similarly, we identified attractors in our trained networks' latent activation space—we found a smooth map of space in the spatial navigation task (Fig. 1f-g) and a ring attractor in the head direction task (Fig. 3c-d). In our case, these attractors emerged from task training, and consequently did not require hand crafting—similar to previous work positing that predictive learning could give rise to hippocampal representations (Recanatesi et al., 2021). Furthermore, beyond previous studies, we were able to show that the statistics of reactivation in our trained networks mimicked the statistics of activity during waking behavior, and that manipulation of waking behavioral statistics was directly reflected in offline reactivation dynamics (Fig. 2). Thus, our work complements these previous studies by providing a mathematical justification for the emergence of reactivation dynamics in terms of optimal task performance.
234
+
235
+ Our results suggest that reactivation in the brain could be a natural consequence of learning in the presence of noise, rather than the product of an explicit generative demand (Hinton et al., 1995; Deperrois et al., 2022). Thus, quiescent reactivation in a brain area should not be taken as evidence for only generative modeling: the alternative, as identified by our work, is that reactivation could be an emergent consequence of task optimization (though it could be used for other computations). Our hypothesis and generative modeling hypotheses may be experimentally dissociable: while generative models necessarily recapitulate the moment-to-moment transition statistics of sensory data, our approach only predicts that the stationary distribution will be identical (Section 2.4). This, for instance, opens the possibility for changes in the timescale of reactivation (Nádasdy et al., 1999).
236
+
237
+ While the experiments explored in this study focus on self-localization and head direction estimation, there are many more systems in which our results may be applicable. In particular, while the early visual system does not require sensory estimation from exclusively change-based information, denoising is a critical aspect of visual computation, having been used for deblurring, occlusion inpainting, and diffusion-based image generation (Kadkhodaie & Simoncelli, 2021)—the mathematical principles used for these applications are deeply related to those used to derive our denoising dynamics. As a consequence, it is possible that with further development our results could also be used to explain similar reactivation dynamics observed in the visual cortex (Kenet et al., 2003; Xu et al., 2012). Furthermore, the task computations involved in head direction estimation are nearly identical to those used in canonical visual working memory tasks in neuroscience (both develop ring attractor structures) (Renart et al., 2003). In addition, evidence integration in decision making involves similar state-variable integration dynamics as used in spatial navigation, where under many conditions the evidence in favor of two opposing decisions is integrated along a line attractor rather than a two-dimensional spatial map (Cain et al., 2013; Mante et al., 2013). Thus our results could potentially be used to model reactivation dynamics observed in areas of the brain dedicated to higher-order cognition and decision making, such as the prefrontal cortex (Peyrache et al., 2009).
238
+
239
+ In conclusion, our work could function as a justification for a variety of reactivation phenomena observed in the brain. It may further provide a mechanism for inducing reactivation in neural circuits in order to support critical maintenance functions, such as memory consolidation or learning.
240
+
241
+ # REPRODUCIBILITY STATEMENT
242
+
243
+ Our code is available on GitHub at https://github.com/nandahkrishna/RNNReactivation. All hyperparameter values and other details on our numerical experiments have been provided in Suppl. Section A.
244
+
245
+ # ACKNOWLEDGMENTS
246
+
247
+ NHK acknowledges the support of scholarships from UNIQUE (https://www.unique.quebec) and IVADO (https://ivado.ca). DL acknowledges support from the FRQNT Strategic Clusters Program (2020-RS4-265502 - Centre UNIQUE – Unifying Neuroscience and Artificial Intelligence – Quebec) and the Richard and Edith Strauss Postdoctoral Fellowship in Medicine. BAR acknowledges support from NSERC (Discovery Grant: RGPIN-2020-05105; Discovery Accelerator Supplement: RGPAS-2020-00031; Arthur B McDonald Fellowship: 566355-2022) and CIFAR (Canada AI Chair; Learning in Machine and Brains Fellowship). GL acknowledges support from NSERC (Discovery Grant: RGPIN-2018-04821), CIFAR (Canada AI Chair), and the Canada Research Chair in Neural Computations and Interfacing. The authors also acknowledge the support of computational resources provided by Mila (https://mila.quebec) and NVIDIA that enabled this research.
248
+
249
+ # REFERENCES
250
+
251
+ Toshitake Asabuki and Tomoki Fukai. Learning rules for cortical-like spontaneous replay of an internal model. bioRxiv, 2023. DOI: 10.1101/2023.02.17.528958. URL: https://www.biorxiv.org/content/early/2023/02/18/2023.02.17.528958.
252
+ Amir Hossein Azizi, Laurenz Wiskott, and Sen Cheng. A computational model for preplay in the hippocampus. Frontiers in Computational Neuroscience, 7, 2013. ISSN: 1662-5188. DOI: 10.3389/fncom.2013.00161. URL: https://www.frontiersin.org/articles/10.3389/fncom.2013.00161.
253
+ Andrea Banino, Caswell Barry, Benigno Uria, Charles Blundell, Timothy Lillicrap, Piotr Mirowski, Alexander Pritzel, Martin J Chadwick, Thomas Degris, Joseph Modayil, Greg Wayne, Hubert Soyer, Fabio Viola, Brian Zhang, Ross Goroshin, Neil Rabinowitz, Razvan Pascanu, Charlie Beattie, Stig Petersen, Amir Sadik, Stephen Gaffney, Helen King, Koray Kavukcuoglu, Demis Hassabis, Raia Hadsell, and Dharshan Kumaran. Vector-based navigation using grid-like representations in artificial agents. Nature, 557(7705):429-433, 2018. ISSN: 1476-4687. DOI: 10.1038/s41586-018-0102-6. URL: https://doi.org/10.1038/s41586-018-0102-6.
254
+ Julian E Besag. Discussion of "Representations of knowledge in complex systems" by Ulf Grenander and Michael I Miller. Journal of the Royal Statistics Society B, 56(4):591-592, 1994.
255
+ Yoram Burak and Ila R Fiete. Accurate path integration in continuous attractor network models of grid cells. PLOS Computational Biology, 5(2):1-16, 2009. DOI: 10.1371/journal.pcbi.1000291. URL: https://doi.org/10.1371/journal.pcbi.1000291.
256
+ György Buzsáki. Two-stage model of memory trace formation: A role for "noisy" brain states. Neuroscience, 31(3):551-570, 1989. ISSN: 0306-4522. DOI: 10.1016/0306-4522(89)90423-5. URL: https://doi.org/10.1016/0306-4522(89)90423-5.
257
+ Nicholas Cain, Andrea K Barreiro, Michael Shadlen, and Eric Shea-Brown. Neural integrators for decision making: A favorable tradeoff between robustness and sensitivity. Journal of Neurophysiology, 109(10):2542-2559, 2013. DOI: 10.1152/jn.00976.2012. URL: https://doi.org/10.1152/jn.00976.2012.
258
+ Tianhao Chu, Zilong Ji, Junfeng Zuo, Yuanyuan Mi, Wen-hao Zhang, Tiejun Huang, Daniel Bush, Neil Burgess, and Si Wu. Firing rate adaptation affords place cell theta sweeps, phase precession and procession. bioRxiv, 2024. DOI: 10.1101/2022.11.14.516400. URL: https://www.biorxiv.org/content/early/2024/04/04/2022.11.14.516400.
259
+
260
+ Christopher J Cueva and Xue-Xin Wei. Emergence of grid-like representations by training recurrent neural networks to perform spatial localization. In International Conference on Learning Representations, 2018. URL: https://openreview.net/forum?id=B17JT0e0-.
261
+ Christopher J Cueva, Peter Y Wang, Matthew Chin, and Xue-Xin Wei. Emergence of functional and structural properties of the head direction system by optimization of recurrent neural networks. In International Conference on Learning Representations, 2020. URL: https://openreview.net/forum?id=Hk1SeREtPB.
262
+ Nicolas Deperrois, Mihai A Petrovici, Walter Senn, and Jakob Jordan. Learning cortical representations through perturbed and adversarial dreaming. eLife, 11:e76384, 2022. ISSN: 2050-084X. DOI: 10.7554/eLife.76384. URL: https://doi.org/10.7554/eLife.76384.
263
+ Uğur M Erdem and Michael Hasselmo. A goal-directed spatial navigation model using forward trajectory planning based on grid cells. European Journal of Neuroscience, 35(6):916-931, 2012. DOI: 10.1111/j.1460-9568.2012.08015.x. URL: https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1460-9568.2012.08015.x.
264
+ David R Euston, Masami Tatsuno, and Bruce L McNaughton. Fast-forward playback of recent memory sequences in prefrontal cortex during sleep. Science, 318(5853):1147-1150, 2007. DOI: 10.1126/science.1148979. URL: https://www.science.org/doi/abs/10.1126/science.1148979.
265
+ David J Foster. Replay comes of age. Annual Review of Neuroscience, 40:581-602, 2017. ISSN: 1545-4126. DOI: 10.1146/annurev-neuro-072116-031538. URL: https://www.annualreviews.org/content/journals/10.1146/annurev-neuro-072116-031538.
266
+ Ken-ichi Funahashi and Yuichi Nakamura. Approximation of dynamical systems by continuous time recurrent neural networks. Neural Networks, 6(6):801-806, 1993. ISSN: 0893-6080. DOI: 10. 1016/S0893-6080(05)80125-X. URL: https://www.sciencedirect.com/science/article/ pii/S089360800580125X.
267
+ Richard J Gardner, Li Lu, Tanja Wernle, May-Britt Moser, and Edvard I Moser. Correlation structure of grid cells is preserved during sleep. Nature Neuroscience, 22(4):598-608, 2019. ISSN: 1546-1726. DOI: 10.1038/s41593-019-0360-0. URL: https://doi.org/10.1038/s41593-019-0360-0.
268
+ Richard J Gardner, Erik Hermansen, Marius Pachtarium, Yoram Burak, Nils A Baas, Benjamin A Dunn, May-Britt Moser, and Edvard I Moser. Toroidal topology of population activity in grid cells. Nature, 602(7895):123-128, 2022. ISSN: 1476-4687. DOI: 10.1038/s41586-021-04268-7. URL: https://doi.org/10.1038/s41586-021-04268-7.
269
+ Tom M George, Mehul Rastogi, William de Cothi, Claudia Clopath, Kimberly Stachenfeld, and Caswell Barry. RatInABox, a toolkit for modelling locomotion and neuronal activity in continuous environments. eLife, 13:e85274, 2024. ISSN: 2050-084X. DOI: 10.7554/eLife.85274. URL: https://doi.org/10.7554/eLife.85274.
270
+ Tatsuya Haga and Tomoki Fukai. Recurrent network model for learning goal-directed sequences through reverse replay. eLife, 7:e34171, 2018. ISSN: 2050-084X. DOI: 10.7554/eLife.34171. URL: https://doi.org/10.7554/eLife.34171.
271
+ Tyler L Hayes and Christopher Kanan. Online continual learning for embedded devices. In Sarath Chandar, Razvan Pascanu, and Doina Precup (eds.), Proceedings of The 1st Conference on Lifelong Learning Agents, volume 199 of Proceedings of Machine Learning Research, pp. 744-766. PMLR, 2022. URL: https://proceedings.mlr.press/v199/hayes22a.htm1.
272
+ Tyler L Hayes, Nathan D Cahill, and Christopher Kanan. Memory efficient experience replay for streaming learning. In 2019 International Conference on Robotics and Automation (ICRA), pp. 9769-9776. IEEE Press, 2019. DOI: 10.1109/ICRA.2019.8793982. URL: https://doi.org/10.1109/ICRA.2019.8793982.
273
+ Geoffrey E Hinton, Peter Dayan, Brendan J Frey, and Radford M Neal. "wake-sleep" algorithm for unsupervised neural networks. Science, 268(5214):1158-1161, 1995. DOI: 10.1126/science.7761831. URL: https://www.science.org/doi/abs/10.1126/science.7761831.
274
+
275
+ Kari L Hoffman and Bruce L McNaughton. Coordinated reactivation of distributed memory traces in primate neocortex. Science, 297(5589):2070-2073, 2002. DOI: 10.1126/science.1073538. URL: https://www.science.org/doi/abs/10.1126/science.1073538.
276
+ John J Hopfield. Neurodynamics of mental exploration. Proceedings of the National Academy of Sciences, 107(4):1648-1653, 2010. DOI: 10.1073/pnas.0913991107. URL: https://www.pnas.org/doi/abs/10.1073/pnas.0913991107.
277
+ Hideyoshi Igata, Yuji Ikegaya, and Takuya Sasaki. Prioritized experience replays on a hippocampal predictive map for learning. Proceedings of the National Academy of Sciences, 118(1): e2011266118, 2021. DOI: 10.1073/pnas.2011266118. URL: https://www.pnas.org/doi/abs/10.1073/pnas.2011266118.
278
+ Ian D Jordan, Piotr Aleksander Sokol, and Il Memming Park. Gated recurrent units viewed through the lens of continuous time dynamical systems. Frontiers in Computational Neuroscience, 15, 2021. ISSN: 1662-5188. DOI: 10.3389/fncom.2021.678158. URL: https://www.frontiersin.org/articles/10.3389/fncom.2021.678158.
279
+ Zahra Kadkhodaie and Eero P Simoncelli. Stochastic solutions for linear inverse problems using the prior implicit in a denoiser. In Marc'Aurelio Ranzato, Alina Beygelzimer, Yann N Dauphin, Percy Liang, and Jennifer Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 13242-13254. Curran Associates, Inc., 2021. URL: https://proceedings.neurips.cc/paper_files/paper/2021/file/6e28943943dbed3c7f82fc05f269947a-Paper.pdf.
280
+ Louis Kang and Michael R DeWeese. Replay as wavefronts and theta sequences as bump oscillations in a grid cell attractor network. eLife, 8:e46351, 2019. ISSN: 2050-084X. DOI: 10.7554/eLife.46351. URL: https://doi.org/10.7554/eLife.46351.
281
+ Tal Kenet, Dmitri Bibitchkov, Misha Tsodyks, Amiram Grinvald, and Amos Arieli. Spontaneously emerging cortical representations of visual attributes. Nature, 425(6961):954-956, 2003. ISSN: 1476-4687. DOI: 10.1038/nature02078. URL: https://doi.org/10.1038/nature02078.
282
+ Mikail Khona and Ila R Fiete. Attractor and integrator networks in the brain. Nature Reviews Neuroscience, 23(12):744-766, 2022. ISSN: 1471-0048. DOI: 10.1038/s41583-022-00642-0. URL: https://doi.org/10.1038/s41583-022-00642-0.
283
+ Albert K Lee and Matthew A Wilson. Memory of sequential experience in the hippocampus during slow wave sleep. Neuron, 36(6):1183-1194, 2002. ISSN: 0896-6273. DOI: 10.1016/S0896-6273(02)01096-6. URL: https://doi.org/10.1016/S0896-6273(02)01096-6.
284
+ Penelope A Lewis and Simon J Durrant. Overlapping memory replay during sleep builds cognitive schemata. Trends in Cognitive Sciences, 15(8):343-351, 2011. ISSN: 1364-6613. DOI: 10.1016/j.tics.2011.06.004. URL: https://doi.org/10.1016/j.tics.2011.06.004.
285
+ Ashok Litwin-Kumar and Brent Doiron. Formation and maintenance of neuronal assemblies through synaptic plasticity. Nature Communications, 5(1):5319, 2014. ISSN: 2041-1723. DOI: 10.1038/ncomms6319. URL: https://doi.org/10.1038/ncomms6319.
286
+ Valerio Mante, David Sussillo, Krishna V Shenoy, and William T Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78-84, 2013. ISSN: 1476-4687. DOI: 10.1038/nature12742. URL: https://doi.org/10.1038/nature12742.
287
+ James L McClelland, Bruce L McNaughton, and Randall C O'Reilly. Why there are complementary learning systems in the hippocampus and neocortex: Insights from the successes and failures of connectionist models of learning and memory. *Psychological Review*, 102(3):419–457, 1995. ISSN: 0033-295X. DOI: 10.1037/0033-295X.102.3.419. URL: https://doi.org/10.1037/0033-295X.102.3.419.
288
+ Aaron D Milstein, Sarah Tran, Grace Ng, and Ivan Soltesz. Offline memory replay in recurrent neuronal networks emerges from constraints on online dynamics. The Journal of Physiology, 601(15):3241-3264, 2023. DOI: 10.1113/JP283216. URL: https://physoc.onlinelibrary.wiley.com/doi/abs/10.1113/JP283216.
289
+
290
+ Koichi Miyasawa. An empirical Bayes estimator of the mean of a normal population. Bulletin of the International Statistical Institute, 38(4):181-188, 1961.
291
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529-533, 2015. ISSN: 1476-4687. DOI: 10.1038/nature14236. URL: https://doi.org/10.1038/nature14236.
292
+ Zoltán Nádasdy, Hajime Hirase, András Czurko, Jozsef Csicsvari, and György Buzsáki. Replay and time compression of recurring spike sequences in the hippocampus. Journal of Neuroscience, 19 (21):9497-9507, 1999. ISSN: 0270-6474. DOI: 10.1523/JNEUROSCI.19-21-09497.1999. URL: https://www.jneurosci.org/content/19/21/9497.
293
+ Adrien Peyrache, Mehdi Khamassi, Karim Benchenane, Sidney I Wiener, and Francesco P Battaglia. Replay of rule-learning related neural patterns in the prefrontal cortex during sleep. Nature Neuroscience, 12(7):919-926, 2009. ISSN: 1546-1726. DOI: 10.1038/nn.2337. URL: https://doi.org/10.1038/nn.2337.
294
+ Adrien Peyrache, Marie M Lacroix, Peter C Petersen, and György Buzsáki. Internally organized mechanisms of the head direction sense. Nature Neuroscience, 18(4):569-575, 2015. ISSN: 1546-1726. DOI: 10.1038/nn.3968. URL: https://doi.org/10.1038/nn.3968.
295
+ Martin Raphan and Eero P Simoncelli. Least squares estimation without priors or supervision. Neural Computation, 23(2):374-420, 2011. ISSN: 0899-7667. DOI: 10.1162/NECO_a_00076. URL: https://doi.org/10.1162/NECO_a_00076.
296
+ Stefano Recanatesi, Matthew Farrell, Guillaume Lajoie, Sophie Deneve, Mattia Rigotti, and Eric Shea-Brown. Predictive learning as a network mechanism for extracting low-dimensional latent space representations. Nature Communications, 12(1):1417, 2021. ISSN: 2041-1723. DOI: 10.1038/s41467-021-21696-1. URL: https://doi.org/10.1038/s41467-021-21696-1.
297
+ Alfonso Renart, Pengcheng Song, and Xiao-Jing Wang. Robust spatial working memory through homeostatic synaptic scaling in heterogeneous cortical networks. Neuron, 38(3):473-485, 2003. ISSN: 0896-6273. DOI: 10.1016/S0896-6273(03)00255-1. URL: https://doi.org/10.1016/S0896-6273(03)00255-1.
298
+ Bin Shen and Bruce L McNaughton. Modeling the spontaneous reactivation of experience-specific hippocampal cell assemblies during sleep. Hippocampus, 6(6):685-692, 1996. DOI: 10.1002/(SICI) 1098-1063(1996)6:6<685::AID-HIPO11>3.0.CO;2-X. URL: https://onlinelibrary.wiley.com/doi/10.1002/(SICI)1098-1063(1996)6:6%3C685::AID-HIPO11%3E3.0.CO;2-X.
299
+ Ben Sorscher, Gabriel Mel, Surya Ganguli, and Samuel Ocko. A unified theory for the origin of grid cells through the lens of pattern formation. In Hanna M Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d'Alché Buc, Emily B Fox, and Roman Garnett (eds.), Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL: https://proceedings.neurips.cc/paper_files/paper/2019/file/6e7d5d259be7bf56ed79029c4e621f44-Paper.pdf.
300
+ Jeffrey S Taube. Head direction cells recorded in the anterior thalamic nuclei of freely moving rats. Journal of Neuroscience, 15(1):70-86, 1995. ISSN: 0270-6474. DOI: 10.1523/JNEUROSCI.15-01-00070.1995. URL: https://www.jneurosci.org/content/15/1/70.
301
+ Jeffrey S Taube. The head direction signal: Origins and sensory-motor integration. Annual Review of Neuroscience, 30:181-207, 2007. ISSN: 1545-4126. DOI: 10.1146/annurev.neuro.29.051605.112854. URL: https://www.annualreviews.org/content/journals/10.1146/annurev.neuro.29.051605.112854.
302
+ Jeffrey S Taube, Robert U Muller, and James B Ranck, Jr. Head-direction cells recorded from the postsubiculum in freely moving rats. II. Effects of environmental manipulations. Journal of Neuroscience, 10(2):436-447, 1990. ISSN: 0270-6474. DOI: 10.1523/JNEUROSCI.10-02-00436. 1990. URL: https://www.jneurosci.org/content/10/2/436.
303
+
304
+ Panagiotla Theodoni, Bernat Rovira, Yingxue Wang, and Alex Roxin. Theta-modulation drives the emergence of connectivity patterns underlying replay in a network model of place cells. eLife, 7:e37388, 2018. ISSN: 2050-084X. DOI: 10.7554/eLife.37388. URL: https://doi.org/10.7554/eLife.37388.
305
+ David Tingley and Adrien Peyrache. On the methods for reactivation and replay analysis. Philosophical Transactions of the Royal Society B: Biological Sciences, 375(1799):20190231, 2020. DOI: 10.1098/rstb.2019.0231. URL: https://royalsocietypublishing.org/doi/abs/10.1098/rstb.2019.0231.
306
+ Benigno Uria, Borja Ibarz, Andrea Banino, Vinicius Zambaldi, Dharshan Kumaran, Demis Hassabis, Caswell Barry, and Charles Blundell. A model of egocentric to allocentric understanding in mammalian brains. bioRxiv, 2022. DOI: 10.1101/2020.11.11.378141. URL: https://www.biorxiv.org/content/early/2022/03/15/2020.11.11.378141.
307
+ Pauli Virtanen, Ralf Gommers, Travis E Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, PEARU Peterson, Warren Weckesser, Jonathan Bright, Stefan J van der Walt, Matthew Brett, Joshua Wilson, K Jarrod Millman, Nikolay Mayorov, Andrew RJ Nelson, Eric Jones, Robert Kern, Eric Larson, CJ Carey, Ilhan Polat, Yu Feng, Eric W Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, EA Quintero, Charles R Harris, Anne M Archibald, Antonio H Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nature Methods, 17(3):261-272, 2020. ISSN: 1548-7105. DOI: 10.1038/s41592-019-0686-2. URL: https://doi.org/10.1038/s41592-019-0686-2.
308
+ Shengjin Xu, Wanchen Jiang, Mu-ming Poo, and Yang Dan. Activity recall in a visual cortical ensemble. Nature Neuroscience, 15(3):449-455, 2012. ISSN: 1546-1726. DOI: 10.1038/nn.3036. URL: https://doi.org/10.1038/nn.3036.
309
+ H Freyja Olafsdóttir, Caswell Barry, Aman B Saleem, Demis Hassabis, and Hugo J Spiers. Hippocampal place cells construct reward related sequences through unexplored space. eLife, 4:e06063, 2015. ISSN: 2050-084X. DOI: 10.7554/eLife.06063. URL: https://doi.org/10.7554/eLife.06063.
310
+
311
+ # SUPPLEMENTARY MATERIAL
312
+
313
+ # A NUMERICAL SIMULATION DETAILS
314
+
315
+ # A.1 TASK HYPERPARAMETERS
316
+
317
+ Table A.1: Hyperparameters for the spatial position estimation task.
318
+
319
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>TASK</td><td></td></tr><tr><td>Environment size</td><td>2.2m × 2.2m</td></tr><tr><td>Border region</td><td>0.03 m</td></tr><tr><td>Border slowdown factor</td><td>0.25</td></tr><tr><td>Position initialization</td><td>U(-2.2, 2.2)</td></tr><tr><td>Rotation velocity bias</td><td>0 rad/s</td></tr><tr><td>Rotation velocity std. dev.</td><td>11.52 rad/s</td></tr><tr><td>Rayleigh forward velocity</td><td>0.2 m/s</td></tr><tr><td>Biasing anchor point</td><td>(0, 0)</td></tr><tr><td>Biasing drift constant</td><td>0.05</td></tr><tr><td># place cells</td><td>512</td></tr><tr><td>σSP</td><td>0.2</td></tr><tr><td>Sequence length</td><td>active = 100, quiescent = 200</td></tr><tr><td>σ</td><td>0.01/√0.02 ≈ 0.0707</td></tr><tr><td>NETWORK</td><td></td></tr><tr><td># recurrent units</td><td>512</td></tr><tr><td>τ</td><td>0.1</td></tr><tr><td>TRAINING</td><td></td></tr><tr><td>Batch size</td><td>200</td></tr><tr><td># batches</td><td>2500</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Learning rate</td><td>0.001</td></tr></table>
320
+
321
+ Table A.2: Hyperparameters for the head direction estimation task.
322
+
323
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>TASK</td><td></td></tr><tr><td>Bearing initialization</td><td>U(-π,π)</td></tr><tr><td>Rotation velocity bias</td><td>0 rad/s</td></tr><tr><td>Rotation velocity std. dev.</td><td>11.52 rad/s</td></tr><tr><td># head direction cells</td><td>512</td></tr><tr><td>σHD</td><td>π/6</td></tr><tr><td>Sequence length</td><td>active = 100, quiescent = 200</td></tr><tr><td>σ</td><td>0.1/√0.02 ≈ 0.7071</td></tr><tr><td>NETWORK</td><td></td></tr><tr><td># recurrent units</td><td>128</td></tr><tr><td>τ</td><td>0.04</td></tr><tr><td>TRAINING</td><td></td></tr><tr><td>Batch size</td><td>200</td></tr><tr><td># batches</td><td>20000</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Learning rate</td><td>0.001</td></tr></table>
324
+
325
+ # A.2 ADDITIONAL DETAILS
326
+
327
+ Kernel Density Estimation (KDE). To compute KDEs, we used the stats.gaussian_kde() method from scipy (Virtanen et al., 2020), with all hyperparameters set to their default values. For all KDE plots, we computed the density estimates using 200 trajectories of 100 timesteps each for the active phase and 200 timesteps each for the quiescent phase. For Fig. 2e, we estimated densities using 200 trajectories of 100 timesteps each for the active phase and 1000 timesteps each for the quiescent phase (to get a better estimate of the steady-state distribution). We used 2500 samples from each distribution to compute the KL divergence by Monte Carlo approximation.
328
+
329
+ Quantifying exploration during quiescence. To analyze the importance of noise for exploration during quiescence, we computed the steady-state total variance (variance summed over output dimensions) for 200 quiescent trajectories from each trained network. For Fig. 2f, we generated trajectories of 2000 timesteps each and truncated the first 1000 timesteps before computing the variance, to demonstrate that noise facilitates greater and continued exploration over long timescales.
330
+
331
+ # A.3 NOISY CONTINUOUS-TIME RNNS
332
+
333
+ "Vanilla" RNNs. For most of our numerical experiments, we use noisy "vanilla" continuous-time RNNs with linear readouts. The equations for network updates and output estimates are as follows:
334
+
335
+ $$
336
+ \Delta \mathbf {r} (t) = \frac {1}{\tau} \left[ - \mathbf {r} (t) + \operatorname {R e L U} \left(\mathbf {W} ^ {\text {r e c}} \mathbf {r} (t) + \mathbf {W} ^ {\text {i n}} \Delta \mathbf {s} (t)\right) \right] \Delta t + \sigma \boldsymbol {\eta} (t) \tag {A.1}
337
+ $$
338
+
339
+ $$
340
+ \mathbf {o} = \mathbf {D r} (t), \tag {A.2}
341
+ $$
342
+
343
+ where $\mathbf{r}(t)$ represents the network activity at time $t$ , $\Delta \mathbf{s}(t)$ is a change-based input to the network, $\mathbf{W}^{rec}$ and $\mathbf{W}^{in}$ are the recurrent and input weight matrices respectively, $\tau$ is the RNN time constant, and $\eta(t) \sim \mathcal{N}(0, \Delta t)$ is Brownian noise. The continuous-time dynamics are approximated using the Euler-Maruyama method with integration timestep $\Delta t = 0.02\mathrm{s}$ . The network's activity is transformed by a linear mapping $\mathbf{D}$ to predicted place cell or head direction cell activities $\mathbf{o}$ . During the quiescent phase, we simulated network activity in the absence of stimuli $(\Delta \mathbf{s}(t) = 0)$ , and doubled the noise variance, as prescribed by our mathematical analysis (Section 2.4).
344
+
345
+ We set the value of $\tau$ for each task to ensure that the RNN is able to respond quick enough to inputs and ensure optimal performance. Further, for each task we choose different training values for $\sigma$ to scale the Brownian noise to establish an effective signal-to-noise ratio that is high enough to accurately solve the task. From this baseline noise level, quiescent trajectories were calculated with doubled variance.
346
+
347
+ Gated recurrent units (GRUs). We also used a continuous-time GRU formulation similar to the one described by Jordan et al. (2021). The equations for network updates and output estimates are:
348
+
349
+ $$
350
+ \mathbf {z} (t) = \operatorname {s i g m o i d} \left(\mathbf {W} _ {z} ^ {r e c} \mathbf {r} (t) + \mathbf {W} _ {z} ^ {i n} \Delta \mathbf {s} (t)\right) \tag {A.3}
351
+ $$
352
+
353
+ $$
354
+ \mathbf {g} (t) = \operatorname {s i g m o i d} \left(\mathbf {W} _ {g} ^ {r e c} \mathbf {r} (t) + \mathbf {W} _ {g} ^ {i n} \Delta \mathbf {s} (t)\right) \tag {A.4}
355
+ $$
356
+
357
+ $$
358
+ \Delta \mathbf {r} (t) = \frac {1}{\tau} \left[ (1 - \mathbf {z} (t)) \odot \left(\tanh \left(\mathbf {W} _ {r} ^ {r e c} (\mathbf {g} (t) \odot \mathbf {r} (t)) + \mathbf {W} _ {r} ^ {i n} \Delta \mathbf {s} (t)\right) - \mathbf {r} (t)\right) \right] \Delta t + \sigma \boldsymbol {\eta} (t) \tag {A.5}
359
+ $$
360
+
361
+ $$
362
+ \mathbf {o} = \mathbf {D r} (t), \tag {A.6}
363
+ $$
364
+
365
+ where $\mathbf{r}(t)$ represents the network activity at time $t$ , $\mathbf{z}(t)$ and $\mathbf{g}(t)$ are gates, $\Delta \mathbf{s}(t)$ is a change-based input to the network, $\mathbf{W}_{z}^{rec}$ , $\mathbf{W}_{z}^{in}$ , $\mathbf{W}_{g}^{rec}$ , $\mathbf{W}_{g}^{in}$ , $\mathbf{W}_{r}^{rec}$ and $\mathbf{W}_{r}^{in}$ are weight matrices, $\tau$ is the time constant, and $\eta(t) \sim \mathcal{N}(0, \Delta t)$ is Brownian noise. The continuous-time dynamics are approximated using the Euler-Maruyama method with integration timestep $\Delta t = 0.02\mathrm{s}$ . Just as with the vanilla RNN, the network's activity is transformed by a linear mapping $\mathbf{D}$ to predicted place cell or head direction cell activities $\mathbf{o}$ . During the quiescent phase, we simulated network activity in the absence of stimuli ( $\Delta \mathbf{s}(t) = 0$ ), but we do not double the noise variance due to noise-sensitivity. We set appropriate values for $\tau$ and $\sigma$ , just as with the vanilla RNNs.
366
+
367
+ # B KEY ASSUMPTIONS FOR MATHEMATICAL RESULTS
368
+
369
+ 1. We consider discrete-time approximations of noisy continuous-time RNNs. Using continuous-time RNNs is a common practice in the literature, and we use their discrete-time approximations to be in line with our numerical simulations.
370
+ 2. The network must be performing some variant of path integration, by integrating change-based information about environmental state variables to some function of these variables. This condition is often met in natural settings, such as spatial navigation.
371
+ 3. We assume that the inputs to the network are drawn from a stationary distribution, which amounts to ignoring the effects of initial conditions on state occupancy statistics, and also assuming that the behavioral policy remains constant throughout time.
372
+ 4. We consider greedy optimization of the loss at every timestep. Greedy optimization is a sensible way of partitioning effort across time in this task: the network does the best that it can at each timestep, assuming that at each previous timestep the best possible job has been done. In the absence of noise, the greedily optimal solution is equivalent to path integration, which is also a globally optimal solution.
373
+ 5. We assume that the network is performing optimally in the presence of noise. In practice, we train our networks until their loss reaches very low, near-zero values.
374
+ 6. We assume that our network dynamics can be decomposed into two terms with different functional dependencies. The first term depends only on the activity, while the second term depends on all original dependencies—the activity, the state, and the change-based inputs.
375
+ 7. For the quiescent phase, we assume that the change-based sensory inputs are zero. This is reasonable because for tasks like those we have considered, which involve integrating self-motion cues, $\frac{\mathrm{d}\mathbf{s}(t)}{\mathrm{d}t}$ must be zero during periods of quiescence like sleep, where the animal is not moving and hence does not receive sensory inputs associated with self-motion.
376
+ 8. While we assume that the noise variance is doubled during quiescence to show exact equivalence with Langevin sampling, this is by no means necessary to witness reactivation (Suppl. Fig. C.2). This noise variance is equivalent to a temperature parameter for the sampling.
377
+
378
+ # C ADDITIONAL NUMERICAL SIMULATIONS
379
+
380
+ ![](images/c91b842633afa84c567217ce54bf896a8b8c41e723c26359a1a3141fbd9ef0cb.jpg)
381
+
382
+ ![](images/d98cb9e99b16eaf5833f1ee22cad383ab99d4a6de798f34dc6087f5ac7b56d7b.jpg)
383
+
384
+ ![](images/8e2bebb8ee083efec67a025804785c9a5701d8da080e3764a0a8398aae0ed8cd.jpg)
385
+
386
+ ![](images/93e391393578a4ce4df0d7dd866b70d54b2572643b4223f3c4c111b5911bbe7b.jpg)
387
+
388
+ ![](images/4dc1e23af13d5976e47a0a9680e5f11edbd49ce530cf979ce56717e12e8ff83a.jpg)
389
+
390
+ ![](images/b561854d54daf214e65cc7817098e48c55e44f3a5eb149d7c7c1db1afdf44a09.jpg)
391
+ Figure C.1: Spatial position estimation results without increased noise variance during quiescence. a-b) Decoded output trajectories during active (a) and quiescent (b) phases for a network trained on the unbiased task. c-d) Same as (a-b) but for a network trained on the biased task. e-f) KDE plots for 200 decoded active (e) and quiescent (f) output trajectories for the unbiased task. g-h) Same as (e-f) but for the biased task.
392
+
393
+ ![](images/752d1753976560a55a62828d27fcdc885a66f91fccb00f55907c053448383c68.jpg)
394
+
395
+ ![](images/ed9f562fa275f0020a991b99dc687f9e6f02b5b86519d50412b59191ec7dc293.jpg)
396
+
397
+ ![](images/ed509d4aa3fda1d4fc16a8a6618e0a2679e1554e9b56c0b2263244c00ebaab72.jpg)
398
+
399
+ ![](images/99637bc2c8125a5caceca714111cc7036b9156592338a5e2e29ff19532dc7b5a.jpg)
400
+
401
+ ![](images/490606471fd49072e073994b72a09244deaa00091965a076d97c62d780f958ea.jpg)
402
+
403
+ ![](images/5ba57ffda32e3486785f28399b206d01fae2f548cf23488d23c476041b635e27.jpg)
404
+
405
+ ![](images/ba63a1312b28939655a736b30a96f73d36f48a1c1cbd0510b6a4c70a58000717.jpg)
406
+ Figure C.2: Spatial position estimation results for GRU networks. a-b) Decoded output trajectories during active (a) and quiescent (b) phases for a network trained on the unbiased task. c-d) Same as (a-b) but for a network trained on the biased task. e-f) KDE plots for 200 decoded active (e) and quiescent (f) output trajectories for the unbiased task. g-h) Same as (e-f) but for the biased task.
407
+
408
+ ![](images/0994f53dec71377797149d2d414a4b74375cd30889c64cf7f321bcc54c14c9cb.jpg)
409
+
410
+ ![](images/39ec7b981fc33145f9372526461fa4b3aa3d287373278d05368f9b324e392be3.jpg)
411
+
412
+ ![](images/5655e36d9a7113166a4196af296d4f1c333fc8b5fd99dbaeb43bed6e3c54727c.jpg)
413
+
414
+ ![](images/987d666f87c478e34a3bf99cdcd4186760429d66ff705c73d910c3a769bf25ec.jpg)
415
+
416
+ ![](images/7e8aff9598200fb6c02d1ac9131551ac16edc01e6a601fa275cef80f59c6586a.jpg)
417
+ Figure C.3: Example decoded quiescent trajectories under different noise conditions for spatial position estimation. a-b) Example noisy quiescent trajectories for a network trained in the presence of noise, for the unbiased (a) and biased (b) tasks. c-d) Same as (a-b), but for noiseless quiescent trajectories for a network trained without noise. e-f) Same as (a-b), but for noisy quiescent trajectories for a network trained without noise.
418
+
419
+ ![](images/04409c89c056b78ffb8a740d314c90f5e2860d1d7bc832c968e6e79dcb98345b.jpg)
420
+
421
+ ![](images/76f38a1534b64a5f97a7fbfbfe321808d951e04df4d1d4727dffce4eb9f86a9a.jpg)
422
+
423
+ ![](images/35bd0bf969b738d70038c264473a44708702a0d4621ca1547c3eeb92446d1aaa.jpg)
424
+ Figure C.4: Distributions of average distances between consecutive points in output trajectories for unbiased and biased spatial position estimation. a) Distributions for the unbiased task. NT denotes noisy training while DT denotes deterministic (noiseless) training. b) Same as (a) but for the biased task. In each case, the box and whisker plots show the distribution of within-trajectory average point-to-point distances, computed for 200 output trajectories and 5 random seeds.
425
+
426
+ ![](images/834142d2414192fd7ebd328bd29145d5bd7b65e3d99e463c07b792293c1ec2a8.jpg)
427
+
428
+ ![](images/575f38438509e8a2d393533cf38688c81385f0f93efe8edd53055ce49c51a1ba.jpg)
429
+
430
+ ![](images/5047d4de84baeb0dc4d469f83454635850edf1feb099b2833c115b0822ccfbfd.jpg)
431
+
432
+ ![](images/2387134b88ad0401a2f1ab6fbd4a6b4f5af02d57d676622f778077080c272a25.jpg)
433
+
434
+ ![](images/660fbee3b8f46c584f20f9a3eb7d355b956ee860a40511ec7ff1f5abb240cc46.jpg)
435
+ Figure C.5: Biased moment-to-moment transition structure for the head direction estimation task. a-b) Decoded trajectories from the active (a) and quiescent (b) phases, for a biased network trained on counter-clockwise trajectories. c) Decoded trajectory from the quiescent phase for an unbiased network. Sequence length is 50 timesteps for active phase trajectories (a) and 500 timesteps for quiescent trajectories (b-c). d-f) Distributions of angular velocities during the active (d) and quiescent (e) phases for a biased network, and the quiescent phase for an unbiased network (f). Dashed line denotes the mean.
436
+
437
+ ![](images/033e83240c9962438310b3d916c86eb00e6239b8b18cb09d45b00f9f508f72b6.jpg)
438
+
439
+ ![](images/ef4d6e7426d370e664f1cf4d597a01e5989d35375238e292febab02f03d24c4e.jpg)
2024/Sufficient conditions for offline reactivation in recurrent neural networks/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23a2547f0d0ef94d9f2e752ddecbd56617f39b0ffd46b1b4cbb612790fbcc3b0
3
+ size 881000
2024/Sufficient conditions for offline reactivation in recurrent neural networks/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/9310a89c-a275-4156-9919-9c74c45d2990_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f348f310ab7f9fedaeae886c5f38e6962c42444f30f3e04d678f5f3711042507
3
+ size 635498
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b56d146add57c91f82b2d31b5635159f5369d1a6337390b395519764969cc245
3
+ size 701214
2024/Sum-Product-Set Networks_ Deep Tractable Models for Tree-Structured Graphs/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Supervised Knowledge Makes Large Language Models Better In-context Learners/a11ee9aa-f3c6-49ae-825d-9e08768ce2ce_content_list.json ADDED
The diff for this file is too large to render. See raw diff