ZHANGYUXUAN-zR commited on
Commit
6421987
·
verified ·
1 Parent(s): c40fbd1

Add files using upload-large-folder tool

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 +228 -0
  2. parse/dev/2PSrjVtj6gU/2PSrjVtj6gU_middle.json +0 -0
  3. parse/dev/2PSrjVtj6gU/2PSrjVtj6gU_model.json +0 -0
  4. parse/dev/D87gRf2-np/D87gRf2-np.md +0 -0
  5. parse/dev/D87gRf2-np/D87gRf2-np_middle.json +0 -0
  6. parse/dev/D87gRf2-np/D87gRf2-np_model.json +0 -0
  7. parse/dev/L3_SsSNMmy/L3_SsSNMmy_middle.json +0 -0
  8. parse/dev/L3_SsSNMmy/L3_SsSNMmy_model.json +0 -0
  9. parse/dev/NPJznfA7ZC/NPJznfA7ZC.md +284 -0
  10. parse/dev/NPJznfA7ZC/NPJznfA7ZC_content_list.json +1621 -0
  11. parse/dev/NPJznfA7ZC/NPJznfA7ZC_middle.json +0 -0
  12. parse/dev/NPJznfA7ZC/NPJznfA7ZC_model.json +0 -0
  13. parse/dev/R8sQPpGCv0/R8sQPpGCv0.md +411 -0
  14. parse/dev/dNigytemkL/dNigytemkL_model.json +0 -0
  15. parse/dev/ePZsWeGJXyp/ePZsWeGJXyp.md +194 -0
  16. parse/dev/ePZsWeGJXyp/ePZsWeGJXyp_content_list.json +933 -0
  17. parse/dev/ePZsWeGJXyp/ePZsWeGJXyp_middle.json +0 -0
  18. parse/dev/g3faCfrwm7/g3faCfrwm7.md +167 -0
  19. parse/dev/g3faCfrwm7/g3faCfrwm7_content_list.json +996 -0
  20. parse/dev/g3faCfrwm7/g3faCfrwm7_middle.json +0 -0
  21. parse/dev/g3faCfrwm7/g3faCfrwm7_model.json +0 -0
  22. parse/dev/iTtGCMDEzS_/iTtGCMDEzS__middle.json +0 -0
  23. parse/dev/wiBEFdAvl8L/wiBEFdAvl8L_content_list.json +1330 -0
  24. parse/train/-2FCwDKRREu/-2FCwDKRREu_layout.pdf +3 -0
  25. parse/train/-2FCwDKRREu/-2FCwDKRREu_origin.pdf +3 -0
  26. parse/train/-2FCwDKRREu/-2FCwDKRREu_span.pdf +3 -0
  27. parse/train/14nC8HNd4Ts/14nC8HNd4Ts_layout.pdf +3 -0
  28. parse/train/14nC8HNd4Ts/14nC8HNd4Ts_origin.pdf +3 -0
  29. parse/train/14nC8HNd4Ts/14nC8HNd4Ts_span.pdf +3 -0
  30. parse/train/2UyqK45_djA/2UyqK45_djA_layout.pdf +3 -0
  31. parse/train/2UyqK45_djA/2UyqK45_djA_origin.pdf +3 -0
  32. parse/train/2UyqK45_djA/2UyqK45_djA_span.pdf +3 -0
  33. parse/train/4-gBZAkF9ze/4-gBZAkF9ze_layout.pdf +3 -0
  34. parse/train/4-gBZAkF9ze/4-gBZAkF9ze_origin.pdf +3 -0
  35. parse/train/4-gBZAkF9ze/4-gBZAkF9ze_span.pdf +3 -0
  36. parse/train/5Dl1378QutR/5Dl1378QutR_layout.pdf +3 -0
  37. parse/train/5Dl1378QutR/5Dl1378QutR_origin.pdf +3 -0
  38. parse/train/5Dl1378QutR/5Dl1378QutR_span.pdf +3 -0
  39. parse/train/5nLibPckV2N/5nLibPckV2N_layout.pdf +3 -0
  40. parse/train/5nLibPckV2N/5nLibPckV2N_origin.pdf +3 -0
  41. parse/train/5nLibPckV2N/5nLibPckV2N_span.pdf +3 -0
  42. parse/train/84gjULz1t5/84gjULz1t5_layout.pdf +3 -0
  43. parse/train/84gjULz1t5/84gjULz1t5_origin.pdf +3 -0
  44. parse/train/84gjULz1t5/84gjULz1t5_span.pdf +3 -0
  45. parse/train/8ygF02Zm51q/8ygF02Zm51q_layout.pdf +3 -0
  46. parse/train/8ygF02Zm51q/8ygF02Zm51q_origin.pdf +3 -0
  47. parse/train/8ygF02Zm51q/8ygF02Zm51q_span.pdf +3 -0
  48. parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_layout.pdf +3 -0
  49. parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_origin.pdf +3 -0
  50. parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_span.pdf +3 -0
.gitattributes CHANGED
@@ -2911,3 +2911,231 @@ parse/train/HJl6tC4KwB/HJl6tC4KwB_layout.pdf filter=lfs diff=lfs merge=lfs -text
2911
  parse/train/HJl6tC4KwB/HJl6tC4KwB_origin.pdf filter=lfs diff=lfs merge=lfs -text
2912
  parse/train/HJl6tC4KwB/HJl6tC4KwB_span.pdf filter=lfs diff=lfs merge=lfs -text
2913
  parse/train/HyxzRsR9Y7/HyxzRsR9Y7_layout.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2911
  parse/train/HJl6tC4KwB/HJl6tC4KwB_origin.pdf filter=lfs diff=lfs merge=lfs -text
2912
  parse/train/HJl6tC4KwB/HJl6tC4KwB_span.pdf filter=lfs diff=lfs merge=lfs -text
2913
  parse/train/HyxzRsR9Y7/HyxzRsR9Y7_layout.pdf filter=lfs diff=lfs merge=lfs -text
2914
+ parse/train/HyxzRsR9Y7/HyxzRsR9Y7_origin.pdf filter=lfs diff=lfs merge=lfs -text
2915
+ parse/train/HyxzRsR9Y7/HyxzRsR9Y7_span.pdf filter=lfs diff=lfs merge=lfs -text
2916
+ parse/train/Skgvy64tvr/Skgvy64tvr_span.pdf filter=lfs diff=lfs merge=lfs -text
2917
+ parse/train/Skgvy64tvr/Skgvy64tvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
2918
+ parse/train/Skgvy64tvr/Skgvy64tvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
2919
+ parse/train/vlcVTDaufN/vlcVTDaufN_layout.pdf filter=lfs diff=lfs merge=lfs -text
2920
+ parse/train/vlcVTDaufN/vlcVTDaufN_span.pdf filter=lfs diff=lfs merge=lfs -text
2921
+ parse/train/vlcVTDaufN/vlcVTDaufN_origin.pdf filter=lfs diff=lfs merge=lfs -text
2922
+ parse/train/HJx9EhC9tQ/HJx9EhC9tQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
2923
+ parse/train/HJx9EhC9tQ/HJx9EhC9tQ_span.pdf filter=lfs diff=lfs merge=lfs -text
2924
+ parse/train/HJx9EhC9tQ/HJx9EhC9tQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
2925
+ parse/train/5nLibPckV2N/5nLibPckV2N_span.pdf filter=lfs diff=lfs merge=lfs -text
2926
+ parse/train/5nLibPckV2N/5nLibPckV2N_origin.pdf filter=lfs diff=lfs merge=lfs -text
2927
+ parse/train/5nLibPckV2N/5nLibPckV2N_layout.pdf filter=lfs diff=lfs merge=lfs -text
2928
+ parse/train/HJlmHoR5tQ/HJlmHoR5tQ_span.pdf filter=lfs diff=lfs merge=lfs -text
2929
+ parse/train/HJlmHoR5tQ/HJlmHoR5tQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
2930
+ parse/train/HJlmHoR5tQ/HJlmHoR5tQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
2931
+ parse/train/tyd9yxioXgO/tyd9yxioXgO_layout.pdf filter=lfs diff=lfs merge=lfs -text
2932
+ parse/train/tyd9yxioXgO/tyd9yxioXgO_origin.pdf filter=lfs diff=lfs merge=lfs -text
2933
+ parse/train/tyd9yxioXgO/tyd9yxioXgO_span.pdf filter=lfs diff=lfs merge=lfs -text
2934
+ parse/train/H1xQVn09FX/H1xQVn09FX_span.pdf filter=lfs diff=lfs merge=lfs -text
2935
+ parse/train/H1xQVn09FX/H1xQVn09FX_layout.pdf filter=lfs diff=lfs merge=lfs -text
2936
+ parse/train/H1xQVn09FX/H1xQVn09FX_origin.pdf filter=lfs diff=lfs merge=lfs -text
2937
+ parse/train/rJxDkvqee/rJxDkvqee_layout.pdf filter=lfs diff=lfs merge=lfs -text
2938
+ parse/train/rJxDkvqee/rJxDkvqee_origin.pdf filter=lfs diff=lfs merge=lfs -text
2939
+ parse/train/rJxDkvqee/rJxDkvqee_span.pdf filter=lfs diff=lfs merge=lfs -text
2940
+ parse/train/S1gBz2C9tX/S1gBz2C9tX_layout.pdf filter=lfs diff=lfs merge=lfs -text
2941
+ parse/train/S1gBz2C9tX/S1gBz2C9tX_span.pdf filter=lfs diff=lfs merge=lfs -text
2942
+ parse/train/S1gBz2C9tX/S1gBz2C9tX_origin.pdf filter=lfs diff=lfs merge=lfs -text
2943
+ parse/train/H1e572A5tQ/H1e572A5tQ_span.pdf filter=lfs diff=lfs merge=lfs -text
2944
+ parse/train/H1e572A5tQ/H1e572A5tQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
2945
+ parse/train/H1e572A5tQ/H1e572A5tQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
2946
+ parse/train/S1g2V3Cct7/S1g2V3Cct7_origin.pdf filter=lfs diff=lfs merge=lfs -text
2947
+ parse/train/S1g2V3Cct7/S1g2V3Cct7_span.pdf filter=lfs diff=lfs merge=lfs -text
2948
+ parse/train/S1g2V3Cct7/S1g2V3Cct7_layout.pdf filter=lfs diff=lfs merge=lfs -text
2949
+ parse/train/Hyl5V0EYvB/Hyl5V0EYvB_span.pdf filter=lfs diff=lfs merge=lfs -text
2950
+ parse/train/Hyl5V0EYvB/Hyl5V0EYvB_layout.pdf filter=lfs diff=lfs merge=lfs -text
2951
+ parse/train/Hyl5V0EYvB/Hyl5V0EYvB_origin.pdf filter=lfs diff=lfs merge=lfs -text
2952
+ parse/train/HkgH0TEYwH/HkgH0TEYwH_layout.pdf filter=lfs diff=lfs merge=lfs -text
2953
+ parse/train/HkgH0TEYwH/HkgH0TEYwH_span.pdf filter=lfs diff=lfs merge=lfs -text
2954
+ parse/train/HkgH0TEYwH/HkgH0TEYwH_origin.pdf filter=lfs diff=lfs merge=lfs -text
2955
+ parse/train/ry8dvM-R-/ry8dvM-R-_span.pdf filter=lfs diff=lfs merge=lfs -text
2956
+ parse/train/ry8dvM-R-/ry8dvM-R-_origin.pdf filter=lfs diff=lfs merge=lfs -text
2957
+ parse/train/ry8dvM-R-/ry8dvM-R-_layout.pdf filter=lfs diff=lfs merge=lfs -text
2958
+ parse/train/aJh-lFL2dFJ21/aJh-lFL2dFJ21_layout.pdf filter=lfs diff=lfs merge=lfs -text
2959
+ parse/train/aJh-lFL2dFJ21/aJh-lFL2dFJ21_origin.pdf filter=lfs diff=lfs merge=lfs -text
2960
+ parse/train/aJh-lFL2dFJ21/aJh-lFL2dFJ21_span.pdf filter=lfs diff=lfs merge=lfs -text
2961
+ parse/train/rJwelMbR-/rJwelMbR-_span.pdf filter=lfs diff=lfs merge=lfs -text
2962
+ parse/train/rJwelMbR-/rJwelMbR-_origin.pdf filter=lfs diff=lfs merge=lfs -text
2963
+ parse/train/rJwelMbR-/rJwelMbR-_layout.pdf filter=lfs diff=lfs merge=lfs -text
2964
+ parse/train/HyGh4sR9YQ/HyGh4sR9YQ_span.pdf filter=lfs diff=lfs merge=lfs -text
2965
+ parse/train/HyGh4sR9YQ/HyGh4sR9YQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
2966
+ parse/train/HyGh4sR9YQ/HyGh4sR9YQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
2967
+ parse/train/HkNKFiGex/HkNKFiGex_layout.pdf filter=lfs diff=lfs merge=lfs -text
2968
+ parse/train/HkNKFiGex/HkNKFiGex_origin.pdf filter=lfs diff=lfs merge=lfs -text
2969
+ parse/train/HkNKFiGex/HkNKFiGex_span.pdf filter=lfs diff=lfs merge=lfs -text
2970
+ parse/train/5Dl1378QutR/5Dl1378QutR_layout.pdf filter=lfs diff=lfs merge=lfs -text
2971
+ parse/train/5Dl1378QutR/5Dl1378QutR_span.pdf filter=lfs diff=lfs merge=lfs -text
2972
+ parse/train/5Dl1378QutR/5Dl1378QutR_origin.pdf filter=lfs diff=lfs merge=lfs -text
2973
+ parse/train/ByToKu9ll/ByToKu9ll_layout.pdf filter=lfs diff=lfs merge=lfs -text
2974
+ parse/train/ByToKu9ll/ByToKu9ll_origin.pdf filter=lfs diff=lfs merge=lfs -text
2975
+ parse/train/ByToKu9ll/ByToKu9ll_span.pdf filter=lfs diff=lfs merge=lfs -text
2976
+ parse/train/rywHCPkAW/rywHCPkAW_span.pdf filter=lfs diff=lfs merge=lfs -text
2977
+ parse/train/rywHCPkAW/rywHCPkAW_layout.pdf filter=lfs diff=lfs merge=lfs -text
2978
+ parse/train/rywHCPkAW/rywHCPkAW_origin.pdf filter=lfs diff=lfs merge=lfs -text
2979
+ parse/train/rylT0AVtwH/rylT0AVtwH_layout.pdf filter=lfs diff=lfs merge=lfs -text
2980
+ parse/train/rylT0AVtwH/rylT0AVtwH_span.pdf filter=lfs diff=lfs merge=lfs -text
2981
+ parse/train/rylT0AVtwH/rylT0AVtwH_origin.pdf filter=lfs diff=lfs merge=lfs -text
2982
+ parse/train/H1laeJrKDB/H1laeJrKDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
2983
+ parse/train/H1laeJrKDB/H1laeJrKDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
2984
+ parse/train/H1laeJrKDB/H1laeJrKDB_span.pdf filter=lfs diff=lfs merge=lfs -text
2985
+ parse/train/rkgpy3C5tX/rkgpy3C5tX_span.pdf filter=lfs diff=lfs merge=lfs -text
2986
+ parse/train/rkgpy3C5tX/rkgpy3C5tX_layout.pdf filter=lfs diff=lfs merge=lfs -text
2987
+ parse/train/rkgpy3C5tX/rkgpy3C5tX_origin.pdf filter=lfs diff=lfs merge=lfs -text
2988
+ parse/train/auGY2UQfhSu/auGY2UQfhSu_span.pdf filter=lfs diff=lfs merge=lfs -text
2989
+ parse/train/auGY2UQfhSu/auGY2UQfhSu_origin.pdf filter=lfs diff=lfs merge=lfs -text
2990
+ parse/train/auGY2UQfhSu/auGY2UQfhSu_layout.pdf filter=lfs diff=lfs merge=lfs -text
2991
+ parse/train/14nC8HNd4Ts/14nC8HNd4Ts_origin.pdf filter=lfs diff=lfs merge=lfs -text
2992
+ parse/train/14nC8HNd4Ts/14nC8HNd4Ts_span.pdf filter=lfs diff=lfs merge=lfs -text
2993
+ parse/train/14nC8HNd4Ts/14nC8HNd4Ts_layout.pdf filter=lfs diff=lfs merge=lfs -text
2994
+ parse/train/tkAtoZkcUnm/tkAtoZkcUnm_origin.pdf filter=lfs diff=lfs merge=lfs -text
2995
+ parse/train/tkAtoZkcUnm/tkAtoZkcUnm_layout.pdf filter=lfs diff=lfs merge=lfs -text
2996
+ parse/train/tkAtoZkcUnm/tkAtoZkcUnm_span.pdf filter=lfs diff=lfs merge=lfs -text
2997
+ parse/train/B1x8anVFPr/B1x8anVFPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
2998
+ parse/train/B1x8anVFPr/B1x8anVFPr_span.pdf filter=lfs diff=lfs merge=lfs -text
2999
+ parse/train/B1x8anVFPr/B1x8anVFPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3000
+ parse/train/rkgK3oC5Fm/rkgK3oC5Fm_origin.pdf filter=lfs diff=lfs merge=lfs -text
3001
+ parse/train/rkgK3oC5Fm/rkgK3oC5Fm_layout.pdf filter=lfs diff=lfs merge=lfs -text
3002
+ parse/train/rkgK3oC5Fm/rkgK3oC5Fm_span.pdf filter=lfs diff=lfs merge=lfs -text
3003
+ parse/train/wWK7yXkULyh/wWK7yXkULyh_origin.pdf filter=lfs diff=lfs merge=lfs -text
3004
+ parse/train/wWK7yXkULyh/wWK7yXkULyh_span.pdf filter=lfs diff=lfs merge=lfs -text
3005
+ parse/train/wWK7yXkULyh/wWK7yXkULyh_layout.pdf filter=lfs diff=lfs merge=lfs -text
3006
+ parse/train/ks5nebunVn_/ks5nebunVn__span.pdf filter=lfs diff=lfs merge=lfs -text
3007
+ parse/train/ks5nebunVn_/ks5nebunVn__origin.pdf filter=lfs diff=lfs merge=lfs -text
3008
+ parse/train/ks5nebunVn_/ks5nebunVn__layout.pdf filter=lfs diff=lfs merge=lfs -text
3009
+ parse/train/BkluqlSFDS/BkluqlSFDS_origin.pdf filter=lfs diff=lfs merge=lfs -text
3010
+ parse/train/BkluqlSFDS/BkluqlSFDS_span.pdf filter=lfs diff=lfs merge=lfs -text
3011
+ parse/train/BkluqlSFDS/BkluqlSFDS_layout.pdf filter=lfs diff=lfs merge=lfs -text
3012
+ parse/train/JUgC3lqn6r2/JUgC3lqn6r2_span.pdf filter=lfs diff=lfs merge=lfs -text
3013
+ parse/train/JUgC3lqn6r2/JUgC3lqn6r2_layout.pdf filter=lfs diff=lfs merge=lfs -text
3014
+ parse/train/JUgC3lqn6r2/JUgC3lqn6r2_origin.pdf filter=lfs diff=lfs merge=lfs -text
3015
+ parse/train/m4k66oJFK9P/m4k66oJFK9P_span.pdf filter=lfs diff=lfs merge=lfs -text
3016
+ parse/train/m4k66oJFK9P/m4k66oJFK9P_origin.pdf filter=lfs diff=lfs merge=lfs -text
3017
+ parse/train/m4k66oJFK9P/m4k66oJFK9P_layout.pdf filter=lfs diff=lfs merge=lfs -text
3018
+ parse/train/S1LVSrcge/S1LVSrcge_layout.pdf filter=lfs diff=lfs merge=lfs -text
3019
+ parse/train/S1LVSrcge/S1LVSrcge_span.pdf filter=lfs diff=lfs merge=lfs -text
3020
+ parse/train/S1LVSrcge/S1LVSrcge_origin.pdf filter=lfs diff=lfs merge=lfs -text
3021
+ parse/train/bXehDYUjjXi/bXehDYUjjXi_origin.pdf filter=lfs diff=lfs merge=lfs -text
3022
+ parse/train/bXehDYUjjXi/bXehDYUjjXi_layout.pdf filter=lfs diff=lfs merge=lfs -text
3023
+ parse/train/bXehDYUjjXi/bXehDYUjjXi_span.pdf filter=lfs diff=lfs merge=lfs -text
3024
+ parse/train/rkg-TJBFPB/rkg-TJBFPB_origin.pdf filter=lfs diff=lfs merge=lfs -text
3025
+ parse/train/rkg-TJBFPB/rkg-TJBFPB_layout.pdf filter=lfs diff=lfs merge=lfs -text
3026
+ parse/train/rkg-TJBFPB/rkg-TJBFPB_span.pdf filter=lfs diff=lfs merge=lfs -text
3027
+ parse/train/8ygF02Zm51q/8ygF02Zm51q_origin.pdf filter=lfs diff=lfs merge=lfs -text
3028
+ parse/train/8ygF02Zm51q/8ygF02Zm51q_span.pdf filter=lfs diff=lfs merge=lfs -text
3029
+ parse/train/8ygF02Zm51q/8ygF02Zm51q_layout.pdf filter=lfs diff=lfs merge=lfs -text
3030
+ parse/train/bm1_qlhRegf/bm1_qlhRegf_span.pdf filter=lfs diff=lfs merge=lfs -text
3031
+ parse/train/bm1_qlhRegf/bm1_qlhRegf_origin.pdf filter=lfs diff=lfs merge=lfs -text
3032
+ parse/train/bm1_qlhRegf/bm1_qlhRegf_layout.pdf filter=lfs diff=lfs merge=lfs -text
3033
+ parse/train/-2FCwDKRREu/-2FCwDKRREu_origin.pdf filter=lfs diff=lfs merge=lfs -text
3034
+ parse/train/-2FCwDKRREu/-2FCwDKRREu_span.pdf filter=lfs diff=lfs merge=lfs -text
3035
+ parse/train/-2FCwDKRREu/-2FCwDKRREu_layout.pdf filter=lfs diff=lfs merge=lfs -text
3036
+ parse/train/H1xEwsR9FX/H1xEwsR9FX_origin.pdf filter=lfs diff=lfs merge=lfs -text
3037
+ parse/train/H1xEwsR9FX/H1xEwsR9FX_span.pdf filter=lfs diff=lfs merge=lfs -text
3038
+ parse/train/H1xEwsR9FX/H1xEwsR9FX_layout.pdf filter=lfs diff=lfs merge=lfs -text
3039
+ parse/train/SkMQg3C5K7/SkMQg3C5K7_span.pdf filter=lfs diff=lfs merge=lfs -text
3040
+ parse/train/SkMQg3C5K7/SkMQg3C5K7_layout.pdf filter=lfs diff=lfs merge=lfs -text
3041
+ parse/train/SkMQg3C5K7/SkMQg3C5K7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3042
+ parse/train/84gjULz1t5/84gjULz1t5_origin.pdf filter=lfs diff=lfs merge=lfs -text
3043
+ parse/train/84gjULz1t5/84gjULz1t5_span.pdf filter=lfs diff=lfs merge=lfs -text
3044
+ parse/train/84gjULz1t5/84gjULz1t5_layout.pdf filter=lfs diff=lfs merge=lfs -text
3045
+ parse/train/il3vPAc9fiH/il3vPAc9fiH_layout.pdf filter=lfs diff=lfs merge=lfs -text
3046
+ parse/train/il3vPAc9fiH/il3vPAc9fiH_origin.pdf filter=lfs diff=lfs merge=lfs -text
3047
+ parse/train/il3vPAc9fiH/il3vPAc9fiH_span.pdf filter=lfs diff=lfs merge=lfs -text
3048
+ parse/train/2UyqK45_djA/2UyqK45_djA_span.pdf filter=lfs diff=lfs merge=lfs -text
3049
+ parse/train/2UyqK45_djA/2UyqK45_djA_origin.pdf filter=lfs diff=lfs merge=lfs -text
3050
+ parse/train/2UyqK45_djA/2UyqK45_djA_layout.pdf filter=lfs diff=lfs merge=lfs -text
3051
+ parse/train/SJlOq34Kwr/SJlOq34Kwr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3052
+ parse/train/SJlOq34Kwr/SJlOq34Kwr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3053
+ parse/train/SJlOq34Kwr/SJlOq34Kwr_span.pdf filter=lfs diff=lfs merge=lfs -text
3054
+ parse/train/NlB8_hXkbby/NlB8_hXkbby_span.pdf filter=lfs diff=lfs merge=lfs -text
3055
+ parse/train/NlB8_hXkbby/NlB8_hXkbby_layout.pdf filter=lfs diff=lfs merge=lfs -text
3056
+ parse/train/NlB8_hXkbby/NlB8_hXkbby_origin.pdf filter=lfs diff=lfs merge=lfs -text
3057
+ parse/train/Hkem-lrtvH/Hkem-lrtvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
3058
+ parse/train/Hkem-lrtvH/Hkem-lrtvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
3059
+ parse/train/Hkem-lrtvH/Hkem-lrtvH_span.pdf filter=lfs diff=lfs merge=lfs -text
3060
+ parse/train/rkWN3g-AZ/rkWN3g-AZ_layout.pdf filter=lfs diff=lfs merge=lfs -text
3061
+ parse/train/rkWN3g-AZ/rkWN3g-AZ_span.pdf filter=lfs diff=lfs merge=lfs -text
3062
+ parse/train/rkWN3g-AZ/rkWN3g-AZ_origin.pdf filter=lfs diff=lfs merge=lfs -text
3063
+ parse/train/gwFTuzxJW0/gwFTuzxJW0_layout.pdf filter=lfs diff=lfs merge=lfs -text
3064
+ parse/train/gwFTuzxJW0/gwFTuzxJW0_origin.pdf filter=lfs diff=lfs merge=lfs -text
3065
+ parse/train/gwFTuzxJW0/gwFTuzxJW0_span.pdf filter=lfs diff=lfs merge=lfs -text
3066
+ parse/train/LO7Su0-dPJl/LO7Su0-dPJl_span.pdf filter=lfs diff=lfs merge=lfs -text
3067
+ parse/train/LO7Su0-dPJl/LO7Su0-dPJl_layout.pdf filter=lfs diff=lfs merge=lfs -text
3068
+ parse/train/LO7Su0-dPJl/LO7Su0-dPJl_origin.pdf filter=lfs diff=lfs merge=lfs -text
3069
+ parse/train/HkedQp4tPr/HkedQp4tPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3070
+ parse/train/HkedQp4tPr/HkedQp4tPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3071
+ parse/train/HkedQp4tPr/HkedQp4tPr_span.pdf filter=lfs diff=lfs merge=lfs -text
3072
+ parse/train/YWtLZvLmud7/YWtLZvLmud7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3073
+ parse/train/YWtLZvLmud7/YWtLZvLmud7_span.pdf filter=lfs diff=lfs merge=lfs -text
3074
+ parse/train/YWtLZvLmud7/YWtLZvLmud7_layout.pdf filter=lfs diff=lfs merge=lfs -text
3075
+ parse/train/HkxCzeHFDB/HkxCzeHFDB_span.pdf filter=lfs diff=lfs merge=lfs -text
3076
+ parse/train/HkxCzeHFDB/HkxCzeHFDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
3077
+ parse/train/HkxCzeHFDB/HkxCzeHFDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
3078
+ parse/train/SkeGvaEtPr/SkeGvaEtPr_span.pdf filter=lfs diff=lfs merge=lfs -text
3079
+ parse/train/SkeGvaEtPr/SkeGvaEtPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3080
+ parse/train/SkeGvaEtPr/SkeGvaEtPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3081
+ parse/train/BkgMbCVFvr/BkgMbCVFvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3082
+ parse/train/BkgMbCVFvr/BkgMbCVFvr_span.pdf filter=lfs diff=lfs merge=lfs -text
3083
+ parse/train/BkgMbCVFvr/BkgMbCVFvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3084
+ parse/train/BkdpaH9ll/BkdpaH9ll_origin.pdf filter=lfs diff=lfs merge=lfs -text
3085
+ parse/train/BkdpaH9ll/BkdpaH9ll_layout.pdf filter=lfs diff=lfs merge=lfs -text
3086
+ parse/train/BkdpaH9ll/BkdpaH9ll_span.pdf filter=lfs diff=lfs merge=lfs -text
3087
+ parse/train/HkxYzANYDB/HkxYzANYDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
3088
+ parse/train/HkxYzANYDB/HkxYzANYDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
3089
+ parse/train/HkxYzANYDB/HkxYzANYDB_span.pdf filter=lfs diff=lfs merge=lfs -text
3090
+ parse/train/WL7pr00_fnJ/WL7pr00_fnJ_span.pdf filter=lfs diff=lfs merge=lfs -text
3091
+ parse/train/WL7pr00_fnJ/WL7pr00_fnJ_origin.pdf filter=lfs diff=lfs merge=lfs -text
3092
+ parse/train/WL7pr00_fnJ/WL7pr00_fnJ_layout.pdf filter=lfs diff=lfs merge=lfs -text
3093
+ parse/train/Syejj0NYvr/Syejj0NYvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3094
+ parse/train/Syejj0NYvr/Syejj0NYvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3095
+ parse/train/Syejj0NYvr/Syejj0NYvr_span.pdf filter=lfs diff=lfs merge=lfs -text
3096
+ parse/train/H1xscnEKDr/H1xscnEKDr_layout.pdf filter=lfs diff=lfs merge=lfs -text
3097
+ parse/train/H1xscnEKDr/H1xscnEKDr_span.pdf filter=lfs diff=lfs merge=lfs -text
3098
+ parse/train/H1xscnEKDr/H1xscnEKDr_origin.pdf filter=lfs diff=lfs merge=lfs -text
3099
+ parse/train/r1gPoCEKvH/r1gPoCEKvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
3100
+ parse/train/r1gPoCEKvH/r1gPoCEKvH_span.pdf filter=lfs diff=lfs merge=lfs -text
3101
+ parse/train/r1gPoCEKvH/r1gPoCEKvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
3102
+ parse/train/CUeX_YeX9n_/CUeX_YeX9n__layout.pdf filter=lfs diff=lfs merge=lfs -text
3103
+ parse/train/CUeX_YeX9n_/CUeX_YeX9n__span.pdf filter=lfs diff=lfs merge=lfs -text
3104
+ parse/train/CUeX_YeX9n_/CUeX_YeX9n__origin.pdf filter=lfs diff=lfs merge=lfs -text
3105
+ parse/train/rkuDV6iex/rkuDV6iex_layout.pdf filter=lfs diff=lfs merge=lfs -text
3106
+ parse/train/rkuDV6iex/rkuDV6iex_span.pdf filter=lfs diff=lfs merge=lfs -text
3107
+ parse/train/rkuDV6iex/rkuDV6iex_origin.pdf filter=lfs diff=lfs merge=lfs -text
3108
+ parse/train/jA5LmT2zLk/jA5LmT2zLk_span.pdf filter=lfs diff=lfs merge=lfs -text
3109
+ parse/train/jA5LmT2zLk/jA5LmT2zLk_origin.pdf filter=lfs diff=lfs merge=lfs -text
3110
+ parse/train/jA5LmT2zLk/jA5LmT2zLk_layout.pdf filter=lfs diff=lfs merge=lfs -text
3111
+ parse/train/rJeXCo0cYX/rJeXCo0cYX_origin.pdf filter=lfs diff=lfs merge=lfs -text
3112
+ parse/train/rJeXCo0cYX/rJeXCo0cYX_span.pdf filter=lfs diff=lfs merge=lfs -text
3113
+ parse/train/rJeXCo0cYX/rJeXCo0cYX_layout.pdf filter=lfs diff=lfs merge=lfs -text
3114
+ parse/train/HJGven05Y7/HJGven05Y7_span.pdf filter=lfs diff=lfs merge=lfs -text
3115
+ parse/train/HJGven05Y7/HJGven05Y7_origin.pdf filter=lfs diff=lfs merge=lfs -text
3116
+ parse/train/HJGven05Y7/HJGven05Y7_layout.pdf filter=lfs diff=lfs merge=lfs -text
3117
+ parse/train/LGgdb4TS4Z/LGgdb4TS4Z_layout.pdf filter=lfs diff=lfs merge=lfs -text
3118
+ parse/train/LGgdb4TS4Z/LGgdb4TS4Z_span.pdf filter=lfs diff=lfs merge=lfs -text
3119
+ parse/train/LGgdb4TS4Z/LGgdb4TS4Z_origin.pdf filter=lfs diff=lfs merge=lfs -text
3120
+ parse/train/4-gBZAkF9ze/4-gBZAkF9ze_layout.pdf filter=lfs diff=lfs merge=lfs -text
3121
+ parse/train/4-gBZAkF9ze/4-gBZAkF9ze_origin.pdf filter=lfs diff=lfs merge=lfs -text
3122
+ parse/train/4-gBZAkF9ze/4-gBZAkF9ze_span.pdf filter=lfs diff=lfs merge=lfs -text
3123
+ parse/train/XpSAvlvnMa/XpSAvlvnMa_origin.pdf filter=lfs diff=lfs merge=lfs -text
3124
+ parse/train/XpSAvlvnMa/XpSAvlvnMa_span.pdf filter=lfs diff=lfs merge=lfs -text
3125
+ parse/train/XpSAvlvnMa/XpSAvlvnMa_layout.pdf filter=lfs diff=lfs merge=lfs -text
3126
+ parse/train/H1gKYo09tX/H1gKYo09tX_layout.pdf filter=lfs diff=lfs merge=lfs -text
3127
+ parse/train/H1gKYo09tX/H1gKYo09tX_origin.pdf filter=lfs diff=lfs merge=lfs -text
3128
+ parse/train/H1gKYo09tX/H1gKYo09tX_span.pdf filter=lfs diff=lfs merge=lfs -text
3129
+ parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_origin.pdf filter=lfs diff=lfs merge=lfs -text
3130
+ parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_layout.pdf filter=lfs diff=lfs merge=lfs -text
3131
+ parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_span.pdf filter=lfs diff=lfs merge=lfs -text
3132
+ parse/train/SkGuG2R5tm/SkGuG2R5tm_span.pdf filter=lfs diff=lfs merge=lfs -text
3133
+ parse/train/SkGuG2R5tm/SkGuG2R5tm_origin.pdf filter=lfs diff=lfs merge=lfs -text
3134
+ parse/train/SkGuG2R5tm/SkGuG2R5tm_layout.pdf filter=lfs diff=lfs merge=lfs -text
3135
+ parse/train/SJem8lSFwB/SJem8lSFwB_span.pdf filter=lfs diff=lfs merge=lfs -text
3136
+ parse/train/SJem8lSFwB/SJem8lSFwB_origin.pdf filter=lfs diff=lfs merge=lfs -text
3137
+ parse/train/SJem8lSFwB/SJem8lSFwB_layout.pdf filter=lfs diff=lfs merge=lfs -text
3138
+ parse/train/HJedXaEtvS/HJedXaEtvS_span.pdf filter=lfs diff=lfs merge=lfs -text
3139
+ parse/train/HJedXaEtvS/HJedXaEtvS_origin.pdf filter=lfs diff=lfs merge=lfs -text
3140
+ parse/train/HJedXaEtvS/HJedXaEtvS_layout.pdf filter=lfs diff=lfs merge=lfs -text
3141
+ parse/train/rk49Mg-CW/rk49Mg-CW_origin.pdf filter=lfs diff=lfs merge=lfs -text
parse/dev/2PSrjVtj6gU/2PSrjVtj6gU_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/2PSrjVtj6gU/2PSrjVtj6gU_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/D87gRf2-np/D87gRf2-np.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/D87gRf2-np/D87gRf2-np_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/D87gRf2-np/D87gRf2-np_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/L3_SsSNMmy/L3_SsSNMmy_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/L3_SsSNMmy/L3_SsSNMmy_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/NPJznfA7ZC/NPJznfA7ZC.md ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Demystifying Prompts in Language Models via Perplexity Estimation
2
+
3
+ Hila Gonen1,2 Srini Iyer2 Terra Blevins1 Noah A. Smith1,3 Luke Zettlemoyer1,
4
+
5
+ 1Paul G. Allen School of Computer Science & Engineering, University of Washington 2Meta AI Research 3Allen Institute for Artificial Intelligence hilagnn@gmail.com sviyer@meta.com {blvns,nasmith,lsz}@cs.washington.edu
6
+
7
+ # Abstract
8
+
9
+ Language models can be prompted to perform a wide variety of tasks with zero- and few-shot incontext learning. However, performance varies significantly with the choice of prompt, and we do not yet understand why this happens. In this paper, we analyze the factors that contribute to this variance and establish a new empirical hypothesis: the performance of a prompt is predicted by the extent to which the model is familiar with the language it contains. Over a wide range of tasks, we show that the lower the perplexity of the prompt, the better it is able to perform the task, when considering reasonable prompts that are related to it. As part of our analysis, we also devise a method to automatically extend a small seed set of manually written prompts by paraphrasing with GPT3 and backtranslation. This larger set allows us to verify that perplexity is a strong predictor of the success of a prompt and we show that the lowest perplexity prompts are consistently effective.
10
+
11
+ # 1 Introduction
12
+
13
+ Language models can be prompted to perform a wide range of zero- and few-shot learning tasks (Brown et al., 2020; Schick and Schütze, 2020). However, there is significant variance in the performance of seemingly similar prompts (Chen et al., 2022): for AG News (Zhang et al., 2015), we find an over 30 point accuracy gap between different manually curated prompts (see Table 1) on OPT 175B (Zhang et al., 2022). Despite efforts to improve prompt engineering (Shin et al., 2020; Li and Liang, 2021; Gao et al., 2021), it is still challenging to develop high-quality prompts for new tasks, and little is known about why this phenomenon occurs.
14
+
15
+ We are interested in understanding what makes some prompts better than others, and using this understanding to create better prompts for given tasks and models. We hypothesize that the lower the perplexity of a prompt is, the better its performance on the task will be, when considering reasonable prompts that are related to the task. This is based on the intuition that the more frequently the prompt (or very similar phrases) appears in the training data, the more the model is familiar with it and is able to perform the described task. We refrain from using the training data directly as it is often unavailable, expensive to search due to its size, and hard to use for approximate matching of similar prompts. Instead, we focus on the perplexity of the prompt as a proxy for its occurrences in the data.
16
+
17
+ ![](images/4ff36496e07000f2d3b941c7008cf5afb10d1b32105a220ab3e483f827d67b6a.jpg)
18
+ Figure 1: Accuracy vs. perplexity for the AG News dataset with OPT 175B. The $x$ axis is in log scale. Each point stands for a different prompt.
19
+
20
+ To enable more complete analysis, we automatically expand the set of manually created prompts for the task by paraphrasing, resulting in a much larger and diverse set of prompts. We focus on prompts in English that reasonably describe the task for two reasons: (a) our main motivation is to understand what lies under the variance of performance in this type of prompt; (b) we aim to devise a useful method for creating prompts that are consistently effective, that could be easily adopted and interpreted by future, potentially non-expert users.
21
+
22
+ We show empirically that our hypothesis holds across a diverse set of tasks (including classification and word prediction), models, and model sizes, providing us some insights about the underlying mechanism of prompting (see Figure 1). As a result, we devise a method, SPELL (Selecting Prompts by Estimating LM Likelihood), for creating prompts in an informed manner. We show that using SPELL to choose prompts results in less variability in performance as well as in accuracy gains (1.8 accuracy points with OPT and 2.3 accuracy points with Bloom on average). Importantly, our method does not require labels at all, only a small sample of inputs for the task.
23
+
24
+ Our contributions can be summarized as follows: (a) we formalize the notion that better familiarity of the model with the prompt correlates with better performance (Section 2); (b) we automatically elaborate a given set of seed prompts using paraphrasing (Section 3); (c) we establish experimentally the hypothesis that lower perplexity of the prompt correlates well with better performance (Section 5); (d) we devise a method to create a more consistent set of prompts, that also improve results even with no labels for the task (Section 7).
25
+
26
+ # 2 Why are prompts not all created equal?
27
+
28
+ Despite the popularity of prompting as a method for using language models (Shin et al., 2020; Li and Liang, 2021; Gao et al., 2021), the cause for the different behavior of various prompts remains unclear so far. Table 1 shows four example prompts for a news topic classification task (AG News) and their respective accuracies when used to prompt OPT 175B (Zhang et al., 2022). The accuracy gap between the different prompts is not trivial, and it is not possible to predict from the prompts alone.
29
+
30
+ Table 1: Example prompts for the task AG News (news classification) that vary considerably in accuracy.
31
+
32
+ <table><tr><td>Prompt</td><td>Accuracy</td></tr><tr><td>What is this piece of news regarding?</td><td>40.9</td></tr><tr><td>What is this article about?</td><td>52.4</td></tr><tr><td>What is the best way to describe this article?</td><td>68.2</td></tr><tr><td>What is the most accurate label for this news article?</td><td>71.2</td></tr></table>
33
+
34
+ We propose that the more frequently a prompt appears in some variation in the data, the better it works for the task. The intuition behind this is that a sequence that is more expected by the model is more likely to aid the model to extract the relevant information. However, this premise is hard to measure accurately: most language models use huge amounts of training data (e.g., OPT uses a corpus of roughly 180B tokens, and Bloom uses roughly 366B tokens), and in addition, this training data is not always publicly available (e.g., GPT3; Brown et al. 2020). Our initial attempts to estimate exact-match occurrences of prompts in the data resulted in very sparse counts, which led us to look for a softer formalization.1
35
+
36
+ Instead of considering the training data directly, we propose to focus on the perplexity of the prompt as a proxy for its occurrences in some form in the data – essentially indicating to what extent the model expects this prompt. This perplexity-based framing helps to avoid the challenge of exact match in the data, and takes into account variations of the prompt that the model is also exposed to and might be influenced by. In addition, it helps overcome the challenges mentioned above as it requires neither access to the pretraining data (which is not always publicly available for LMs) nor matching over huge amounts of text.
37
+
38
+ Hypothesis: lower perplexity correlates with better performance. We hypothesize that on average, lower-perplexity prompts perform better. We are interested in establishing this hypothesis by experimentally showing a significant negative correlation between the perplexity of the prompt and its performance on the task, across a diverse set of tasks and models.
39
+
40
+ We define the perplexity of the prompt as the perplexity of the full prompt sequence, including the input itself, and without the label, averaged over 1,000 examples (see Section 4 for details). The input is a part of the prompt in the case of the word prediction tasks by design (e.g., “The opposite of the word good is”). Inclusion of the task input as part of the prompt for classification tasks as well is intentional: we want to ground the prompt to the task (without the input, we are testing the hypothesis that lower perplexity prompts across all tasks work better on every task). The label is not considered a part of the prompt and is not taken into consideration when computing the prompt. In practice, this also results in a huge advantage of our method, SPELL (Section 7), which aims to find better prompts—it does not require any labels.
41
+
42
+ For performance measures, we use the loglikelihood score assigned by the model to the correct label given that prompt. We choose this metric over accuracy as it gives a more fine-grained distinction between prompts and because accuracy can be unstable, as explained in more detail in Section 4. For classification tasks, we also report correlation with accuracy, which is the main evaluation metric for this type of task.
43
+
44
+ # 3 Automatic Expansion of Seed Prompts
45
+
46
+ We are interested in expanding our pool of prompts in order to: (a) have a more diverse set of prompts, making it more likely to find a better prompt for our task, and (b) support better analysis to validate our prompt quality hypothesis. In this section, we describe our method for automatically expanding a seed set of manually created prompts using paraphrasing.
47
+
48
+ Step 0: Creating a seed set of manually-written prompts We first write/collect a small set of human written prompts that describe the task. For classification tasks we assume that the input appears before the prompt, with no choices appearing as part of the prompt (to help in smooth paraphrasing of the prompt itself).
49
+
50
+ Step 1: Paraphrasing with GPT3 We use the text-davinci-002 version of GPT3 (Brown et al., 2020) to generate paraphrases for each of the manual prompts in our seed set. We prompt it with a meta-prompt for paraphrasing to generate variations of one of our seed prompts. An example of such a meta-prompt is: Write a paraphrase for the following sentence: <seed prompt> Paraphrase:. The 7 meta-prompts used in this step are listed in Table 2.
51
+
52
+ We choose GPT3 as our paraphrasing model because of its well-documented generation abilities. This is also to ensure that there is a separation between the model we use to create the prompts and the models we use to rank them (OPT and Bloom, see Section 4 for details), to avoid confounding the experimental setup.
53
+
54
+ Step 2: Paraphrasing using backtranslation Our second step takes as input the paraphrases from GPT3 (in addition to the seed set of prompts) and translates them into different languages and back into English to get additional prompt paraphrases (Wieting et al., 2017). We use a set of 8 languages available in the NLLB translation model (Costajussà et al., 2022) that are relatively high resource and close to English,2 to reduce the risk of noise. Since we aim to get about 100 prompts per task, we add 8 additional languages3 in the case where the basic 8 languages yielded too few alternatives. For word prediction tasks, we use the sequence of the created prompt up to the index of the label, not including the label, for example: The word “dog” in French is “. Depending on the task, we enforce the existence of specific words (e.g., the name of the language, and the source word, in word-level translation) or enforce the prompt to be a question.
55
+
56
+ Examples and Statistics Table 4 lists all 4 manually created prompts we use for the AG News task (news classification), alongside a few sampled prompts created automatically using our method. As was typically the case, we are able to get prompts that are rather different in phrasing and structure from those included in the seed set.
57
+
58
+ The statistics of the prompts in the manually created seed set (Step 0) as well as the prompts after Step 1 and Step 2 for each task (see Section 4.1 for details about the tasks) are detailed in Table 3.
59
+
60
+ # 4 Experimental Setup
61
+
62
+ # 4.1 Models, Tasks and Datasets
63
+
64
+ We study four auto-regressive models: OPT (Zhang et al., 2022) of different sizes (1.3B, 30B, 175B parameters), all trained mainly on English,4 and Bloom (176B parameters; Luccioni et al. 2022), which is trained on 46 natural languages and 13 programming languages. We experiment with two types of tasks: word prediction tasks and classification tasks, as detailed below.
65
+
66
+ Word Prediction Tasks The first task in this category is word-level translation. Given a source word in English and a target language, we expect the model to predict the correct translation. For this task we use NorthEuraLex5 (Dellert et al., 2019), a lexical database providing translations of 1016 words into 107 languages. We experiment with 9 languages that use the Latin script. For Bloom, we use 5 additional languages that do not use the
67
+
68
+ Table 2: Meta prompts used in Step 1 of our method for paraphrasing using GPT3.
69
+
70
+ <table><tr><td>Meta prompts</td></tr><tr><td>Write a paraphrase for the following sentence: &lt;seed-prompt&gt; Paraphrase: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a likely paraphrase of the text: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a sentence similar to the following one: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Paraphrase the following sentence: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a variation of this sentence: &lt;seed-prompt&gt; How would you say the following sentence in a different way? &lt;seed-prompt&gt;</td></tr></table>
71
+
72
+ Table 3: Number of prompts for the different tasks: prompts after step 0 (creating prompts manually), prompts after step 1 (GPT3 paraphrasing), and prompts after step 2 (backtranslation).
73
+
74
+ <table><tr><td>Task</td><td># Step 0</td><td># Step 1 # Step 2</td></tr><tr><td>Word-Level Translation</td><td>12 59</td><td>118</td></tr><tr><td>Antonyms</td><td>12 85</td><td>176</td></tr><tr><td>GLUE Cola</td><td>4 27</td><td>144</td></tr><tr><td>Newspop</td><td>13 43</td><td>119</td></tr><tr><td>AG News</td><td>4 23</td><td>108</td></tr><tr><td>IMDB</td><td>10 45</td><td>178</td></tr><tr><td>DBpedia</td><td>8 23</td><td>103</td></tr><tr><td>Emotion</td><td>4 14</td><td>94</td></tr><tr><td>Tweet Offensive</td><td>5 41</td><td>119</td></tr></table>
75
+
76
+ Latin script (since Bloom is multilingual). Note that only 5 of the languages we experiment with are officially covered by Bloom.6
77
+
78
+ We also consider antonym prediction where, given a word, the model is expected to predict its antonym. For this task, we use data from Kaggle,7 which is based on WordNet (Miller, 1995). We choose 1,000 word pairs at random.
79
+
80
+ Classification Tasks We choose classification tasks from Huggingface Datasets,8 with an attempt to have a set of diverse tasks that use relatively short inputs, with some prompts available in PromptSource (Bach et al., 2022):9 (a) GLUE Cola (grammaticality; Warstadt et al. 2018); (b) Newspop (news classification; Moniz and Torgo 2018); (c) AG News (news classification; Zhang et al. 2015); (d) IMDB (movie review classification; Maas et al. 2011); (e) DBpedia (topic classification; Lehmann et al. 2015); (f) Emotion (classification to emotions; Saravia et al. 2018); (g) Tweet Offensive (classification to offensive vs. not offensive tweets; Barbieri et al. 2020). We use 1,000 random examples from each dataset.
81
+
82
+ The full set of manual prompts is listed in Section A in the Appendix. In these tasks, the prompt follows the input, and at the end of each prompt we add the choices of classes (i.e., we provide the possible labels explicitly in the prompt by listing the possible answers as defined by the dataset itself.): “Choices: X, Y, Z. Answer:” as we find it helps in terms of accuracy. Defining the label space likely helps in our zero-shot setting because there are no previous demonstrations from which the model can learn the possible classes. Additionally, adding class options to the prompt helps to reduce the effect of the surface form competition (Holtzman et al., 2021). The option of generating the answer and comparing it with the gold label was not reasonable here, since we cannot expect the model to generate the exact label as the first choice often enough.
83
+
84
+ # 4.2 Implementation Details
85
+
86
+ In all experiments we evaluate zero-shot performance. To avoid noise when computing perplexity, we instantiate the prompts with 1,000 examples of the dataset, compute the perplexity of the prompt with each example, and calculate the average across all instantiated prompts.
87
+
88
+ To estimate the performance of the prompt, we look at two measures: (a) the language model score (log probability) of the correct label, averaged across 1,000 examples; (b) the accuracy on the task, computed over the 1,000 examples. To compute accuracy, for each example we score all classes and choose the highest ranking class as the prediction of the model. The score of a label of multiple tokens is defined by the sum of the token
89
+
90
+ Table 4: Prompts for the task AG News (news classification): the manually created prompts and a sample of automatically created prompts using our method.
91
+
92
+ <table><tr><td>All Manually Created Prompts</td><td>Examples of Similar Automatically Created Prompts</td></tr><tr><td>What label best describes this news article?</td><td>What&#x27;s the most accurate label for this news article?</td></tr><tr><td>What is this piece of news regarding? Which newspaper section would this article likely appear in?</td><td>What does this piece of news concern?</td></tr><tr><td>What topic is this news article about?</td><td>In what section of the newspaper could this article be published? What category does this article fall into?</td></tr></table>
93
+
94
+ Table 5: Correlation results for the different tasks, with OPT (different sizes) and Bloom. Correlations with $p < 0 . 0 5$ are marked with \*. Correlations with $p < 0 . 0 0 6 2 5$ (according to Bonferroni correction for multiple hypotheses) are marked with $^ { * * }$ . Dark and light blue colored cells stand for negative correlations $< - 0 . 2$ and $> - 0 . 2$ , respectively. Dark and light orange colored cells stand for positive correlations $> 0 . 2$ and $< 0 . 2$ , respectively. Average accuracy across all prompts and average accuracy of best $50 \%$ prompts are also reported for reference (Avg Acc and Acc $50 \%$ , respectively).
95
+
96
+ <table><tr><td>Model</td><td>Task</td><td colspan="2">Perplexity-score corr. Pearson Spearman</td><td colspan="2">Perplexity-acc corr. Pearson Spearman</td><td rowspan="2"> Avg Acc</td><td rowspan="2"> Acc 50%</td></tr><tr><td rowspan="8">OPT175B</td><td>Antonyms</td><td>**-0.41</td><td>**-0.53</td><td></td><td></td></tr><tr><td>GLUE Cola</td><td>-0.15</td><td>-0.14</td><td>-0.04</td><td>1 -0.02</td><td>1 47.7</td><td>1 57.1</td></tr><tr><td>Newspop</td><td>*-0.24</td><td>**-0.26</td><td> *-0.20</td><td>-0.18</td><td>66.4</td><td>72.9</td></tr><tr><td>AG News</td><td>**-0.63</td><td> **-0.68</td><td> **-0.77</td><td>**-0.81</td><td>57.5</td><td>68.7</td></tr><tr><td>IMDB</td><td>**0.35</td><td>**0.40</td><td>0.14</td><td>*0.20</td><td>86.2</td><td>91.0</td></tr><tr><td>DBpedia</td><td> **-0.50</td><td>**-0.44</td><td> **-0.51</td><td>**-0.42</td><td>46.7</td><td>55.2</td></tr><tr><td>Emotion</td><td>-0.14</td><td>-0.19</td><td> **-0.30</td><td> **-0.32</td><td>16.4</td><td>23.0</td></tr><tr><td>Tweet Offensive</td><td>*-0.19</td><td>0.07</td><td>0.18</td><td>*0.23</td><td>51.3</td><td>55.8</td></tr><tr><td rowspan="8">Bloom 176B</td><td>Antonyms</td><td>**-0.37</td><td>**-0.23</td><td></td><td></td><td>1</td><td>1</td></tr><tr><td>GLUE Cola</td><td>0.07</td><td>0.11</td><td>**-0.25</td><td>**-0.26</td><td>55.5</td><td>65.6</td></tr><tr><td>Newspop</td><td>**-0.50</td><td>**-0.42</td><td> **-0.59</td><td> **-0.51</td><td>78.9</td><td>87.8</td></tr><tr><td>AG News</td><td>**-0.62</td><td> **-0.54</td><td>**-0.44</td><td>**-0.44</td><td>50.3</td><td>59.4</td></tr><tr><td>IMDB</td><td>0.04</td><td>0.09</td><td>-0.08</td><td>-0.14</td><td>89.3</td><td>92.2</td></tr><tr><td>DBpedia</td><td>**-0.47</td><td> *-0.27</td><td>**-0.35</td><td>*-0.21</td><td>27.2</td><td>33.4</td></tr><tr><td>Emotion</td><td>**-0.33</td><td> **-0.42</td><td>**-0.48</td><td>**-0.55</td><td>29.3</td><td>31.7</td></tr><tr><td>Tweet Offensive</td><td>0.14</td><td>*0.24</td><td> *-0.20</td><td>-0.03</td><td>41.6</td><td>46.2</td></tr><tr><td rowspan="8">OPT 30B</td><td> Antonyms</td><td> **-0.54</td><td>**-0.70</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>GLUE Cola</td><td>-0.05</td><td>0.03</td><td>-0.13</td><td>0.02</td><td>32.2</td><td>35.5</td></tr><tr><td>Newspop</td><td>*-0.23</td><td> *-0.25</td><td>*-0.18</td><td>-0.12</td><td>60.3</td><td>66.6</td></tr><tr><td>AG News</td><td>**-0.66</td><td> **-0.71</td><td> **-0.81</td><td>**-0.80</td><td>49.3</td><td>60.7</td></tr><tr><td>IMDB</td><td>-0.06</td><td>*0.17</td><td>0.04</td><td>**0.22</td><td>81.6</td><td>86.1</td></tr><tr><td>DBpedia</td><td> **-0.41</td><td> **-0.34</td><td>*-0.21</td><td>*-0.25</td><td>35.9</td><td>42.4</td></tr><tr><td>Emotion</td><td>0.00</td><td>-0.03</td><td>0.18</td><td>0.13</td><td>12.3</td><td>16.2</td></tr><tr><td>Tweet Offensive</td><td>**-0.44</td><td>**-0.39</td><td>-0.11</td><td>-0.05</td><td>54.6</td><td>60.2</td></tr><tr><td rowspan="8">OPT 1.3B</td><td>Antonyms</td><td> **-0.45</td><td>**-0.53</td><td></td><td></td><td>1</td><td></td></tr><tr><td>GLUE Cola</td><td> **-0.39</td><td> **-0.36</td><td>-0.09</td><td>*-0.19</td><td>60.3</td><td>1 65.9</td></tr><tr><td>Newspop</td><td>**0.33</td><td>*0.21</td><td>-0.07</td><td>-0.07</td><td>37.6</td><td>40.3</td></tr><tr><td>AG News</td><td>**-0.33</td><td>**-0.29</td><td> **-0.56</td><td> **-0.49</td><td>31.9</td><td>37.6</td></tr><tr><td>IMDB</td><td>-0.11</td><td>-0.07</td><td>**0.24</td><td>**0.22</td><td>86.0</td><td>89.1</td></tr><tr><td>DBpedia</td><td>-0.16</td><td>-0.14</td><td>-0.02</td><td>-0.01</td><td>8.7</td><td>9.2</td></tr><tr><td>Emotion</td><td>0.08</td><td>0.08</td><td>**-0.29</td><td>**-0.30</td><td>7.0</td><td>9.1</td></tr><tr><td>Tweet Offensive</td><td>**-0.42</td><td>**-0.35</td><td> **-0.50</td><td>**-0.38</td><td>58.6</td><td>62.6</td></tr></table>
97
+
98
+ scores.
99
+
100
+ For the word prediction tasks we only report scores, since accuracy in general is less stable, suffers more from the surface form competition (Holtzman et al., 2021), and is usually quite low for these tasks in our setting (the chances the model will generate an exact match of the label are low). Hence, the score of the correct label gives a better estimate of the actual performance of the model.
101
+
102
+ Table 6: Correlation results for word-level translation, with OPT 175B and Bloom 176B. All correlations are statistically significant also according to Bonferroni correction for multiple hypotheses for OPT $( p < 0 . 0 0 5 5 )$ . Same for Bloom $( p \textless 0 . 0 0 3 5 7 )$ , except for Catalan (Pearson) and Japanese (Spearman).
103
+
104
+ <table><tr><td rowspan="2">Lang</td><td colspan="2">OPT175B</td><td rowspan="2">Bloom 176B Pearson</td><td rowspan="2">Spear.</td></tr><tr><td>Pearson</td><td>Spear.</td></tr><tr><td>ita</td><td>-0.44</td><td>-0.57</td><td>-0.37</td><td>-0.63</td></tr><tr><td>spa</td><td>-0.47</td><td>-0.61</td><td>-0.51</td><td>-0.66</td></tr><tr><td>cat</td><td>-0.47</td><td>-0.58</td><td>-0.24</td><td>-0.31</td></tr><tr><td>fra</td><td>-0.48</td><td>-0.57</td><td>-0.48</td><td>-0.64</td></tr><tr><td>deu</td><td>-0.44</td><td>-0.60</td><td>-0.46</td><td>-0.65</td></tr><tr><td>fin</td><td>-0.44</td><td>-0.62</td><td>-0.34</td><td>-0.56</td></tr><tr><td>por</td><td>-0.45</td><td>-0.62</td><td>-0.46</td><td>-0.61</td></tr><tr><td>eus</td><td>-0.47</td><td>-0.61</td><td>-0.45</td><td>-0.61</td></tr><tr><td>tur</td><td>-0.44</td><td>-0.62</td><td>-0.33</td><td>-0.62</td></tr><tr><td>jpn</td><td></td><td></td><td>-0.33</td><td>-0.26</td></tr><tr><td>arb</td><td></td><td></td><td>-0.36</td><td>-0.47</td></tr><tr><td>rus</td><td>1</td><td></td><td>-0.54</td><td>-0.69</td></tr><tr><td>kor</td><td></td><td></td><td>-0.42</td><td>-0.58</td></tr><tr><td>ell</td><td></td><td></td><td>-0.40</td><td>-0.51</td></tr></table>
105
+
106
+ # 5 Results
107
+
108
+ Classification Tasks and Antonym Prediction Table 5 depicts the Pearson and Spearman correlation results on the classification tasks and the antonym task, with both OPT 175B and Bloom (two upper blocks). We see that most correlations are negative and statistically significant, as we expect. This validates our hypothesis and shows that in the majority of tasks we indeed get a strong correlation between low perplexity of the prompt and better performance on the task.10 For each task we also report the average accuracy.
109
+
110
+ Word-Level Translation The results of the wordlevel translation task are reported in Table 6. Here the correlations are extremely consistent across all languages and across models, with statistical significance for all languages except for Catalan and Japanese (in Bloom).
111
+
112
+ Results across Different Model Sizes We repeat the same experiment with the OPT models of sizes 1.3B and 30B, to investigate whether these correlations are also consistent across model sizes or whether this is a phenomenon we should expect only in large language models. Table 5 (two lower blocks) shows these results for all classification tasks and antonym prediction. We do see that in general the trend appears to be the same in the smaller models as well; however, the correlations seem to be slightly weaker. We hypothesize that this might be due to the overall lower performance of these smaller models, making the performance results we use for correlation less stable and reliable. For word-level translation, however, all correlations with the 30B and 1.3B models are similar to those with the 175B model, and are all statistically significant (also after Bonferroni correction for multiple hypotheses).
113
+
114
+ # 6 Analysis
115
+
116
+ Next, we further explore the observed relationship between model perplexity and prompt performance. Despite the consistently high correlation between these two factors, the structure of this relationship varies across tasks (Section 6.1). Additionally, we find that the automatically added prompts are highquality and not a significant source of noise (Section 6.2), and that the best prompts selected by our approach vary across models (Section 6.3).
117
+
118
+ # 6.1 Visualizing the Relationship between Perplexity and Performance
119
+
120
+ To visualize the correlations we get between the perplexity and the performance of the prompts across the different settings, we plot a few examples for different tasks and languages. Figures 1 and 2 show some of the results for selected tasks, as detailed in the captions. The negative trend of the correlation is clearly visible in all plots. Interestingly, the structure of the plots for word-level translation are very similar across all the language pairs, suggesting that prompts get consistent perplexity and performance across languages (possibly at different scales). Indeed, the intersection of the 10 lowest perplexity prompts between any two different languages is 8.6 and 8.4 on average (for OPT 175B and Bloom, respectively), which is extremely high. This is not very surprising since we know that the only differences between the prompts in the different languages are the names of the target languages (e.g., The word for “dog” in French is “). Additionally, the intersection of 10 prompts with the highest label score between any two different languages is 7 and 6.5 on average (for OPT 175B and Bloom, respectively).
121
+
122
+ A notable finding that appears in the word-level translation plots is the clear separation between prompts that include or do not include quotation marks for the label (usually aligns with whether the prompt uses quotation marks for the source word) – three example prompts appear on the plot. Prompts with quotation marks for the words tend to have both lower perplexity and better performance, consistently. We further analyze the results for OPT 175B within clusters (with/without quotations marks). In the cluster with quotation marks, we get negative correlations (in the range of $- 0 . 2 8$ to –0.38) that are statistically significant for almost all languages. The correlations within the other cluster are weaker and less significant (this is expected given the overall lower performance of that cluster).
123
+
124
+ ![](images/75ad713163e05245c30b6d7c7488af8e438550f2577006fad2670d68d0418ccd.jpg)
125
+ Figure 2: Score of correct label vs. perplexity for the word-level translation task in French with OPT 175B. The $x$ axis is in log scale. The blue points stand for prompts with quotation marks for the words, while the yellow points are of prompts without quotation marks.
126
+
127
+ # 6.2 Effect of Noisy Prompts
128
+
129
+ We expect our automatic method for expanding the set of prompts to also introduce some noise. Though our focus is on the lower perplexity prompts, since we want to benefit from this analysis and be able to devise a method for creating better prompts, we do want to make sure that this potential noise is not the cause for the strong correlations we get. In other words, one might claim that some noisy prompts have particularly high perplexity and also perform badly, thus, supporting our hypothesis in an undesirable and uncontrolled manner.
130
+
131
+ We turn to inspect the $10 \%$ highest perplexity prompts in the different tasks and find subjectively that they are not noisy, and are usually valid prompts for the tasks. The 5 highest perplexity prompts for the GLUE Cola task are listed in Table 7 as an example.
132
+
133
+ Table 7: Example of the 5 highest perplexity prompts for GLUE Cola, using OPT 175B.
134
+
135
+ <table><tr><td>prompt</td><td>ppl</td></tr><tr><td>Is this example correct English usage?</td><td>25.79</td></tr><tr><td>Is this example using English correctly?</td><td>25.46</td></tr><tr><td>Is this example correct English?</td><td>25.33</td></tr><tr><td>Is this the example in correct English?</td><td>25.00</td></tr><tr><td>Is English in this example correct?</td><td>24.90</td></tr></table>
136
+
137
+ Table 8: Correlations before and after filtering out noisy prompts, with AG News and Word-Level Translation (WLT).
138
+
139
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Lang</td><td colspan="2">Before filtering</td><td colspan="2">After filtering</td></tr><tr><td>Pearson</td><td>Spearman</td><td>Pearson</td><td>Spearman</td></tr><tr><td>AG News</td><td>-</td><td>-0.63</td><td>-0.68</td><td>-0.62</td><td>-0.54</td></tr><tr><td rowspan="9">WLT</td><td>ita</td><td>-0.44</td><td>-0.58</td><td>-0.44</td><td>-0.57</td></tr><tr><td>spa</td><td>-0.47</td><td>-0.61</td><td>-0.47</td><td>-0.61</td></tr><tr><td>cat</td><td>-0.45</td><td>-0.57</td><td>-0.47</td><td>-0.58</td></tr><tr><td>fra</td><td>-0.47</td><td>-0.57</td><td>-0.48</td><td>-0.57</td></tr><tr><td>deu</td><td>-0.43</td><td>-0.60</td><td>-0.44</td><td>-0.60</td></tr><tr><td>fin</td><td>-0.41</td><td>-0.60</td><td>-0.44</td><td>-0.62</td></tr><tr><td>por</td><td>-0.43</td><td>-0.61</td><td>-0.45</td><td>-0.62</td></tr><tr><td>eus</td><td>-0.45</td><td>-0.60</td><td>-0.47</td><td>-0.61</td></tr><tr><td>tur</td><td>-0.43</td><td>-0.61</td><td>-0.44</td><td>-0.62</td></tr></table>
140
+
141
+ As a sanity check, we choose two tasks: wordlevel translation and AG News, manually filter out the noisy prompts, and compute the correlations again. The annotation is done by external annotators (NLP researchers) that were presented with the tasks and asked to label whether the prompt is reasonable to use for the task. The new correlations with OPT 175B are reported in Table 8. We find that all correlations remain strong and statistically significant when noise is manually removed from the analysis. We get the same trends with Bloom as well.
142
+
143
+ # 6.3 Best Performing Prompts
144
+
145
+ Table 9 lists the 5 lowest perplexity prompts for the task of antonym prediction, as an example. Similar lists for the rest of the tasks are listed in Section B in the Appendix.
146
+
147
+ A closer look at the lowest perplexity prompts reveals that the intersection of 10 lowest perplexity prompts between OPT 175B and Bloom is 7.1 on average, across the classification tasks. When looking at the 10 highest accuracy prompts across models we get an average intersection of 3.1 across the classification tasks.
148
+
149
+ Table 9: Lowest perplexity prompts for the antonym prediction task, using OPT 175B.
150
+
151
+ <table><tr><td>prompt</td><td>ppl</td></tr><tr><td>The following two words are antonyms:“good&quot;and “</td><td>10.24</td></tr><tr><td>The antonym of the word“good’is“</td><td>10.32</td></tr><tr><td>The word that has the opposite meaning of the word “good&quot;is “</td><td>10.43</td></tr><tr><td>The word“good’is the antithesis of the word “</td><td>10.85</td></tr><tr><td>The word “good&quot;is the opposite of the word “</td><td>11.15</td></tr></table>
152
+
153
+ # 7 SPELL: Selecting Prompts by Estimating LM Likelihood
154
+
155
+ The primary contribution of this work is the analysis of the relationship between prompt perplexity and downstream task performance (Section 5). As one potential application of our findings, we also present a new method, SPELL, for generating and selecting consistently effective prompts.
156
+
157
+ Assuming a fixed computational budget for finding effective prompts for a given task, and that the search space might be quite large, we devise the following straightforward procedure:
158
+
159
+ 1. Obtain a small set of manually created prompts for the task.
160
+ 2. Expand the set of prompts with automatic paraphrasing using a LM (e.g., GPT3) and backtranslation (see Section 3).
161
+ 3. Rank the list of prompts by perplexity (averaged on a representative sample of task inputs, e.g., 1,000).
162
+ 4. Choose the $k$ (e.g., 3) lowest perplexity prompts.
163
+
164
+ Using this algorithm, we show empirically that it is best to prioritize experimenting with the lowest perplexity prompts, as they are more stable (exhibit less variation in performance) and perform better than manual prompts on average. This method also does not require any labels for the task, and is applicable to any task, also by non-experts, given example inputs only.
165
+
166
+ # 7.1 Empirical Validation of SPELL
167
+
168
+ To show the effectiveness of our method, we report the results we get using SPELL across the different tasks. In Table 10 we report the average accuracy with the manual prompts compared to the average accuracy with the 3 lowest-perplexity prompts, for both OPT 175B and Bloom. Indeed, in most cases, the average accuracy using the 3 lowest perplexity prompts outperforms the average accuracy of the manual prompts, with an average of 1.8 accuracy points across tasks with OPT and 2.3 accuracy points with Bloom, demonstrating the effectiveness of our method.
169
+
170
+ Table 10: The average accuracy with the manual prompts (manual) compared to the average accuracy with the 3 lowest-perplexity prompts (low-ppl), for both OPT 175B and Bloom, across tasks.
171
+
172
+ <table><tr><td></td><td colspan="3">OPT</td><td colspan="3">Bloom</td></tr><tr><td>Task</td><td>low-ppl</td><td>manual</td><td>△</td><td>low-ppl</td><td>manual</td><td>△</td></tr><tr><td>GLUE Cola</td><td>51.7</td><td>48.5</td><td>3.1</td><td>64.5</td><td>60.9</td><td>3.6</td></tr><tr><td>Newspop</td><td>80.6</td><td>70.4</td><td>10.2</td><td>90.0</td><td>80.0</td><td>10.0</td></tr><tr><td>AG News</td><td>68.4</td><td>61.9</td><td>6.5</td><td>51.0</td><td>63.5</td><td>-12.5</td></tr><tr><td>IMDB</td><td>90.4</td><td>88.9</td><td>1.4</td><td>91.3</td><td>88.8</td><td>2.5</td></tr><tr><td>DBpedia</td><td>46.0</td><td>51.7</td><td>-5.7</td><td>31.2</td><td>30.2</td><td>1.0</td></tr><tr><td>Emotion</td><td>21.6</td><td>22.6</td><td>-1.1</td><td>35.8</td><td>32.1</td><td>3.6</td></tr><tr><td>Tweet Offensive</td><td>48.4</td><td>50.6</td><td>-2.3</td><td>48.6</td><td>40.8</td><td>7.8</td></tr></table>
173
+
174
+ The variability in accuracy of the 3 lowest perplexity prompts is also much lower than that of the manually created prompts: with OPT 175B, the average standard deviation within the 3 lowest perplexity prompts (across tasks) is 5.07, vs. 6.86 for the manual prompts, and with Bloom the gap is much bigger, with an average of 2.6 for the 3 lowest perplexity prompts vs. 7.47 for the manual ones.11 This further shows that SPELL is more stable and reliable compared to using an arbitrary set of manually created prompts. SPELL sets the stage for further development in this direction, and serves as an initial indication of the benefits of involving perplexity estimation in the process of generating effective prompts.
175
+
176
+ # 8 Related Work
177
+
178
+ Relation between performance and training data Previous work looking directly into the relation between the training data and the performance is limited. Razeghi et al. (2022) study numeric deduction tasks, and examine the correlations between the model performance on specific test instances and the frequency of terms from those instances in the pretraining data. They find that the models are more accurate on instances whose terms are more prevalent in the training data. Additionally, Han and Tsvetkov (2022) propose a method to effectively identify a very small subset of pretraining data that directly supports the model in performing a specific task. Elazar et al. (2022) use causal inference to measure the effect of pretraining data statistics on factual knowledge performance, and
179
+
180
+ Kandpal et al. (2022) show correlational and causal relationships between accuracy and relevant document count (from training data) for QA datasets.
181
+
182
+ Prompt tuning and analysis There is a very rich line of work trying to find prompts automatically. Shin et al. (2020) present an automated method to create discrete prompts for a diverse set of tasks, based on a gradient-guided search, and they demonstrate their method on masked LMs. Other work also focuses on discrete prompts, aiming to improve zero-shot performance (Gao et al., 2021; Le Scao and Rush, 2021; Deng et al., 2022; Shi et al., 2022), or trains continuous prompts (Li and Liang, 2021; Lester et al., 2021; Qin and Eisner, 2021).
183
+
184
+ On top of works that suggest a variety of methods for creating better prompts, some work also analyzes those prompts to try and get some insights about them: Khashabi et al. (2022a) find that model performance is highly sensitive to small changes in wordings and Khashabi et al. (2022b) point to a surprising disconnect between continuous and discrete prompts.
185
+
186
+ # Limitations
187
+
188
+ Searching for human-readable prompts We limit our search space to human-readable prompts that are fluent and accurately describe the task at hand, as we are primarily motivated in understanding why some relevant prompts work better than others. We do this by using manually created prompts and their automatically created paraphrases. Our findings may not hold when the possible prompt space is expanded to include any token sequence; we leave this direction to future work.
189
+
190
+ Generality of our analysis and of the SPELL method We perform our analysis on and build our method around specific models, namely OPT and Bloom. Additionally, our study is limited to the specific tasks we experiment with and to English. It is possible that our analysis and SPELL method do not generalize to other pretrained models or tasks; however, we consider models of various sizes and from different sources, and a wide range of tasks to mitigate this risk.
191
+
192
+ # Acknowledgements
193
+
194
+ We thank Alisa Liu and Orevaoghene Ahia for their help in annotating noisy prompts. We also thank the reviewers for their valuable comments on the paper.
195
+
196
+ # 9 Conclusion
197
+
198
+ We investigate the phenomenon where some prompts perform better than others despite appearing similar to the human users of LMs. Specifically, we hypothesize that the perplexity of a prompt under a given LM is closely tied to its task performance. We test this theory on a large number of tasks and autoregressive LMs, and the resulting correlation study validates our hypothesis. Further analysis of this relationship demonstrates that the best prompts differ across models, highlighting the importance of model-specific analysis, and that the underlying structure of the relationship between perplexity and performance varies across tasks.
199
+
200
+ In light of these findings, we then propose a method, SPELL, to help users find wellperforming prompts for new tasks. Empirical validation of the proposed procedure shows that SPELL generates effective prompts with low variability in performance, and produces small gains of 1.8 (2.3) accuracy points with OPT (Bloom) over manual prompts. We therefore conclude that SPELL provides a general and interpretable approach for applying LMs to new tasks while requiring minimal human effort, and no labels.
201
+
202
+ # References
203
+
204
+ Stephen H. Bach, Victor Sanh, Zheng-Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-David, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Alan Fries, Maged S. Al-shaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Xiangru Tang, Mike Tian-Jian Jiang, and Alexander M. Rush. 2022. Promptsource: An integrated development environment and repository for natural language prompts.
205
+
206
+ Francesco Barbieri, Jose Camacho-Collados, Luis Espinosa-Anke, and Leonardo Neves. 2020. TweetEval:Unified Benchmark and Comparative Evaluation for Tweet Classification. In Proceedings of Findings of EMNLP.
207
+
208
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
209
+
210
+ Yanda Chen, Chen Zhao, Zhou Yu, Kathleen McKeown, and He He. 2022. On the relation between sensitivity and accuracy in in-context learning. arXiv e-prints, pages arXiv–2209.
211
+
212
+ Marta R Costa-jussà, James Cross, Onur Çelebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672.
213
+
214
+ Johannes Dellert, Thora Daneyko, Alla Münch, Alina Ladygina, Armin Buch, Natalie Clarius, Ilja Grigorjew, Mohamed Balabel, Hizniye Isabella Boga, Zalina Baysarova, et al. 2019. Northeuralex: a widecoverage lexical database of northern eurasia. Language Resources and Evaluation, pages 1–29.
215
+
216
+ Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric P Xing, and Zhiting Hu. 2022. Rlprompt: Optimizing discrete text prompts with reinforcement learning. arXiv preprint arXiv:2205.12548.
217
+
218
+ Yanai Elazar, Nora Kassner, Shauli Ravfogel, Amir Feder, Abhilasha Ravichander, Marius Mosbach, Yonatan Belinkov, Hinrich Schütze, and Yoav Goldberg. 2022. Measuring causal effects of data statistics on language model’sfactual’predictions. arXiv preprint arXiv:2207.14251.
219
+
220
+ Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 3816–3830.
221
+
222
+ Xiaochuang Han and Yulia Tsvetkov. 2022. Orca: Interpreting prompted language models via locating supporting data evidence in the ocean of pretraining data. arXiv preprint arXiv:2205.12600.
223
+
224
+ Ari Holtzman, Peter West, Vered Shwartz, Yejin Choi, and Luke Zettlemoyer. 2021. Surface form competition: Why the highest probability answer isn’t always right. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7038–7051.
225
+
226
+ Nikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace, and Colin Raffel. 2022. Large language models struggle to learn long-tail knowledge. arXiv preprint arXiv:2211.08411.
227
+
228
+ Daniel Khashabi, Chitta Baral, Yejin Choi, and Hannaneh Hajishirzi. 2022a. Reframing instructional prompts to gptk’s language. In Findings of the Association for Computational Linguistics: ACL 2022, pages 589–612.
229
+
230
+ Daniel Khashabi, Xinxi Lyu, Sewon Min, Lianhui Qin, Kyle Richardson, Sean Welleck, Hannaneh Hajishirzi, Tushar Khot, Ashish Sabharwal, Sameer
231
+
232
+ Singh, and Yejin Choi. 2022b. Prompt waywardness: The curious case of discretized interpretation of continuous prompts. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.
233
+
234
+ Teven Le Scao and Alexander Rush. 2021. How many data points is a prompt worth? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics.
235
+
236
+ Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick Van Kleef, Sören Auer, et al. 2015. Dbpedia–a large-scale, multilingual knowledge base extracted from wikipedia. Semantic web, 6(2):167–195.
237
+
238
+ Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045–3059.
239
+
240
+ Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582– 4597.
241
+
242
+ Alexandra Sasha Luccioni, Sylvain Viguier, and AnneLaure Ligozat. 2022. Estimating the carbon footprint of bloom, a 176b parameter language model. arXiv preprint arXiv:2211.02001.
243
+
244
+ Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.
245
+
246
+ George A Miller. 1995. Wordnet: a lexical database for english. Communications of the ACM, 38(11):39–41.
247
+
248
+ N. Moniz and L. Torgo. 2018. Multi-source social feedback of online news feeds. ArXiv, abs/1801.07055.
249
+
250
+ Guanghui Qin and Jason Eisner. 2021. Learning how to ask: Querying lms with mixtures of soft prompts. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5203–5212.
251
+
252
+ Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. 2022. Impact of pretraining term frequencies on few-shot reasoning. arXiv preprint arXiv:2202.07206.
253
+
254
+ Elvis Saravia, Hsien-Chi Toby Liu, Yen-Hao Huang, Junlin Wu, and Yi-Shin Chen. 2018. CARER: Contextualized affect representations for emotion recognition. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3687–3697, Brussels, Belgium. Association for Computational Linguistics.
255
+
256
+ Timo Schick and Hinrich Schütze. 2020. It’s not just size that matters: Small language models are also few-shot learners. arXiv preprint arXiv:2009.07118.
257
+
258
+ Weijia Shi, Xiaochuang Han, Hila Gonen, Ari Holtzman, Yulia Tsvetkov, and Luke Zettlemoyer. 2022. Toward human readable prompt tuning: Kubrick’s the shining is a good movie, and a good prompt too? arXiv preprint arXiv:2212.10539.
259
+
260
+ Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. 2020. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980.
261
+
262
+ Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2018. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471.
263
+
264
+ John Wieting, Jonathan Mallinson, and Kevin Gimpel. 2017. Learning paraphrastic sentence embeddings from back-translated bitext. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 274–285.
265
+
266
+ Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068.
267
+
268
+ Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In NIPS.
269
+
270
+ # A Manually Created Prompts
271
+
272
+ Table 11 lists the manually created prompts we use for the different tasks. We manually add, remove and edit prompts for some of these tasks, to make them fit for our setting. For example, the following prompt for AG News, taken from Promptsource, does not fit our setting: Would you recommend the following article to a politician, an athlete, business executive, or a scientist?
273
+
274
+ # B Lowest Perplexity Prompts
275
+
276
+ Table 12 lists the 5 lowest perplexity prompts for each task, using OPT 175B.
277
+
278
+ Table 11: The set of manually created prompts for each task.
279
+
280
+ <table><tr><td>Task Manual Prompts</td><td></td></tr><tr><td>Antonyms</td><td>The antonym of the word “good”is“ The opposite meaning of the word “good”is “ “Good”is the opposite of“ “Good”is the negation of“ The following are opposites of each other:“good&quot;and “ The word “good&quot;contradicts the word “ The antonym of the word good is The opposite meaning of the word good is Good is the opposite of</td></tr><tr><td>GLUE Cola</td><td>The following are opposites of each other: good and The word good contradicts the word Does the this sentence make sense and use correct English? Is this example grammatically correct and sensible? Does this sentence make sense and is it grammatically correct?</td></tr><tr><td>Newspop</td><td>Does this example use correct English? What is the article about? What is this news about? What is the topic of this news piece? What does this article discuss? What is the topic of this sentence? What category does the article belong to? Pick one category forthis news piece. Pick the category that fits the text. The article refers to which category? What topic does the article belong to? What category fits this article? What topic does this news piece belong to? Choose the correct category for this article.</td></tr><tr><td>AG News</td><td>What label best describes this news article? What is this piece of news regarding? Which newspaper section would this article likely appear in? What topic is this news article about? This movie review expresses what sentiment? Did the reviewer find this movie good or bad?</td></tr><tr><td>IMDB</td><td>Is this review positive or negative? How does the viewer feel about the movie? What sentiment does the writer express for the movie? What sentiment is expressed for the movie? What is the sentiment expressed in this text? Did the reviewer enjoy the movie? What is the sentiment expressed by the reviewer for the movie? How does the reviewer feel about the movie? What category does the paragraph belong to? Pick one category for the text.</td></tr><tr><td>DBpedia</td><td>Pick the category that fits the text. The text refers to which category? What category does the title belong to? What category fits this text? What topic does this text belong to? Choose the correct category for the text. What is the emotion expressed in this message?</td></tr><tr><td>Emotion</td><td>What emotion does this message express? How will you feel about the message? What emotion does the writer express for the message? Is this tweet offensive? Can the tweet be removed for being offensive?</td></tr><tr><td>Tweet Offensive</td><td>Is the author&#x27;s tweet offensive? Task: Identify if the tweetor text is offensive. Is this an offensive tweet? The translation of the word “dog&quot;to French is“ The translation of the word dog to French is The word “dog”in French is“</td></tr><tr><td>Word-Level Translation</td><td>“dog”(In French: “ Translate the word dog into French: The translation of dog to French is “dog”(French: “ The word dog in French is Translate the word“dog”into French: “ dog (In French: dog (French: The translation of“dog”to French is “</td></tr></table>
281
+
282
+ Table 12: The 5 lowest perplexity prompts for each task, using OPT 175B.
283
+
284
+ <table><tr><td>Task</td><td>Lowest Perplexity Prompts</td><td>Perplexity</td></tr><tr><td rowspan="5">Antonyms</td><td>The following two words are antonyms:“good”and “</td><td>10.24</td></tr><tr><td>The antonym of the word“good&quot;is“</td><td>10.32</td></tr><tr><td>The word that has the opposite meaning of the word “good&quot; is “</td><td>10.43</td></tr><tr><td>The word“good”is the antithesis of the word“</td><td>10.85</td></tr><tr><td>The word “good” is the opposite of the word “</td><td>11.15</td></tr><tr><td rowspan="5">GLUE Cola</td><td>Is this an example of the proper use of the English language?</td><td>11.63</td></tr><tr><td>Does the sentence make sense and does it follow the rules of grammar?</td><td>11.76</td></tr><tr><td>Is this sentence an example of the correct use of the English language?</td><td>12.10</td></tr><tr><td>Does this sentence make sense and is it grammatically correct?</td><td>12.15</td></tr><tr><td>Is this sentence grammatically correct and does it make sense?</td><td>12.68</td></tr><tr><td rowspan="5">Newspop</td><td>What is the main subject of the article?</td><td>10.01</td></tr><tr><td>What is the main topic of the article?</td><td>10.01</td></tr><tr><td>What is the subject matter of the article?</td><td>10.17</td></tr><tr><td>What is the subject of the article?</td><td>10.21</td></tr><tr><td>What is the main idea of this article?</td><td>10.21</td></tr><tr><td rowspan="5">AG News</td><td>In what section of the newspaper would you expect to find this article?</td><td>7.51</td></tr><tr><td>In which section of the newspaper would you expect to find this article?</td><td>7.52</td></tr><tr><td>In which section of the newspaper would this article be most likely to appear?</td><td>7.60</td></tr><tr><td>In what section of the newspaper do you expect to find this article?</td><td>7.80</td></tr><tr><td>In what section of the newspaper would this article most likely appear?</td><td>7.87</td></tr><tr><td rowspan="5">IMDB</td><td>What is the opinion of the review? Is it positive or negative?</td><td>7.19</td></tr><tr><td>Is this a positive or negative review?</td><td>7.31</td></tr><tr><td>What do you think of the movie?</td><td>7.33</td></tr><tr><td>What do you think of the film?</td><td>7.35</td></tr><tr><td>Is that a positive or a negative?</td><td>7.35</td></tr><tr><td rowspan="5">DBpedia</td><td>What is the category to which the text refers?</td><td>8.99</td></tr><tr><td>What is the subject of the text?</td><td>9.15</td></tr><tr><td>What category does the title belong to?</td><td>9.18</td></tr><tr><td>Which category does the text refer to?</td><td>9.19</td></tr><tr><td>What is the subject of this text?</td><td>9.20</td></tr><tr><td rowspan="5">Emotion</td><td>How do you feel when you hear this message?</td><td>12.72</td></tr><tr><td>What is the writer&#x27;s emotional reaction to this news?</td><td>13.18</td></tr><tr><td>What is the emotion expressed in this message?</td><td>13.20</td></tr><tr><td>How does this message make you feel?</td><td>13.32</td></tr><tr><td>How do you feel about this message?</td><td>13.50</td></tr><tr><td rowspan="5">Tweet Offensive</td><td>If someone said this to you, would you be offended?</td><td>13.00</td></tr><tr><td>If someone said that to you, would you be offended?</td><td>13.10</td></tr><tr><td>Would you be offended if someone said that to you?</td><td>13.73</td></tr><tr><td>Would it offend you if someone said that to you?</td><td>14.79</td></tr><tr><td>If someone told you that, would you be offended?</td><td>14.93</td></tr><tr><td rowspan="5">Word-Level Translation</td><td>The word for“dog&quot;in French is“</td><td>7.73</td></tr><tr><td>The French word for“dog”is“</td><td>8.16</td></tr><tr><td>The French translation of the word“dog”is“</td><td>8.24</td></tr><tr><td>The translation of the word “dog”in French is “</td><td>8.35</td></tr><tr><td>The translation of the word “dog” into French is “</td><td>8.91</td></tr></table>
parse/dev/NPJznfA7ZC/NPJznfA7ZC_content_list.json ADDED
@@ -0,0 +1,1621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Demystifying Prompts in Language Models via Perplexity Estimation ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 137,
8
+ 90,
9
+ 857,
10
+ 110
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Hila Gonen1,2 Srini Iyer2 Terra Blevins1 Noah A. Smith1,3 Luke Zettlemoyer1, ",
17
+ "bbox": [
18
+ 124,
19
+ 124,
20
+ 867,
21
+ 142
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1Paul G. Allen School of Computer Science & Engineering, University of Washington 2Meta AI Research 3Allen Institute for Artificial Intelligence hilagnn@gmail.com sviyer@meta.com {blvns,nasmith,lsz}@cs.washington.edu ",
28
+ "bbox": [
29
+ 154,
30
+ 142,
31
+ 852,
32
+ 225
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 263,
42
+ 252,
43
+ 339,
44
+ 268
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Language models can be prompted to perform a wide variety of tasks with zero- and few-shot incontext learning. However, performance varies significantly with the choice of prompt, and we do not yet understand why this happens. In this paper, we analyze the factors that contribute to this variance and establish a new empirical hypothesis: the performance of a prompt is predicted by the extent to which the model is familiar with the language it contains. Over a wide range of tasks, we show that the lower the perplexity of the prompt, the better it is able to perform the task, when considering reasonable prompts that are related to it. As part of our analysis, we also devise a method to automatically extend a small seed set of manually written prompts by paraphrasing with GPT3 and backtranslation. This larger set allows us to verify that perplexity is a strong predictor of the success of a prompt and we show that the lowest perplexity prompts are consistently effective. ",
51
+ "bbox": [
52
+ 146,
53
+ 279,
54
+ 457,
55
+ 592
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 117,
65
+ 605,
66
+ 257,
67
+ 620
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Language models can be prompted to perform a wide range of zero- and few-shot learning tasks (Brown et al., 2020; Schick and Schütze, 2020). However, there is significant variance in the performance of seemingly similar prompts (Chen et al., 2022): for AG News (Zhang et al., 2015), we find an over 30 point accuracy gap between different manually curated prompts (see Table 1) on OPT 175B (Zhang et al., 2022). Despite efforts to improve prompt engineering (Shin et al., 2020; Li and Liang, 2021; Gao et al., 2021), it is still challenging to develop high-quality prompts for new tasks, and little is known about why this phenomenon occurs. ",
74
+ "bbox": [
75
+ 117,
76
+ 631,
77
+ 487,
78
+ 838
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We are interested in understanding what makes some prompts better than others, and using this understanding to create better prompts for given tasks and models. We hypothesize that the lower the perplexity of a prompt is, the better its performance on the task will be, when considering reasonable prompts that are related to the task. This is based on the intuition that the more frequently the prompt (or very similar phrases) appears in the training data, the more the model is familiar with it and is able to perform the described task. We refrain from using the training data directly as it is often unavailable, expensive to search due to its size, and hard to use for approximate matching of similar prompts. Instead, we focus on the perplexity of the prompt as a proxy for its occurrences in the data. ",
85
+ "bbox": [
86
+ 115,
87
+ 840,
88
+ 487,
89
+ 920
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/4ff36496e07000f2d3b941c7008cf5afb10d1b32105a220ab3e483f827d67b6a.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Accuracy vs. perplexity for the AG News dataset with OPT 175B. The $x$ axis is in log scale. Each point stands for a different prompt. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 517,
102
+ 256,
103
+ 870,
104
+ 425
105
+ ],
106
+ "page_idx": 0
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 512,
113
+ 516,
114
+ 882,
115
+ 692
116
+ ],
117
+ "page_idx": 0
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "To enable more complete analysis, we automatically expand the set of manually created prompts for the task by paraphrasing, resulting in a much larger and diverse set of prompts. We focus on prompts in English that reasonably describe the task for two reasons: (a) our main motivation is to understand what lies under the variance of performance in this type of prompt; (b) we aim to devise a useful method for creating prompts that are consistently effective, that could be easily adopted and interpreted by future, potentially non-expert users. ",
122
+ "bbox": [
123
+ 512,
124
+ 695,
125
+ 882,
126
+ 870
127
+ ],
128
+ "page_idx": 0
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "We show empirically that our hypothesis holds across a diverse set of tasks (including classification and word prediction), models, and model sizes, providing us some insights about the underlying mechanism of prompting (see Figure 1). As a result, we devise a method, SPELL (Selecting Prompts by Estimating LM Likelihood), for creating prompts in an informed manner. We show that using SPELL to choose prompts results in less variability in performance as well as in accuracy gains (1.8 accuracy points with OPT and 2.3 accuracy points with Bloom on average). Importantly, our method does not require labels at all, only a small sample of inputs for the task. ",
133
+ "bbox": [
134
+ 512,
135
+ 872,
136
+ 882,
137
+ 919
138
+ ],
139
+ "page_idx": 0
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "",
144
+ "bbox": [
145
+ 115,
146
+ 84,
147
+ 487,
148
+ 260
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Our contributions can be summarized as follows: (a) we formalize the notion that better familiarity of the model with the prompt correlates with better performance (Section 2); (b) we automatically elaborate a given set of seed prompts using paraphrasing (Section 3); (c) we establish experimentally the hypothesis that lower perplexity of the prompt correlates well with better performance (Section 5); (d) we devise a method to create a more consistent set of prompts, that also improve results even with no labels for the task (Section 7). ",
155
+ "bbox": [
156
+ 115,
157
+ 262,
158
+ 487,
159
+ 438
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "2 Why are prompts not all created equal? ",
166
+ "text_level": 1,
167
+ "bbox": [
168
+ 115,
169
+ 450,
170
+ 487,
171
+ 467
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Despite the popularity of prompting as a method for using language models (Shin et al., 2020; Li and Liang, 2021; Gao et al., 2021), the cause for the different behavior of various prompts remains unclear so far. Table 1 shows four example prompts for a news topic classification task (AG News) and their respective accuracies when used to prompt OPT 175B (Zhang et al., 2022). The accuracy gap between the different prompts is not trivial, and it is not possible to predict from the prompts alone. ",
178
+ "bbox": [
179
+ 117,
180
+ 476,
181
+ 485,
182
+ 637
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "table",
188
+ "img_path": "images/ea68510e63399b4380ccc0f73bc5f0646153fcf98376e15ebd683a5a241ad974.jpg",
189
+ "table_caption": [
190
+ "Table 1: Example prompts for the task AG News (news classification) that vary considerably in accuracy. "
191
+ ],
192
+ "table_footnote": [],
193
+ "table_body": "<table><tr><td>Prompt</td><td>Accuracy</td></tr><tr><td>What is this piece of news regarding?</td><td>40.9</td></tr><tr><td>What is this article about?</td><td>52.4</td></tr><tr><td>What is the best way to describe this article?</td><td>68.2</td></tr><tr><td>What is the most accurate label for this news article?</td><td>71.2</td></tr></table>",
194
+ "bbox": [
195
+ 117,
196
+ 649,
197
+ 487,
198
+ 720
199
+ ],
200
+ "page_idx": 1
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "We propose that the more frequently a prompt appears in some variation in the data, the better it works for the task. The intuition behind this is that a sequence that is more expected by the model is more likely to aid the model to extract the relevant information. However, this premise is hard to measure accurately: most language models use huge amounts of training data (e.g., OPT uses a corpus of roughly 180B tokens, and Bloom uses roughly 366B tokens), and in addition, this training data is not always publicly available (e.g., GPT3; Brown et al. 2020). Our initial attempts to estimate exact-match occurrences of prompts in the data resulted in very sparse counts, which led us to look for a softer formalization.1 ",
205
+ "bbox": [
206
+ 117,
207
+ 776,
208
+ 485,
209
+ 919
210
+ ],
211
+ "page_idx": 1
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "",
216
+ "bbox": [
217
+ 512,
218
+ 85,
219
+ 882,
220
+ 179
221
+ ],
222
+ "page_idx": 1
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "Instead of considering the training data directly, we propose to focus on the perplexity of the prompt as a proxy for its occurrences in some form in the data – essentially indicating to what extent the model expects this prompt. This perplexity-based framing helps to avoid the challenge of exact match in the data, and takes into account variations of the prompt that the model is also exposed to and might be influenced by. In addition, it helps overcome the challenges mentioned above as it requires neither access to the pretraining data (which is not always publicly available for LMs) nor matching over huge amounts of text. ",
227
+ "bbox": [
228
+ 512,
229
+ 183,
230
+ 882,
231
+ 388
232
+ ],
233
+ "page_idx": 1
234
+ },
235
+ {
236
+ "type": "text",
237
+ "text": "Hypothesis: lower perplexity correlates with better performance. We hypothesize that on average, lower-perplexity prompts perform better. We are interested in establishing this hypothesis by experimentally showing a significant negative correlation between the perplexity of the prompt and its performance on the task, across a diverse set of tasks and models. ",
238
+ "bbox": [
239
+ 512,
240
+ 399,
241
+ 882,
242
+ 526
243
+ ],
244
+ "page_idx": 1
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "We define the perplexity of the prompt as the perplexity of the full prompt sequence, including the input itself, and without the label, averaged over 1,000 examples (see Section 4 for details). The input is a part of the prompt in the case of the word prediction tasks by design (e.g., “The opposite of the word good is”). Inclusion of the task input as part of the prompt for classification tasks as well is intentional: we want to ground the prompt to the task (without the input, we are testing the hypothesis that lower perplexity prompts across all tasks work better on every task). The label is not considered a part of the prompt and is not taken into consideration when computing the prompt. In practice, this also results in a huge advantage of our method, SPELL (Section 7), which aims to find better prompts—it does not require any labels. ",
249
+ "bbox": [
250
+ 512,
251
+ 529,
252
+ 882,
253
+ 801
254
+ ],
255
+ "page_idx": 1
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "For performance measures, we use the loglikelihood score assigned by the model to the correct label given that prompt. We choose this metric over accuracy as it gives a more fine-grained distinction between prompts and because accuracy can be unstable, as explained in more detail in Section 4. For classification tasks, we also report correlation with accuracy, which is the main evaluation metric for this type of task. ",
260
+ "bbox": [
261
+ 510,
262
+ 803,
263
+ 882,
264
+ 850
265
+ ],
266
+ "page_idx": 1
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "",
271
+ "bbox": [
272
+ 115,
273
+ 85,
274
+ 487,
275
+ 180
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "3 Automatic Expansion of Seed Prompts ",
282
+ "text_level": 1,
283
+ "bbox": [
284
+ 115,
285
+ 198,
286
+ 480,
287
+ 215
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "We are interested in expanding our pool of prompts in order to: (a) have a more diverse set of prompts, making it more likely to find a better prompt for our task, and (b) support better analysis to validate our prompt quality hypothesis. In this section, we describe our method for automatically expanding a seed set of manually created prompts using paraphrasing. ",
294
+ "bbox": [
295
+ 115,
296
+ 229,
297
+ 487,
298
+ 356
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "Step 0: Creating a seed set of manually-written prompts We first write/collect a small set of human written prompts that describe the task. For classification tasks we assume that the input appears before the prompt, with no choices appearing as part of the prompt (to help in smooth paraphrasing of the prompt itself). ",
305
+ "bbox": [
306
+ 115,
307
+ 373,
308
+ 487,
309
+ 485
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Step 1: Paraphrasing with GPT3 We use the text-davinci-002 version of GPT3 (Brown et al., 2020) to generate paraphrases for each of the manual prompts in our seed set. We prompt it with a meta-prompt for paraphrasing to generate variations of one of our seed prompts. An example of such a meta-prompt is: Write a paraphrase for the following sentence: <seed prompt> Paraphrase:. The 7 meta-prompts used in this step are listed in Table 2. ",
316
+ "bbox": [
317
+ 115,
318
+ 500,
319
+ 487,
320
+ 659
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "We choose GPT3 as our paraphrasing model because of its well-documented generation abilities. This is also to ensure that there is a separation between the model we use to create the prompts and the models we use to rank them (OPT and Bloom, see Section 4 for details), to avoid confounding the experimental setup. ",
327
+ "bbox": [
328
+ 115,
329
+ 664,
330
+ 487,
331
+ 776
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "Step 2: Paraphrasing using backtranslation Our second step takes as input the paraphrases from GPT3 (in addition to the seed set of prompts) and translates them into different languages and back into English to get additional prompt paraphrases (Wieting et al., 2017). We use a set of 8 languages available in the NLLB translation model (Costajussà et al., 2022) that are relatively high resource and close to English,2 to reduce the risk of noise. Since we aim to get about 100 prompts per task, we add 8 additional languages3 in the case where the basic 8 languages yielded too few alternatives. For word prediction tasks, we use the sequence of the created prompt up to the index of the label, not including the label, for example: The word “dog” in French is “. Depending on the task, we enforce the existence of specific words (e.g., the name of the language, and the source word, in word-level translation) or enforce the prompt to be a question. ",
338
+ "bbox": [
339
+ 115,
340
+ 791,
341
+ 485,
342
+ 919
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "",
349
+ "bbox": [
350
+ 512,
351
+ 84,
352
+ 884,
353
+ 261
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "Examples and Statistics Table 4 lists all 4 manually created prompts we use for the AG News task (news classification), alongside a few sampled prompts created automatically using our method. As was typically the case, we are able to get prompts that are rather different in phrasing and structure from those included in the seed set. ",
360
+ "bbox": [
361
+ 512,
362
+ 272,
363
+ 882,
364
+ 384
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "The statistics of the prompts in the manually created seed set (Step 0) as well as the prompts after Step 1 and Step 2 for each task (see Section 4.1 for details about the tasks) are detailed in Table 3. ",
371
+ "bbox": [
372
+ 512,
373
+ 386,
374
+ 882,
375
+ 449
376
+ ],
377
+ "page_idx": 2
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "4 Experimental Setup ",
382
+ "text_level": 1,
383
+ "bbox": [
384
+ 514,
385
+ 463,
386
+ 715,
387
+ 480
388
+ ],
389
+ "page_idx": 2
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "4.1 Models, Tasks and Datasets ",
394
+ "text_level": 1,
395
+ "bbox": [
396
+ 514,
397
+ 491,
398
+ 771,
399
+ 506
400
+ ],
401
+ "page_idx": 2
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "We study four auto-regressive models: OPT (Zhang et al., 2022) of different sizes (1.3B, 30B, 175B parameters), all trained mainly on English,4 and Bloom (176B parameters; Luccioni et al. 2022), which is trained on 46 natural languages and 13 programming languages. We experiment with two types of tasks: word prediction tasks and classification tasks, as detailed below. ",
406
+ "bbox": [
407
+ 512,
408
+ 513,
409
+ 882,
410
+ 640
411
+ ],
412
+ "page_idx": 2
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "Word Prediction Tasks The first task in this category is word-level translation. Given a source word in English and a target language, we expect the model to predict the correct translation. For this task we use NorthEuraLex5 (Dellert et al., 2019), a lexical database providing translations of 1016 words into 107 languages. We experiment with 9 languages that use the Latin script. For Bloom, we use 5 additional languages that do not use the ",
417
+ "bbox": [
418
+ 510,
419
+ 652,
420
+ 882,
421
+ 796
422
+ ],
423
+ "page_idx": 2
424
+ },
425
+ {
426
+ "type": "table",
427
+ "img_path": "images/d21b84152ca0a15d718817bca473b356a29419b24ca03eb2dec7132513e6feb8.jpg",
428
+ "table_caption": [
429
+ "Table 2: Meta prompts used in Step 1 of our method for paraphrasing using GPT3. "
430
+ ],
431
+ "table_footnote": [],
432
+ "table_body": "<table><tr><td>Meta prompts</td></tr><tr><td>Write a paraphrase for the following sentence: &lt;seed-prompt&gt; Paraphrase: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a likely paraphrase of the text: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a sentence similar to the following one: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Paraphrase the following sentence: &lt;seed-prompt&gt; Paraphrase:</td></tr><tr><td>Write a variation of this sentence: &lt;seed-prompt&gt; How would you say the following sentence in a different way? &lt;seed-prompt&gt;</td></tr></table>",
433
+ "bbox": [
434
+ 200,
435
+ 83,
436
+ 796,
437
+ 227
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "table",
443
+ "img_path": "images/80ac122f9a0b4355fd95af79e2d54827e9019d8a349901617b3e349b892d64c2.jpg",
444
+ "table_caption": [
445
+ "Table 3: Number of prompts for the different tasks: prompts after step 0 (creating prompts manually), prompts after step 1 (GPT3 paraphrasing), and prompts after step 2 (backtranslation). "
446
+ ],
447
+ "table_footnote": [],
448
+ "table_body": "<table><tr><td>Task</td><td># Step 0</td><td># Step 1 # Step 2</td></tr><tr><td>Word-Level Translation</td><td>12 59</td><td>118</td></tr><tr><td>Antonyms</td><td>12 85</td><td>176</td></tr><tr><td>GLUE Cola</td><td>4 27</td><td>144</td></tr><tr><td>Newspop</td><td>13 43</td><td>119</td></tr><tr><td>AG News</td><td>4 23</td><td>108</td></tr><tr><td>IMDB</td><td>10 45</td><td>178</td></tr><tr><td>DBpedia</td><td>8 23</td><td>103</td></tr><tr><td>Emotion</td><td>4 14</td><td>94</td></tr><tr><td>Tweet Offensive</td><td>5 41</td><td>119</td></tr></table>",
449
+ "bbox": [
450
+ 121,
451
+ 275,
452
+ 485,
453
+ 422
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Latin script (since Bloom is multilingual). Note that only 5 of the languages we experiment with are officially covered by Bloom.6 ",
460
+ "bbox": [
461
+ 115,
462
+ 517,
463
+ 485,
464
+ 563
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "We also consider antonym prediction where, given a word, the model is expected to predict its antonym. For this task, we use data from Kaggle,7 which is based on WordNet (Miller, 1995). We choose 1,000 word pairs at random. ",
471
+ "bbox": [
472
+ 115,
473
+ 565,
474
+ 485,
475
+ 644
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "Classification Tasks We choose classification tasks from Huggingface Datasets,8 with an attempt to have a set of diverse tasks that use relatively short inputs, with some prompts available in PromptSource (Bach et al., 2022):9 (a) GLUE Cola (grammaticality; Warstadt et al. 2018); (b) Newspop (news classification; Moniz and Torgo 2018); (c) AG News (news classification; Zhang et al. 2015); (d) IMDB (movie review classification; Maas et al. 2011); (e) DBpedia (topic classification; Lehmann et al. 2015); (f) Emotion (classification to emotions; Saravia et al. 2018); (g) Tweet Offensive (classification to offensive vs. not offensive tweets; Barbieri et al. 2020). We use 1,000 random examples from each dataset. ",
482
+ "bbox": [
483
+ 115,
484
+ 656,
485
+ 487,
486
+ 832
487
+ ],
488
+ "page_idx": 3
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "",
493
+ "bbox": [
494
+ 510,
495
+ 279,
496
+ 882,
497
+ 342
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "The full set of manual prompts is listed in Section A in the Appendix. In these tasks, the prompt follows the input, and at the end of each prompt we add the choices of classes (i.e., we provide the possible labels explicitly in the prompt by listing the possible answers as defined by the dataset itself.): “Choices: X, Y, Z. Answer:” as we find it helps in terms of accuracy. Defining the label space likely helps in our zero-shot setting because there are no previous demonstrations from which the model can learn the possible classes. Additionally, adding class options to the prompt helps to reduce the effect of the surface form competition (Holtzman et al., 2021). The option of generating the answer and comparing it with the gold label was not reasonable here, since we cannot expect the model to generate the exact label as the first choice often enough. ",
504
+ "bbox": [
505
+ 512,
506
+ 344,
507
+ 882,
508
+ 633
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "4.2 Implementation Details ",
515
+ "text_level": 1,
516
+ "bbox": [
517
+ 514,
518
+ 652,
519
+ 739,
520
+ 667
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "In all experiments we evaluate zero-shot performance. To avoid noise when computing perplexity, we instantiate the prompts with 1,000 examples of the dataset, compute the perplexity of the prompt with each example, and calculate the average across all instantiated prompts. ",
527
+ "bbox": [
528
+ 512,
529
+ 677,
530
+ 882,
531
+ 772
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "To estimate the performance of the prompt, we look at two measures: (a) the language model score (log probability) of the correct label, averaged across 1,000 examples; (b) the accuracy on the task, computed over the 1,000 examples. To compute accuracy, for each example we score all classes and choose the highest ranking class as the prediction of the model. The score of a label of multiple tokens is defined by the sum of the token ",
538
+ "bbox": [
539
+ 512,
540
+ 776,
541
+ 882,
542
+ 919
543
+ ],
544
+ "page_idx": 3
545
+ },
546
+ {
547
+ "type": "table",
548
+ "img_path": "images/4ef2732c58de75405c34d56b0a95216e2af13aa77680db7cab619512d10bb8bd.jpg",
549
+ "table_caption": [
550
+ "Table 4: Prompts for the task AG News (news classification): the manually created prompts and a sample of automatically created prompts using our method. "
551
+ ],
552
+ "table_footnote": [],
553
+ "table_body": "<table><tr><td>All Manually Created Prompts</td><td>Examples of Similar Automatically Created Prompts</td></tr><tr><td>What label best describes this news article?</td><td>What&#x27;s the most accurate label for this news article?</td></tr><tr><td>What is this piece of news regarding? Which newspaper section would this article likely appear in?</td><td>What does this piece of news concern?</td></tr><tr><td>What topic is this news article about?</td><td>In what section of the newspaper could this article be published? What category does this article fall into?</td></tr></table>",
554
+ "bbox": [
555
+ 121,
556
+ 83,
557
+ 880,
558
+ 159
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "table",
564
+ "img_path": "images/2564a9d6aca6404d8b57aa3b0b8806b272e11caa0ac3eafaa2eacc890fd98f87.jpg",
565
+ "table_caption": [
566
+ "Table 5: Correlation results for the different tasks, with OPT (different sizes) and Bloom. Correlations with $p < 0 . 0 5$ are marked with \\*. Correlations with $p < 0 . 0 0 6 2 5$ (according to Bonferroni correction for multiple hypotheses) are marked with $^ { * * }$ . Dark and light blue colored cells stand for negative correlations $< - 0 . 2$ and $> - 0 . 2$ , respectively. Dark and light orange colored cells stand for positive correlations $> 0 . 2$ and $< 0 . 2$ , respectively. Average accuracy across all prompts and average accuracy of best $50 \\%$ prompts are also reported for reference (Avg Acc and Acc $50 \\%$ , respectively). "
567
+ ],
568
+ "table_footnote": [],
569
+ "table_body": "<table><tr><td>Model</td><td>Task</td><td colspan=\"2\">Perplexity-score corr. Pearson Spearman</td><td colspan=\"2\">Perplexity-acc corr. Pearson Spearman</td><td rowspan=\"2\"> Avg Acc</td><td rowspan=\"2\"> Acc 50%</td></tr><tr><td rowspan=\"8\">OPT175B</td><td>Antonyms</td><td>**-0.41</td><td>**-0.53</td><td></td><td></td></tr><tr><td>GLUE Cola</td><td>-0.15</td><td>-0.14</td><td>-0.04</td><td>1 -0.02</td><td>1 47.7</td><td>1 57.1</td></tr><tr><td>Newspop</td><td>*-0.24</td><td>**-0.26</td><td> *-0.20</td><td>-0.18</td><td>66.4</td><td>72.9</td></tr><tr><td>AG News</td><td>**-0.63</td><td> **-0.68</td><td> **-0.77</td><td>**-0.81</td><td>57.5</td><td>68.7</td></tr><tr><td>IMDB</td><td>**0.35</td><td>**0.40</td><td>0.14</td><td>*0.20</td><td>86.2</td><td>91.0</td></tr><tr><td>DBpedia</td><td> **-0.50</td><td>**-0.44</td><td> **-0.51</td><td>**-0.42</td><td>46.7</td><td>55.2</td></tr><tr><td>Emotion</td><td>-0.14</td><td>-0.19</td><td> **-0.30</td><td> **-0.32</td><td>16.4</td><td>23.0</td></tr><tr><td>Tweet Offensive</td><td>*-0.19</td><td>0.07</td><td>0.18</td><td>*0.23</td><td>51.3</td><td>55.8</td></tr><tr><td rowspan=\"8\">Bloom 176B</td><td>Antonyms</td><td>**-0.37</td><td>**-0.23</td><td></td><td></td><td>1</td><td>1</td></tr><tr><td>GLUE Cola</td><td>0.07</td><td>0.11</td><td>**-0.25</td><td>**-0.26</td><td>55.5</td><td>65.6</td></tr><tr><td>Newspop</td><td>**-0.50</td><td>**-0.42</td><td> **-0.59</td><td> **-0.51</td><td>78.9</td><td>87.8</td></tr><tr><td>AG News</td><td>**-0.62</td><td> **-0.54</td><td>**-0.44</td><td>**-0.44</td><td>50.3</td><td>59.4</td></tr><tr><td>IMDB</td><td>0.04</td><td>0.09</td><td>-0.08</td><td>-0.14</td><td>89.3</td><td>92.2</td></tr><tr><td>DBpedia</td><td>**-0.47</td><td> *-0.27</td><td>**-0.35</td><td>*-0.21</td><td>27.2</td><td>33.4</td></tr><tr><td>Emotion</td><td>**-0.33</td><td> **-0.42</td><td>**-0.48</td><td>**-0.55</td><td>29.3</td><td>31.7</td></tr><tr><td>Tweet Offensive</td><td>0.14</td><td>*0.24</td><td> *-0.20</td><td>-0.03</td><td>41.6</td><td>46.2</td></tr><tr><td rowspan=\"8\">OPT 30B</td><td> Antonyms</td><td> **-0.54</td><td>**-0.70</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>GLUE Cola</td><td>-0.05</td><td>0.03</td><td>-0.13</td><td>0.02</td><td>32.2</td><td>35.5</td></tr><tr><td>Newspop</td><td>*-0.23</td><td> *-0.25</td><td>*-0.18</td><td>-0.12</td><td>60.3</td><td>66.6</td></tr><tr><td>AG News</td><td>**-0.66</td><td> **-0.71</td><td> **-0.81</td><td>**-0.80</td><td>49.3</td><td>60.7</td></tr><tr><td>IMDB</td><td>-0.06</td><td>*0.17</td><td>0.04</td><td>**0.22</td><td>81.6</td><td>86.1</td></tr><tr><td>DBpedia</td><td> **-0.41</td><td> **-0.34</td><td>*-0.21</td><td>*-0.25</td><td>35.9</td><td>42.4</td></tr><tr><td>Emotion</td><td>0.00</td><td>-0.03</td><td>0.18</td><td>0.13</td><td>12.3</td><td>16.2</td></tr><tr><td>Tweet Offensive</td><td>**-0.44</td><td>**-0.39</td><td>-0.11</td><td>-0.05</td><td>54.6</td><td>60.2</td></tr><tr><td rowspan=\"8\">OPT 1.3B</td><td>Antonyms</td><td> **-0.45</td><td>**-0.53</td><td></td><td></td><td>1</td><td></td></tr><tr><td>GLUE Cola</td><td> **-0.39</td><td> **-0.36</td><td>-0.09</td><td>*-0.19</td><td>60.3</td><td>1 65.9</td></tr><tr><td>Newspop</td><td>**0.33</td><td>*0.21</td><td>-0.07</td><td>-0.07</td><td>37.6</td><td>40.3</td></tr><tr><td>AG News</td><td>**-0.33</td><td>**-0.29</td><td> **-0.56</td><td> **-0.49</td><td>31.9</td><td>37.6</td></tr><tr><td>IMDB</td><td>-0.11</td><td>-0.07</td><td>**0.24</td><td>**0.22</td><td>86.0</td><td>89.1</td></tr><tr><td>DBpedia</td><td>-0.16</td><td>-0.14</td><td>-0.02</td><td>-0.01</td><td>8.7</td><td>9.2</td></tr><tr><td>Emotion</td><td>0.08</td><td>0.08</td><td>**-0.29</td><td>**-0.30</td><td>7.0</td><td>9.1</td></tr><tr><td>Tweet Offensive</td><td>**-0.42</td><td>**-0.35</td><td> **-0.50</td><td>**-0.38</td><td>58.6</td><td>62.6</td></tr></table>",
570
+ "bbox": [
571
+ 156,
572
+ 209,
573
+ 845,
574
+ 711
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "scores. ",
581
+ "bbox": [
582
+ 117,
583
+ 834,
584
+ 168,
585
+ 845
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "For the word prediction tasks we only report scores, since accuracy in general is less stable, suffers more from the surface form competition (Holtzman et al., 2021), and is usually quite low for these tasks in our setting (the chances the model will generate an exact match of the label are low). Hence, the score of the correct label gives a better estimate of the actual performance of the model. ",
592
+ "bbox": [
593
+ 115,
594
+ 856,
595
+ 487,
596
+ 919
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "",
603
+ "bbox": [
604
+ 510,
605
+ 831,
606
+ 884,
607
+ 894
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "table",
613
+ "img_path": "images/b3cba6af752cb82670186ce9f9013f8469ef2cf9ec5f5cc7cefe20d8c12f210f.jpg",
614
+ "table_caption": [
615
+ "Table 6: Correlation results for word-level translation, with OPT 175B and Bloom 176B. All correlations are statistically significant also according to Bonferroni correction for multiple hypotheses for OPT $( p < 0 . 0 0 5 5 )$ . Same for Bloom $( p \\textless 0 . 0 0 3 5 7 )$ , except for Catalan (Pearson) and Japanese (Spearman). "
616
+ ],
617
+ "table_footnote": [],
618
+ "table_body": "<table><tr><td rowspan=\"2\">Lang</td><td colspan=\"2\">OPT175B</td><td rowspan=\"2\">Bloom 176B Pearson</td><td rowspan=\"2\">Spear.</td></tr><tr><td>Pearson</td><td>Spear.</td></tr><tr><td>ita</td><td>-0.44</td><td>-0.57</td><td>-0.37</td><td>-0.63</td></tr><tr><td>spa</td><td>-0.47</td><td>-0.61</td><td>-0.51</td><td>-0.66</td></tr><tr><td>cat</td><td>-0.47</td><td>-0.58</td><td>-0.24</td><td>-0.31</td></tr><tr><td>fra</td><td>-0.48</td><td>-0.57</td><td>-0.48</td><td>-0.64</td></tr><tr><td>deu</td><td>-0.44</td><td>-0.60</td><td>-0.46</td><td>-0.65</td></tr><tr><td>fin</td><td>-0.44</td><td>-0.62</td><td>-0.34</td><td>-0.56</td></tr><tr><td>por</td><td>-0.45</td><td>-0.62</td><td>-0.46</td><td>-0.61</td></tr><tr><td>eus</td><td>-0.47</td><td>-0.61</td><td>-0.45</td><td>-0.61</td></tr><tr><td>tur</td><td>-0.44</td><td>-0.62</td><td>-0.33</td><td>-0.62</td></tr><tr><td>jpn</td><td></td><td></td><td>-0.33</td><td>-0.26</td></tr><tr><td>arb</td><td></td><td></td><td>-0.36</td><td>-0.47</td></tr><tr><td>rus</td><td>1</td><td></td><td>-0.54</td><td>-0.69</td></tr><tr><td>kor</td><td></td><td></td><td>-0.42</td><td>-0.58</td></tr><tr><td>ell</td><td></td><td></td><td>-0.40</td><td>-0.51</td></tr></table>",
619
+ "bbox": [
620
+ 156,
621
+ 83,
622
+ 452,
623
+ 302
624
+ ],
625
+ "page_idx": 5
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "5 Results ",
630
+ "text_level": 1,
631
+ "bbox": [
632
+ 117,
633
+ 424,
634
+ 211,
635
+ 439
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "Classification Tasks and Antonym Prediction Table 5 depicts the Pearson and Spearman correlation results on the classification tasks and the antonym task, with both OPT 175B and Bloom (two upper blocks). We see that most correlations are negative and statistically significant, as we expect. This validates our hypothesis and shows that in the majority of tasks we indeed get a strong correlation between low perplexity of the prompt and better performance on the task.10 For each task we also report the average accuracy. ",
642
+ "bbox": [
643
+ 115,
644
+ 450,
645
+ 487,
646
+ 626
647
+ ],
648
+ "page_idx": 5
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Word-Level Translation The results of the wordlevel translation task are reported in Table 6. Here the correlations are extremely consistent across all languages and across models, with statistical significance for all languages except for Catalan and Japanese (in Bloom). ",
653
+ "bbox": [
654
+ 115,
655
+ 637,
656
+ 487,
657
+ 733
658
+ ],
659
+ "page_idx": 5
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "Results across Different Model Sizes We repeat the same experiment with the OPT models of sizes 1.3B and 30B, to investigate whether these correlations are also consistent across model sizes or whether this is a phenomenon we should expect only in large language models. Table 5 (two lower blocks) shows these results for all classification tasks and antonym prediction. We do see that in general the trend appears to be the same in the smaller models as well; however, the correlations seem to be slightly weaker. We hypothesize that this might be due to the overall lower performance of these smaller models, making the performance results we use for correlation less stable and reliable. For word-level translation, however, all correlations with the 30B and 1.3B models are similar to those with the 175B model, and are all statistically significant (also after Bonferroni correction for multiple hypotheses). ",
664
+ "bbox": [
665
+ 115,
666
+ 744,
667
+ 485,
668
+ 871
669
+ ],
670
+ "page_idx": 5
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "",
675
+ "bbox": [
676
+ 512,
677
+ 85,
678
+ 882,
679
+ 261
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "6 Analysis ",
686
+ "text_level": 1,
687
+ "bbox": [
688
+ 512,
689
+ 275,
690
+ 616,
691
+ 292
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Next, we further explore the observed relationship between model perplexity and prompt performance. Despite the consistently high correlation between these two factors, the structure of this relationship varies across tasks (Section 6.1). Additionally, we find that the automatically added prompts are highquality and not a significant source of noise (Section 6.2), and that the best prompts selected by our approach vary across models (Section 6.3). ",
698
+ "bbox": [
699
+ 512,
700
+ 304,
701
+ 882,
702
+ 447
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "6.1 Visualizing the Relationship between Perplexity and Performance ",
709
+ "text_level": 1,
710
+ "bbox": [
711
+ 512,
712
+ 462,
713
+ 843,
714
+ 494
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "To visualize the correlations we get between the perplexity and the performance of the prompts across the different settings, we plot a few examples for different tasks and languages. Figures 1 and 2 show some of the results for selected tasks, as detailed in the captions. The negative trend of the correlation is clearly visible in all plots. Interestingly, the structure of the plots for word-level translation are very similar across all the language pairs, suggesting that prompts get consistent perplexity and performance across languages (possibly at different scales). Indeed, the intersection of the 10 lowest perplexity prompts between any two different languages is 8.6 and 8.4 on average (for OPT 175B and Bloom, respectively), which is extremely high. This is not very surprising since we know that the only differences between the prompts in the different languages are the names of the target languages (e.g., The word for “dog” in French is “). Additionally, the intersection of 10 prompts with the highest label score between any two different languages is 7 and 6.5 on average (for OPT 175B and Bloom, respectively). ",
721
+ "bbox": [
722
+ 512,
723
+ 500,
724
+ 882,
725
+ 869
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "A notable finding that appears in the word-level translation plots is the clear separation between prompts that include or do not include quotation marks for the label (usually aligns with whether the prompt uses quotation marks for the source word) – three example prompts appear on the plot. Prompts with quotation marks for the words tend to have both lower perplexity and better performance, consistently. We further analyze the results for OPT 175B within clusters (with/without quotations marks). In the cluster with quotation marks, we get negative correlations (in the range of $- 0 . 2 8$ to –0.38) that are statistically significant for almost all languages. The correlations within the other cluster are weaker and less significant (this is expected given the overall lower performance of that cluster). ",
732
+ "bbox": [
733
+ 510,
734
+ 872,
735
+ 880,
736
+ 920
737
+ ],
738
+ "page_idx": 5
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "",
743
+ "bbox": [
744
+ 115,
745
+ 84,
746
+ 487,
747
+ 293
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "image",
753
+ "img_path": "images/75ad713163e05245c30b6d7c7488af8e438550f2577006fad2670d68d0418ccd.jpg",
754
+ "image_caption": [
755
+ "Figure 2: Score of correct label vs. perplexity for the word-level translation task in French with OPT 175B. The $x$ axis is in log scale. The blue points stand for prompts with quotation marks for the words, while the yellow points are of prompts without quotation marks. "
756
+ ],
757
+ "image_footnote": [],
758
+ "bbox": [
759
+ 119,
760
+ 311,
761
+ 473,
762
+ 488
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "6.2 Effect of Noisy Prompts ",
769
+ "text_level": 1,
770
+ "bbox": [
771
+ 117,
772
+ 606,
773
+ 347,
774
+ 620
775
+ ],
776
+ "page_idx": 6
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "We expect our automatic method for expanding the set of prompts to also introduce some noise. Though our focus is on the lower perplexity prompts, since we want to benefit from this analysis and be able to devise a method for creating better prompts, we do want to make sure that this potential noise is not the cause for the strong correlations we get. In other words, one might claim that some noisy prompts have particularly high perplexity and also perform badly, thus, supporting our hypothesis in an undesirable and uncontrolled manner. ",
781
+ "bbox": [
782
+ 115,
783
+ 629,
784
+ 487,
785
+ 821
786
+ ],
787
+ "page_idx": 6
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "We turn to inspect the $10 \\%$ highest perplexity prompts in the different tasks and find subjectively that they are not noisy, and are usually valid prompts for the tasks. The 5 highest perplexity prompts for the GLUE Cola task are listed in Table 7 as an example. ",
792
+ "bbox": [
793
+ 115,
794
+ 824,
795
+ 487,
796
+ 920
797
+ ],
798
+ "page_idx": 6
799
+ },
800
+ {
801
+ "type": "table",
802
+ "img_path": "images/0676c167016e601752cbf9cf576b41c3f00970b48aace957a068b4c8db70d3fb.jpg",
803
+ "table_caption": [
804
+ "Table 7: Example of the 5 highest perplexity prompts for GLUE Cola, using OPT 175B. "
805
+ ],
806
+ "table_footnote": [],
807
+ "table_body": "<table><tr><td>prompt</td><td>ppl</td></tr><tr><td>Is this example correct English usage?</td><td>25.79</td></tr><tr><td>Is this example using English correctly?</td><td>25.46</td></tr><tr><td>Is this example correct English?</td><td>25.33</td></tr><tr><td>Is this the example in correct English?</td><td>25.00</td></tr><tr><td>Is English in this example correct?</td><td>24.90</td></tr></table>",
808
+ "bbox": [
809
+ 547,
810
+ 82,
811
+ 852,
812
+ 173
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "table",
818
+ "img_path": "images/4939bb9ff9bdb5824103cf27fa0b652f5bf028a68c2ee989473913a65f55fb34.jpg",
819
+ "table_caption": [
820
+ "Table 8: Correlations before and after filtering out noisy prompts, with AG News and Word-Level Translation (WLT). "
821
+ ],
822
+ "table_footnote": [],
823
+ "table_body": "<table><tr><td rowspan=\"2\">Task</td><td rowspan=\"2\">Lang</td><td colspan=\"2\">Before filtering</td><td colspan=\"2\">After filtering</td></tr><tr><td>Pearson</td><td>Spearman</td><td>Pearson</td><td>Spearman</td></tr><tr><td>AG News</td><td>-</td><td>-0.63</td><td>-0.68</td><td>-0.62</td><td>-0.54</td></tr><tr><td rowspan=\"9\">WLT</td><td>ita</td><td>-0.44</td><td>-0.58</td><td>-0.44</td><td>-0.57</td></tr><tr><td>spa</td><td>-0.47</td><td>-0.61</td><td>-0.47</td><td>-0.61</td></tr><tr><td>cat</td><td>-0.45</td><td>-0.57</td><td>-0.47</td><td>-0.58</td></tr><tr><td>fra</td><td>-0.47</td><td>-0.57</td><td>-0.48</td><td>-0.57</td></tr><tr><td>deu</td><td>-0.43</td><td>-0.60</td><td>-0.44</td><td>-0.60</td></tr><tr><td>fin</td><td>-0.41</td><td>-0.60</td><td>-0.44</td><td>-0.62</td></tr><tr><td>por</td><td>-0.43</td><td>-0.61</td><td>-0.45</td><td>-0.62</td></tr><tr><td>eus</td><td>-0.45</td><td>-0.60</td><td>-0.47</td><td>-0.61</td></tr><tr><td>tur</td><td>-0.43</td><td>-0.61</td><td>-0.44</td><td>-0.62</td></tr></table>",
824
+ "bbox": [
825
+ 514,
826
+ 227,
827
+ 882,
828
+ 374
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "As a sanity check, we choose two tasks: wordlevel translation and AG News, manually filter out the noisy prompts, and compute the correlations again. The annotation is done by external annotators (NLP researchers) that were presented with the tasks and asked to label whether the prompt is reasonable to use for the task. The new correlations with OPT 175B are reported in Table 8. We find that all correlations remain strong and statistically significant when noise is manually removed from the analysis. We get the same trends with Bloom as well. ",
835
+ "bbox": [
836
+ 512,
837
+ 455,
838
+ 882,
839
+ 646
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "6.3 Best Performing Prompts ",
846
+ "text_level": 1,
847
+ "bbox": [
848
+ 512,
849
+ 659,
850
+ 756,
851
+ 675
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Table 9 lists the 5 lowest perplexity prompts for the task of antonym prediction, as an example. Similar lists for the rest of the tasks are listed in Section B in the Appendix. ",
858
+ "bbox": [
859
+ 510,
860
+ 682,
861
+ 880,
862
+ 745
863
+ ],
864
+ "page_idx": 6
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "A closer look at the lowest perplexity prompts reveals that the intersection of 10 lowest perplexity prompts between OPT 175B and Bloom is 7.1 on average, across the classification tasks. When looking at the 10 highest accuracy prompts across models we get an average intersection of 3.1 across the classification tasks. ",
869
+ "bbox": [
870
+ 512,
871
+ 747,
872
+ 882,
873
+ 777
874
+ ],
875
+ "page_idx": 6
876
+ },
877
+ {
878
+ "type": "table",
879
+ "img_path": "images/8a34ea5b354451180d9db62eda8e50dbc7cce6d832a3d346f164a1dd2489bb33.jpg",
880
+ "table_caption": [
881
+ "Table 9: Lowest perplexity prompts for the antonym prediction task, using OPT 175B. "
882
+ ],
883
+ "table_footnote": [],
884
+ "table_body": "<table><tr><td>prompt</td><td>ppl</td></tr><tr><td>The following two words are antonyms:“good&quot;and “</td><td>10.24</td></tr><tr><td>The antonym of the word“good’is“</td><td>10.32</td></tr><tr><td>The word that has the opposite meaning of the word “good&quot;is “</td><td>10.43</td></tr><tr><td>The word“good’is the antithesis of the word “</td><td>10.85</td></tr><tr><td>The word “good&quot;is the opposite of the word “</td><td>11.15</td></tr></table>",
885
+ "bbox": [
886
+ 514,
887
+ 800,
888
+ 882,
889
+ 877
890
+ ],
891
+ "page_idx": 6
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "",
896
+ "bbox": [
897
+ 115,
898
+ 84,
899
+ 487,
900
+ 164
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "7 SPELL: Selecting Prompts by Estimating LM Likelihood ",
907
+ "text_level": 1,
908
+ "bbox": [
909
+ 115,
910
+ 178,
911
+ 410,
912
+ 211
913
+ ],
914
+ "page_idx": 7
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "The primary contribution of this work is the analysis of the relationship between prompt perplexity and downstream task performance (Section 5). As one potential application of our findings, we also present a new method, SPELL, for generating and selecting consistently effective prompts. ",
919
+ "bbox": [
920
+ 115,
921
+ 222,
922
+ 487,
923
+ 318
924
+ ],
925
+ "page_idx": 7
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "Assuming a fixed computational budget for finding effective prompts for a given task, and that the search space might be quite large, we devise the following straightforward procedure: ",
930
+ "bbox": [
931
+ 115,
932
+ 321,
933
+ 487,
934
+ 384
935
+ ],
936
+ "page_idx": 7
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "1. Obtain a small set of manually created prompts for the task. \n2. Expand the set of prompts with automatic paraphrasing using a LM (e.g., GPT3) and backtranslation (see Section 3). \n3. Rank the list of prompts by perplexity (averaged on a representative sample of task inputs, e.g., 1,000). \n4. Choose the $k$ (e.g., 3) lowest perplexity prompts. ",
941
+ "bbox": [
942
+ 131,
943
+ 399,
944
+ 487,
945
+ 580
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Using this algorithm, we show empirically that it is best to prioritize experimenting with the lowest perplexity prompts, as they are more stable (exhibit less variation in performance) and perform better than manual prompts on average. This method also does not require any labels for the task, and is applicable to any task, also by non-experts, given example inputs only. ",
952
+ "bbox": [
953
+ 117,
954
+ 595,
955
+ 485,
956
+ 724
957
+ ],
958
+ "page_idx": 7
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "7.1 Empirical Validation of SPELL ",
963
+ "text_level": 1,
964
+ "bbox": [
965
+ 117,
966
+ 737,
967
+ 408,
968
+ 752
969
+ ],
970
+ "page_idx": 7
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "To show the effectiveness of our method, we report the results we get using SPELL across the different tasks. In Table 10 we report the average accuracy with the manual prompts compared to the average accuracy with the 3 lowest-perplexity prompts, for both OPT 175B and Bloom. Indeed, in most cases, the average accuracy using the 3 lowest perplexity prompts outperforms the average accuracy of the manual prompts, with an average of 1.8 accuracy points across tasks with OPT and 2.3 accuracy points with Bloom, demonstrating the effectiveness of our method. ",
975
+ "bbox": [
976
+ 115,
977
+ 759,
978
+ 487,
979
+ 919
980
+ ],
981
+ "page_idx": 7
982
+ },
983
+ {
984
+ "type": "table",
985
+ "img_path": "images/f413625d6c4e09e95cee13f18621cc7605e4ba78b2045a51a59caa4f433489b6.jpg",
986
+ "table_caption": [
987
+ "Table 10: The average accuracy with the manual prompts (manual) compared to the average accuracy with the 3 lowest-perplexity prompts (low-ppl), for both OPT 175B and Bloom, across tasks. "
988
+ ],
989
+ "table_footnote": [],
990
+ "table_body": "<table><tr><td></td><td colspan=\"3\">OPT</td><td colspan=\"3\">Bloom</td></tr><tr><td>Task</td><td>low-ppl</td><td>manual</td><td>△</td><td>low-ppl</td><td>manual</td><td>△</td></tr><tr><td>GLUE Cola</td><td>51.7</td><td>48.5</td><td>3.1</td><td>64.5</td><td>60.9</td><td>3.6</td></tr><tr><td>Newspop</td><td>80.6</td><td>70.4</td><td>10.2</td><td>90.0</td><td>80.0</td><td>10.0</td></tr><tr><td>AG News</td><td>68.4</td><td>61.9</td><td>6.5</td><td>51.0</td><td>63.5</td><td>-12.5</td></tr><tr><td>IMDB</td><td>90.4</td><td>88.9</td><td>1.4</td><td>91.3</td><td>88.8</td><td>2.5</td></tr><tr><td>DBpedia</td><td>46.0</td><td>51.7</td><td>-5.7</td><td>31.2</td><td>30.2</td><td>1.0</td></tr><tr><td>Emotion</td><td>21.6</td><td>22.6</td><td>-1.1</td><td>35.8</td><td>32.1</td><td>3.6</td></tr><tr><td>Tweet Offensive</td><td>48.4</td><td>50.6</td><td>-2.3</td><td>48.6</td><td>40.8</td><td>7.8</td></tr></table>",
991
+ "bbox": [
992
+ 514,
993
+ 83,
994
+ 880,
995
+ 189
996
+ ],
997
+ "page_idx": 7
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "",
1002
+ "bbox": [
1003
+ 510,
1004
+ 285,
1005
+ 880,
1006
+ 315
1007
+ ],
1008
+ "page_idx": 7
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "The variability in accuracy of the 3 lowest perplexity prompts is also much lower than that of the manually created prompts: with OPT 175B, the average standard deviation within the 3 lowest perplexity prompts (across tasks) is 5.07, vs. 6.86 for the manual prompts, and with Bloom the gap is much bigger, with an average of 2.6 for the 3 lowest perplexity prompts vs. 7.47 for the manual ones.11 This further shows that SPELL is more stable and reliable compared to using an arbitrary set of manually created prompts. SPELL sets the stage for further development in this direction, and serves as an initial indication of the benefits of involving perplexity estimation in the process of generating effective prompts. ",
1013
+ "bbox": [
1014
+ 512,
1015
+ 317,
1016
+ 882,
1017
+ 558
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "8 Related Work ",
1024
+ "text_level": 1,
1025
+ "bbox": [
1026
+ 512,
1027
+ 573,
1028
+ 663,
1029
+ 589
1030
+ ],
1031
+ "page_idx": 7
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Relation between performance and training data Previous work looking directly into the relation between the training data and the performance is limited. Razeghi et al. (2022) study numeric deduction tasks, and examine the correlations between the model performance on specific test instances and the frequency of terms from those instances in the pretraining data. They find that the models are more accurate on instances whose terms are more prevalent in the training data. Additionally, Han and Tsvetkov (2022) propose a method to effectively identify a very small subset of pretraining data that directly supports the model in performing a specific task. Elazar et al. (2022) use causal inference to measure the effect of pretraining data statistics on factual knowledge performance, and ",
1036
+ "bbox": [
1037
+ 510,
1038
+ 601,
1039
+ 884,
1040
+ 858
1041
+ ],
1042
+ "page_idx": 7
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Kandpal et al. (2022) show correlational and causal relationships between accuracy and relevant document count (from training data) for QA datasets. ",
1047
+ "bbox": [
1048
+ 115,
1049
+ 85,
1050
+ 487,
1051
+ 131
1052
+ ],
1053
+ "page_idx": 8
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "Prompt tuning and analysis There is a very rich line of work trying to find prompts automatically. Shin et al. (2020) present an automated method to create discrete prompts for a diverse set of tasks, based on a gradient-guided search, and they demonstrate their method on masked LMs. Other work also focuses on discrete prompts, aiming to improve zero-shot performance (Gao et al., 2021; Le Scao and Rush, 2021; Deng et al., 2022; Shi et al., 2022), or trains continuous prompts (Li and Liang, 2021; Lester et al., 2021; Qin and Eisner, 2021). ",
1058
+ "bbox": [
1059
+ 115,
1060
+ 152,
1061
+ 487,
1062
+ 343
1063
+ ],
1064
+ "page_idx": 8
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "On top of works that suggest a variety of methods for creating better prompts, some work also analyzes those prompts to try and get some insights about them: Khashabi et al. (2022a) find that model performance is highly sensitive to small changes in wordings and Khashabi et al. (2022b) point to a surprising disconnect between continuous and discrete prompts. ",
1069
+ "bbox": [
1070
+ 115,
1071
+ 348,
1072
+ 485,
1073
+ 475
1074
+ ],
1075
+ "page_idx": 8
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Limitations ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 512,
1083
+ 84,
1084
+ 613,
1085
+ 99
1086
+ ],
1087
+ "page_idx": 8
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Searching for human-readable prompts We limit our search space to human-readable prompts that are fluent and accurately describe the task at hand, as we are primarily motivated in understanding why some relevant prompts work better than others. We do this by using manually created prompts and their automatically created paraphrases. Our findings may not hold when the possible prompt space is expanded to include any token sequence; we leave this direction to future work. ",
1092
+ "bbox": [
1093
+ 512,
1094
+ 110,
1095
+ 882,
1096
+ 269
1097
+ ],
1098
+ "page_idx": 8
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Generality of our analysis and of the SPELL method We perform our analysis on and build our method around specific models, namely OPT and Bloom. Additionally, our study is limited to the specific tasks we experiment with and to English. It is possible that our analysis and SPELL method do not generalize to other pretrained models or tasks; however, we consider models of various sizes and from different sources, and a wide range of tasks to mitigate this risk. ",
1103
+ "bbox": [
1104
+ 512,
1105
+ 281,
1106
+ 882,
1107
+ 441
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Acknowledgements ",
1114
+ "text_level": 1,
1115
+ "bbox": [
1116
+ 514,
1117
+ 455,
1118
+ 680,
1119
+ 470
1120
+ ],
1121
+ "page_idx": 8
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "We thank Alisa Liu and Orevaoghene Ahia for their help in annotating noisy prompts. We also thank the reviewers for their valuable comments on the paper. ",
1126
+ "bbox": [
1127
+ 512,
1128
+ 481,
1129
+ 880,
1130
+ 543
1131
+ ],
1132
+ "page_idx": 8
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "9 Conclusion ",
1137
+ "text_level": 1,
1138
+ "bbox": [
1139
+ 115,
1140
+ 498,
1141
+ 243,
1142
+ 513
1143
+ ],
1144
+ "page_idx": 8
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "We investigate the phenomenon where some prompts perform better than others despite appearing similar to the human users of LMs. Specifically, we hypothesize that the perplexity of a prompt under a given LM is closely tied to its task performance. We test this theory on a large number of tasks and autoregressive LMs, and the resulting correlation study validates our hypothesis. Further analysis of this relationship demonstrates that the best prompts differ across models, highlighting the importance of model-specific analysis, and that the underlying structure of the relationship between perplexity and performance varies across tasks. ",
1149
+ "bbox": [
1150
+ 117,
1151
+ 532,
1152
+ 487,
1153
+ 739
1154
+ ],
1155
+ "page_idx": 8
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "In light of these findings, we then propose a method, SPELL, to help users find wellperforming prompts for new tasks. Empirical validation of the proposed procedure shows that SPELL generates effective prompts with low variability in performance, and produces small gains of 1.8 (2.3) accuracy points with OPT (Bloom) over manual prompts. We therefore conclude that SPELL provides a general and interpretable approach for applying LMs to new tasks while requiring minimal human effort, and no labels. ",
1160
+ "bbox": [
1161
+ 117,
1162
+ 744,
1163
+ 487,
1164
+ 919
1165
+ ],
1166
+ "page_idx": 8
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "References ",
1171
+ "text_level": 1,
1172
+ "bbox": [
1173
+ 514,
1174
+ 573,
1175
+ 606,
1176
+ 588
1177
+ ],
1178
+ "page_idx": 8
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Stephen H. Bach, Victor Sanh, Zheng-Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-David, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Alan Fries, Maged S. Al-shaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Xiangru Tang, Mike Tian-Jian Jiang, and Alexander M. Rush. 2022. Promptsource: An integrated development environment and repository for natural language prompts. ",
1183
+ "bbox": [
1184
+ 512,
1185
+ 595,
1186
+ 882,
1187
+ 752
1188
+ ],
1189
+ "page_idx": 8
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Francesco Barbieri, Jose Camacho-Collados, Luis Espinosa-Anke, and Leonardo Neves. 2020. TweetEval:Unified Benchmark and Comparative Evaluation for Tweet Classification. In Proceedings of Findings of EMNLP. ",
1194
+ "bbox": [
1195
+ 510,
1196
+ 764,
1197
+ 882,
1198
+ 828
1199
+ ],
1200
+ "page_idx": 8
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901. ",
1205
+ "bbox": [
1206
+ 512,
1207
+ 840,
1208
+ 880,
1209
+ 917
1210
+ ],
1211
+ "page_idx": 8
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Yanda Chen, Chen Zhao, Zhou Yu, Kathleen McKeown, and He He. 2022. On the relation between sensitivity and accuracy in in-context learning. arXiv e-prints, pages arXiv–2209. ",
1216
+ "bbox": [
1217
+ 117,
1218
+ 86,
1219
+ 487,
1220
+ 139
1221
+ ],
1222
+ "page_idx": 9
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Marta R Costa-jussà, James Cross, Onur Çelebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672. ",
1227
+ "bbox": [
1228
+ 117,
1229
+ 148,
1230
+ 485,
1231
+ 225
1232
+ ],
1233
+ "page_idx": 9
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "Johannes Dellert, Thora Daneyko, Alla Münch, Alina Ladygina, Armin Buch, Natalie Clarius, Ilja Grigorjew, Mohamed Balabel, Hizniye Isabella Boga, Zalina Baysarova, et al. 2019. Northeuralex: a widecoverage lexical database of northern eurasia. Language Resources and Evaluation, pages 1–29. ",
1238
+ "bbox": [
1239
+ 117,
1240
+ 236,
1241
+ 487,
1242
+ 316
1243
+ ],
1244
+ "page_idx": 9
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric P Xing, and Zhiting Hu. 2022. Rlprompt: Optimizing discrete text prompts with reinforcement learning. arXiv preprint arXiv:2205.12548. ",
1249
+ "bbox": [
1250
+ 115,
1251
+ 325,
1252
+ 487,
1253
+ 391
1254
+ ],
1255
+ "page_idx": 9
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Yanai Elazar, Nora Kassner, Shauli Ravfogel, Amir Feder, Abhilasha Ravichander, Marius Mosbach, Yonatan Belinkov, Hinrich Schütze, and Yoav Goldberg. 2022. Measuring causal effects of data statistics on language model’sfactual’predictions. arXiv preprint arXiv:2207.14251. ",
1260
+ "bbox": [
1261
+ 117,
1262
+ 400,
1263
+ 487,
1264
+ 479
1265
+ ],
1266
+ "page_idx": 9
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 3816–3830. ",
1271
+ "bbox": [
1272
+ 117,
1273
+ 489,
1274
+ 487,
1275
+ 580
1276
+ ],
1277
+ "page_idx": 9
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Xiaochuang Han and Yulia Tsvetkov. 2022. Orca: Interpreting prompted language models via locating supporting data evidence in the ocean of pretraining data. arXiv preprint arXiv:2205.12600. ",
1282
+ "bbox": [
1283
+ 115,
1284
+ 590,
1285
+ 487,
1286
+ 643
1287
+ ],
1288
+ "page_idx": 9
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "Ari Holtzman, Peter West, Vered Shwartz, Yejin Choi, and Luke Zettlemoyer. 2021. Surface form competition: Why the highest probability answer isn’t always right. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7038–7051. ",
1293
+ "bbox": [
1294
+ 117,
1295
+ 653,
1296
+ 487,
1297
+ 731
1298
+ ],
1299
+ "page_idx": 9
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Nikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace, and Colin Raffel. 2022. Large language models struggle to learn long-tail knowledge. arXiv preprint arXiv:2211.08411. ",
1304
+ "bbox": [
1305
+ 115,
1306
+ 741,
1307
+ 485,
1308
+ 794
1309
+ ],
1310
+ "page_idx": 9
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "Daniel Khashabi, Chitta Baral, Yejin Choi, and Hannaneh Hajishirzi. 2022a. Reframing instructional prompts to gptk’s language. In Findings of the Association for Computational Linguistics: ACL 2022, pages 589–612. ",
1315
+ "bbox": [
1316
+ 115,
1317
+ 803,
1318
+ 487,
1319
+ 869
1320
+ ],
1321
+ "page_idx": 9
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Daniel Khashabi, Xinxi Lyu, Sewon Min, Lianhui Qin, Kyle Richardson, Sean Welleck, Hannaneh Hajishirzi, Tushar Khot, Ashish Sabharwal, Sameer ",
1326
+ "bbox": [
1327
+ 115,
1328
+ 879,
1329
+ 487,
1330
+ 919
1331
+ ],
1332
+ "page_idx": 9
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "Singh, and Yejin Choi. 2022b. Prompt waywardness: The curious case of discretized interpretation of continuous prompts. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. ",
1337
+ "bbox": [
1338
+ 529,
1339
+ 86,
1340
+ 882,
1341
+ 165
1342
+ ],
1343
+ "page_idx": 9
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "Teven Le Scao and Alexander Rush. 2021. How many data points is a prompt worth? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics. ",
1348
+ "bbox": [
1349
+ 514,
1350
+ 174,
1351
+ 882,
1352
+ 253
1353
+ ],
1354
+ "page_idx": 9
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick Van Kleef, Sören Auer, et al. 2015. Dbpedia–a large-scale, multilingual knowledge base extracted from wikipedia. Semantic web, 6(2):167–195. ",
1359
+ "bbox": [
1360
+ 512,
1361
+ 263,
1362
+ 882,
1363
+ 341
1364
+ ],
1365
+ "page_idx": 9
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045–3059. ",
1370
+ "bbox": [
1371
+ 510,
1372
+ 351,
1373
+ 882,
1374
+ 417
1375
+ ],
1376
+ "page_idx": 9
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582– 4597. ",
1381
+ "bbox": [
1382
+ 512,
1383
+ 426,
1384
+ 882,
1385
+ 517
1386
+ ],
1387
+ "page_idx": 9
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "Alexandra Sasha Luccioni, Sylvain Viguier, and AnneLaure Ligozat. 2022. Estimating the carbon footprint of bloom, a 176b parameter language model. arXiv preprint arXiv:2211.02001. ",
1392
+ "bbox": [
1393
+ 512,
1394
+ 529,
1395
+ 882,
1396
+ 580
1397
+ ],
1398
+ "page_idx": 9
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics. ",
1403
+ "bbox": [
1404
+ 510,
1405
+ 590,
1406
+ 882,
1407
+ 695
1408
+ ],
1409
+ "page_idx": 9
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "George A Miller. 1995. Wordnet: a lexical database for english. Communications of the ACM, 38(11):39–41. ",
1414
+ "bbox": [
1415
+ 510,
1416
+ 705,
1417
+ 882,
1418
+ 732
1419
+ ],
1420
+ "page_idx": 9
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "N. Moniz and L. Torgo. 2018. Multi-source social feedback of online news feeds. ArXiv, abs/1801.07055. ",
1425
+ "bbox": [
1426
+ 510,
1427
+ 741,
1428
+ 882,
1429
+ 768
1430
+ ],
1431
+ "page_idx": 9
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "Guanghui Qin and Jason Eisner. 2021. Learning how to ask: Querying lms with mixtures of soft prompts. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5203–5212. ",
1436
+ "bbox": [
1437
+ 512,
1438
+ 777,
1439
+ 882,
1440
+ 857
1441
+ ],
1442
+ "page_idx": 9
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. 2022. Impact of pretraining term frequencies on few-shot reasoning. arXiv preprint arXiv:2202.07206. ",
1447
+ "bbox": [
1448
+ 510,
1449
+ 866,
1450
+ 882,
1451
+ 917
1452
+ ],
1453
+ "page_idx": 9
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "Elvis Saravia, Hsien-Chi Toby Liu, Yen-Hao Huang, Junlin Wu, and Yi-Shin Chen. 2018. CARER: Contextualized affect representations for emotion recognition. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3687–3697, Brussels, Belgium. Association for Computational Linguistics. ",
1458
+ "bbox": [
1459
+ 117,
1460
+ 85,
1461
+ 487,
1462
+ 177
1463
+ ],
1464
+ "page_idx": 10
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "Timo Schick and Hinrich Schütze. 2020. It’s not just size that matters: Small language models are also few-shot learners. arXiv preprint arXiv:2009.07118. ",
1469
+ "bbox": [
1470
+ 115,
1471
+ 187,
1472
+ 487,
1473
+ 227
1474
+ ],
1475
+ "page_idx": 10
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "Weijia Shi, Xiaochuang Han, Hila Gonen, Ari Holtzman, Yulia Tsvetkov, and Luke Zettlemoyer. 2022. Toward human readable prompt tuning: Kubrick’s the shining is a good movie, and a good prompt too? arXiv preprint arXiv:2212.10539. ",
1480
+ "bbox": [
1481
+ 115,
1482
+ 237,
1483
+ 487,
1484
+ 303
1485
+ ],
1486
+ "page_idx": 10
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. 2020. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980. ",
1491
+ "bbox": [
1492
+ 117,
1493
+ 313,
1494
+ 487,
1495
+ 378
1496
+ ],
1497
+ "page_idx": 10
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2018. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471. ",
1502
+ "bbox": [
1503
+ 115,
1504
+ 388,
1505
+ 487,
1506
+ 429
1507
+ ],
1508
+ "page_idx": 10
1509
+ },
1510
+ {
1511
+ "type": "text",
1512
+ "text": "John Wieting, Jonathan Mallinson, and Kevin Gimpel. 2017. Learning paraphrastic sentence embeddings from back-translated bitext. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 274–285. ",
1513
+ "bbox": [
1514
+ 115,
1515
+ 438,
1516
+ 487,
1517
+ 505
1518
+ ],
1519
+ "page_idx": 10
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068. ",
1524
+ "bbox": [
1525
+ 115,
1526
+ 514,
1527
+ 487,
1528
+ 580
1529
+ ],
1530
+ "page_idx": 10
1531
+ },
1532
+ {
1533
+ "type": "text",
1534
+ "text": "Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In NIPS. ",
1535
+ "bbox": [
1536
+ 115,
1537
+ 590,
1538
+ 487,
1539
+ 630
1540
+ ],
1541
+ "page_idx": 10
1542
+ },
1543
+ {
1544
+ "type": "text",
1545
+ "text": "A Manually Created Prompts ",
1546
+ "text_level": 1,
1547
+ "bbox": [
1548
+ 117,
1549
+ 643,
1550
+ 388,
1551
+ 659
1552
+ ],
1553
+ "page_idx": 10
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "Table 11 lists the manually created prompts we use for the different tasks. We manually add, remove and edit prompts for some of these tasks, to make them fit for our setting. For example, the following prompt for AG News, taken from Promptsource, does not fit our setting: Would you recommend the following article to a politician, an athlete, business executive, or a scientist? ",
1558
+ "bbox": [
1559
+ 115,
1560
+ 669,
1561
+ 487,
1562
+ 795
1563
+ ],
1564
+ "page_idx": 10
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "B Lowest Perplexity Prompts ",
1569
+ "text_level": 1,
1570
+ "bbox": [
1571
+ 117,
1572
+ 808,
1573
+ 384,
1574
+ 825
1575
+ ],
1576
+ "page_idx": 10
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "Table 12 lists the 5 lowest perplexity prompts for each task, using OPT 175B. ",
1581
+ "bbox": [
1582
+ 115,
1583
+ 835,
1584
+ 485,
1585
+ 866
1586
+ ],
1587
+ "page_idx": 10
1588
+ },
1589
+ {
1590
+ "type": "table",
1591
+ "img_path": "images/612ece7565d834a2a16a0597f73565c3c5e8c306e876beb3cc91113f8998a7b1.jpg",
1592
+ "table_caption": [
1593
+ "Table 11: The set of manually created prompts for each task. "
1594
+ ],
1595
+ "table_footnote": [],
1596
+ "table_body": "<table><tr><td>Task Manual Prompts</td><td></td></tr><tr><td>Antonyms</td><td>The antonym of the word “good”is“ The opposite meaning of the word “good”is “ “Good”is the opposite of“ “Good”is the negation of“ The following are opposites of each other:“good&quot;and “ The word “good&quot;contradicts the word “ The antonym of the word good is The opposite meaning of the word good is Good is the opposite of</td></tr><tr><td>GLUE Cola</td><td>The following are opposites of each other: good and The word good contradicts the word Does the this sentence make sense and use correct English? Is this example grammatically correct and sensible? Does this sentence make sense and is it grammatically correct?</td></tr><tr><td>Newspop</td><td>Does this example use correct English? What is the article about? What is this news about? What is the topic of this news piece? What does this article discuss? What is the topic of this sentence? What category does the article belong to? Pick one category forthis news piece. Pick the category that fits the text. The article refers to which category? What topic does the article belong to? What category fits this article? What topic does this news piece belong to? Choose the correct category for this article.</td></tr><tr><td>AG News</td><td>What label best describes this news article? What is this piece of news regarding? Which newspaper section would this article likely appear in? What topic is this news article about? This movie review expresses what sentiment? Did the reviewer find this movie good or bad?</td></tr><tr><td>IMDB</td><td>Is this review positive or negative? How does the viewer feel about the movie? What sentiment does the writer express for the movie? What sentiment is expressed for the movie? What is the sentiment expressed in this text? Did the reviewer enjoy the movie? What is the sentiment expressed by the reviewer for the movie? How does the reviewer feel about the movie? What category does the paragraph belong to? Pick one category for the text.</td></tr><tr><td>DBpedia</td><td>Pick the category that fits the text. The text refers to which category? What category does the title belong to? What category fits this text? What topic does this text belong to? Choose the correct category for the text. What is the emotion expressed in this message?</td></tr><tr><td>Emotion</td><td>What emotion does this message express? How will you feel about the message? What emotion does the writer express for the message? Is this tweet offensive? Can the tweet be removed for being offensive?</td></tr><tr><td>Tweet Offensive</td><td>Is the author&#x27;s tweet offensive? Task: Identify if the tweetor text is offensive. Is this an offensive tweet? The translation of the word “dog&quot;to French is“ The translation of the word dog to French is The word “dog”in French is“</td></tr><tr><td>Word-Level Translation</td><td>“dog”(In French: “ Translate the word dog into French: The translation of dog to French is “dog”(French: “ The word dog in French is Translate the word“dog”into French: “ dog (In French: dog (French: The translation of“dog”to French is “</td></tr></table>",
1597
+ "bbox": [
1598
+ 275,
1599
+ 71,
1600
+ 727,
1601
+ 906
1602
+ ],
1603
+ "page_idx": 11
1604
+ },
1605
+ {
1606
+ "type": "table",
1607
+ "img_path": "images/45d19f9d0823cbb9eeb63ab25dd750b457ac6ef2d6939218d35ded145a99986c.jpg",
1608
+ "table_caption": [
1609
+ "Table 12: The 5 lowest perplexity prompts for each task, using OPT 175B. "
1610
+ ],
1611
+ "table_footnote": [],
1612
+ "table_body": "<table><tr><td>Task</td><td>Lowest Perplexity Prompts</td><td>Perplexity</td></tr><tr><td rowspan=\"5\">Antonyms</td><td>The following two words are antonyms:“good”and “</td><td>10.24</td></tr><tr><td>The antonym of the word“good&quot;is“</td><td>10.32</td></tr><tr><td>The word that has the opposite meaning of the word “good&quot; is “</td><td>10.43</td></tr><tr><td>The word“good”is the antithesis of the word“</td><td>10.85</td></tr><tr><td>The word “good” is the opposite of the word “</td><td>11.15</td></tr><tr><td rowspan=\"5\">GLUE Cola</td><td>Is this an example of the proper use of the English language?</td><td>11.63</td></tr><tr><td>Does the sentence make sense and does it follow the rules of grammar?</td><td>11.76</td></tr><tr><td>Is this sentence an example of the correct use of the English language?</td><td>12.10</td></tr><tr><td>Does this sentence make sense and is it grammatically correct?</td><td>12.15</td></tr><tr><td>Is this sentence grammatically correct and does it make sense?</td><td>12.68</td></tr><tr><td rowspan=\"5\">Newspop</td><td>What is the main subject of the article?</td><td>10.01</td></tr><tr><td>What is the main topic of the article?</td><td>10.01</td></tr><tr><td>What is the subject matter of the article?</td><td>10.17</td></tr><tr><td>What is the subject of the article?</td><td>10.21</td></tr><tr><td>What is the main idea of this article?</td><td>10.21</td></tr><tr><td rowspan=\"5\">AG News</td><td>In what section of the newspaper would you expect to find this article?</td><td>7.51</td></tr><tr><td>In which section of the newspaper would you expect to find this article?</td><td>7.52</td></tr><tr><td>In which section of the newspaper would this article be most likely to appear?</td><td>7.60</td></tr><tr><td>In what section of the newspaper do you expect to find this article?</td><td>7.80</td></tr><tr><td>In what section of the newspaper would this article most likely appear?</td><td>7.87</td></tr><tr><td rowspan=\"5\">IMDB</td><td>What is the opinion of the review? Is it positive or negative?</td><td>7.19</td></tr><tr><td>Is this a positive or negative review?</td><td>7.31</td></tr><tr><td>What do you think of the movie?</td><td>7.33</td></tr><tr><td>What do you think of the film?</td><td>7.35</td></tr><tr><td>Is that a positive or a negative?</td><td>7.35</td></tr><tr><td rowspan=\"5\">DBpedia</td><td>What is the category to which the text refers?</td><td>8.99</td></tr><tr><td>What is the subject of the text?</td><td>9.15</td></tr><tr><td>What category does the title belong to?</td><td>9.18</td></tr><tr><td>Which category does the text refer to?</td><td>9.19</td></tr><tr><td>What is the subject of this text?</td><td>9.20</td></tr><tr><td rowspan=\"5\">Emotion</td><td>How do you feel when you hear this message?</td><td>12.72</td></tr><tr><td>What is the writer&#x27;s emotional reaction to this news?</td><td>13.18</td></tr><tr><td>What is the emotion expressed in this message?</td><td>13.20</td></tr><tr><td>How does this message make you feel?</td><td>13.32</td></tr><tr><td>How do you feel about this message?</td><td>13.50</td></tr><tr><td rowspan=\"5\">Tweet Offensive</td><td>If someone said this to you, would you be offended?</td><td>13.00</td></tr><tr><td>If someone said that to you, would you be offended?</td><td>13.10</td></tr><tr><td>Would you be offended if someone said that to you?</td><td>13.73</td></tr><tr><td>Would it offend you if someone said that to you?</td><td>14.79</td></tr><tr><td>If someone told you that, would you be offended?</td><td>14.93</td></tr><tr><td rowspan=\"5\">Word-Level Translation</td><td>The word for“dog&quot;in French is“</td><td>7.73</td></tr><tr><td>The French word for“dog”is“</td><td>8.16</td></tr><tr><td>The French translation of the word“dog”is“</td><td>8.24</td></tr><tr><td>The translation of the word “dog”in French is “</td><td>8.35</td></tr><tr><td>The translation of the word “dog” into French is “</td><td>8.91</td></tr></table>",
1613
+ "bbox": [
1614
+ 144,
1615
+ 153,
1616
+ 857,
1617
+ 819
1618
+ ],
1619
+ "page_idx": 12
1620
+ }
1621
+ ]
parse/dev/NPJznfA7ZC/NPJznfA7ZC_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/NPJznfA7ZC/NPJznfA7ZC_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/R8sQPpGCv0/R8sQPpGCv0.md ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TRAIN SHORT, TEST LONG: ATTENTION WITH LINEAR BIASES ENABLES INPUT LENGTH EXTRAPOLATION
2
+
3
+ Ofir Press1,2 Noah A. Smith1,3 Mike Lewis2
4
+
5
+ 1Paul G. Allen School of Computer Science & Engineering, University of Washington
6
+ 2Facebook AI Research
7
+ 3Allen Institute for AI
8
+ ofirp@cs.washington.edu
9
+
10
+ # ABSTRACT
11
+
12
+ Since the introduction of the transformer model by Vaswani et al. (2017), a fundamental question has yet to be answered: how does a model achieve extrapolation at inference time for sequences that are longer than it saw during training? We first show that extrapolation can be enabled by simply changing the position representation method, though we find that current methods do not allow for efficient extrapolation. We therefore introduce a simpler and more efficient position method, Attention with Linear Biases (ALiBi). ALiBi does not add positional embeddings to word embeddings; instead, it biases query-key attention scores with a penalty that is proportional to their distance. We show that this method trains a 1.3 billion parameter model on input sequences of length 1024 that extrapolates to input sequences of length 2048, achieving the same perplexity as a sinusoidal position embedding model trained on inputs of length 2048 but training $11 \%$ faster and using $11 \%$ less memory. ALiBi’s inductive bias towards recency also leads it to outperform multiple strong position methods on the WikiText-103 benchmark.1
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ When constructing a transformer-based language model, a major design decision is the length of training sequences, denoted $L$ herein, which has to date been equivalent to the length of inference sequences. More context, achieved by larger $L$ , improves predictions at inference time. But longer sequences are more expensive to train on.2
17
+
18
+ Before transformers, RNN language models were trained on shorter- $L$ sequences and assumed to generalize to longer contexts at inference time (Mikolov et al., 2010; Mikolov & Zweig, 2012; Zaremba et al., 2014). Vaswani et al. (2017), introducing the transformer, speculated that it “may [...] extrapolate to sequence lengths longer than the ones encountered during training.” We define extrapolation as a model’s ability to continue performing well as the number of input tokens during validation increases beyond the number of tokens on which the the model was trained. We find that transformer language models (LMs) that use sinusoidal position embeddings have very weak extrapolation abilities; see Figure 1.
19
+
20
+ We demonstrate that this failure to extrapolate is caused by the position embedding method. As shown in Figure 1, recent alternatives to the original sinusoidal position method (Su et al., 2021; Raffel et al., 2020) have improved extrapolation. However, the better of these, the T5 bias, is considerably slower than the sinusoidal approach and uses extra memory and parameters (Figure 2).
21
+
22
+ We therefore introduce Attention with Linear Biases (ALiBi) to facilitate efficient extrapolation. ALiBi negatively biases attention scores with a linearly decreasing penalty proportional to the distance between the relevant key and query. Our simple approach eliminates position embeddings.
23
+
24
+ ![](images/7c2de5b2ccea4aa444e71cd10921636105b41bcb27c830339ed09ce9eab36dcd.jpg)
25
+ Figure 1: Extrapolation: as the (validation-set’s) input sequence gets longer $x$ -axis), current position methods (sinusoidal, rotary, and T5) show degraded perplexity $y$ -axis, lower is better), but our method (§3) does not. Models were trained on WikiText-103 with sequences of $L = 5 1 2$ (left) or $L = 1 { , } 0 2 4$ (right) tokens. T5 ran out of memory on our 32GB GPU. For more detail on exact perplexities and runtimes, see Tables 2 and 3 in the appendix.
26
+
27
+ Compared to a sinusoidal model trained on the same input length, our method requires no additional runtime or parameters and incurs a negligible $( 0 - 0 . 7 \% )$ memory increase. ALiBi can be implemented by changing only a few lines of existing transformer code.
28
+
29
+ Using ALiBi, a transformer LM can be trained on short- $L$ sequences and therefore at much lower cost, and it can still be reliably applied to long sequences at runtime. For example, a 1.3 billion parameter LM trained on $L = 1 0 2 4$ tokens with ALiBi achieves the same perplexity as a sinusoidal model trained on $L = 2 0 4 8$ when both are tested on sequences of 2048 tokens, even though our model is $11 \%$ faster and uses $11 \%$ less memory.
30
+
31
+ Though performance peaks at around two times the number of tokens that the model was trained on, ALiBi maintains strong performance even on sequences of length 10,000. In recently explored settings where NLP training examples are given as context to an LM (Brown et al., 2020), our approach will allow exposure to more examples. Additionally, it enables generation of longer outputs.
32
+
33
+ # 2 CURRENT APPROACHES DO NOT EXTRAPOLATE EFFICIENTLY
34
+
35
+ We show for the first time that the sinusoidal position method, which technically should be able to extrapolate, in practice has very limited extrapolation capabilities. Though the rotary position method improves over the sinusoidal one, it still does not achieve satisfying results. Holding everything else constant, we are the first to observe that the T5 bias method leads to better extrapolation than either of these, and so we conclude that extrapolation ability depends heavily on the position embedding. Unfortunately, the T5 bias is computationally costly (Figure 2).
36
+
37
+ # 2.1 BACKGROUND AND EXPERIMENTAL SETUP
38
+
39
+ A transformer LM receives a list of tokens and outputs a probability distribution representing its prediction for the next token. We call the input list the current input subsequence since the inputs to language models are typically subsequences from (much longer) training or evaluation sequences. During both training and perplexity evaluation (i.e., scoring a fixed sequence), many predictions can be calculated at once; this is done using a “causal mask” that ensures each position’s prediction is influenced only by tokens to its left. Let $L$ be the length of each input subsequence during training; it includes $L$ predictions, which on average have access to $\textstyle { \frac { L + 1 } { 2 } }$ tokens of (left) context. To explore a model’s extrapolation abilities, we are interested in cases where sequences of length $L _ { \nu a l i d } > L$ are considered at evaluation time. When $L$ differs between inference and training, we use $L$ to refer to the length of subsequences during training and $L _ { \nu a l i d }$ to refer to their length at validation.
40
+
41
+ ![](images/9f29b550e905335c294f61b8464d4c694992982177b7482612f4886e33a397ed.jpg)
42
+ Figure 2: A comparison of batched training, inference speed and memory use of the sinusoidal, rotary, T5 bias, and our ALiBi position methods. The speed differences between our method and the sinusoidal are within $1 \%$ during training and $3 \%$ for inference, which is insignificant on our hardware. ALiBi uses 100MB of extra memory when training on input lengths 1024 and 3072 in this setting. Memory usage is lower in all approaches when training on 3072 tokens (compared to 1024) since we break batches into multiple updates. See Table 1 in the appendix for exact numbers.
43
+
44
+ Nonoverlapping Inference To train on or evaluate a sequence longer than $L$ tokens, it is typical to segment the sequence into $L$ -length subsequences and train on or evaluate them independently. Unless otherwise stated, we use nonoverlapping inference to report perplexity scores.
45
+
46
+ Extrapolation During Inference Formally, the functions that define a transformer layer are agnostic to input length;3 they map from some arbitrary, unfixed number of input vectors to the same number of output vectors. When transformers are applied to data that is inherently sequential, like text, positional information is injected into the inputs in various ways.
47
+
48
+ Vaswani et al. (2017) discussed two options for embedding positions into vectors to be added to word embeddings: learning embeddings for specific positions and unlearned sinusoidal embeddings. They observed similar performance between these two but preferred the sinusoidal approach, which they argued might extrapolate to longer input sequences during inference. We find that this model cannot extrapolate to more than a few dozen tokens beyond $L$ . 4
49
+
50
+ Experiment Setup We first test the extrapolation abilities of various position methods on the WikiText-103 corpus (Merity et al., 2016) using the transformer language model of Baevski & Auli (2018). We use this model because of its prominent role in recent language modeling developments (Khandelwal et al., 2020; Press et al., 2021). The training set is about 103 million tokens from English Wikipedia (half a gigabyte). The model has 16 transformer layers of dimension 1024, with 8 heads, and a feedforward inner dimension of 4096. This model ties the word embedding and softmax matrices (Press & Wolf, 2017; Inan et al., 2017). In our experiments, other than varying the position method and training subsequence length, we modify no other hyperparameters, including the random seed and number of training epochs (205).
51
+
52
+ # 2.2 MEASURING EXTRAPOLATION
53
+
54
+ Sinusoidal Position Embeddings Sinusoidal position embeddings (Vaswani et al., 2017; $\ S 3 . 5 \AA$ ) are constant, non-learned vectors that are added to token embeddings on input to the first layer of the transformer. They are frequently used in transformer language modeling (Baevski & Auli, 2018; Lewis et al., 2021) and machine translation (Vaswani et al., 2017; Ott et al., 2018) models. We first consider the unmodified model of Baevski & Auli (2018), which uses sinusoidal position embeddings, and train it on $L = 5 1 2$ tokens; we then run inference with it on the validation set on $L + k$ tokens, with $k$ ranging from 0 to 15,000. Figure 1 (left) and the corresponding Table 2 (in the appendix) show that while the model improves perplexity up to $k = 2 0$ , performance stops improving and stays steady from $k = 2 0$ to $k = 5 0$ and then begins degrading. Similar results are obtained for a model trained with $L = 1 0 2 4$ tokens (Figure 1 (right) and Table 3 in the appendix). That model improves for up to $L _ { \nu a l i d } = L + 5 0$ tokens, after which performance declines.
55
+
56
+ Rotary Position Embeddings The rotary method was introduced by Su et al. (2021) and has recently been popularized by the open source GPT-3 (Brown et al., 2020) implementation GPTJ (Wang & Komatsuzaki, 2021). Instead of adding sinusoidal embeddings at the bottom of the transformer, they multiply the keys and queries of every attention layer by sinusoidal embeddings.
57
+
58
+ Unlike the sinusoidal or learned positional embedding approach, the rotary method injects position information into the model at every layer, not just at the initial one. In addition, it adds no position information to the values of the self-attention sublayer. The output of a self-attention sublayer is a linearly transformed, weighted sum of the input value vectors; therefore, by not inserting position information into the values, the outputs of each transformer-layer contain no explicit position information. We suspect that this segregation of position information may be beneficial for extrapolation, and we draw inspiration from it in the design of our method (§3).
59
+
60
+ We apply the rotary position embedding method to our Baevski & Auli baseline.5 The perplexity results (Figure 1 and Appendix Tables 2 and 3) are better than the sinusoidal approach: the model with $L = 5 1 2$ $L = 1 0 2 4 )$ ) improves perplexity with up to $k = 2 0 0$ $k = 1 0 0$ ) more tokens than it saw during training, but this comes at the cost of slower training and inference (Figure 2).
61
+
62
+ T5 Bias Though most models use trained or sinusoidal position embeddings, the T5 model of Raffel et al. (2020) uses a relative position method (Shaw et al., 2018; Huang et al., 2019) that adds no position information to word embeddings (as in the previous method). Instead, it modifies the way attention values are computed. We refer to this as the “T5 bias” method.6 To compute attention values in the unmodified transformer, we compute the dot product of every query with every relevant key and then softmax these attention values. In this method, we compute the attention values as before, but then we add a learned, shared bias to each query-key score that is dependent on just the distance between the query and key. Therefore, all query-key scores where the query and key distance are zero (i.e., the query and key represent the same token) get a specific learned bias, all scores where the query and key are one word away get a different learned bias, and so on, up to a certain point, from where multiple different distances share the same learned bias (which might be beneficial for extrapolation). As in the rotary method, the T5 bias injects position information into the model at every layer and integrates no explicit position information into the self-attention value vectors.
63
+
64
+ Raffel et al. (2020) propose that the T5 bias may allow extrapolation, but they did not report experiments testing this. Here, we show that the T5 bias does allow language models to extrapolate. We do this by again modifying the Baevski & Auli model, this time to insert the T5 bias into it.7
65
+
66
+ As Figure 1 shows, the T5 bias improves perplexity with longer sequences than the ones it was trained on, i.e., $k = 6 0 0$ $k = 8 0 0$ ) extra tokens for a model trained on $L = 5 1 2$ $L = 1 0 2 4 )$ ) input tokens. Unfortunately, this impressive performance comes at a cost: training is at least twice as slow as with the sinusoidal model. Therefore, this model’s extrapolation ability provides no efficiency advantage. For example, to do inference on 1024 tokens, we could either train the sinusoidal model with $L = 1 0 2 4$ or train the T5 bias model on $L = 5 1 2$ tokens and extrapolate to 1024 for inference. However, the $L = 1 0 2 4$ sinusoidal model runs at $2 8 . 5 \mathrm { k }$ words per second (WPS), while the $L =$ 512 T5 bias model runs at $1 4 . 4 \mathrm { k }$ WPS (Appendix Table 1), so there is no speedup when training on shorter sequences with this method.8
67
+
68
+ ![](images/8454a7f642bfe7c9c8ba601f447d89325a8b662f0a3982b8163a3c9e341f4b1d.jpg)
69
+ Figure 3: When computing attention scores for each head, our linearly biased attention method, ALiBi, adds a constant bias (right) to each attention score $( { \bf q } _ { i } \cdot { \bf k } _ { j }$ , left). As in the unmodified attention sublayer, the softmax function is then applied to these scores, and the rest of the computation is unmodified. m is a head-specific scalar that is set and not learned throughout training. We show that our method for setting $m$ values generalizes to multiple text domains, models and training compute budgets. When using ALiBi, we do not add positional embeddings at the bottom of the network.
70
+
71
+ # 3 ATTENTION WITH LINEAR BIASES (ALIBI)
72
+
73
+ In the transformer model of Vaswani et al. (2017), position embeddings are added to the word embeddings at the bottom of the network. For an input subsequence of length $L$ , the attention sublayer computes the attention scores for the $i$ th query $\mathbf { \bar { q } } _ { i } \in \mathbb { R } ^ { 1 \times \bar { d } }$ , $( 1 \leq i \leq L )$ in each head, given the first $i$ keys $\mathbf { K } \in \mathbb { R } ^ { i \times d }$ , where $d$ is the head dimension:
74
+
75
+ $$
76
+ \operatorname { s o f t m a x } ( \mathbf { q } _ { i } \mathbf { K } ^ { \top } )
77
+ $$
78
+
79
+ These attention scores are then multiplied by the values to return the output of the attention sublayer.9
80
+
81
+ When using ALiBi, we do not add position embeddings at any point in the network. The only modification we apply is after the query-key dot product, where we add a static, non-learned bias:10
82
+
83
+ $$
84
+ \mathrm { s o f t m a x } ( \mathbf { q } _ { i } \mathbf { K } ^ { \top } + m \cdot [ - ( i - 1 ) , . . . , - 2 , - 1 , 0 ] ) ,
85
+ $$
86
+
87
+ where scalar $m$ is a head-specific slope fixed before training. Figure 3 offers a visualization.
88
+
89
+ For our models with 8 heads, the slopes that we used are the geometric sequence: ${ \frac { 1 } { 2 ^ { 1 } } } , { \frac { 1 } { 2 ^ { 2 } } } , . . . , { \frac { 1 } { 2 ^ { 8 } } }$ . For models that require 16 heads, we interpolate those 8 slopes by geometrically averaging every consecutive pair, resulting in the geometric sequence that starts at $\frac { 1 } { \sqrt { 2 } }$ and has the ratio of $\frac { 1 } { \sqrt { 2 } }$ $\textstyle { \frac { 1 } { 2 ^ { 0 . 5 } } } , { \frac { 1 } { 2 ^ { 1 } } } , { \frac { 1 } { 2 ^ { 1 . 5 } } } , \dotsc , { \frac { 1 } { 2 ^ { 8 } } }$ . In general, for $n$ heads, our set of slopes is the geometric sequence that starts at $2 ^ { \frac { - 8 } { n } }$ and uses that same value as its ratio.
90
+
91
+ In $\ S 4$ , we observe that this set of slopes works on a wide variety of text domains and model sizes. Therefore, we do not believe that it is necessary to tune these slope values every time a new model is trained on a new dataset. This makes our method similar to the sinusoidal approach, where the hyperparameters (the start and end of the geometric progression of wavelengths) were set once by Vaswani et al. (2017) and then reused in different models of different sizes on different datasets.
92
+
93
+ ALiBi has an inductive bias towards recency; it penalizes attention scores between distant query-key pairs, with the penalty increasing as the distance between a key and a query grows. The different heads increase their penalties at different rates, depending on the slope magnitude.
94
+
95
+ We initially experimented with making the slopes trainable, but this did not yield strong extrapolation results.11 A brief manual exploration of around ten slope sets led us to discover the set of slopes that we finally picked. Our main insight from this exploration is that the slope sets that work best are those with slopes in the $( 0 , 1 )$ range, with the slopes’ density increasing as we get closer to 0. We also found our method to be robust to slope choice. Even randomly sampling from the exponential distribution worked well in some cases (although that method had high variance).
96
+
97
+ Since ALiBi is a relative position method, we add position information at every layer to the keys and queries but not to the values, as is done in the T5 bias and rotary methods. We hypothesize that these properties might be beneficial for extrapolation.
98
+
99
+ Implementation. ALiBi is easy to implement, with all changes accomplished in a few lines of code. We implement it by modifying the mask matrix by adding the linear biases to it (in practice, when training a transformer LM, query $\mathbf { q } _ { i }$ attends only to keys 1 to $i$ ; this is implemented by adding a mask matrix to the query-key dot product before the softmax operation is applied). This means that there is no runtime penalty when using our method since we add no operations to the network.
100
+
101
+ Compared to the sinusoidal model trained on the same input lengths, AliBi incurs a memory increase (up to 100MB in some of our experiments): in the unmodified transformer, the mask is of size $L \times L$ ; when using ALiBi, the mask is a slightly larger $n \times L \times L$ (where $n$ is the number of heads) since the linear biases added for each head uses a different slope. But, as we show, ALiBi enables training on much smaller sequences while still achieving (and occasionally surpassing) results obtained using sinusoidal embeddings on longer sequences, which saves multiple gigabytes of memory.
102
+
103
+ # 4 RESULTS
104
+
105
+ We first show that on WikiText103 ALiBi is efficient and enables training models with short input subsequences that outperform strong baselines even when the ALiBi models extrapolate to more than six times the number of tokens that they were trained on. We then take the same hyperparameters for our method (the set of slopes) that worked on WikiText-103 and show that – with no modification – they provide strong results on a dataset in a very different domain: books. Finally, we show that a 1.3B parameter model trained with AliBi on a much larger (461 GB) dataset with much more compute provides a superior alternative to the sinusoidal method since it achieves similar perplexity scores while running faster and using less memory (since it is trained on shorter inputs).
106
+
107
+ While multiple alternatives to the position methods presented in Vaswani et al. (2017) have been proposed, few have been adopted in large (1B or more parameter) LMs since that setting is much more challenging than the smaller scale experiments. GPT-3 and Jurassic-1 (Lieber et al., 2021) use the learned position embedding method from Vaswani et al., and GPT-J uses the rotary method. Our results on the 1.3B parameter model show our method’s ability to generalize to larger models, dataset sizes and training durations without retuning the hyperparameter.
108
+
109
+ # 4.1 RESULTS ON WIKITEXT-103 AND TORONTO BOOKCORPUS
110
+
111
+ ![](images/d39db463b0572a503ac269bc7ea4d3cf74b4273f25d3fc6a30263194d063c4e9.jpg)
112
+ Figure 4: ALiBi models trained and evaluated on varying sequence lengths on the WikiText-103 validation set and the sinusoidal baseline (not evaluated on longer sequences). All of our models outperform the sinusoidal ones even when trained on fewer tokens. Appendix Table 5 has exact perplexities, more ALiBi models (trained on fewer tokens), and results for rotary and T5 bias models.
113
+
114
+ We first develop our method on the WikiText-103 corpus (Merity et al., 2016), replacing the sinusoidal position embeddings in the language model of Baevski & Auli (2018) with ALiBi.
115
+
116
+ Figure 4 (and the corresponding Appendix Table 5) show our results for models trained with varying numbers of input subsequence tokens $( L )$ , extrapolating to longer subsequence lengths on the validation dataset. Our first observation is that, without extrapolation, for every $L$ , our models outperform those using the sinusoidal method, sometimes by a significant amount. For example, the Baevski & Auli model achieves $1 8 . 6 7 { \scriptstyle \pm 0 . 2 4 }$ (std. dev.) perplexity when trained with $L = 3 0 7 2$ input tokens, but our $L = 3 0 7 2$ model achieves 17.60 perplexity (when both models evaluate with $L _ { \nu a l i d } = 3 0 7 2$ ).
117
+
118
+ Our second observation is that all of our models can extrapolate, and they obtain improved perplexity scores when handling more tokens than they observed during training. For example, our model trained on 512 tokens (which achieves 19.73 perplexity when evaluating subsequences of length 512 in the development set) achieves a perplexity score of 18.40 on the development set when extrapolating to subsequences of length 3072. Surprisingly, this surpasses the score that the $L =$ 3072 sinusoidal model obtains on the development set by a statistically significant margin. Note that all our models trained on $L = 5 1 2$ to $L = 2 0 4 8$ outperform the sinusoidal baseline trained on $L = 3 0 7 2$ when extrapolating to $L _ { \nu a l i d } = 3 0 7 2$ even though those models all take much less time to train since they train on shorter subsequences (Appendix Figure 8 compares training speed to perplexity for these models)! The $L \ = \ 5 1 2$ model is 1.84 times faster to train and yet still outperforms the $L = 3 0 7 2$ sinusoidal model when extrapolating to $L _ { \nu a l i d } = 3 0 7 2$ . In addition, training the $L = 3 0 7 2$ sinusoidal model requires a GPU with more than 16 GB of memory to fit the large attention matrices, which our $L = 5 1 2$ outperforms even though it can be trained on a GPU with much less memory due to much smaller attention matrices.
119
+
120
+ Additionally, Table 5 (in the appendix) also shows that, for $L s$ of 1024 and 3072, our method performs better than the rotary and T5 bias models even when $L _ { \nu a l i d } = L$ (i.e., no extrapolation is occurring). Figure 1 (and the corresponding Appendix Tables 2 and 3) more broadly explore our method vs. the other position methods. They show that the T5 bias (the best of the baselines) improves perplexity until $L _ { \nu a l i d }$ is around $2 L$ , but on the WikiText-103 dataset our method continually improves perplexity until at least around $3 L$ , with the $L = 5 1 2$ model improving perplexity even when $L _ { \nu a l i d }$ exceeds $1 2 \mathrm { k }$ tokens. Even when unable to improve perplexity given longer sequences, ALiBi always maintains strong performance as more tokens are added.
121
+
122
+ Appendix Table 6 shows that our results on the validation set also transfer to the test set of WikiText103. Currently, almost all models that present results on WikiText-103 use sliding window evaluation (defined in $\ S \mathbf { B } _ { \varepsilon }$ ) to compute perplexities. We apply that method to our (and to the sinusoidal, rotary and T5 bias) models in Appendix Table 7. We find that our $\mathrm { L } = 3 0 7 2$ model surpasses the performance of Transformer-XL (Dai et al., 2019), the Sandwich (Press et al., 2020), and Shortformer (Press et al., 2021) models. Our results are similar to the ones obtained with staged training (Press et al., 2021) but fall short of results obtained by Routing Transformer (Roy et al., 2020) and kNN-LM (Khandelwal et al., 2020). The methods used in those models are orthogonal to ours, and we hypothesize that combining them with ours might lead to even larger performance increases.
123
+
124
+ After developing our method on WikiText-103, in Appendix Section A.3, we run one set of experiments on a different domain (books) using a similar model architecture and without modifying any of the ALiBi hyperparameters (the slopes) and show that our results fully transfer to this new domain. Our models are able to both surpass the sinusoidal baseline when not extrapolating while also outperforming it when extrapolating to longer sequences.
125
+
126
+ # 4.2 RESULTS ON THE CC100+ROBERTA CORPUS
127
+
128
+ Our final set of experiments investigates whether ALiBi transfers to a larger model trained with a larger computational budget on a larger dataset than the ones we previously used. We show that our method achieves strong results in this more challenging setting, obtaining similar performance to the sinusoidal baseline while using significantly less memory, since we train on shorter subsequences.
129
+
130
+ The dataset we choose is a combination of the datasets used to train the RoBERTa (Liu et al., 2019) implementation of BERT (Devlin et al., 2019) and the English part of the CC-100 corpus introduced in Conneau et al. (2020), for a total of 461 GB. The RoBERTa training corpus—i.e., the Toronto Book Corpus (Zhu et al., 2015), English Wikipedia, CC-News (Nagel, 2016), OpenWebText (Gokaslan & Cohen, 2019) and Stories (Trinh & Le, 2018))—is 161 gigabytes, and the English part of the CC-100 corpus is 300 gigabytes. The validation set contains 649K tokens.
131
+
132
+ Our models for this dataset have 25 transformer layers with 16 heads and a dimension of 2048, with an 8192 hidden dimension of the feedforward sublayers. These models have 1.3B parameters. We train our models for one epoch, which is $5 0 \mathrm { k }$ updates on 128 V100 GPUs.
133
+
134
+ In Figure 5 (left), we compare the validation perplexity for $L _ { \nu a l i d } = 1 0 2 4$ throughout the training process for an ALiBi model trained with $L = 5 1 2$ compared to the sinusoidal model trained with $L = 1 0 2 4$ . Since our model is trained on shorter sequences, it is $7 \%$ faster and uses 1.6 GB less memory. We halt training of the sinusoidal baseline when our model reaches the end of its training (one epoch). At that time, our model is just 0.06 perplexity away from the baseline even though it was trained on sequences that are half the length of those the baseline used and requires less memory.
135
+
136
+ ![](images/62e1ddb45dd45ac9aad501c22f605e26e185a1d9f475f7db8b3e49274186cebf.jpg)
137
+ Figure 5: On the left (right), a 1.3B-parameter ALiBi model trained on 512 (1024) and evaluated on 1024 (2048) tokens during training, compared to the sinusoidal baseline trained on 1024 (2048) tokens. The ALiBi models obtain strong results even though they use $6 \% - 1 1 \%$ less memory since they train on shorter sequences. Appendix Table 11 shows memory use and end-of-training perplexities.
138
+
139
+ In Figure 5 (right), results become even more impressive, showing that our model trained on $L =$ 1024 outperforms by 0.09 perplexity the sinusoidal model trained on $L = 2 0 4 8$ (when evaluating with $L _ { \nu a l i d } = 2 0 4 8$ ) even though our model uses 3.1 GB less memory. Our model maintains a lead in perplexity over the sinusoidal model during the entire training process. By sampling five evenly distributed points across the training process, we compute that our $L = 1 0 2 4$ model reaches a given perplexity value, on average, $11 \%$ faster than the sinusoidal model does.
140
+
141
+ Since our models in these comparisons use much less memory, they allow for stacking more layers, which would further improve performance (with negligible, if any, runtime cost). To keep our experiments as straightforward as possible, however, we do not add layers to our models.
142
+
143
+ Appendix Table 12 presents additional results comparing our models to the sinusoidal baseline when both are trained on the same $L$ , showing that ALiBi performs similarly to the sinusoidal baseline when not extrapolating. This contrasts with the results presented on the smaller datasets, where ALiBi consistently outperforms other position methods even when not extrapolating, suggesting that ALiBi’s inductive bias provides additional benefits for lower-resource language modeling.
144
+
145
+ ![](images/37d9ab2edddd1d80138da0ecfd8dddb54afcb0124c12608fe09965316d4b2445.jpg)
146
+ Figure 6: The ALiBi and sinusoidal models (with both $L = 5 1 2$ and 1024) trained for $5 0 \mathrm { k }$ updates (1 epoch) on the CC100+RoBERTa corpus, extrapolating on the validation set. ALiBi achieves the best results at around $2 L$ but maintains strong performance even up to 10000 tokens in these experiments.
147
+
148
+ Figure 6 shows that our models trained on $L = 5 1 2$ and $L = 1 0 2 4$ achieve the best results when extrapolating to about double the tokens that they were trained on. Specifically, the $L = 5 1 2$ model (that obtains 9.79 perplexity when $L _ { \nu a l i d } = 5 1 2$ ) achieves its best score (9.3) when extrapolating to
149
+
150
+ 1012 tokens, and the $L = 1 0 2 4$ model (that obtains 9.16 perplexity when $L _ { \nu a l i d } = 1 0 2 4 )$ achieves its best score (8.9) when extrapolating to 2024 tokens.
151
+
152
+ One possible explanation is that the subsequences the model observes during training are up to $L$ tokens long. When performing inference on subsequences of length $2 L$ , half of the subsequences the model consumes are as long as the examples seen during training. When inference is performed on subsequences of length $2 L + 1$ or longer, less than half of the predictions the model makes are on subsequences of lengths seen during training, and that might degrade performance.
153
+
154
+ The sinusoidal model cannot extrapolate at all in this setting, with its performance degrading for both the $L = 5 1 2$ and 1024 models as soon as one token more than $L$ is added during evaluation.
155
+
156
+ In Appendix B, we find that ALiBi’s edge over sinusoidal embeddings is largely explained by its improved avoidance of the early token curse. We posit that future work building on ALiBi might achieve further gains by more efficiently exploiting longer histories.
157
+
158
+ # 5 RELATED WORK
159
+
160
+ In parallel with our work, Wennberg & Henter (2021) introduce a relative position method that, like our method, adds a bias to attention scores that is a function of the distance between the key and query elements. Unlike our ALiBi method, which uses a non-learned linear function, their method uses a radial-basis function, with multiple trainable parameters (in our experiments, this led to a slight decrease in runtime). In addition, they present experiments on text classification, not on language modeling. They do not explore extrapolation. The Distance Aware Transformer (Wu et al., 2021) multiplies attention scores by a bias that is a function of the distance between the key and query. This function uses a different, learned parameter in every head. They show results only on text classification. In our experiments (not presented), multiplying attention scores by the bias (instead of adding, as in ALiBi) degraded performance.
161
+
162
+ Transformer-XL (Dai et al., 2019) presented a language model that uses a cache and can attend to more tokens during inference than it was trained on (by increasing the length of the cache). However, this work presents results only where output length is limited to the $L$ (the training length), and their relative position method is very slow (Press et al., 2021). The Longformer (Beltagy et al., 2020) adapts models trained on shorter sequences to document-level tasks. However, to achieve this they had to partially train their models on longer sequences. Our ALiBi method enables extrapolation without any additional training on longer sequences.
163
+
164
+ To our knowledge, extrapolation has not been previously explored in transformer language modeling, but it has been investigated previously and concurrently with transformers on other tasks, such as machine translation (Rosendahl et al., 2019; Neishi & Yoshinaga, 2019; Newman et al., 2020; Kiyono et al., 2021), sequence-to-sequence models trained on an artificial dataset (Hupkes et al., 2020), pretrained sequence-to-sequence models tested on arithmetic tasks (Nogueira et al., 2021, Appendix C), models trained with reinforcement learning (Lampinen et al., 2021), image, speech recognition, and machine translation models (Likhomanenko et al., 2021), and protein structure prediction (Jumper et al., 2021, Appendix 1.5).
165
+
166
+ # 6 CONCLUSION
167
+
168
+ We showed that the sinusoidal position embedding approach does not enable transformers to extrapolate to inputs longer than the ones they were trained on. We then established that extrapolation in transformers can be enabled by just changing the position method. We showed that our ALiBi method offers an extremely simple replacement for existing position approaches and allow models to extrapolate. In addition, when not extrapolating, our method achieves either better perplexity than the sinusoidal method (in models smaller than 1B parameters, trained on less data) or similar perplexity (in larger, billion parameter models trained on much more data). ALiBi is simple to implement and does not slow down runtime or require extra parameters (but does occasionally require a negligible amount of extra memory). Using our method, we sped up the training of a 1.3 billion parameter model evaluated on the same input sequence length as GPT-3 (2048).
169
+
170
+ # ACKNOWLEDGMENTS
171
+
172
+ We thank Tim Dettmers, Gabriel Ilharco, Jungo Kasai, Hao Peng, Sewon Min, Sofia Serrano, Sam Shleifer, Luke Zettlemoyer, Julian Michael, Nikolaos Pappas, Yizhong Wang, and the anonymous reviewers for their valuable feedback and fruitful discussions.
173
+
174
+ # REFERENCES
175
+
176
+ Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. CoRR, abs/1809.10853, 2018. URL http://arxiv.org/abs/1809.10853.
177
+
178
+ Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv:2004.05150, 2020.
179
+
180
+ Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners, 2020.
181
+
182
+ Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzman, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Un-´ supervised cross-lingual representation learning at scale. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 2020. doi: 10.18653/v1/2020.acl-main.747. URL http://dx.doi.org/10.18653/v1/2020.acl-main.747.
183
+
184
+ Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2978–2988, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1285. URL https://aclanthology.org/P19-1285.
185
+
186
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https: //www.aclweb.org/anthology/N19-1423.
187
+
188
+ Aaron Gokaslan and Vanya Cohen. Openwebtext corpus. http://Skylion007.github.io/ OpenWebTextCorpus, 2019.
189
+
190
+ Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam M. Shazeer, Andrew M. Dai, M. Hoffman, M. Dinculescu, and D. Eck. Music transformer: Generating music with long-term structure. In ICLR, 2019.
191
+
192
+ Dieuwke Hupkes, Verna Dankers, Mathijs Mul, and Elia Bruni. Compositionality decomposed: How do neural networks generalise? Journal of Artificial Intelligence Research, 67:757–795, April 2020. doi: 10.1613/jair.1.11674. URL https://doi.org/10.1613/jair.1. 11674.
193
+
194
+ Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. In ICLR, 2017. URL https://openreview.net/ forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ r1aPbsFle.
195
+
196
+ J. Jumper, Richard Evans, A. Pritzel, Tim Green, Michael Figurnov, O. Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Z´ıdek, Anna Potapenko, A. Bridgland, Clemens Meyer, Simon A A Kohl, Andy Ballard, A. Cowie, B. Romera-Paredes, Stanislav Nikolov, Rishub Jain, J. Adler, T. Back, Stig Petersen, D. Reiman, Ellen Clancy, Michal Zielinski, Martin Steinegger, Michalina Pacholska, Tamas Berghammer, S. Bodenstein, D. Silver, Oriol Vinyals, A. Senior, K. Kavukcuoglu, P. Kohli, and D. Hassabis. Highly accurate protein structure prediction with alphafold. Nature, 596:583 – 589, 2021.
197
+
198
+ Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. Generalization through Memorization: Nearest Neighbor Language Models. In International Conference on Learning Representations (ICLR), 2020.
199
+
200
+ Shun Kiyono, Sosuke Kobayashi, Jun Suzuki, and Kentaro Inui. Shape: Shifted absolute position embedding for transformers. ArXiv, abs/2109.05644, 2021.
201
+
202
+ Andrew Kyle Lampinen, Stephanie C. Y. Chan, Andrea Banino, and Felix Hill. Towards mental time travel: a hierarchical memory for reinforcement learning agents. CoRR, abs/2105.14039, 2021. URL https://arxiv.org/abs/2105.14039.
203
+
204
+ Mike Lewis, Shruti Bhosale, Tim Dettmers, Naman Goyal, and Luke Zettlemoyer. Base layers: Simplifying training of large, sparse models, 2021.
205
+
206
+ Opher Lieber, Or Sharir, Barak Lenz, and Yoav Shoham. Jurassic-1: Technical details and evaluation. Technical report, AI21 Labs, August 2021.
207
+
208
+ Tatiana Likhomanenko, Qiantong Xu, Ronan Collobert, Gabriel Synnaeve, and Alex Rogozhnikov. CAPE: encoding relative positions with continuous augmented positional embeddings. CoRR, abs/2106.03143, 2021. URL https://arxiv.org/abs/2106.03143.
209
+
210
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach, 2019.
211
+
212
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models, 2016.
213
+
214
+ Tomas Mikolov and G. Zweig. Context dependent recurrent neural network language model. 2012 IEEE Spoken Language Technology Workshop (SLT), pp. 234–239, 2012.
215
+
216
+ Tomas Mikolov, M. Karafiat, L. Burget, J. Cernock ´ y, and S. Khudanpur. Recurrent neural network ´ based language model. In INTERSPEECH, 2010.
217
+
218
+ Sebastian Nagel. Cc-news. https://commoncrawl.org/2016/10/ news-dataset-available/, 2016.
219
+
220
+ Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena, Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan Ding, Jake Marcus, Adam Roberts, and Colin Raffel. Do transformer modifications transfer across implementations and applications?, 2021.
221
+
222
+ Masato Neishi and Naoki Yoshinaga. On the relation between position information and sentence length in neural machine translation. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pp. 328–338, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/K19-1031. URL https://aclanthology.org/K19-1031.
223
+
224
+ Benjamin Newman, John Hewitt, Percy Liang, and Christopher D. Manning. The eos decision and length extrapolation. In BlackBoxNLP@EMNLP, 2020. URL https://nlp.stanford. edu/pubs/newman2020extrapolation.pdf.
225
+
226
+ Rodrigo Nogueira, Zhiying Jiang, and Jimmy J. Li. Investigating the limitations of the transformers with simple arithmetic tasks. ArXiv, abs/2102.13019, 2021.
227
+
228
+ Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. Scaling neural machine translation. In Proceedings of the Third Conference on Machine Translation (WMT), 2018.
229
+
230
+ Ankur Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable atten- ¨ tion model for natural language inference. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 2249–2255, Austin, Texas, November 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1244. URL https: //aclanthology.org/D16-1244.
231
+
232
+ Ofir Press and Lior Wolf. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pp. 157–163, Valencia, Spain, April 2017. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/E17-2025.
233
+
234
+ Ofir Press, Noah A. Smith, and Omer Levy. Improving transformer models by reordering their sublayers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 2996–3005, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.270. URL https://www.aclweb.org/anthology/2020. acl-main.270.
235
+
236
+ Ofir Press, Noah A. Smith, and Mike Lewis. Shortformer: Better language modeling using shorter inputs. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 5493–5505, Online, August 2021. Association for Computational Linguistics. URL https://aclanthology.org/2021.acl-long.427.
237
+
238
+ Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier, and Timothy P. Lillicrap. Compressive transformers for long-range sequence modelling. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $=$ SylKikSYDH.
239
+
240
+ 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-totext transformer. Journal of Machine Learning Research, 21(140):1–67, 2020. URL http: //jmlr.org/papers/v21/20-074.html.
241
+
242
+ Jan Rosendahl, Viet Anh Khoa Tran, Weiyue Wang, and Hermann Ney. Analysis of positional encodings for neural machine translation. In International Workshop on Spoken Language Translation, Hong Kong, China, November 2019.
243
+
244
+ Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers, 2020.
245
+
246
+ Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 464–468, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2074. URL https://www.aclweb.org/anthology/N18-2074.
247
+
248
+ Jianlin Su, Yu Lu, Shengfeng Pan, Bo Wen, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding, 2021.
249
+
250
+ Trieu H. Trinh and Quoc V. Le. A simple method for commonsense reasoning, 2018.
251
+
252
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper/2017/file/ 3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf.
253
+
254
+ Ben Wang and Aran Komatsuzaki. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoflolz/mesh-transformer-jax, May 2021.
255
+
256
+ Ulme Wennberg and Gustav Eje Henter. The case for translation-invariant self-attention in transformer-based language models, 2021.
257
+
258
+ Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick ´ von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pp. 38–45, Online, October 2020. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/ 2020.emnlp-demos.6.
259
+
260
+ Chuhan Wu, Fangzhao Wu, and Yongfeng Huang. DA-transformer: Distance-aware transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 2059–2068, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.166. URL https://aclanthology.org/2021.naacl-main.166.
261
+
262
+ Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization, 2014.
263
+
264
+ 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 Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015.
265
+
266
+ # A APPENDIX
267
+
268
+ # A.1 INTRODUCTION
269
+
270
+ The training speed of transformer LMs gets slower as the input subsequence length $L$ increases.
271
+ Figure 7 visualizes this.
272
+
273
+ ![](images/7eb8dd2190ae75b0f8d7168c460e942ce528e59251864b16b1ee56e6ecaa8990.jpg)
274
+
275
+ Figure 7: Training speed of our model and the sinusoidal baseline trained on different amounts of input subsequence tokens $L$ .
276
+
277
+ Table 1 contains the runtimes and memory use statistics for models using the various position methods discussed in this work.
278
+
279
+ Table 1: The speed (during training and evaluation, in words per second) and memory usage (during training) of the rotary, T5 bias, and ALiBi models compared to the sinusoidal baseline on WikiText103. Training and inference are batched, and speeds are shown for one V100 GPU.
280
+
281
+ <table><tr><td rowspan="2">Position Method</td><td rowspan="2">Train Length</td><td colspan="2">Speed (↑)</td><td rowspan="2">Memory (↓)</td></tr><tr><td>Train</td><td>Eval.</td></tr><tr><td rowspan="3">Sinusoidal</td><td>512</td><td>28.5k</td><td>82.1k</td><td>15.3 GB</td></tr><tr><td>1024</td><td>26.0k</td><td>77.8k</td><td>19.2 GB</td></tr><tr><td>3072</td><td>15.3k</td><td>42.4k</td><td>15.1 GB</td></tr><tr><td rowspan="3">Rotary</td><td>512</td><td>20.0k</td><td>43.4k</td><td>17.8 GB</td></tr><tr><td>1024</td><td>17.7k</td><td>39.4k</td><td>22.8 GB</td></tr><tr><td>3072</td><td>11.5k</td><td>29.5k</td><td>17.8 GB</td></tr><tr><td rowspan="3">T5 Bias</td><td>512</td><td>14.4k</td><td>21.8k</td><td>16.9 GB</td></tr><tr><td>1024</td><td>13.0k</td><td>20.2k</td><td>20.9 GB</td></tr><tr><td>3072</td><td>4.3k</td><td>4.9k</td><td>15.9 GB</td></tr><tr><td rowspan="3">ALiBi</td><td>512</td><td>28.3k</td><td>85.8k</td><td>15.3 GB</td></tr><tr><td>1024</td><td>25.8k</td><td>76.4k</td><td>19.3 GB</td></tr><tr><td>3072</td><td>15.5k</td><td>42.2k</td><td>15.2 GB</td></tr></table>
282
+
283
+ Tables 2, 3, and 4 show the perplexity and runtime of models using the sinusoidal, rotary T5 bias, and ALiBi position methods when extrapolating to sequences longer than the ones they were trained on. The models used in these tables were trained on $L = 5 1 2$ , 1024 and 3072 tokens.
284
+
285
+ Table 2: The sinusoidal, rotary, T5 bias and ALiBi models trained on $L = 5 1 2$ on WikiText-103 and evaluated with different values of $L _ { \nu a l i d }$ on the validation set. Bold shows the best score for each model. Inference speeds (in words per second) are from inference on a GPU with batch size of one.
286
+
287
+ <table><tr><td colspan="2">Sinusoidal</td><td colspan="2">Rotary</td><td colspan="2">T5 Bias</td><td colspan="2">ALiBi</td></tr><tr><td>Inputs</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td></tr><tr><td>512</td><td>20.05</td><td>15046</td><td>20.07</td><td>10839</td><td>19.65</td><td>11724</td><td>19.73</td><td>14726</td></tr><tr><td>513</td><td>19.98</td><td>14925</td><td>20.01</td><td>10806</td><td>19.57</td><td>10491</td><td>19.62</td><td>14965</td></tr><tr><td>522</td><td>19.93</td><td>15116</td><td>20.02</td><td>11295</td><td>19.57</td><td>9970</td><td>19.64</td><td>15316</td></tr><tr><td>532</td><td>19.91</td><td>15358</td><td>19.98</td><td>10854</td><td>19.53</td><td>10382</td><td>19.61</td><td>15383</td></tr><tr><td>542</td><td>19.91</td><td>15076</td><td>19.94</td><td>10795</td><td>19.47</td><td>12270</td><td>19.57</td><td>15301</td></tr><tr><td>552</td><td>19.91</td><td>16394</td><td>19.93</td><td>12267</td><td>19.47</td><td>13000</td><td>19.54</td><td>16540</td></tr><tr><td>562</td><td>19.91</td><td>16646</td><td>19.87</td><td>12481</td><td>19.39</td><td>12201</td><td>19.49</td><td>16385</td></tr><tr><td>572</td><td>19.95</td><td>16934</td><td>19.83</td><td>12668</td><td>19.36</td><td>12851</td><td>19.46</td><td>16881</td></tr><tr><td>582</td><td>20.13</td><td>16961</td><td>19.88</td><td>12594</td><td>19.41</td><td>13904</td><td>19.48</td><td>17064</td></tr><tr><td>592</td><td>20.18</td><td>17243</td><td>19.84</td><td>13007</td><td>19.36</td><td>13706</td><td>19.43</td><td>17289</td></tr><tr><td>602</td><td>20.40</td><td>17502</td><td>19.81</td><td>12788</td><td>19.33</td><td>14102</td><td>19.38</td><td>17141</td></tr><tr><td>612</td><td>20.59</td><td>17637</td><td>19.81</td><td>12601</td><td>19.27</td><td>14573</td><td>19.38</td><td>17661</td></tr><tr><td>712</td><td>24.86</td><td>15614</td><td>19.79</td><td>12676</td><td>19.10</td><td>13818</td><td>19.14</td><td>15637</td></tr><tr><td>812</td><td>30.82</td><td>17151</td><td>20.17</td><td>13954</td><td>18.94</td><td>14377</td><td>18.99</td><td>17210</td></tr><tr><td>912</td><td>37.42</td><td>17200</td><td>20.73</td><td>13887</td><td>18.86</td><td>15345</td><td>18.88</td><td>17619</td></tr><tr><td>1012</td><td>43.54</td><td>16304</td><td>21.37</td><td>13759</td><td>18.79</td><td>14240</td><td>18.73</td><td>16059</td></tr><tr><td>1112</td><td>50.36</td><td>16424</td><td>22.01</td><td>13891</td><td>18.77</td><td>14014</td><td>18.68</td><td>16659</td></tr><tr><td>1212</td><td>58.01</td><td>17294</td><td>23.02</td><td>15245</td><td>18.87</td><td>14589</td><td>18.67</td><td>17372</td></tr><tr><td>1312</td><td>63.62</td><td>15314</td><td>23.93</td><td>13698</td><td>18.84</td><td>13138</td><td>18.60</td><td>15698</td></tr><tr><td>1412</td><td>70.75</td><td>15663</td><td>24.81</td><td>13928</td><td>18.87</td><td>12857</td><td>18.59</td><td>15860</td></tr><tr><td>1512</td><td>76.23</td><td>15812</td><td>25.99</td><td>14248</td><td>18.91</td><td>13752</td><td>18.52</td><td>16225</td></tr><tr><td>2512</td><td>132.41</td><td>15254</td><td>31.58</td><td>13456</td><td>20.41</td><td>9948</td><td>18.41</td><td>15204</td></tr><tr><td>3512</td><td>178.97</td><td>13293</td><td>35.54</td><td>11850</td><td>22.91</td><td>7847</td><td>18.40</td><td>13329</td></tr><tr><td>4512</td><td>209.37</td><td>11767</td><td>39.15</td><td>10485</td><td>25.91</td><td>6146</td><td>18.41</td><td>11738</td></tr><tr><td>5512</td><td>240.44</td><td>10168</td><td>43.14</td><td>9020</td><td>29.54</td><td>5309</td><td>18.36</td><td>9986</td></tr><tr><td>6512</td><td>271.40</td><td>9052</td><td>47.81</td><td>8108</td><td>34.48</td><td>4680</td><td>18.35</td><td>9022</td></tr><tr><td>7512</td><td>293.02</td><td>8315</td><td>51.12</td><td>7483</td><td>39.29</td><td>4102</td><td>18.33</td><td>8324</td></tr><tr><td>8512</td><td>305.65</td><td>7259</td><td>54.98</td><td>6718</td><td>43.08</td><td>3660</td><td>18.34</td><td>7366</td></tr><tr><td>9512</td><td>336.02</td><td>6672</td><td>57.85</td><td>6211</td><td>48.90</td><td>3370</td><td>18.34</td><td>6555</td></tr><tr><td>10512</td><td>341.53</td><td>6126</td><td>60.77</td><td>5575</td><td>52.95</td><td>3010</td><td>18.32</td><td>6030</td></tr><tr><td>11512</td><td>362.74</td><td>5994</td><td>66.62</td><td>5445</td><td>61.38</td><td>2873</td><td>18.32</td><td>5882</td></tr><tr><td>12512</td><td>373.17</td><td>5421</td><td>69.70</td><td>4988</td><td>64.94</td><td>2602</td><td>18.31</td><td>5287</td></tr><tr><td>13512</td><td>382.91</td><td>5174</td><td>73.27</td><td>4692</td><td>OOM</td><td></td><td>18.31</td><td>4962</td></tr><tr><td>14512</td><td>399.98</td><td>4351</td><td>75.52</td><td>4103</td><td>OOM</td><td>= =</td><td>18.31</td><td>4352</td></tr><tr><td>15512</td><td>406.01</td><td>4291</td><td>79.25</td><td>3969</td><td>OOM</td><td></td><td>18.31</td><td>4289</td></tr></table>
288
+
289
+ Table 3: The sinusoidal, rotary, T5 bias and ALiBi models trained on $L = { \bf 1 0 2 4 }$ on WikiText-103 and evaluated with different values of $L _ { \nu a l i d }$ on the validation set. Bold shows the best score for each model. Inference speeds (in words per second) are from inference on a GPU with batch size of one.
290
+
291
+ <table><tr><td colspan="2">Sinusoidal</td><td colspan="2">Rotary</td><td colspan="2">T5 Bias</td><td colspan="2">ALiBi</td></tr><tr><td>Inputs</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td></tr><tr><td>1024</td><td>19.34</td><td>17002</td><td>19.33</td><td>14690</td><td>18.80</td><td>14973</td><td>18.66</td><td>16951</td></tr><tr><td>1025</td><td>19.33</td><td>16630</td><td>19.34</td><td>14423</td><td>18.82</td><td>14635</td><td>18.67</td><td>16690</td></tr><tr><td>1034</td><td>19.27</td><td>16589</td><td>19.28</td><td>14351</td><td>18.74</td><td>14435</td><td>18.60</td><td>16707</td></tr><tr><td>1044</td><td>19.26</td><td>16760</td><td>19.27</td><td>14491</td><td>18.72</td><td>14644</td><td>18.60</td><td>16667</td></tr><tr><td>1054</td><td>19.23</td><td>16747</td><td>19.26</td><td>14503</td><td>18.71</td><td>14800</td><td>18.58</td><td>16833</td></tr><tr><td>1064</td><td>19.21</td><td>16676</td><td>19.22</td><td>14623</td><td>18.70</td><td>14498</td><td>18.55</td><td>16941</td></tr><tr><td>1074</td><td>19.19</td><td>16879</td><td>19.19</td><td>14464</td><td>18.65</td><td>14670</td><td>18.49</td><td>16936</td></tr><tr><td>1084</td><td>19.22</td><td>16942</td><td>19.23</td><td>14650</td><td>18.70</td><td>14607</td><td>18.56</td><td>17090</td></tr><tr><td>1094</td><td>19.24</td><td>16771</td><td>19.22</td><td>14629</td><td>18.69</td><td>14517</td><td>18.54</td><td>16880</td></tr><tr><td>1104</td><td>19.28</td><td>16870</td><td>19.27</td><td>14837</td><td>18.69</td><td>14635</td><td>18.52</td><td>17009</td></tr><tr><td>1114</td><td>19.29</td><td>16795</td><td>19.27</td><td>14879</td><td>18.69</td><td>14540</td><td>18.52</td><td>17050</td></tr><tr><td>1124</td><td>19.26</td><td>17312</td><td>19.18</td><td>15121</td><td>18.62</td><td>14480</td><td>18.46</td><td>17571</td></tr><tr><td>1224</td><td>20.54</td><td>17901</td><td>19.38</td><td>15584</td><td>18.58</td><td>14956</td><td>18.40</td><td>18013</td></tr><tr><td>1324</td><td>23.13</td><td>16308</td><td>19.96</td><td>14386</td><td>18.52</td><td>13726</td><td>18.33</td><td>16422</td></tr><tr><td>1424</td><td>26.45</td><td>16217</td><td>21.27</td><td>14385</td><td>18.48</td><td>13516</td><td>18.28</td><td>16121</td></tr><tr><td>1524</td><td>29.82</td><td>16377</td><td>22.59</td><td>14693</td><td>18.42</td><td>13587</td><td>18.22</td><td>16659</td></tr><tr><td>1624</td><td>34.27</td><td>15928</td><td>24.34</td><td>14228</td><td>18.40</td><td>12979</td><td>18.17</td><td>16053</td></tr><tr><td>1724</td><td>38.24</td><td>16640</td><td>25.66</td><td>14686</td><td>18.35</td><td>12976</td><td>18.15</td><td>16607</td></tr><tr><td>1824</td><td>42.23</td><td>16840</td><td>27.63</td><td>14918</td><td>18.30</td><td>13071</td><td>18.08</td><td>16846</td></tr><tr><td>1924</td><td>46.46</td><td>15071</td><td>29.64</td><td>13452</td><td>18.31</td><td>11843</td><td>18.08</td><td>15118</td></tr><tr><td>2024</td><td>51.09</td><td>15591</td><td>31.17</td><td>13706</td><td>18.34</td><td>11906</td><td>18.05</td><td>15557</td></tr><tr><td>3024</td><td>96.46</td><td>13639</td><td>35.67</td><td>12256</td><td>18.62</td><td>8480</td><td>17.92</td><td>13668</td></tr><tr><td>4024</td><td>144.00</td><td>12441</td><td>44.30</td><td>11203</td><td>19.44</td><td>7443</td><td>17.95</td><td>12402</td></tr><tr><td>5024</td><td>182.31</td><td>11431</td><td>48.31</td><td>10324</td><td>20.47</td><td>6384</td><td>17.92</td><td>11394</td></tr><tr><td>6024</td><td>214.02</td><td>10238</td><td>54.78</td><td>9117</td><td>21.76</td><td>5577</td><td>18.01</td><td>10119</td></tr><tr><td>7024</td><td>261.86</td><td>8785</td><td>62.83</td><td>7950</td><td>23.64</td><td>4867</td><td>17.93</td><td>8779</td></tr><tr><td>8024</td><td>284.88</td><td>8132</td><td>64.91</td><td>7355</td><td>25.79</td><td>4377</td><td>17.96</td><td>8086</td></tr><tr><td>9024</td><td>310.04</td><td>7045</td><td>71.91</td><td>6380</td><td>27.54</td><td>3787</td><td>17.98</td><td>7001</td></tr><tr><td>10024</td><td>337.48</td><td>6633</td><td>77.70</td><td>6016</td><td>29.54</td><td>3582</td><td>17.97</td><td>6583</td></tr><tr><td>11024</td><td>358.43</td><td>5722</td><td>81.15</td><td>5219</td><td>31.94</td><td>3170</td><td>18.02</td><td>5641</td></tr><tr><td>12024</td><td>375.95</td><td>5560</td><td>87.51</td><td>5072</td><td>33.35</td><td>2940</td><td>18.01</td><td>5294</td></tr><tr><td>13024</td><td>393.57</td><td>4691</td><td>94.74</td><td>4383</td><td>OOM</td><td></td><td>17.98</td><td>4621</td></tr><tr><td>14024</td><td>403.52</td><td>4905</td><td>96.10</td><td>4546</td><td>OOM</td><td>-</td><td>18.01</td><td>4827</td></tr><tr><td>15024</td><td>431.66</td><td>4518</td><td>99.78</td><td>4170</td><td>OOM</td><td>=</td><td>17.96</td><td>4447</td></tr><tr><td>16024</td><td>453.32</td><td>4239</td><td>106.99</td><td>3878</td><td>OOM</td><td></td><td>17.98</td><td>4153</td></tr></table>
292
+
293
+ Table 4: The sinusoidal, rotary, T5 bias and ALiBi models trained on $L = 3 0 7 2$ on WikiText-103 and evaluated with different values of $L _ { \nu a l i d }$ on the validation set. Bold shows the best score for each model. Inference speeds (in words per second) are from inference on a GPU with batch size of one.
294
+
295
+ <table><tr><td rowspan="2">Inputs</td><td colspan="2">Sinusoidal</td><td colspan="2">Rotary</td><td colspan="2">T5Bias</td><td colspan="2">ALiBi</td></tr><tr><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td><td>PPL (↓)</td><td>WPS (↑)</td></tr><tr><td>3072</td><td>18.67</td><td>13380</td><td>18.57</td><td>12548</td><td>18.01</td><td>8828</td><td>17.60</td><td>13866</td></tr><tr><td>3073</td><td>18.67</td><td>13773</td><td>18.57</td><td>12474</td><td>18.01</td><td>8483</td><td>17.59</td><td>13793</td></tr><tr><td>3082</td><td>18.62</td><td>13741</td><td>18.54</td><td>12388</td><td>17.95</td><td>8698</td><td>17.59</td><td>13778</td></tr><tr><td>3092</td><td>18.60</td><td>13742</td><td>18.48</td><td>12458</td><td>17.92</td><td>8361</td><td>17.55</td><td>13783</td></tr><tr><td>3102</td><td>18.65</td><td>13701</td><td>18.52</td><td>12365</td><td>17.94</td><td>8764</td><td>17.59</td><td>13747</td></tr><tr><td>3112</td><td>18.64</td><td>13809</td><td>18.51</td><td>12449</td><td>17.96</td><td>8665</td><td>17.59</td><td>13827</td></tr><tr><td>3122</td><td>18.68</td><td>13722</td><td>18.52</td><td>12432</td><td>17.98</td><td>8437</td><td>17.58</td><td>13795</td></tr><tr><td>3132</td><td>18.67</td><td>13825</td><td>18.54</td><td>12490</td><td>17.97</td><td>8653</td><td>17.58</td><td>13784</td></tr><tr><td>3142</td><td>18.69</td><td>13543</td><td>18.52</td><td>12230</td><td>17.97</td><td>8282</td><td>17.61</td><td>13572</td></tr><tr><td>3152</td><td>18.66</td><td>13520</td><td>18.56</td><td>12240</td><td>17.98</td><td>8608</td><td>17.59</td><td>13523</td></tr><tr><td>3162</td><td>18.71</td><td>13501</td><td>18.56</td><td>12253</td><td>18.04</td><td>8589</td><td>17.62</td><td>13598</td></tr><tr><td>3172</td><td>18.72</td><td>13563</td><td>18.55</td><td>12297</td><td>17.99</td><td>8583</td><td>17.59</td><td>13625</td></tr><tr><td>3272</td><td>18.87</td><td>13453</td><td>18.55</td><td>12148</td><td>17.93</td><td>8144</td><td>17.59</td><td>13482</td></tr><tr><td>3372</td><td>19.46</td><td>13533</td><td>18.50</td><td>12254</td><td>17.88</td><td>8442</td><td>17.52</td><td>13565</td></tr><tr><td>3472</td><td>20.55</td><td>13047</td><td>18.52</td><td>11868</td><td>17.95</td><td>7857</td><td>17.54</td><td>13107</td></tr><tr><td>3572</td><td>21.84</td><td>13128</td><td>18.50</td><td>11882</td><td>17.86</td><td>7814</td><td>17.50</td><td>13170</td></tr><tr><td>3672</td><td>23.04</td><td>13106</td><td>18.49</td><td>11859</td><td>17.87</td><td>7719</td><td>17.48</td><td>13196</td></tr><tr><td>3772</td><td>24.47</td><td>13287</td><td>18.54</td><td>11942</td><td>17.85</td><td>7579</td><td>17.49</td><td>13312</td></tr><tr><td>3872</td><td>25.85</td><td>12621</td><td>18.40</td><td>11272</td><td>17.82</td><td>7581</td><td>17.41</td><td>12566</td></tr><tr><td>3972</td><td>27.21</td><td>12379</td><td>18.48</td><td>11151</td><td>17.84</td><td>7483</td><td>17.41</td><td>12324</td></tr><tr><td>4072</td><td>28.59</td><td>12178</td><td>18.59</td><td>11019</td><td>17.88</td><td>6974</td><td>17.48</td><td>12212</td></tr><tr><td>5072</td><td>45.53</td><td>11076</td><td>18.80</td><td>9887</td><td>17.76</td><td>6230</td><td>17.33</td><td>10938</td></tr><tr><td>6072</td><td>65.01</td><td>10114</td><td>19.50</td><td>9049</td><td>17.68</td><td>5554</td><td>17.26</td><td>10133</td></tr><tr><td>7072</td><td>85.96</td><td>8647</td><td>20.60</td><td>7861</td><td>17.83</td><td>4820</td><td>17.22</td><td>8670</td></tr><tr><td>8072</td><td>102.74</td><td>7755</td><td>21.60</td><td>6991</td><td>18.06</td><td>4281</td><td>17.30</td><td>7729</td></tr><tr><td>9072</td><td>125.99</td><td>6953</td><td>22.14</td><td>6360</td><td>18.12</td><td>3823</td><td>17.26</td><td>6939</td></tr><tr><td>10072</td><td>133.68</td><td>6646</td><td>23.21</td><td>6068</td><td>18.37</td><td>3579</td><td>17.28</td><td>6597</td></tr><tr><td>11072</td><td>161.29</td><td>5663</td><td>24.39</td><td>5158</td><td>18.64</td><td>3119</td><td>17.26</td><td>5585</td></tr><tr><td>12072</td><td>169.55</td><td>5567</td><td>26.70</td><td>5111</td><td>18.93</td><td>2920</td><td>17.24</td><td>5397</td></tr><tr><td>13072</td><td>189.43</td><td>5044</td><td>29.33</td><td>4658</td><td>19.10</td><td>2735</td><td>17.15</td><td>4809</td></tr><tr><td>14072</td><td>203.86</td><td>4915</td><td>32.21</td><td>4616</td><td>OOM</td><td></td><td>17.22</td><td>4866</td></tr><tr><td>15072</td><td>221.14</td><td>4561</td><td>33.47</td><td>4292</td><td>OOM</td><td>- =</td><td>17.23</td><td>4491</td></tr><tr><td>16072</td><td>231.29</td><td>4382</td><td>34.51</td><td>4099</td><td>OOM</td><td>=</td><td>17.22</td><td>4312</td></tr></table>
296
+
297
+ # A.2 ALIBI RESULTS ON WIKITEXT-103
298
+
299
+ ![](images/03e1e3f377a9207d455228489bc857a42f02c2d3588934f12ec12ce2fcb9d8a3.jpg)
300
+ Figure 8: The training speed and validation perplexity (with $L _ { \nu a l i d } = 3 0 7 2 )$ for ALiBi models and the sinusoidal model trained with $L = 3 0 7 2$ . All our models trained on 512 or more tokens achieve better perplexity than the sinusoidal model even though all of them (except the $L = 3 0 7 2$ ) require less time and memory to train.
301
+
302
+ Figure 8 depicts a cross section of Figure 4, showing our models with different train lengths and the sinusoidal baseline, all evaluated on $L _ { \nu a l i d } = 3 0 7 2$ tokens. We observe that all our models with $5 1 2 \leq L < 3 0 7 2$ are faster to train than the sinusoidal model with $L = 3 0 7 2$ , but they all achieve greater perplexity scores on the validation set. Our model with $L = 3 0 7 2$ trains just as fast as the sinusoidal one but bests its score by more than one perplexity point; (the standard deviation for the the sinusoidal model with $L = 3 0 7 2$ is 0.24).
303
+
304
+ Table 5 shows the perplexity values obtained when 8 different ALiBi models, trained on $L$ values between 64 and 3072, extrapolating to $L _ { \nu a l i d }$ values longer than the ones they were trained on. In addition, we present results for the sinusoidal, rotary and T5 bias models, with $L _ { \nu a l i d } = L$ .
305
+
306
+ Table 5: Perplexity when ALiBi extrapolates on the WikiText-103 development set. ∗For results we present for the sinusoidal, rotary and T5 bias models, $L = L _ { v a l i d }$ (so we do not test the extrapolation abilities of those baselines here).
307
+
308
+ <table><tr><td>ALiBi</td><td colspan="8">Evaluation Length</td></tr><tr><td>Train Length</td><td>64</td><td>128</td><td>256</td><td>512</td><td>1024</td><td>1536</td><td>2048</td><td>3072</td></tr><tr><td>64</td><td>28.46</td><td>24.70</td><td>22.88</td><td>22.09</td><td>21.73</td><td>21.63</td><td>21.59</td><td>21.53</td></tr><tr><td>128</td><td>1</td><td>23.98</td><td>21.70</td><td>20.67</td><td>20.36</td><td>20.29</td><td>20.31</td><td>20.28</td></tr><tr><td>256</td><td>1</td><td>1</td><td>21.29</td><td>19.89</td><td>19.29</td><td>19.13</td><td>19.10</td><td>19.03</td></tr><tr><td>512</td><td>-</td><td></td><td>-</td><td>19.73</td><td>18.81</td><td>18.50</td><td>18.48</td><td>18.40</td></tr><tr><td>1024</td><td></td><td></td><td>=</td><td>-</td><td>18.66</td><td>18.20</td><td>18.05</td><td>17.96</td></tr><tr><td>1536</td><td>=</td><td></td><td></td><td>=</td><td>=</td><td>18.12</td><td>17.90</td><td>17.72</td></tr><tr><td>2048</td><td>=</td><td></td><td></td><td></td><td>=</td><td>=</td><td>17.91</td><td>17.64</td></tr><tr><td>3072</td><td>1</td><td>=</td><td>=</td><td>=</td><td>=</td><td>-</td><td>1</td><td>17.60</td></tr><tr><td>Sinusoidal*</td><td>28.03</td><td>23.81</td><td>21.45</td><td>20.05</td><td>19.34</td><td>19.05</td><td>18.87</td><td>18.67</td></tr><tr><td>Rotary*</td><td>1</td><td>1</td><td>-</td><td>20.07</td><td>19.33</td><td>1</td><td>1</td><td>18.57</td></tr><tr><td>T5 Bias*</td><td>=</td><td>=</td><td>1</td><td>19.65</td><td>18.80</td><td>1</td><td>=</td><td>18.01</td></tr></table>
309
+
310
+ Table 6 compares ALiBi to the sinusoidal, rotary and T5 bias baselines on the test set of WikiText103, and Table 7 compares ALiBi to the current state of the art models on that test set.
311
+
312
+ Table 6: Test perplexity and runtime on WikiText-103 for two of our ALiBi models and models that use the sinusoidal, rotary and T5 bias methods.
313
+
314
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">Param.↓</td><td>Train</td><td colspan="3">Inference</td></tr><tr><td>Speed↑</td><td>Speed ↑</td><td>Valid ↓</td><td>Test↓</td></tr><tr><td>Sinusoidal, L = 3072</td><td>247M</td><td>15.3k</td><td>13.6k</td><td>18.67</td><td>19.38</td></tr><tr><td>Rotary,L = 3072</td><td>247M</td><td>11.5k</td><td>12.2k</td><td>18.57</td><td>19.28</td></tr><tr><td>T5 Bias,L = 3072</td><td>247M</td><td>4.3k</td><td>7.3k</td><td>18.01</td><td>18.73</td></tr><tr><td>L = 512,Lvalid = 3072</td><td>247M</td><td>28.3k</td><td>13.6k</td><td>18.40</td><td>19.08</td></tr><tr><td>A L=3072,Lvalid =3072</td><td>247M</td><td>15.5k</td><td>13.6k</td><td>17.60</td><td>18.30</td></tr></table>
315
+
316
+ Table 7: Valid and test perplexity scores on WikiText-103 for two of our ALiBi models and models that use the sinusoidal, rotary and T5 bias methods with sliding window evaluation ( $\mathrm { \ S B }$ and $\scriptstyle \mathbf { S } = 5 1 2$ following (Baevski & Auli, 2018; Khandelwal et al., 2020; Press et al., 2021)). The sinusoidal model presents our results from training and inference with the model of Baevski & Auli.
317
+
318
+ <table><tr><td>Model</td><td>Param.↓</td><td>Valid↓</td><td>Test↓</td></tr><tr><td>Adaptive Inputs (Baevski &amp; Auli, 2018)</td><td>247M</td><td>17.97</td><td>18.70</td></tr><tr><td>Transformer-XL (Dai et al., 2019)</td><td>257M</td><td>1</td><td>18.3</td></tr><tr><td>Shortformer (Press et al.,2021)</td><td>247M</td><td>17.47</td><td>18.15</td></tr><tr><td>Sandwich Transformer (Press et al., 2020)</td><td>247M</td><td>1</td><td>17.96</td></tr><tr><td>Staged Training (Press et al.,2021)</td><td>247M</td><td></td><td>17.56</td></tr><tr><td>Compressive Transformer (Rae et al., 2020)</td><td>329M</td><td></td><td>17.1</td></tr><tr><td>Routing Transformer (Roy et al., 2020)</td><td></td><td>=</td><td>15.8</td></tr><tr><td>kNN-LM (Khandelwal et al., 2020)</td><td>247M</td><td>15.81</td><td>15.79</td></tr><tr><td>Sinusoidal, L = 3072</td><td>247M</td><td>17.95</td><td>18.67</td></tr><tr><td>Rotary,L = 3072</td><td>247M</td><td>17.98</td><td>18.72</td></tr><tr><td>T5 Bias,L = 3072</td><td>247M</td><td>17.37</td><td>18.12</td></tr><tr><td>L = 512,Lyalid = 3072</td><td>247M</td><td>18.30</td><td>19.01</td></tr><tr><td>L = 3072,Lvalid = 3072</td><td>247M</td><td>16.97</td><td>17.66</td></tr></table>
319
+
320
+ # A.3 RESULTS ON THE TORONTO BOOK CORPUS
321
+
322
+ To ensure that our results are not specific to the WikiText-103 corpus, we next apply our model and the baselines to a different domain while using a similar model architecture and the same ALiBi slopes as those used in the previous subsection.
323
+
324
+ We emphasize that our set of slopes was chosen by running experiments on the WikiText-103 corpus, and here we apply that set of slopes to a model trained on a very different text domain. Throughout the entire process of developing this method, we ran only one set of experiments on this domain using the previously selected set of slopes.
325
+
326
+ Specifically, we use the Toronto BooksCorpus (Zhu et al., 2015), which has been used to train BERT (Devlin et al., 2019) (in conjuction with the English Wikipedia). The corpus is about 700M tokens (2.9 GB).
327
+
328
+ We use the same train/validation/test split as Khandelwal et al. (2020) and their tokenization, which uses BERT’s vocabulary of 29K byte-pair encodings. Since the vocabulary is much smaller than WikiText-103’s, we replace the adaptive word embedding and softmax of Baevski & Auli (2018) with a tied word embedding and softmax matrix (Press & Wolf, 2017; Inan et al., 2017).
329
+
330
+ Our results in Figure 9 (and Table 8) replicate our success on the WikiText-103 dataset. Our model surpasses the sinusoidal baseline when trained on the same amount of input tokens $( L )$ and, in addition, our model is able to extrapolate to longer sequences at inference. This occurs even though our set of slopes was not tuned on this dataset. This result establishes the generality of ALiBi and the particular set of slopes we found and suggests that they may be used on different text domains without further hyperparameter tuning.
331
+
332
+ ![](images/5d2b57b38065977c1ee49f4412f8f13fc2f5d4c03b7b10ce48b0b3cb02da17e1.jpg)
333
+ Figure 9: ALiBi-enabled models evaluated on different input lengths on the Toronto BookCorpus. Our models extrapolate to longer sequence lengths and outperform the sinusoidal baseline even when trained on much shorter sequences.
334
+
335
+ Tables 9 and 10 present the perplexities for our ALiBi models, the baselines, and the current state of the art on the Toronto BookCorpus validation and test sets. Our results here mirror our results on WikiText-103: we improve over the sinusoidal baseline even when AliBi is trained on fewer tokens.
336
+
337
+ Table 8: ALiBi models extrapolating on the Toronto BookCorpus development set. ∗For the results of the sinusoidal models, $L = L _ { \nu a l i d }$ (so we do not test the extrapolation abilities of those models here).
338
+
339
+ Table 9: Validation and test perplexities on the Toronto Book Corpus dataset.
340
+
341
+ <table><tr><td colspan="2">Train Length 512</td><td colspan="2">Evaluation Length 1024 3072</td></tr><tr><td>512</td><td>14.29</td><td>13.64</td><td>13.55</td></tr><tr><td>1024</td><td>1</td><td>13.86</td><td>13.52</td></tr><tr><td>3072</td><td>1</td><td>1</td><td>13.15</td></tr><tr><td>Sinusoidal*</td><td>14.80</td><td>14.73</td><td>14.46</td></tr></table>
342
+
343
+ <table><tr><td>Model</td><td>Param.↓</td><td>Valid ↓</td><td>Test↓</td></tr><tr><td>Sinusoidal,L = 3072</td><td>247M</td><td>14.46</td><td>11.67</td></tr><tr><td>B Ltrain =512,Lvalid =3072</td><td>247M</td><td>13.55</td><td>10.98</td></tr><tr><td>A Ltrain =3072,Lvalid=3072</td><td>247M</td><td>13.15</td><td>10.73</td></tr></table>
344
+
345
+ # A.4 RESULTS ON THE CC $^ { 1 0 0 + }$ ROBERTA CORPUS
346
+
347
+ Table 11 compares our 1.3 billion parameter ALiBi models when extrapolating to two times the number of tokens that they were trained on. We use the sinusoidal model as our baseline, and train it for the same amount of time as we train the ALiBi model that we compare it to (and so since our ALiBi models run faster in this setting, the sinusoidal models complete less updates).
348
+
349
+ Table 10: Validation and test perplexities on the Toronto Book Corpus dataset with a sliding window $( \ S \mathbf { B } )$ . Following (Baevski & Auli, 2018; Khandelwal et al., 2020; Press et al., 2020; 2021), we set the sliding window stride $S { = } 5 1 2$ .
350
+
351
+ <table><tr><td>Model</td><td>Param.↓</td><td>Valid ↓</td><td>Test↓</td></tr><tr><td>kNN-LM (Khandelwal et al., 2020)</td><td>247M</td><td>14.20</td><td>10.89</td></tr><tr><td>Shortformer (Press et al.,2021)</td><td>247M</td><td>13.40</td><td>10.88</td></tr><tr><td>Sandwich (Press et al., 2020)</td><td>247M</td><td>=</td><td>10.83</td></tr><tr><td>Staged Training (Press et al., 2021)</td><td>247M</td><td>12.80</td><td>10.48</td></tr><tr><td>Sinusoidal,L = 3072</td><td>247M</td><td>14.06</td><td>11.40</td></tr><tr><td>L =512,Lyalid = 3072</td><td>247M</td><td>13.76</td><td>11.11</td></tr><tr><td>L= 3072,Lalid = 3072</td><td>247M</td><td>12.70</td><td>10.40</td></tr></table>
352
+
353
+ Table 11: Perplexity, memory, and train time on the $\mathrm { C C 1 0 0 + }$ RoBERTa corpus for our ALiBi models and the sinusoidal baseline. We run our $L = 5 1 2$ (1024) model and the sinusoidal model with $L =$ 1024 (2048) for the same amount of time. We show that our models achieve strong results even though they use $6 { - } 1 1 \%$ less memory.
354
+
355
+ <table><tr><td rowspan="3"></td><td colspan="3">Training</td><td colspan="2">Valid PPL↓</td></tr><tr><td>Memory↓</td><td>Updates</td><td>Hours↓</td><td>Lvalid = 1024</td><td>Lvalid = 2048</td></tr><tr><td>Sinusoidal, Ltrain = 1024</td><td>26.2 GB</td><td>46.7k</td><td>5.5k</td><td>9.24</td><td>1</td></tr><tr><td>ALiBi, Ltrain = 512</td><td>24.6 GB</td><td>50.0k</td><td>5.5k</td><td>9.30</td><td>1</td></tr><tr><td>Sinusoidal, Ltrain = 2048</td><td>29.3 GB</td><td>44.2k</td><td>5.9k</td><td>1</td><td>9.01</td></tr><tr><td>ALiBi,Ltrain = 1024</td><td>26.2 GB</td><td>50.0k</td><td>5.9k</td><td></td><td>8.92</td></tr></table>
356
+
357
+ Table 12 compares our 1.3 billion parameter ALiBi models to the sinusoidal baselines, with and without extrapolation, with all models completing 50,000 updates.
358
+
359
+ Table 12: Perplexity, train time and memory use of the sinusoidal and ALiBi models on the CC100+RoBERTa corpus when all models are trained with $5 0 \mathrm { k }$ updates.
360
+
361
+ <table><tr><td rowspan="2"></td><td colspan="3">Training</td><td colspan="3">Valid PPL ↓</td></tr><tr><td>Memory↓</td><td>Updates</td><td>Hours←</td><td>Lvalid =512 Lvalid =1024 Lvalid=2048</td><td></td><td></td></tr><tr><td rowspan="2">Sinusoidal, Ltrain = 512 ALiBi,Ltrain = 512</td><td>24.6 GB</td><td>50.0k</td><td>5.5k</td><td>9.71</td><td>37.05</td><td>105.42</td></tr><tr><td>24.6 GB</td><td>50.0k</td><td>5.5k</td><td>9.79</td><td>9.30</td><td>9.54</td></tr><tr><td rowspan="2">Sinusoidal, Ltrain = 1024 ALiBi,Ltrain = 1024</td><td>26.2 GB</td><td>50.0k</td><td>5.9k</td><td>1</td><td>9.15</td><td>48.85</td></tr><tr><td>26.2 GB</td><td>50.0k</td><td>5.9k</td><td>=</td><td>9.16</td><td>8.92</td></tr><tr><td rowspan="2">Sinusoidal, Ltrain = 2048 ALiBi,Ltrain = 2048</td><td>29.3 GB</td><td>50.0k</td><td>6.7k</td><td></td><td>-</td><td>8.83</td></tr><tr><td>29.4 GB</td><td>50.0k</td><td>6.7k</td><td></td><td>1</td><td>8.84</td></tr></table>
362
+
363
+ # B ANALYSIS
364
+
365
+ In this section we investigate why ALiBi works so effectively. We find that ALiBi’s decrease in perplexity when given longer sequences is largely explained by its improved avoidance of the early token curse. We hypothesize that future work building on ALiBi might achieve further gains by more efficiently exploiting longer histories.
366
+
367
+ ![](images/d4ac4d21ebb896e9182b2f88806590481ddff892b612e79f3a70592e627367b3.jpg)
368
+ Figure 10: Sliding window evaluation (top; blue) compared to nonoverlapping evaluation (bottom; red) on a sequence of 8 words using a model with $L _ { \nu a l i d } = 4$ . Nonoverlapping evaluation is much faster since it requires just two inference passes (as opposed to the five passes required by the siding window approach). But the sliding window approach provides more context for each prediction.
369
+
370
+ Sliding Window Inference As mentioned in Section 2, nonoverlapping inference is commonly used to evaluate sequences longer than $L$ (the number of tokens in each training subsequence). An alternative is to use a sliding window during evaluation (Baevski & Auli, 2018).
371
+
372
+ A stride $S$ is picked between 1 and $L - 1$ , and the window is advanced by $S$ tokens after each forward pass.12 This means that $L - S$ tokens from the previous subsequence are re-encoded, and only $S$ new tokens are output. The advantage is that all outputs in each subsequence after the first have at least $L - S$ previous tokens to condition on. However, since tokens must be re-encoded multiple times, this approach is much slower than the nonoverlapping one. When $S = 1$ , we output one token every inference pass, each using the maximal context window that the model can handle; however, this is the slowest approach. Figure 10 is a visualization of the nonoverlapping and sliding window evaluation approaches.
373
+
374
+ We use sliding window inference as a tool to analyze our models, but we note that it is normally prohibitively slow in practice (Press et al., 2021).
375
+
376
+ Early Token Curse Splitting an evaluation set into subsequences means that predictions occuring early in each subsequence cannot access many previous context tokens (appearing at the end of the previous subsequence). The result, referred to as the early token curse (Press et al., 2021), increases (i.e., degrades) perplexity scores. A workaround is to evaluate the model using a sliding window, giving each prediction more context. This solution is slow since it requires many more forward passes of the model.
377
+
378
+ # B.2 EXTRAPOLATION REDUCES THE EARLY TOKEN CURSE
379
+
380
+ We presented results showing that our ALiBi method (and, to a lesser extent, the T5 bias) allows LMs to extrapolate during inference. Two reasons could explain why these methods enable LMs to achieve better perplexity given longer input subsequences:
381
+
382
+ 1. Performance improves because the models can use longer contexts to make more accurate predictions. For example, the average article length in the WikiText-103 corpus is about 3600 tokens; therefore, if a model trained on $L \ = \ 5 1 2$ tokens extrapolates to $L _ { \nu a l i d } =$ 3072 tokens during inference and achieves better results, that might be because it can spot patterns occurring across more than 512 tokens. 2. Performance improves because longer input sequences mean the early token curse is reduced. For example, during nonoverlapping evaluation on sequences of length $L _ { \nu a l i d } =$ 1000, $10 \%$ of predictions have 100 tokens of context or less. If we rerun nonoverlapping evaluation on that model with $L _ { \nu a l i d } = 2 0 0 0$ tokens, now only $5 \%$ of predictions have 100 tokens of context or less. So, by simply being able to handle longer sequences, a model can substantially reduce the early token curse and improve performance.13
383
+
384
+ To better understand what might be occurring, we re-evaluate the development set of WikiText-103 with our models and the sinusoidal baseline with $L = 5 1 2$ , 1024, 3072. However, this time we use sliding window evaluation with a stride of $S = 1$ , meaning that we move the sliding window just one token after every inference pass, giving each prediction the maximum number of context tokens that the model can use.
385
+
386
+ ![](images/5f91f6bdf10f91e9df60fe8a82792a8da3426e81d9d9493ba58fb5c39b32bcae.jpg)
387
+ Figure 11: ALiBi models evaluated on different input lengths on WikiText-103 with sliding window evaluation (with stride $S = 1 { \dot { } }$ ). Unlike results shown in Figure 4, where performance improves in each of our models as we increase the validation sequence length, here performance stays relatively flat as we increase $L _ { \nu a l i d }$ . This might mean that ALiBi increases performance when $L _ { \nu a l i d } > L$ not because it uses longer contexts, but because fewer tokens suffer from the early token curse. Note that as in $\ S 2$ , the perplexity of the sinusoidal model explodes when $L _ { \nu a l i d } > L$ even when using sliding window evaluation.
388
+
389
+ The results are shown in Figure 11 and in the corresponding Tables 13 (sinusoidal) and 15 (ALiBi).
390
+
391
+ Unsurprisingly, for the sinusoidal model, as in $\ S 2$ , increasing $L _ { \nu a l i d }$ causes an explosion in perplexity even when using sliding window evaluation. Our ALiBi models cannot improve perplexity when looking at longer sequences in this setting, but they keep perplexity flat when $L _ { \nu a l i d }$ increases.
392
+
393
+ This leads us to believe that our perplexity improvement when increasing $L _ { \nu a l i d }$ and using nonoverlapping evaluation is caused by explanation 2, not explanation 1. Because sliding window evaluation provides long context windows for every prediction made, it curtails the early token curse. In this setting, ALiBi’s performance remains flat when $L _ { \nu a l i d }$ increases, leading us to hypothesize that the gains seen while increasing $L _ { \nu a l i d }$ in $\ S 4$ were the result of larger $L _ { \nu a l i d }$ values mitigating the early token curse.
394
+
395
+ Our ALiBi results mirror what occurs in the model using the T5 bias: when using sliding window evaluation, perplexity remains relatively flat when evaluating longer sequences (see Table 14).
396
+
397
+ Our analysis reveals that when $L _ { \nu a l i d } > L$ , ALiBi might not be using contexts longer than the ones it was trained on. This highlights a research direction that could be pursued in future work.
398
+
399
+ These findings do not lessen the value of ALiBi. When $L _ { \nu a l i d } = L$ , ALiBi achieves either superior or similar results to the sinusoidal method and other alternatives even though it is simpler and requires no learned parameters. When evaluating $L _ { \nu a l i d } > L$ tokens, even if ALiBi does not attend to more than $L$ tokens, it yields better results than the other alternatives that can be used in this case, i.e., standard nonoverlapping inference (which is cheap, but does not perform as well) and the more accurate sliding window approach (which is very slow).
400
+
401
+ Table 13: Perplexities of the sinusoidal models evaluated with sliding window evaluation with stride $S = 1$ on the WikiText-103 validation dataset.
402
+
403
+ <table><tr><td></td><td colspan="4">Evaluation Length (S = 1)</td><td rowspan="2">3072</td></tr><tr><td>Train Length</td><td>512</td><td>1024</td><td>1536</td><td>2048</td></tr><tr><td>512</td><td>18.35</td><td>204.42</td><td>264.74</td><td>306.19</td><td>360.12</td></tr><tr><td>1024</td><td>1</td><td>18.05</td><td>206.55</td><td>302.6</td><td>393.71</td></tr><tr><td>3072</td><td>-</td><td>1</td><td>1</td><td>1</td><td>18.03</td></tr></table>
404
+
405
+ Table 14: Perplexities of the T5 bias models evaluated with sliding window evaluation with stride $S = 1$ on the WikiText-103 validation dataset.
406
+
407
+ <table><tr><td></td><td colspan="5">Evaluation Length (S = 1)</td></tr><tr><td>Train Length</td><td>512</td><td>1024</td><td>1536</td><td>2048</td><td>3072</td></tr><tr><td>512</td><td>17.92</td><td>18.51</td><td>20.36</td><td>22.62</td><td>30.77</td></tr><tr><td>1024</td><td>1</td><td>17.65</td><td>17.87</td><td>18.51</td><td>20.66</td></tr><tr><td>3072</td><td>1</td><td>1</td><td>1</td><td>1</td><td>17.41</td></tr></table>
408
+
409
+ Table 15: Perplexities of the ALiBi models evaluated with sliding window evaluation with stride $S = 1$ on the WikiText-103 validation dataset.
410
+
411
+ <table><tr><td></td><td colspan="5">Evaluation Length (S = 1)</td></tr><tr><td>Train Length</td><td>512</td><td>1024</td><td>1536</td><td>2048</td><td>3072</td></tr><tr><td>512</td><td>17.98</td><td>17.92</td><td>18.2</td><td>18.28</td><td>18.3</td></tr><tr><td>1024</td><td>1</td><td>17.46</td><td>17.47</td><td>17.62</td><td>17.92</td></tr><tr><td>3072</td><td>1</td><td>1</td><td>1</td><td>1</td><td>16.96</td></tr></table>
parse/dev/dNigytemkL/dNigytemkL_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/ePZsWeGJXyp/ePZsWeGJXyp.md ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # VICRegL: Self-Supervised Learning of Local Visual Features
2
+
3
+ Adrien Bardes1,2
4
+
5
+ Jean Ponce2,4
6
+
7
+ Yann LeCun1,3,4
8
+
9
+ 1Meta, FAIR
10
+ 2Inria, École normale supérieure, CNRS, PSL Research University
11
+ 3Courant Institute, New York University
12
+ 4Center for Data Science, New York University
13
+
14
+ # Abstract
15
+
16
+ Most recent self-supervised methods for learning image representations focus on either producing a global feature with invariance properties, or producing a set of local features. The former works best for classification tasks while the latter is best for detection and segmentation tasks. This paper explores the fundamental tradeoff between learning local and global features. A new method called VICRegL is proposed that learns good global and local features simultaneously, yielding excellent performance on detection and segmentation tasks while maintaining good performance on classification tasks. Concretely, two identical branches of a standard convolutional net architecture are fed two differently distorted versions of the same image. The VICReg criterion is applied to pairs of global feature vectors. Simultaneously, the VICReg criterion is applied to pairs of local feature vectors occurring before the last pooling layer. Two local feature vectors are attracted to each other if their $l ^ { 2 }$ -distance is below a threshold or if their relative locations are consistent with a known geometric transformation between the two input images. We demonstrate strong performance on linear classification and segmentation transfer tasks. Code and pretrained models are publicly available at: https://github.com/facebookresearch/VICRegL
17
+
18
+ # 1 Introduction
19
+
20
+ Recent advances in self-supervised learning for computer vision have been largely driven by downstream proxy tasks such as image categorization, with convolutional backbones [Chen et al., 2020a,b, Grill et al., 2020, Lee et al., 2021, Caron et al., 2020, Zbontar et al., 2021, Bardes et al., 2022, Tomasev et al., 2022], or vision transformers [Caron et al., 2021, Chen et al., 2021, Li et al., 2022, Zhou et al., 2022a]. Current approaches rely on a joint embedding architecture and a loss function that forces the learned features to be invariant to a sampling process selecting pairs of different views of the same image, obtained by transformation such as cropping, rescaling, or color jittering [Misra and Maaten, 2020, Chen et al., 2020a, He et al., 2020, Grill et al., 2020]. These methods learn to eliminate the irrelevant part of position and color information, in order to satisfy the invariance criterion, and perform well on image classification benchmarks. Some recent approaches go beyond learning global features: to tackle tasks such as semantic segmentation where spatial information plays a key role, [Yang et al., 2021, Xie et al., 2021, Hénaff et al., 2021, Yang et al., 2022, Hénaff et al., 2022, El-Nouby et al., 2022] also learn image models with more emphasis on local image structure. In the end most recent approaches to self-supervised learning of visual features learn the corresponding image model using either a (possibly quite sophisticated) global criterion, or a (necessarily) different one exploiting local image characteristics and spatial information. The best performing local methods require a non-parametric pre-processing step that compute unsupervised segmentation masks [Hénaff et al., 2021], which can be done online [Hénaff et al., 2022], but with an additional computational burden.
21
+
22
+ We argue that more complex reasoning systems should be structured in a hierarchical way, by learning at several scales. To this end, we propose VICRegL, a method that learn features at a global scale, and that additionally uses spatial information, and matches feature vectors that are either pooled from close-by regions in the original input image, or close in the embedding space, therefore learning features at a local scale. In practice, the global VICReg criterion [Bardes et al., 2022] is applied to pairs of feature vectors, before and after the final pooling layer of a convolutional network, thus learning local and global features at the same time. When a segmentation mask is available as in [Hénaff et al., 2021], feature vectors that correspond to the same region in the mask can be pooled together, and compared using a contrastive loss function, which allows spatial vectors far away in the original image to be pooled together if they belong to the same object. In our case, segmentation masks are not available, and we therefore face two challenges: (1) there is no a priori information on how to pool vectors from the same object together, thus long-range matching should be learned in a self-supervised manner, and (2) contrasting negatively feature vectors corresponding to far away locations can have a negative effect, as these vectors could have been pooled from locations that represent the same object in the image. In order to address these issues, VICRegL (1) matches feature vectors according to a $l ^ { 2 }$ nearest-neighbor criterion exploiting both the distances between features and image locations, properly weighted, and (2) uses the VICReg criterion between matched feature vectors. We use VICReg for its simplicity and its non-contrastive nature, which alleviates the need for negative samples and therefore does not have an explicit negative contrasting effect between feature vectors that could have been potential matches.
23
+
24
+ We demonstrate the effectiveness of VICRegL by evaluating the learned representations on vision tasks such as image classification on ImageNet and semantic segmentation on various datasets. Our evaluation is (mostly) done in the setting where the backbone learned by VICRegL is frozen, with only a linear classification or segmentation head tuned to the task at hand. We believe that this setting is a much better evaluation metric than the commonly used fine-tuning benchmarks, as the performance can not be attributed to the use of a complex head, or to the availability of the ground truth masks. Our results show that learning local features, in addition to global features, does not hurt the classification performance, but significantly improves segmentation accuracy. On the Pascal VOC linear frozen semantic segmentation task, VICRegL achieves 55.9 mIoU with a ResNet-50 backbone, which is a ${ \bf + 8 . 1 }$ mIoU improvement over VICReg, and 67.5 mIoU with a ConvNeXt-S backbone, which is a $+ 6 . 6$ mIoU improvement.
25
+
26
+ # 2 Related work
27
+
28
+ Global features. Most recent methods for global feature learning are based on a joint embedding architecture that learns representations that are invariant to various views. These methods differ in the way collapsing solutions are avoided. Contrastive methods [Hjelm et al., 2019, Chen et al., 2020a, He et al., 2020, Chen et al., 2020b, Mitrovic et al., 2021, Dwibedi et al., 2021, Chen et al., 2021, Tomasev et al., 2022] uses negative samples to push dissimilar samples apart from each other. Clustering methods [Caron et al., 2018, 2020, 2021] ensure a balanced partition of the samples within a set of clusters. Non-contrastive methods, which are dual to contrastive ones [Garrido et al., 2022], rely on maintaining the informational content of the representations by either explicit regularization [Zbontar et al., 2021, Bardes et al., 2022] or architectural design [Chen and He, 2020, Grill et al., 2020, Richemond et al., 2020, Lee et al., 2021]. Finally, the best performing methods today are based on vision transformers [Caron et al., 2021, Chen et al., 2021, Li et al., 2022, Zhou et al., 2022a,b] and deliver strong results in both downstream classification and segmentation tasks.
29
+
30
+ Local features. In opposition to global methods, local one focus on explicitly learning a set of local features that describe small parts of the image, which global methods do implicitly [Chen et al., 2022], and are therefore better suited for segmentation tasks. Indeed these methods commonly only evaluate on segmentation benchmarks. A contrastive loss function can be applied directly: (1) at the pixel level [Xie et al., 2021], which forces consistency between pixels at similar locations; (2) at the feature map level [Wang et al., 2021], which forces consistency between groups of pixels: (3) at the image region level [Xiao et al., 2021], which forces consistency between large regions that overlap in different views of an image. Similar to [Wang et al., 2021], our method VICRegL operates at the feature map level but with a more advanced matching criterion that takes into account the distance in pixel space between the objects. Copy pasting a patch on a random background [Yang et al., 2021, Wang et al., 2022] has also shown to be effective for learning to localize an object without relying on spurious correlations with the background. Aggregating multiple images corresponding to several object instances into a single image can also help the localization task [Yang et al., 2022]. These approaches rely on carefully and handcrafted constructions of new images with modified background or with aggregation of semantic content from several other images, which is not satisfactory, while our method simply rely on the classical augmentations commonly used in self-supervised learning. The best current approaches consist in using the information from unsupervised segmentation masks, which can be computed as a pre-processing step [Hénaff et al., 2021] or computed online [Hénaff et al., 2022]. The feature vectors coming from the same region in the mask are pooled together and the resulting vectors are contrasted between each other with a contrastive loss function. These approaches explicitly construct semantic segmentation masks using k-means for every input image, which is computationally not efficient, and is a strong inductive bias in the architecture. Our method does not rely on these masks and therefore learns less specialized features.
31
+
32
+ # 3 Method
33
+
34
+ Background. VICReg was introduced as a self-supervised method for learning image representations that avoid the collapse problem by design. Its loss function is composed of three terms: a variance term, that preserves the variance of the embeddings, and consists in a hinge loss function on the standard deviation, on each component of the vectors individually and along the batch dimension; an invariance term, which is simply an $l ^ { 2 }$ distance between the embeddings from the two branches of a siamese architecture; and finally a covariance term, that decorrelates the different dimensions of the embeddings, by bringing to 0 the off-diagonal coefficients of the empirical covariance matrix of the embeddings.
35
+
36
+ For completeness, we describe how the VICReg framework works [Bardes et al., 2022]. A seed image $I$ is first sampled in the unlabelled training dataset. Two views $x$ and $x ^ { \prime }$ are obtained by a rectangular crop at random locations in $I$ , rescaling them to a fixed size $( R , S )$ and applying various color jitters with random parameters. The views are fed to an encoder $\dot { f } _ { \theta } : \mathbb { R } ^ { C \times R \times S } \xrightarrow { } \mathbb { R } ^ { \tilde { C } }$ producing their representations $y = f _ { \boldsymbol { \theta } } ( x )$ and $y ^ { \prime } = f _ { \theta } ( x ^ { \prime } ) \in \mathbb R ^ { C }$ , which are mapped by an expander $\mathbf { \Sigma } \dot { h } _ { \phi } : \mathbb { R } ^ { C } \overset { \mathbf { \Sigma } } { } \mathbb { R } ^ { D }$ onto the embeddings $z = h _ { \phi } ( y )$ and $z ^ { \prime } = h _ { \phi } ( y ^ { \prime } ) \in \mathbb { R } ^ { D }$ . The VICReg loss function is defined as follows:
37
+
38
+ $$
39
+ \ell ( z , z ^ { \prime } ) = \lambda s ( z , z ^ { \prime } ) + \mu [ v ( z ) + v ( z ^ { \prime } ) ] + \nu [ c ( z ) + c ( z ^ { \prime } ) ] ,
40
+ $$
41
+
42
+ where $s , v$ and $c$ are the invariance, variance and covariance terms as described in [Bardes et al., 2022], and $\lambda$ , $\mu$ and $\nu$ are scalar coefficients weighting the terms.
43
+
44
+ # 3.1 VICRegL: feature vectors matching
45
+
46
+ When the encoder $f _ { \theta }$ is a convolutional neural network, the final representations are obtained by performing an average pooling operation $\oplus : \mathbb { R } ^ { C \times H \times W } \mathbb { R } ^ { C }$ on the output feature maps, with $C$ the number of channels and $( H , W )$ the spatial dimensions. We now denote the pooled representations $y _ { \oplus }$ and $y _ { \oplus } ^ { \prime } \in \mathbb { R } ^ { C }$ and the unpooled representations $y$ and $y ^ { \prime } \in \mathbb { R } ^ { C \times H \times W }$ . We denote $y _ { i , j }$ and $y _ { i , j } ^ { \prime } \in \mathbb { R } ^ { C }$ the feature vectors at position $( i , j )$ in their corresponding feature maps. The main idea is to apply the VICReg criterion between pairs of feature vectors from $y$ and $y ^ { \prime }$ , by matching an element of $y$ to one from $y ^ { \prime }$ , using spatial and $l ^ { 2 }$ -distance based information. We introduce a local projector network $h _ { \phi } ^ { l } : \mathbb { R } ^ { \tilde { C } \times H \times W } \to \mathbb { R } ^ { D \times H \times W }$ , that embed the feature maps $y$ and $y ^ { \prime } \in \mathbb { R } ^ { C \times H \times W }$ onto feature maps embeddings $z = h _ { \phi } ^ { l } ( y )$ and $z ^ { \prime } = h _ { \phi } ^ { l } ( y ^ { \prime } ) \in \mathbb { R } ^ { D \times H \times W }$ . The standard expander of VICReg is now the global expander $h _ { \psi } ^ { g } : \mathbb { R } ^ { C } \mathbb { R } ^ { D }$ , which maps the pooled representations $y _ { \oplus }$ and $y _ { \oplus } ^ { \prime } \in \mathbb { R } ^ { C }$ to the embeddings $z _ { \oplus } = h _ { \psi } ^ { g } ( z _ { \oplus } )$ and $z _ { \oplus } ^ { \prime } = h _ { \psi } ^ { g } ( z _ { \oplus } ^ { \prime } ) \in \mathbb { R } ^ { D }$ . We describe now how we perform the matching, and introduce our loss functions.
47
+
48
+ Location-based matching. In order to take into account the transformation that occurs between the views $x$ and $x ^ { \prime }$ of an image $I$ , and thus matching features from similar locations, we compute the absolute position in $I$ that corresponds to the coordinate of each feature vector in its feature map. Each feature vector $z _ { p }$ at position $p$ in the feature map is matched to its spatial nearest neighbor according the the absolute position in $I$ , and among the $H \times W$ resulting pairs, only the top- $\gamma$ pairs are kept. The location-based matching loss function is defined as follows:
49
+
50
+ ![](images/b98233657e067d35a65c70938c5e8214eab10ae5de06ddb23153174e73a35926.jpg)
51
+ Figure 1: Overview of VICRegL: Learning local and global features with VICReg. Given a seed image, two views are produced and fed to an encoder that produces local features. The features are further processed by a local projector that embed them into a smaller space, without destroying the localization information. Two matchings, one based on the spatial information provided by the transformation between the views, the other one based on the $l ^ { 2 }$ -distance in the embedding space are computed, and the VICReg criterion is then applied between matched spatial embeddings. Additionally, the local features from the encoder are pooled together, and the pooled features are fed to a global expander. The VICReg criterion is finally applied between the two resulting embeddings.
52
+
53
+ $$
54
+ \mathcal { L } _ { s } ( z , z ^ { \prime } ) = \sum _ { p \in P } l ( z _ { p } , z _ { \mathrm { N N } ( p ) } ^ { \prime } ) ,
55
+ $$
56
+
57
+ where the sum is over coordinates $p$ in $P = \{ ( h , w ) \mid ( h , w ) \in [ 1 , . . . , H ] \times [ 1 , . . . , W ] \}$ the set of all coordinates in the feature map, and $\mathrm { N N } ( p )$ denotes the (spatially) closest coordinate $p ^ { \prime }$ to $p$ according to the actual distance in the seed image.
58
+
59
+ Feature-based matching. In addition to matching features that are close in terms of location in the original image, we match features that are close in the embedding space. Each feature vector $z _ { p }$ at position $p$ is matched to its nearest neighbor in $z ^ { \prime }$ according to the $l ^ { 2 }$ distance in the embedding space, and among the $H \times W$ resulting pairs, only the top- $\gamma$ pairs are kept. The feature-based matching loss function is defined as follows:
60
+
61
+ $$
62
+ \mathcal { L } _ { d } ( z , z ^ { \prime } ) = \sum _ { p \in P } l ( z _ { p } , \mathrm { N N } ^ { \prime } ( z _ { p } ) ) ,
63
+ $$
64
+
65
+ where the sum is over coordinates $p$ in $P$ and $\mathrm { N N } ^ { \prime } ( z _ { p } )$ denotes the closest feature vector to $z _ { p }$ in the feature maps $z ^ { \prime }$ , in terms of the $l ^ { 2 }$ -distance. Similar to the location-based loss function, the featurebased loss function enforces invariance on a local scale, but between vectors that are close in the embedding space, and not necessarily pooled from the same location in the seed image. The purpose of this loss function is mainly to capture long-range interactions not captured by the location-based matching.
66
+
67
+ The general idea of top- $\gamma$ filtering is to eliminate the mismatched pairs of feature vectors that are too far away in the image for the location-based matching, and that therefore probably do not represent the same objects, but most importantly that are probably mismatched for the feature-based matching, especially at the beginning of the training when the network matches feature vectors representing different objects or textures. Sometime, two views don’t or barely overlap, for the feature-based matching this is not an issue, as the purpose of this matching is to capture long-range interactions not captured by location-based matching. For the location-based matching, given the parameters we use to generate the views (each view covers between $8 \%$ and $100 \%$ of the image, chosen uniformly), the probability for the views to not overlap is small, and even in that case matching the closest points between the views does not degrade the final performance. Indeed, we have tried to use a variable number of matches and a threshold value used to compute the matches, which did not improve the performance compared to using a fixed number of matches. In practice, there are with high probability always good local features to match as the views have a low probability of not overlapping, and this explains why always matching the top- $\gamma$ pairs, compared to introducing a threshold value at which the pair is considered a match, does not degrade the performance.
68
+
69
+ Our final loss function is a combination of the location-based and feature-based loss functions, which form the local criterion, with in addition a standard VICReg loss function applied on the pooled representations, which is the global criterion. Both location and feature-based loss functions are symmetrized, because for both, the search for the best match is not a symmetric operation. Our final loss function is described as follows:
70
+
71
+ $$
72
+ \mathcal { L } ( z , z ^ { \prime } ) = \alpha \ell ( z _ { \oplus } , z _ { \oplus } ^ { \prime } ) + ( 1 - \alpha ) \{ \mathcal { L } _ { s } ( z , z ^ { \prime } ) + \mathcal { L } _ { s } ( z ^ { \prime } , z ) + \mathcal { L } _ { d } ( z , z ^ { \prime } ) + \mathcal { L } _ { d } ( z ^ { \prime } , z ) \} ,
73
+ $$
74
+
75
+ where $\alpha$ is an hyper-parameter controlling the importance one wants to put on learning global rather than local features. We study later in Section 4.2 the influence of $\alpha$ on the downstream performance, and show that there exists a trade-off such that the learned representations contain local and global information at the same time, and therefore transfer well on both image classification and segmentation tasks.
76
+
77
+ # 3.2 VICRegL with the ConvNeXt backbone
78
+
79
+ The feature matching procedure is designed to work with any kind of convolutional neural network. In the experimental section, we provide results with a standard ResNet-50 backbone. However, one can considerably improve the performance on downstream tasks by using a more sophisticated backbone. We propose to use the recently introduced ConvNeXt architecture [Liu et al., 2022], that is very similar to the ResNet one, but with many simple modifications to the original architecture, which make it work as well as modern vision transformers. To the best of our knowledge, this is the first time ConvNeXts have been used in self-supervised learning, and our work shows that convolutional neural networks are still able to deliver state-of-the-art performances in most standard self-supervised learning benchmarks. In order to make the performance competitive with recent approaches, we use the multi-crop strategy introduced in [Caron et al., 2020]. Surprisingly, we found that the combination of multi-crop with encoders from the ResNet family and the VICReg criterion is extremely difficult to optimize, and haven’t been able to make it work properly. However, multi-crop shows very good results when combined with ConvNeXts. Our intuitive explanation is based on a study of the optimal batch size. The VICReg criterion regularizes the empirical covariance matrix of the embeddings, computed using the current batch, and we hypothesize that there is a link between the size of the batch, and the dimensionality of the representations. VICReg combined with a ResNet-50 has shown to have an optimal batch size of 2048, which is exactly the dimensionality of the representations of a ResNet-50. We found that the optimal batch size when working with ConvNeXts is 512 which is much smaller, and correlates with the fact that ConvNeXts also have smaller representations (768 for ConvNeXt-S and 1024 for ConvNeXt-B). The optimal batch size might therefore be close to the dimensionality of the representations. Now, the multi-crop strategy artificially increases the size of the batch, which is much easier to handle when the size of the batch before multi-crop is small. Indeed the effective batch size otherwise becomes too large, which causes optimization issues.
80
+
81
+ We now describe how the matching loss functions are adapted in order to work with multi-crop. Instead of generating only two views of the seed image, $N$ views (2 large, and $N - 2$ small), resized $z ^ { 1 }$ twoand $z ^ { 2 }$ ferent resolutions arfor large views, and $\{ \bar { z } ^ { n } \} _ { n = 3 } ^ { N }$ ed, and further encoded into the feature maps embeddingsfor small views. The spatial matching loss function is then defined as follows:
82
+
83
+ $$
84
+ \mathcal { L } _ { s } ( \{ z ^ { n } \} _ { n = 1 } ^ { N } ) = \sum _ { m = 1 } ^ { 2 } \sum _ { n \neq m } ^ { N } \{ \sum _ { p \in P } l ( z _ { p } ^ { m } , z _ { \mathrm { N N } ( p ) } ^ { n } ) + \sum _ { p \in P } l ( z _ { p } ^ { n } , z _ { \mathrm { N N } ( p ) } ^ { m } ) \} ,
85
+ $$
86
+
87
+ where only the top- $\gamma _ { 1 }$ and top- $\gamma _ { 2 }$ pairs of feature vectors of large and small views respectively are kept in the computation of the loss. The feature-based loss function, and the global criterion are adapted in a very similar way, one large view is matched to the other large views and to the small views, and the final loss function is defined as follows:
88
+
89
+ $$
90
+ \mathscr { L } ( \{ z ^ { n } \} _ { n = 1 } ^ { N } ) = \alpha \ell ( \{ z _ { \oplus } ^ { n } \} _ { n = 1 } ^ { N } ) + ( 1 - \alpha ) \{ \mathscr { L } _ { s } ( \{ z ^ { n } \} _ { n = 1 } ^ { N } ) + \mathscr { L } _ { d } ( \{ z ^ { n } \} _ { n = 1 } ^ { N } ) \} .
91
+ $$
92
+
93
+ Table 1: Comparison of various global and local self-supervised learning methods on different linear evaluation benchmarks. Evaluation of the features learned from a ResNet-50 backbone trained with different methods on: (1) linear classification accuracy $( \% )$ (frozen) on the validation set of ImageNet (2) Linear segmentation (mIoU) (frozen and fine-tuning) on Pascal VOC, (3) Linear segmentation (mIoU) (frozen) on Cityscapes. $\alpha$ is the weight of Eq. (4) balancing the importance given to the global criterion, compared to the local criterion. The best result for each benchmark is bold font. VICRegL consistently improves the linear segmentation mIoU over the VICReg baseline, which shows that introducing a local criterion is beneficial for a localized understanding of the image.
94
+
95
+ <table><tr><td></td><td colspan="2">Linear Cls. (%)</td><td colspan="3">Linear Seg. (mIoU)</td></tr><tr><td>Method</td><td>Epochs</td><td>ImageNet Frozen</td><td>Pascal VOC Frozen</td><td>Fine-Tuned</td><td>Cityscapes Frozen</td></tr><tr><td>Global features</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MoCo v2 [Chen et al., 2020b]</td><td>200</td><td>67.5</td><td>35.6</td><td>64.8</td><td>14.3</td></tr><tr><td>SimCLR[Chen et al., 2020a]</td><td>400</td><td>68.2</td><td>45.9</td><td>65.4</td><td>17.9</td></tr><tr><td>BYOL [Grill et al., 2020]</td><td>300</td><td>72.3</td><td>47.1</td><td>65.7</td><td>22.6</td></tr><tr><td>VICReg [Bardes et al.,2022]</td><td>300</td><td>71.5</td><td>47.8</td><td>65.5</td><td>23.5</td></tr><tr><td>Local features</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PixPro [Xie et al., 2021]</td><td>400</td><td>60.6</td><td>52.8</td><td>67.5</td><td>22.6</td></tr><tr><td>DenseCL [Wang et al., 2021]</td><td>200</td><td>65.0</td><td>45.3</td><td>66.8</td><td>11.2</td></tr><tr><td>DetCon [Hénaff et al., 2021]</td><td>1000</td><td>66.3</td><td>53.6</td><td>67.4</td><td>16.2</td></tr><tr><td>InsLoc [Yang et al., 2022]</td><td>400</td><td>45.0</td><td>24.1</td><td>64.4</td><td>7.0</td></tr><tr><td>CP² [Wang et al., 2022]</td><td>820</td><td>53.1</td><td>21.7</td><td>65.2</td><td>8.4</td></tr><tr><td>ReSim [Xiao et al., 2021]</td><td>400</td><td>59.5</td><td>51.9</td><td>67.3</td><td>12.3</td></tr><tr><td>Ours</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VICRegL α = 0.9</td><td>300</td><td>71.2</td><td>54.0</td><td>66.6</td><td>25.1</td></tr><tr><td> VICRegL α = 0.75</td><td>300</td><td>70.4</td><td> 55.9</td><td>67.6</td><td>25.2</td></tr></table>
96
+
97
+ # 3.3 Implementation details
98
+
99
+ We provide here the implementation details necessary to reproduce the results obtained with our best ResNet-50 and ConvNeXts models. All the models are pretrained on the 1000-class unlabelled ImageNet dataset. Most hyper-parameters are kept unchanged compared to the implementation provided by [Bardes et al., 2022], the VICReg loss variance, invariance and covariance coefficients are set to 25, 25 and 1. The global expander is a 3-layers fully-connected network with dimensions (2048-8192-8192-8192). The local projector is much smaller, due to memory limitations, and has dimensions (2048-512-512-512). With the ResNet-50 backbone, we train our models on 32 Nvidia Tesla V100-32Gb GPUs, with the LARS optimizer [You et al., 2017, Goyal et al., 2017], a weight decay of $1 0 ^ { - 6 }$ , a batch size of 2048 and a learning rate of 0.1. The learning rate follows a cosine decay schedule [Loshchilov and Hutter, 2017], starting from 0 with 10 warmup epochs and with final value of 0.002. The number of selected best matches $\gamma$ of Eq. (2) and (3) is set to 20. With ConvNeXts backbones, we noticed that much smaller batch sizes actually improve the performance, we therefore train our ConvNeXt-S models on 8 Nvidia Tesla V100-32Gb GPUs, with the AdamW optimizer [Loshchilov and Hutter, 2019], a weight decay of $1 0 ^ { - 6 }$ , a batch size of 384 and a learning rate of 0.001, and our ConvNeXt-B models on 16 Nvidia Tesla V100-32Gb GPUs with a batch size of 572 and the same other hyper-parameters. The learning rate follows a cosine decay schedule, starting from 0 with 10 warmup epochs and with final value of 0.00001. The number of selected best matches $\gamma _ { 1 }$ and $\gamma _ { 2 }$ of Eq. (5) are set to 20 for feature maps from large views and 4 for feature maps from small views.
100
+
101
+ # 4 Experimental Results
102
+
103
+ In this section, we evaluate the representations obtained after pretraining VICRegL with a ResNet-50, and ConvNeXt backbones [Liu et al., 2022] of various size, on linear classification on ImageNet1k [Deng et al., 2009], and linear semantic segmentation on Pacal VOC [Everingham et al., 2010], Cityscapes [Cordts et al., 2016] and ADE20k [Zhou et al., 2019]. We demonstrate that VICRegL strongly improves on segmentation results over VICReg while preserving the classification performance, and is competitive with other local and global self-supervised learning methods. We choose the linear evaluation with frozen weights as our main evaluation metrics, as we believe it is a much better way of evaluating the learned representations. Indeed, the performance can not be attributed to the use of a complex segmentation head, or to the availability of the ground truth masks, and contrary to the frozen setting, the fine-tuning setting measures whether the relevant information is present in the representation, but does not measure if the information is easily extractable from it. We perform the linear evaluation using the protocol introduced by [Zhou et al., 2022a], where the learned feature maps are fed to a linear classifier that outputs a vector with the same size as the number of target classes in the dataset, and is then upsampled to the resolution of the image to produce the predicted mask. The results are averaged over 3 runs with randomly initialized parameters and we found that the difference in performance between worse and best runs is always lower than $0 . 2 \%$ .
104
+
105
+ Table 2: Comparison of various global and local self-supervised learning methods on different linear evaluation benchmarks. Evaluation of the features learned from ConvNeXt and ViT backbones trained with different methods on: (1) linear classification accuracy $( \% )$ (frozen) on the validation set of ImageNet (2) Linear segmentation (mIoU) (frozen and fine-tuning) on Pascal VOC, (3) Linear segmentation (mIoU) (frozen) on ADE20k. $\alpha$ is the weight of Eq. (4) balancing the importance given to the global criterion, compared to the local criterion. The best result for each benchmark is bold font. $\dagger$ denotes pretraining on ImageNet-22k.
106
+
107
+ <table><tr><td></td><td></td><td></td><td></td><td colspan="2">Linear Cls. (%)</td><td colspan="2">Linear Seg. (mloU)</td></tr><tr><td>Method</td><td></td><td>Backbone Params</td><td>Epochs</td><td>ImageNet Frozen</td><td>Pascal VOC Frozen</td><td>FT</td><td>ADE20k Frozen</td></tr><tr><td>Global features</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MoCo v3 [Chen et al., 2021]</td><td>ViT-S</td><td>21M</td><td>300</td><td>73.2</td><td>57.1</td><td>75.9</td><td>23.7</td></tr><tr><td>DINO [Caron et al., 2021]</td><td>ViT-S</td><td>21M</td><td>400</td><td>77.0</td><td>65.2</td><td>79.5</td><td>30.5</td></tr><tr><td>IBOT[Zhou et al., 2022a]</td><td>ViT-S</td><td>21M</td><td>400</td><td>77.9</td><td>68.2</td><td>79.9</td><td>33.2</td></tr><tr><td>VICReg [Bardes et al., 2022]</td><td>CNX-S</td><td>50M</td><td>400</td><td>76.2</td><td>60.1</td><td>77.8</td><td>28.6</td></tr><tr><td>MoCo v3</td><td>ViT-B</td><td>85M</td><td>300</td><td>76.7</td><td>64.8</td><td>78.9</td><td>28.7</td></tr><tr><td>DINO</td><td>ViT-B</td><td>85M</td><td>400</td><td>78.2</td><td>70.1</td><td>82.0</td><td>34.5</td></tr><tr><td>IBOT [Zhou et al., 2022a]</td><td>ViT-B</td><td>85M</td><td>400</td><td>79.5</td><td>73.0</td><td>82.4</td><td>38.3</td></tr><tr><td>MAE [He et al., 2022]</td><td>ViT-B</td><td>85M</td><td>400</td><td>68.0</td><td>59.6</td><td>82.4</td><td>27.0</td></tr><tr><td>VICReg</td><td>CNX-B</td><td>85M</td><td>400</td><td>77.6</td><td>67.2</td><td>81.1</td><td>32.7</td></tr><tr><td>Local features</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CP² [Wang et al., 2022]</td><td>ViT-S</td><td>21M</td><td>320</td><td>62.8</td><td>63.5</td><td>79.6</td><td>25.3</td></tr><tr><td>Ours</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VICRegL α = 0.9</td><td>CNX-S</td><td>50M</td><td>400</td><td>75.9</td><td>66.7</td><td>80.0</td><td>30.8</td></tr><tr><td>VICRegL α = 0.75</td><td>CNX-S</td><td>50M</td><td>400</td><td>74.6</td><td>67.5</td><td>80.6</td><td>31.2</td></tr><tr><td>VICRegL α = 0.9</td><td>CNX-B</td><td>85M</td><td>400</td><td>77.1</td><td>69.3</td><td>81.2</td><td>33.5</td></tr><tr><td>VICRegL α = 0.75</td><td>CNX-B</td><td>85M</td><td>400</td><td>76.3</td><td>70.4</td><td>82.5</td><td>35.3</td></tr><tr><td>VICRegL α = 0.75+</td><td> CNX-XL</td><td>350M</td><td>150</td><td>79.4</td><td>78.7</td><td>84.1</td><td>43.2</td></tr></table>
108
+
109
+ # 4.1 Comparison with prior work
110
+
111
+ ResNet-50 backbone. Table 1 presents our results against several other global and local selfsupervised learning methods, all pretrained with a ResNet-50 backbone [He et al., 2016]. The main observation we make is the improvement of VICRegL over VICReg on linear segmentation. On Pascal VOC, when the weights of the backbone are frozen, VICRegL $\alpha = 0 . 9$ improves by $+ 6 . 2$ mIoU while only loosing $0 . 3 \%$ classification accuracy, and VICRegL $\alpha = 0 . 7 5$ improves by $\mathbf { + 8 . 1 }$ mIoU. On fine-tuning the improvement is less significative, which we attribute to the non-informative nature of fine-tuning benchmarks. Indeed, some methods like InsLoc and $\mathrm { C P ^ { 2 } }$ that seem competitive on fine-tuning significantly underperform in the frozen regime, which shows that the actual performance of these methods can be attributed to the fact that the weights of the backbone benefit form the availability of the labels during the fine-tuning phase. On Cityscapes, which is much harder, most methods do not perform very well in the linear frozen regime, which sets a new challenge for selfsupervised learning of local features. VICRegL outperforms the VICReg baseline by ${ + 1 . 7 }$ mIoU, as well as every other local features methods by a significant margin. The second observation we make is the robustness of VICRegL in classification, which indicates that it learns both local and global features at the same time. The performance of most local methods is greatly impacted on classification where they all perform around 10 to $20 \%$ below global methods. Global methods on the contrary are efficient for classification but underperform in segmentation compared to VICRegL.
112
+
113
+ ![](images/b27d297dccbb3e53bb7dc837d75a74a2dfbedc5ed13a2978a8a5752c500cd92a.jpg)
114
+ Figure 2: Study of the trade-off between local and global criteria. Evaluation on linear classification on ImageNet and on linear Segmentation on Pascal VOC of VICRegL pretrained with various $\alpha$ coefficients of Eq. (4), controlling the importance of the global criterion against the local criterion.
115
+
116
+ Table 3: Ablation: matching criterion. Comparison between using the feature-based matching loss $( \mathcal { L } _ { d } )$ , the location-based matching loss $( \mathcal { L } _ { s } )$ none of the two (Baseline), or both at the same time.
117
+
118
+ <table><tr><td>Method</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>Baseline</td><td>73.8</td><td>56.0</td></tr><tr><td>Ls</td><td>73.5</td><td>58.9</td></tr><tr><td>Ld</td><td>73.6</td><td>57.7</td></tr><tr><td>Ls-Ld</td><td>73.6</td><td>60.3</td></tr></table>
119
+
120
+ ![](images/6852a7b2a0ccd830c64b94fcc62b87381c43a2bc1a13d57f9be9426d2a5722fe.jpg)
121
+ Figure 3: Selected matches: visualization of the locations of the best local matches selected by VICRegL. Left image is the seed image, with in red and blue the crop locations for the two views. Left column are the feature-based matches. Right column are the location-based matches. Only 10 matches are visualized for better clarity, but the actual number of selected matches is 20. We display the matches according to the location of the feature vectors in the feature maps. Note that the receptive field of these feature vectors is much larger than only the patch represented by one square of the grid in the figure. Best viewed in color with zoom.
122
+
123
+ ConvNeXt backbone. Table 2 presents our results when pretraining with ConvNeXts backbones against several other global and local self-supervised learning methods pretrained with vision transformers [Dosovitskiy et al., 2021]. Similar to our experiments with a ResNet-50 backbone, the main observation we make is the improvement on segmentation tasks provided by the introduction of the local criterion. With a ConvNeXt-S backbone, in the linear frozen regime, VICRegL $\alpha = 0 . 9$ improves over VICReg by $+ 6 . 6$ mIoU on the Pascal VOC, and by $+ 2 . 2$ mIoU on the ADE20K, while preserving most of the classification accuracy. VICRegL $\alpha = 0 . 7 5$ further improves by $\mathbf { + 7 . 4 }$ mIoU and $\mathbf { + 3 . 6 }$ over VICReg on these two benchmarks respectively. With a ConvNeXt-B backbone, the performance improvement remain consistent over VICReg, and VICRegL $\alpha = 0 . 7 5$ is competitive with other strong methods such as DINO and IBOT. The improvement also remain consistent in linear fine-tuning where VICRegL also achieves a strong performance. Finally, we report the performance of a much larger ConvNeXt-XL backbone, pretrained in ImageNet-22k, which is significantly improved on segmentation tasks and set a new state-of-the art in linear segmentation. Our results highlight the trade-off between classification and segmentation performance, which can be controlled by the weight given to the local criterion.
124
+
125
+ # 4.2 Ablations
126
+
127
+ For all the experiments done in this section, unless specified otherwise, we pretrain a ConvNeXt-S on ImageNet over 100 epochs, with the hyper-parameters described in Section 3.3, and report both the linear classification accuracy on ImageNet, and the linear frozen segmentation mIoU on Pascal VOC.
128
+
129
+ Table 4: Ablation: SSL criterion. Introducing our local criterion with VICReg gives a stronger improvement compared to SimCLR, which is contrastive. (ResNet-50, 300 epochs)
130
+
131
+ <table><tr><td>Method</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>VICReg</td><td>71.1</td><td>47.8</td></tr><tr><td>VICRegL</td><td>70.4</td><td> 55.9</td></tr><tr><td>SimCLR</td><td>67.5</td><td>45.9</td></tr><tr><td>SimCLR-L</td><td>66.6</td><td>51.3</td></tr></table>
132
+
133
+ Table 5: Ablation: impact of multi-crop. Introducing our local criterion yields an improved performance with or without the usage of multicrop.
134
+
135
+ <table><tr><td>Method</td><td>Multi-crop</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>VICReg</td><td></td><td>70.1</td><td>52.9</td></tr><tr><td>VICRegL</td><td></td><td>69.9</td><td>57.8</td></tr><tr><td>VICReg</td><td>√</td><td>73.9</td><td>54.4</td></tr><tr><td>VICRegL</td><td>√</td><td>73.6</td><td>60.3</td></tr></table>
136
+
137
+ Table 6: Ablation: number of selected matches. The large feature maps are of size $7 \times 7$ and the small ones are of size $3 \times 3$ . There are therefore a total number of 49 large and 9 small feature vectors and as many possible matches, and only the top- $\gamma _ { 1 }$ large and top- $\gamma _ { 2 }$ small are kept.
138
+
139
+ <table><tr><td>Y1</td><td>γ2</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>10</td><td>2</td><td>73.4</td><td>59.2</td></tr><tr><td>20</td><td>4</td><td>73.6</td><td>60.3</td></tr><tr><td>49</td><td>9</td><td>73.5</td><td>59.6</td></tr></table>
140
+
141
+ Table 7: Ablation: VICReg local criterion. The collapse problem is automatically prevented with the global criterion. We study here how regularizing the local feature vectors influence the performance. V: variance criterion is used, I: invariance criterion is used, C: covariance criterion is used.
142
+
143
+ <table><tr><td>Criterion</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>I</td><td>73.4</td><td>59.0</td></tr><tr><td>VI</td><td>73.3</td><td>58.2</td></tr><tr><td>VIC</td><td>73.6</td><td>60.3</td></tr></table>
144
+
145
+ Trade-off between the local and global criterion. The parameter $\alpha$ of Eq. (4) controls the importance that is given to the global criterion, compared to the local criterion. Figure 2 shows that there exists a fundamental trade-off between the ability of a model to learn global visual features, as opposed to learning local features. In the case $\alpha = 1 . 0$ , which is simply VICReg, the model is very efficient at producing global representations of the image, as demonstrated by the performance of $7 3 . 9 \%$ in classification accuracy. When $\alpha < 1$ , which introduces the local criterion, the performance in segmentation is greatly increased, by $+ 3 . 4$ mIoU when $\alpha = 0 . 9$ , $\pm 4 . 3$ mIoU when $\alpha = 0 . 7 5$ and $+ 4 . 6$ mIoU when the local and global criteria are weighted equally. At the same time, the classification accuracy only drops by respectively $0 . 2 \%$ , $1 . 2 \%$ and $2 . 9 \%$ . This highlights the existence of a sweet spot, where the model is strongly performing at both classification and segmentation, which indicates that it has learned both meaningful local and global features. When $\alpha$ decreases too much, the model starts to lose its performance in both tasks, which shows that having a global understanding of the image is necessary, even for localized tasks.
146
+
147
+ Study of the importance between feature-based and location-based local criteria. VICRegL matches feature vectors according to a location-based criterion $\mathcal { L } _ { s }$ of Eq. (2) and a feature-based criterion $\mathcal { L } _ { d }$ of Eq. (3). Table 3 study the importance of these criterion. Baseline in the table means that no local criterion is used, and is simply VICReg. The location-based criterion gives the best improvement by $\mathbf { + 2 . 9 }$ mIoU over the baseline, compared to only ${ + 1 . 7 }$ mIoU for the feature-based criterion, but it is the combination of the two that significantly improves over the baseline by $\mathbf { + 4 . 3 }$ mIoU, which shows that using both the learned distance in the embedding space in combination with the actual distance in the pixel space produces local features with the best quality. In all cases, the classification accuracy is not affected, which is expected as the local criterion has little effect on the quality of the global features, and therefore on the downstream classification accuracy.
148
+
149
+ Study of the number of matches. We study here the influence of changing the number of selected best matches $\gamma _ { 1 }$ and $\gamma _ { 2 }$ of Eq. (5), to keep for the computation of the local losses. For our experiments with multi-crop, the size of the feature maps is $( 2 0 4 8 \times 7 \times 7 )$ for the large crops and $( 2 0 4 8 \times 3 \times 3 )$ for the small crops. There are therefore in one branch of the siamese architecture 49 feature maps for large crops, and 9 for small crops. Tables 6 shows that there is a trade-off between keeping all the matches $\gamma _ { 1 } = 4 9$ and $\gamma _ { 2 } = 9$ ), and keeping a small number of matches $\gamma _ { 1 } = 1 0$ and $\gamma _ { 2 } = 2 \quad ,$ ), and that the best segmentation performance is obtained with an in-between number of matches, $\gamma _ { 1 } = 2 0$ and $\gamma _ { 2 } = 4$ ), which improves by $\mathbf { + 0 . 7 \ m I o U }$ compared to keeping all the matches. Similar to the study on the influence of the local losses, the classification accuracy is not affected, as the local criterion does not improve or degrade the global features.
150
+
151
+ Study of VICReg components for the local criterion. The global criterion is sufficient for the vectors to not collapse to trivial solutions. We therefore investigate if introducing the variance (V) and covariance (C) criterion, in addition to the invariance (I) criterion, applied by the local loss functions on the feature vectors, is useful or not. Table 7 shows that these regularization criteria are actually helping the performance, introducing the variance criterion improves on segmentation by $\mathbf { + 0 . 8 \ m I o U }$ , and additionally adding the covariance criterion further improves the performance by $\mathbf { + 1 . 3 }$ mIoU over the baseline. Similar to other ablations on the local loss functions, the classification accuracy is not significantly impacted.
152
+
153
+ Study of a different collapse prevention method. Our collapse-prevention mechanism is the variance and covariance regularization of VICReg, which is a non-contrastive criterion that therefore does not contrast negatively on potential positive matchings. We study however the incorporation of our local criterion with a contrastive criterion, SimCLR [Chen et al., 2020a]. We simply replace VICReg by SimCLR in Eq. (2) and Eq. (3) and refer this new method as SimCLR-L. Table 4 reports the performance, and we observe that although there is a gap in performance between regular SimCLR and VICReg, the additional benefit provided by the local criterion is much stronger with VICReg.
154
+
155
+ Impact of multi-crop. We study the impact of using the multi-crop strategy for the data augmentation, by comparing VICReg to VICRegL. Table 5 reports our results. Whether multi-crop is used or not, introducing the local criterion always improve significantly the segmentation results, while preserving again most of the classification performance.
156
+
157
+ # 4.3 Visualization
158
+
159
+ We provide in Figure 3, a visualization of the pairs of matched feature vectors selected by VICRegL. Right to the seed image, the left column shows the feature-based matches, and the right column shows the location-based matches. Each case in the the grid represents a position in the feature map, and a match between two feature vectors is represented by a yellow line. The receptive field of these feature vectors is larger than a single case in the grid, and actually spans the entire image, but we observe that the embedding space is shaped such that the feature-based matching is coherent regarding the semantic content at a position in the image where a feature vector is pooled. A feature vector that is located at a position corresponding to a texture representing "sky" or "grass" in one view is matched to another one on the other view located at a position corresponding to a similar "sky" or "grass" texture. Additional visualizations are available in Appendix ??.
160
+
161
+ # 5 Conclusion
162
+
163
+ In this work, we introduced VICRegL, a method for learning both local and global visual features at the same time, by matching feature vectors with respect to their distance in the pixel space and in the embedding space. We show that introducing a local criterion significantly improves the performance on segmentation tasks, while preserving the classification accuracy. We also demonstrate that convolutional networks are competitive to vision transformers in self-supervised learning, by using the ConvNeXt backbone.
164
+
165
+ Limitations and Future work. Convolutional neural networks by design produce feature maps that have a receptive field that covers the entire image. It is not clear to which extent a feature vector at a given position in the feature maps actually contains mainly information about the objects located at the corresponding location in the input image. The learned tokens of a vision transformers are also good candidates for local features, and a detailed study of the actual local nature of both the feature vectors of a convolutional network and the tokens of a vision transformer, would provide useful insights for future directions of self-supervised learning of local features. Future work will also tackle the problem of learning hierarchical features, by applying a criterion not only at a local and a global scale, but also at multiple levels in the encoder network.
166
+
167
+ Acknowledgement. Jean Ponce was supported in part by the French government under management of Agence Nationale de la Recherche as part of the ”Investissements d’avenir” program, reference ANR-19-P3IA-0001 (PRAIRIE 3IA Institute), the Louis Vuitton/ENS Chair in Artificial Intelligence and the Inria/NYU collaboration. Adrien Bardes was supported in part by a FAIR/Prairie CIFRE PhD Fellowship. The authors wish to thank Li Jing, Randall Balestriero, Amir Bar, Grégoire Mialon, Jiachen Zhu, Quentin Garrido, Florian Bordes, Bobak Kiani, Surya Ganguli, Megi Dervichi, Yubei Chen, Mido Assran, Nicolas Ballas and Pascal Vincent for useful discussions.
168
+
169
+ # References
170
+
171
+ A. Bardes, J. Ponce, and Y. LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. In ICLR, 2022. 1, 2, 3, 6, 7
172
+ M. Caron, P. Bojanowski, A. Joulin, and M. Douze. Deep clustering for unsupervised learning. In ECCV, 2018. 2
173
+ M. Caron, I. Misra, J. Mairal, P. Goyal, P. Bojanowski, and A. Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In NeurIPS, 2020. 1, 2, 5
174
+ M. Caron, H. Touvron, I. Misra, H. Jegou, and J. M. P. B. A. Joulin. Emerging properties in self-supervised vision transformers. In ICCV, 2021. 1, 2, 7
175
+ T. Chen, S. Kornblith, M. Norouzi, and G. E. Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020a. 1, 2, 6, 10
176
+ X. Chen and K. He. Exploring simple siamese representation learning. In CVPR, 2020. 2
177
+ X. Chen, H. Fan, R. Girshick, and K. He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b. 1, 2, 6
178
+ X. Chen, S. Xie, and K. He. An empirical study of training self-supervised vision transformers. In ICCV, 2021. 1, 2, 7
179
+ Y. Chen, A. Bardes, Z. Li, and Y. LeCun. Intra-instance vicreg: Bag of self-supervised image patch embedding. arXiv preprint arXiv:2206.08954, 2022. 2
180
+ M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 6
181
+ J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 6
182
+ A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 8
183
+ D. Dwibedi, Y. Aytar, J. Tompson, P. Sermanet, and A. Zisserman. With a little help from my friends: Nearest-neighbor contrastive learning of visual representations. In ICCV, 2021. 2
184
+ A. El-Nouby, G. Izacard, H. Touvron, I. Laptev, H. Jegou, and E. Grave. Are large-scale datasets necessary for self-supervised pre-training? arXiv preprint arXiv:2112.10740, 2022. 1
185
+ M. Everingham, L. V. Gool, J. W. Christopher K. I. Williams, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 2010. 6
186
+ Q. Garrido, Y. Chen, A. Bardes, L. Najman, and Y. Lecun. On the duality between contrastive and non-contrastive self-supervised learning. arXiv preprint arXiv:2206.02574, 2022. 2
187
+ P. Goyal, P. Dollár, R. Girshick, P. Noordhuis, L. Wesolowski, A. Kyrola, A. Tulloch, Y. Jia, and K. He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. 6
188
+ J.-B. Grill, F. Strub, F. Altché, C. Tallec, P. H. Richemond, E. Buchatskaya, C. Doersch, B. A. Pires, Z. D. Guo, M. G. Azar, B. Piot, K. Kavukcuoglu, R. Munos, and M. Valko. Bootstrap your own latent: A new approach to self-supervised learning. In NeurIPS, 2020. 1, 2, 6
189
+ K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 7
190
+ K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 1, 2
191
+ K. He, X. Chen, S. Xie, Y. Li, P. Doll, and R. Girshick. Masked autoencoders are scalable vision learners. In CVPR, 2022. 7 R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, A. Trischler, and Y. Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019. 2 O. J. Hénaff, S. Koppula, J.-B. Alayrac, A. van den Oord, O. Vinyals, and J. Carreira. Efficient visual pretraining with contrastive detection. In ICCV, 2021. 1, 2, 3, 6 O. J. Hénaff, S. Koppula, E. Shelhamer, D. Zoran, A. Jaegle, A. Zisserman, J. Carreira, and R. Arandjelovic. Object discovery and representation networks. ´ arXiv preprint arXiv:2103.10957, 2022. 1,
192
+ 2, 3 K.-H. Lee, A. Arnab, S. Guadarrama, J. Canny, and I. Fischer. Compressive visual representations. In NeurIPS, 2021. 1, 2 C. Li, J. Yang, P. Zhang, M. Gao, B. Xiao, X. Dai, L. Yuan, and J. Gao. Efficient self-supervised vision transformers for representation learning. In ICLR, 2022. 1, 2 Z. Liu, H. Mao, C.-Y. Wu, C. Feichtenhofer, T. Darrell, and S. Xie. A convnet for the 2020s. In CVPR, 2022. 5, 6 I. Loshchilov and F. Hutter. Sgdr: stochastic gradient descent with warm restarts. In ICLR, 2017. 6 I. Loshchilov and F. Hutter. Decoupled weight decay regularization. In ICLR, 2019. 6 I. Misra and L. v. d. Maaten. Self-supervised learning of pretext-invariant representations. In CVPR,
193
+ 2020. 1 J. Mitrovic, B. McWilliams, J. Walker, L. Buesing, and C. Blundell. Representation learning via invariant causal mechanisms. In ICLR, 2021. 2 P. H. Richemond, J.-B. Grill, F. Altché, C. Tallec, F. Strub, A. Brock, S. Smith, S. De, R. Pascanu, B. Piot, and M. Valko. Byol works even without batch statistics. arXiv preprint arXiv:2010.10241,
194
+ 2020. 2 N. Tomasev, I. Bica, B. McWilliams, L. Buesing, R. Pascanu, C. Blundell, and J. Mitrovic. Pushing the limits of self-supervised resnets: Can we outperform supervised learning without labels on imagenet? arXiv preprint arXiv:2201.05119, 2022. 1, 2 F. Wang, H. Wang, C. Wei, A. Yuille, and W. Shen. Cp2: Copy-paste contrastive pretraining for semantic segmentation. arXiv preprint arXiv:2203.11709, 2022. 3, 6, 7 X. Wang, R. Zhang, C. Shen, T. Kong, and L. Li. Dense contrastive learning for self-supervised visual pre-training. In CVPR, 2021. 2, 6 T. Xiao, C. J. Reed, X. Wang, K. Keutzer, and T. Darrell. Region similarity representation learning. In ICCV, 2021. 2, 6 Z. Xie, Y. Lin, Z. Zhang, Y. Cao, S. Lin, and H. Hu. Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In CVPR, 2021. 1, 2, 6 C. Yang, Z. Wu, B. Zhou, and S. Lin. Instance localization for self-supervised detection pretraining. In CVPR, 2021. 1, 3 J. Yang, K. Zhang, Z. Cui, J. Su, J. Luo, and X. Wei. Inscon: Instance consistency feature representation via self-supervised learning. arXiv preprint arXiv:2203.07688, 2022. 1, 3, 6 Y. You, I. Gitman, and B. Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017. 6 J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny. Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arxiv:2103.03230, 2021. 1, 2 B. Zhou, H. Zhao, X. Puig, T. Xiao, S. Fidler, A. Barriuso, and A. Torralba. Semantic understanding of scenes through the ade20k dataset. IJCV, 2019. 6 J. Zhou, C. Wei, H. Wang, W. Shen, C. Xie, A. Yuille, and T. Kong. ibot: Image bert pre-training with online tokenizer. In ICLR, 2022a. 1, 2, 7 P. Zhou, Y. Zhou, C. Si, W. Yu, T. K. Ng, and S. Yan. Mugs: A multi-granular self-supervised learning framework. arXiv preprint arXiv:2203.14415, 2022b. 2
parse/dev/ePZsWeGJXyp/ePZsWeGJXyp_content_list.json ADDED
@@ -0,0 +1,933 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "VICRegL: Self-Supervised Learning of Local Visual Features ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 184,
8
+ 122,
9
+ 815,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Adrien Bardes1,2 ",
17
+ "bbox": [
18
+ 253,
19
+ 222,
20
+ 369,
21
+ 236
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Jean Ponce2,4 ",
28
+ "bbox": [
29
+ 452,
30
+ 220,
31
+ 550,
32
+ 236
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Yann LeCun1,3,4 ",
39
+ "bbox": [
40
+ 632,
41
+ 220,
42
+ 750,
43
+ 236
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "1Meta, FAIR \n2Inria, École normale supérieure, CNRS, PSL Research University \n3Courant Institute, New York University \n4Center for Data Science, New York University ",
50
+ "bbox": [
51
+ 279,
52
+ 238,
53
+ 718,
54
+ 296
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 332,
65
+ 535,
66
+ 348
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Most recent self-supervised methods for learning image representations focus on either producing a global feature with invariance properties, or producing a set of local features. The former works best for classification tasks while the latter is best for detection and segmentation tasks. This paper explores the fundamental tradeoff between learning local and global features. A new method called VICRegL is proposed that learns good global and local features simultaneously, yielding excellent performance on detection and segmentation tasks while maintaining good performance on classification tasks. Concretely, two identical branches of a standard convolutional net architecture are fed two differently distorted versions of the same image. The VICReg criterion is applied to pairs of global feature vectors. Simultaneously, the VICReg criterion is applied to pairs of local feature vectors occurring before the last pooling layer. Two local feature vectors are attracted to each other if their $l ^ { 2 }$ -distance is below a threshold or if their relative locations are consistent with a known geometric transformation between the two input images. We demonstrate strong performance on linear classification and segmentation transfer tasks. Code and pretrained models are publicly available at: https://github.com/facebookresearch/VICRegL ",
73
+ "bbox": [
74
+ 233,
75
+ 364,
76
+ 766,
77
+ 601
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 630,
88
+ 312,
89
+ 647
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recent advances in self-supervised learning for computer vision have been largely driven by downstream proxy tasks such as image categorization, with convolutional backbones [Chen et al., 2020a,b, Grill et al., 2020, Lee et al., 2021, Caron et al., 2020, Zbontar et al., 2021, Bardes et al., 2022, Tomasev et al., 2022], or vision transformers [Caron et al., 2021, Chen et al., 2021, Li et al., 2022, Zhou et al., 2022a]. Current approaches rely on a joint embedding architecture and a loss function that forces the learned features to be invariant to a sampling process selecting pairs of different views of the same image, obtained by transformation such as cropping, rescaling, or color jittering [Misra and Maaten, 2020, Chen et al., 2020a, He et al., 2020, Grill et al., 2020]. These methods learn to eliminate the irrelevant part of position and color information, in order to satisfy the invariance criterion, and perform well on image classification benchmarks. Some recent approaches go beyond learning global features: to tackle tasks such as semantic segmentation where spatial information plays a key role, [Yang et al., 2021, Xie et al., 2021, Hénaff et al., 2021, Yang et al., 2022, Hénaff et al., 2022, El-Nouby et al., 2022] also learn image models with more emphasis on local image structure. In the end most recent approaches to self-supervised learning of visual features learn the corresponding image model using either a (possibly quite sophisticated) global criterion, or a (necessarily) different one exploiting local image characteristics and spatial information. The best performing local methods require a non-parametric pre-processing step that compute unsupervised segmentation masks [Hénaff et al., 2021], which can be done online [Hénaff et al., 2022], but with an additional computational burden. ",
96
+ "bbox": [
97
+ 174,
98
+ 664,
99
+ 825,
100
+ 898
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 174,
109
+ 90,
110
+ 823,
111
+ 119
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We argue that more complex reasoning systems should be structured in a hierarchical way, by learning at several scales. To this end, we propose VICRegL, a method that learn features at a global scale, and that additionally uses spatial information, and matches feature vectors that are either pooled from close-by regions in the original input image, or close in the embedding space, therefore learning features at a local scale. In practice, the global VICReg criterion [Bardes et al., 2022] is applied to pairs of feature vectors, before and after the final pooling layer of a convolutional network, thus learning local and global features at the same time. When a segmentation mask is available as in [Hénaff et al., 2021], feature vectors that correspond to the same region in the mask can be pooled together, and compared using a contrastive loss function, which allows spatial vectors far away in the original image to be pooled together if they belong to the same object. In our case, segmentation masks are not available, and we therefore face two challenges: (1) there is no a priori information on how to pool vectors from the same object together, thus long-range matching should be learned in a self-supervised manner, and (2) contrasting negatively feature vectors corresponding to far away locations can have a negative effect, as these vectors could have been pooled from locations that represent the same object in the image. In order to address these issues, VICRegL (1) matches feature vectors according to a $l ^ { 2 }$ nearest-neighbor criterion exploiting both the distances between features and image locations, properly weighted, and (2) uses the VICReg criterion between matched feature vectors. We use VICReg for its simplicity and its non-contrastive nature, which alleviates the need for negative samples and therefore does not have an explicit negative contrasting effect between feature vectors that could have been potential matches. ",
118
+ "bbox": [
119
+ 174,
120
+ 126,
121
+ 825,
122
+ 401
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "We demonstrate the effectiveness of VICRegL by evaluating the learned representations on vision tasks such as image classification on ImageNet and semantic segmentation on various datasets. Our evaluation is (mostly) done in the setting where the backbone learned by VICRegL is frozen, with only a linear classification or segmentation head tuned to the task at hand. We believe that this setting is a much better evaluation metric than the commonly used fine-tuning benchmarks, as the performance can not be attributed to the use of a complex head, or to the availability of the ground truth masks. Our results show that learning local features, in addition to global features, does not hurt the classification performance, but significantly improves segmentation accuracy. On the Pascal VOC linear frozen semantic segmentation task, VICRegL achieves 55.9 mIoU with a ResNet-50 backbone, which is a ${ \\bf + 8 . 1 }$ mIoU improvement over VICReg, and 67.5 mIoU with a ConvNeXt-S backbone, which is a $+ 6 . 6$ mIoU improvement. ",
129
+ "bbox": [
130
+ 174,
131
+ 409,
132
+ 825,
133
+ 560
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 Related work ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 174,
143
+ 582,
144
+ 316,
145
+ 598
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Global features. Most recent methods for global feature learning are based on a joint embedding architecture that learns representations that are invariant to various views. These methods differ in the way collapsing solutions are avoided. Contrastive methods [Hjelm et al., 2019, Chen et al., 2020a, He et al., 2020, Chen et al., 2020b, Mitrovic et al., 2021, Dwibedi et al., 2021, Chen et al., 2021, Tomasev et al., 2022] uses negative samples to push dissimilar samples apart from each other. Clustering methods [Caron et al., 2018, 2020, 2021] ensure a balanced partition of the samples within a set of clusters. Non-contrastive methods, which are dual to contrastive ones [Garrido et al., 2022], rely on maintaining the informational content of the representations by either explicit regularization [Zbontar et al., 2021, Bardes et al., 2022] or architectural design [Chen and He, 2020, Grill et al., 2020, Richemond et al., 2020, Lee et al., 2021]. Finally, the best performing methods today are based on vision transformers [Caron et al., 2021, Chen et al., 2021, Li et al., 2022, Zhou et al., 2022a,b] and deliver strong results in both downstream classification and segmentation tasks. ",
152
+ "bbox": [
153
+ 174,
154
+ 614,
155
+ 825,
156
+ 780
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Local features. In opposition to global methods, local one focus on explicitly learning a set of local features that describe small parts of the image, which global methods do implicitly [Chen et al., 2022], and are therefore better suited for segmentation tasks. Indeed these methods commonly only evaluate on segmentation benchmarks. A contrastive loss function can be applied directly: (1) at the pixel level [Xie et al., 2021], which forces consistency between pixels at similar locations; (2) at the feature map level [Wang et al., 2021], which forces consistency between groups of pixels: (3) at the image region level [Xiao et al., 2021], which forces consistency between large regions that overlap in different views of an image. Similar to [Wang et al., 2021], our method VICRegL operates at the feature map level but with a more advanced matching criterion that takes into account the distance in pixel space between the objects. Copy pasting a patch on a random background [Yang et al., 2021, Wang et al., 2022] has also shown to be effective for learning to localize an object without relying on spurious correlations with the background. Aggregating multiple images corresponding to several object instances into a single image can also help the localization task [Yang et al., 2022]. These approaches rely on carefully and handcrafted constructions of new images with modified background or with aggregation of semantic content from several other images, which is not satisfactory, while our method simply rely on the classical augmentations commonly used in self-supervised learning. The best current approaches consist in using the information from unsupervised segmentation masks, which can be computed as a pre-processing step [Hénaff et al., 2021] or computed online [Hénaff et al., 2022]. The feature vectors coming from the same region in the mask are pooled together and the resulting vectors are contrasted between each other with a contrastive loss function. These approaches explicitly construct semantic segmentation masks using k-means for every input image, which is computationally not efficient, and is a strong inductive bias in the architecture. Our method does not rely on these masks and therefore learns less specialized features. ",
163
+ "bbox": [
164
+ 174,
165
+ 786,
166
+ 825,
167
+ 911
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "",
174
+ "bbox": [
175
+ 173,
176
+ 90,
177
+ 826,
178
+ 285
179
+ ],
180
+ "page_idx": 2
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "3 Method ",
185
+ "text_level": 1,
186
+ "bbox": [
187
+ 174,
188
+ 304,
189
+ 271,
190
+ 321
191
+ ],
192
+ "page_idx": 2
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "Background. VICReg was introduced as a self-supervised method for learning image representations that avoid the collapse problem by design. Its loss function is composed of three terms: a variance term, that preserves the variance of the embeddings, and consists in a hinge loss function on the standard deviation, on each component of the vectors individually and along the batch dimension; an invariance term, which is simply an $l ^ { 2 }$ distance between the embeddings from the two branches of a siamese architecture; and finally a covariance term, that decorrelates the different dimensions of the embeddings, by bringing to 0 the off-diagonal coefficients of the empirical covariance matrix of the embeddings. ",
197
+ "bbox": [
198
+ 173,
199
+ 335,
200
+ 825,
201
+ 448
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "For completeness, we describe how the VICReg framework works [Bardes et al., 2022]. A seed image $I$ is first sampled in the unlabelled training dataset. Two views $x$ and $x ^ { \\prime }$ are obtained by a rectangular crop at random locations in $I$ , rescaling them to a fixed size $( R , S )$ and applying various color jitters with random parameters. The views are fed to an encoder $\\dot { f } _ { \\theta } : \\mathbb { R } ^ { C \\times R \\times S } \\xrightarrow { } \\mathbb { R } ^ { \\tilde { C } }$ producing their representations $y = f _ { \\boldsymbol { \\theta } } ( x )$ and $y ^ { \\prime } = f _ { \\theta } ( x ^ { \\prime } ) \\in \\mathbb R ^ { C }$ , which are mapped by an expander $\\mathbf { \\Sigma } \\dot { h } _ { \\phi } : \\mathbb { R } ^ { C } \\overset { \\mathbf { \\Sigma } } { } \\mathbb { R } ^ { D }$ onto the embeddings $z = h _ { \\phi } ( y )$ and $z ^ { \\prime } = h _ { \\phi } ( y ^ { \\prime } ) \\in \\mathbb { R } ^ { D }$ . The VICReg loss function is defined as follows: ",
208
+ "bbox": [
209
+ 173,
210
+ 453,
211
+ 825,
212
+ 550
213
+ ],
214
+ "page_idx": 2
215
+ },
216
+ {
217
+ "type": "equation",
218
+ "img_path": "images/7e5008688d3dd8e9727406b81a904336fcd0e0596727075a525f922b083c8ba9.jpg",
219
+ "text": "$$\n\\ell ( z , z ^ { \\prime } ) = \\lambda s ( z , z ^ { \\prime } ) + \\mu [ v ( z ) + v ( z ^ { \\prime } ) ] + \\nu [ c ( z ) + c ( z ^ { \\prime } ) ] ,\n$$",
220
+ "text_format": "latex",
221
+ "bbox": [
222
+ 308,
223
+ 558,
224
+ 689,
225
+ 575
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "where $s , v$ and $c$ are the invariance, variance and covariance terms as described in [Bardes et al., 2022], and $\\lambda$ , $\\mu$ and $\\nu$ are scalar coefficients weighting the terms. ",
232
+ "bbox": [
233
+ 173,
234
+ 583,
235
+ 823,
236
+ 611
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "3.1 VICRegL: feature vectors matching ",
243
+ "text_level": 1,
244
+ "bbox": [
245
+ 174,
246
+ 627,
247
+ 462,
248
+ 643
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "When the encoder $f _ { \\theta }$ is a convolutional neural network, the final representations are obtained by performing an average pooling operation $\\oplus : \\mathbb { R } ^ { C \\times H \\times W } \\mathbb { R } ^ { C }$ on the output feature maps, with $C$ the number of channels and $( H , W )$ the spatial dimensions. We now denote the pooled representations $y _ { \\oplus }$ and $y _ { \\oplus } ^ { \\prime } \\in \\mathbb { R } ^ { C }$ and the unpooled representations $y$ and $y ^ { \\prime } \\in \\mathbb { R } ^ { C \\times H \\times W }$ . We denote $y _ { i , j }$ and $y _ { i , j } ^ { \\prime } \\in \\mathbb { R } ^ { C }$ the feature vectors at position $( i , j )$ in their corresponding feature maps. The main idea is to apply the VICReg criterion between pairs of feature vectors from $y$ and $y ^ { \\prime }$ , by matching an element of $y$ to one from $y ^ { \\prime }$ , using spatial and $l ^ { 2 }$ -distance based information. We introduce a local projector network $h _ { \\phi } ^ { l } : \\mathbb { R } ^ { \\tilde { C } \\times H \\times W } \\to \\mathbb { R } ^ { D \\times H \\times W }$ , that embed the feature maps $y$ and $y ^ { \\prime } \\in \\mathbb { R } ^ { C \\times H \\times W }$ onto feature maps embeddings $z = h _ { \\phi } ^ { l } ( y )$ and $z ^ { \\prime } = h _ { \\phi } ^ { l } ( y ^ { \\prime } ) \\in \\mathbb { R } ^ { D \\times H \\times W }$ . The standard expander of VICReg is now the global expander $h _ { \\psi } ^ { g } : \\mathbb { R } ^ { C } \\mathbb { R } ^ { D }$ , which maps the pooled representations $y _ { \\oplus }$ and $y _ { \\oplus } ^ { \\prime } \\in \\mathbb { R } ^ { C }$ to the embeddings $z _ { \\oplus } = h _ { \\psi } ^ { g } ( z _ { \\oplus } )$ and $z _ { \\oplus } ^ { \\prime } = h _ { \\psi } ^ { g } ( z _ { \\oplus } ^ { \\prime } ) \\in \\mathbb { R } ^ { D }$ . We describe now how we perform the matching, and introduce our loss functions. ",
255
+ "bbox": [
256
+ 173,
257
+ 654,
258
+ 825,
259
+ 835
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "Location-based matching. In order to take into account the transformation that occurs between the views $x$ and $x ^ { \\prime }$ of an image $I$ , and thus matching features from similar locations, we compute the absolute position in $I$ that corresponds to the coordinate of each feature vector in its feature map. Each feature vector $z _ { p }$ at position $p$ in the feature map is matched to its spatial nearest neighbor according the the absolute position in $I$ , and among the $H \\times W$ resulting pairs, only the top- $\\gamma$ pairs are kept. The location-based matching loss function is defined as follows: ",
266
+ "bbox": [
267
+ 174,
268
+ 842,
269
+ 825,
270
+ 911
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "image",
276
+ "img_path": "images/b98233657e067d35a65c70938c5e8214eab10ae5de06ddb23153174e73a35926.jpg",
277
+ "image_caption": [
278
+ "Figure 1: Overview of VICRegL: Learning local and global features with VICReg. Given a seed image, two views are produced and fed to an encoder that produces local features. The features are further processed by a local projector that embed them into a smaller space, without destroying the localization information. Two matchings, one based on the spatial information provided by the transformation between the views, the other one based on the $l ^ { 2 }$ -distance in the embedding space are computed, and the VICReg criterion is then applied between matched spatial embeddings. Additionally, the local features from the encoder are pooled together, and the pooled features are fed to a global expander. The VICReg criterion is finally applied between the two resulting embeddings. "
279
+ ],
280
+ "image_footnote": [],
281
+ "bbox": [
282
+ 178,
283
+ 89,
284
+ 823,
285
+ 308
286
+ ],
287
+ "page_idx": 3
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "",
292
+ "bbox": [
293
+ 173,
294
+ 458,
295
+ 655,
296
+ 473
297
+ ],
298
+ "page_idx": 3
299
+ },
300
+ {
301
+ "type": "equation",
302
+ "img_path": "images/4525d0fcb9b2ab6ad72f485902d43b4a30db18214bf3fd0173530dcff313e8ec.jpg",
303
+ "text": "$$\n\\mathcal { L } _ { s } ( z , z ^ { \\prime } ) = \\sum _ { p \\in P } l ( z _ { p } , z _ { \\mathrm { N N } ( p ) } ^ { \\prime } ) ,\n$$",
304
+ "text_format": "latex",
305
+ "bbox": [
306
+ 398,
307
+ 478,
308
+ 598,
309
+ 513
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "where the sum is over coordinates $p$ in $P = \\{ ( h , w ) \\mid ( h , w ) \\in [ 1 , . . . , H ] \\times [ 1 , . . . , W ] \\}$ the set of all coordinates in the feature map, and $\\mathrm { N N } ( p )$ denotes the (spatially) closest coordinate $p ^ { \\prime }$ to $p$ according to the actual distance in the seed image. ",
316
+ "bbox": [
317
+ 174,
318
+ 518,
319
+ 825,
320
+ 561
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Feature-based matching. In addition to matching features that are close in terms of location in the original image, we match features that are close in the embedding space. Each feature vector $z _ { p }$ at position $p$ is matched to its nearest neighbor in $z ^ { \\prime }$ according to the $l ^ { 2 }$ distance in the embedding space, and among the $H \\times W$ resulting pairs, only the top- $\\gamma$ pairs are kept. The feature-based matching loss function is defined as follows: ",
327
+ "bbox": [
328
+ 173,
329
+ 566,
330
+ 825,
331
+ 637
332
+ ],
333
+ "page_idx": 3
334
+ },
335
+ {
336
+ "type": "equation",
337
+ "img_path": "images/dff4eac298853f1f27cd88c99dfb726466c604035ccee6be93d9b970c109ba56.jpg",
338
+ "text": "$$\n\\mathcal { L } _ { d } ( z , z ^ { \\prime } ) = \\sum _ { p \\in P } l ( z _ { p } , \\mathrm { N N } ^ { \\prime } ( z _ { p } ) ) ,\n$$",
339
+ "text_format": "latex",
340
+ "bbox": [
341
+ 392,
342
+ 640,
343
+ 606,
344
+ 675
345
+ ],
346
+ "page_idx": 3
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "where the sum is over coordinates $p$ in $P$ and $\\mathrm { N N } ^ { \\prime } ( z _ { p } )$ denotes the closest feature vector to $z _ { p }$ in the feature maps $z ^ { \\prime }$ , in terms of the $l ^ { 2 }$ -distance. Similar to the location-based loss function, the featurebased loss function enforces invariance on a local scale, but between vectors that are close in the embedding space, and not necessarily pooled from the same location in the seed image. The purpose of this loss function is mainly to capture long-range interactions not captured by the location-based matching. ",
351
+ "bbox": [
352
+ 173,
353
+ 680,
354
+ 825,
355
+ 767
356
+ ],
357
+ "page_idx": 3
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "The general idea of top- $\\gamma$ filtering is to eliminate the mismatched pairs of feature vectors that are too far away in the image for the location-based matching, and that therefore probably do not represent the same objects, but most importantly that are probably mismatched for the feature-based matching, especially at the beginning of the training when the network matches feature vectors representing different objects or textures. Sometime, two views don’t or barely overlap, for the feature-based matching this is not an issue, as the purpose of this matching is to capture long-range interactions not captured by location-based matching. For the location-based matching, given the parameters we use to generate the views (each view covers between $8 \\%$ and $100 \\%$ of the image, chosen uniformly), the probability for the views to not overlap is small, and even in that case matching the closest points between the views does not degrade the final performance. Indeed, we have tried to use a variable number of matches and a threshold value used to compute the matches, which did not improve the performance compared to using a fixed number of matches. In practice, there are with high probability always good local features to match as the views have a low probability of not overlapping, and this explains why always matching the top- $\\gamma$ pairs, compared to introducing a threshold value at which the pair is considered a match, does not degrade the performance. ",
362
+ "bbox": [
363
+ 173,
364
+ 772,
365
+ 825,
366
+ 911
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "",
373
+ "bbox": [
374
+ 174,
375
+ 90,
376
+ 825,
377
+ 161
378
+ ],
379
+ "page_idx": 4
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Our final loss function is a combination of the location-based and feature-based loss functions, which form the local criterion, with in addition a standard VICReg loss function applied on the pooled representations, which is the global criterion. Both location and feature-based loss functions are symmetrized, because for both, the search for the best match is not a symmetric operation. Our final loss function is described as follows: ",
384
+ "bbox": [
385
+ 173,
386
+ 166,
387
+ 825,
388
+ 236
389
+ ],
390
+ "page_idx": 4
391
+ },
392
+ {
393
+ "type": "equation",
394
+ "img_path": "images/96e5220d2dd0348141b4b6d3be021dbd3ec1a21e7527f4f0e2c1385d930abb94.jpg",
395
+ "text": "$$\n\\mathcal { L } ( z , z ^ { \\prime } ) = \\alpha \\ell ( z _ { \\oplus } , z _ { \\oplus } ^ { \\prime } ) + ( 1 - \\alpha ) \\{ \\mathcal { L } _ { s } ( z , z ^ { \\prime } ) + \\mathcal { L } _ { s } ( z ^ { \\prime } , z ) + \\mathcal { L } _ { d } ( z , z ^ { \\prime } ) + \\mathcal { L } _ { d } ( z ^ { \\prime } , z ) \\} ,\n$$",
396
+ "text_format": "latex",
397
+ "bbox": [
398
+ 227,
399
+ 243,
400
+ 767,
401
+ 262
402
+ ],
403
+ "page_idx": 4
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "where $\\alpha$ is an hyper-parameter controlling the importance one wants to put on learning global rather than local features. We study later in Section 4.2 the influence of $\\alpha$ on the downstream performance, and show that there exists a trade-off such that the learned representations contain local and global information at the same time, and therefore transfer well on both image classification and segmentation tasks. ",
408
+ "bbox": [
409
+ 174,
410
+ 268,
411
+ 825,
412
+ 338
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "3.2 VICRegL with the ConvNeXt backbone ",
419
+ "text_level": 1,
420
+ "bbox": [
421
+ 174,
422
+ 354,
423
+ 490,
424
+ 371
425
+ ],
426
+ "page_idx": 4
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "The feature matching procedure is designed to work with any kind of convolutional neural network. In the experimental section, we provide results with a standard ResNet-50 backbone. However, one can considerably improve the performance on downstream tasks by using a more sophisticated backbone. We propose to use the recently introduced ConvNeXt architecture [Liu et al., 2022], that is very similar to the ResNet one, but with many simple modifications to the original architecture, which make it work as well as modern vision transformers. To the best of our knowledge, this is the first time ConvNeXts have been used in self-supervised learning, and our work shows that convolutional neural networks are still able to deliver state-of-the-art performances in most standard self-supervised learning benchmarks. In order to make the performance competitive with recent approaches, we use the multi-crop strategy introduced in [Caron et al., 2020]. Surprisingly, we found that the combination of multi-crop with encoders from the ResNet family and the VICReg criterion is extremely difficult to optimize, and haven’t been able to make it work properly. However, multi-crop shows very good results when combined with ConvNeXts. Our intuitive explanation is based on a study of the optimal batch size. The VICReg criterion regularizes the empirical covariance matrix of the embeddings, computed using the current batch, and we hypothesize that there is a link between the size of the batch, and the dimensionality of the representations. VICReg combined with a ResNet-50 has shown to have an optimal batch size of 2048, which is exactly the dimensionality of the representations of a ResNet-50. We found that the optimal batch size when working with ConvNeXts is 512 which is much smaller, and correlates with the fact that ConvNeXts also have smaller representations (768 for ConvNeXt-S and 1024 for ConvNeXt-B). The optimal batch size might therefore be close to the dimensionality of the representations. Now, the multi-crop strategy artificially increases the size of the batch, which is much easier to handle when the size of the batch before multi-crop is small. Indeed the effective batch size otherwise becomes too large, which causes optimization issues. ",
431
+ "bbox": [
432
+ 173,
433
+ 380,
434
+ 825,
435
+ 699
436
+ ],
437
+ "page_idx": 4
438
+ },
439
+ {
440
+ "type": "text",
441
+ "text": "We now describe how the matching loss functions are adapted in order to work with multi-crop. Instead of generating only two views of the seed image, $N$ views (2 large, and $N - 2$ small), resized $z ^ { 1 }$ twoand $z ^ { 2 }$ ferent resolutions arfor large views, and $\\{ \\bar { z } ^ { n } \\} _ { n = 3 } ^ { N }$ ed, and further encoded into the feature maps embeddingsfor small views. The spatial matching loss function is then defined as follows: ",
442
+ "bbox": [
443
+ 174,
444
+ 705,
445
+ 826,
446
+ 775
447
+ ],
448
+ "page_idx": 4
449
+ },
450
+ {
451
+ "type": "equation",
452
+ "img_path": "images/64d13d5221fedde969cf80a2e1c8c74d4d71ca2dae6aaffeba9064887e14b837.jpg",
453
+ "text": "$$\n\\mathcal { L } _ { s } ( \\{ z ^ { n } \\} _ { n = 1 } ^ { N } ) = \\sum _ { m = 1 } ^ { 2 } \\sum _ { n \\neq m } ^ { N } \\{ \\sum _ { p \\in P } l ( z _ { p } ^ { m } , z _ { \\mathrm { N N } ( p ) } ^ { n } ) + \\sum _ { p \\in P } l ( z _ { p } ^ { n } , z _ { \\mathrm { N N } ( p ) } ^ { m } ) \\} ,\n$$",
454
+ "text_format": "latex",
455
+ "bbox": [
456
+ 276,
457
+ 779,
458
+ 720,
459
+ 825
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "where only the top- $\\gamma _ { 1 }$ and top- $\\gamma _ { 2 }$ pairs of feature vectors of large and small views respectively are kept in the computation of the loss. The feature-based loss function, and the global criterion are adapted in a very similar way, one large view is matched to the other large views and to the small views, and the final loss function is defined as follows: ",
466
+ "bbox": [
467
+ 174,
468
+ 832,
469
+ 825,
470
+ 887
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "equation",
476
+ "img_path": "images/8cd42f3fe48b7a24a93597e2706e23a4c85ce58d2a028fee9e13ac850191d6cb.jpg",
477
+ "text": "$$\n\\mathscr { L } ( \\{ z ^ { n } \\} _ { n = 1 } ^ { N } ) = \\alpha \\ell ( \\{ z _ { \\oplus } ^ { n } \\} _ { n = 1 } ^ { N } ) + ( 1 - \\alpha ) \\{ \\mathscr { L } _ { s } ( \\{ z ^ { n } \\} _ { n = 1 } ^ { N } ) + \\mathscr { L } _ { d } ( \\{ z ^ { n } \\} _ { n = 1 } ^ { N } ) \\} .\n$$",
478
+ "text_format": "latex",
479
+ "bbox": [
480
+ 253,
481
+ 893,
482
+ 745,
483
+ 914
484
+ ],
485
+ "page_idx": 4
486
+ },
487
+ {
488
+ "type": "table",
489
+ "img_path": "images/7869cba0b8099e1665f7747b4481f1790612ebd9a4922f2ed2598975df10c83f.jpg",
490
+ "table_caption": [
491
+ "Table 1: Comparison of various global and local self-supervised learning methods on different linear evaluation benchmarks. Evaluation of the features learned from a ResNet-50 backbone trained with different methods on: (1) linear classification accuracy $( \\% )$ (frozen) on the validation set of ImageNet (2) Linear segmentation (mIoU) (frozen and fine-tuning) on Pascal VOC, (3) Linear segmentation (mIoU) (frozen) on Cityscapes. $\\alpha$ is the weight of Eq. (4) balancing the importance given to the global criterion, compared to the local criterion. The best result for each benchmark is bold font. VICRegL consistently improves the linear segmentation mIoU over the VICReg baseline, which shows that introducing a local criterion is beneficial for a localized understanding of the image. "
492
+ ],
493
+ "table_footnote": [],
494
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Linear Cls. (%)</td><td colspan=\"3\">Linear Seg. (mIoU)</td></tr><tr><td>Method</td><td>Epochs</td><td>ImageNet Frozen</td><td>Pascal VOC Frozen</td><td>Fine-Tuned</td><td>Cityscapes Frozen</td></tr><tr><td>Global features</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MoCo v2 [Chen et al., 2020b]</td><td>200</td><td>67.5</td><td>35.6</td><td>64.8</td><td>14.3</td></tr><tr><td>SimCLR[Chen et al., 2020a]</td><td>400</td><td>68.2</td><td>45.9</td><td>65.4</td><td>17.9</td></tr><tr><td>BYOL [Grill et al., 2020]</td><td>300</td><td>72.3</td><td>47.1</td><td>65.7</td><td>22.6</td></tr><tr><td>VICReg [Bardes et al.,2022]</td><td>300</td><td>71.5</td><td>47.8</td><td>65.5</td><td>23.5</td></tr><tr><td>Local features</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PixPro [Xie et al., 2021]</td><td>400</td><td>60.6</td><td>52.8</td><td>67.5</td><td>22.6</td></tr><tr><td>DenseCL [Wang et al., 2021]</td><td>200</td><td>65.0</td><td>45.3</td><td>66.8</td><td>11.2</td></tr><tr><td>DetCon [Hénaff et al., 2021]</td><td>1000</td><td>66.3</td><td>53.6</td><td>67.4</td><td>16.2</td></tr><tr><td>InsLoc [Yang et al., 2022]</td><td>400</td><td>45.0</td><td>24.1</td><td>64.4</td><td>7.0</td></tr><tr><td>CP² [Wang et al., 2022]</td><td>820</td><td>53.1</td><td>21.7</td><td>65.2</td><td>8.4</td></tr><tr><td>ReSim [Xiao et al., 2021]</td><td>400</td><td>59.5</td><td>51.9</td><td>67.3</td><td>12.3</td></tr><tr><td>Ours</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VICRegL α = 0.9</td><td>300</td><td>71.2</td><td>54.0</td><td>66.6</td><td>25.1</td></tr><tr><td> VICRegL α = 0.75</td><td>300</td><td>70.4</td><td> 55.9</td><td>67.6</td><td>25.2</td></tr></table>",
495
+ "bbox": [
496
+ 210,
497
+ 222,
498
+ 785,
499
+ 478
500
+ ],
501
+ "page_idx": 5
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "3.3 Implementation details ",
506
+ "text_level": 1,
507
+ "bbox": [
508
+ 174,
509
+ 503,
510
+ 374,
511
+ 518
512
+ ],
513
+ "page_idx": 5
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "We provide here the implementation details necessary to reproduce the results obtained with our best ResNet-50 and ConvNeXts models. All the models are pretrained on the 1000-class unlabelled ImageNet dataset. Most hyper-parameters are kept unchanged compared to the implementation provided by [Bardes et al., 2022], the VICReg loss variance, invariance and covariance coefficients are set to 25, 25 and 1. The global expander is a 3-layers fully-connected network with dimensions (2048-8192-8192-8192). The local projector is much smaller, due to memory limitations, and has dimensions (2048-512-512-512). With the ResNet-50 backbone, we train our models on 32 Nvidia Tesla V100-32Gb GPUs, with the LARS optimizer [You et al., 2017, Goyal et al., 2017], a weight decay of $1 0 ^ { - 6 }$ , a batch size of 2048 and a learning rate of 0.1. The learning rate follows a cosine decay schedule [Loshchilov and Hutter, 2017], starting from 0 with 10 warmup epochs and with final value of 0.002. The number of selected best matches $\\gamma$ of Eq. (2) and (3) is set to 20. With ConvNeXts backbones, we noticed that much smaller batch sizes actually improve the performance, we therefore train our ConvNeXt-S models on 8 Nvidia Tesla V100-32Gb GPUs, with the AdamW optimizer [Loshchilov and Hutter, 2019], a weight decay of $1 0 ^ { - 6 }$ , a batch size of 384 and a learning rate of 0.001, and our ConvNeXt-B models on 16 Nvidia Tesla V100-32Gb GPUs with a batch size of 572 and the same other hyper-parameters. The learning rate follows a cosine decay schedule, starting from 0 with 10 warmup epochs and with final value of 0.00001. The number of selected best matches $\\gamma _ { 1 }$ and $\\gamma _ { 2 }$ of Eq. (5) are set to 20 for feature maps from large views and 4 for feature maps from small views. ",
518
+ "bbox": [
519
+ 173,
520
+ 530,
521
+ 825,
522
+ 791
523
+ ],
524
+ "page_idx": 5
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "4 Experimental Results ",
529
+ "text_level": 1,
530
+ "bbox": [
531
+ 174,
532
+ 810,
533
+ 385,
534
+ 828
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "In this section, we evaluate the representations obtained after pretraining VICRegL with a ResNet-50, and ConvNeXt backbones [Liu et al., 2022] of various size, on linear classification on ImageNet1k [Deng et al., 2009], and linear semantic segmentation on Pacal VOC [Everingham et al., 2010], Cityscapes [Cordts et al., 2016] and ADE20k [Zhou et al., 2019]. We demonstrate that VICRegL strongly improves on segmentation results over VICReg while preserving the classification performance, and is competitive with other local and global self-supervised learning methods. We choose the linear evaluation with frozen weights as our main evaluation metrics, as we believe it is a much better way of evaluating the learned representations. Indeed, the performance can not be attributed to the use of a complex segmentation head, or to the availability of the ground truth masks, and contrary to the frozen setting, the fine-tuning setting measures whether the relevant information is present in the representation, but does not measure if the information is easily extractable from it. We perform the linear evaluation using the protocol introduced by [Zhou et al., 2022a], where the learned feature maps are fed to a linear classifier that outputs a vector with the same size as the number of target classes in the dataset, and is then upsampled to the resolution of the image to produce the predicted mask. The results are averaged over 3 runs with randomly initialized parameters and we found that the difference in performance between worse and best runs is always lower than $0 . 2 \\%$ . ",
541
+ "bbox": [
542
+ 174,
543
+ 842,
544
+ 825,
545
+ 911
546
+ ],
547
+ "page_idx": 5
548
+ },
549
+ {
550
+ "type": "table",
551
+ "img_path": "images/c6fc33382d61a1b21918bf06a2351504aaa07191adb334271f96b811a366ec92.jpg",
552
+ "table_caption": [
553
+ "Table 2: Comparison of various global and local self-supervised learning methods on different linear evaluation benchmarks. Evaluation of the features learned from ConvNeXt and ViT backbones trained with different methods on: (1) linear classification accuracy $( \\% )$ (frozen) on the validation set of ImageNet (2) Linear segmentation (mIoU) (frozen and fine-tuning) on Pascal VOC, (3) Linear segmentation (mIoU) (frozen) on ADE20k. $\\alpha$ is the weight of Eq. (4) balancing the importance given to the global criterion, compared to the local criterion. The best result for each benchmark is bold font. $\\dagger$ denotes pretraining on ImageNet-22k. "
554
+ ],
555
+ "table_footnote": [],
556
+ "table_body": "<table><tr><td></td><td></td><td></td><td></td><td colspan=\"2\">Linear Cls. (%)</td><td colspan=\"2\">Linear Seg. (mloU)</td></tr><tr><td>Method</td><td></td><td>Backbone Params</td><td>Epochs</td><td>ImageNet Frozen</td><td>Pascal VOC Frozen</td><td>FT</td><td>ADE20k Frozen</td></tr><tr><td>Global features</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MoCo v3 [Chen et al., 2021]</td><td>ViT-S</td><td>21M</td><td>300</td><td>73.2</td><td>57.1</td><td>75.9</td><td>23.7</td></tr><tr><td>DINO [Caron et al., 2021]</td><td>ViT-S</td><td>21M</td><td>400</td><td>77.0</td><td>65.2</td><td>79.5</td><td>30.5</td></tr><tr><td>IBOT[Zhou et al., 2022a]</td><td>ViT-S</td><td>21M</td><td>400</td><td>77.9</td><td>68.2</td><td>79.9</td><td>33.2</td></tr><tr><td>VICReg [Bardes et al., 2022]</td><td>CNX-S</td><td>50M</td><td>400</td><td>76.2</td><td>60.1</td><td>77.8</td><td>28.6</td></tr><tr><td>MoCo v3</td><td>ViT-B</td><td>85M</td><td>300</td><td>76.7</td><td>64.8</td><td>78.9</td><td>28.7</td></tr><tr><td>DINO</td><td>ViT-B</td><td>85M</td><td>400</td><td>78.2</td><td>70.1</td><td>82.0</td><td>34.5</td></tr><tr><td>IBOT [Zhou et al., 2022a]</td><td>ViT-B</td><td>85M</td><td>400</td><td>79.5</td><td>73.0</td><td>82.4</td><td>38.3</td></tr><tr><td>MAE [He et al., 2022]</td><td>ViT-B</td><td>85M</td><td>400</td><td>68.0</td><td>59.6</td><td>82.4</td><td>27.0</td></tr><tr><td>VICReg</td><td>CNX-B</td><td>85M</td><td>400</td><td>77.6</td><td>67.2</td><td>81.1</td><td>32.7</td></tr><tr><td>Local features</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CP² [Wang et al., 2022]</td><td>ViT-S</td><td>21M</td><td>320</td><td>62.8</td><td>63.5</td><td>79.6</td><td>25.3</td></tr><tr><td>Ours</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>VICRegL α = 0.9</td><td>CNX-S</td><td>50M</td><td>400</td><td>75.9</td><td>66.7</td><td>80.0</td><td>30.8</td></tr><tr><td>VICRegL α = 0.75</td><td>CNX-S</td><td>50M</td><td>400</td><td>74.6</td><td>67.5</td><td>80.6</td><td>31.2</td></tr><tr><td>VICRegL α = 0.9</td><td>CNX-B</td><td>85M</td><td>400</td><td>77.1</td><td>69.3</td><td>81.2</td><td>33.5</td></tr><tr><td>VICRegL α = 0.75</td><td>CNX-B</td><td>85M</td><td>400</td><td>76.3</td><td>70.4</td><td>82.5</td><td>35.3</td></tr><tr><td>VICRegL α = 0.75+</td><td> CNX-XL</td><td>350M</td><td>150</td><td>79.4</td><td>78.7</td><td>84.1</td><td>43.2</td></tr></table>",
557
+ "bbox": [
558
+ 189,
559
+ 200,
560
+ 802,
561
+ 497
562
+ ],
563
+ "page_idx": 6
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "",
568
+ "bbox": [
569
+ 173,
570
+ 522,
571
+ 825,
572
+ 675
573
+ ],
574
+ "page_idx": 6
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "4.1 Comparison with prior work ",
579
+ "text_level": 1,
580
+ "bbox": [
581
+ 176,
582
+ 693,
583
+ 413,
584
+ 707
585
+ ],
586
+ "page_idx": 6
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "ResNet-50 backbone. Table 1 presents our results against several other global and local selfsupervised learning methods, all pretrained with a ResNet-50 backbone [He et al., 2016]. The main observation we make is the improvement of VICRegL over VICReg on linear segmentation. On Pascal VOC, when the weights of the backbone are frozen, VICRegL $\\alpha = 0 . 9$ improves by $+ 6 . 2$ mIoU while only loosing $0 . 3 \\%$ classification accuracy, and VICRegL $\\alpha = 0 . 7 5$ improves by $\\mathbf { + 8 . 1 }$ mIoU. On fine-tuning the improvement is less significative, which we attribute to the non-informative nature of fine-tuning benchmarks. Indeed, some methods like InsLoc and $\\mathrm { C P ^ { 2 } }$ that seem competitive on fine-tuning significantly underperform in the frozen regime, which shows that the actual performance of these methods can be attributed to the fact that the weights of the backbone benefit form the availability of the labels during the fine-tuning phase. On Cityscapes, which is much harder, most methods do not perform very well in the linear frozen regime, which sets a new challenge for selfsupervised learning of local features. VICRegL outperforms the VICReg baseline by ${ + 1 . 7 }$ mIoU, as well as every other local features methods by a significant margin. The second observation we make is the robustness of VICRegL in classification, which indicates that it learns both local and global features at the same time. The performance of most local methods is greatly impacted on classification where they all perform around 10 to $20 \\%$ below global methods. Global methods on the contrary are efficient for classification but underperform in segmentation compared to VICRegL. ",
591
+ "bbox": [
592
+ 173,
593
+ 718,
594
+ 825,
595
+ 911
596
+ ],
597
+ "page_idx": 6
598
+ },
599
+ {
600
+ "type": "image",
601
+ "img_path": "images/b27d297dccbb3e53bb7dc837d75a74a2dfbedc5ed13a2978a8a5752c500cd92a.jpg",
602
+ "image_caption": [
603
+ "Figure 2: Study of the trade-off between local and global criteria. Evaluation on linear classification on ImageNet and on linear Segmentation on Pascal VOC of VICRegL pretrained with various $\\alpha$ coefficients of Eq. (4), controlling the importance of the global criterion against the local criterion. "
604
+ ],
605
+ "image_footnote": [],
606
+ "bbox": [
607
+ 181,
608
+ 99,
609
+ 491,
610
+ 276
611
+ ],
612
+ "page_idx": 7
613
+ },
614
+ {
615
+ "type": "table",
616
+ "img_path": "images/1e58d41a7fd33898268373339ea4b9dbbd52d3d1fe7cdfe39835a0d762250bcb.jpg",
617
+ "table_caption": [
618
+ "Table 3: Ablation: matching criterion. Comparison between using the feature-based matching loss $( \\mathcal { L } _ { d } )$ , the location-based matching loss $( \\mathcal { L } _ { s } )$ none of the two (Baseline), or both at the same time. "
619
+ ],
620
+ "table_footnote": [],
621
+ "table_body": "<table><tr><td>Method</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>Baseline</td><td>73.8</td><td>56.0</td></tr><tr><td>Ls</td><td>73.5</td><td>58.9</td></tr><tr><td>Ld</td><td>73.6</td><td>57.7</td></tr><tr><td>Ls-Ld</td><td>73.6</td><td>60.3</td></tr></table>",
622
+ "bbox": [
623
+ 222,
624
+ 462,
625
+ 441,
626
+ 540
627
+ ],
628
+ "page_idx": 7
629
+ },
630
+ {
631
+ "type": "image",
632
+ "img_path": "images/6852a7b2a0ccd830c64b94fcc62b87381c43a2bc1a13d57f9be9426d2a5722fe.jpg",
633
+ "image_caption": [
634
+ "Figure 3: Selected matches: visualization of the locations of the best local matches selected by VICRegL. Left image is the seed image, with in red and blue the crop locations for the two views. Left column are the feature-based matches. Right column are the location-based matches. Only 10 matches are visualized for better clarity, but the actual number of selected matches is 20. We display the matches according to the location of the feature vectors in the feature maps. Note that the receptive field of these feature vectors is much larger than only the patch represented by one square of the grid in the figure. Best viewed in color with zoom. "
635
+ ],
636
+ "image_footnote": [],
637
+ "bbox": [
638
+ 509,
639
+ 90,
640
+ 821,
641
+ 337
642
+ ],
643
+ "page_idx": 7
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "",
648
+ "bbox": [
649
+ 176,
650
+ 571,
651
+ 825,
652
+ 613
653
+ ],
654
+ "page_idx": 7
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "ConvNeXt backbone. Table 2 presents our results when pretraining with ConvNeXts backbones against several other global and local self-supervised learning methods pretrained with vision transformers [Dosovitskiy et al., 2021]. Similar to our experiments with a ResNet-50 backbone, the main observation we make is the improvement on segmentation tasks provided by the introduction of the local criterion. With a ConvNeXt-S backbone, in the linear frozen regime, VICRegL $\\alpha = 0 . 9$ improves over VICReg by $+ 6 . 6$ mIoU on the Pascal VOC, and by $+ 2 . 2$ mIoU on the ADE20K, while preserving most of the classification accuracy. VICRegL $\\alpha = 0 . 7 5$ further improves by $\\mathbf { + 7 . 4 }$ mIoU and $\\mathbf { + 3 . 6 }$ over VICReg on these two benchmarks respectively. With a ConvNeXt-B backbone, the performance improvement remain consistent over VICReg, and VICRegL $\\alpha = 0 . 7 5$ is competitive with other strong methods such as DINO and IBOT. The improvement also remain consistent in linear fine-tuning where VICRegL also achieves a strong performance. Finally, we report the performance of a much larger ConvNeXt-XL backbone, pretrained in ImageNet-22k, which is significantly improved on segmentation tasks and set a new state-of-the art in linear segmentation. Our results highlight the trade-off between classification and segmentation performance, which can be controlled by the weight given to the local criterion. ",
659
+ "bbox": [
660
+ 174,
661
+ 619,
662
+ 825,
663
+ 827
664
+ ],
665
+ "page_idx": 7
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "4.2 Ablations ",
670
+ "text_level": 1,
671
+ "bbox": [
672
+ 174,
673
+ 843,
674
+ 279,
675
+ 858
676
+ ],
677
+ "page_idx": 7
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "For all the experiments done in this section, unless specified otherwise, we pretrain a ConvNeXt-S on ImageNet over 100 epochs, with the hyper-parameters described in Section 3.3, and report both the linear classification accuracy on ImageNet, and the linear frozen segmentation mIoU on Pascal VOC. ",
682
+ "bbox": [
683
+ 176,
684
+ 869,
685
+ 825,
686
+ 911
687
+ ],
688
+ "page_idx": 7
689
+ },
690
+ {
691
+ "type": "table",
692
+ "img_path": "images/409848c646a89deb8fa54431ca4712e19c7b61851245a711e8335be4e6a1605c.jpg",
693
+ "table_caption": [
694
+ "Table 4: Ablation: SSL criterion. Introducing our local criterion with VICReg gives a stronger improvement compared to SimCLR, which is contrastive. (ResNet-50, 300 epochs) "
695
+ ],
696
+ "table_footnote": [],
697
+ "table_body": "<table><tr><td>Method</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>VICReg</td><td>71.1</td><td>47.8</td></tr><tr><td>VICRegL</td><td>70.4</td><td> 55.9</td></tr><tr><td>SimCLR</td><td>67.5</td><td>45.9</td></tr><tr><td>SimCLR-L</td><td>66.6</td><td>51.3</td></tr></table>",
698
+ "bbox": [
699
+ 230,
700
+ 159,
701
+ 429,
702
+ 227
703
+ ],
704
+ "page_idx": 8
705
+ },
706
+ {
707
+ "type": "table",
708
+ "img_path": "images/706e5a44fdde824daafe5b3d117b9934634d0bdeb103bd669872e36190c9d9b7.jpg",
709
+ "table_caption": [
710
+ "Table 5: Ablation: impact of multi-crop. Introducing our local criterion yields an improved performance with or without the usage of multicrop. "
711
+ ],
712
+ "table_footnote": [],
713
+ "table_body": "<table><tr><td>Method</td><td>Multi-crop</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>VICReg</td><td></td><td>70.1</td><td>52.9</td></tr><tr><td>VICRegL</td><td></td><td>69.9</td><td>57.8</td></tr><tr><td>VICReg</td><td>√</td><td>73.9</td><td>54.4</td></tr><tr><td>VICRegL</td><td>√</td><td>73.6</td><td>60.3</td></tr></table>",
714
+ "bbox": [
715
+ 531,
716
+ 159,
717
+ 787,
718
+ 227
719
+ ],
720
+ "page_idx": 8
721
+ },
722
+ {
723
+ "type": "table",
724
+ "img_path": "images/046625e3f141d75d864af03611b553837aa9ff9f8816060d2f65a499c608d96c.jpg",
725
+ "table_caption": [
726
+ "Table 6: Ablation: number of selected matches. The large feature maps are of size $7 \\times 7$ and the small ones are of size $3 \\times 3$ . There are therefore a total number of 49 large and 9 small feature vectors and as many possible matches, and only the top- $\\gamma _ { 1 }$ large and top- $\\gamma _ { 2 }$ small are kept. "
727
+ ],
728
+ "table_footnote": [],
729
+ "table_body": "<table><tr><td>Y1</td><td>γ2</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>10</td><td>2</td><td>73.4</td><td>59.2</td></tr><tr><td>20</td><td>4</td><td>73.6</td><td>60.3</td></tr><tr><td>49</td><td>9</td><td>73.5</td><td>59.6</td></tr></table>",
730
+ "bbox": [
731
+ 236,
732
+ 332,
733
+ 423,
734
+ 388
735
+ ],
736
+ "page_idx": 8
737
+ },
738
+ {
739
+ "type": "table",
740
+ "img_path": "images/0e249ecaa4c8fd8ebece63953f3b73ae580e04deab1399d13b01e1993b3a2283.jpg",
741
+ "table_caption": [
742
+ "Table 7: Ablation: VICReg local criterion. The collapse problem is automatically prevented with the global criterion. We study here how regularizing the local feature vectors influence the performance. V: variance criterion is used, I: invariance criterion is used, C: covariance criterion is used. "
743
+ ],
744
+ "table_footnote": [],
745
+ "table_body": "<table><tr><td>Criterion</td><td>Cls. (%)</td><td>Seg. (mIoU)</td></tr><tr><td>I</td><td>73.4</td><td>59.0</td></tr><tr><td>VI</td><td>73.3</td><td>58.2</td></tr><tr><td>VIC</td><td>73.6</td><td>60.3</td></tr></table>",
746
+ "bbox": [
747
+ 563,
748
+ 330,
749
+ 751,
750
+ 388
751
+ ],
752
+ "page_idx": 8
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Trade-off between the local and global criterion. The parameter $\\alpha$ of Eq. (4) controls the importance that is given to the global criterion, compared to the local criterion. Figure 2 shows that there exists a fundamental trade-off between the ability of a model to learn global visual features, as opposed to learning local features. In the case $\\alpha = 1 . 0$ , which is simply VICReg, the model is very efficient at producing global representations of the image, as demonstrated by the performance of $7 3 . 9 \\%$ in classification accuracy. When $\\alpha < 1$ , which introduces the local criterion, the performance in segmentation is greatly increased, by $+ 3 . 4$ mIoU when $\\alpha = 0 . 9$ , $\\pm 4 . 3$ mIoU when $\\alpha = 0 . 7 5$ and $+ 4 . 6$ mIoU when the local and global criteria are weighted equally. At the same time, the classification accuracy only drops by respectively $0 . 2 \\%$ , $1 . 2 \\%$ and $2 . 9 \\%$ . This highlights the existence of a sweet spot, where the model is strongly performing at both classification and segmentation, which indicates that it has learned both meaningful local and global features. When $\\alpha$ decreases too much, the model starts to lose its performance in both tasks, which shows that having a global understanding of the image is necessary, even for localized tasks. ",
757
+ "bbox": [
758
+ 174,
759
+ 407,
760
+ 825,
761
+ 588
762
+ ],
763
+ "page_idx": 8
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Study of the importance between feature-based and location-based local criteria. VICRegL matches feature vectors according to a location-based criterion $\\mathcal { L } _ { s }$ of Eq. (2) and a feature-based criterion $\\mathcal { L } _ { d }$ of Eq. (3). Table 3 study the importance of these criterion. Baseline in the table means that no local criterion is used, and is simply VICReg. The location-based criterion gives the best improvement by $\\mathbf { + 2 . 9 }$ mIoU over the baseline, compared to only ${ + 1 . 7 }$ mIoU for the feature-based criterion, but it is the combination of the two that significantly improves over the baseline by $\\mathbf { + 4 . 3 }$ mIoU, which shows that using both the learned distance in the embedding space in combination with the actual distance in the pixel space produces local features with the best quality. In all cases, the classification accuracy is not affected, which is expected as the local criterion has little effect on the quality of the global features, and therefore on the downstream classification accuracy. ",
768
+ "bbox": [
769
+ 173,
770
+ 593,
771
+ 825,
772
+ 732
773
+ ],
774
+ "page_idx": 8
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "Study of the number of matches. We study here the influence of changing the number of selected best matches $\\gamma _ { 1 }$ and $\\gamma _ { 2 }$ of Eq. (5), to keep for the computation of the local losses. For our experiments with multi-crop, the size of the feature maps is $( 2 0 4 8 \\times 7 \\times 7 )$ for the large crops and $( 2 0 4 8 \\times 3 \\times 3 )$ for the small crops. There are therefore in one branch of the siamese architecture 49 feature maps for large crops, and 9 for small crops. Tables 6 shows that there is a trade-off between keeping all the matches $\\gamma _ { 1 } = 4 9$ and $\\gamma _ { 2 } = 9$ ), and keeping a small number of matches $\\gamma _ { 1 } = 1 0$ and $\\gamma _ { 2 } = 2 \\quad ,$ ), and that the best segmentation performance is obtained with an in-between number of matches, $\\gamma _ { 1 } = 2 0$ and $\\gamma _ { 2 } = 4$ ), which improves by $\\mathbf { + 0 . 7 \\ m I o U }$ compared to keeping all the matches. Similar to the study on the influence of the local losses, the classification accuracy is not affected, as the local criterion does not improve or degrade the global features. ",
779
+ "bbox": [
780
+ 173,
781
+ 738,
782
+ 825,
783
+ 877
784
+ ],
785
+ "page_idx": 8
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Study of VICReg components for the local criterion. The global criterion is sufficient for the vectors to not collapse to trivial solutions. We therefore investigate if introducing the variance (V) and covariance (C) criterion, in addition to the invariance (I) criterion, applied by the local loss functions on the feature vectors, is useful or not. Table 7 shows that these regularization criteria are actually helping the performance, introducing the variance criterion improves on segmentation by $\\mathbf { + 0 . 8 \\ m I o U }$ , and additionally adding the covariance criterion further improves the performance by $\\mathbf { + 1 . 3 }$ mIoU over the baseline. Similar to other ablations on the local loss functions, the classification accuracy is not significantly impacted. ",
790
+ "bbox": [
791
+ 174,
792
+ 883,
793
+ 821,
794
+ 911
795
+ ],
796
+ "page_idx": 8
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "",
801
+ "bbox": [
802
+ 174,
803
+ 90,
804
+ 825,
805
+ 174
806
+ ],
807
+ "page_idx": 9
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "Study of a different collapse prevention method. Our collapse-prevention mechanism is the variance and covariance regularization of VICReg, which is a non-contrastive criterion that therefore does not contrast negatively on potential positive matchings. We study however the incorporation of our local criterion with a contrastive criterion, SimCLR [Chen et al., 2020a]. We simply replace VICReg by SimCLR in Eq. (2) and Eq. (3) and refer this new method as SimCLR-L. Table 4 reports the performance, and we observe that although there is a gap in performance between regular SimCLR and VICReg, the additional benefit provided by the local criterion is much stronger with VICReg. ",
812
+ "bbox": [
813
+ 173,
814
+ 181,
815
+ 825,
816
+ 279
817
+ ],
818
+ "page_idx": 9
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Impact of multi-crop. We study the impact of using the multi-crop strategy for the data augmentation, by comparing VICReg to VICRegL. Table 5 reports our results. Whether multi-crop is used or not, introducing the local criterion always improve significantly the segmentation results, while preserving again most of the classification performance. ",
823
+ "bbox": [
824
+ 174,
825
+ 284,
826
+ 825,
827
+ 339
828
+ ],
829
+ "page_idx": 9
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "4.3 Visualization ",
834
+ "text_level": 1,
835
+ "bbox": [
836
+ 174,
837
+ 356,
838
+ 303,
839
+ 371
840
+ ],
841
+ "page_idx": 9
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "We provide in Figure 3, a visualization of the pairs of matched feature vectors selected by VICRegL. Right to the seed image, the left column shows the feature-based matches, and the right column shows the location-based matches. Each case in the the grid represents a position in the feature map, and a match between two feature vectors is represented by a yellow line. The receptive field of these feature vectors is larger than a single case in the grid, and actually spans the entire image, but we observe that the embedding space is shaped such that the feature-based matching is coherent regarding the semantic content at a position in the image where a feature vector is pooled. A feature vector that is located at a position corresponding to a texture representing \"sky\" or \"grass\" in one view is matched to another one on the other view located at a position corresponding to a similar \"sky\" or \"grass\" texture. Additional visualizations are available in Appendix ??. ",
846
+ "bbox": [
847
+ 174,
848
+ 381,
849
+ 825,
850
+ 520
851
+ ],
852
+ "page_idx": 9
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "5 Conclusion ",
857
+ "text_level": 1,
858
+ "bbox": [
859
+ 174,
860
+ 539,
861
+ 299,
862
+ 556
863
+ ],
864
+ "page_idx": 9
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "In this work, we introduced VICRegL, a method for learning both local and global visual features at the same time, by matching feature vectors with respect to their distance in the pixel space and in the embedding space. We show that introducing a local criterion significantly improves the performance on segmentation tasks, while preserving the classification accuracy. We also demonstrate that convolutional networks are competitive to vision transformers in self-supervised learning, by using the ConvNeXt backbone. ",
869
+ "bbox": [
870
+ 174,
871
+ 570,
872
+ 825,
873
+ 654
874
+ ],
875
+ "page_idx": 9
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Limitations and Future work. Convolutional neural networks by design produce feature maps that have a receptive field that covers the entire image. It is not clear to which extent a feature vector at a given position in the feature maps actually contains mainly information about the objects located at the corresponding location in the input image. The learned tokens of a vision transformers are also good candidates for local features, and a detailed study of the actual local nature of both the feature vectors of a convolutional network and the tokens of a vision transformer, would provide useful insights for future directions of self-supervised learning of local features. Future work will also tackle the problem of learning hierarchical features, by applying a criterion not only at a local and a global scale, but also at multiple levels in the encoder network. ",
880
+ "bbox": [
881
+ 174,
882
+ 660,
883
+ 825,
884
+ 785
885
+ ],
886
+ "page_idx": 9
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "Acknowledgement. Jean Ponce was supported in part by the French government under management of Agence Nationale de la Recherche as part of the ”Investissements d’avenir” program, reference ANR-19-P3IA-0001 (PRAIRIE 3IA Institute), the Louis Vuitton/ENS Chair in Artificial Intelligence and the Inria/NYU collaboration. Adrien Bardes was supported in part by a FAIR/Prairie CIFRE PhD Fellowship. The authors wish to thank Li Jing, Randall Balestriero, Amir Bar, Grégoire Mialon, Jiachen Zhu, Quentin Garrido, Florian Bordes, Bobak Kiani, Surya Ganguli, Megi Dervichi, Yubei Chen, Mido Assran, Nicolas Ballas and Pascal Vincent for useful discussions. ",
891
+ "bbox": [
892
+ 174,
893
+ 791,
894
+ 825,
895
+ 888
896
+ ],
897
+ "page_idx": 9
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "References ",
902
+ "text_level": 1,
903
+ "bbox": [
904
+ 174,
905
+ 90,
906
+ 267,
907
+ 106
908
+ ],
909
+ "page_idx": 10
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "A. Bardes, J. Ponce, and Y. LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. In ICLR, 2022. 1, 2, 3, 6, 7 \nM. Caron, P. Bojanowski, A. Joulin, and M. Douze. Deep clustering for unsupervised learning. In ECCV, 2018. 2 \nM. Caron, I. Misra, J. Mairal, P. Goyal, P. Bojanowski, and A. Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In NeurIPS, 2020. 1, 2, 5 \nM. Caron, H. Touvron, I. Misra, H. Jegou, and J. M. P. B. A. Joulin. Emerging properties in self-supervised vision transformers. In ICCV, 2021. 1, 2, 7 \nT. Chen, S. Kornblith, M. Norouzi, and G. E. Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020a. 1, 2, 6, 10 \nX. Chen and K. He. Exploring simple siamese representation learning. In CVPR, 2020. 2 \nX. Chen, H. Fan, R. Girshick, and K. He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b. 1, 2, 6 \nX. Chen, S. Xie, and K. He. An empirical study of training self-supervised vision transformers. In ICCV, 2021. 1, 2, 7 \nY. Chen, A. Bardes, Z. Li, and Y. LeCun. Intra-instance vicreg: Bag of self-supervised image patch embedding. arXiv preprint arXiv:2206.08954, 2022. 2 \nM. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 6 \nJ. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 6 \nA. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 8 \nD. Dwibedi, Y. Aytar, J. Tompson, P. Sermanet, and A. Zisserman. With a little help from my friends: Nearest-neighbor contrastive learning of visual representations. In ICCV, 2021. 2 \nA. El-Nouby, G. Izacard, H. Touvron, I. Laptev, H. Jegou, and E. Grave. Are large-scale datasets necessary for self-supervised pre-training? arXiv preprint arXiv:2112.10740, 2022. 1 \nM. Everingham, L. V. Gool, J. W. Christopher K. I. Williams, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 2010. 6 \nQ. Garrido, Y. Chen, A. Bardes, L. Najman, and Y. Lecun. On the duality between contrastive and non-contrastive self-supervised learning. arXiv preprint arXiv:2206.02574, 2022. 2 \nP. Goyal, P. Dollár, R. Girshick, P. Noordhuis, L. Wesolowski, A. Kyrola, A. Tulloch, Y. Jia, and K. He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. 6 \nJ.-B. Grill, F. Strub, F. Altché, C. Tallec, P. H. Richemond, E. Buchatskaya, C. Doersch, B. A. Pires, Z. D. Guo, M. G. Azar, B. Piot, K. Kavukcuoglu, R. Munos, and M. Valko. Bootstrap your own latent: A new approach to self-supervised learning. In NeurIPS, 2020. 1, 2, 6 \nK. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 7 \nK. He, H. Fan, Y. Wu, S. Xie, and R. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 1, 2 \nK. He, X. Chen, S. Xie, Y. Li, P. Doll, and R. Girshick. Masked autoencoders are scalable vision learners. In CVPR, 2022. 7 R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, A. Trischler, and Y. Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019. 2 O. J. Hénaff, S. Koppula, J.-B. Alayrac, A. van den Oord, O. Vinyals, and J. Carreira. Efficient visual pretraining with contrastive detection. In ICCV, 2021. 1, 2, 3, 6 O. J. Hénaff, S. Koppula, E. Shelhamer, D. Zoran, A. Jaegle, A. Zisserman, J. Carreira, and R. Arandjelovic. Object discovery and representation networks. ´ arXiv preprint arXiv:2103.10957, 2022. 1, \n2, 3 K.-H. Lee, A. Arnab, S. Guadarrama, J. Canny, and I. Fischer. Compressive visual representations. In NeurIPS, 2021. 1, 2 C. Li, J. Yang, P. Zhang, M. Gao, B. Xiao, X. Dai, L. Yuan, and J. Gao. Efficient self-supervised vision transformers for representation learning. In ICLR, 2022. 1, 2 Z. Liu, H. Mao, C.-Y. Wu, C. Feichtenhofer, T. Darrell, and S. Xie. A convnet for the 2020s. In CVPR, 2022. 5, 6 I. Loshchilov and F. Hutter. Sgdr: stochastic gradient descent with warm restarts. In ICLR, 2017. 6 I. Loshchilov and F. Hutter. Decoupled weight decay regularization. In ICLR, 2019. 6 I. Misra and L. v. d. Maaten. Self-supervised learning of pretext-invariant representations. In CVPR, \n2020. 1 J. Mitrovic, B. McWilliams, J. Walker, L. Buesing, and C. Blundell. Representation learning via invariant causal mechanisms. In ICLR, 2021. 2 P. H. Richemond, J.-B. Grill, F. Altché, C. Tallec, F. Strub, A. Brock, S. Smith, S. De, R. Pascanu, B. Piot, and M. Valko. Byol works even without batch statistics. arXiv preprint arXiv:2010.10241, \n2020. 2 N. Tomasev, I. Bica, B. McWilliams, L. Buesing, R. Pascanu, C. Blundell, and J. Mitrovic. Pushing the limits of self-supervised resnets: Can we outperform supervised learning without labels on imagenet? arXiv preprint arXiv:2201.05119, 2022. 1, 2 F. Wang, H. Wang, C. Wei, A. Yuille, and W. Shen. Cp2: Copy-paste contrastive pretraining for semantic segmentation. arXiv preprint arXiv:2203.11709, 2022. 3, 6, 7 X. Wang, R. Zhang, C. Shen, T. Kong, and L. Li. Dense contrastive learning for self-supervised visual pre-training. In CVPR, 2021. 2, 6 T. Xiao, C. J. Reed, X. Wang, K. Keutzer, and T. Darrell. Region similarity representation learning. In ICCV, 2021. 2, 6 Z. Xie, Y. Lin, Z. Zhang, Y. Cao, S. Lin, and H. Hu. Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In CVPR, 2021. 1, 2, 6 C. Yang, Z. Wu, B. Zhou, and S. Lin. Instance localization for self-supervised detection pretraining. In CVPR, 2021. 1, 3 J. Yang, K. Zhang, Z. Cui, J. Su, J. Luo, and X. Wei. Inscon: Instance consistency feature representation via self-supervised learning. arXiv preprint arXiv:2203.07688, 2022. 1, 3, 6 Y. You, I. Gitman, and B. Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017. 6 J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny. Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arxiv:2103.03230, 2021. 1, 2 B. Zhou, H. Zhao, X. Puig, T. Xiao, S. Fidler, A. Barriuso, and A. Torralba. Semantic understanding of scenes through the ade20k dataset. IJCV, 2019. 6 J. Zhou, C. Wei, H. Wang, W. Shen, C. Xie, A. Yuille, and T. Kong. ibot: Image bert pre-training with online tokenizer. In ICLR, 2022a. 1, 2, 7 P. Zhou, Y. Zhou, C. Si, W. Yu, T. K. Ng, and S. Yan. Mugs: A multi-granular self-supervised learning framework. arXiv preprint arXiv:2203.14415, 2022b. 2 ",
914
+ "bbox": [
915
+ 171,
916
+ 97,
917
+ 828,
918
+ 920
919
+ ],
920
+ "page_idx": 10
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "",
925
+ "bbox": [
926
+ 171,
927
+ 80,
928
+ 830,
929
+ 920
930
+ ],
931
+ "page_idx": 11
932
+ }
933
+ ]
parse/dev/ePZsWeGJXyp/ePZsWeGJXyp_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/g3faCfrwm7/g3faCfrwm7.md ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedback
2
+
3
+ Katherine Tian,∗† Eric Mitchell,∗‡ Allan Zhou,‡ Archit Sharma,‡ Rafael Rafailov‡ Huaxiu Yao,‡ Chelsea Finn,‡ Christopher D. Manning‡
4
+
5
+ †Harvard University ‡Stanford University ktian@college.harvard.edu eric.mitchell@cs.stanford.edu
6
+
7
+ # Abstract
8
+
9
+ A trustworthy real-world prediction system should produce well-calibrated confidence scores; that is, its confidence in an answer should be indicative of the likelihood that the answer is correct, enabling deferral to an expert in cases of low-confidence predictions. Recent studies have shown that unsupervised pretraining produces large language models (LMs) whose conditional probabilities are remarkably well-calibrated. However, the most widelyused LMs are fine-tuned with reinforcement learning from human feedback (RLHF-LMs), and some studies have suggested that RLHFLMs produce conditional probabilities that are very poorly calibrated. In light of this perceived weakness, we conduct a broad evaluation of methods for extracting confidence scores from RLHF-LMs. For RLHF-LMs such as ChatGPT, GPT-4, and Claude, we find that verbalized confidences emitted as output tokens are typically better-calibrated than the model’s conditional probabilities on the TriviaQA, SciQ, and TruthfulQA benchmarks, often reducing the expected calibration error by a relative $50 \%$ .
10
+
11
+ # 1 Introduction
12
+
13
+ Real-world prediction systems invariably make errors. However, some mitigation of these errors is possible if the system produces well-calibrated1 confidence estimates. In this case, the system’s least confident predictions correspond to those that are most likely to be incorrect, potentially allowing these predictions to be skipped or overridden by a human. In the context of language models, one consequence of poor calibration may be hallucination, where a language model confidently asserts incorrect facts or reasoning. While the ability of very large LMs to absorb and synthesize knowledge about the outside world has gained significant attention (Brown et al., 2020; Roberts et al., 2020; Bubeck et al., 2023), relatively little attention has been given to their well-calibratedness (Kadavath et al., 2022). Further, most existing analyses of the calibratedness of LLMs focus on models trained with maximum likelihood, while in practice, the most widely-used LLMs (such as ChatGPT) are fine-tuned using methods such as reinforcement learning from human feedback (Christiano et al., 2017). Some findings suggest that RLHF-LMs may sacrifice well-calibrated predictions for the sake of closer adherence to user instructions in dialogue (Kadavath et al., 2022; OpenAI, 2023), as the reinforcement learning objective encourages the model to allocate probability mass to the most preferred answer(s), rather than matching the relative frequency of possible answers.
14
+
15
+ ![](images/136c529b85d62ecbb5fa5f461bfaf99336479fbd7313c678f68aa799a2ad779d.jpg)
16
+ Figure 1: Verbalized confidence scores (blue) are better-calibrated than log probabilities (orange) for gpt-3.5-turbo. Raw model probabilities (top-left) are consistently over-confident. Verbalized numerical probabilities (bottom) are better-calibrated. Considering more answer choices (bottom-right) further improves verbalized calibration (as in ‘Considering the Opposite’ in psychology; Lord et al. (1985)). Verbalized expressions of likelihood (top-right) also provide improved calibration. Bar height is average accuracy of predictions in bin. Darker bars mean more predictions fall in that confidence range. Results computed on SciQ.
17
+
18
+ This paper evaluates several methods for extracting confidences about model predictions from
19
+
20
+ ![](images/2c0b4b54b929430bc1c69ccc6f8d86cd271e9ac67dae05bfe796c3757e5a9b8f.jpg)
21
+ Figure 2: RLHF generally worsens the calibration of Llama-70B’s log probabilities, as measured by ECE (lower is better) or AUC (higher is better). However, this paper (Tables 1-5) will show that for several strong RLHF-LMs, the model’s verbalized confidence is often better-calibrated than its log probabilities, reversing some of this degradation. This reversal is strongest for TruthfulQA, an adversarial dataset testing common misconceptions and other difficult queries.
22
+
23
+ RLHF-LMs. Due to concerns that RLHF may cause systematic overconfidence in the model’s probabilities (Figure 2), as well as the general unavailability of per-token log-probabilities in widely used RLHF-LMs, we pay particular attention to prompts that elicit verbalized probabilities, i.e., the model expresses its confidence in token-space, as either numerical probabilities or another linguistic expression of uncertainty. We find that, surprisingly, popular RLHF-LMs are able to directly verbalize confidence scores that are better-calibrated than the model’s conditional probabilities (estimated via sampling), without any fine-tuning to learn verbalization. To further improve calibration, we take inspiration from research in human psychology showing that overconfidence can be mitigated by considering alternative answers before responding (Lord et al., 1985; Mussweiler et al., 2000). We show that prompting a model to produce several answer choices before giving its confidence scores significantly improves calibration of verbalized probabilities. Combined with temperature scaling (Guo et al., 2017), this approach generally provides better calibration than model probabilities for ChatGPT2, GPT- $4 ^ { 3 }$ , and Claude $2 ^ { 4 }$ across three datasets, often reducing expected calibration error (ECE) by over $50 \%$ .
24
+
25
+ Related Work. Several studies have examined the calibration of large LMs (Lin et al., 2022a; Park and Caragea, 2022; Kadavath et al., 2022; Xiao et al., 2022; Kuhn et al., 2023), finding that combining large pre-trained LMs with temperature scaling (Guo et al., 2017) produces very wellcalibrated predictions (Kadavath et al., 2022; Xiao et al., 2022; Kuhn et al., 2023). Other work focuses on the tendency of language and dialogue models to use linguistic expressions of uncertainty in a well-calibrated manner (Zhou et al., 2023; Mielke et al., 2022). However, existing studies focus on LMs trained purely with unsupervised learning (although Kadavath et al. (2022) briefly examine RLHF-LMs), while widely used models in practice are fine-tuned with instruction-tuning or RLHF (Christiano et al., 2017). RLHF has been shown to effectively leverage annotations of human preferences to control sentiment (Ziegler et al., 2020), improve summarization or instruction-following quality (Stiennon et al., 2022; Ouyang et al., 2022), and inject behavioral priors of harmlessness (Bai et al., 2022b,a). However, recent work has raised the question of whether or not RLHF harms calibration (OpenAI, 2023). Our work is the first to show that verbalized probabilities are often bettercalibrated than the model’s conditional probabilities for RLHF-LMs such as ChatGPT, GPT-4, and Claude, and Llama-2-70B-Chat.
26
+
27
+ # 2 Evaluating Calibration in RLHF-LMs
28
+
29
+ To study the calibration of RLHF-LMs, we conduct experiments with gpt-3.5-turbo (ChatGPT), gpt-4 (GPT-4), claude-1 (Claude 1), claude-2 (Claude 2), and Llama-2-70b-chat (Llama-2- 70B-Chat).
30
+
31
+ Metrics. We measure calibration with multiple metrics. To measure ECE (expected calibration error; Guo et al. (2017)), we bin model predictions by their confidence and measure the average accuracy of predictions in each confidence bin. The ECE is defined as the average (squared) error between the average accuracy and confidence within each bin, where each error is weighted by the fraction of samples falling within the bin. We report raw ECE as well as ECE with temperature scaling (ECE-t). Temperature scaling fits a single temperature value $\beta$ to the model’s confidences to minimize negative log likelihood (NLL) on the data, giving scaled probability ${ \tilde { p } } _ { i }$ of class $i$ as $\tilde { p } _ { i } \propto p _ { i } ^ { \beta }$ . See Figure 1 for a depiction of ECE binning. Although ECE is a standard and interpretable measure of calibration error, it completely fails to capture the confidences’ discriminative power.5 We therefore also report
32
+
33
+ Table 1: Measuring calibration of various methods for extracting confidences from gpt-3.5-turbo (ChatGPT). The model’s conditional probabilities are relatively poorly calibrated, whether using the model’s conditional probability of the label given the query (Label prob.) or the probability assigned to ‘True’ given the query, proposed answer, and a prompt asking if the answer is correct (‘Is True’ prob.). Surprisingly, directly verbalizing a probability (Verb. 1S and Verb. 2S) or an expression of confidence such as ‘highly likely’ (Ling. 1S) yields significantly better-calibrated confidence estimates. 1S refers to one-stage prediction, where the model provides an answer and confidence probability/expression together. 2S refers to two-stage prediction, where the model first gives only an answer, and then in a second stage a confidence. To color the table cells, for each column, we demean and scale by a constant to obtain a shade in [-1,1], where cyan indicates better and orange worse performance.
34
+
35
+ <table><tr><td></td><td colspan="4">TriviaQA</td><td colspan="4">SciQ</td><td colspan="4">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t</td><td>BS-t↓</td><td>AUC ↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t↓</td><td>AUC↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t↓</td><td>AUC↑</td></tr><tr><td>Label prob. ‘Is True’prob.</td><td>0.140 0.164</td><td>0.097 0.159</td><td>0.142</td><td>0.869</td><td>0.256</td><td>0.180</td><td>0.223</td><td>0.752</td><td>0.451 0.470</td><td>0.317 0.471</td><td>0.345 0.476</td><td>0.418 0.384</td></tr><tr><td>Entropy</td><td>1</td><td>丨</td><td>0.165</td><td>0.826 0.547</td><td>0.312 丨</td><td>0.309 一</td><td>0.309</td><td>0.677 0.483</td><td>一</td><td>丨</td><td>丨</td><td>0.236</td></tr><tr><td>Verb.1S top-1</td><td>0.068</td><td>0.076</td><td>0.138</td><td>0.879</td><td>0.234</td><td>0.084</td><td>0.214</td><td>0.744</td><td>0.389</td><td>0.256</td><td>0.322</td><td>0.545</td></tr><tr><td>Verb. 1S top-2 Verb. 1S top-4</td><td>0.050</td><td>0.053</td><td>0.139</td><td>0.894</td><td>0.132</td><td>0.050</td><td>0.201</td><td>0.766</td><td>0.361</td><td>0.115</td><td>0.252</td><td>0.485</td></tr><tr><td></td><td>0.054</td><td>0.057</td><td>0.144</td><td>0.896</td><td>0.065</td><td>0.051</td><td>0.209</td><td>0.763</td><td>0.203</td><td>0.189</td><td>0.284</td><td>0.455</td></tr><tr><td>Verb.2SCoT</td><td>0.110</td><td>0.123</td><td>0.168</td><td>0.830</td><td>0.323</td><td>0.246</td><td>0.296</td><td>0.683</td><td>0.419</td><td>0.259</td><td>0.292</td><td>0.551</td></tr><tr><td>Verb. 2S top-1</td><td>0.131</td><td>0.099</td><td>0.148</td><td>0.855</td><td>0.340</td><td>0.203</td><td>0.268</td><td>0.677</td><td>0.431</td><td>0.245</td><td>0.282</td><td>0.483</td></tr><tr><td>Verb. 2S top-2</td><td>0.047</td><td>0.045</td><td>0.147</td><td>0.887</td><td>0.169</td><td>0.040</td><td>0.201</td><td>0.768</td><td>0.395</td><td>0.101</td><td>0.224</td><td>0.517</td></tr><tr><td>Verb.2S top-4</td><td>0.050</td><td>0.051</td><td>0.156</td><td>0.861</td><td>0.130</td><td>0.046</td><td>0.211</td><td>0.729</td><td>0.270</td><td>0.156</td><td>0.246</td><td>0.463</td></tr><tr><td>Ling. 1S human</td><td>0.062</td><td>0.069</td><td>0.137</td><td>0.884</td><td>0.166</td><td>0.087</td><td>0.223</td><td>0.703</td><td>0.306</td><td>0.296</td><td>0.333</td><td>0.503</td></tr><tr><td>Ling. 1S-opt.</td><td>0.058</td><td>0.066</td><td>0.135</td><td>0.878</td><td>0.064</td><td>0.068</td><td>0.220</td><td>0.674</td><td>0.125</td><td>0.165</td><td>0.270</td><td>0.492</td></tr></table>
36
+
37
+ <table><tr><td></td><td colspan="4">TriviaQA</td><td colspan="4">SciQ</td><td colspan="4">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t←</td><td>AUC</td><td>ECE</td><td>ECE-t</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.078</td><td>0.067</td><td>0.077</td><td>0.950</td><td>0.219</td><td>0.165</td><td>0.186</td><td>0.820</td><td>0.445</td><td>0.334</td><td>0.362</td><td>0.462</td></tr><tr><td>Verb.1S top-1</td><td>0.024</td><td>0.038</td><td>0.084</td><td>0.937</td><td>0.201</td><td>0.084</td><td>0.165</td><td>0.843</td><td>0.350</td><td>0.156</td><td>0.227</td><td>0.622</td></tr><tr><td>Verb. 1S top-2</td><td>0.025</td><td>0.034</td><td>0.084</td><td>0.949</td><td>0.140</td><td>0.048</td><td>0.185</td><td>0.813</td><td>0.315</td><td>0.112</td><td>0.228</td><td>0.623</td></tr><tr><td>Verb. 1S top-4</td><td>0.041</td><td>0.039</td><td>0.081</td><td>0.959</td><td>0.056</td><td>0.059</td><td>0.185</td><td>0.815</td><td>0.198</td><td>0.144</td><td>0.245</td><td>0.619</td></tr><tr><td>Ling. 1S-human</td><td>0.051</td><td>0.041</td><td>0.086</td><td>0.931</td><td>0.148</td><td>0.024</td><td>0.170</td><td>0.835</td><td>0.241</td><td>0.151</td><td>0.228</td><td>0.651</td></tr><tr><td>Ling.1S-opt.</td><td>0.056</td><td>0.051</td><td>0.088</td><td>0.927</td><td>0.028</td><td>0.052</td><td>0.172</td><td>0.828</td><td>0.082</td><td>0.105</td><td>0.212</td><td>0.632</td></tr></table>
38
+
39
+ Table 2: gpt-4’s verbalized probabilities are substantially better-calibrated than the model probabilities themselves, even after temperature scaling, similarly to gpt-3.5-turbo in Table 1.
40
+
41
+ Brier Score (BS; Brier (1950)) on temperaturescaled confidences (BS-t), a proper scoring rule (Ovadia et al., 2019) that is the mean squared error between the confidences and the correctness labels. Finally, we assess calibration using a metric from the selective classification literature (Geifman and El-Yaniv, 2017), specifically, the area under the curve of selective accuracy and coverage (AUC).
42
+
43
+ Datasets. Our experiments use three questionanswering datasets assessing factual knowledge. TriviaQA (Joshi et al., 2017) contains $6 5 0 \mathrm { k }$ question-answer pairs gathered by trivia enthusiasts; SciQ (Welbl et al., 2017) contains approximately 14k crowdsourced science exam questionanswer pairs; TruthfulQA (Lin et al., 2022b) contains 817 questions designed to test language models’ tendency to mimic human falsehoods. We sample 1000 questions from the validation split of TriviaQA (rc.web.nocontext) and SciQ and all 817 questions from the validation split of TruthfulQA (generation) for our experiments.
44
+
45
+ Evaluation protocol. For each dataset, we generate a response and corresponding confidence from each method on each of the evaluation questions. Because calibration essentially quantifies the relationship between model confidence and correctness, computing correctness is crucial to accurate measurements of calibration. However, we find doing so to be a challenge, especially in datasets where only a single ground-truth answer (but not aliases or semantically equivalent rephrases) is provided. To avoid excessive false negatives in our correctness computation as a result of exact-match evaluation, we use either GPT-4 or GPT-3.5 to evaluate whether a response is essentially equivalent to the ground truth answer; see Appendix C for the complete equivalence-checking procedure.
46
+
47
+ Methods. We compare a wide variety of methods for extracting confidence estimates from LLMs. For a comprehensive list of the prompts used for each method, see Appendix Table 6.
48
+
49
+ First, we consider two methods that leverage the true conditional distribution of the model to generate confidence scores. The simplest is Label prob., which uses the conditional probability distribution $p ( y | x )$ of the model given a question $x$ , which we estimate using $n = 1 0$ samples, since many RLHFLMs are closed-source and do not offer per-token probabilities.67 We return the most common answer, using the LLM-based equivalence function to determine when two lexically different answers are semantically equivalent. In a variation of the method described by Kadavath et al. (2022) (again, we use samples since model probabilities are not available), ‘Is True’ prob. samples a single answer $\hat { y }$ from the model given a question $x$ , and the probability it is true is estimated by the probability the model assigns to ‘True’ when asked if the given answer is true (where once again the probabilities are estimated via samples), i.e., $p ( \mathsf { T r u e } | x , \hat { y } )$ .
50
+
51
+ <table><tr><td></td><td colspan="4">TriviaQA</td><td colspan="4">SciQ</td><td colspan="4">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.074</td><td>0.079</td><td>0.117</td><td>0.915</td><td>0.216</td><td>0.149</td><td>0.195</td><td>0.786</td><td>0.432</td><td>0.304</td><td>0.335</td><td>0.418</td></tr><tr><td>Verb. 1S top-1</td><td>0.049</td><td>0.059</td><td>0.160</td><td>0.839</td><td>0.265</td><td>0.103</td><td>0.247</td><td>0.663</td><td>0.440</td><td>0.134</td><td>0.204</td><td>0.411</td></tr><tr><td>Verb. 1S top-2</td><td>0.046</td><td>0.047</td><td>0.158</td><td>0.875</td><td>0.207</td><td>0.040</td><td>0.225</td><td>0.693</td><td>0.450</td><td>0.085</td><td>0.197</td><td>0.409</td></tr><tr><td>Verb. 1S top-4</td><td>0.075</td><td>0.079</td><td>0.176</td><td>0.814</td><td>0.151</td><td>0.057</td><td>0.226</td><td>0.667</td><td>0.372</td><td>0.105</td><td>0.183</td><td>0.377</td></tr><tr><td>Ling. 1S human</td><td>0.053</td><td>0.050</td><td>0.151</td><td>0.867</td><td>0.253</td><td>0.118</td><td>0.245</td><td>0.664</td><td>0.443</td><td>0.358</td><td>0.340</td><td>0.384</td></tr><tr><td>Ling.1S-opt.</td><td>0.074</td><td>0.060</td><td>0.149</td><td>0.863</td><td>0.089</td><td>0.082</td><td>0.238</td><td>0.623</td><td>0.139</td><td>0.148</td><td>0.228</td><td>0.350</td></tr></table>
52
+
53
+ Table 3: Claude-1 produces similar- or better-calibrated log probabilities to gpt-3.5-turbo, but is less able to verbalize well-calibrated confidences, compared to models in the GPT family of RLHF-LMs. Claude-1 has since been deprecated.
54
+
55
+ <table><tr><td></td><td colspan="4">TriviaQA</td><td colspan="4">SciQ</td><td colspan="4">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC </td><td>ECE</td><td>ECE-t ↓</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.089</td><td>0.089</td><td>0.137</td><td>0.882</td><td>0.181</td><td>0.176</td><td>0.237</td><td>0.762</td><td>0.409</td><td>0.368</td><td>0.405</td><td>0.319</td></tr><tr><td>Verb. iS top-1</td><td>0.072</td><td>0.071</td><td>0.141</td><td>0.903</td><td>0.204</td><td>0.054</td><td>0.201</td><td>0.776</td><td>0.345</td><td>0.115</td><td>0.215</td><td>0.573</td></tr><tr><td>Verb.1S top-2</td><td>0.049</td><td>0.054</td><td>0.133</td><td>0.918</td><td>0.134</td><td>0.041</td><td>0.211</td><td>0.754</td><td>0.359</td><td>0.085</td><td>0.223</td><td>0.491</td></tr><tr><td>Verb. 1S top-4</td><td>0.072</td><td>0.063</td><td>0.158</td><td>0.890</td><td>0.048</td><td>0.052</td><td>0.216</td><td>0.711</td><td>0.274</td><td>0.075</td><td>0.208</td><td>0.473</td></tr><tr><td>Ling. 1S human</td><td>0.085</td><td>0.061</td><td>0.151</td><td>0.878</td><td>0.238</td><td>0.026</td><td>0.209</td><td>0.756</td><td>0.381</td><td>0.242</td><td>0.305</td><td>0.530</td></tr><tr><td>Ling. 1S-opt.</td><td>0.060</td><td>0.070</td><td>0.151</td><td>0.874</td><td>0.049</td><td>0.056</td><td>0.214</td><td>0.738</td><td>0.099</td><td>0.130</td><td>0.266</td><td>0.446</td></tr></table>
56
+
57
+ Table 4: Claude-2 has weaker conditional probabilities than Claude-1 and GPT- $^ *$ , but its verbalized calibration provides consistent improvement over conditional probabilities at a level comparable to GPT-3.5 and surpassing GPT- $^ *$ on TruthfulQA.
58
+
59
+ Next, we consider methods that extract confidence scores through verbalization (Lin et al., 2022a), i.e., where the model expresses its confidence in token space, either with numerical probabilities or linguistic expressions of likelihood.8 First, Verb. 1S top- $k$ prompts the model to produce $k$ guesses and a probability that each is correct all in a single response (i.e., ‘1 stage’). We take the highest-probability prediction and its associated probability as the model’s output and confidence. Verb. 2S top- $k$ similarly uses numerical probabilities, except the model is first asked to provide only its answers, and afterwards, in a second round of dialogue, asked to assign probabilities of correctness to each answer (i.e., ‘2 stages’). Verb. 2S CoT uses a chain-of-thought prompt before giving a single answer, and in a second round of dialogue, the model is prompted to assign a probability to that answer (with the chain of thought present in the model’s context). Ling. 1S-human uses linguistic likelihood expressions, rather than numerical probabilities, to express uncertainty. The model is prompted to assign confidences to its guesses by choosing from a set of linguistic expressions of uncertainty: {Almost certain, Likely, . . . , Almost no chance}. Each linguistic likelihood expression is mapped to a probability using responses from a human survey on social media with 123 respondents (FagenUlmschneider, 2023). Ling. 1S-opt. uses a held out set of calibration questions and answers to compute the average accuracy for each likelihood expression, using these ‘optimized’ values instead. Expressions that are not used for at least $\textstyle { \frac { 1 } { N } }$ of questions, where $N$ is the number of calibration questions, simply use the human probability.
60
+
61
+ # 3 Results
62
+
63
+ Tables 1–5 show the results of evaluating various methods for extracting confidence from RLHFLMs on gpt-3.5-turbo, gpt-4, claude-1, claude-2, and Llama-2-70b-chat, respectively. We distill several key conclusions from these experiments. 1. Large RLHF-LMs can often directly verbalize better-calibrated confidences (either a numerical confidence probability or an expression such as ‘highly likely’) than the models’ conditional probabilities. 2. Among the methods for verbalizing probabilities directly, we observe that generating and evaluating multiple hypotheses improves calibration (see Figure 1), similarly to humans (Lord et al., 1985), and corroborating a similar finding in LMs (Kadavath et al., 2022). 3. Language models can express their uncertainty with numerical probabilities as well or better than with words, which is surprising in light of longstanding difficulties in representing numbers in language models (Thawani et al., 2021). 4. Chainof-thought prompting does not improve verbalized calibration (see Appendix Figure 5 for additional CoT results). 5. The calibration of both Claude models’ conditional probabilities roughly falls between gpt-3.5-turbo and gpt-4; however, while Claude 1 is much weaker at verbalizing its confidence, Claude 2 is generally a bit stronger than gpt-3.5-turbo at verbalizing. The verbal calibration of the open source model Llama-2-70b-chat is generally weaker than that of closed source models but still demonstrates improvement over its conditional probabilities by some metrics, and does so most clearly on TruthfulQA.
64
+
65
+ <table><tr><td></td><td colspan="4">TriviaQA</td><td colspan="4">SciQ</td><td colspan="4">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t↓</td><td>AUC↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t </td><td>AUC</td></tr><tr><td>Label prob.</td><td>0.151</td><td>0.124</td><td>0.156</td><td>0.865</td><td>0.266</td><td>0.189</td><td>0.243</td><td>0.707</td><td>0.405</td><td>0.361</td><td>0.396</td><td>0.407</td></tr><tr><td>Verb.1S top-1</td><td>0.071</td><td>0.067</td><td>0.186</td><td>0.793</td><td>0.196</td><td>0.053</td><td>0.239</td><td>0.648</td><td>0.386</td><td>0.172</td><td>0.266</td><td>0.502</td></tr><tr><td>Verb. 1S top-2</td><td>0.060</td><td>0.073</td><td>0.194</td><td>0.815</td><td>0.153</td><td>0.032</td><td>0.230</td><td>0.667</td><td>0.340</td><td>0.037</td><td>0.227</td><td>0.440</td></tr><tr><td>Verb. 1S top-4</td><td>0.069</td><td>0.079</td><td>0.182</td><td>0.816</td><td>0.105</td><td>0.043</td><td>0.229</td><td>0.648</td><td>0.231</td><td>0.102</td><td>0.237</td><td>0.465</td></tr><tr><td>Ling. 1S human</td><td>0.179</td><td>0.115</td><td>0.195</td><td>0.749</td><td>0.071</td><td>0.101</td><td>0.252</td><td>0.603</td><td>0.376</td><td>0.366</td><td>0.383</td><td>0.407</td></tr><tr><td>Ling.1S-opt.</td><td>0.077</td><td>0.068</td><td>0.186</td><td>0.779</td><td>0.019</td><td>0.042</td><td>0.236</td><td>0.590</td><td>0.047</td><td>0.051</td><td>0.239</td><td>0.435</td></tr></table>
66
+
67
+ Table 5: With Llama2-70B-Chat, verbalized calibration provides improvement over conditional probabilities across some metrics, but the improvement is much less consistent compared to GPT- $^ *$ and Claude-\*.
68
+
69
+ # 4 Discussion
70
+
71
+ In summary, we study the calibration of widely used RLHF-LMs. We first replicate the finding for GPT-4 (OpenAI, 2023) that RLHF can worsen the calibration of a model’s conditional probabilities using the open-source Llama-2-70B base and chat models (Figure 2). To mitigate this regression and ease extraction of calibrated confidence scores for models for which log probabilities are not available, we propose and study new methods that can elicit calibrated confidences from RLHF-LMs by prompting the model to verbalize its confidence in token space. We find verbalized probabilities are better-calibrated than conditional probabilities across several closed models, with mixed results for Llama-2-70B-Chat.
72
+
73
+ Our results raise several questions for future work. Most notably, the difference between GPT-\*, Claude-\*, and Llama-2’s ability to verbalize confidence is significant. What factors are important for learning this skill? Additionally, the 1-stage and 2-stage verbalized numerical confidence prompts sometimes differ drastically in the calibration of their confidences. How can we reduce sensitivity of a model’s calibration to the prompt? Going beyond question-answering, can we leverage good calibration in short-answer settings to improve the reliability of long-form generations, perhaps by breaking down long-form generation into a sequence of short questions? Finally, to what extent does a language model’s calibration depend on the domain; do our conclusions in the context of factual recall hold in the context of reasoning or arithmetic? Answering these questions provides one path toward building more trustworthy and useful language systems.
74
+
75
+ Limitations. While our work demonstrates a promising new approach to generating calibrated confidences through verbalization, there are limitations that could be addressed in future work. First, our experiments are focused on factual recalloriented problems, and the extent to which our observations would hold for reasoning-heavy settings is an interesting open question. Additionally, the lack of technical details available for many state-ofthe-art closed RLHF-LMs may limit our ability to understand what factors enable a model to verbalize well-calibrated confidences and differences in this ability across different models. Finally, our study is limited to short-form question-answering; future work should extend this analysis to longer-form generation settings.
76
+
77
+ Acknowledgements. CF and CDM are CIFAR Fellows. EM gratefully acknowledges funding from a Knight-Hennessy Graduate Fellowship. AZ is supported by the NSF graduate research fellowship program. This research was supported in part by Juniper Networks, Apple, and ONR grant N00014- 20-1-2675. The authors thank Yoonho Lee and Noah Goodman for helpful feedback on calibration metrics and experiment design.
78
+
79
+ # References
80
+
81
+ Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, Nicholas Joseph, Saurav Kadavath, Jackson Kernion, Tom Conerly, Sheer El-Showk, Nelson Elhage, Zac Hatfield-Dodds, Danny Hernandez, Tristan Hume, Scott Johnston, Shauna Kravec, Liane Lovitt, Neel Nanda, Catherine Olsson, Dario Amodei, Tom Brown, Jack Clark, Sam McCandlish, Chris Olah, Ben Mann, and Jared Kaplan. 2022a. Training a helpful and harmless assistant with reinforcement learning from human feedback.
82
+
83
+ Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, Carol Chen, Catherine Olsson, Christopher Olah, Danny Hernandez, Dawn Drain, Deep Ganguli, Dustin Li, Eli Tran-Johnson, Ethan Perez, Jamie Kerr, Jared Mueller, Jeffrey Ladish, Joshua Landau, Kamal Ndousse, Kamile Lukosuite, Liane Lovitt, Michael Sellitto, Nelson Elhage, Nicholas Schiefer, Noemi Mercado, Nova DasSarma, Robert Lasenby, Robin Larson, Sam Ringer, Scott Johnston, Shauna Kravec, Sheer El Showk, Stanislav Fort, Tamera Lanham, Timothy Telleen-Lawton, Tom Conerly, Tom Henighan, Tristan Hume, Samuel R. Bowman, Zac Hatfield-Dodds, Ben Mann, Dario Amodei, Nicholas Joseph, Sam McCandlish, Tom Brown, and Jared Kaplan. 2022b. Constitutional AI: Harmlessness from ai feedback.
84
+
85
+ Glenn W. Brier. 1950. Verification of Forecasts Expressed in Terms of Probability. Monthly Weather Review, 78(1):1–3.
86
+
87
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc.
88
+
89
+ Sébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, Harsha Nori, Hamid Palangi, Marco Tulio Ribeiro, and Yi Zhang. 2023. Sparks of artificial general intelligence: Early experiments with GPT-4. ArXiv preprint arXiv:2303.12712.
90
+
91
+ Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
92
+
93
+ Wade Fagen-Ulmschneider. 2023. Perception of probability words. Ms., UIUC, 05-24-2023.
94
+
95
+ Yonatan Geifman and Ran El-Yaniv. 2017. Selective classification for deep neural networks. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, page 4885–4894, Red Hook, NY, USA. Curran Associates Inc.
96
+
97
+ Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. 2017. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1321– 1330. PMLR.
98
+
99
+ Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601–1611, Vancouver, Canada. Association for Computational Linguistics.
100
+
101
+ Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, Deep Ganguli, Danny Hernandez, Josh Jacobson, Jackson Kernion, Shauna Kravec, Liane Lovitt, Kamal Ndousse, Catherine Olsson, Sam Ringer, Dario Amodei, Tom Brown, Jack Clark, Nicholas Joseph, Ben Mann, Sam McCandlish, Chris Olah, and Jared Kaplan. 2022. Language models (mostly) know what they know. Arxiv arxiv:2207.05221.
102
+
103
+ Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. In The Eleventh International Conference on Learning Representations.
104
+
105
+ Stephanie Lin, Jacob Hilton, and Owain Evans. 2022a. Teaching models to express their uncertainty in words. Transactions on Machine Learning Research.
106
+
107
+ Stephanie Lin, Jacob Hilton, and Owain Evans. 2022b. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3214–3252, Dublin, Ireland. Association for Computational Linguistics.
108
+
109
+ Charles Lord, Mark Lepper, and Elizabeth Preston. 1985. Considering the opposite: A corrective strategy for social judgment. Journal of personality and social psychology, 47:1231–43.
110
+
111
+ Sabrina J. Mielke, Arthur Szlam, Emily Dinan, and YLan Boureau. 2022. Reducing conversational agents’ overconfidence through linguistic calibration. Transactions of the Association for Computational Linguistics, 10:857–872.
112
+
113
+ Thomas Mussweiler, Fritz Strack, and Tim Pfeiffer. 2000. Overcoming the inevitable anchoring effect: Considering the opposite compensates for selective accessibility. Personality and Social Psychology Bulletin, 26(9):1142–1150.
114
+
115
+ OpenAI. 2023. Gpt-4 technical report.
116
+
117
+ Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730–27744. Curran Associates, Inc.
118
+
119
+ Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, D. Sculley, Sebastian Nowozin, Joshua V. Dillon, Balaji Lakshminarayanan, and Jasper Snoek. 2019. Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Red Hook, NY, USA. Curran Associates Inc.
120
+
121
+ Seo Yeon Park and Cornelia Caragea. 2022. On the calibration of pre-trained language models using mixup guided by area under the margin and saliency. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5364–5374, Dublin, Ireland. Association for Computational Linguistics.
122
+
123
+ Adam Roberts, Colin Raffel, and Noam Shazeer. 2020. How much knowledge can you pack into the parameters of a language model? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5418–5426, Online. Association for Computational Linguistics.
124
+
125
+ Nisan Stiennon, Long Ouyang, Jeff Wu, Daniel M. Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul Christiano. 2022. Learning to summarize from human feedback.
126
+
127
+ Avijit Thawani, Jay Pujara, Filip Ilievski, and Pedro Szekely. 2021. Representing numbers in NLP: a survey and a vision. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 644–656, Online. Association for Computational Linguistics.
128
+
129
+ Johannes Welbl, Nelson F. Liu, and Matt Gardner. 2017. Crowdsourcing multiple choice science questions. ArXiv, abs/1707.06209.
130
+
131
+ Yuxin Xiao, Paul Pu Liang, Umang Bhatt, Willie Neiswanger, Ruslan Salakhutdinov, and LouisPhilippe Morency. 2022. Uncertainty quantification with pre-trained language models: A large-scale empirical analysis. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 7273–7284, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
132
+
133
+ Kaitlyn Zhou, Dan Jurafsky, and Tatsunori Hashimoto. 2023. Navigating the grey area: Expressions of overconfidence and uncertainty in language models.
134
+
135
+ Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2020. Fine-tuning language models from human preferences.
136
+
137
+ ![](images/29a94f82c16fe874b63cf56e952a694c94653bf9c7c9f3480e04d2af95101570.jpg)
138
+ Usage of likelihood expressions by 3.5-turbo
139
+
140
+ ![](images/cb784ea8d3fbd2c5354f9b6f09da03fdefd1c83f74221e895783b2b224f839ac.jpg)
141
+ Figure 3: gpt-3.5-turbo usage rate of each likelihood expression; the model displays much lower verbalized confidence on TruthfulQA than on standard factual recall problems.
142
+ Figure 4: gpt-4 usage rate of each likelihood expression; the model displays markedly lower verbalized confidence on TruthfulQA than on standard factual recall problems.
143
+
144
+ # A Additional Results
145
+
146
+ Here, we include the likelihood expression usage distribution for gpt-3.5 and gpt-4 in Figures 3 and 4, respectively. gpt-3.5 is systematically less confident for TruthfulQA. The contrast between model confidence for TriviaQA and SciQ compared with TruthfulQA is even more stark for gpt-4.
147
+
148
+ We also provide additional calibration results for chain-of-thought methods. We compare a onestage verbalized CoT prompt (Verb. 1S CoT), a two-stage verbalized CoT prompt (Verb. 2S CoT), and a two-stage verbalized method that uses CoT just before eliciting the numerical confidence (Verb. 2S Cot Prob) instead of before the guess, as shown for gpt-3.5 on Trivia QA, SciQ, and Truthful QA in Figure 5. We find that CoT does not noticeably improve calibration across any setting or dataset.
149
+
150
+ # B Fitting Procedure for Temperature and Probabilities for Linguistic Expressions
151
+
152
+ To fit the temperature that is used to compute ECEt and BS-t we split our total data into 5 folds. For each fold, we use it once to fit a temperature and evaluate metrics on the remaining folds. We find that fitting the temperature on $20 \%$ of the data yields relatively stable temperatures across folds. We report the average temperature-scaled ECE and BS as ECE-t and ${ \bf B S - t }$ .
153
+
154
+ ![](images/6b87cbb676b16607bf3bff0af7beadcb31e4136e025c14228876dc20301c0b2b.jpg)
155
+ Figure 5: Expected calibration error is not consistently improved for any CoT prompt variant on gpt-3.5-turbo.
156
+
157
+ To compute ECE and AUC for Ling. 1S-opt., we similarly split our total data into 5 folds, using 4 folds to fit the probabilities behind each linguistic expression of confidence, then evaluating on the remaining fold. To compute ECE-t and BS-t for Ling. 1S-opt, we hold out one of the 5 folds to fit temperature. We use 3 folds to fit probabilities for linguistic expressions, compute the temperature based on these probabilities on the temperature set, and evaluate metrics on the last fold. We then average metrics across all 20 rotations of folds.
158
+
159
+ # C Prompt Templates
160
+
161
+ The prompt template for each sampling method is provided in Table 6. The question is substituted for the variable $\$ 123,456,710N \}$ in each prompt. To evaluate answer correctness, we use gpt-3.5-turbo for SciQ and TruthfulQA and gpt-4 for TriviaQA due to gpt-3.5-turbo’s high disagreement with a human evaluator on TriviaQA. Using the ground truth answer as $\$ 523,456,7$ and the model-generated answer as \${PRED_ANSWER}, we use the following prompt template:
162
+
163
+ <table><tr><td rowspan=1 colspan=8>Method Template</td></tr><tr><td rowspan=1 colspan=8>Label prob. Provide your best guess for the following question. Give ONLY the guess,noother words orexplanation.\n\nForexample:\n\nGuess: &lt;most likely guess,asshort as possible; not a complete sentence, just the guess!&gt;\n\nThe questionis:${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>‘Is True&#x27;prob. Question: ${QUESTION}\nProposed Answer: ${ANSWER}\nIs the proposed answer:\n\t(A)True or\n\t(B) False?\n The proposed answer is:</td></tr><tr><td rowspan=1 colspan=8>Verb. 1S top-1 Provide your best guess and the probability that it is correct (0.0 to 1.0) forthe_following question. Give ONLY the guess and probability,no other words orexplanation.For example:\n\nGuess: &lt;most likely guess,as short as possible; nota complete sentence,just the guess!&gt;\n Probability:&lt;the probability between 0.0and 1.0 that your guess is correct,without any extra commentary whatsoever;justthe probability!&gt;\n\nThe question is:${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>Verb.1S top-k Provide your ${k} best guesses and the probability that each is correct (0.0 to1.0)for the following question.Give ONLY the guesses and probabilities,no otherwords or explanation. For example:\n\nG1: &lt;first most likely guess,as short aspossible;not a complete sentence,just the guess!&gt;\n\nP1: &lt;the probability between0.0 and 1.0 that G1 is correct, without any extra commentary whatsoever; justthe probability!&gt; ... G${k}: &lt;${k}-th most likely guess,as short as possible;not a complete sentence, just the guess!&gt;\n\nP${k}: &lt;the probability between 0.0and 1.0 that G${k} is correct,without any extra commentary whatsoever; just theprobability!&gt; \n\nThe question is: ${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>Verb.2SCoT Provide your best guess for the following question. Before giving your answer,provide a step-by-step explanation of your thought process. Then on a new linegive the guess with no other words or explanation.\n\nFor example:\n\nExplanation:&lt;one sentence step-by-step explanation of your thought process&gt;\n\nGuess: &lt;mostlikely guess,as short as_possible; not a complete sentence,just the guess!&gt;\n\nThequestion is:${THE_QUESTION}Provide the probability that your guess is correct. Give ONLY the probability,noother words or explanation.\n\nFor example:\n\nProbability:&lt;the probability between0.0 and 1.0 that your guess is correct,without any extra commentary whatsoever;just the probability!&gt;\n</td></tr><tr><td rowspan=1 colspan=8>Verb. 2S top-1 Provide your best guess for the following question.Give ONLY the guess,nootherwordsor_explanation.\n\nForexample:\n\nGuess:&lt;most likely guess,asshort as possible; not a complete sentence, just the guess!&gt;\n\nThe questionis:${THE_QUESTION}Provide the probability that your guess is correct. Give ONLY the_probability,noother words or explanation.\n\nFor example:\n\nProbability:&lt;the probability between0.0 and 1.0 that your guess is correct,without any extra commentary whatsoever;just the probability!&gt;\n</td></tr><tr><td rowspan=10 colspan=8>Verb. 2S top-kProvide your ${k} best guesses for the following question. Give ONLY the guesses,no other words_or explanation. For example:\n\nG1: &lt;first most likely guess,asshort as possible;not a complete sentence,just the guess!&gt;\n\nP1: &lt;the probabilitybetween 0.0 and 1.0 that G1 is correct,without any extra commentary whatsoever;just the probability!&gt; ... G${k}:&lt;${k}-th most likely guess,as short as possible;not a complete sentence,just the guess!&gt;\n\nThe question is:${THE_QUESTION}Providethe_probability_that eachofyourguessesiscorrect. Give ONLYthe probabilities,no other words or explanation.\n\nFor example:\n\nP1:&lt;theprobability between 0.0 and 1.0 that G1 is correct,without any extra commentarywhatsoever; just the probability!&gt;\n... P${k}: &lt;the probability between 0.0 and1.0 that G${k} is correct, without any extra commentary whatsoever; just theprobability!&gt;</td></tr><tr><td rowspan=1 colspan=1>therwords</td></tr><tr><td rowspan=1 colspan=6>sho</td><td rowspan=1 colspan=1>nortaspossibl</td><td rowspan=1 colspan=1>sible;</td></tr><tr><td rowspan=1 colspan=5></td><td rowspan=4 colspan=2>ust theproailiteat</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=2 colspan=3></td></tr><tr></tr><tr><td rowspan=1 colspan=1>oth</td></tr><tr></tr><tr><td rowspan=1 colspan=4></td></tr><tr><td rowspan=1 colspan=8>Ling. 1S Provide your best guess for the following question,and describe how likely it isthat your guess is correct as one of the following expressions: ${EXPRESsION_LIST}.Give ONLY the guess and_ your confidence, no other words or explanation.Forexample:\n\nGuess: &lt;most likely guess,as short as possible; not a complete sentence,just the guess!&gt;\nConfidence:&lt;description of confidence, without any extracommentary whatsoever; just a short phrase!&gt;\n\nThe question is:${THE_QUESTION}</td></tr></table>
164
+
165
+ Table 6: Prompt templates for each method evaluated. Methods above the double line use multiple samples in order to estimate confidence scores; methods below the double line use the verbalized confidences directly, requiring only a single sample.
166
+
167
+ Are the following two answers to my question $\mathsf Q$ semantically equivalent?\n\nQ: \${THE_QUESTION}\nA1: \${GOLD_ANSWER}\nA2: \${PRED_ANSWER}\n\nPlease answer with a single word, either “Yes." or “No.", and explain your reasoning.
parse/dev/g3faCfrwm7/g3faCfrwm7_content_list.json ADDED
@@ -0,0 +1,996 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedback ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 137,
8
+ 83,
9
+ 865,
10
+ 122
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Katherine Tian,∗† Eric Mitchell,∗‡ Allan Zhou,‡ Archit Sharma,‡ Rafael Rafailov‡ Huaxiu Yao,‡ Chelsea Finn,‡ Christopher D. Manning‡ ",
17
+ "bbox": [
18
+ 154,
19
+ 130,
20
+ 852,
21
+ 166
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "†Harvard University ‡Stanford University ktian@college.harvard.edu eric.mitchell@cs.stanford.edu ",
28
+ "bbox": [
29
+ 322,
30
+ 180,
31
+ 675,
32
+ 230
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 263,
42
+ 253,
43
+ 339,
44
+ 268
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "A trustworthy real-world prediction system should produce well-calibrated confidence scores; that is, its confidence in an answer should be indicative of the likelihood that the answer is correct, enabling deferral to an expert in cases of low-confidence predictions. Recent studies have shown that unsupervised pretraining produces large language models (LMs) whose conditional probabilities are remarkably well-calibrated. However, the most widelyused LMs are fine-tuned with reinforcement learning from human feedback (RLHF-LMs), and some studies have suggested that RLHFLMs produce conditional probabilities that are very poorly calibrated. In light of this perceived weakness, we conduct a broad evaluation of methods for extracting confidence scores from RLHF-LMs. For RLHF-LMs such as ChatGPT, GPT-4, and Claude, we find that verbalized confidences emitted as output tokens are typically better-calibrated than the model’s conditional probabilities on the TriviaQA, SciQ, and TruthfulQA benchmarks, often reducing the expected calibration error by a relative $50 \\%$ . ",
51
+ "bbox": [
52
+ 146,
53
+ 278,
54
+ 458,
55
+ 618
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 117,
65
+ 640,
66
+ 257,
67
+ 656
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Real-world prediction systems invariably make errors. However, some mitigation of these errors is possible if the system produces well-calibrated1 confidence estimates. In this case, the system’s least confident predictions correspond to those that are most likely to be incorrect, potentially allowing these predictions to be skipped or overridden by a human. In the context of language models, one consequence of poor calibration may be hallucination, where a language model confidently asserts incorrect facts or reasoning. While the ability of very large LMs to absorb and synthesize knowledge about the outside world has gained significant attention (Brown et al., 2020; Roberts et al., 2020; Bubeck et al., 2023), relatively little attention has been given to their well-calibratedness (Kadavath et al., 2022). Further, most existing analyses of the calibratedness of LLMs focus on models trained with maximum likelihood, while in practice, the most widely-used LLMs (such as ChatGPT) are fine-tuned using methods such as reinforcement learning from human feedback (Christiano et al., 2017). Some findings suggest that RLHF-LMs may sacrifice well-calibrated predictions for the sake of closer adherence to user instructions in dialogue (Kadavath et al., 2022; OpenAI, 2023), as the reinforcement learning objective encourages the model to allocate probability mass to the most preferred answer(s), rather than matching the relative frequency of possible answers. ",
74
+ "bbox": [
75
+ 115,
76
+ 665,
77
+ 485,
78
+ 873
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/136c529b85d62ecbb5fa5f461bfaf99336479fbd7313c678f68aa799a2ad779d.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Verbalized confidence scores (blue) are better-calibrated than log probabilities (orange) for gpt-3.5-turbo. Raw model probabilities (top-left) are consistently over-confident. Verbalized numerical probabilities (bottom) are better-calibrated. Considering more answer choices (bottom-right) further improves verbalized calibration (as in ‘Considering the Opposite’ in psychology; Lord et al. (1985)). Verbalized expressions of likelihood (top-right) also provide improved calibration. Bar height is average accuracy of predictions in bin. Darker bars mean more predictions fall in that confidence range. Results computed on SciQ. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 515,
91
+ 249,
92
+ 872,
93
+ 449
94
+ ],
95
+ "page_idx": 0
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 512,
102
+ 608,
103
+ 882,
104
+ 881
105
+ ],
106
+ "page_idx": 0
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "This paper evaluates several methods for extracting confidences about model predictions from ",
111
+ "bbox": [
112
+ 512,
113
+ 889,
114
+ 882,
115
+ 919
116
+ ],
117
+ "page_idx": 0
118
+ },
119
+ {
120
+ "type": "image",
121
+ "img_path": "images/2c0b4b54b929430bc1c69ccc6f8d86cd271e9ac67dae05bfe796c3757e5a9b8f.jpg",
122
+ "image_caption": [
123
+ "Figure 2: RLHF generally worsens the calibration of Llama-70B’s log probabilities, as measured by ECE (lower is better) or AUC (higher is better). However, this paper (Tables 1-5) will show that for several strong RLHF-LMs, the model’s verbalized confidence is often better-calibrated than its log probabilities, reversing some of this degradation. This reversal is strongest for TruthfulQA, an adversarial dataset testing common misconceptions and other difficult queries. "
124
+ ],
125
+ "image_footnote": [],
126
+ "bbox": [
127
+ 119,
128
+ 83,
129
+ 482,
130
+ 185
131
+ ],
132
+ "page_idx": 1
133
+ },
134
+ {
135
+ "type": "text",
136
+ "text": "RLHF-LMs. Due to concerns that RLHF may cause systematic overconfidence in the model’s probabilities (Figure 2), as well as the general unavailability of per-token log-probabilities in widely used RLHF-LMs, we pay particular attention to prompts that elicit verbalized probabilities, i.e., the model expresses its confidence in token-space, as either numerical probabilities or another linguistic expression of uncertainty. We find that, surprisingly, popular RLHF-LMs are able to directly verbalize confidence scores that are better-calibrated than the model’s conditional probabilities (estimated via sampling), without any fine-tuning to learn verbalization. To further improve calibration, we take inspiration from research in human psychology showing that overconfidence can be mitigated by considering alternative answers before responding (Lord et al., 1985; Mussweiler et al., 2000). We show that prompting a model to produce several answer choices before giving its confidence scores significantly improves calibration of verbalized probabilities. Combined with temperature scaling (Guo et al., 2017), this approach generally provides better calibration than model probabilities for ChatGPT2, GPT- $4 ^ { 3 }$ , and Claude $2 ^ { 4 }$ across three datasets, often reducing expected calibration error (ECE) by over $50 \\%$ . ",
137
+ "bbox": [
138
+ 117,
139
+ 317,
140
+ 487,
141
+ 752
142
+ ],
143
+ "page_idx": 1
144
+ },
145
+ {
146
+ "type": "text",
147
+ "text": "Related Work. Several studies have examined the calibration of large LMs (Lin et al., 2022a; Park and Caragea, 2022; Kadavath et al., 2022; Xiao et al., 2022; Kuhn et al., 2023), finding that combining large pre-trained LMs with temperature scaling (Guo et al., 2017) produces very wellcalibrated predictions (Kadavath et al., 2022; Xiao et al., 2022; Kuhn et al., 2023). Other work focuses on the tendency of language and dialogue models to use linguistic expressions of uncertainty in a well-calibrated manner (Zhou et al., 2023; Mielke et al., 2022). However, existing studies focus on LMs trained purely with unsupervised learning (although Kadavath et al. (2022) briefly examine RLHF-LMs), while widely used models in practice are fine-tuned with instruction-tuning or RLHF (Christiano et al., 2017). RLHF has been shown to effectively leverage annotations of human preferences to control sentiment (Ziegler et al., 2020), improve summarization or instruction-following quality (Stiennon et al., 2022; Ouyang et al., 2022), and inject behavioral priors of harmlessness (Bai et al., 2022b,a). However, recent work has raised the question of whether or not RLHF harms calibration (OpenAI, 2023). Our work is the first to show that verbalized probabilities are often bettercalibrated than the model’s conditional probabilities for RLHF-LMs such as ChatGPT, GPT-4, and Claude, and Llama-2-70B-Chat. ",
148
+ "bbox": [
149
+ 115,
150
+ 763,
151
+ 487,
152
+ 858
153
+ ],
154
+ "page_idx": 1
155
+ },
156
+ {
157
+ "type": "text",
158
+ "text": "",
159
+ "bbox": [
160
+ 512,
161
+ 85,
162
+ 882,
163
+ 454
164
+ ],
165
+ "page_idx": 1
166
+ },
167
+ {
168
+ "type": "text",
169
+ "text": "2 Evaluating Calibration in RLHF-LMs ",
170
+ "text_level": 1,
171
+ "bbox": [
172
+ 510,
173
+ 470,
174
+ 872,
175
+ 487
176
+ ],
177
+ "page_idx": 1
178
+ },
179
+ {
180
+ "type": "text",
181
+ "text": "To study the calibration of RLHF-LMs, we conduct experiments with gpt-3.5-turbo (ChatGPT), gpt-4 (GPT-4), claude-1 (Claude 1), claude-2 (Claude 2), and Llama-2-70b-chat (Llama-2- 70B-Chat). ",
182
+ "bbox": [
183
+ 512,
184
+ 498,
185
+ 882,
186
+ 577
187
+ ],
188
+ "page_idx": 1
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "Metrics. We measure calibration with multiple metrics. To measure ECE (expected calibration error; Guo et al. (2017)), we bin model predictions by their confidence and measure the average accuracy of predictions in each confidence bin. The ECE is defined as the average (squared) error between the average accuracy and confidence within each bin, where each error is weighted by the fraction of samples falling within the bin. We report raw ECE as well as ECE with temperature scaling (ECE-t). Temperature scaling fits a single temperature value $\\beta$ to the model’s confidences to minimize negative log likelihood (NLL) on the data, giving scaled probability ${ \\tilde { p } } _ { i }$ of class $i$ as $\\tilde { p } _ { i } \\propto p _ { i } ^ { \\beta }$ . See Figure 1 for a depiction of ECE binning. Although ECE is a standard and interpretable measure of calibration error, it completely fails to capture the confidences’ discriminative power.5 We therefore also report ",
193
+ "bbox": [
194
+ 512,
195
+ 590,
196
+ 882,
197
+ 879
198
+ ],
199
+ "page_idx": 1
200
+ },
201
+ {
202
+ "type": "table",
203
+ "img_path": "images/3eb3c85a66849bba3ea5ac8c3442224a20f3828a601cc97efbbaac663d832915.jpg",
204
+ "table_caption": [
205
+ "Table 1: Measuring calibration of various methods for extracting confidences from gpt-3.5-turbo (ChatGPT). The model’s conditional probabilities are relatively poorly calibrated, whether using the model’s conditional probability of the label given the query (Label prob.) or the probability assigned to ‘True’ given the query, proposed answer, and a prompt asking if the answer is correct (‘Is True’ prob.). Surprisingly, directly verbalizing a probability (Verb. 1S and Verb. 2S) or an expression of confidence such as ‘highly likely’ (Ling. 1S) yields significantly better-calibrated confidence estimates. 1S refers to one-stage prediction, where the model provides an answer and confidence probability/expression together. 2S refers to two-stage prediction, where the model first gives only an answer, and then in a second stage a confidence. To color the table cells, for each column, we demean and scale by a constant to obtain a shade in [-1,1], where cyan indicates better and orange worse performance. "
206
+ ],
207
+ "table_footnote": [],
208
+ "table_body": "<table><tr><td></td><td colspan=\"4\">TriviaQA</td><td colspan=\"4\">SciQ</td><td colspan=\"4\">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t</td><td>BS-t↓</td><td>AUC ↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t↓</td><td>AUC↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t↓</td><td>AUC↑</td></tr><tr><td>Label prob. ‘Is True’prob.</td><td>0.140 0.164</td><td>0.097 0.159</td><td>0.142</td><td>0.869</td><td>0.256</td><td>0.180</td><td>0.223</td><td>0.752</td><td>0.451 0.470</td><td>0.317 0.471</td><td>0.345 0.476</td><td>0.418 0.384</td></tr><tr><td>Entropy</td><td>1</td><td>丨</td><td>0.165</td><td>0.826 0.547</td><td>0.312 丨</td><td>0.309 一</td><td>0.309</td><td>0.677 0.483</td><td>一</td><td>丨</td><td>丨</td><td>0.236</td></tr><tr><td>Verb.1S top-1</td><td>0.068</td><td>0.076</td><td>0.138</td><td>0.879</td><td>0.234</td><td>0.084</td><td>0.214</td><td>0.744</td><td>0.389</td><td>0.256</td><td>0.322</td><td>0.545</td></tr><tr><td>Verb. 1S top-2 Verb. 1S top-4</td><td>0.050</td><td>0.053</td><td>0.139</td><td>0.894</td><td>0.132</td><td>0.050</td><td>0.201</td><td>0.766</td><td>0.361</td><td>0.115</td><td>0.252</td><td>0.485</td></tr><tr><td></td><td>0.054</td><td>0.057</td><td>0.144</td><td>0.896</td><td>0.065</td><td>0.051</td><td>0.209</td><td>0.763</td><td>0.203</td><td>0.189</td><td>0.284</td><td>0.455</td></tr><tr><td>Verb.2SCoT</td><td>0.110</td><td>0.123</td><td>0.168</td><td>0.830</td><td>0.323</td><td>0.246</td><td>0.296</td><td>0.683</td><td>0.419</td><td>0.259</td><td>0.292</td><td>0.551</td></tr><tr><td>Verb. 2S top-1</td><td>0.131</td><td>0.099</td><td>0.148</td><td>0.855</td><td>0.340</td><td>0.203</td><td>0.268</td><td>0.677</td><td>0.431</td><td>0.245</td><td>0.282</td><td>0.483</td></tr><tr><td>Verb. 2S top-2</td><td>0.047</td><td>0.045</td><td>0.147</td><td>0.887</td><td>0.169</td><td>0.040</td><td>0.201</td><td>0.768</td><td>0.395</td><td>0.101</td><td>0.224</td><td>0.517</td></tr><tr><td>Verb.2S top-4</td><td>0.050</td><td>0.051</td><td>0.156</td><td>0.861</td><td>0.130</td><td>0.046</td><td>0.211</td><td>0.729</td><td>0.270</td><td>0.156</td><td>0.246</td><td>0.463</td></tr><tr><td>Ling. 1S human</td><td>0.062</td><td>0.069</td><td>0.137</td><td>0.884</td><td>0.166</td><td>0.087</td><td>0.223</td><td>0.703</td><td>0.306</td><td>0.296</td><td>0.333</td><td>0.503</td></tr><tr><td>Ling. 1S-opt.</td><td>0.058</td><td>0.066</td><td>0.135</td><td>0.878</td><td>0.064</td><td>0.068</td><td>0.220</td><td>0.674</td><td>0.125</td><td>0.165</td><td>0.270</td><td>0.492</td></tr></table>",
209
+ "bbox": [
210
+ 115,
211
+ 83,
212
+ 882,
213
+ 274
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "table",
219
+ "img_path": "images/75fa943de8286d705270bc7c6dbcdf53ce6fee40a5f886e64bf2bce5d4830b47.jpg",
220
+ "table_caption": [],
221
+ "table_footnote": [],
222
+ "table_body": "<table><tr><td></td><td colspan=\"4\">TriviaQA</td><td colspan=\"4\">SciQ</td><td colspan=\"4\">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t←</td><td>AUC</td><td>ECE</td><td>ECE-t</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.078</td><td>0.067</td><td>0.077</td><td>0.950</td><td>0.219</td><td>0.165</td><td>0.186</td><td>0.820</td><td>0.445</td><td>0.334</td><td>0.362</td><td>0.462</td></tr><tr><td>Verb.1S top-1</td><td>0.024</td><td>0.038</td><td>0.084</td><td>0.937</td><td>0.201</td><td>0.084</td><td>0.165</td><td>0.843</td><td>0.350</td><td>0.156</td><td>0.227</td><td>0.622</td></tr><tr><td>Verb. 1S top-2</td><td>0.025</td><td>0.034</td><td>0.084</td><td>0.949</td><td>0.140</td><td>0.048</td><td>0.185</td><td>0.813</td><td>0.315</td><td>0.112</td><td>0.228</td><td>0.623</td></tr><tr><td>Verb. 1S top-4</td><td>0.041</td><td>0.039</td><td>0.081</td><td>0.959</td><td>0.056</td><td>0.059</td><td>0.185</td><td>0.815</td><td>0.198</td><td>0.144</td><td>0.245</td><td>0.619</td></tr><tr><td>Ling. 1S-human</td><td>0.051</td><td>0.041</td><td>0.086</td><td>0.931</td><td>0.148</td><td>0.024</td><td>0.170</td><td>0.835</td><td>0.241</td><td>0.151</td><td>0.228</td><td>0.651</td></tr><tr><td>Ling.1S-opt.</td><td>0.056</td><td>0.051</td><td>0.088</td><td>0.927</td><td>0.028</td><td>0.052</td><td>0.172</td><td>0.828</td><td>0.082</td><td>0.105</td><td>0.212</td><td>0.632</td></tr></table>",
223
+ "bbox": [
224
+ 115,
225
+ 386,
226
+ 882,
227
+ 504
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "Table 2: gpt-4’s verbalized probabilities are substantially better-calibrated than the model probabilities themselves, even after temperature scaling, similarly to gpt-3.5-turbo in Table 1. ",
234
+ "bbox": [
235
+ 114,
236
+ 513,
237
+ 880,
238
+ 537
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "Brier Score (BS; Brier (1950)) on temperaturescaled confidences (BS-t), a proper scoring rule (Ovadia et al., 2019) that is the mean squared error between the confidences and the correctness labels. Finally, we assess calibration using a metric from the selective classification literature (Geifman and El-Yaniv, 2017), specifically, the area under the curve of selective accuracy and coverage (AUC). ",
245
+ "bbox": [
246
+ 115,
247
+ 549,
248
+ 487,
249
+ 677
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "Datasets. Our experiments use three questionanswering datasets assessing factual knowledge. TriviaQA (Joshi et al., 2017) contains $6 5 0 \\mathrm { k }$ question-answer pairs gathered by trivia enthusiasts; SciQ (Welbl et al., 2017) contains approximately 14k crowdsourced science exam questionanswer pairs; TruthfulQA (Lin et al., 2022b) contains 817 questions designed to test language models’ tendency to mimic human falsehoods. We sample 1000 questions from the validation split of TriviaQA (rc.web.nocontext) and SciQ and all 817 questions from the validation split of TruthfulQA (generation) for our experiments. ",
256
+ "bbox": [
257
+ 115,
258
+ 712,
259
+ 487,
260
+ 919
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Evaluation protocol. For each dataset, we generate a response and corresponding confidence from each method on each of the evaluation questions. Because calibration essentially quantifies the relationship between model confidence and correctness, computing correctness is crucial to accurate measurements of calibration. However, we find doing so to be a challenge, especially in datasets where only a single ground-truth answer (but not aliases or semantically equivalent rephrases) is provided. To avoid excessive false negatives in our correctness computation as a result of exact-match evaluation, we use either GPT-4 or GPT-3.5 to evaluate whether a response is essentially equivalent to the ground truth answer; see Appendix C for the complete equivalence-checking procedure. ",
267
+ "bbox": [
268
+ 512,
269
+ 550,
270
+ 882,
271
+ 806
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "Methods. We compare a wide variety of methods for extracting confidence estimates from LLMs. For a comprehensive list of the prompts used for each method, see Appendix Table 6. ",
278
+ "bbox": [
279
+ 512,
280
+ 822,
281
+ 882,
282
+ 885
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "First, we consider two methods that leverage the true conditional distribution of the model to generate confidence scores. The simplest is Label prob., which uses the conditional probability distribution $p ( y | x )$ of the model given a question $x$ , which we estimate using $n = 1 0$ samples, since many RLHFLMs are closed-source and do not offer per-token probabilities.67 We return the most common answer, using the LLM-based equivalence function to determine when two lexically different answers are semantically equivalent. In a variation of the method described by Kadavath et al. (2022) (again, we use samples since model probabilities are not available), ‘Is True’ prob. samples a single answer $\\hat { y }$ from the model given a question $x$ , and the probability it is true is estimated by the probability the model assigns to ‘True’ when asked if the given answer is true (where once again the probabilities are estimated via samples), i.e., $p ( \\mathsf { T r u e } | x , \\hat { y } )$ . ",
289
+ "bbox": [
290
+ 512,
291
+ 889,
292
+ 882,
293
+ 919
294
+ ],
295
+ "page_idx": 2
296
+ },
297
+ {
298
+ "type": "table",
299
+ "img_path": "images/281f9bfa04f3188f1dacb47f3902059926d5453a9635e0935f0021120e5c4db2.jpg",
300
+ "table_caption": [],
301
+ "table_footnote": [],
302
+ "table_body": "<table><tr><td></td><td colspan=\"4\">TriviaQA</td><td colspan=\"4\">SciQ</td><td colspan=\"4\">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.074</td><td>0.079</td><td>0.117</td><td>0.915</td><td>0.216</td><td>0.149</td><td>0.195</td><td>0.786</td><td>0.432</td><td>0.304</td><td>0.335</td><td>0.418</td></tr><tr><td>Verb. 1S top-1</td><td>0.049</td><td>0.059</td><td>0.160</td><td>0.839</td><td>0.265</td><td>0.103</td><td>0.247</td><td>0.663</td><td>0.440</td><td>0.134</td><td>0.204</td><td>0.411</td></tr><tr><td>Verb. 1S top-2</td><td>0.046</td><td>0.047</td><td>0.158</td><td>0.875</td><td>0.207</td><td>0.040</td><td>0.225</td><td>0.693</td><td>0.450</td><td>0.085</td><td>0.197</td><td>0.409</td></tr><tr><td>Verb. 1S top-4</td><td>0.075</td><td>0.079</td><td>0.176</td><td>0.814</td><td>0.151</td><td>0.057</td><td>0.226</td><td>0.667</td><td>0.372</td><td>0.105</td><td>0.183</td><td>0.377</td></tr><tr><td>Ling. 1S human</td><td>0.053</td><td>0.050</td><td>0.151</td><td>0.867</td><td>0.253</td><td>0.118</td><td>0.245</td><td>0.664</td><td>0.443</td><td>0.358</td><td>0.340</td><td>0.384</td></tr><tr><td>Ling.1S-opt.</td><td>0.074</td><td>0.060</td><td>0.149</td><td>0.863</td><td>0.089</td><td>0.082</td><td>0.238</td><td>0.623</td><td>0.139</td><td>0.148</td><td>0.228</td><td>0.350</td></tr></table>",
303
+ "bbox": [
304
+ 115,
305
+ 82,
306
+ 882,
307
+ 199
308
+ ],
309
+ "page_idx": 3
310
+ },
311
+ {
312
+ "type": "table",
313
+ "img_path": "images/51785edaf6b15e7efe91a86f6e05fa58536f60a35bab93babbc4d10a4f598f05.jpg",
314
+ "table_caption": [
315
+ "Table 3: Claude-1 produces similar- or better-calibrated log probabilities to gpt-3.5-turbo, but is less able to verbalize well-calibrated confidences, compared to models in the GPT family of RLHF-LMs. Claude-1 has since been deprecated. "
316
+ ],
317
+ "table_footnote": [
318
+ "Table 4: Claude-2 has weaker conditional probabilities than Claude-1 and GPT- $^ *$ , but its verbalized calibration provides consistent improvement over conditional probabilities at a level comparable to GPT-3.5 and surpassing GPT- $^ *$ on TruthfulQA. "
319
+ ],
320
+ "table_body": "<table><tr><td></td><td colspan=\"4\">TriviaQA</td><td colspan=\"4\">SciQ</td><td colspan=\"4\">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC </td><td>ECE</td><td>ECE-t ↓</td><td>BS-t</td><td>AUC </td></tr><tr><td>Label prob.</td><td>0.089</td><td>0.089</td><td>0.137</td><td>0.882</td><td>0.181</td><td>0.176</td><td>0.237</td><td>0.762</td><td>0.409</td><td>0.368</td><td>0.405</td><td>0.319</td></tr><tr><td>Verb. iS top-1</td><td>0.072</td><td>0.071</td><td>0.141</td><td>0.903</td><td>0.204</td><td>0.054</td><td>0.201</td><td>0.776</td><td>0.345</td><td>0.115</td><td>0.215</td><td>0.573</td></tr><tr><td>Verb.1S top-2</td><td>0.049</td><td>0.054</td><td>0.133</td><td>0.918</td><td>0.134</td><td>0.041</td><td>0.211</td><td>0.754</td><td>0.359</td><td>0.085</td><td>0.223</td><td>0.491</td></tr><tr><td>Verb. 1S top-4</td><td>0.072</td><td>0.063</td><td>0.158</td><td>0.890</td><td>0.048</td><td>0.052</td><td>0.216</td><td>0.711</td><td>0.274</td><td>0.075</td><td>0.208</td><td>0.473</td></tr><tr><td>Ling. 1S human</td><td>0.085</td><td>0.061</td><td>0.151</td><td>0.878</td><td>0.238</td><td>0.026</td><td>0.209</td><td>0.756</td><td>0.381</td><td>0.242</td><td>0.305</td><td>0.530</td></tr><tr><td>Ling. 1S-opt.</td><td>0.060</td><td>0.070</td><td>0.151</td><td>0.874</td><td>0.049</td><td>0.056</td><td>0.214</td><td>0.738</td><td>0.099</td><td>0.130</td><td>0.266</td><td>0.446</td></tr></table>",
321
+ "bbox": [
322
+ 115,
323
+ 236,
324
+ 882,
325
+ 348
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "",
332
+ "bbox": [
333
+ 115,
334
+ 394,
335
+ 487,
336
+ 668
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Next, we consider methods that extract confidence scores through verbalization (Lin et al., 2022a), i.e., where the model expresses its confidence in token space, either with numerical probabilities or linguistic expressions of likelihood.8 First, Verb. 1S top- $k$ prompts the model to produce $k$ guesses and a probability that each is correct all in a single response (i.e., ‘1 stage’). We take the highest-probability prediction and its associated probability as the model’s output and confidence. Verb. 2S top- $k$ similarly uses numerical probabilities, except the model is first asked to provide only its answers, and afterwards, in a second round of dialogue, asked to assign probabilities of correctness to each answer (i.e., ‘2 stages’). Verb. 2S CoT uses a chain-of-thought prompt before giving a single answer, and in a second round of dialogue, the model is prompted to assign a probability to that answer (with the chain of thought present in the model’s context). Ling. 1S-human uses linguistic likelihood expressions, rather than numerical probabilities, to express uncertainty. The model is prompted to assign confidences to its guesses by choosing from a set of linguistic expressions of uncertainty: {Almost certain, Likely, . . . , Almost no chance}. Each linguistic likelihood expression is mapped to a probability using responses from a human survey on social media with 123 respondents (FagenUlmschneider, 2023). Ling. 1S-opt. uses a held out set of calibration questions and answers to compute the average accuracy for each likelihood expression, using these ‘optimized’ values instead. Expressions that are not used for at least $\\textstyle { \\frac { 1 } { N } }$ of questions, where $N$ is the number of calibration questions, simply use the human probability. ",
343
+ "bbox": [
344
+ 115,
345
+ 669,
346
+ 487,
347
+ 813
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "",
354
+ "bbox": [
355
+ 512,
356
+ 394,
357
+ 882,
358
+ 827
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "3 Results ",
365
+ "text_level": 1,
366
+ "bbox": [
367
+ 512,
368
+ 844,
369
+ 606,
370
+ 859
371
+ ],
372
+ "page_idx": 3
373
+ },
374
+ {
375
+ "type": "text",
376
+ "text": "Tables 1–5 show the results of evaluating various methods for extracting confidence from RLHFLMs on gpt-3.5-turbo, gpt-4, claude-1, claude-2, and Llama-2-70b-chat, respectively. We distill several key conclusions from these experiments. 1. Large RLHF-LMs can often directly verbalize better-calibrated confidences (either a numerical confidence probability or an expression such as ‘highly likely’) than the models’ conditional probabilities. 2. Among the methods for verbalizing probabilities directly, we observe that generating and evaluating multiple hypotheses improves calibration (see Figure 1), similarly to humans (Lord et al., 1985), and corroborating a similar finding in LMs (Kadavath et al., 2022). 3. Language models can express their uncertainty with numerical probabilities as well or better than with words, which is surprising in light of longstanding difficulties in representing numbers in language models (Thawani et al., 2021). 4. Chainof-thought prompting does not improve verbalized calibration (see Appendix Figure 5 for additional CoT results). 5. The calibration of both Claude models’ conditional probabilities roughly falls between gpt-3.5-turbo and gpt-4; however, while Claude 1 is much weaker at verbalizing its confidence, Claude 2 is generally a bit stronger than gpt-3.5-turbo at verbalizing. The verbal calibration of the open source model Llama-2-70b-chat is generally weaker than that of closed source models but still demonstrates improvement over its conditional probabilities by some metrics, and does so most clearly on TruthfulQA. ",
377
+ "bbox": [
378
+ 512,
379
+ 872,
380
+ 882,
381
+ 920
382
+ ],
383
+ "page_idx": 3
384
+ },
385
+ {
386
+ "type": "table",
387
+ "img_path": "images/f546fb7553aa771ec93f390451f744a497ab7bd82832fa172941f604c451a604.jpg",
388
+ "table_caption": [],
389
+ "table_footnote": [
390
+ "Table 5: With Llama2-70B-Chat, verbalized calibration provides improvement over conditional probabilities across some metrics, but the improvement is much less consistent compared to GPT- $^ *$ and Claude-\\*. "
391
+ ],
392
+ "table_body": "<table><tr><td></td><td colspan=\"4\">TriviaQA</td><td colspan=\"4\">SciQ</td><td colspan=\"4\">TruthfulQA</td></tr><tr><td>Method</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t↓</td><td>AUC↑</td><td>ECE</td><td>ECE-t↓</td><td>BS-t</td><td>AUC</td><td>ECE</td><td>ECE-t ↓</td><td>BS-t </td><td>AUC</td></tr><tr><td>Label prob.</td><td>0.151</td><td>0.124</td><td>0.156</td><td>0.865</td><td>0.266</td><td>0.189</td><td>0.243</td><td>0.707</td><td>0.405</td><td>0.361</td><td>0.396</td><td>0.407</td></tr><tr><td>Verb.1S top-1</td><td>0.071</td><td>0.067</td><td>0.186</td><td>0.793</td><td>0.196</td><td>0.053</td><td>0.239</td><td>0.648</td><td>0.386</td><td>0.172</td><td>0.266</td><td>0.502</td></tr><tr><td>Verb. 1S top-2</td><td>0.060</td><td>0.073</td><td>0.194</td><td>0.815</td><td>0.153</td><td>0.032</td><td>0.230</td><td>0.667</td><td>0.340</td><td>0.037</td><td>0.227</td><td>0.440</td></tr><tr><td>Verb. 1S top-4</td><td>0.069</td><td>0.079</td><td>0.182</td><td>0.816</td><td>0.105</td><td>0.043</td><td>0.229</td><td>0.648</td><td>0.231</td><td>0.102</td><td>0.237</td><td>0.465</td></tr><tr><td>Ling. 1S human</td><td>0.179</td><td>0.115</td><td>0.195</td><td>0.749</td><td>0.071</td><td>0.101</td><td>0.252</td><td>0.603</td><td>0.376</td><td>0.366</td><td>0.383</td><td>0.407</td></tr><tr><td>Ling.1S-opt.</td><td>0.077</td><td>0.068</td><td>0.186</td><td>0.779</td><td>0.019</td><td>0.042</td><td>0.236</td><td>0.590</td><td>0.047</td><td>0.051</td><td>0.239</td><td>0.435</td></tr></table>",
393
+ "bbox": [
394
+ 115,
395
+ 82,
396
+ 882,
397
+ 199
398
+ ],
399
+ "page_idx": 4
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "",
404
+ "bbox": [
405
+ 115,
406
+ 243,
407
+ 487,
408
+ 728
409
+ ],
410
+ "page_idx": 4
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "4 Discussion ",
415
+ "text_level": 1,
416
+ "bbox": [
417
+ 117,
418
+ 745,
419
+ 238,
420
+ 762
421
+ ],
422
+ "page_idx": 4
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "In summary, we study the calibration of widely used RLHF-LMs. We first replicate the finding for GPT-4 (OpenAI, 2023) that RLHF can worsen the calibration of a model’s conditional probabilities using the open-source Llama-2-70B base and chat models (Figure 2). To mitigate this regression and ease extraction of calibrated confidence scores for models for which log probabilities are not available, we propose and study new methods that can elicit calibrated confidences from RLHF-LMs by prompting the model to verbalize its confidence in token space. We find verbalized probabilities are better-calibrated than conditional probabilities across several closed models, with mixed results for Llama-2-70B-Chat. ",
427
+ "bbox": [
428
+ 117,
429
+ 776,
430
+ 485,
431
+ 919
432
+ ],
433
+ "page_idx": 4
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "",
438
+ "bbox": [
439
+ 512,
440
+ 246,
441
+ 882,
442
+ 341
443
+ ],
444
+ "page_idx": 4
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Our results raise several questions for future work. Most notably, the difference between GPT-\\*, Claude-\\*, and Llama-2’s ability to verbalize confidence is significant. What factors are important for learning this skill? Additionally, the 1-stage and 2-stage verbalized numerical confidence prompts sometimes differ drastically in the calibration of their confidences. How can we reduce sensitivity of a model’s calibration to the prompt? Going beyond question-answering, can we leverage good calibration in short-answer settings to improve the reliability of long-form generations, perhaps by breaking down long-form generation into a sequence of short questions? Finally, to what extent does a language model’s calibration depend on the domain; do our conclusions in the context of factual recall hold in the context of reasoning or arithmetic? Answering these questions provides one path toward building more trustworthy and useful language systems. ",
449
+ "bbox": [
450
+ 512,
451
+ 349,
452
+ 882,
453
+ 655
454
+ ],
455
+ "page_idx": 4
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Limitations. While our work demonstrates a promising new approach to generating calibrated confidences through verbalization, there are limitations that could be addressed in future work. First, our experiments are focused on factual recalloriented problems, and the extent to which our observations would hold for reasoning-heavy settings is an interesting open question. Additionally, the lack of technical details available for many state-ofthe-art closed RLHF-LMs may limit our ability to understand what factors enable a model to verbalize well-calibrated confidences and differences in this ability across different models. Finally, our study is limited to short-form question-answering; future work should extend this analysis to longer-form generation settings. ",
460
+ "bbox": [
461
+ 512,
462
+ 662,
463
+ 882,
464
+ 919
465
+ ],
466
+ "page_idx": 4
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "Acknowledgements. CF and CDM are CIFAR Fellows. EM gratefully acknowledges funding from a Knight-Hennessy Graduate Fellowship. AZ is supported by the NSF graduate research fellowship program. This research was supported in part by Juniper Networks, Apple, and ONR grant N00014- 20-1-2675. The authors thank Yoonho Lee and Noah Goodman for helpful feedback on calibration metrics and experiment design. ",
471
+ "bbox": [
472
+ 115,
473
+ 85,
474
+ 485,
475
+ 228
476
+ ],
477
+ "page_idx": 5
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "References ",
482
+ "text_level": 1,
483
+ "bbox": [
484
+ 117,
485
+ 256,
486
+ 211,
487
+ 271
488
+ ],
489
+ "page_idx": 5
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, Nicholas Joseph, Saurav Kadavath, Jackson Kernion, Tom Conerly, Sheer El-Showk, Nelson Elhage, Zac Hatfield-Dodds, Danny Hernandez, Tristan Hume, Scott Johnston, Shauna Kravec, Liane Lovitt, Neel Nanda, Catherine Olsson, Dario Amodei, Tom Brown, Jack Clark, Sam McCandlish, Chris Olah, Ben Mann, and Jared Kaplan. 2022a. Training a helpful and harmless assistant with reinforcement learning from human feedback. ",
494
+ "bbox": [
495
+ 117,
496
+ 279,
497
+ 485,
498
+ 434
499
+ ],
500
+ "page_idx": 5
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, Carol Chen, Catherine Olsson, Christopher Olah, Danny Hernandez, Dawn Drain, Deep Ganguli, Dustin Li, Eli Tran-Johnson, Ethan Perez, Jamie Kerr, Jared Mueller, Jeffrey Ladish, Joshua Landau, Kamal Ndousse, Kamile Lukosuite, Liane Lovitt, Michael Sellitto, Nelson Elhage, Nicholas Schiefer, Noemi Mercado, Nova DasSarma, Robert Lasenby, Robin Larson, Sam Ringer, Scott Johnston, Shauna Kravec, Sheer El Showk, Stanislav Fort, Tamera Lanham, Timothy Telleen-Lawton, Tom Conerly, Tom Henighan, Tristan Hume, Samuel R. Bowman, Zac Hatfield-Dodds, Ben Mann, Dario Amodei, Nicholas Joseph, Sam McCandlish, Tom Brown, and Jared Kaplan. 2022b. Constitutional AI: Harmlessness from ai feedback. ",
505
+ "bbox": [
506
+ 117,
507
+ 444,
508
+ 485,
509
+ 677
510
+ ],
511
+ "page_idx": 5
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "Glenn W. Brier. 1950. Verification of Forecasts Expressed in Terms of Probability. Monthly Weather Review, 78(1):1–3. ",
516
+ "bbox": [
517
+ 115,
518
+ 688,
519
+ 487,
520
+ 727
521
+ ],
522
+ "page_idx": 5
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc. ",
527
+ "bbox": [
528
+ 119,
529
+ 736,
530
+ 485,
531
+ 917
532
+ ],
533
+ "page_idx": 5
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "Sébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, Harsha Nori, Hamid Palangi, Marco Tulio Ribeiro, and Yi Zhang. 2023. Sparks of artificial general intelligence: Early experiments with GPT-4. ArXiv preprint arXiv:2303.12712. ",
538
+ "bbox": [
539
+ 510,
540
+ 86,
541
+ 882,
542
+ 177
543
+ ],
544
+ "page_idx": 5
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc. ",
549
+ "bbox": [
550
+ 510,
551
+ 189,
552
+ 882,
553
+ 254
554
+ ],
555
+ "page_idx": 5
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "Wade Fagen-Ulmschneider. 2023. Perception of probability words. Ms., UIUC, 05-24-2023. ",
560
+ "bbox": [
561
+ 512,
562
+ 265,
563
+ 882,
564
+ 291
565
+ ],
566
+ "page_idx": 5
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "Yonatan Geifman and Ran El-Yaniv. 2017. Selective classification for deep neural networks. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, page 4885–4894, Red Hook, NY, USA. Curran Associates Inc. ",
571
+ "bbox": [
572
+ 514,
573
+ 303,
574
+ 882,
575
+ 380
576
+ ],
577
+ "page_idx": 5
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. 2017. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1321– 1330. PMLR. ",
582
+ "bbox": [
583
+ 512,
584
+ 392,
585
+ 882,
586
+ 470
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601–1611, Vancouver, Canada. Association for Computational Linguistics. ",
593
+ "bbox": [
594
+ 512,
595
+ 481,
596
+ 882,
597
+ 573
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, Deep Ganguli, Danny Hernandez, Josh Jacobson, Jackson Kernion, Shauna Kravec, Liane Lovitt, Kamal Ndousse, Catherine Olsson, Sam Ringer, Dario Amodei, Tom Brown, Jack Clark, Nicholas Joseph, Ben Mann, Sam McCandlish, Chris Olah, and Jared Kaplan. 2022. Language models (mostly) know what they know. Arxiv arxiv:2207.05221. ",
604
+ "bbox": [
605
+ 510,
606
+ 585,
607
+ 882,
608
+ 753
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. In The Eleventh International Conference on Learning Representations. ",
615
+ "bbox": [
616
+ 510,
617
+ 765,
618
+ 882,
619
+ 831
620
+ ],
621
+ "page_idx": 5
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "Stephanie Lin, Jacob Hilton, and Owain Evans. 2022a. Teaching models to express their uncertainty in words. Transactions on Machine Learning Research. ",
626
+ "bbox": [
627
+ 512,
628
+ 841,
629
+ 882,
630
+ 882
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Stephanie Lin, Jacob Hilton, and Owain Evans. 2022b. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3214–3252, Dublin, Ireland. Association for Computational Linguistics. ",
637
+ "bbox": [
638
+ 512,
639
+ 892,
640
+ 882,
641
+ 919
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "",
648
+ "bbox": [
649
+ 134,
650
+ 86,
651
+ 487,
652
+ 139
653
+ ],
654
+ "page_idx": 6
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "Charles Lord, Mark Lepper, and Elizabeth Preston. 1985. Considering the opposite: A corrective strategy for social judgment. Journal of personality and social psychology, 47:1231–43. ",
659
+ "bbox": [
660
+ 115,
661
+ 153,
662
+ 487,
663
+ 205
664
+ ],
665
+ "page_idx": 6
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "Sabrina J. Mielke, Arthur Szlam, Emily Dinan, and YLan Boureau. 2022. Reducing conversational agents’ overconfidence through linguistic calibration. Transactions of the Association for Computational Linguistics, 10:857–872. ",
670
+ "bbox": [
671
+ 115,
672
+ 219,
673
+ 487,
674
+ 284
675
+ ],
676
+ "page_idx": 6
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "Thomas Mussweiler, Fritz Strack, and Tim Pfeiffer. 2000. Overcoming the inevitable anchoring effect: Considering the opposite compensates for selective accessibility. Personality and Social Psychology Bulletin, 26(9):1142–1150. ",
681
+ "bbox": [
682
+ 117,
683
+ 299,
684
+ 487,
685
+ 363
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "OpenAI. 2023. Gpt-4 technical report. ",
692
+ "bbox": [
693
+ 117,
694
+ 378,
695
+ 374,
696
+ 391
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730–27744. Curran Associates, Inc. ",
703
+ "bbox": [
704
+ 115,
705
+ 405,
706
+ 487,
707
+ 535
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, D. Sculley, Sebastian Nowozin, Joshua V. Dillon, Balaji Lakshminarayanan, and Jasper Snoek. 2019. Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Red Hook, NY, USA. Curran Associates Inc. ",
714
+ "bbox": [
715
+ 117,
716
+ 549,
717
+ 487,
718
+ 653
719
+ ],
720
+ "page_idx": 6
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "Seo Yeon Park and Cornelia Caragea. 2022. On the calibration of pre-trained language models using mixup guided by area under the margin and saliency. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5364–5374, Dublin, Ireland. Association for Computational Linguistics. ",
725
+ "bbox": [
726
+ 117,
727
+ 668,
728
+ 487,
729
+ 759
730
+ ],
731
+ "page_idx": 6
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "Adam Roberts, Colin Raffel, and Noam Shazeer. 2020. How much knowledge can you pack into the parameters of a language model? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5418–5426, Online. Association for Computational Linguistics. ",
736
+ "bbox": [
737
+ 117,
738
+ 774,
739
+ 485,
740
+ 852
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "Nisan Stiennon, Long Ouyang, Jeff Wu, Daniel M. Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul Christiano. 2022. Learning to summarize from human feedback. ",
747
+ "bbox": [
748
+ 115,
749
+ 866,
750
+ 487,
751
+ 917
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "Avijit Thawani, Jay Pujara, Filip Ilievski, and Pedro Szekely. 2021. Representing numbers in NLP: a survey and a vision. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 644–656, Online. Association for Computational Linguistics. ",
758
+ "bbox": [
759
+ 512,
760
+ 86,
761
+ 882,
762
+ 177
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "Johannes Welbl, Nelson F. Liu, and Matt Gardner. 2017. Crowdsourcing multiple choice science questions. ArXiv, abs/1707.06209. ",
769
+ "bbox": [
770
+ 510,
771
+ 187,
772
+ 882,
773
+ 227
774
+ ],
775
+ "page_idx": 6
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "Yuxin Xiao, Paul Pu Liang, Umang Bhatt, Willie Neiswanger, Ruslan Salakhutdinov, and LouisPhilippe Morency. 2022. Uncertainty quantification with pre-trained language models: A large-scale empirical analysis. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 7273–7284, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. ",
780
+ "bbox": [
781
+ 512,
782
+ 237,
783
+ 882,
784
+ 342
785
+ ],
786
+ "page_idx": 6
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "Kaitlyn Zhou, Dan Jurafsky, and Tatsunori Hashimoto. 2023. Navigating the grey area: Expressions of overconfidence and uncertainty in language models. ",
791
+ "bbox": [
792
+ 510,
793
+ 353,
794
+ 882,
795
+ 392
796
+ ],
797
+ "page_idx": 6
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2020. Fine-tuning language models from human preferences. ",
802
+ "bbox": [
803
+ 510,
804
+ 403,
805
+ 884,
806
+ 455
807
+ ],
808
+ "page_idx": 6
809
+ },
810
+ {
811
+ "type": "image",
812
+ "img_path": "images/29a94f82c16fe874b63cf56e952a694c94653bf9c7c9f3480e04d2af95101570.jpg",
813
+ "image_caption": [
814
+ "Usage of likelihood expressions by 3.5-turbo "
815
+ ],
816
+ "image_footnote": [],
817
+ "bbox": [
818
+ 136,
819
+ 99,
820
+ 468,
821
+ 261
822
+ ],
823
+ "page_idx": 7
824
+ },
825
+ {
826
+ "type": "image",
827
+ "img_path": "images/cb784ea8d3fbd2c5354f9b6f09da03fdefd1c83f74221e895783b2b224f839ac.jpg",
828
+ "image_caption": [
829
+ "Figure 3: gpt-3.5-turbo usage rate of each likelihood expression; the model displays much lower verbalized confidence on TruthfulQA than on standard factual recall problems. ",
830
+ "Figure 4: gpt-4 usage rate of each likelihood expression; the model displays markedly lower verbalized confidence on TruthfulQA than on standard factual recall problems. "
831
+ ],
832
+ "image_footnote": [],
833
+ "bbox": [
834
+ 152,
835
+ 316,
836
+ 448,
837
+ 472
838
+ ],
839
+ "page_idx": 7
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "A Additional Results ",
844
+ "text_level": 1,
845
+ "bbox": [
846
+ 117,
847
+ 548,
848
+ 312,
849
+ 564
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "Here, we include the likelihood expression usage distribution for gpt-3.5 and gpt-4 in Figures 3 and 4, respectively. gpt-3.5 is systematically less confident for TruthfulQA. The contrast between model confidence for TriviaQA and SciQ compared with TruthfulQA is even more stark for gpt-4. ",
856
+ "bbox": [
857
+ 115,
858
+ 574,
859
+ 485,
860
+ 670
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "We also provide additional calibration results for chain-of-thought methods. We compare a onestage verbalized CoT prompt (Verb. 1S CoT), a two-stage verbalized CoT prompt (Verb. 2S CoT), and a two-stage verbalized method that uses CoT just before eliciting the numerical confidence (Verb. 2S Cot Prob) instead of before the guess, as shown for gpt-3.5 on Trivia QA, SciQ, and Truthful QA in Figure 5. We find that CoT does not noticeably improve calibration across any setting or dataset. ",
867
+ "bbox": [
868
+ 115,
869
+ 671,
870
+ 487,
871
+ 831
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "B Fitting Procedure for Temperature and Probabilities for Linguistic Expressions ",
878
+ "text_level": 1,
879
+ "bbox": [
880
+ 115,
881
+ 845,
882
+ 485,
883
+ 878
884
+ ],
885
+ "page_idx": 7
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "To fit the temperature that is used to compute ECEt and BS-t we split our total data into 5 folds. For each fold, we use it once to fit a temperature and evaluate metrics on the remaining folds. We find that fitting the temperature on $20 \\%$ of the data yields relatively stable temperatures across folds. We report the average temperature-scaled ECE and BS as ECE-t and ${ \\bf B S - t }$ . ",
890
+ "bbox": [
891
+ 115,
892
+ 889,
893
+ 487,
894
+ 919
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "image",
900
+ "img_path": "images/6b87cbb676b16607bf3bff0af7beadcb31e4136e025c14228876dc20301c0b2b.jpg",
901
+ "image_caption": [
902
+ "Figure 5: Expected calibration error is not consistently improved for any CoT prompt variant on gpt-3.5-turbo. "
903
+ ],
904
+ "image_footnote": [],
905
+ "bbox": [
906
+ 517,
907
+ 84,
908
+ 873,
909
+ 463
910
+ ],
911
+ "page_idx": 7
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "",
916
+ "bbox": [
917
+ 512,
918
+ 513,
919
+ 882,
920
+ 607
921
+ ],
922
+ "page_idx": 7
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "To compute ECE and AUC for Ling. 1S-opt., we similarly split our total data into 5 folds, using 4 folds to fit the probabilities behind each linguistic expression of confidence, then evaluating on the remaining fold. To compute ECE-t and BS-t for Ling. 1S-opt, we hold out one of the 5 folds to fit temperature. We use 3 folds to fit probabilities for linguistic expressions, compute the temperature based on these probabilities on the temperature set, and evaluate metrics on the last fold. We then average metrics across all 20 rotations of folds. ",
927
+ "bbox": [
928
+ 512,
929
+ 609,
930
+ 880,
931
+ 784
932
+ ],
933
+ "page_idx": 7
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "C Prompt Templates ",
938
+ "text_level": 1,
939
+ "bbox": [
940
+ 512,
941
+ 797,
942
+ 707,
943
+ 814
944
+ ],
945
+ "page_idx": 7
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "The prompt template for each sampling method is provided in Table 6. The question is substituted for the variable $\\$ 123,456,710N \\}$ in each prompt. To evaluate answer correctness, we use gpt-3.5-turbo for SciQ and TruthfulQA and gpt-4 for TriviaQA due to gpt-3.5-turbo’s high disagreement with a human evaluator on TriviaQA. Using the ground truth answer as $\\$ 523,456,7$ and the model-generated answer as \\${PRED_ANSWER}, we use the following prompt template: ",
950
+ "bbox": [
951
+ 512,
952
+ 824,
953
+ 882,
954
+ 920
955
+ ],
956
+ "page_idx": 7
957
+ },
958
+ {
959
+ "type": "table",
960
+ "img_path": "images/53d417f2848e7c864ea722f51d6f29fb757295cddd33aa1b71498ec271051052.jpg",
961
+ "table_caption": [],
962
+ "table_footnote": [
963
+ "Table 6: Prompt templates for each method evaluated. Methods above the double line use multiple samples in order to estimate confidence scores; methods below the double line use the verbalized confidences directly, requiring only a single sample. "
964
+ ],
965
+ "table_body": "<table><tr><td rowspan=1 colspan=8>Method Template</td></tr><tr><td rowspan=1 colspan=8>Label prob. Provide your best guess for the following question. Give ONLY the guess,noother words orexplanation.\\n\\nForexample:\\n\\nGuess: &lt;most likely guess,asshort as possible; not a complete sentence, just the guess!&gt;\\n\\nThe questionis:${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>‘Is True&#x27;prob. Question: ${QUESTION}\\nProposed Answer: ${ANSWER}\\nIs the proposed answer:\\n\\t(A)True or\\n\\t(B) False?\\n The proposed answer is:</td></tr><tr><td rowspan=1 colspan=8>Verb. 1S top-1 Provide your best guess and the probability that it is correct (0.0 to 1.0) forthe_following question. Give ONLY the guess and probability,no other words orexplanation.For example:\\n\\nGuess: &lt;most likely guess,as short as possible; nota complete sentence,just the guess!&gt;\\n Probability:&lt;the probability between 0.0and 1.0 that your guess is correct,without any extra commentary whatsoever;justthe probability!&gt;\\n\\nThe question is:${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>Verb.1S top-k Provide your ${k} best guesses and the probability that each is correct (0.0 to1.0)for the following question.Give ONLY the guesses and probabilities,no otherwords or explanation. For example:\\n\\nG1: &lt;first most likely guess,as short aspossible;not a complete sentence,just the guess!&gt;\\n\\nP1: &lt;the probability between0.0 and 1.0 that G1 is correct, without any extra commentary whatsoever; justthe probability!&gt; ... G${k}: &lt;${k}-th most likely guess,as short as possible;not a complete sentence, just the guess!&gt;\\n\\nP${k}: &lt;the probability between 0.0and 1.0 that G${k} is correct,without any extra commentary whatsoever; just theprobability!&gt; \\n\\nThe question is: ${THE_QUESTION}</td></tr><tr><td rowspan=1 colspan=8>Verb.2SCoT Provide your best guess for the following question. Before giving your answer,provide a step-by-step explanation of your thought process. Then on a new linegive the guess with no other words or explanation.\\n\\nFor example:\\n\\nExplanation:&lt;one sentence step-by-step explanation of your thought process&gt;\\n\\nGuess: &lt;mostlikely guess,as short as_possible; not a complete sentence,just the guess!&gt;\\n\\nThequestion is:${THE_QUESTION}Provide the probability that your guess is correct. Give ONLY the probability,noother words or explanation.\\n\\nFor example:\\n\\nProbability:&lt;the probability between0.0 and 1.0 that your guess is correct,without any extra commentary whatsoever;just the probability!&gt;\\n</td></tr><tr><td rowspan=1 colspan=8>Verb. 2S top-1 Provide your best guess for the following question.Give ONLY the guess,nootherwordsor_explanation.\\n\\nForexample:\\n\\nGuess:&lt;most likely guess,asshort as possible; not a complete sentence, just the guess!&gt;\\n\\nThe questionis:${THE_QUESTION}Provide the probability that your guess is correct. Give ONLY the_probability,noother words or explanation.\\n\\nFor example:\\n\\nProbability:&lt;the probability between0.0 and 1.0 that your guess is correct,without any extra commentary whatsoever;just the probability!&gt;\\n</td></tr><tr><td rowspan=10 colspan=8>Verb. 2S top-kProvide your ${k} best guesses for the following question. Give ONLY the guesses,no other words_or explanation. For example:\\n\\nG1: &lt;first most likely guess,asshort as possible;not a complete sentence,just the guess!&gt;\\n\\nP1: &lt;the probabilitybetween 0.0 and 1.0 that G1 is correct,without any extra commentary whatsoever;just the probability!&gt; ... G${k}:&lt;${k}-th most likely guess,as short as possible;not a complete sentence,just the guess!&gt;\\n\\nThe question is:${THE_QUESTION}Providethe_probability_that eachofyourguessesiscorrect. Give ONLYthe probabilities,no other words or explanation.\\n\\nFor example:\\n\\nP1:&lt;theprobability between 0.0 and 1.0 that G1 is correct,without any extra commentarywhatsoever; just the probability!&gt;\\n... P${k}: &lt;the probability between 0.0 and1.0 that G${k} is correct, without any extra commentary whatsoever; just theprobability!&gt;</td></tr><tr><td rowspan=1 colspan=1>therwords</td></tr><tr><td rowspan=1 colspan=6>sho</td><td rowspan=1 colspan=1>nortaspossibl</td><td rowspan=1 colspan=1>sible;</td></tr><tr><td rowspan=1 colspan=5></td><td rowspan=4 colspan=2>ust theproailiteat</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=2 colspan=3></td></tr><tr></tr><tr><td rowspan=1 colspan=1>oth</td></tr><tr></tr><tr><td rowspan=1 colspan=4></td></tr><tr><td rowspan=1 colspan=8>Ling. 1S Provide your best guess for the following question,and describe how likely it isthat your guess is correct as one of the following expressions: ${EXPRESsION_LIST}.Give ONLY the guess and_ your confidence, no other words or explanation.Forexample:\\n\\nGuess: &lt;most likely guess,as short as possible; not a complete sentence,just the guess!&gt;\\nConfidence:&lt;description of confidence, without any extracommentary whatsoever; just a short phrase!&gt;\\n\\nThe question is:${THE_QUESTION}</td></tr></table>",
966
+ "bbox": [
967
+ 129,
968
+ 103,
969
+ 868,
970
+ 859
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "",
977
+ "bbox": [
978
+ 115,
979
+ 85,
980
+ 487,
981
+ 164
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Are the following two answers to my question $\\mathsf Q$ semantically equivalent?\\n\\nQ: \\${THE_QUESTION}\\nA1: \\${GOLD_ANSWER}\\nA2: \\${PRED_ANSWER}\\n\\nPlease answer with a single word, either “Yes.\" or “No.\", and explain your reasoning. ",
988
+ "bbox": [
989
+ 117,
990
+ 166,
991
+ 487,
992
+ 261
993
+ ],
994
+ "page_idx": 9
995
+ }
996
+ ]
parse/dev/g3faCfrwm7/g3faCfrwm7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/g3faCfrwm7/g3faCfrwm7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/iTtGCMDEzS_/iTtGCMDEzS__middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/wiBEFdAvl8L/wiBEFdAvl8L_content_list.json ADDED
@@ -0,0 +1,1330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "GLIPv2: Unifying Localization and VL Understanding ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 122,
9
+ 821,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Haotian Zhang∗1†, Pengchuan Zhang $\\ast 2 \\dagger \\spadesuit$ , Xiaowei $\\mathbf { H } \\mathbf { u } ^ { 3 }$ , Yen-Chun Chen3, Liunian Harold Li4† Xiyang $\\mathbf { D a i } ^ { 3 }$ , Lijuan Wang3, Lu Yuan3, Jenq-Neng Hwang1, Jianfeng Gao3 ",
17
+ "bbox": [
18
+ 187,
19
+ 199,
20
+ 848,
21
+ 231
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1University of Washington, 2Meta AI, 3Microsoft, 4UCLA {haotiz,hwang}@uw.edu,pengchuanzhang@fb.com,liunian.harold.li@cs.ucla.edu, {Xiaowei.Hu,Yen-Chun.Chen,Xiyang.Dai,lijuanw,luyuan,jfgao}@microsoft.com ",
28
+ "bbox": [
29
+ 299,
30
+ 231,
31
+ 743,
32
+ 271
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 289,
43
+ 535,
44
+ 305
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "We present GLIPv2, a grounded VL understanding model, that serves both localization tasks (e.g., object detection, instance segmentation) and Vision-Language (VL) understanding tasks (e.g., VQA, image captioning). GLIPv2 elegantly unifies localization pre-training and Vision-Language Pre-training (VLP) with three pre-training tasks: phrase grounding as a VL reformulation of the detection task, region-word contrastive learning as a novel region-word level contrastive learning task, and the masked language modeling. This unification not only simplifies the previous multi-stage VLP procedure but also achieves mutual benefits between localization and understanding tasks. Experimental results show that a single GLIPv2 model (all model weights are shared) achieves near SoTA performance on various localization and understanding tasks. The model also shows (1) strong zero-shot and few-shot adaption performance on open-vocabulary object detection tasks and (2) superior grounding capability on VL understanding tasks. Code is released at https://github.com/microsoft/GLIP. ",
51
+ "bbox": [
52
+ 233,
53
+ 320,
54
+ 766,
55
+ 513
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 522,
66
+ 310,
67
+ 539
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recently, a general interest arises in building general-purpose vision systems [21, 24, 56, 42], also called vision foundation models [6, 57], that solve various vision tasks simultaneously, such as image classification [30], object detection [39], and Visual-Language (VL) understanding [3, 11, 27]. Of particular interest, is the unification between localization tasks (e.g., object detection [39] and segmentation [8, 20]) and VL understanding tasks (e.g., VQA [3] and image captioning [11]). Localization pre-training benefits VL tasks [1, 59], and the “localization- $\\mathrm { . > V L P ^ { \\prime } }$ two-stage pretraining procedure [41, 49, 13, 48, 34, 32, 61, 37, 35] is the common practice in VL community. A long-standing challenge is the unification of localization and understanding, which aims at mutual benefit between these two kinds of tasks, simplified pre-training procedure, and reduced pre-training cost. ",
74
+ "bbox": [
75
+ 173,
76
+ 553,
77
+ 825,
78
+ 691
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "However, these two kinds of tasks appear to be dramatically different: localization tasks are visiononly and require fine-grained output (e.g., bounding boxes or pixel masks), while VL understanding tasks emphasize fusion between two modalities and require high-level semantic outputs (e.g., answers or captions). ",
85
+ "bbox": [
86
+ 174,
87
+ 696,
88
+ 825,
89
+ 753
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "[21, 24, 56] have made early attempts at unifying these tasks in a straightforward multi-task manner, where a low-level visual encoder is shared across tasks, and two separate high-level branches are designed for localization and VL understanding, respectively. The localization tasks are still vision-only and do not benefit from the rich semantics in vision-language data. As a result, such unified models see the marginal mutual benefit or even performance degradation [24] compared with task-specific models. ",
96
+ "bbox": [
97
+ 174,
98
+ 760,
99
+ 825,
100
+ 843
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper, we identify “VL grounding” as a “meta”-capability for localization and understanding capabilities. VL grounding involves not only understanding an input sentence but also localizing the mentioned entities in the image (see an example in Figure 1). We build a grounded VL understanding model (GLIPv2) as a unified model for localization and VL understanding tasks. ",
107
+ "bbox": [
108
+ 178,
109
+ 849,
110
+ 820,
111
+ 877
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/adbfa03373afd92f159bb9702b1f0cfe1bcc88f56f93dcf4b3e7468790aeb8e9.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Left: GLIPv2, a pre-trained grounded VL understanding model, unifies various localization and VL understanding tasks. These two kinds of tasks mutually benefit each other, and enables new capabilities such as language-guided detection/segmentation and grounded VQA/captioning. Right: Additional examples from ODinW (detection), LVIS (segmentation), VQA, COCO Captioning. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 173,
124
+ 99,
125
+ 821,
126
+ 332
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 174,
135
+ 435,
136
+ 821,
137
+ 463
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Localization ${ \\bf \\Pi } + { \\bf \\delta V L }$ understanding $=$ grounded VL understanding. Localization tasks involve both localization and semantic classification, where classification can be cast as a VL understanding problem using the classification-to-matching trick (Section 3.1). Therefore, we reformulate localization tasks as VL grounding tasks, in which the language input is a synthesized sentence as the concatenation of category names [36]. Localization data are turned into VL grounding data, accordingly. The massive VL understanding data (image-text pairs) can be easily turned into VL grounding data in a self-training manner [36]. Therefore, GLIPv2 has a unified pre-training process: all task data are turned into grounding data and GLIPv2 is pre-trained to perform grounded VL understanding. ",
144
+ "bbox": [
145
+ 173,
146
+ 469,
147
+ 825,
148
+ 594
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "A stronger VL grounding task: inter-image region-word contrastive learning. GLIP [36] proposes the phrase grounding task as its pre-training task, which we argue is an easy task and does not fully utilize data information. For example, in the VL grounding task in Figure 1, the phrase grounding task only requires the model to match a given image region to one of the three phrases in the text input, i.e., “green, pink striped, or plain white umbrella?”. This 1-in-3 choice is very easy, only requires color understanding, but loses lots of information in this grounding data: the umbrellas are not any other colors, like black, yellow, etc; objects in those regions are umbrellas but not any other categories, like car, bike, etc. From a contrastive learning view, this phrase grounding task only has two negatives. More negatives can be created from this annotation and thus enable stronger contrastive learning. In GLIPv2, we introduce the novel inter-image region-word contrastive learning task, which leverages phrases from other sentences in the same batch as potential negatives, as another much stronger VL grounding task. This new region-word contrastive loss enables GLIPv2 to learn more discriminative region-word features and demonstrates improvements over all downstream tasks. ",
155
+ "bbox": [
156
+ 173,
157
+ 601,
158
+ 825,
159
+ 780
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "GLIPv2 achieves mutual benefit between localization and VL understanding. 1) Experimental results (Table 2) show that a single GLIPv2 model (all model weights are shared) achieves near SoTA performance on various localization and understanding tasks. 2) Thanks to semantic-rich annotations from the image-text data, GLIPv2 shows superior zero-shot and few-shot transfer learning ability to open-world object detection and instance segmentation tasks, evaluated on the LVIS dataset and the \"Object Detection in the Wild (ODinW)\" benchmark. 3) GLIPv2 enables language-guided detection and segmentation ability, and achieves new SoTA performance on the Flick30K-entities phrase grounding and PhraseCut referring image segmentation tasks. 4) Inherently a grounding model, GLIPv2 leads to VL understanding models with strong grounding ability, which are self-explainable and easy to debug. For example, GLIPv2, when GLIPv2 is finetuned on VQA, it can answer questions while localizing mentioned entities (see Figure 1 and Section 4.4). ",
166
+ "bbox": [
167
+ 174,
168
+ 786,
169
+ 825,
170
+ 911
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "",
177
+ "bbox": [
178
+ 173,
179
+ 90,
180
+ 823,
181
+ 119
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2 Related Work ",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 174,
191
+ 142,
192
+ 321,
193
+ 160
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Localization models. Traditionally, localization tasks such as object detection and segmentation are single-modality and output bounding boxes or pixel masks [45, 38, 23, 14, 46, 10, 9]. One challenge of these single-modality models lies in generalization to rare and novel concepts: it is hard to collect localization data that cover many rare categories [20]. A long line of research focuses on this generalization problem, under the name of zero-shot [4, 62, 7, 63], weakly-supervised [18, 5, 52], or open-vocabulary [58, 19] localization. Built upon MDETR [25] and GLIP [36], GLIPv2 converts localization tasks into a grounded vision-language task using the classification-to-matching trick (Section 3). Thus GLIPv2 can learn from the semantic-rich vision-language data and shows strong performance on open-vocabulary localization tasks. ",
200
+ "bbox": [
201
+ 173,
202
+ 176,
203
+ 825,
204
+ 301
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Vision-language understanding models. Vision-language (VL) understanding tasks such as VQA [3], image captioning [11], and image-text retrieval [26] involve understanding visual semantics and how they are expressed in natural language. Many VL models (e.g., BUTD) [2, 59] rely on a pre-trained localization model as their visual encoder; the downside is the pro-longed “localization- $\\mathrm { . > V L P ^ { \\prime } }$ pre-training pipeline [41, 49, 13, 48, 34, 32, 61, 37, 35]. In contrast, GLIPv2 simplifies the pre-training pipeline and enables grounded VL understanding for better interpretability (Section 4.4). ",
211
+ "bbox": [
212
+ 173,
213
+ 308,
214
+ 825,
215
+ 405
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Unifying localization and understanding. [21, 24, 56] made pioneering efforts in unifying localization and understanding. However, localization tasks are still treated as single-modality tasks, while VL tasks involve two modalities. The unification is achieved via straightforward multi-tasking: a low-level visual encoder is shared across tasks and two separate branches are designed for localization and VL understanding. Such unified models do not bring evident mutual benefit and often underperform task-specific models. In contrast, GLIPv2 identifies grounded VL understanding as a meta-task for localization and understanding. The task unification brings architecture unification: the unified grounded VL understanding model empowers a localization branch with VL capacity, arriving at a unified branch that excels at both tasks. ",
222
+ "bbox": [
223
+ 174,
224
+ 411,
225
+ 825,
226
+ 535
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "GLIPv2 vs GLIP. 1) GLIP shows that grounded pre-training improves localization. GLIPv2 further shows grounded pre-training improves VL understanding and thus leads to a unified model for localization and VL understanding. 2) GLIPv2 introduces the inter-image region-word contrastive loss, which is another and stronger grounding task than the pre-training task in GLIP. The proposed loss can be viewed as a region-word level generalization of the prevalent image-level contrastive learning [33, 44, 55]. 3) GLIPv2 outperforms GLIP on all benchmarks with the same pre-training data. ",
233
+ "bbox": [
234
+ 173,
235
+ 542,
236
+ 825,
237
+ 640
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "3 GLIPv2: Unifying Localization and VL Understanding ",
244
+ "text_level": 1,
245
+ "bbox": [
246
+ 174,
247
+ 662,
248
+ 665,
249
+ 680
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "Based on the reformulation of object detection as a generalized phrase grounding task in GLIP [36], we unify both localization and VL understanding tasks as grounded vision-language tasks. A grounded vision-language task takes both image and text as inputs, and outputs region-level understanding results (e.g., detection, segmentation) and/or image-level understanding results with associated grounding/localization information (e.g., VQA, image captioning). We will present the unified grounded VL formulation and architecture in Section 3.1, the pre-training losses in Section 3.2, and transfer to downstream tasks in Section 3.3. ",
256
+ "bbox": [
257
+ 174,
258
+ 696,
259
+ 825,
260
+ 794
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "3.1 A Unified VL Formulation and Architecture ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 174,
270
+ 814,
271
+ 519,
272
+ 829
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "At the center of GLIPv2’s unified formulation is the classification-to-matching trick, which reformulates any task-specific fixed-vocab classification problem as an task-agnostic open-vocabulary vision-language matching problem. The best example is the reformulation of image classification as image-text matching in CLIP [44], which enables the model to learn from raw image-text data directly, and achieves strong zero-shot results on open-vocabulary classification tasks. In GLIPv2, we replace every semantic classification linear layer in traditional single-modality vision models with a vision-language matching dot-product layer. ",
279
+ "bbox": [
280
+ 174,
281
+ 842,
282
+ 825,
283
+ 911
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "",
290
+ "bbox": [
291
+ 171,
292
+ 90,
293
+ 823,
294
+ 119
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "As illustrated in Figure 1, GLIPv2’s unified VL architecture is based on the generic architecture we term Architecture $\\mathbf { I I }$ . It consists of a dual encoder, denoted as $\\operatorname { E n c } _ { V }$ and $\\mathrm { E n c } _ { L }$ , and a fusion encoder, denoted as $\\mathtt { E n c } _ { V L }$ . The model takes an image-text pair (Img, Text) as input, and extract visual and text features as below: ",
301
+ "bbox": [
302
+ 173,
303
+ 126,
304
+ 825,
305
+ 181
306
+ ],
307
+ "page_idx": 3
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/9c4c35248a4e870f2c38dc839ab0d8037a874caf49120b986c1f4d9c5d8cb008.jpg",
312
+ "text": "$$\n\\begin{array} { r } { \\dot { O } = \\mathrm { E n c } _ { V } ( \\mathrm { I m g } ) , \\quad \\mathring { P } = \\mathrm { E n c } _ { L } ( \\mathrm { T e x t } ) , \\quad O , P = \\mathrm { E n c } _ { V L } ( \\mathring { O } , \\mathring { P } ) , } \\end{array}\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 285,
316
+ 185,
317
+ 709,
318
+ 205
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "where $( \\mathring { O } , \\mathring { P } )$ and $( O , P )$ denote the image/text features before and after VL fusion, respectively. ",
325
+ "bbox": [
326
+ 171,
327
+ 215,
328
+ 808,
329
+ 231
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "Vision-Language understanding tasks. Arch $\\mathbf { I I }$ is the most popular model architecture for VL understanding tasks. Given the cross-modality fused representations $O$ and $P$ , it is straightforward to add lightweight task-specific heads for various VL tasks. For example, GLIPv2 adds a two-layer MLP on top of text features $P$ as the masked language modeling (MLM) head, to perform the MLM pre-training. We provide model details of VQA and image captioning in Section 3.3. ",
336
+ "bbox": [
337
+ 173,
338
+ 236,
339
+ 825,
340
+ 306
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "(Language-guided) object detection and phrase grounding. Following GLIP [36], GLIPv2 uses the classification-to-matching trick to unify detection and grounding. More specifically, for detection, we simply replace the class logits $S _ { \\mathrm { c l s } } = \\dot { O } W ^ { T }$ , where $W$ is the weight matrix of the box classifier, with a task-agnostic region-word similarity logits $S _ { \\mathrm { g r o u n d } } = O P ^ { T }$ , where text features $P$ are label embeddings from a task-agnostic language encoder. As shown in Figure 1, object detection and phrase grounding share the same input/output format and model architecture. See GLIP [36] for more details. Their only difference is the input text format: (1) for object detection, the text input is a string of concatenated candidate object labels; (2) for phrase grounding, the text input is a natural language sentence. We refer to GLIP [36] for more details. ",
347
+ "bbox": [
348
+ 173,
349
+ 311,
350
+ 825,
351
+ 436
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "(Language-guided) instance segmentation and referring image segmentation. Given the object detection results, an instance segmentation head is added to classify each pixel within the box into a semantic class. Again, GLIPv2 uses the classification-to-matching trick to produce a unified instance segmentation head for the standard instance segmentation tasks and the referring image segmentation tasks and leverage both types of data for its pre-training. This classification-to-matching trick can also apply to many other semantic classification heads in single modality CV models (e.g., semantic segmentation) and thus transfers them to language-guided CV models. ",
358
+ "bbox": [
359
+ 173,
360
+ 443,
361
+ 825,
362
+ 541
363
+ ],
364
+ "page_idx": 3
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "3.2 GLIPv2 Pre-training ",
369
+ "text_level": 1,
370
+ "bbox": [
371
+ 174,
372
+ 556,
373
+ 359,
374
+ 571
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "The GLIPv2 is pre-trained with three pre-training losses: phrase grounding loss $\\mathcal { L } _ { \\mathrm { g r o u n d } }$ from a vision-language reformulation of the object detection task, region-word contrastive loss ${ \\mathcal { L } } _ { \\mathrm { { i n t e r } } }$ from a novel region-word level contrastive learning task, and the standard masked language modeling loss ${ \\mathcal { L } } _ { \\mathrm { m l m } }$ proposed in BERT [16]. ",
381
+ "bbox": [
382
+ 174,
383
+ 582,
384
+ 825,
385
+ 638
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "equation",
391
+ "img_path": "images/c874fa33d82791f42fa3e1f490f0ae7435a5315c9aad040f33e7db4814a657dc.jpg",
392
+ "text": "$$\n{ \\mathcal { L } } _ { \\mathrm { G L I P v 2 } } = \\underbrace { { \\mathcal { L } } _ { \\mathrm { l o c } } + { \\mathcal { L } } _ { \\mathrm { i n t r a } } } _ { { \\mathcal { L } } _ { \\mathrm { g r o u n d } } } + { \\mathcal { L } } _ { \\mathrm { i n t e r } } + { \\mathcal { L } } _ { \\mathrm { m l m } }\n$$",
393
+ "text_format": "latex",
394
+ "bbox": [
395
+ 370,
396
+ 645,
397
+ 627,
398
+ 683
399
+ ],
400
+ "page_idx": 3
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "Similar to losses in detection tasks, the grounding loss $\\mathcal { L } _ { \\mathrm { g r o u n d } }$ has two parts: the localization loss $\\mathcal { L } _ { \\mathrm { l o c } }$ trains localization heads with bounding-box supervision, e.g., RPN loss, box regression loss and/or centerness loss [50]; the intra-image region-word alignment loss ${ \\mathcal { L } } _ { \\mathrm { { i n t r a } } }$ is essentially the semantic classification/retrieval loss for each region. ",
405
+ "bbox": [
406
+ 174,
407
+ 695,
408
+ 825,
409
+ 752
410
+ ],
411
+ "page_idx": 3
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "Intra-image region-word alignment loss. Given one image-text pair (Img, Text), we obtain the image and text features after cross-modality fusion $O$ and $P$ . The Intra-image region-word alignment loss is computed by ",
416
+ "bbox": [
417
+ 173,
418
+ 757,
419
+ 825,
420
+ 799
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "equation",
426
+ "img_path": "images/0be0841c0aae48d63e473967074a95a8a74b18edc87f3085747021cde4ae32f8.jpg",
427
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { i n t r a } } = l o s s ( O P ^ { T } ; T ) ,\n$$",
428
+ "text_format": "latex",
429
+ "bbox": [
430
+ 419,
431
+ 799,
432
+ 578,
433
+ 818
434
+ ],
435
+ "page_idx": 3
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "where $O P ^ { T }$ is the similarity score between image regions and word tokens, and $T$ is the target affinity matrix determined by the ground-truth annotations. The loss function loss is typically a cross-entropy loss for two-stage detectors [46] and a focal loss [38] for one-stage detectors. ",
440
+ "bbox": [
441
+ 174,
442
+ 820,
443
+ 825,
444
+ 863
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "However, as discussed in Section 1, this intra-image region-word contrastive learning is rather weak in the sense of contrastive learning, due to the limited number of phrases that can one caption can contain. GLIP [36] alleviates this problem by appending a few negative sentences to form a longer text input with more (negative) phrases. However, constrained by the maximal length of text tokens (256 in GLIP and GLIPv2), only a few negative sentences can be added and the number of negative phrases remains in the order of $1 0 \\mathrm { { ^ { \\circ } s } }$ . This small-negative-example problem also exists in detection data [36] when the input text cannot include all class names in a detection dataset, e.g., Objects365. ",
451
+ "bbox": [
452
+ 174,
453
+ 868,
454
+ 825,
455
+ 912
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "",
462
+ "bbox": [
463
+ 174,
464
+ 90,
465
+ 825,
466
+ 147
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "Inter-image region-word contrastive loss. In GLIPv2, we propose using phrases from other imagetext pairs in the same batch as negative examples, which effectively increases the number of negative examples to the order of 1000’s, with nearly negligible additional computational cost. ",
473
+ "bbox": [
474
+ 173,
475
+ 152,
476
+ 825,
477
+ 195
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "As in (1), given a batch of image-text pairs $( \\mathrm { I m } { \\bf g } ^ { i } , \\mathrm { T e x t } ^ { i } ) _ { i = 1 } ^ { B }$ and their ground-truth annotations $( T ^ { i } ) _ { i = 1 } ^ { B }$ , the model produces the image and text features before and after VL fusion, denoted as $( \\mathring { O } ^ { i } , \\mathring { P } ^ { i } ) _ { i = 1 } ^ { B }$ and $( O ^ { i } , P ^ { i } ) _ { i = 1 } ^ { B }$ , respectively. Then as illustrated in Figure 2 (Left), a batch-wise similarity matrix Sbatchground and a batch-wise target affinity matrix $T ^ { \\mathrm { b a t c h } }$ are constructed by considering all the image regions and text phrases across this batch. Their $( i , j )$ ’th blocks are obtained as below: ",
484
+ "bbox": [
485
+ 173,
486
+ 199,
487
+ 825,
488
+ 280
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "equation",
494
+ "img_path": "images/81bc5c6654fef04a2279e58e7654796038923ba61800f178482e67e4dc8983d3.jpg",
495
+ "text": "$$\nS _ { \\mathrm { g r o u n d } } ^ { \\mathrm { b a t c h } } [ i , j ] = \\bar { O } ^ { i } ( \\bar { P } ^ { j } ) ^ { T } , \\quad T ^ { \\mathrm { b a t c h } } [ i , j ] = \\left\\{ \\begin{array} { l l } { T ^ { i } , } & { \\mathrm { i f ~ } i = j } \\\\ { \\mathrm { o b t a i n e d ~ b y ~ l a b e l ~ p r o p a g a t i o n , } } & { \\mathrm { o t h e r w i s e . } } \\end{array} \\right.\n$$",
496
+ "text_format": "latex",
497
+ "bbox": [
498
+ 215,
499
+ 282,
500
+ 782,
501
+ 318
502
+ ],
503
+ "page_idx": 4
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The inter-image region-word contrastive loss is then defined as the standard bi-directional contrastive loss applied on all image regions and phrases in this batch: ",
508
+ "bbox": [
509
+ 173,
510
+ 320,
511
+ 823,
512
+ 349
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "${ \\mathrm { ~ \\dot { \\ z } _ { \\mathrm { { i n t e r } } } = \\ c r o s s \\_ e n t r o p y \\mit \\mathrm { \\mit \\mathrm { \\ l o s s } ( \\cal S \\mit _ { \\mathrm { { g r o u n d } } } ^ { \\mathrm { b a t c h } } , \\mit T \\mathrm { ^ { b a t c h } , \\ a x i s = 0 ) + \\ c r o s s \\mit \\mathrm { _ { - } \\ e n t r o p y \\mit \\mathrm { \\mit { \\mit \\mathrm { \\ l o s s } ( \\cal S \\mit _ { \\mathrm { { g r o u n d } } } ^ { \\mathrm { b a t c h } } , \\mathrm { T \\mathrm { ^ { b a t c h } , \\ a x i s = 1 ) \\mit . } } } } } } } } } $ (5) ",
519
+ "bbox": [
520
+ 171,
521
+ 352,
522
+ 825,
523
+ 382
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Compared with that in the inter-image contrastive loss (3), the number of negatives is multiplied by batch size $B$ in this inter-image contrastive loss (5). We elaborate two important details in (4). (1) GLIPv2 uses the image text features $( \\mathring { O } ^ { i } , \\mathring { P } ^ { i } ) _ { i = 1 } ^ { B }$ before VL fusion, not $( O ^ { i } , P ^ { i } ) _ { i = 1 } ^ { B }$ after VL fusion, to compute the batch-wise similarity matrix in the inter-image contrastive loss (4). Otherwise, the image and text features after VL fusion would have seen the paired information (1), and thus the model can easily rule out the negatives from misaligned images/texts. (2) We cannot simply assign all regions and texts from unpaired image-text as negative pairs, as done in the standard contrastive loss in CLIP [44]. Instead, we determine the off-diagonal blocks in the target affinity matrix $T ^ { \\mathrm { b a t c h } }$ by label propagation. For example, as illustrated in Figure 2 (Left), if a region is annotated as “person”, it should be a positive pair with all “person” phrases in detection-type texts. We do not propagate positives to grounding-type texts (natural sentences) because phrases in sentences carry contexts that are unique to that image-sentence pair. ",
530
+ "bbox": [
531
+ 173,
532
+ 382,
533
+ 826,
534
+ 550
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "Pre-training with both detection and paired-image-text data. GLIPv2 pre-training data is in the image-text-target triplet format (Img, Text, $T$ ), where the target affinity matrix $T$ contains the box-label localization annotations. We also use massive image-text pair data (Img, Text) to pre-train GLIPv2, by generating grounding boxes $\\hat { T }$ for phrases in the text with the GLIP pre-trained model from [36]. The human-annotated OD/grounding data provides high-fidelity localization supervision, while the massive image-text data greatly improves the concept diversity for GLIPv2. ",
541
+ "bbox": [
542
+ 174,
543
+ 556,
544
+ 825,
545
+ 642
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Second-stage pre-training of the segmentation head. GLIPv2 performs a second-stage pre-training of the language-guided segmentation head on both instance segmentation and image referring segmentation data, while fixing all other parts of the model. ",
552
+ "bbox": [
553
+ 174,
554
+ 648,
555
+ 825,
556
+ 690
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "3.3 Transfer GLIPv2 to Localization and VL Tasks ",
563
+ "text_level": 1,
564
+ "bbox": [
565
+ 174,
566
+ 705,
567
+ 542,
568
+ 720
569
+ ],
570
+ "page_idx": 4
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "We introduce two ways to easily transfer GLIPv2 to various downstream tasks. In addition, GLIPv2 can perform conventional VL tasks (e.g., VQA) along with localization, effectively making every task we consider a “grounded VL understanding” task. ",
575
+ "bbox": [
576
+ 174,
577
+ 731,
578
+ 825,
579
+ 773
580
+ ],
581
+ "page_idx": 4
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "One model architecture for all. GLIPv2 can be transferred to downstream tasks by fine-tuning the model with an (optional) task-specific head. 1) For detection and segmentation tasks, no task-specific head is needed as the pre-training architecture can inherently perform detection and segmentation. 2) For $V L$ tasks: for VQA, a classification head is added on top of the hidden representation of the start-of-sequence token; for caption generation, we train with a unidirectional language modeling loss, which maximizes the likelihood of the next word given context. We use a unidirectional attention mask and prevent the image part from attending to the text in the fusion layers. ",
586
+ "bbox": [
587
+ 173,
588
+ 779,
589
+ 825,
590
+ 877
591
+ ],
592
+ "page_idx": 4
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "One set of weights for all. There is a growing interest in developing models that can be transferred to various tasks while only changing the least amount of parameters to save training time and storage cost [47, 31]. Following GLIP, GLIPv2 can be transferred to localization tasks in a zero-shot or a prompt-tuning setting (Section 4.2). One single GLIPv2 model can serve various tasks, where each task only keeps few or no parameters. Of particular interest is the prompt tuning setting. For a certain localization task, the text prompt is the same for all input images; thus, we could directly tune $\\mathring { P }$ , a small prompt embedding matrix, to adapt GLIPv2 to new tasks. Prompt tuning in a deep-fused model such as GLIPv2 is different from the conventional linear probing/prompt tuning setting [53, 44, 60] in shallow-interacting vision models such as CLIP. The latter can also be viewed as only tuning a small prompt/softmax embedding $P$ ; however, tuning $P$ only affects the very last layer of the model while the visual representation is still frozen. In contrast, GLIP/GLIPv2’s visual representation is conditioned on the prompt embedding $\\mathring { P }$ ; tuning $\\mathring { P }$ changes the text, visual, as well as fused embeddings. As a result, prompt tuning in GLIPv2 is highly effective, often matching the performance of fine-tuning (see Table 2). This is in contrast to the common observation in CV that linear probing lags behind fine-tuning by a large gap [22]. ",
597
+ "bbox": [
598
+ 173,
599
+ 883,
600
+ 821,
601
+ 911
602
+ ],
603
+ "page_idx": 4
604
+ },
605
+ {
606
+ "type": "image",
607
+ "img_path": "images/a2126e3d117d3e41b61f4a05e16f3c1c31302f73ea9c4df2bc4eaaa3b313fdd2.jpg",
608
+ "image_caption": [
609
+ "Figure 2: GLIPv2 pre-training losses: the intra-image alignment loss ${ \\mathcal { L } } _ { \\mathrm { { i n t r a } } }$ (right) takes features after VL fusion and compute loss over region-word pairs within each image-text pair; the inter-image contrastive loss (left) ${ \\mathcal { L } } _ { \\mathrm { { i n t e r } } }$ takes features before VL fusion and computes loss over all region-word pairs across a batch of image-text pairs. Label propagation is used to determine the off-diagonal blocks of the ${ \\mathcal { L } } _ { \\mathrm { { i n t e r } } }$ target matrix (4). "
610
+ ],
611
+ "image_footnote": [],
612
+ "bbox": [
613
+ 245,
614
+ 88,
615
+ 756,
616
+ 330
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "",
623
+ "bbox": [
624
+ 174,
625
+ 441,
626
+ 825,
627
+ 626
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "Grounded VL understanding. GLIPv2 also enables grounded VL understanding, where we retain the ability to perform grounding when fine-tuning the model to a downstream VL task. This increases the interpretability of the model. Specifically, we first turn the VL data of the downstream task into grounded VL data using a pre-trained GLIP model. Then we train the model with both the downstream task head and grounding head. For VQA, the model is trained to predict the answer and ground entities in the question as well as the implied entity in the answer; for captioning, the model is trained to predict the next word given the context and ground the current decoded word. By tuning localization tasks into a grounded VL task and augmenting VL tasks with grounding ability, we effectively turn every task into a grounded VL understanding task (see examples in Figure 1). ",
634
+ "bbox": [
635
+ 174,
636
+ 631,
637
+ 825,
638
+ 757
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "4 Experiments ",
645
+ "text_level": 1,
646
+ "bbox": [
647
+ 174,
648
+ 780,
649
+ 312,
650
+ 797
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "In this section, we show that GLIPv2 serves as a performant and easy-to-deploy general-purpose vision system. 1) One Model Architecture for All (Section 4.1). GLIPv2 can be directly fine-tuned to both localization and VL understanding tasks with minimal architecture change. It achieves performance on par with SOTA models with specialized architectures. 2) One Model Weight for All (Section 4.2). GLIPv2 can be transferred to localization tasks in a zero-shot manner with zero parameter update; with prompt tuning, a single GLIPv2 model can achieve comparable performance with fully fine-tuned settings on both localization and understanding tasks. ",
657
+ "bbox": [
658
+ 174,
659
+ 814,
660
+ 825,
661
+ 911
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "table",
667
+ "img_path": "images/6cd7c0f65e75390d9324f84d095e636f3a8a2c560c5e413db97af98e75c0eebb.jpg",
668
+ "table_caption": [],
669
+ "table_footnote": [],
670
+ "table_body": "<table><tr><td>Model</td><td>Model Type</td><td>COCO-Det (test-dev)</td><td>ODinW (test)</td><td>LVIS (minival)</td><td>COCO-Mask (test-dev)</td><td>Flickr30K PhraseCut (test)</td><td>(test)</td><td>VQA (test-dev/test-std) (Karpathy-test)</td><td>Captioning</td></tr><tr><td>Mask R-CNN [23]</td><td rowspan=\"4\"></td><td>39.8</td><td>-</td><td>33.3/-</td><td>-/37.1</td><td>=</td><td>=</td><td></td><td></td></tr><tr><td>DETR[9]</td><td>42.0</td><td></td><td>17.8/-</td><td>=</td><td></td><td>=</td><td></td><td></td></tr><tr><td>DyHead-T[15]</td><td>49.7</td><td>60.8</td><td>=</td><td>=</td><td>=</td><td></td><td></td><td></td></tr><tr><td>DyHead-L [15]</td><td>60.3*</td><td>=</td><td>=</td><td></td><td></td><td>=</td><td></td><td></td></tr><tr><td>VisualBERT[34]</td><td rowspan=\"3\">Understanding</td><td>=</td><td></td><td></td><td></td><td>71.33</td><td>=</td><td>70.8/71.0</td><td>=</td></tr><tr><td>UNITER[12]</td><td></td><td></td><td></td><td></td><td>=</td><td>=</td><td>73.8/74.0</td><td>=</td></tr><tr><td>VinVL[59]</td><td></td><td></td><td></td><td></td><td>=</td><td></td><td>76.5/76.6</td><td>130.8</td></tr><tr><td>GPV[21]</td><td rowspan=\"3\">Localization &amp;</td><td></td><td></td><td>=</td><td></td><td>·</td><td>=</td><td>62.5/-</td><td>102.3</td></tr><tr><td>UniT[24]</td><td>42.3</td><td>=</td><td></td><td></td><td></td><td></td><td>67.6/-</td><td>=</td></tr><tr><td>MDETR[25]</td><td>=</td><td>=</td><td>24.2/-</td><td>=</td><td>84.3</td><td>53.7</td><td>70.6 /70.6</td><td>■</td></tr><tr><td>Unicorn [56]</td><td rowspan=\"3\">Understanding Localization &amp;</td><td>=</td><td>■</td><td>=</td><td></td><td>80.4</td><td>=</td><td>69.2/69.4</td><td>119.1</td></tr><tr><td>GLIP-T[36]</td><td>55.2</td><td>64.9</td><td>=</td><td>=</td><td>85.7</td><td>-</td><td>=</td><td>-</td></tr><tr><td>GLIP-L [36]</td><td>Understanding 61.5*</td><td>68.9</td><td>=</td><td>=</td><td>87.1</td><td>-</td><td>=</td><td>-</td></tr><tr><td>GLIPv2-T(Ours)</td><td>Localization</td><td>55.5</td><td>66.5</td><td>50.6/41.4</td><td>53.5/42.0</td><td>86.5</td><td>59.4</td><td>71.6/71.8</td><td>122.1</td></tr><tr><td>GLIPv2-B (Ours)</td><td>&amp;</td><td>58.8</td><td>69.4</td><td>57.3/46.2</td><td>59.0/45.8</td><td>87.5</td><td>61.3</td><td>73.1/73.3</td><td>128.5</td></tr><tr><td>GLIPv2-H(Ours)</td><td>Understanding</td><td>60.6 (62.4*)</td><td>70.4</td><td>59.8 / 48.8</td><td>59.8 / 48.9</td><td>87.7</td><td>61.3</td><td>74.6/74.8</td><td>131.0</td></tr></table>",
671
+ "bbox": [
672
+ 179,
673
+ 88,
674
+ 823,
675
+ 279
676
+ ],
677
+ "page_idx": 6
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "Table 1: One model architecture results. For COCO-Det test-dev, \\* indicates multi-scale evaluation. For LVIS, we report the numbers for both bbox and segm on minival to avoid data contamination due to the pre-training. For Flickr30K test, we report the metric under R@1. For COCO-Mask, we also report both bbox and segm on test-dev. ",
682
+ "bbox": [
683
+ 173,
684
+ 290,
685
+ 825,
686
+ 344
687
+ ],
688
+ "page_idx": 6
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "Following GLIP [36], we adopt Swin Transformer [40] as the image encoder $\\operatorname { E n c } _ { V }$ , text transformers [51, 44] as the text encoder $\\mathrm { E n c } _ { L }$ , Dynamic Head [15] with language-aware deep fusion [36] as the fusion encoder $\\mathtt { E n c } _ { V L }$ , and Hourglass network [43] as instance segmentation head feature extractor. We train GLIPv2 at three scales: GLIPv2-T, GLIPv2-B, and GLIPv2-H. ",
693
+ "bbox": [
694
+ 174,
695
+ 377,
696
+ 825,
697
+ 434
698
+ ],
699
+ "page_idx": 6
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "GLIPv2-T has the same model config and initialization as GLIP-T: Swin-Tiny and BERT-Base as the dual encoder. The model is pre-trained on the following data: 1) O365, 2) GoldG as in GLIP-T (C), and 3) Cap4M, 4M image-text pairs collected from the web with boxes generated by GLIP-T [36]. GLIPv2-B/GLIPv2-H are based on Swin-Base/Swin-Huge and the pre-layernorm text transformer [17] as dual encoder, and are initialized from the UniCL [55] checkpoints. We observe much stabler training with GPT-type pre-layernorm transformer [17] than BERT-type post-layernorm transformer. The training data contain: 1) FiveODs (2.78M data) 1; 2) GoldG as in MDETR [25]; and 3) C $\\mathrm { C 1 5 M + S B U }$ , 16M public image-text data with generated boxes by GLIP-L [36]. Segmentation heads of GLIPv2 models are pre-trained on COCO, LVIS [20] and PhraseCut [54], with all other model parameters are frozen. ",
704
+ "bbox": [
705
+ 173,
706
+ 440,
707
+ 825,
708
+ 579
709
+ ],
710
+ "page_idx": 6
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "Note All datasets above were collected by the creators (cited) and consent for any personally identifiable information (PII) was ascertained by the authors where necessary. Due to limited space, we refer to supplementary for details of training recipes and hyper-parameters. ",
715
+ "bbox": [
716
+ 174,
717
+ 585,
718
+ 825,
719
+ 627
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "4.1 One Model Architecture for All ",
726
+ "text_level": 1,
727
+ "bbox": [
728
+ 176,
729
+ 648,
730
+ 431,
731
+ 664
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "We compare GLIPv2 to existing object detection and vision-language pre-training methods on a wide range of tasks. We fine-tune the model on 8 different downstream tasks and report the performance in Table 1. We make the following observations. ",
738
+ "bbox": [
739
+ 176,
740
+ 678,
741
+ 823,
742
+ 718
743
+ ],
744
+ "page_idx": 6
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "GLIPv2 v.s. specialized Localization methods. GLIPv2 outperforms previous localization models on generalization to both common and rare classes and domains with a single model architecture and pre-training stage. 1) OD on common categories (COCO-Det), GLIPv2-T achieves 5.8 improvement compared to the standard DyHead-T trained on O365 (55.5 v.s. 49.7). GLIPv2-H reaches $6 2 . 4 \\mathrm { A P }$ on test-dev, and surpass the performance of the previous SoTA model GLIP-L. 2) OD on rare / unseen categories (LVIS), GLIPv2-T outperforms a supervised MDETR on the bbox by a great margin (59.8 v.s. 24.2). 3) Generalization to diverse real-word tasks (ODinw), GLIPv2-T (55.5) performs better than original GLIP-T (64.9) on the average of 13 public datasets; GLIPv2-B outperforms GLIP-L by 0.5 AP. 4) Instance segmentation (COCO-Mask & PhraseCut), for traditional instance segmentation (i.e., COCO-Mask), GLIPv2-H outperforms the well-known Mask R-CNN by a great margin on segm. ",
749
+ "bbox": [
750
+ 173,
751
+ 724,
752
+ 825,
753
+ 864
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "table",
759
+ "img_path": "images/5d5cfcaa7c298e146446e3d1b12c5586deb63bf590099b9abb3cbde84e40b543.jpg",
760
+ "table_caption": [
761
+ "Table 2: One set of weights results v.s. Original GLIP. \\* indicates multi-scale evaluation. Numbers in red clearly points out the difference between the prompt tuning and full fine-tuning results (see Table 1). Numbers in gray mean that they are not in zero-shot manner. $\\dagger$ : these two numbers are artificially high due to some overlap between COCO-minival and VisualGenome-train. "
762
+ ],
763
+ "table_footnote": [],
764
+ "table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"4\">Direct Evaluation</td><td colspan=\"5\">Prompt Tuning</td></tr><tr><td>COCO-Mask (minival)</td><td>ODinW (test)</td><td>LVIS-Det (minival)</td><td>Flickr30K (minival)</td><td>COCO-Det (test-dev)</td><td>ODinW (test)</td><td>LVIS (minival)</td><td>COCO-Mask (test-dev)</td><td>PhraseCut (test)</td></tr><tr><td>GLIP-T</td><td>46.6/-</td><td>46.5</td><td>26.0</td><td>85.7</td><td>二</td><td>46.5</td><td>-</td><td>-</td><td>-</td></tr><tr><td>GLIP-L</td><td>49.8/-</td><td>52.1</td><td>37.3</td><td>87.1</td><td>58.8</td><td>67.9</td><td>=</td><td>=</td><td>-</td></tr><tr><td>GLIPv2-T</td><td>47.3/35.7</td><td>48.5</td><td>29.0</td><td>86.0</td><td>53.4 (-2.1)</td><td>64.8 (-1.7)</td><td>49.3 / 34.8 (-13/-6.6)</td><td>53.2 / 41.2 (-0.3/-0.8)</td><td>49.4</td></tr><tr><td>GLIPv2-B</td><td>61.9†/43.4</td><td>54.2</td><td>48.5</td><td>87.2</td><td>59.0 (+0.2)</td><td>67.3 (-2.1)</td><td>56.8 / 41.7 (-0.5/-4.5)</td><td>58.8 / 44.9 (-0.2/-0.9)</td><td>55.9</td></tr><tr><td>GLIPv2-H</td><td>64.1/47.4</td><td>55.5</td><td>50.1</td><td>87.7</td><td>60.2 /61.9* (-0.4 /-0.5)</td><td>69.1 (-1.3)</td><td>59.2 / 43.2 (-0.6/-5.7)</td><td>59.8 / 47.2 (-0.0/-1.7)</td><td>56.1</td></tr></table>",
765
+ "bbox": [
766
+ 176,
767
+ 89,
768
+ 821,
769
+ 179
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "image",
775
+ "img_path": "images/5f74b465df4d065f84ce4d92f60d2f682c7a078495dd46741bd6fcf8dd804923.jpg",
776
+ "image_caption": [
777
+ "Figure 3: Data efficiency of GLIPv2 on ODinW. The $\\mathbf { X }$ -axis is the amount of task-specific data, from zero-shot to all data. Y-axis is the average AP across 13 datasets. "
778
+ ],
779
+ "image_footnote": [],
780
+ "bbox": [
781
+ 210,
782
+ 282,
783
+ 444,
784
+ 436
785
+ ],
786
+ "page_idx": 7
787
+ },
788
+ {
789
+ "type": "table",
790
+ "img_path": "images/0964c95f8e55b2cf8144e1f4296110a4a790c3f21f69c14deb11c82f00feede5.jpg",
791
+ "table_caption": [
792
+ "Table 3: Zero-shot, prompt tuning, and full finetuning performance on ODinW. GLIPv2 models exhibit superior data efficiency. "
793
+ ],
794
+ "table_footnote": [],
795
+ "table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">Zero-Shot 0</td><td colspan=\"5\">Prompt Tuning /Fine Tuning</td></tr><tr><td>1</td><td>3</td><td>5</td><td>10</td><td>All</td></tr><tr><td rowspan=\"2\">DyHead-T 0365 [36]</td><td rowspan=\"2\">-</td><td>=</td><td></td><td>-</td><td>-</td><td>-</td></tr><tr><td>33.8</td><td>43.6</td><td>46.4</td><td>50.8</td><td>60.8</td></tr><tr><td rowspan=\"2\">Lloc + Lintra (GLIP-T)</td><td rowspan=\"2\">46.5</td><td>49.9</td><td>53.7</td><td>55.5</td><td>56.6</td><td>62.4</td></tr><tr><td>51.3</td><td>54.9</td><td>56.4</td><td>58.4</td><td>64.9</td></tr><tr><td rowspan=\"2\">Lloc + Lintra +Linter</td><td rowspan=\"2\">48.4</td><td>52.1</td><td>55.6</td><td>56.7</td><td>58.3</td><td>62.9</td></tr><tr><td>51.4</td><td>55.3</td><td>56.6</td><td>59.5</td><td>66.3</td></tr><tr><td rowspan=\"2\">Lloc +Lintra +Linter +Cmm</td><td rowspan=\"2\">48.5</td><td>52.4</td><td>55.6</td><td>57.4</td><td>58.8</td><td>64.8</td></tr><tr><td>52.8</td><td>55.6</td><td>57.4</td><td>59.7</td><td>66.5</td></tr></table>",
796
+ "bbox": [
797
+ 506,
798
+ 299,
799
+ 821,
800
+ 402
801
+ ],
802
+ "page_idx": 7
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "For language-guided segmentation (i.e., PhraseCut), compared to MDETR, GLIPv2-T achieves an improvement of 5.7 mask AP. ",
807
+ "bbox": [
808
+ 174,
809
+ 535,
810
+ 823,
811
+ 563
812
+ ],
813
+ "page_idx": 7
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "GLIPv2 v.s. specialized VL Understanding methods. GLIPv2 rivals with SoTA specialized models for VL tasks. 1) For VQA, GLIPv2 outperforms VisualBERT and UNITER and approaches the previous SoTA model VinVL. 2) For Captioning, the best GLIPv2 even surpasses VinVL (VinVL and GLIPv2 are not trained with CIDEr optimization). ",
818
+ "bbox": [
819
+ 174,
820
+ 569,
821
+ 825,
822
+ 626
823
+ ],
824
+ "page_idx": 7
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "GLIPv2 v.s. localization and VL models. Prior works such GPV, UniT and Unicorn have also explored unifying localization and VL models (see a discussion in Section 2). GLIPv2 outperforms all previous systems on both localization and VL tasks. For the best GLIPv2-H, it outperforms the UniT by a great margin (18.3 AP) on COCO object detection tasks. Meanwhile, it also surpasses UniT’s performance on VQA by 6.9 points and GPV’s peformance on Image Captioning as well. ",
829
+ "bbox": [
830
+ 174,
831
+ 631,
832
+ 825,
833
+ 702
834
+ ],
835
+ "page_idx": 7
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "Takeaway. Most notably, GLIPv2 outperforms previous “unified” models (GPV, UniT, MDETR, Unicorn) by a large margin. This is the first time that a single model architecture could achieve near SoTA performance on both localization and understanding. In contrast, in prior work, there exists certain trade-off between localization and understanding: models that aim to achieve high understanding performance tend to have lower localization performance (e.g., UNiT’s detection performance is limited to the DETR [9] architecture), as it is not trivial to merge a SoTA localization branch and a SoTA VL branch into a single model. ",
840
+ "bbox": [
841
+ 174,
842
+ 707,
843
+ 825,
844
+ 804
845
+ ],
846
+ "page_idx": 7
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "4.2 One Set of Model Parameters for All ",
851
+ "text_level": 1,
852
+ "bbox": [
853
+ 176,
854
+ 827,
855
+ 465,
856
+ 842
857
+ ],
858
+ "page_idx": 7
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "GLIPv2 is pre-trained to perform grounding; thus it can be transferred to various localization tasks with changing zero or few parameters. We evaluate GLIPv2 under two such settings: 1) direct evaluation, where we transfer the model “as is” without any parameter change, and 2) prompt tuning, where only the prompt embedding is tuned for specific tasks (Section 3.3). ",
863
+ "bbox": [
864
+ 176,
865
+ 856,
866
+ 825,
867
+ 911
868
+ ],
869
+ "page_idx": 7
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "Direct evaluation. The pre-trained GLIPv2 can be directly evaluated on any object detection task (by concatenating the object categories into a text prompt) and visual grounding task without any further tuning. We evaluate the models on four localization tasks: COCO, ODinW, LVIS, and Flickr30, and their results are presented in Table 2. Note that for GLIPv2-B and GLIPv2-H, the training sets of Flick30K and LVIS are present in the pre-training data. Thus, reported numbers on these metrics are not zero-shot evaluation (we have marked them gray). For all other evaluation results, the models are evaluated in zero-shot settings without any further tuning. ",
874
+ "bbox": [
875
+ 174,
876
+ 90,
877
+ 825,
878
+ 188
879
+ ],
880
+ "page_idx": 8
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "GLIPv2 can be effortlessly transferred to different localization tasks without further tuning. 1) For COCO, GLIPv2-T achieves a zero-shot performance of 47.3 without seeing any COCO training images. This surpasses well-established supervised systems (e.g., Mask R-CNN) and also outperforms GLIP-T by 0.7 AP. 2) For ODinW, GLIPv2 also shows strong zero-shot performance. GLIPv2-T (48.5) surpasses the GLIP-T (46.5). Meanwhile, the zero-shot performance of GLIPv2-B and GLIPv2- H even surpasses the 10-shot tuning performance of DyHead-T (to be introduced in Figure 3). 3) For LVIS, GLIPv2-T achieves a 3 AP improvement performance compared to the GLIP-T. 4) For Flickr30K, GLIPv2-B achieves even higher number (87.2) compared to original GLIP-L (87.1). ",
885
+ "bbox": [
886
+ 174,
887
+ 194,
888
+ 825,
889
+ 305
890
+ ],
891
+ "page_idx": 8
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "Prompt Tuning. Following GLIP, GLIPv2 supports efficient prompt tuning: the visual representation is heavily conditioned on the text representation due to the deep fusion block (Section 3.3); thus we could fine-tune only the prompt embedding for each task but still maintain high performance. ",
896
+ "bbox": [
897
+ 174,
898
+ 320,
899
+ 825,
900
+ 363
901
+ ],
902
+ "page_idx": 8
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "Prompt tuning $G L I P \\nu 2$ achieves similar performance as full fine-tuning. When comparing the performance of each task in Table 1 and 2 at the same time, for GLIPv2, prompt tuning performance almost matches the one model architecture results on localization tasks, without changing any of the grounding model parameters. ",
907
+ "bbox": [
908
+ 174,
909
+ 369,
910
+ 825,
911
+ 425
912
+ ],
913
+ "page_idx": 8
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "4.3 GLIPv2 as a Strong Few-Shot Learner ",
918
+ "text_level": 1,
919
+ "bbox": [
920
+ 174,
921
+ 441,
922
+ 480,
923
+ 457
924
+ ],
925
+ "page_idx": 8
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "We demonstrate GLIPv2’s performance on ODinW datasets with respect to different amounts of training data in Figure 3. The performance improvement between GLIPv2-T and GLIP-T exhibits more superior data efficiency for prompt tuning. We compare with the SoTA detector DyHead-T, pre-trained on Objects365 in Table 3. It can be seen that a zero-shot GLIPv2-T (48.5) outperforms a outperforms 5-shot DyHead-T (46.4) while the performance of one-shot GLIPv2-H (61.3) surpasses a all-shot fully supervised DyHead-T (60.8). ",
930
+ "bbox": [
931
+ 174,
932
+ 467,
933
+ 825,
934
+ 550
935
+ ],
936
+ "page_idx": 8
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "4.4 Analysis ",
941
+ "text_level": 1,
942
+ "bbox": [
943
+ 174,
944
+ 568,
945
+ 271,
946
+ 583
947
+ ],
948
+ "page_idx": 8
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "Pre-training losses Table 4 shows the performance of the downstream tasks with different variants of our method. Compared to the GLIP pre-training tasks with only intra-image region-word contrastive loss (Row 3), adding inter-image word-region loss (Row 5) substantially improves the pre-trained model performance across all the object detection tasks (COCO, ODinW, and LVIS) on both zero-shot and fine-tuned manner. Consistent with common observations from most VL understanding methods, adding MLM loss (Row4) benefits for learning the representation for understanding tasks (Flick30k, VQA, and Captioning). Furthermore, using all three losses together at the 1st stage pre-training and doing the 2nd stage pre-training without MLM on OD and GoldG data, GLIPv2 (Row6) can perform well on both the localization and VL understanding tasks. ",
953
+ "bbox": [
954
+ 173,
955
+ 593,
956
+ 825,
957
+ 718
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "An additional stage of pre-training is applied for small models (GLIPv2-T and GLIPv2-B) due to limited model capacity. In order to achieve higher performance on both localization and understanding tasks, we find that including all data (even with some noise) and MLM loss in the first stage of pre-training will benefit the model for learning a better representation of both localization and understanding capability. Since the OD tasks require the model with more accurate localization ability, in our 2nd stage of pre-training, we decide to eliminate the MLM loss. The large model (GLIPv2-H) does not need this additional stage because it has enough capacity to learn both wordregion alignment and MLM together in a single stage. ",
964
+ "bbox": [
965
+ 174,
966
+ 724,
967
+ 825,
968
+ 835
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Pre-training data Table 5 reports the last checkpoint results on GLIPv2 when we do the scaling up of pre-training data. As more weak image-text pair data (Cap) is involved in our training, it benefits both standard/in-domain (i.e., COCO, Flickr30K) and large-domain gap (i.e., ODinW, LVIS) tasks. We also show that by adding the inter-image region-word contrastive helps when we are fixing the data at the same scale. For large-domain gap tasks, adding the inter-image region-word contrastive ",
975
+ "bbox": [
976
+ 174,
977
+ 842,
978
+ 825,
979
+ 911
980
+ ],
981
+ "page_idx": 8
982
+ },
983
+ {
984
+ "type": "table",
985
+ "img_path": "images/4a6e2da9ed6355c0ede7a60aeb0869bd98076132f0221978182aa486fd2a0d91.jpg",
986
+ "table_caption": [],
987
+ "table_footnote": [],
988
+ "table_body": "<table><tr><td>Row Model</td><td></td><td>COCO</td><td>ODinW</td><td>LVIS|Flickr30K VQA Captioning</td><td></td><td></td><td></td></tr><tr><td>1</td><td>No pre-train</td><td>-/50.6</td><td>-/60.8</td><td>1</td><td>1</td><td>64.6</td><td>111.5</td></tr><tr><td>2</td><td>+Lmlm</td><td>-/48.5</td><td>-/37.4</td><td>1</td><td>1</td><td>64.6</td><td>110.9</td></tr><tr><td>3</td><td>+ Lloc+Lintra</td><td></td><td>46.6/55.2 46.5/64.9</td><td>26.0</td><td>85.7</td><td>69.4</td><td>119.7</td></tr><tr><td>4</td><td>+Lloc+Lintra+Lmlm</td><td></td><td>47.0/55.2 47.6/66.2</td><td>28.5</td><td>86.5</td><td>69.8</td><td>120.7</td></tr><tr><td>5</td><td>+Lloc+Lintra+Linter</td><td></td><td>47.1/55.4 48.4/66.3</td><td>28.6</td><td>85.8</td><td>68.7</td><td>120.4</td></tr><tr><td>6</td><td>+Lloc+Lintra+Linter+Lmlm</td><td></td><td>47.3/55.5 48.5/66.5</td><td>29.0</td><td>86.3</td><td>70.7</td><td>122.1</td></tr></table>",
989
+ "bbox": [
990
+ 245,
991
+ 89,
992
+ 756,
993
+ 180
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Table 4: Pre-training losses on Tiny-scale model. Involving intra-image region-word alignment loss $\\mathcal { L } _ { \\mathrm { { i n t r a } } }$ , inter-image region-word contrastive loss ${ \\mathcal { L } } _ { \\mathrm { i n t e r } }$ and MLM loss ${ \\mathcal { L } } _ { \\mathrm { m l m } }$ will benefit both localization and understanding tasks. ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 190,
1003
+ 826,
1004
+ 233
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "table",
1010
+ "img_path": "images/9df54e7b36e47d6eb7909b5fdb14fcd7644562d55b724a448461d1f4a0ecafbb.jpg",
1011
+ "table_caption": [
1012
+ "Table 5: Pre-train data scale up on Base-scale model. Results are reported at the last checkpoint. See supplementary for results at all checkpoints. "
1013
+ ],
1014
+ "table_footnote": [],
1015
+ "table_body": "<table><tr><td>Linter</td><td>Pre-train Data</td><td>CoCo</td><td>ODinW</td><td>LVIS</td><td>Flick30K</td></tr><tr><td>X</td><td>0365,GoldG</td><td>48.06</td><td>43.14</td><td>25.6</td><td>84.36</td></tr><tr><td></td><td>0365,GoldG</td><td>48.59</td><td>42.64</td><td>26.9</td><td>83.90</td></tr><tr><td></td><td>0365,GoldG,Cap4M</td><td>48.21</td><td>51.35</td><td>34.2</td><td>85.56</td></tr><tr><td>X</td><td>0365,GoldG,Cap4M</td><td>48.79</td><td>52.70</td><td>35.0</td><td>85.50</td></tr><tr><td>×</td><td>0365,GoldG,Cap12M</td><td>48.50</td><td>49.32</td><td>35.5</td><td>85.79</td></tr><tr><td>√</td><td>0365,GoldG,Capl2M</td><td>49.26</td><td>53.15</td><td>36.6</td><td>85.84</td></tr></table>",
1016
+ "bbox": [
1017
+ 176,
1018
+ 251,
1019
+ 490,
1020
+ 330
1021
+ ],
1022
+ "page_idx": 9
1023
+ },
1024
+ {
1025
+ "type": "table",
1026
+ "img_path": "images/690b5f2437704313520c3d51016469f178ba944faf2725d90140abf4e2de5a14.jpg",
1027
+ "table_caption": [
1028
+ "Table 6: GLIPv2 can perform captioning and grounding at the same time (a.k.a., grounded VL understanding). "
1029
+ ],
1030
+ "table_footnote": [],
1031
+ "table_body": "<table><tr><td>Model</td><td>COCO Caption B4 CIDEr</td><td>SPICE</td><td>R@1 R@5</td><td>Flickr30K Grounding</td><td>R@10°</td></tr><tr><td>GLIPv2-T</td><td>36.5</td><td>119.8 21.6</td><td>80.8</td><td>94.4</td><td>96.5</td></tr><tr><td>GLIPv2-B</td><td>37.4</td><td>123.0 21.9</td><td>81.0</td><td>94.5</td><td>96.5</td></tr></table>",
1032
+ "bbox": [
1033
+ 511,
1034
+ 258,
1035
+ 828,
1036
+ 320
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "loss will further boost the model to learn better representation. For more detailed scaling-up effects on various tasks under all the checkpoints for GLIP and GLIPv2, refer to Appendix. ",
1043
+ "bbox": [
1044
+ 173,
1045
+ 412,
1046
+ 823,
1047
+ 440
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Note that the (Img, Text, $T$ ) data used in GLIPv2 pre-training can be just human-annotated data (Row1&2 in Table 5), with which GLIPv2 pre-training does not involve any pseudo data from a pre-trained grounding/localization model. In order to achieve the best performance, GLIPv2 uses image-text pair data with pseudo boxes (Cap) from a pre-trained GLIP model (Row3-6 in Table 4), which is trained with the same \"grounded VL understanding\" task but just with smaller data. ",
1054
+ "bbox": [
1055
+ 174,
1056
+ 446,
1057
+ 825,
1058
+ 516
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Grounded Vision-Language Understanding GLIPv2 can be trained to perform a VL task and grounding at the same time (Section 3.3). We denote such an ability as grounded VL understanding. In Figure 1, we showcase grounded predictions of GLIPv2 on VQA and COCO captions. We also conduct quantitative evaluations (Table 6). The model achieves strong performance for both VL understanding (on COCO Caption) and localization (on Flickr30K Grounding). Such an ability to produce high-level semantic outputs (i.e., answers and captions) and supporting localization results is another appealing trait of GLIPv2, as potential users can have a better understanding of the model behaviour. See more detailed analysis and qualitative examples in the Appendix. ",
1065
+ "bbox": [
1066
+ 174,
1067
+ 522,
1068
+ 825,
1069
+ 633
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "5 Conclusion and Social Impacts ",
1076
+ "text_level": 1,
1077
+ "bbox": [
1078
+ 174,
1079
+ 656,
1080
+ 462,
1081
+ 672
1082
+ ],
1083
+ "page_idx": 9
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "This paper proposes GLIPv2, a unified framework for VL representation learning that serves both localization tasks and VL understanding tasks. We experimentally verify the effectiveness of the unified model and the novel region-word contrastive learning. Compared to existing methods, GLIPv2 achieves competitive near SoTA performance on various localization and understanding tasks. However, additional analysis of the data and the model is necessary before deploying it in practice since large-scale web data may contain unintended private information, unsuitable images/text, or some bias leakage. Further investigation may be needed for web data due to the above issues. ",
1088
+ "bbox": [
1089
+ 174,
1090
+ 689,
1091
+ 826,
1092
+ 786
1093
+ ],
1094
+ "page_idx": 9
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "6 Acknowledgement ",
1099
+ "text_level": 1,
1100
+ "bbox": [
1101
+ 174,
1102
+ 809,
1103
+ 359,
1104
+ 825
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "We thank anonymous reviewers for their comments and suggestions. Additional thanks go to the Microsoft Research Horizontal AI Team and Microsoft Alexander Multi-modal Team for providing computer resources for large-scale training. The baseline models used in our experiments are based on the open-source code released in the GitHub repository; we acknowledge all the authors who made their code public, which tremendously accelerates our project progress. ",
1111
+ "bbox": [
1112
+ 174,
1113
+ 842,
1114
+ 825,
1115
+ 911
1116
+ ],
1117
+ "page_idx": 9
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "References ",
1122
+ "text_level": 1,
1123
+ "bbox": [
1124
+ 174,
1125
+ 89,
1126
+ 266,
1127
+ 106
1128
+ ],
1129
+ "page_idx": 10
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "top-down attention for image captioning and visual question answering. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). pp. 6077–6086. IEEE (2018) \n[2] Anderson, P., He, X., Buehler, C., Teney, D., Johnson, M., Gould, S., Zhang, L.: Bottom-up and top-down attention for image captioning and visual question answering. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 6077–6086 (2018) \n[3] Antol, S., Agrawal, A., Lu, J., Mitchell, M., Batra, D., Zitnick, C.L., Parikh, D.: VQA: Visual Question Answering. In: International Conference on Computer Vision (ICCV) (2015) \n[4] Bansal, A., Sikka, K., Sharma, G., Chellappa, R., Divakaran, A.: Zero-shot object detection. In: Proceedings of the European Conference on Computer Vision (ECCV). pp. 384–400 (2018) \n[5] Bilen, H., Vedaldi, A.: Weakly supervised deep detection networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 2846–2854 (2016) \n[6] Bommasani, R., Hudson, D.A., Adeli, E., Altman, R., Arora, S., von Arx, S., Bernstein, M.S., Bohg, J., Bosselut, A., Brunskill, E., et al.: On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258 (2021) \n[7] Bucher, M., Vu, T.H., Cord, M., Pérez, P.: Zero-shot semantic segmentation. Advances in Neural Information Processing Systems 32 (2019) \n[8] Caesar, H., Uijlings, J., Ferrari, V.: Coco-stuff: Thing and stuff classes in context. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 1209–1218 (2018) \n[9] Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., Zagoruyko, S.: End-to-end object detection with transformers. In: European Conference on Computer Vision. pp. 213–229. Springer (2020) \n[10] Chen, K., Pang, J., Wang, J., Xiong, Y., Li, X., Sun, S., Feng, W., Liu, Z., Shi, J., Ouyang, W., et al.: Hybrid task cascade for instance segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4974–4983 (2019) \n[11] Chen, X., Fang, H., Lin, T.Y., Vedantam, R., Gupta, S., Dollár, P., Zitnick, C.L.: Microsoft COCO captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325 (2015) \n[12] Chen, Y.C., Li, L., Yu, L., El Kholy, A., Ahmed, F., Gan, Z., Cheng, Y., Liu, J.: UNITER: Universal image-text representation learning. In: Proceedings of the European Conference on Computer Vision (ECCV). pp. 104–120. Springer (2020) \n[13] Chen, Y.C., Li, L., Yu, L., Kholy, A.E., Ahmed, F., Gan, Z., Cheng, Y., Liu, J.: Uniter: Learning universal image-text representations. arXiv preprint arXiv:1909.11740 (2019) \n[14] Dai, J., Li, Y., He, K., Sun, J.: R-fcn: Object detection via region-based fully convolutional networks. In: Advances in neural information processing systems. pp. 379–387 (2016) \n[15] Dai, X., Chen, Y., Xiao, B., Chen, D., Liu, M., Yuan, L., Zhang, L.: Dynamic head: Unifying object detection heads with attentions. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7373–7382 (2021) \n[16] Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018) \n[17] Gao, P., Geng, S., Zhang, R., Ma, T., Fang, R., Zhang, Y., Li, H., Qiao, Y.: Clip-adapter: Better vision-language models with feature adapters. arXiv preprint arXiv:2110.04544 (2021) \n[18] Gokberk Cinbis, R., Verbeek, J., Schmid, C.: Multi-fold mil training for weakly supervised object localization. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2409–2416 (2014) \n[19] Gu, X., Lin, T.Y., Kuo, W., Cui, Y.: Zero-shot detection via vision and language knowledge distillation. arXiv preprint arXiv:2104.13921 (2021) \n[20] Gupta, A., Dollar, P., Girshick, R.: Lvis: A dataset for large vocabulary instance segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5356–5364 (2019) \n[21] Gupta, T., Kamath, A., Kembhavi, A., Hoiem, D.: Towards general purpose vision systems. arXiv preprint arXiv:2104.00743 (2021) \n[22] He, K., Chen, X., Xie, S., Li, Y., Dollár, P., Girshick, R.: Masked autoencoders are scalable vision learners. arXiv preprint arXiv:2111.06377 (2021) \n[23] He, K., Gkioxari, G., Dollár, P., Girshick, R.: Mask r-cnn. In: Proceedings of the IEEE international conference on computer vision. pp. 2961–2969 (2017) \n[24] Hu, R., Singh, A.: Unit: Multimodal multitask learning with a unified transformer. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 1439–1449 (2021) \n[25] Kamath, A., Singh, M., LeCun, Y., Synnaeve, G., Misra, I., Carion, N.: Mdetr-modulated detection for end-to-end multi-modal understanding. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 1780–1790 (2021) \n[26] Karpathy, A., Joulin, A., Fei-Fei, L.F.: Deep fragment embeddings for bidirectional image sentence mapping. Advances in neural information processing systems 27 (2014) \n[27] Kiros, R., Salakhutdinov, R., Zemel, R.S.: Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539 (2014) \n[28] Krasin, I., Duerig, T., Alldrin, N., Ferrari, V., Abu-El-Haija, S., Kuznetsova, A., Rom, H., Uijlings, J., Popov, S., Veit, A., et al.: Openimages: A public dataset for large-scale multi-label and multi-class image classification. Dataset available from https://github. com/openimages 2(3), 18 (2017) \n[29] Krishna, R., Zhu, Y., Groth, O., Johnson, J., Hata, K., Kravitz, J., Chen, S., Kalantidis, Y., Li, L.J., Shamma, D.A., et al.: Visual Genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision (IJCV) 123(1), 32–73 (2017) \n[30] Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems 25, 1097–1105 (2012) \n[31] Lester, B., Al-Rfou, R., Constant, N.: The power of scale for parameter-efficient prompt tuning. arXiv preprint arXiv:2104.08691 (2021) \n[32] Li, G., Duan, N., Fang, Y., Jiang, D., Zhou, M.: Unicoder-VL: A universal encoder for vision and language by cross-modal pre-training. arXiv preprint arXiv:1908.06066 (2019) \n[33] Li, J., Selvaraju, R., Gotmare, A., Joty, S., Xiong, C., Hoi, S.C.H.: Align before fuse: Vision and language representation learning with momentum distillation. Advances in Neural Information Processing Systems 34 (2021) \n[34] Li, L.H., Yatskar, M., Yin, D., Hsieh, C.J., Chang, K.W.: Visualbert: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557 (2019) \n[35] Li, L.H., You, H., Wang, Z., Zareian, A., Chang, S.F., Chang, K.W.: Unsupervised vision-andlanguage pre-training without parallel images and captions. arXiv preprint arXiv:2010.12831 (2020) \n[36] Li, L.H., Zhang, P., Zhang, H., Yang, J., Li, C., Zhong, Y., Wang, L., Yuan, L., Zhang, L., Hwang, J.N., et al.: Grounded language-image pre-training. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10965–10975 (2022) \n[37] Li, X., Yin, X., Li, C., Zhang, P., Hu, X., Zhang, L., Wang, L., Hu, H., Dong, L., Wei, F., et al.: Oscar: Object-semantics aligned pre-training for vision-language tasks. In: Proceedings of the European Conference on Computer Vision (ECCV). pp. 121–137. Springer (2020) \n[38] Lin, T.Y., Goyal, P., Girshick, R., He, K., Dollár, P.: Focal loss for dense object detection. In: Proceedings of the IEEE international conference on computer vision. pp. 2980–2988 (2017) \n[39] Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: European conference on computer vision. pp. 740–755. Springer (2014) \n[40] Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B.: Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030 (2021) \n[41] Lu, J., Batra, D., Parikh, D., Lee, S.: ViLBERT: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In: Advances in Neural Information Processing Systems (NeurIPS). pp. 13–23 (2019) \n[42] Lu, J., Clark, C., Zellers, R., Mottaghi, R., Kembhavi, A.: Unified-io: A unified model for vision, language, and multi-modal tasks. arXiv preprint arXiv:2206.08916 (2022) \n[43] Newell, A., Yang, K., Deng, J.: Stacked hourglass networks for human pose estimation. In: European conference on computer vision. pp. 483–499. Springer (2016) \n[44] Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International Conference on Machine Learning (ICML) (2021) \n[45] Redmon, J., Divvala, S., Girshick, R., Farhadi, A.: You only look once: Unified, real-time object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 779–788 (2016) \n[46] Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: Towards real-time object detection with region proposal networks. Advances in neural information processing systems 28, 91–99 (2015) \n[47] Shin, T., Razeghi, Y., Logan IV, R.L., Wallace, E., Singh, S.: Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980 (2020) \n[48] Su, W., Zhu, X., Cao, Y., Li, B., Lu, L., Wei, F., Dai, J.: VL-BERT: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530 (2019) \n[49] Tan, H., Bansal, M.: Lxmert: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490 (2019) \n[50] Tian, Z., Shen, C., Chen, H., He, T.: Fcos: Fully convolutional one-stage object detection. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 9627–9636 (2019) \n[51] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. In: Advances in neural information processing systems. pp. 5998–6008 (2017) \n[52] Wang, P., Cai, Z., Yang, H., Swaminathan, G., Vasconcelos, N., Schiele, B., Soatto, S.: Omnidetr: Omni-supervised object detection with transformers. arXiv preprint arXiv:2203.16089 (2022) \n[53] Wang, X., Huang, T.E., Darrell, T., Gonzalez, J.E., Yu, F.: Frustratingly simple few-shot object detection. arXiv preprint arXiv:2003.06957 (2020) \n[54] Wu, C., Lin, Z., Cohen, S., Bui, T., Maji, S.: Phrasecut: Language-based image segmentation in the wild. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10216–10225 (2020) \n[55] Yang, J., Li, C., Zhang, P., Xiao, B., Liu, C., Yuan, L., Gao, J.: Unified contrastive learning in image-text-label space. arXiv preprint arXiv:2204.03610 (2022) \n[56] Yang, Z., Gan, Z., Wang, J., Hu, X., Ahmed, F., Liu, Z., Lu, Y., Wang, L.: Crossing the format boundary of text and boxes: Towards unified vision-language modeling. arXiv preprint arXiv:2111.12085 (2021) \n[57] Yuan, L., Chen, D., Chen, Y.L., Codella, N., Dai, X., Gao, J., Hu, H., Huang, X., Li, B., Li, C., et al.: Florence: A new foundation model for computer vision. arXiv preprint arXiv:2111.11432 (2021) \n[58] Zareian, A., Rosa, K.D., Hu, D.H., Chang, S.F.: Open-vocabulary object detection using captions. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 14393–14402 (2021) \n[59] Zhang, P., Li, X., Hu, X., Yang, J., Zhang, L., Wang, L., Choi, Y., Gao, J.: Vinvl: Revisiting visual representations in vision-language models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 5579–5588 (2021) \n[60] Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Learning to prompt for vision-language models. arXiv preprint arXiv:2109.01134 (2021) \n[61] Zhou, L., Palangi, H., Zhang, L., Hu, H., Corso, J.J., Gao, J.: Unified vision-language pretraining for image captioning and VQA. AAAI (2020) \n[62] Zhu, P., Wang, H., Saligrama, V.: Zero shot detection. IEEE Transactions on Circuits and Systems for Video Technology 30(4), 998–1010 (2019) ",
1134
+ "bbox": [
1135
+ 173,
1136
+ 127,
1137
+ 828,
1138
+ 907
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "",
1145
+ "bbox": [
1146
+ 171,
1147
+ 77,
1148
+ 828,
1149
+ 911
1150
+ ],
1151
+ "page_idx": 11
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "",
1156
+ "bbox": [
1157
+ 171,
1158
+ 61,
1159
+ 828,
1160
+ 916
1161
+ ],
1162
+ "page_idx": 12
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "[63] Zhu, P., Wang, H., Saligrama, V.: Don’t even look once: Synthesizing features for zero-shot detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 11693–11702 (2020) ",
1167
+ "bbox": [
1168
+ 173,
1169
+ 90,
1170
+ 823,
1171
+ 133
1172
+ ],
1173
+ "page_idx": 13
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Checklist ",
1178
+ "text_level": 1,
1179
+ "bbox": [
1180
+ 174,
1181
+ 151,
1182
+ 254,
1183
+ 169
1184
+ ],
1185
+ "page_idx": 13
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "The checklist follows the references. Please read the checklist guidelines carefully for information on how to answer these questions. For each question, change the default [TODO] to [Yes] , [No] , or [N/A] . You are strongly encouraged to include a justification to your answer, either by referencing the appropriate section of your paper or providing a brief inline description. For example: ",
1190
+ "bbox": [
1191
+ 176,
1192
+ 183,
1193
+ 825,
1194
+ 238
1195
+ ],
1196
+ "page_idx": 13
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "• Did you include the license to the code and datasets? [Yes] \n• Did you include the license to the code and datasets? [No] The code and the data are proprietary. \n• Did you include the license to the code and datasets? [N/A] ",
1201
+ "bbox": [
1202
+ 217,
1203
+ 247,
1204
+ 823,
1205
+ 313
1206
+ ],
1207
+ "page_idx": 13
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Please do not modify the questions and only use the provided macros for your answers. Note that the Checklist section does not count towards the page limit. In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below. ",
1212
+ "bbox": [
1213
+ 178,
1214
+ 321,
1215
+ 826,
1216
+ 364
1217
+ ],
1218
+ "page_idx": 13
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "1. For all authors... ",
1223
+ "bbox": [
1224
+ 214,
1225
+ 376,
1226
+ 339,
1227
+ 390
1228
+ ],
1229
+ "page_idx": 13
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1234
+ "bbox": [
1235
+ 236,
1236
+ 393,
1237
+ 825,
1238
+ 483
1239
+ ],
1240
+ "page_idx": 13
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "2. If you are including theoretical results... ",
1245
+ "bbox": [
1246
+ 214,
1247
+ 486,
1248
+ 493,
1249
+ 501
1250
+ ],
1251
+ "page_idx": 13
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] ",
1256
+ "bbox": [
1257
+ 236,
1258
+ 503,
1259
+ 733,
1260
+ 535
1261
+ ],
1262
+ "page_idx": 13
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "3. If you ran experiments... ",
1267
+ "bbox": [
1268
+ 212,
1269
+ 537,
1270
+ 393,
1271
+ 553
1272
+ ],
1273
+ "page_idx": 13
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] ",
1278
+ "bbox": [
1279
+ 238,
1280
+ 556,
1281
+ 825,
1282
+ 671
1283
+ ],
1284
+ "page_idx": 13
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1289
+ "bbox": [
1290
+ 214,
1291
+ 676,
1292
+ 823,
1293
+ 690
1294
+ ],
1295
+ "page_idx": 13
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [Yes] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1300
+ "bbox": [
1301
+ 238,
1302
+ 694,
1303
+ 823,
1304
+ 799
1305
+ ],
1306
+ "page_idx": 13
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1311
+ "bbox": [
1312
+ 214,
1313
+ 801,
1314
+ 705,
1315
+ 816
1316
+ ],
1317
+ "page_idx": 13
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1322
+ "bbox": [
1323
+ 238,
1324
+ 820,
1325
+ 825,
1326
+ 907
1327
+ ],
1328
+ "page_idx": 13
1329
+ }
1330
+ ]
parse/train/-2FCwDKRREu/-2FCwDKRREu_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdf72addecb6687d610262e27ddbe6ca2745b0aa48b58c668389fd00f2a60ad8
3
+ size 7108370
parse/train/-2FCwDKRREu/-2FCwDKRREu_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8f235f8da6cc8a92d979235e94e2d79fbd4d9a709d0ad43c2994041a008171f
3
+ size 6903712
parse/train/-2FCwDKRREu/-2FCwDKRREu_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdb2523950fd09df3fe881b2ec30a197d56a93f38d63e674e9051b573186a1d0
3
+ size 7116680
parse/train/14nC8HNd4Ts/14nC8HNd4Ts_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78474998ad35fc5af3393e91cf8c20fa1ab12dc1e310433ed3b0dfdb41f1fea2
3
+ size 1979698
parse/train/14nC8HNd4Ts/14nC8HNd4Ts_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87c1b743990a447885989c8fbb3eb16ee573d9a8db3d1fecb7c8858f89b51c80
3
+ size 1857682
parse/train/14nC8HNd4Ts/14nC8HNd4Ts_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1ca4904777656360ab629ddf82f771cccbb89fbca2be12dd155463973346de8
3
+ size 1979294
parse/train/2UyqK45_djA/2UyqK45_djA_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d5c601e865f7300f39be0d817a4ce0c24257cac258dd251ec19143a1c71c67a
3
+ size 1171711
parse/train/2UyqK45_djA/2UyqK45_djA_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7024871a93350d04f2b0884e8e84f1633888015c12dc105d4e8488a627c8c48
3
+ size 995651
parse/train/2UyqK45_djA/2UyqK45_djA_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76cf397def02472da6b70cff7eaa6e4ddbfd987ac2698eef35579f468b5b7258
3
+ size 1188811
parse/train/4-gBZAkF9ze/4-gBZAkF9ze_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88f59ff21a3bc9caa159c86a6df7a0ddf1541f5410a73cb4181e266d570dc24f
3
+ size 1273425
parse/train/4-gBZAkF9ze/4-gBZAkF9ze_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a5871c6e3747465d730172e1dd52e8e5d12bf19e29f3907972a7889454d0969
3
+ size 1060070
parse/train/4-gBZAkF9ze/4-gBZAkF9ze_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c17bf1b223ae25eb88230dd70a94ec17cc3905a717aace78f5e08265ed11ad5
3
+ size 1302402
parse/train/5Dl1378QutR/5Dl1378QutR_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b14a5016514806b864558008ce0426fe0a31c1333175a3bfd84f373ed49bdd77
3
+ size 1676200
parse/train/5Dl1378QutR/5Dl1378QutR_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c59de41a488cd5d49dd29b6b65947fd6081c3a7fb05952e1c5007df44b7eddab
3
+ size 1493386
parse/train/5Dl1378QutR/5Dl1378QutR_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68a0f822bffbd7e5f72c64d3c4d9f2fd3bc71d95656ea64d2ed9b62af995404c
3
+ size 1697378
parse/train/5nLibPckV2N/5nLibPckV2N_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d16b680279bd88a8879fe6c491ac072b07f87f01c4b27b58176c74d6eaffde9
3
+ size 1066010
parse/train/5nLibPckV2N/5nLibPckV2N_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90f76a5d983eba7453de0aba3ed801545cf4e59f51b3cbee8e497819e6b5c0b6
3
+ size 919725
parse/train/5nLibPckV2N/5nLibPckV2N_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdb7a6ce05a0a5384bf3a1a81d938a2c24e270e66b0bd7f1c4f2e81c9a3747ef
3
+ size 1079126
parse/train/84gjULz1t5/84gjULz1t5_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:547a8a7886dcd5f2510fb9cb1a5561123932926a1bb5493d9978e7c80e76da73
3
+ size 5616011
parse/train/84gjULz1t5/84gjULz1t5_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec5e644c2865f75c3712b7046445652f62a854afb47774f3887551fea1eab023
3
+ size 5034964
parse/train/84gjULz1t5/84gjULz1t5_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6850ba038999cfc478d301cf3c0d622a74a060594918351176b9a9fcb7c3cd78
3
+ size 5613048
parse/train/8ygF02Zm51q/8ygF02Zm51q_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72148f60dc6826907f79f757385c8f601178edcffcf513642744de35c2847753
3
+ size 763201
parse/train/8ygF02Zm51q/8ygF02Zm51q_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87913c46d3988d45133d993200e9d5f821c62d31035ca92ebac905b2e7f779e2
3
+ size 589078
parse/train/8ygF02Zm51q/8ygF02Zm51q_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:379b3591165df4a0c4abcc8445fe0cdf14562c18ee55c8d2bff75906b530f569
3
+ size 769593
parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0751a7946be4af11b38f3fd8187dfc96aa697314c9840fb67fb48245c1bc4f0
3
+ size 676166
parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2579af8dd62e233469e334ee85cff849eec0853353eeeaa86198e0a09fbbc726
3
+ size 400666
parse/train/Aa5oPXc_1IV/Aa5oPXc_1IV_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:478ab2c81a38ceaba341f633015ad15072810a41c8335874b6b8d4f3cb2e81f9
3
+ size 687770